patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -53,11 +53,11 @@ module CommentsHelper
def like_button_text(comment)
case comment.public_reactions_count
when 0
- "Like"
+ I18n.t("core.like")
when 1
- " like"
+ " #{I18n.t('core.like').downcase}"
else
- " likes"
+ " #{I18n.t('core.like').downc... | [should_be_hidden?->[hidden_by_commentable_user],comment_user_id_unless_deleted->[deleted,user_id],comment_class->[root?],tree_for->[nested_comments],get_ama_or_op_banner->[include?],commentable_author_is_op?->[any?,user_id],nested_comments->[empty?,render,safe_join,nested_comments,map],like_button_text->[public_reacti... | button text for like button. | I don't think these lines should share the same string. The top one is an imperative verb, and the others are nouns, singular and plural. I guess it doesn't work in French either, does it? |
@@ -19,8 +19,7 @@ import {htmlFor} from '../../../../../src/static-template';
import {poll} from '../../../../../testing/iframe';
const config = describe.configure()
- .ifChrome().skipChromeDev().skipSinglePass();
-
+ .ifChrome().skipSinglePass();
config.run('amp-date-picker', function() {
this.timeout(10... | [No CFG could be retrieved] | Displays a single - date attribute with a fixed time. Displays a calendar box with a calendar with a calendar with a date picker. | nit (non-blocking): can probably consolidate into one line now :) |
@@ -63,6 +63,16 @@ class Jetpack_Core_Json_Api_Endpoints {
$module_data_endpoint = new Jetpack_Core_API_Module_Data_Endpoint();
$module_toggle_endpoint = new Jetpack_Core_API_Module_Toggle_Endpoint( new Jetpack_IXR_Client() );
+ register_rest_route( 'jetpack/v4', '/jitm', array(
+ 'methods' => WP_REST_Serve... | [Jetpack_Core_Json_Api_Endpoints->[build_connect_url->[build_connect_url]]] | Register all the endpoints for the API Register REST routes for Jetpack REST API. Register REST routes for Identity CRisis Registers a REST route for the module list. Register REST routes for a specific module. | Is it ok that these endpoints don't have a `permission_callback` to ensure authorized access? |
@@ -150,8 +150,13 @@ public abstract class HttpObjectEncoder<H extends HttpMessage> extends MessageTo
out.add(buf);
} else {
// Need to produce some output otherwise an
- // IllegalStateException will be thrown
- ... | [HttpObjectEncoder->[encodeChunkedContent->[encodeHeaders]]] | Encode the given message. private final int state = ST_INIT ;. | also is this true: `writing an empty buffer will not actually write anything on the wire, so if there is a user error with msg it will not be visible externally` |
@@ -92,11 +92,6 @@ static crypto_mech_info_t aes_mech_info_tab[] = {
AES_MIN_KEY_BYTES, AES_MAX_KEY_BYTES, CRYPTO_KEYSIZE_UNIT_IN_BYTES}
};
-/* operations are in-place if the output buffer is NULL */
-#define AES_ARG_INPLACE(input, output) \
- if ((output) == NULL) \
- (output) = (input);
-
static voi... | [aes_mod_fini->[mod_remove,crypto_unregister_provider],aes_mod_init->[crypto_register_provider,mod_remove,mod_install,aes_impl_init,gcm_impl_init],int->[gcm_encrypt_final,cbc_init_ctx,ctr_mode_final,aes_decrypt_update,gcm_init_ctx,aes_free_context,crypto_update_uio,gmac_init_ctx,bzero,gcm_set_kmflag,aes_common_init_ctx... | AES encryption and decryption Private functions for the AES encryption and decryption functions. | On a second thought, wouldn't it be better to just change this macro to `ASSERT(output != NULL)`? This would be more in line with the other asserts. |
@@ -151,7 +151,7 @@ namespace Microsoft.Xna.Framework.Graphics
// Remove from the global list of graphics resources
lock (resourcesLock)
{
- resources.Remove(new WeakReference(this));
+ resources.Remove(_selfReference);
... | [GraphicsResource->[DoGraphicsDeviceResetting->[GraphicsDeviceResetting],ToString->[ToString],Dispose->[Dispose]]] | Disposes the object if it is a managed object or native object if it is a native. | Should we `_selfReference = null` after removing it? |
@@ -20,12 +20,16 @@ package org.apache.beam.sdk.runners;
import org.apache.beam.sdk.annotations.Experimental;
import org.apache.beam.sdk.annotations.Experimental.Kind;
+import org.apache.beam.sdk.annotations.Internal;
import org.apache.beam.sdk.transforms.AppliedPTransform;
import org.apache.beam.sdk.transforms.P... | [No CFG could be retrieved] | Matches the application with the applied PTransform. | update `package-info.java` to also have this disclaimer |
@@ -180,9 +180,13 @@ public class ExtensionMessageSource extends ExtensionComponent<SourceModel> impl
}
}
- private void startSource() throws MuleException {
+ private void startSource(boolean async) throws MuleException {
try {
- retryPolicyTemplate.execute(new StartSourceCallback(), retrySchedul... | [ExtensionMessageSource->[doStop->[stopSource],getConfigurationInstance->[getConfigurationInstance],restart->[startSource,stopSource],StartSourceCallback->[doWork->[createSource,disposeSource,stopSource]],reallyDoStart->[startSource],reallyDoInitialise->[lifecycle,createSource],createProcessingContext->[getExecutionCla... | Creates a source adapter if it is not already created. | Don't do an instance of. Instead, add a `default boolean isAsync() { return false;}` in `RetryPolicyTemplate` (we'll need this anyway because of another issue) |
@@ -56,11 +56,8 @@ export default class HowTo extends Component {
this.toggleListType = this.toggleListType.bind( this );
this.setDurationText = this.setDurationText.bind( this );
- if ( ! this.props.attributes.durationText ) {
- const defaultDurationText = this.getDefaultDurationText();
-
- this.setDurat... | [No CFG could be retrieved] | A component that can be used to block a component. Describes the time the guide in the how - to - block takes. | unsure this should be done in the constructor, wouldn't be safer to do it in a lifecycle method e.g. componentDidMount? |
@@ -232,11 +232,11 @@ feature 'Sign Up', devise: true do
context 'confirmed user is signed in and tries to confirm again' do
it 'redirects the user to the profile' do
- user = sign_up_and_2fa('test@example.com')
+ sign_up_and_2fa
- stub_analytics(user)
+ stub_analytics(User.last)
... | [visit,email,have_title,create,days,be,to_not,feature,current,instance_double,create!,it,mobile,freeze,to,have_content,before,click_button,click_link,scenario,with,t,last,require,sign_up_and_2fa,stub_analytics,generate,signin,update,times,user_confirmation_url,each,hours,have_css,fill_in,context,sign_up_with,find_by_em... | fill_in password_form_password - fill - in all required fields - js - can sign up with email with invalid domain name. | I would rather see the user returned from `sign_up_and_2fa_user` |
@@ -65,13 +65,11 @@ public class CloseableGrouperIterator<KeyType, T> implements Iterator<T>, Closea
@Override
public void close()
{
- if (closer != null) {
- try {
- closer.close();
- }
- catch (IOException e) {
- throw Throwables.propagate(e);
- }
+ try {
+ closer... | [CloseableGrouperIterator->[close->[close],next->[next],hasNext->[hasNext]]] | Closes the object if it exists. | Could be simply `new RuntimeException(e)` |
@@ -69,6 +69,17 @@ class SemanticAnalyzerPluginInterface:
blocker: bool = False) -> None:
raise NotImplementedError
+ @abstractmethod
+ def anal_type(self, t: Type, *,
+ tvar_scope: Optional[TypeVarScope] = None,
+ allow_tuple_literal: bool = False,
+ ... | [open_callback->[named_generic_type],int_pow_callback->[named_generic_type],ChainedPlugin->[get_type_analyze_hook->[get_type_analyze_hook],get_method_signature_hook->[get_method_signature_hook],get_method_hook->[get_method_hook],get_attribute_hook->[get_attribute_hook],get_function_hook->[get_function_hook],get_base_cl... | Fail the task. | Why this one is not defined as ``@abstractmethod``? |
@@ -0,0 +1,17 @@
+package com.baeldung.factorybean;
+
+import org.junit.Test;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+public class FactoryBeanInitializeTest {
+ @Test(expected = Exception.class)
+ public void testInitia... | [No CFG could be retrieved] | No Summary Found. | remove assignment to a variable, because it is not used anywhere, simply new ... is enough |
@@ -1419,6 +1419,8 @@ public class KafkaSupervisor implements Supervisor
taskTuningConfig,
kafkaIOConfig,
spec.getContext(),
+ null,
+ new AuthConfig(),
null
);
| [KafkaSupervisor->[updateCurrentAndLatestOffsets->[updateCurrentOffsets,updateLatestOffsetsFromKafka],emitLag->[getHighestCurrentOffsets],createKafkaTasksForGroup->[generateSequenceName,getRandomId],discoverTasks->[apply->[TaskData,TaskGroup]],buildRunTask->[RunNotice],runInternal->[possiblyRegisterListener],GracefulSh... | Creates Kafka tasks for the given group. | this should be the authConfig field instead ? |
@@ -340,6 +340,13 @@ class QualityManager(QObject):
return quality_group_dict
+ def getDefaultQualityType(self, machine: "GlobalStack") -> Optional[QualityGroup]:
+ preferred_quality_type = machine.definition.getMetaDataEntry("preferred_quality_type")
+ quality_group_dict = self.getQuality... | [QualityManager->[getQualityGroups->[_updateQualityGroupsAvailability],_updateMaps->[initialize]]] | Returns a dictionary of QualityGroup objects for the given machine. | Not sure if tests will complain that if `quality_group_dict` or `preferred_quality_type` are None, this line will not work. |
@@ -1811,6 +1811,8 @@ class CombineGlobally(PTransform):
return view
else:
if pcoll.windowing.windowfn != GlobalWindows():
+ # Remove the broken transform when running into value error.
+ pcoll.pipeline.transforms_stack.pop()
raise ValueError(
"Default values are n... | [NoSideInputsCallableWrapperCombineFn->[merge_accumulators->[_ReiterableChain]],RestrictionProvider->[split_and_size->[restriction_size,split]],Map->[_fn_takes_side_inputs,from_callable,FlatMap],CombineValuesDoFn->[process->[merge_accumulators,create_accumulator,add_inputs,extract_output,apply]],Impulse->[get_windowing... | Expand the given PCollection into a single PCollection. Transform sequence of elements with no elements. | This is not the right place to pop this (internal) stack. Instead, we should popping from the stack in a finally clause of a try block that pushes to the stack. (Alternatively, we could manage the stack with a Python context, but that might be overkill.) |
@@ -240,8 +240,9 @@ class QueryEngine {
);
}
- private AbstractStreamCreateStatement maybeAddFieldsFromSchemaRegistry(
- AbstractStreamCreateStatement streamCreateStatement
+ private StatementWithInferredSchema maybeAddFieldsFromSchemaRegistry(
+ AbstractStreamCreateStatement streamCreateStatement... | [QueryEngine->[buildLogicalPlans->[info,add,clone,getLeft,getRight,buildQueryLogicalPlan],handleDdlStatement->[maybeAddFieldsFromSchemaRegistry,formatSql,create,execute],getResultDatasource->[schema,KsqlTopic,getSelectItems,get,KsqlStream,field,name],buildPhysicalPlans->[handleDdlStatement,buildQueryPhysicalPlan,size,g... | get result datasource. | can we make this `final` and not re-assign it in the method? i.e., return from line 269 |
@@ -1490,7 +1490,8 @@ function admin_page_site(App $a)
'$performance' => L10n::t('Performance'),
'$worker_title' => L10n::t('Worker'),
'$relay_title' => L10n::t('Message Relay'),
- '$relocate' => L10n::t('Relocate - WARNING: advanced function. Could make this server unreachable.'),
+ '$relocate' => L10n::t('... | [admin_page_blocklist_post->[internalRedirect],admin_page_addons->[getBaseURL,internalRedirect],admin_content->[isAjax],admin_page_logs_post->[internalRedirect],admin_page_dbsync->[internalRedirect],admin_page_contactblock->[getStart,getItemsPerPage,renderFull],admin_page_contactblock_post->[internalRedirect],admin_pag... | Admin page site Get all user names that are allowed to install a personal install of X Returns the administration section of the administration section. Returns a list of all possible configuration options. | Remember you have to reference this variable in all `site.tpl` files, including the base template and all the supported themes that override it. |
@@ -55,7 +55,7 @@ namespace System.Reflection.TypeLoading.Ecma
AssemblyNameFlags flags = ar.Flags.ToAssemblyNameFlags();
data.Flags = flags;
data.Name = ar.Name.GetString(reader);
- data.Version = ar.Version.AdjustForUnspecifiedVersionComponents();
+ ... | [EcmaAssembly->[ComputeAssemblyReferences->[AdjustForUnspecifiedVersionComponents,ComputePublicKeyToken,PublicKeyToken,AssemblyReferences,GetStringOrNull,Version,Count,ToAssemblyNameFlags,Name,CultureName,Empty,GetString,GetBlobBytes,PublicKey,GetAssemblyReference,Length,Flags],IterateTypeForwards->[Implementation,Asse... | Override this method to provide the AssemblyNameData for the given assembly reference. | Is this bang needed? |
@@ -47,6 +47,7 @@ public final class ProTerritoryValueUtils {
/** Returns the value of each territory in {@code territoriesToCheck}. */
public static Map<Territory, Double> findTerritoryValues(
+ final ProData proData,
final PlayerId player,
final List<Territory> territoriesThatCantBeHeld,
... | [ProTerritoryValueUtils->[findLandValue->[findTerritoryAttackValue],findWaterValue->[findLandValue,findTerritoryAttackValue]]] | Find the values of the territory that are not covered by a given player. | Method `findTerritoryValues` has 5 arguments (exceeds 4 allowed). Consider refactoring. |
@@ -13,8 +13,11 @@ import (
// eg. github, bitbucket or else, so there must be a separate Plugin
// instance for each webhook provider.
type Plugin interface {
- // Method extracts build information returning it with eventual error.
- Extract(buildCfg *api.BuildConfig, path string, req *http.Request) (*api.Build, er... | [ServeHTTP->[CreateBuild,Extract,Error,GetBuildConfig],Join,Error,Errorf,Split,Trim] | webhook import imports a webhook from the API. parseUrl parses a URL into a build object and returns it. | Would it make sense for `Extract()` to return the default build itself instead of `nil`, so you could test `build == nil` instead of `!proceed`? |
@@ -1052,6 +1052,9 @@ public class TemplateServiceImpl implements TemplateService {
DataObject templateOnStore = destStore.create(tmplForCopy);
templateOnStore.processEvent(Event.CreateOnlyRequested);
+ // I am the big assumer^Wpretender
+ ((TemplateObject)templateOnStore).getImage().s... | [TemplateServiceImpl->[createTemplateCallback->[getTemplate],downloadBootstrapSysTemplate->[createTemplateAsync,getTemplate],createDatadiskTemplateCallback->[getFuture],createChildDataDiskTemplate->[associateTemplateToZone,getTemplate],handleTemplateSync->[createTemplateAsync,getTemplate],prepareTemplateOnPrimary->[cop... | Copy a template from source template to destination template store. create a new template in the cross zone. | @shwstppr use instanceof to check; avoid exceptions |
@@ -27,6 +27,8 @@ import (
// HandleRegionHeartbeat processes RegionInfo reports from client.
func (c *RaftCluster) HandleRegionHeartbeat(region *core.RegionInfo) error {
+ c.RLock()
+ defer c.RUnlock()
if err := c.cachedCluster.handleRegionHeartbeat(region); err != nil {
return err
}
| [handleReportSplit->[checkSplitRegion],handleBatchReportSplit->[checkSplitRegions],handleAskBatchSplit->[validRequestRegion]] | HandleRegionHeartbeat handles a heartbeat from a region. | this lock is in the hot path, can we bench it or remove it? |
@@ -87,6 +87,8 @@ define([
this._clusterLabelCollection = undefined;
this._clusterPointCollection = undefined;
+ this._collectionIndicesByEntity = Object.create(null);
+
this._unusedLabelIndices = [];
this._unusedBillboardIndices = [];
this._unusedPointIndices = [];... | [No CFG could be retrieved] | Creates an instance of the EntityCluster class. Get the x value of the . | `Object.create` is actually a performance bottleneck so as a general rule we don't use it in our code. Just use `{}` instead. |
@@ -503,9 +503,15 @@ func New(host p2p.Host, consensusObj *consensus.Consensus, chainDBFactory shardc
node.recentTxsStats = make(types.RecentTxsStats)
node.TxPool = core.NewTxPool(core.DefaultTxPoolConfig, node.Blockchain().Config(), blockchain)
node.CxPool = core.NewCxPool(core.CxPoolSize)
+
+ // SetCommitte... | [AddPendingTransaction->[tryBroadcast,addPendingTransactions],StartServer->[startRxPipeline],countNumTransactionsInBlockchain->[Blockchain],getTransactionsForNewBlock->[Blockchain],AddPendingStakingTransaction->[addPendingStakingTransactions],CalculateInitShardState->[Blockchain],Blockchain,Beaconchain] | Load the data structures for the next block header block. This function is called when the node is the first time. | Is this a TODO? |
@@ -944,6 +944,10 @@ func GetConvMtime(rc types.RemoteConversation) (res gregor1.Time) {
conv := rc.Conv
var summaries []chat1.MessageSummary
for _, typ := range chat1.VisibleChatMessageTypes() {
+ switch typ {
+ case chat1.MessageType_JOIN, chat1.MessageType_LEAVE:
+ continue
+ }
summary, err := conv.Get... | [trace->[showLog],GetLog->[GetLog],GetPerfLog->[GetPerfLog],Trace->[GetLog],showLog->[showVerbose],PerfTrace->[GetPerfLog],Debug->[showLog,GetLog],Less->[Less],Len,Less,Debug,GetLog] | PluckConvIDsRC returns a list of conversation IDs that can be read above ones that PickLatestMessageSummary returns a MessageSummaryContainer that contains the most recent message in the message. | the description says mtime isn't changing. |
@@ -28,7 +28,7 @@ namespace Content.Shared.Pulling.Components
/// <summary>
/// The current entity pulling this component.
- /// Ideally, alter using TryStartPull and TryStopPull.
+ /// SharedPullingStateManagementSystem should be writing this. This means definitely not you.
/... | [SharedPullableComponent->[HandleComponentState->[HandleComponentState],Shutdown->[Shutdown],OnRemove->[OnRemove]]] | A component that can be pulled from a device. Get the entity in which the puller is currently in the list of pullers. | should use a friend attribute when its fully ECS |
@@ -16,4 +16,12 @@ module ApplicationHelper
'tabindex': '0'
)
end
+
+ def decorated_session
+ if @sp_name.present?
+ @_decorated_session ||= ServiceProviderSessionDecorator.new(sp_name: @sp_name)
+ else
+ @_decorated_session ||= SessionDecorator.new
+ end
+ end
end
| [title->[content_for],tooltip->[image_tag,content_tag,asset_url],card_cls->[content_for]] | Generates a tooltip that shows the given text. | Maybe for bonus points we could memoize the result of this so we don't make 2 allocations inside the `.slim` file? But really not a huge deal |
@@ -195,7 +195,7 @@ GCP_REQUIREMENTS = [
'google-cloud-spanner>=1.13.0,<2',
'grpcio-gcp>=0.2.2,<1',
# GCP Packages required by ML functionality
- 'google-cloud-dlp>=0.12.0,<4',
+ 'google-cloud-dlp>=3.3.1,<4',
'google-cloud-language>=1.3.0,<2',
'google-cloud-videointelligence>=1.8.0,<2',
... | [mypy->[run->[get_project_path]],get_version,generate_protos_first] | Package names that are required by Python. Provides a list of all possible versions of a specific object. This is a list of requirements that should be required by the server. | Consider re-running `./gradlew :sdks:python:generatePythonRequirementsAll` for this (potentially in a follow-up if you'd rather get tests green now). CC: @tvalentyn |
@@ -96,6 +96,10 @@ class TranslationOverride < ActiveRecord::Base
end
end
+ def transform_pluralized_key(key)
+ match = key.match(/(.*)\.(zero|two|few|many)$/)
+ match ? match.to_a.second + '.one' : key
+ end
end
# == Schema Information
| [TranslationOverride->[upsert!->[end_with?,find_or_initialize_by,merge!,update,i18n_changed,compile_message_format,find_message_format_locale,new_record?],i18n_changed->[expire_cache,each,reload!,publish],revert!->[i18n_changed,delete_all],check_interpolation_keys->[find,add,join,select,present?,t,start_with?,overrides... | Checks if there is a missing key in the translation_key or if there is a missing. | This should use the `other` key. Usually it doesn't matter, but `other` is the correct key to use. Sorry for nitpicking. |
@@ -144,13 +144,15 @@ function BaseCarouselWithRef(
)}
<Scroller
advanceCount={advanceCount}
+ autoAdvanceCount={autoAdvanceCount}
loop={loop}
mixedLength={mixedLength}
restingIndex={currentSlide}
setRestingIndex={setRestingIndex}
snap={snap}
... | [No CFG could be retrieved] | Create a component that renders an . Displays the menu with a single key. | `onMouseEnter` seems like a very "greedy" interception. I might not actually do anything with the mouse, just hovering somewhere. Do we really want to change interaction model in this case? |
@@ -28,4 +28,11 @@ public class ComputerTest {
dir.deleteRecursive();
}
}
+
+ @Issue("JENKINS-42556")
+ @Test
+ public void testThreadPoolForRemotingActsAsSystemUser() throws InterruptedException, ExecutionException {
+ Future<Authentication> job = Computer.threadPoolForRemoti... | [ComputerTest->[testRelocate->[FilePath,relocateOldLogs,size,mkdirs,createTempFile,touch,deleteRecursive,exists,delete]]] | Test if the log directory is the same as the logs directory and if so relocate the. | looks like the wrong JIRA reference? |
@@ -382,13 +382,11 @@ def expand_boxes(boxes, scale):
@torch.jit.unused
-def expand_masks_tracing_scale(M, padding):
- # type: (int, int) -> float
- return torch.tensor(M + 2 * padding).to(torch.float32) / torch.tensor(M).to(torch.float32)
+def expand_masks_tracing_scale(M: int, padding: int) -> float:
+ ... | [paste_masks_in_image->[paste_mask_in_image,expand_boxes,_onnx_paste_masks_in_image_loop,expand_masks],heatmaps_to_keypoints->[_onnx_heatmaps_to_keypoints_loop],RoIHeads->[check_targets->[has_mask],select_training_samples->[check_targets,add_gt_proposals,assign_targets_to_proposals,subsample],forward->[fastrcnn_loss,ma... | Expand the mask to the tracing scale. | The other way is to use cast() from typing, I'm not sure if it would work. |
@@ -53,6 +53,7 @@ VERIFIED_ONE = PromotedClass(
VERIFIED_TWO = PromotedClass(
id=3,
name=_('Verified - Tier 2'),
+ api_name='verified_tier_2',
warning=False,
pre_review=True,
)
| [PromotedClass->[__bool__->[bool]],_,PromotedClass,namedtuple] | Create a class which can be used to manage a list of objects with a single object. Returns a map of all the groups in the system. | `verified`? (for the same reason as VERIFIED_ONE) |
@@ -282,6 +282,13 @@ func (data *resourceRowData) IsDone() bool {
return true
}
+ if isRootStack(data.step) {
+ // the root stack only becomes 'done' once the program has completed (i.e. the condition
+ // checked just above this). If the program is not finished, then always show the root
+ // stack as not d... | [ColorizedColumns->[IsDone],ColorizedSuffix->[IsDone],RecordPolicyViolationEvent->[recordDiagEventPayload]] | IsDone returns true if the data is done. | For my own understanding, what are the cases where `data.ContainsOutputsStep(data.step.Op)` returns "true" but the stack is not actually done updating? I would have assume that we would not see the outputs until the entire stack has completed updating? |
@@ -208,6 +208,9 @@ class Kokkos(CMakePackage, CudaPackage):
if isdiy:
options.append("-DSpack_WORKAROUND=On")
+ if "+fpic" in spec:
+ options.append("-DCMAKE_CXX_FLAGS=%s" % self.compiler.pic_flag)
+
spack_microarches = []
if "+cuda" in spec:
# ... | [Kokkos->[append_args->[append,upper],cmake_args->[append,append_args,upper],list,depends_on,keys,conflicts,version,variant,values]] | Add cmake options to the command line. Return a list of options to set the missing - node - tag option depending on the specification. | Actually in CMake just use `-DCMAKE_POSITION_INDEPENDENT_CODE=ON`. |
@@ -575,13 +575,12 @@ class ICA(ContainsMixin):
if not hasattr(self, 'mixing_matrix_'):
raise RuntimeError('No fit available. Please first fit ICA')
- picks = pick_types(evoked.info, include=self.ch_names, exclude=[],
- ref_meg=False)
+ picks = [evoked.ch_... | [_find_sources->[get_score_funcs],run_ica->[fit,ICA,_detect_artifacts],get_score_funcs->[_make_xy_sfunc],ICA->[_pick_sources->[_get_fast_dot],_fit->[fit],_sources_as_evoked->[_transform_evoked],_apply_epochs->[_pre_whiten],_transform_raw->[_pre_whiten,_transform],_fit_epochs->[_reset],_transform_epochs->[_pre_whiten,_t... | Transform evoked data into a sequence of sources. | It makes sure to only use the channels used in ICA, right? Any other consequences? |
@@ -195,7 +195,8 @@ class DownloadCommand(RequirementCommand):
None
)
- requirement_set.prepare_files(finder)
+ resolver = self._build_resolver(options, finder)
+ resolver.resolve(requirement_set)
downloaded = ' '.jo... | [DownloadCommand->[__init__->[only_binary,progress_bar,no_deps,no_clean,make_option_group,global_options,src,constraints,super,insert_option_group,add_option,build_dir,pre,no_binary,require_hashes,requirements],run->[populate_requirement_set,abspath,any,CommandError,info,ensure_dir,cleanup_files,normalize_path,_build_p... | Run the n - node command. Populates a requirement set from the command line options. | It appears like the way this is working is to mutate the ``RequirementSet`` that we're passing in. That is OK for this PR since that more closely resembles the existing code (and thus reduces the amount of code churn), but thinking forward I think it would be great if we can get this code refactored so we're passing in... |
@@ -87,9 +87,7 @@ public class UntilSuccessful extends AbstractOutboundRouter implements UntilSucc
this.untilSuccessfulStrategy.setUntilSuccessfulConfiguration(this);
initialiseIfNeeded(untilSuccessfulStrategy, muleContext);
- String flowName = flowConstruct.getName();
- String clusterId = muleContext... | [UntilSuccessful->[initialise->[initialise],start->[start],stop->[stop],route->[route]]] | Initializes the message processor. | Refactor repeated use of this type of thing into static helpers in ComponentLocation. |
@@ -1326,7 +1326,9 @@ public class Functions {
}
}
- public static class ThreadGroupMap extends ThreadSorterBase implements Comparator<ThreadInfo> {
+ public static class ThreadGroupMap extends ThreadSorterBase implements Comparator<ThreadInfo>, Serializable {
+
+ private static final long ... | [Functions->[isCollapsed->[isCollapsed],subList->[subList],getSearchURL->[getUrl],doPrintStackTrace->[doPrintStackTrace],xmlEscape->[xmlEscape],getRelativeNameFrom->[getRelativeNameFrom],emptyList->[emptyList],getServerName->[getServerName],getCrumb->[getCrumb],getCurrentDescriptorByNameUrl->[getCurrentDescriptorByName... | Get the thread group name for the given thread. | For some reason, the standard in this code base is to default the `serialVersionUID` to `1L` instead of some randomly generated number. The reason for it is unknown to me, but I've gotten scolded for this by others in the past :) |
@@ -196,10 +196,13 @@ public class PTransformTranslation {
transformBuilder.setSpec(spec);
}
} else if (KNOWN_PAYLOAD_TRANSLATORS.containsKey(transform.getClass())) {
- transformBuilder.setSpec(
+ FunctionSpec spec =
KNOWN_PAYLOAD_TRANSLATORS
.get(transform.getCl... | [PTransformTranslation->[toProto->[toProto],RawPTransformTranslator->[rehydrate->[getSpec,forSpec],getUrn->[getUrn],translate->[migrate]],RawPTransform->[migrate->[getSpec],getUrn->[getUrn]],rehydrate->[rehydrate],UnknownRawPTransform->[toString->[toString],getUrn->[getUrn,getSpec],getSpecForComponents->[getSpec]],urnF... | Converts a AppliedPTransform to a protobuf. This method is used to build a null spec. | It would be preferable to return an empty spec above than add this check here. (Unless there's code that actually branches on missing differently than empty). |
@@ -93,6 +93,18 @@ func (c *Container) rootFsSize() (int64, error) {
// rwSize Gets the size of the mutable top layer of the container.
func (c *Container) rwSize() (int64, error) {
+ if c.config.Rootfs != "" {
+ var size int64
+ err := filepath.Walk(c.config.Rootfs, func(path string, info os.FileInfo, err error)... | [cleanupNetwork->[save],prepare->[mountStorage],ControlSocketPath->[bundlePath],initAndStart->[save,init,removeConmonFiles],saveSpec->[bundlePath],init->[completeNetworkSetup,save],cleanupStorage->[save],cleanup->[cleanupNetwork,cleanupStorage,cleanupCgroups],completeNetworkSetup->[syncContainer],removeConmonFiles->[bu... | rwSize returns the size of the RW layer of the container. | For one of these (`rootFsSize()` and `rwSize()`) we should probably compute the size of the user-specified rootfs so we can report something meaningful via Inspect. |
@@ -867,7 +867,7 @@ def central_crop(image, central_fraction):
@tf_export('image.pad_to_bounding_box')
@dispatch.add_dispatch_support
def pad_to_bounding_box(image, offset_height, offset_width, target_height,
- target_width):
+ target_width, mode="CONSTANT", name=None, c... | [resize_image_with_pad_v2->[_resize_fn->[resize_images_v2],_resize_image_with_pad_common],encode_png->[encode_png],_resize_images_common->[_ImageDimensions],resize_bicubic->[resize_bicubic],crop_to_bounding_box->[_assert,_ImageDimensions,_CheckAtLeast3DImage,_is_tensor],resize_image_with_crop_or_pad->[max_->[_is_tensor... | Pads the image with zeros to the specified height and width and then pads it to a 3 - D Tensor of shape pad image with padding paddings and squeeze the image if necessary. | With the new behavior, `pad_to_bounding_box` no longer pads `image` with zeros. Could you please update the description? |
@@ -688,9 +688,12 @@ int SSL_CTX_add_session(SSL_CTX *ctx, SSL_SESSION *c)
s = c;
}
- /* Put at the head of the queue unless it is already in the cache */
- if (s == NULL)
- SSL_SESSION_list_add(ctx, c);
+ /* Adjust last used time, and add back into the cache at the appropriate spot */
+... | [No CFG could be retrieved] | Adds a session c to the list of sessions in the cache. This function is called from the thread and is called from the server thread. | A session can be shared across threads so this looks like there could be race conditions? |
@@ -27,12 +27,6 @@ namespace Js
}
void ByteCodeDumper::Dump(FunctionBody* dumpFunction)
{
- if (!CONFIG_FLAG(DumpDbgControllerBytecode) && dumpFunction->GetSourceContextInfo() &&
- dumpFunction->GetSourceContextInfo()->url != nullptr &&
- _wcsicmp(dumpFunction->GetSourceConte... | [No CFG could be retrieved] | Private functions - Dump the non - null object. Returns the number of bytes that can be generated. | I didn't know there was special handling for test file. Good to get rid of that. |
@@ -1494,9 +1494,6 @@ namespace Dynamo.Models
Workspaces.Add(workSpace);
- workSpace.Nodes.ToList();
- workSpace.Connectors.ToList();
-
var functionDefinition = new CustomNodeDefinition(id)
{
WorkspaceModel = workSpace
| [DynamoModel->[Clear->[OnWorkspaceClearing,OnWorkspaceCleared,CleanWorkbench],OnNodeDeleted->[RemoveNodeFromMap],Home->[ViewHomeWorkspace],OnNodeAdded->[AddNodeToMap],ConnectorModel->[OnConnectorAdded],OpenDefinition->[IsCustomNodeWorkspace,OpenCustomNodeAndFocus],DeleteModelInternal->[OnDeletionComplete,OnDeletionStar... | Creates a new custom node workspace. | These two have no side effects, just want another pair of eyes. The other files are all due to compiler warning of something that is never used, so you can skim through those in other files. Thanks! |
@@ -300,7 +300,7 @@ class AttributeAssign(BaseMutation):
class Meta:
description = "Assign attributes to a given product type."
- error_type_class = ProductError
+ error_type_class = ProductAttributeError
error_type_field = "product_errors"
@classmethod
| [AttributeUpdate->[Arguments->[AttributeUpdateInput],perform_mutation->[clean_values,AttributeUpdate,_save_m2m,clean_attribute,clean_remove_values]],AttributeValueUpdate->[Arguments->[AttributeValueCreateInput],clean_instance->[validate_value_is_unique]],AttributeReorderValues->[perform_mutation->[AttributeReorderValue... | Check if the current user has permission to manage products. | If `error_type_class` is changed we probably should also change `error_type_field`. |
@@ -114,6 +114,17 @@ class Resolver(object):
assert self.upgrade_strategy == "only-if-needed"
return req.is_direct
+ def _set_req_to_reinstall(self, req):
+ """
+ Set a requirement to be installed.
+ """
+ # Don't uninstall the conflict if doing a user install ... | [Resolver->[_resolve_one->[add_req],_check_skip_installed->[_is_upgrade_allowed]]] | Checks whether upgrade or reinstall is allowed for the given req. Check if a node - level node - level node - level node - level conflict is satisfied. | Just noticed that the line break here can be removed. :) |
@@ -37,6 +37,9 @@ import (
"github.com/pulumi/pulumi/pkg/util/contract"
"github.com/pulumi/pulumi/pkg/util/retry"
"github.com/pulumi/pulumi/pkg/workspace"
+
+ survey "gopkg.in/AlecAivazis/survey.v1"
+ surveycore "gopkg.in/AlecAivazis/survey.v1/core"
)
const (
| [CloudConsoleURL->[CloudURL],CreateStack->[CreateStack],runEngineAction->[Preview,Close,Update,Destroy],tryNextUpdate->[CloudURL],GetStack->[GetStack],ListTemplates->[ListTemplates],EncryptValue->[EncryptValue],DownloadTemplate->[DownloadTemplate],ListStacks->[ListStacks],Read->[Read],CloudConsoleStackPath->[CloudConso... | Package names of the modules that are used by the Pulumi API. ValueOrDefaultURL returns the default cloud URL if no cloud is specified. | Group in with other external deps. |
@@ -410,7 +410,8 @@ function describeEnv(factory) {
this.timeout(TEST_TIMEOUT);
beforeEach(async function() {
this.timeout(SETUP_TIMEOUT);
- await fixture.setup(env, browserName);
+ const retries = 1;
+ await fixture.setup(env, browserName, retries);
// don't insta... | [ItConfig->[run->[apply]],EndToEndFixture->[setup->[getController,setWindowRect,navigateToEnvironment,ampDriver,href,getConfig,join,controller,toggleExperiments,length,includes,searchParams],teardown->[dispose,switchToParent]],environments,createPuppeteer,create,headless,size,describeFunc,createBrowserDescribe,getChrom... | Creates a describe function that can be used to describe a variant. The main function for the expectation. | Move this to the list of constants at the top of the file. |
@@ -52,6 +52,10 @@ class DUFunc(_internal._DUFunc):
kws.pop('identity', None))
super(DUFunc, self).__init__(dispatcher, **kws)
self._install_type()
+ self._kernel = type('DUFuncKernel_' + self.ufunc.__name__,
+ (DUFuncKernel,),
+ ... | [DUFunc->[_type_me->[find_ewise_function,_compile_for_argtys]]] | Initialize the DUFunc class. | I know it's just a paste from the previous PR, but for the record, why don't you declare the class in the usual way? It would make the code more readable... |
@@ -0,0 +1,13 @@
+// @flow
+
+import styled from '../styles/styled';
+import type {StyledIconProps} from './types';
+
+// TODO: Disable this rule for styled component files?
+// eslint-disable-next-line import/prefer-default-export
+export const StyledIcon = styled('svg', ({theme}: StyledIconProps) => ({
+ display: 'i... | [No CFG could be retrieved] | No Summary Found. | I might suggest a local prop override for height/width that takes precedence over the theme. e.g I want a big magnifying glass in the top right but a smaller one in my input box. |
@@ -204,6 +204,11 @@ func LegacyStorage(storage map[schema.GroupVersion]map[string]rest.Storage) map[
store := *restStorage.Store
restStorage.DeleteStrategy = orphanByDefault(store.DeleteStrategy)
legacyStorage[resource] = &deploymentconfigetcd.REST{Store: &store}
+ case "routes":
+ restStorage... | [Has,NewString] | LegacyStorage returns a legacy storage for locked legacy types. | @liggitt I haven't used the decorator before. Does it play nicely the various storage caches involved? |
@@ -212,6 +212,7 @@ var ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) {
var NG_REMOVED = '$$NG_REMOVED';
var ngRepeatMinErr = minErr('ngRepeat');
return {
+ restrict: 'A',
multiElement: true,
transclude: 'element',
priority: 1000,
| [No CFG could be retrieved] | Provides a nice way to set the unique hash key of items in the array. Outputs a nice list of all the nagios that have a friends. | Is there any reason why this couldn't be an element too, if we wanted? |
@@ -515,6 +515,8 @@ namespace MonoGame.Tools.Pipeline
_buildProcess.StartInfo.StandardOutputEncoding = encoding;
_buildProcess.OutputDataReceived += (sender, args) => View.OutputAppend(args.Data);
+ View.OutputAppend(string.Format("Working Directory: {0} ", _buildProce... | [PipelineController->[LoadTemplates->[GetFiles],AskSaveProject->[SaveProject],GetFiles->[GetFiles],DoBuild->[FindMGCB],Undo->[Undo],IncludeFolder->[IncludeFolder,GetCurrentPath],NewItem->[GetCurrentPath],Exit->[AskSaveProject],NewFolder->[GetCurrentPath],ImportProject->[ImportProject],UpdateContextMenu->[Exclude,CopyAs... | Do the build. | Is there a concern the working directory and launch EXE could be bad? |
@@ -86,6 +86,13 @@ public class DruidMasterRuntimeParams
this.mergeSegmentsLimit = mergeSegmentsLimit;
this.maxSegmentsToMove = maxSegmentsToMove;
this.balancerReferenceTimestamp = balancerReferenceTimestamp;
+ this.emitStats =emitBalancingCostParams;
+ this.strategyFactory=strategyFactory;
+ }
+
... | [DruidMasterRuntimeParams->[Builder->[build->[DruidMasterRuntimeParams]],hasDeletionWaitTimeElapsed->[getMillisToWaitBeforeDeleting,getStartTime]]] | Returns the start time of the sequence. | You got some weird space usage. |
@@ -563,6 +563,10 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
// Clean up volumes based on the vm's instance id
volumeMgr.cleanupVolumes(vm.getId());
+ if (hostId != null && targets != null && targets.size() > 0) {
+ removeDynamicTargets(host... | [VirtualMachineManagerImpl->[handleVmWorkJob->[handleVmWorkJob],plugNic->[findById],handlePowerOffReportWithNoPendingJobsOnVM->[sendStop,stateTransitTo,getVmGuru],migrateWithStorage->[expunge],orchestrateMigrateAway->[migrate,orchestrateMigrateAway,findById,advanceStop],CleanupTask->[runInContext->[cleanup]],orchestrat... | Advances the expungeExpungeThis method is called when a VM is exp ExpungeExpungeThis method sends the volume expungeCommand to remove a. | You can use `hostId != null && CollectionUtils.isNotEmpty(targets)`. |
@@ -49,7 +49,9 @@ public class MuleSoapHeaders {
* @param event
*/
public MuleSoapHeaders(MuleEvent event) {
- event.getCorrelation().getId().ifPresent(v -> setCorrelationId(v));
+ //if(!((DefaultMuleEvent)event).getLegacyCorrelationId().isEmpty()) {
+ // setCorrelationId(((DefaultMuleEvent)event).... | [MuleSoapHeaders->[readElements->[hasNext,getLocalName,equals,getStringValue,next],getStringValue->[hasChildNodes,getNodeValue],addHeaders->[addTextNode,addHeaderElement,addChildElement,addHeader,setActor,createName,getHeader],createHeaders->[DOMElement,appendChild,setNodeValue,QName,Namespace],setCorrelationSequence,h... | This class extracts and writes Mule header properties from a Mule event. Reads the SOAP headers. | remove this code |
@@ -74,6 +74,8 @@ public class TestContributionPersistence extends NXRuntimeTestCase {
assertFalse(mgr.isInstalled(c1));
mgr.installContribution(c1);
+ applyInlineDeployments();
+ postSetUp();
assertTrue(mgr.isPersisted(c1));
assertTrue(mgr.isInstalled(c1));
| [TestContributionPersistence->[test1->[assertTrue,size,getLocalService,isDisabled,installContribution,DummyContribution,ContributionBuilder,isEmpty,removeContribution,assertFalse,setDescription,addContribution,isInstalled,sendEvent,isPersisted,assertEquals,getCounter,getContent,getDescription,addXmlExtension,addExtensi... | Test method for creating a new object in the manager. Returns an empty sequence if there are no non - empty sequence. | Why `postSetUp` isn't called from `applyInlineDeployments` |
@@ -177,6 +177,11 @@ export class PreactBaseElement extends AMP.BaseElement {
'when configured with "children" or "passthrough" properties.'
);
this.container_ = this.element.attachShadow({mode: 'open'});
+ if (this.element.getAttribute('layout') === Layout.RESPONSIVE) {
+ ... | [No CFG could be retrieved] | Creates and renders an AMP element. Provides a way to provide the Component definition. | IMHO we should just always create the slot element. There's no cost if there's nothing to distribute. But I have a suggestion for a slight variation on this approach. We can support all such "service" internal elements with a single slot. It would work like this: 1. Here, we insert a single `<slot name="i-amphtml-svc">... |
@@ -437,10 +437,6 @@ public class ElasticsearchIO {
return requestConfigBuilder;
}
});
- if (getSocketAndRetryTimeout() != null) {
- restClientBuilder.setMaxRetryTimeoutMillis(getSocketAndRetryTimeout());
- }
-
return restClientBuilder.build();
}
}
| [ElasticsearchIO->[ConnectionConfiguration->[withSocketAndRetryTimeout->[build],create->[build],withKeystorePath->[build],populateDisplayData->[getUsername,getType,getConnectTimeout,getKeystorePath,getIndex,getSocketAndRetryTimeout],withUsername->[build],withPassword->[build],createClient->[customizeRequestConfig->[set... | Creates a new REST client with the specified configuration. Retry timeout. | You remove it for all ES versions. So, this change is not backward compatible. Maybe a simple if ? |
@@ -150,6 +150,9 @@ public class StreamedQueryResource implements KsqlConfigurable {
ksqlEngine.getServiceId(),
ksqlConfig.getStringAsMap(KsqlConfig.KSQL_CUSTOM_METRICS_TAGS)))
: empty();
+
+ this.denyListPropertyValidator = new DenyListPropertyValidator(
+ config.getList(KsqlConfig... | [StreamedQueryResource->[writeValueAsString->[writeValueAsString]]] | Configures the stream query. | Probably better injecting this, than creating it. |
@@ -350,6 +350,15 @@ class PTransform(WithTypeHints, HasDisplayData):
# type: () -> str
return self.__class__.__name__
+ def default_type_hints(self):
+ fn_type_hints = IOTypeHints.from_callable(self.expand)
+ if fn_type_hints is not None:
+ fn_type_hints = fn_type_hints.strip_pcoll_input()
+ ... | [_FinalizeMaterialization->[visit->[visit_nested]],_ZipPValues->[visit->[visit],visit_dict->[visit],visit_sequence->[visit]],_AddMaterializationTransforms->[_materialize_transform->[_allocate_materialized_result,_MaterializeValuesDoFn],visit->[visit_nested,_MaterializedDoOutputsTuple,_materialize_transform,visit]],PTra... | Returns the default label for a specific a object. | You can chain the 2 function calls. |
@@ -337,7 +337,7 @@ class InstallRequirement(object):
no_marker = Requirement(str(self.req))
no_marker.marker = None
self.satisfied_by = pkg_resources.get_distribution(str(no_marker))
- if self.editable and self.satisfied_by:
+ if (self.editable or self.link)... | [InstallRequirement->[from_path->[from_path],install->[install_editable,prepend_root,move_wheel_files],uninstall->[check_if_exists],move_wheel_files->[move_wheel_files],_correct_build_location->[build_location],run_egg_info->[_correct_build_location],load_pyproject_toml->[load_pyproject_toml],archive->[_clean_zip_name]... | Check if a node - level constraint exists. | I don't think `self.link` is exclusive to the PEP 508 link format of requirement. Have you ensured that this doesn't force reinstall in cases you aren't intending to change? |
@@ -45,7 +45,7 @@ public class HoodieFileWriterFactory {
TaskContextSupplier taskContextSupplier) throws IOException {
final String extension = FSUtils.getFileExtension(path.getName());
if (PARQUET.getFileExtension().equals(extension)) {
- return newParquetFileWriter(instantTime, path, config, sch... | [HoodieFileWriterFactory->[createBloomFilter->[createBloomFilter]]] | Returns a file writer for the given Hoodie record. | why would we need to pass the same value twice? |
@@ -77,6 +77,7 @@ public class TestUpdateDocumentRestlet extends AbstractRestletTest {
// check doc has been updated
txFeature.nextTransaction();
+ doc = session.getDocument(doc.getRef());
assertEquals("mytitle", doc.getTitle());
assertEquals("mydescr", doc.getPropertyValue(... | [TestUpdateDocumentRestlet->[dotTestUpdate->[getPropertyValue,executeRequest,nextTransaction,getTitle,getId,assertEquals],testUpdate->[dotTestUpdate],testUpdateEndpoint2->[dotTestUpdate],before->[getRepositoryName,nextTransaction,createDocument,save,createDocumentModel]]] | Test update of a document. | Curious: why isn't this needed in master? |
@@ -146,12 +146,16 @@ def get_prefixed_url(current_app, endpoint):
def setup_db_user(context, user):
+ """
+ Setup the user for the DB authentication.
+ :param context: test context
+ :param dict user: user
+ """
user = user or test_user
with context.app.test_request_context(context.app.co... | [get_test_settings->[get_mongo_uri],setup->[get_test_settings,drop_elastic,drop_mongo],setup_db_user->[get_prefixed_url,add_to_context],setup_ad_user->[get_prefixed_url,add_to_context],TestCase->[setUp->[setup]]] | Setup a user in the database. | In general I like this change, very Pythonic. However, it might not exactly equivalent to the old code - could it happen that the `user_type` key exists but is set to `None`? If yes, then the user would not be set to `'administrator'` anymore as it was in the old version. |
@@ -17,6 +17,7 @@
limitations under the License.
-%>
import { Route } from '@angular/router';
+
import { LoginComponent } from './login.component';
export const LOGIN_ROUTE: Route = {
| [No CFG could be retrieved] | Creates an instance of the class. | Intentional blank line. |
@@ -22,16 +22,15 @@ import zlib
def main():
- with open('find_cuda.py', 'rb') as f:
+ with open('find_cuda_config.py', 'rb') as f:
data = f.read()
compressed = zlib.compress(data)
b64encoded = base64.b64encode(compressed)
- with open('find_cuda.py.gz.base64', 'wb') as f:
+ with open('find_cuda_c... | [main->[write,read,b64encode,open,compress],main] | This is the entry point for the find_cuda. py script. | This fixes a bug I stumbled on which is only loosely related to this PR. |
@@ -37,6 +37,8 @@ func main() {
func do(config interface{}) error {
// must run InstallJaegerTracer before InitWithKube/pach client initialization
tracing.InstallJaegerTracerFromEnv()
+ defer tracing.CloseAndReportTraces()
+
env := serviceenv.InitServiceEnv(serviceenv.NewConfiguration(config))
// Enable clou... | [NewConfiguration,RegisterDebugServer,NewAPIServer,KeepAlive,Grant,Setenv,WithLease,PipelineRcName,RegisterAPIServer,Put,NewWorker,Ctx,FormatterFunc,Wait,Main,Wrapf,RegisterWorkerServer,Join,SetFormatter,GetPachClient,Config,GetWorkerPipelineInfo,InitServiceEnv,ListenTCP,NewServer,WithTimeout,StartCloudProfiler,GetEtcd... | Magic functions for the pachyderm - worker package. worker creates a worker and a worker API server. | I thought `do` didn't exit-does it? Or is this important to error recovery? |
@@ -56,11 +56,11 @@ namespace ProtoCore.Utils
return returnSV;
}
- public static StackValue ConcatString(StackValue op1, StackValue op2, ProtoCore.Runtime.RuntimeMemory rmem)
+ public static StackValue ConcatString(StackValue op1, StackValue op2, ProtoCore.Core core)
{
- ... | [StringUtils->[GetStringValue->[GetStringValue],StackValue->[GetStringValue]]] | Convert to string. | Can we have another ArrayUtils.GetValuesAsArray() method, everywhere we are chaining ToArray() the GetValues() method. BTW, you can skip the call of ToArray in this case, v1 & v2 can be IEnumerable. |
@@ -18,9 +18,8 @@ from mypy.typeanal import (
from mypy.types import (
Type, AnyType, CallableType, Overloaded, NoneTyp, TypeVarDef,
TupleType, TypedDictType, Instance, TypeVarType, ErasedType, UnionType,
- PartialType, DeletedType, UnboundType, UninhabitedType, TypeType, TypeOfAny,
- true_only, false_... | [ExpressionChecker->[visit_star_expr->[accept],analyze_ordinary_member_access->[analyze_ref_expr],check_overload_call->[check_call],visit_await_expr->[accept],erased_signature_similarity->[check_argument_count,check_argument_types],check_op->[check_op_local_by_name,check_op_reversible,combine_function_signatures],defn_... | Expression type checker. TYPE CHECKING - DEPRECATED. | Can you add a trailing comma? In lists like this that's how we like to format them. |
@@ -1226,6 +1226,15 @@ static int _upgrade_data_schema_step(dt_database_t *db, int version)
new_version = 2;
}
+ else if(version == 2)
+ {
+ TRY_EXEC("ALTER TABLE data.tags RENAME COLUMN description TO synonyms;",
+ "[init] can't change tags column name from description to synonyms\n");
+
+ ... | [No CFG could be retrieved] | upgrade_data_schema_step - migration of data schema to new version This function creates the table in the database for the given entry in the order specified by the. | I'm surprised, is that really working now? Last time I checked the RENAME COLUMN was not implemented in SQLite. Is that fixed now? In which SQLite version? |
@@ -159,3 +159,13 @@ def get_soapbox_messages(url):
@register.inclusion_tag('devmo/elements/soapbox_messages.html')
def soapbox_messages(soapbox_messages):
return {'soapbox_messages': soapbox_messages}
+
+
+@register.function
+def add_utm(url_, campaign, source='notification', medium='email'):
+ """Add the ut... | [inlinei18n->[mark_safe,get,read,set,get_filename,join,open],get_soapbox_messages->[match,split_path],isotime->[_append_tz,hasattr],devmo_url->[get,reverse,hasattr,set],thisyear->[Markup,today],get_localized_devmo_path->[get_locale_path_match,groupdict,get],_append_tz->[timezone,localize],urlencode->[encode,quote_plus]... | Return a dict with the soapbox_messages. | This shouldn't be converted to a bytestring as a `URLObject` is actually a Unicode subclass, Jinja2 should automatically print the content. |
@@ -82,6 +82,13 @@ public class CardinalityBufferAggregator implements BufferAggregator
throw new UnsupportedOperationException();
}
+
+ @Override
+ public long getLong(ByteBuffer buf, int position)
+ {
+ throw new UnsupportedOperationException("CardinalityBufferAggregator does not support getLong()");
... | [CardinalityBufferAggregator->[init->[position,put,duplicate],getFloat->[UnsupportedOperationException],get->[position,makeCollector,get,getLatestNumBytesForDenseStorage,allocate,duplicate,array],aggregate->[limit,makeCollector,hashRow,hashValues,getLatestNumBytesForDenseStorage],makeEmptyVersionedByteArray]] | Returns a float value if it is a . | let's add a message to getFloat as well |
@@ -1694,6 +1694,17 @@ class ExpressionChecker(ExpressionVisitor[Type]):
Translate it into a call to dict(), with provisions for **expr.
"""
+ # if we find a DictExpr inside a context that expected TypedDict,
+ # we try to convert the dictionary into TypedDict
+ # we warn if the... | [ExpressionChecker->[visit_star_expr->[accept],analyze_ordinary_member_access->[analyze_ref_expr],visit_await_expr->[accept],erased_signature_similarity->[check_argument_count,check_argument_types],check_op->[_check_op_for_errors,check_op_local],replace_tvars_any->[replace_tvars_any],check_lst_expr->[check_call],accept... | Translate it into a call to dict and return a type of . Analyzes the object s properties and returns the object. | This is not what I wanted. I wanted an explanation that we need to silence one of two errors, and why the code below actually silences the second error. Sorry for misunderstanding. |
@@ -0,0 +1,18 @@
+const gulp = require('gulp');
+const gulpAmpHtmlValidator = require('gulp-amphtml-validator');
+
+gulp.task('amphtml:validate', () => {
+ return gulp.src('../../testdata/feature_tests/*.html')
+ // Valide the input and attach the validation result to the "amp" property
+ // of the file object. ... | [No CFG could be retrieved] | No Summary Found. | Ah, I was trying to merge this but I can't because the presubmit is still acting up. Please put the license stuff into this file to make it happy. [06:36:49] Using gulpfile ~/build/ampproject/amphtml/gulpfile.js [06:36:49] Starting 'presubmit'... [06:36:56] Did not find required: "Copyright 20(15|16) The AMP HTML Autho... |
@@ -53,8 +53,10 @@ namespace Pulumi
}
var (serialized, argDependencies) = await SerializeFilteredPropertiesAsync(
- $"call:{token}",
- argsDict, _ => true, keepResources: true).ConfigureAwait(false);
+ $"call:{token}",
+ argsDict, _ => true... | [Deployment->[CallRawAsync->[_provider,ImmutableHashSet,SetItem,Reason,Return,Count,Empty,Failures,Property,Urns,_version,GetProvider,ReturnDependencies,ConfigureAwait,AddRange,Add,ToImmutable,Debug],CallAsync->[Value,Warn,Empty,Converter,IsKnown,ConfigureAwait,IsSecret]]] | Asynchronously call a raw method with a specific token. Handle failures. | So Call assumes the monitor supports output values? If memory serves me correctly this might be reasonable but good to double-check. |
@@ -207,7 +207,7 @@ public class UriVariableTests {
}
@Test
- public void testInt2720XmppUriVariables() {
+ public void testInt2720XmppUriVariables() throws NotConnectedException {
Mockito.doThrow(new WebServiceIOException("intentional")).when(this.xmppConnection).sendPacket(Mockito.any(Packet.class));
| [UriVariableTests->[Int2720EmailTestClientInterceptor->[handleRequest->[handleRequest]]]] | This test method is used to test the intentional case of an XMPP connection. | Well, I see there is an issue with new Smack and old Spring WS. Is Smack 4.0 compatible with a Smack 3.0? I mean can we have in the classpath both versions? I'm not sure how quickly the Spring WS (2.3.0) with new Smack will be released so we should be carefull with the new Smack for SI and old one for WS, because we ca... |
@@ -54,6 +54,12 @@ namespace System
private const string UtcId = "UTC";
private const string LocalId = "Local";
+#if TARGET_WINDOWS
+ // This field is only used in TimeZoneInfo.Win32.cs, but needs to be defined here to ensure it is initialized
+ // before the call to CreateUtcTimeZone ... | [TimeZoneInfo->[TryConvertIanaIdToWindowsId->[TryConvertIanaIdToWindowsId],DateTime->[ClearCachedData],GetHashCode->[GetHashCode],TimeSpan->[GetIsDaylightSavingsFromUtc,GetAdjustmentRuleForTime,GetIsDaylightSavings],TryConvertWindowsIdToIanaId->[TryConvertWindowsIdToIanaId],IsValidAdjustmentRuleOffset->[UtcOffsetOutOfR... | A class that holds information about a specific time zone. Returns a TimeZoneInfo object representing the second time zone of the system. | @jkotas is there a better way to force this static initialization without having this declared in this source file? I want to avoid using #if as possible. |
@@ -179,9 +179,6 @@ func (e *BackupKeygen) push(ctx *Context) error {
Me: e.arg.Me,
Device: dev,
}
- if err := sigEnc.Run(ctx.LoginContext); err != nil {
- return err
- }
- return nil
+ return libkb.DelegatorAggregator(ctx.LoginContext, []libkb.Delegator{sigDel, sigEnc})
}
| [makeSigKey->[GenerateKey,NewBuffer],makeEncKey->[GenerateKey,NewBuffer],Run->[NewPassphraseStream,makeEncKey,EdDSASeed,DHSeed,makeSigKey,push,Key],push->[GetServerHalf,NewLKSec,LoginState,Account,GetUID,GenerateServerHalf,PostDeviceLKS,G,PassphraseStream,GetKID,PassphraseStreamCache,EncryptClientHalfRecovery,Generatio... | push pushes the backup keys to the server. Me - Me - Dev - Dev. | Instead of making 2 calls, we make 1 |
@@ -698,7 +698,7 @@ class Site extends BaseAdmin
'$worker_frontend' => ['worker_frontend', DI::l10n()->t('Enable frontend worker'), DI::config()->get('system', 'frontend_worker'), DI::l10n()->t('When enabled the Worker process is triggered when backend access is performed (e.g. messages being delivered). On ... | [Site->[content->[getAvailableLanguages,getOptions,getUrlPath,get,listBackends,set,t,delete],post->[update_table->[redirect],getOptions,getUrlPath,saveOptions,redirect,get,setBackend,set,saveByURL,t,delete]]] | Content method for the theme list. get all user names to make a personal install of X The default configuration for the system. show legacy option only if it is the current backend The default configuration for the application. | Should the default value for the `DI::config()->get` call be the server out of order or none at all? |
@@ -490,7 +490,15 @@ func New(host p2p.Host, consensusObj *consensus.Consensus, chainDBFactory shardc
node.ConfirmedBlockChannel = make(chan *types.Block)
node.BeaconBlockChannel = make(chan *types.Block)
node.recentTxsStats = make(types.RecentTxsStats)
- node.TxPool = core.NewTxPool(core.DefaultTxPoolConfig,... | [AddPendingTransaction->[tryBroadcast,addPendingTransactions],StartServer->[startRxPipeline],countNumTransactionsInBlockchain->[Blockchain],AddPendingReceipts->[Blockchain],AddPendingStakingTransaction->[addPendingStakingTransactions],CalculateInitShardState->[Blockchain],Blockchain,Beaconchain] | Initialize the object for the next block header This method is called by the beacon - shard tx later to add a smart contract to the. | The lock is fine if it's not frequently called. I don't think so. |
@@ -1836,10 +1836,18 @@ DEFINE_ISXLOCALEAVAILABLE(PR, uloc)
bool ignorePunctuation = AssertBooleanProperty(state, PropertyIds::ignorePunctuation);
bool numeric = AssertBooleanProperty(state, PropertyIds::numeric);
CollatorCaseFirst caseFirst = AssertEnumProperty<CollatorCaseFirst>... | [No CFG could be retrieved] | region Private functions Missing key - collation collator. | Hmm, yeah, it is probably better to only set the "search" type, that way the defaults for the locale would be used for the "standard" type. |
@@ -73,6 +73,11 @@ class CMakePackage(PackageBase):
build_time_test_callbacks = ['check']
+ #: List of names of packages which ``dependent_cmake_args()`` are ignored.
+ #: Everything is ignored if the value is ``all``. Nothing is ignored
+ #: if the value is ``None``.
+ ignore_cmake_args_from = Non... | [CMakePackage->[install->[working_dir,getmodule],build->[working_dir,getmodule],cmake->[working_dir,abspath,getmodule,cmake_args],_std_args->[dependencies,mac_ver,append,filter_system_paths,format,join,InstallError,get_rpaths],build_directory->[join_path],default_flag_handler->[flag_val,set,join],check->[_if_ninja_targ... | 1. CMake package build method. The relative path to the directory containing CMakeLists. txt. | i would prefer to keep it to `all` by default and enable it on per-package basis for those packages which can not find properly their dependencies. Better yet is to switch to a positive logic, i.e. `use_extra_cmake_args_from_dependencies=` with `None` being default. Otherwise, all `cmake` package which use `boost` get ... |
@@ -50,7 +50,6 @@ def datatype(field_decls, superclass_name=None, **kwargs):
if not superclass_name:
superclass_name = '_anonymous_namedtuple_subclass'
- superclass_name = str(superclass_name)
namedtuple_cls = namedtuple(superclass_name, field_names, **kwargs)
| [Collection->[of->[of,datatype]],TypeConstraint->[validate_satisfied_by->[satisfied_by,TypeConstraintError]],datatype->[DataType->[__getnewargs__->[_super_iter],__new__->[make_type_error],_asdict->[_super_iter],_replace->[_super_iter]]]] | A class decorator for defining a type object which accounts for the type of the object in equality A base class method for creating a new object of cls with a . Return a dictionary with all the keys and values of the object as keys and values as values Return a new type with the given name inheriting from the DataType ... | Flagging this line, because it will always be passed unicode no matter the Python version. This seems to be okay per the tests, though. |
@@ -178,6 +178,7 @@ function Combobox<OptionT>(props: PropsT<OptionT>) {
setSelectionIndex(-1);
setTempValue(value);
if (onBlur) onBlur(event);
+ if (onFocus) onFocus(event);
}
function handleInputChange(event) {
| [No CFG could be retrieved] | Handles keydown on input and onBlur events. Get the properties of a specific element in the system. | I think this should be in the `handleFocus` function above. |
@@ -440,7 +440,7 @@ class Jetpack_Twitter_Timeline_Widget extends WP_Widget {
type="checkbox"<?php checked( in_array( 'noscrollbar', $instance['chrome'] ) ); ?>
id="<?php echo $this->get_field_id( 'chrome-noscrollbar' ); ?>"
name="<?php echo $this->get_field_name( 'chrome' ); ?>[]"
- value="noscrollba... | [Jetpack_Twitter_Timeline_Widget->[form->[get_docs_link]]] | Renders the hidden field. Renders a hidden hidden block that can be used to show a hidden block. Private method for rendering the console - formatted warning. Private method to render the console console console - > print all the console - > print all Renders the link - color input. | Do you think we could simplify this by sanitizing `$instance['tweet-limit']` earlier? |
@@ -22,6 +22,12 @@ class AttributeInputType:
# list of the input types that can be used in variant selection
ALLOWED_IN_VARIANT_SELECTION = [DROPDOWN]
+ TYPES_WITHOUT_CHOICES = [
+ REFERENCE,
+ NUMERIC,
+ RICH_TEXT,
+ ]
+
# list of input types that are allowed for given attribu... | [No CFG could be retrieved] | The default configuration for the attribute get all possible choices for a given page. | Shouldn't this work the other way around, listing the few types where we want to return choices? |
@@ -698,7 +698,7 @@ function conversation(App $a, $items, $mode, $update, $preview = false) {
$location = ((strlen($locate['html'])) ? $locate['html'] : render_location_dummy($locate));
localize_item($item);
- if($mode === 'network-new')
+ if ($mode === 'network-new')
$dropping = true;
else... | [localize_item->[attributes],get_responses->[get_id],conversation->[add_thread,get_template_data]] | The conversation function JS AJAX for the user s n - index page. The main page of the network. This function renders the conversation template This function is used to generate a link to the activity. This function is used to render a single item in a profile. | Standards: Please add braces to this condition. |
@@ -355,7 +355,7 @@ namespace System.Runtime.Serialization
reader.MoveToElement();
if (name != null) // root name set explicitly
{
- return reader.IsStartElement(name, ns!); // https://github.com/dotnet/runtime/issues/41395
+ return reader.IsStartElem... | [XmlObjectSerializer->[WriteStartObject->[WriteStartObject],InternalWriteObject->[WriteStartObject,InternalWriteObject,WriteObjectContent,WriteEndObject],WriteStartObjectHandleExceptions->[InternalWriteStartObject],IsStartElement->[IsStartElement],WriteObject->[WriteObject],IsStartObjectHandleExceptions->[InternalIsSta... | Checks if the given node is a root element of the given type. | Is it worth modifying the null check on name to also check that it isn't equivalent to l to XmlDictionaryString.Empty? If you do that, it might be worth checking `name.Value.Length != 0` as someone can make their own XmlDictionaryString with the empty string and then the equality comparison won't work with XmlDictionar... |
@@ -126,9 +126,15 @@ LargeHeapBucket::PageHeapAlloc(Recycler * recycler, size_t size, ObjectInfoBits
return nullptr;
}
- size_t actualPageCount = pageCount + 1; // for page heap
+ if(size<sizeof(void*))
+ {
+ attributes = (ObjectInfoBits)(attributes | LeafBit);
+ }
+
- char * bas... | [No CFG could be retrieved] | Allocates a large heap block. region PagePermissionManager Implementation. | Nit: spacing- also, what scenario is this optimizing for? |
@@ -429,7 +429,7 @@ namespace System.Windows.Forms
internal virtual UiaCore.IRawElementProviderFragmentRoot? FragmentRoot => null;
- internal virtual UiaCore.IRawElementProviderFragment ElementProviderFromPoint(double x, double y) => this;
+ internal virtual UiaCore.IRawElementProviderFragmen... | [AccessibleObject->[GetItem->[GetItem],SetCurrentView->[SetMultiViewProviderCurrentView],ScrollIntoView->[ScrollIntoView],GetPropertyValue->[GetPropertyValue],GetSelected->[GetChild,GetChildCount],accDoDefaultAction->[accDoDefaultAction,DoDefaultAction],get_accRole->[GetAccessibleChild,get_accRole],get_accState->[GetAc... | This abstract class is used to implement a fragment that is not directly accessible by the user. | This is not necessary, a descendant can go from nullable to non-nullable (the opposite is invalid). Ditto below |
@@ -134,7 +134,8 @@ class Core_Command extends WP_CLI_Command {
$locale = \WP_CLI\Utils\get_flag_value( $assoc_args, 'locale', 'en_US' );
if ( isset( $assoc_args['version'] ) ) {
- $version = $assoc_args['version'];
+ $version = strtolower( $assoc_args['version'] );
+ $version = ( 'nightly' === $version ?... | [Core_Command->[install->[_install],_multisite_convert->[get_error_message,tables,get_error_code],download->[cleanup_extra_files,getMessage,get_download_url,get_download_offer,has,import],_copy_overwrite_files->[isDir,getSubPathName],_extract->[extractTo,getFileName],update->[upgrade,cleanup_extra_files,get_download_ur... | Downloads a WordPress file. Downloads a WordPress release. Downloads the WordPress archive and extracts it into the specified directory. | When `version=trunk`, we're passing `tar.gz` as a file type and getting `zip` in return. Will that cause bugs later on? |
@@ -1936,13 +1936,9 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
public AutoCompletionCandidates doAutoCompleteUpstreamProjects(@QueryParameter String value) {
AutoCompletionCandidates candidates = new AutoCompletionCandidates();
- List<Job> jobs... | [AbstractProject->[setAssignedLabel->[save],onLoad->[onLoad,createBuildMixIn],getFirstBuild->[getFirstBuild],removeFromList->[save,updateTransientActions],workspaceOffline->[getWorkspace,getAssignedLabel,isAllSuitableNodesOffline],getRelevantLabels->[getAssignedLabel],doWs->[getSomeWorkspace],removeRun->[removeRun],get... | This method is used to automatically complete the upstream projects. | FTR the hasPermission is inside `getItems(Predicate)` |
@@ -137,11 +137,8 @@ func StreamChecker(log *logger.Logger, ast *transpiler.AST) error {
if found {
dsKey, ok := dsNameNode.(*transpiler.Key)
if ok {
- newDataset := dsKey.Value().(transpiler.Node).String()
- if !isValid(newDataset) {
- return ErrInvalidDataset
- ... | [Value,ContainsAny,Sprintf,Contains,Lookup,New,Find,ToLower,String,HasPrefix] | Invite a node to check if a node is not found in the input list. matchesIndexContraints returns true if the given namespace is a valid index name and. | Nit: Indentation seems to be off |
@@ -63,7 +63,8 @@ class Notification < ActiveRecord::Base
watching_first_post: 17,
topic_reminder: 18,
liked_consolidated: 19,
- post_approved: 20
+ post_approved: 20,
+ commit... | [Notification->[types->[new],post_id->[first],ensure_consistency!->[types,exec],recent_report->[user_option,to_i,limit,present?,to_a,query_single,where,take,like_notification_frequency,each,like_notification_frequency_type,length,includes],data_hash->[parse,with_indifferent_access,blank?],remove_for->[delete_all],unrea... | Enumerate all types of a message. | To me this is probably the scope of the entire change. We just want the number reserved in core, the rest of the functionality / strings and so on can live in the plugin imo. |
@@ -18,6 +18,8 @@ use Composer\Package\AliasPackage;
use Composer\Package\PackageInterface;
use Composer\Repository\RepositoryInterface;
use Composer\Util\Filesystem;
+use Composer\Script\EventDispatcher;
+use Composer\Script\ScriptEvents;
/**
* @author Igor Wiedler <igor@wiedler.ch>
| [No CFG could be retrieved] | Dumps a single file. Returns an array of paths for the given package. | you should remove this empty line |
@@ -0,0 +1,8 @@
+module Idv
+ class PhoneConfirmationOtpGenerator
+ def self.generate_otp
+ digits = Devise.direct_otp_length
+ SecureRandom.random_number(10**digits).to_s.rjust(digits, '0')
+ end
+ end
+end
| [No CFG could be retrieved] | No Summary Found. | What do you think about calling this method `call` for consistency with other service objects, and for less redundancy with the class name? |
@@ -374,7 +374,7 @@ class Form_validation_test extends CI_TestCase {
$this->form_validation->run();
$error_msg = $this->form_validation->error('foo');
- $this->assertTrue(strrpos($error_msg, $prefix) === 0);
+ $this->assertStringStartsWith($prefix, $error_msg);
$this->assertTrue(strrpos($error_msg, $suffix... | [Form_validation_test->[test_set_error_delimiters->[assertTrue,error,set_rules,run,set_error_delimiters],test_has_rule->[assertTrue,set_rules,assertFalse,has_rule],test_rule_valid_mac->[assertTrue,assertFalse,valid_mac],test_rule_matches->[assertTrue,assertFalse,run_rules],test_rule_max_length->[assertTrue,max_length,a... | This method is used to test if the form validation rules are set and set error delimiters. | This and the next line (aside from the regexp) don't look as improvements to me. The bigger issue is that no matter how you write them, they'll always look confusing even as code (not just as far as error messages go). Kudos if you find a way around that. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.