patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -4999,6 +4999,13 @@ p {
// Explode hostname on '.'
$exploded_host = explode( '.', $host );
+ // Retreive the name and TLD
+ $name = $exploded_host[ count( $exploded_host ) - 2 ];
+ $tld = $exploded_host[ count( $exploded_host ) - 1 ];
+
+ // Rebuild domain excluding subdomains
+ $domain = $name . '.' . ... | [Jetpack->[sync_reindex_trigger->[current_user_is_connection_owner],verify_json_api_authorization_request->[add_nonce],admin_notices->[opt_in_jetpack_manage_notice,can_display_jetpack_manage_notice],authenticate_jetpack->[verify_xml_rpc_signature],sync_reindex_status->[current_user_is_connection_owner],admin_page_load-... | Staticize a subdomain. | what about `darthvader.com.br` or `hansolo.co.uk`? This would just pull the domain as "co.uk" or "com.br" |
@@ -80,8 +80,7 @@ func (bo *BalanceOperator) Do(region *metapb.Region, leader *metapb.Peer) (bool,
bo.index++
- ok, err = bo.Check(region, leader)
- return ok, nil, errors.Trace(err)
+ return bo.index >= len(bo.ops), nil, nil
}
// ChangePeerOperator is used to do peer change.
| [Check->[GetPeer,GetChangeType,New,Warnf,Trace,GetId],Do->[Check,Do,Trace],Enum] | Do performs the balance operator. | Can we use check here? |
@@ -119,6 +119,12 @@ final class ModeratorController implements IModeratorController {
banExpires == null ? "forever" : banExpires.toString()));
}
+ private void assertUserIsAdmin() {
+ if (!isAdmin()) {
+ throw new IllegalStateException("Not an admin");
+ }
+ }
+
@Override
public v... | [ModeratorController->[boot->[getNodeMacAddress,assertUserIsAdmin],getChatLogHeadlessHostBot->[getNodeMacAddress,assertUserIsAdmin,getChatLogHeadlessHostBot,getRemoteHostUtilsForNode],getHeadlessHostBotSalt->[getNodeMacAddress,assertUserIsAdmin],bootPlayerHeadlessHostBot->[bootPlayerHeadlessHostBot,getNodeMacAddress,as... | Ban a mac from the lobby. This method is called to build a ModeratorAuditArgs object from the ModeratorAuditHistory. | What about using `Precoditions#checkState`? Depending on how often this method is used, it might be ok to inline this guava precondition |
@@ -56,8 +56,8 @@ class ExamTemplate < ApplicationRecord
# Replace an ExamTemplate with the correct file
def replace_with_file(blob, attributes={})
- return unless attributes.has_key? :assignment_id
- assignment_name = Assignment.find(attributes[:assignment_id]).short_identifier
+ return unless attribu... | [ExamTemplate->[save_cover->[base_path],get_cover_field->[num_cover_fields]]] | Replaces the cover block with a new file in the Markus explorer. | Style/PreferredHashMethods: Use Hash#key? instead of Hash#has_key?. |
@@ -89,7 +89,10 @@ class BasicClassifier(Model):
initializer(self)
def forward( # type: ignore
- self, tokens: TextFieldTensors, label: torch.IntTensor = None
+ self,
+ tokens: TextFieldTensors,
+ label: torch.IntTensor = None,
+ metadata: Field[DataArray] = None,
... | [BasicClassifier->[make_output_human_readable->[get_index_to_token_vocabulary,append,dim,get_token_from_index,str,argmax,item,range],forward->[_seq2vec_encoder,softmax,_feedforward,_loss,_classification_layer,_dropout,get_token_ids_from_text_field_tensors,get_text_field_mask,_seq2seq_encoder,_accuracy,_text_field_embed... | Forward computation of the N - tuple of the n - tuple of the n - tuple of. | This should be a `MetadataField`. |
@@ -533,8 +533,11 @@ class IvyModuleRef(object):
def __eq__(self, other):
return isinstance(other, IvyModuleRef) and self._id == other._id
- def __ne__(self, other):
- return not self == other
+ # TODO(python3port): Return NotImplemented if other does not have attributes
+ def __lt__(self, other):
+ ... | [IvyUtils->[do_resolve->[IvyError],calculate_classpath->[collect_elements->[collect_jars,collect_provide_excludes,collect_excludes],collect_jars->[add_jar]],_copy_ivy_reports->[IvyError],parse_xml_report->[IvyInfo,IvyModuleRef,IvyResolveReportError,add_module],_exec_ivy->[IvyError],_resolve_conflict->[IvyResolveConflic... | A class method to check if two IvyModuleRefs are equal. | Replaced `__cmp__` with rich comparisons, which are auto-generated from the `@total_ordering` annotation. Same semantics as before |
@@ -99,6 +99,7 @@ class Embedding(TokenEmbedder, Registrable):
sparse: bool = False,
vocab_namespace: str = None,
pretrained_file: str = None,
+ vocabulary: Vocabulary = None,
) -> None:
super().__init__()
self.num_embeddings = num_embeddings
| [EmbeddingsTextFile->[close->[close],__exit__->[close],_get_the_only_file_in_the_archive->[format_embeddings_file_uri],__init__->[parse_embeddings_file_uri]],parse_embeddings_file_uri->[EmbeddingsFileURI]] | Initialize a Cluster object from a sequence of missing values. | If you're taking this parameter in the constructor, I think you can just remove `from_vocab_or_files` entirely, and remove the `constructor=` parameter from the registry, and the duplicate registration at the bottom of the class. I'm in favor of this, it simplifies things quite a bit. |
@@ -980,7 +980,7 @@ def secret_learned(
def mediate_transfer(
state: MediatorTransferState,
- possible_routes: List[RouteState],
+ candidate_route_states: List[RouteState],
payer_channel: NettingChannelState,
channelidentifiers_to_channels: Dict[ChannelID, NettingChannelState],
nodeaddresse... | [events_for_balanceproof->[is_safe_to_wait,get_payer_channel,get_payee_channel],forward_transfer_pair->[get_lock_amount_after_fees],events_for_expired_pairs->[get_pending_transfer_pairs],handle_onchain_secretreveal->[events_for_balanceproof,set_onchain_secret],handle_init->[mediate_transfer],handle_node_change_network_... | Try a new route or fail to a refund. This transition is a no - op if there is no transfer pair in the queue. | Please, persist this value, it then can be used on a refund (if there are more then one route in there) |
@@ -40,6 +40,9 @@ import static org.mockito.Mockito.times;
*/
@Test(groups = { "gobblin.yarn" })
public class YarnAutoScalingManagerTest {
+ // A queue within size == 1 and upperBound == "infinite" should impose no impact on the execution.
+ private final static YarnAutoScalingManager.MaxValueEvictingQueue noopQu... | [YarnAutoScalingManagerTest->[TestYarnAutoScalingRunnable->[runInternal->[runInternal]]]] | This test mocking method for YARN jobs. | "should impose no impact" -> "should not impact" |
@@ -125,7 +125,9 @@ def _spider(url, visited, root, depth, max_depth, raise_on_error):
# Do the real GET request when we know it's just HTML.
req.get_method = lambda: "GET"
- response = urlopen(req, timeout=TIMEOUT)
+ response = urlopen(req, timeout=TIMEOUT) \
+ if context i... | [_spider_wrapper->[_spider],find_versions_of_archive->[spider],_spider->[LinkParser,NonDaemonPool],LinkParser->[__init__->[__init__]],spider->[_spider]] | Fetches the URL and any pages it links to up to max_depth. Feeds a page and links and returns a list of pages and links. | Same here -- just pass context for all cases. |
@@ -1356,7 +1356,7 @@ func InstanceStateRefreshFunc(conn *ec2.EC2, instanceID string, failStates []str
return func() (interface{}, string, error) {
instance, err := resourceAwsInstanceFindByID(conn, instanceID)
if err != nil {
- if !isAWSErr(err, "InvalidInstanceID.NotFound", "") {
+ if !isAWSErr(err, ec2.U... | [StringLenBetween,DescribeVolumesModifications,GetChange,IgnoreAws,Message,BoolValue,StringSlice,IsNewResource,DescribeIamInstanceProfileAssociations,GetPasswordData,StringInSlice,Ec2KeyValueTags,ModifyVolume,HasPrefix,NonRetryableError,Code,Set,StopInstances,Ec2UpdateTags,MonitorInstances,GetOkExists,DescribeTags,Term... | ec2InstanceDelete returns a resource. StateRefreshFunc that is used to watch the termination Func returns a resource. StateRefreshFunc that is used to watch a volume s ult. | I see in `ec2/api.go` `UnsuccessfulInstanceCreditSpecificationErrorCodeInvalidInstanceIdNotFound = "InvalidInstanceID.NotFound"` but even though the constant's value is what we want it's name suggests something to do with an error from getting an instance's credit specification. I see nothing with leaving the original ... |
@@ -300,6 +300,16 @@ func resourceBigQueryTable() *schema.Resource {
},
},
+ // Clustering: [Optional] Specifies column names to use for data clustering. Up to four
+ // top-level columns are allowed, and should be specified in descending priority order.
+ "clustering": {
+ Type: schema.TypeLis... | [Printf,MustCompile,GetOk,Do,Sprintf,Marshal,FindStringSubmatch,Unmarshal,NormalizeJsonString,Id,StringInSlice,Insert,Delete,Errorf,SetId,Get,Set,Update] | The maximum number of items in the schema. The name of the in bytes excluding any data in the streaming buffer. | You could add `MaxItems: 4`, yeah? |
@@ -930,13 +930,15 @@ void Client::Send(NetworkPacket* pkt)
}
// Will fill up 12 + 12 + 4 + 4 + 4 bytes
-void writePlayerPos(LocalPlayer *myplayer, NetworkPacket *pkt)
+void writePlayerPos(LocalPlayer *myplayer, ClientMap *clientMap, NetworkPacket *pkt)
{
v3f pf = myplayer->getPosition() * 100;
v3f sf ... | [No CFG could be retrieved] | Handle unknown packets This function handles the case where a key - on - the - fly occurs. | Formatting: ideally have 1 space after 'wanted_range' then edit lines above so that all '=' align vertically. |
@@ -24,6 +24,11 @@ export type Props = {
*/
children: React$Node,
+ /**
+ * Class names of the component (for web).
+ */
+ className?: string,
+
/**
* The event handler/listener to be invoked when this
* {@code AbstractContainer} is clicked on Web or pressed on React
| [No CFG could be retrieved] | A class that exports a React component s property types. The * method can be used to find the type of the component that should be. | Shouldn't this be in Container.web instead? |
@@ -152,6 +152,10 @@ FINGERPRINTS = {
}],
CAR.COROLLA_HATCH: [{
36: 8, 37: 8, 114: 5, 170: 8, 180: 8, 186: 4, 401: 8, 426: 6, 452: 8 , 464: 8, 466: 8, 467: 8, 544: 4, 550: 8, 552: 4, 562: 6, 608: 8, 610: 8, 643: 7 , 705: 8, 728: 8, 740: 5, 742: 8, 743: 8, 761: 8, 764: 8, 765: 8, 800: 8, 810: 2, 812: 8, 824: ... | [dbc_dict] | CAR. RAV4_2011 - > [ COROLLA_HATCH is a dictionary of the corolla_hATCH values List of all toyota ethernet ethernet ethernet ethernet. | this fingerprint was taken in non-stock mode |
@@ -439,7 +439,7 @@ namespace MueLuTests {
Teuchos::ArrayRCP<const Scalar> xdata = XX->getData(0);
bool bCheck = true;
for(size_t i=0; i<XX->getLocalLength(); i++) {
- if (i>=0 && i< 5) { if(xdata[i] != (SC) 1.0) bCheck = false; }
+ if (i< 5) { if(xdata[i] != (SC) 1.0) bCheck = false... | [No CFG could be retrieved] | This function is called from the constructor of the Teuchos class. - - - - - - - - - - - - - - - - - -. | Preferred "promotion to SC" form is `SC (1.0)`. |
@@ -248,7 +248,7 @@
</dependency>
<%_ } _%>
<%_ } _%>
-<%_ if (applicationType === 'gateway' && authenticationType === 'uaa') { _%>
+<%_ if (applicationType === 'gateway') { _%>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId... | [No CFG could be retrieved] | Returns a list of all possible non - null dependencies. Returns a list of all possible NICs for the cache provider. | Remove the entire condition. |
@@ -66,7 +66,7 @@ func (cfg *Config) RegisterFlags(f *flag.FlagSet) {
f.IntVar(&cfg.MaxConcurrent, "querier.max-concurrent", 20, "The maximum number of concurrent queries.")
f.DurationVar(&cfg.Timeout, "querier.timeout", 2*time.Minute, "The timeout for a query.")
if f.Lookup("promql.lookback-delta") == nil {
- f... | [Err->[Err],LabelNames->[LabelNames],Next->[Next],At->[At],LabelValues->[LabelValues],Select->[SelectSorted]] | RegisterFlags registers flags for the config Required fields for the query tracker. | This CLI flag is registered only if `f.Lookup("promql.lookback-delta")` is `nil`. This doesn't look correct to me. Shouldn't be always registered now? |
@@ -149,6 +149,17 @@ public final class OzoneConfigKeys {
public static final TimeDuration OZONE_CLIENT_RETRY_INTERVAL_DEFAULT =
TimeDuration.valueOf(0, TimeUnit.MILLISECONDS);
+ /**
+ * If this value is true, when the client calls the flush() method,
+ * we will checks whether the data in the buffer i... | [OzoneConfigKeys->[getValue,toString,name,valueOf]] | This class defines the default values for the stream buffer. region OZONE METHODS. | let's change "we will checks" to "it checks" |
@@ -189,12 +189,18 @@ public class TemplateResponse extends BaseResponseWithTagInformation implements
@Param(description = "KVM Only: true if template is directly downloaded to Primary Storage bypassing Secondary Storage")
private Boolean directDownload;
+ @SerializedName(ApiConstants.DEPLOY_AS_IS)
+ ... | [TemplateResponse->[getObjectId->[getId]]] | This is a private utility method that is used to provide additional information about a single - object Set the zone name. | @nvazquez did we get rid of child-template design from old multi-disk ova code? Can this be removed? |
@@ -133,11 +133,12 @@ class PoolBuilder
}
}
- $this->pool->setPackages($this->packages, $this->priorities);
-
unset($this->aliasMap);
unset($this->loadedNames);
unset($this->nameConstraints);
+ unset($this->identityMap);
+
+ $this->pool->setPackage... | [PoolBuilder->[loadPackage->[getRequires,setRootPackageAlias,getName,getConstraint,addPackage,getAliasOf,getTarget,getConstraints,getVersion],buildPool->[getJobs,getName,matches,returnPackages,loadPackages,getPackages,getNames,loadPackage,setPackages,getStability,getVersion,requestPackages]]] | Builds a pool of packages and aliases. loadPackage loads a package from the repository and adds it to the packages list. Adds a package to the list of packages and returns the list of load names. | you should reset it to an empty array rather than unseting the property itself (which requires PHP to remember that this instance does not have the property belonging to the class definition anymore) |
@@ -28,7 +28,7 @@ class PlotDataStructureError(DvcException):
def __init__(self):
super().__init__(
"Plot data extraction failed. Please see "
- "https://man.dvc.org/plot for supported data formats."
+ "https://man.dvc.org/plots for supported data formats."
)
... | [VegaRenderer->[_datapoints->[_filter_fields,_append_revision,_append_index,_find_data],_convert->[get_vega],get_vega->[_datapoints,_squash_props]],_find_data->[PlotDataStructureError,_lists],_lists->[_lists]] | Initialize DvcException with a message that indicates that the Dvc object was not created. | It looks like both links redirect to the same route, but I can confirm that the command is "plots" instead of "plot". |
@@ -85,6 +85,8 @@ var (
keyFile = flag.String("key", "./.hmykey", "the private key file of the harmony node")
// isBeacon indicates this node is a beacon chain node
isBeacon = flag.Bool("is_beacon", false, "true means this node is a beacon chain node")
+ // isArchival indicates this node is a archival node that w... | [RemoveAll,Root,GOMAXPROCS,GetProfiler,Now,NewHost,SetHandler,GetP2PHost,Blockchain,Info,Exit,RunServices,Atoi,LoadKeyFromFile,FileHandler,Error,Int,GetID,GenKey,SupportSyncing,NewLDBDatabase,New,Notify,AddPeer,RegisterPRndChannel,Start,Nanosecond,Errorf,SetPortAndIP,Bool,GetGlobalConfig,RegisterRndChannel,Var,Terminal... | The main entry point for the node. initSetup - initializes the flags for the beacon leader node. | typo: a -> an |
@@ -11,6 +11,8 @@ namespace System.Globalization
internal static bool UseNls => false;
+ internal static bool PredefinedOnly { get; } = GetSwitchValue("System.Globalization.PredefinedOnly", "DOTNET_SYSTEM_GLOBALIZATION_PREDEFINED_ONLY");
+
private static bool GetGlobalizationInvariantMode()... | [GlobalizationMode->[GetGlobalizationInvariantMode->[TryGetAppLocalIcuSwitchValue,FailFast,IsBrowser,LoadAppLocalIcu,GetInvariantSwitchValue,LoadICU],LoadAppLocalIcuCore->[Length,LoadLibrary,Concat,InitICUFunctions,CreateLibraryName],GetGlobalizationInvariantMode]] | Checks if the globalization is in invariant mode. | >PredefinedOnly [](start = 29, length = 14) are you adding this for Linux only? looks the calling site will call it even running on Windows. maybe you need to move this to the file GlobalizationMode.cs? |
@@ -285,6 +285,11 @@ public class HttpConnector implements WsConnector {
return this;
}
+ public Builder systemPassCode(@Nullable String systemPassCode) {
+ this.systemPassCode = systemPassCode;
+ return this;
+ }
+
public HttpConnector build() {
checkArgument(!isNullOrEmpty(ur... | [HttpConnector->[get->[get],Builder->[build->[HttpConnector]]]] | Sets the proxy credentials. | Unit test is missing to verify that the HTTP header `X-Sonar-Passcode` is set. |
@@ -369,3 +369,7 @@ class RandomSizedCrop(object):
scale = Scale(self.size, interpolation=self.interpolation)
crop = CenterCrop(self.size)
return crop(scale(img))
+
+
+
+
| [Normalize->[__call__->[zip,sub_]],Compose->[__call__->[t]],CenterCrop->[__call__->[round,int,crop],__init__->[int,isinstance]],RandomSizedCrop->[__call__->[round,randint,int,CenterCrop,Scale,scale,resize,sqrt,random,uniform,crop,range]],Scale->[__call__->[resize,int,isinstance],__init__->[isinstance,len]],RandomHorizo... | Randomly crop and resize an image. | We should remove the trailing whitespace |
@@ -251,7 +251,7 @@ func makeHeaderChain(parent *types.Header, n int, engine consensus.Engine, db et
}
// makeBlockChain creates a deterministic chain of blocks rooted at parent.
-func makeBlockChain(parent *types.Block, n int, engine consensus.Engine, db ethdb.Database, seed int) []*types.Block {
+func makeBlockCh... | [AddTxWithChain->[SetCoinbase],Number,SetCoinbase] | makeHeaderChain creates a deterministic chain of headers rooted at a given parent. GetBlock returns a block header or nil. | what's the meaning of 0 and 19 here? |
@@ -58,10 +58,13 @@ def autocomplete():
for dist in installed:
print(dist)
sys.exit(1)
- subcommand = commands.get(subcommand_name)
+
+ subcommand = commands[subcommand_name](parser)
+ options += [(opt.get_opt_string(), opt.nargs) for opt in pa... | [bootstrap->[main],FrozenRequirement->[egg_name->[egg_name]],main->[parseopts,autocomplete,main],main] | Command and option completion for the main option parser and its subcommands. handle missing options. | this didn't just fix completion, it changed it's behavior. e.g for "pip install --" completion, it used to give install options and general options (excluding those marked as SUPPRESS_HELP) now it shows everything, "pip --" completion is still the same in that it still excludes the suppressed ones. how about let's just... |
@@ -36,16 +36,6 @@ public final class Expressions
return new ConstantExpression(null, type);
}
- public static CallExpression call(Signature signature, Type returnType, RowExpression... arguments)
- {
- return new CallExpression(signature, returnType, Arrays.asList(arguments));
- }
-
- ... | [Expressions->[call->[asList,CallExpression],constantNull->[ConstantExpression],subExpressions->[visitInputReference->[add],visitCall->[add,accept,getArguments],visitLambda->[add,accept],visitVariableReference->[add],visitConstant->[add],build,accept,builder],field->[InputReferenceExpression],constant->[ConstantExpress... | Creates a ConstantExpression that evaluates to a constant or null if no constant exists. | What's the reasoning behind removing these helpers and prefer using `new ...` directly? Are other helpers in the class going to be removed as well? |
@@ -825,3 +825,18 @@ class RaidenService(Runnable):
self.start_health_check_for(transfer.initiator)
init_target_statechange = target_init(transfer)
self.handle_state_change(init_target_statechange)
+
+ def upgrade_db(self, current_version: int, old_version: int):
+ log.debug(f'Upgra... | [RaidenService->[_register_payment_status->[PaymentStatus],_callback_new_block->[handle_state_change],handle_state_change->[_redact_secret],on_message->[on_message],stop->[stop],_initialize_messages_queues->[_register_payment_status,start_health_check_for],start->[start],mediate_mediated_transfer->[mediator_init,handle... | Target Mediated Transfer. | could you explain this better? why is this sleep necessary? |
@@ -7,7 +7,14 @@ export const getNextOnboardingPage = user => {
return null
} else if (!user.termsAgreedAt) {
return '/terms'
- } else if (!user.revisedScheduleAgreedAt && !user.revisedScheduleRejected) {
+ } else if (
+ // Already agreed, don't display revised schedule
+ !user.revisedScheduleAgree... | [No CFG could be retrieved] | Imports the next onboarding page for a user. | We could also have an enum with 3 values: Agreed, Rejected, Abstained. And a separate agreedAt column with a date. Probably not worth the extra complexity. |
@@ -34,6 +34,11 @@ import org.springframework.integration.file.support.FileExistsMode;
import org.springframework.messaging.Message;
import org.springframework.util.Assert;
+import java.nio.charset.Charset;
+import java.util.Collections;
+import java.util.Map;
+import java.util.function.Function;
+
/**
* The {@l... | [FileTransferringMessageHandlerSpec->[charset->[charset],fileNameExpression->[fileNameGenerator]]] | Creates a new instance of the FileTransferringMessageHandler. FileTransferringMessageHandlerSpec constructor. | You can't reorder imports. That's where Checkstyle fails for you. Please, consider do not do auto-formatting in your IDE before pushing commits. |
@@ -39,6 +39,17 @@ describe('json', () => {
expect(getValueForExpr(obj, 'child.other')).to.be.undefined;
});
+ it('should return a nested value without proto', () => {
+ const child = {str: 'A', num: 1, bool: true, val: null};
+ const obj = recreateNonProtoObject({child: child});
+ expec... | [No CFG could be retrieved] | Package that contains functions to provide a description of the expectation that the values of the object are Checks that the object contains all the properties of the object that are not undefined. | Wouldn't it be better to test `hasOwnProperty` or some other `Object.prototype` property? |
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+module View
+ class About < Snabberb::Component
+ def render
+ about_string = <<~ABOUT
+ 18xx.games is created and maintained by Toby Mao. It is an open source project, and you can find the
+ code at https://github.com/tobymao/18xx
+ ABOUT
+... | [No CFG could be retrieved] | No Summary Found. | put the array on the same line as 10 |
@@ -69,10 +69,11 @@ public class TrashTest {
} catch(IOException ioe) {}
// If trash doesn't exist, create
- trash = new TrashTestBase(new Properties(), false, false, true);
- verify(trash.fs).mkdirs(trash.trash.getTrashLocation(), new FsPermission(FsAction.ALL, FsAction.NONE, FsAction.NONE));
- ve... | [TrashTest->[testCreateTrash->[Properties,TrashTestBase],testPurgeSnapshots->[answer->[add,getArguments],assertTrue,Path,toArray,size,equals,getTrashLocation,minusDays,TrashTestBase,thenReturn,DateTime,setProperty,setCurrentMillisFixed,getMillis,newArrayList,print,thenAnswer,assertEquals,getCanonicalName,setCurrentMill... | Test creation cases for trash. | What does this change do? |
@@ -106,6 +106,18 @@ func resourceAwsMskCluster() *schema.Resource {
},
},
},
+ "sasl": {
+ Type: schema.TypeList,
+ Optional: true,
+ Elem: &schema.Resource{
+ Schema: map[string]*schema.Schema{
+ "scram": {
+ Type: schema.TypeBool,
+ ... | [StringLenBetween,KafkaUpdateTags,StringValueSlice,GetChange,IgnoreAws,BoolValue,StringInSlice,CreateCluster,UpdateClusterConfiguration,KafkaTags,NonRetryableError,Set,Int64Value,DescribeCluster,IntAtLeast,New,HasChange,HasChanges,Errorf,SetId,RetryableError,GetBootstrapBrokers,Bool,UpdateMonitoring,IgnoreConfig,Descri... | The default schema for cluster - level resources. The encryption - related schema for the KmsKey. | I believe only sasl or tls can be enable for authentication, so the should both have a `conflicts_with` of the other. |
@@ -10,7 +10,7 @@
FILE: sample_recognize_content.py
DESCRIPTION:
- This sample demonstrates how to extact text and content information from a document
+ This sample demonstrates how to extract text and content information from a document
given through a file.
USAGE:
python sample_recognize_content.... | [RecognizeContentSample->[recognize_content->[format_bounding_box]],recognize_content,RecognizeContentSample] | A sample of how to recognize content of a given object. Print out some information about the tables and cells in the content object. | sorry to make you fix my mistakes, but the async sample still has "extact" |
@@ -324,6 +324,17 @@ public class TemplateServiceImpl implements TemplateService {
}
}
+ for (Iterator<VMTemplateVO> iter = allTemplates.listIterator(); iter.hasNext();) {
+ VMTemplateVO child_template = iter.next();
+ ... | [TemplateServiceImpl->[handleTemplateSync->[createTemplateAsync,getTemplate],deleteTemplateCallback->[getTemplate],handleSysTemplateDownload->[createTemplateAsync,getTemplate],prepareTemplateOnPrimary->[copyAsync],generateCopyUrl->[generateCopyUrl],copyAsync->[copyAsync],copyTemplateCrossZoneCallBack->[getTemplate,getF... | This method is called when a template sync is performed on a data store. This method is called when a template is found in the store. It checks if the template Remove template from the store and update the template table. | Won't this `allTemplates` be empty after the previous code? |
@@ -87,13 +87,13 @@ namespace System.Runtime.Serialization.Json
}
}
- internal XmlDictionaryString[] MemberNames => _helper.MemberNames;
+ internal XmlDictionaryString[]? MemberNames => _helper.MemberNames;
internal override string TypeName => _helper.TypeName;
... | [JsonClassDataContract->[JsonClassDataContractCriticalHelper->[CopyMembersAndCheckDuplicateNames->[ConvertXmlNameToJsonName,Value,UnderlyingType,Format,Add,MemberNames,ContainsKey,JsonDuplicateMemberNames,Length,GetClrTypeFullName],Value,CopyMembersAndCheckDuplicateNames,NameValueSeparatorString,IsNullOrEmpty,Concat,Tr... | read an object from the JSON stream. | should obj be nullable? |
@@ -66,6 +66,7 @@
#include <Galeri_XpetraMatrixTypes.hpp>
#endif
+#include <Tpetra_Details_residual.hpp>
#include <Ifpack2_UnitTestHelpers.hpp>
#include <Ifpack2_OverlappingRowMatrix.hpp>
| [No CFG could be retrieved] | region Ifpack2 Unit test Macro used inside the unit test below. It tests for global error and prints each process s. | In the future, use double quotes for any header that's not a system header. |
@@ -46,6 +46,7 @@ class PluginUpdate(BaseMutation):
@classmethod
def perform_mutation(cls, root, info, **data):
plugin_id = data.get("id")
+ plugin_name = data.get("name")
data = data.get("input")
manager = get_plugins_manager()
plugin = manager.get_plugin(plugin_id)... | [PluginUpdate->[Arguments->[PluginUpdateInput],perform_mutation->[PluginUpdate]]] | Perform a mutation on a node. | Plugin name shouldn't be in data/input? |
@@ -147,8 +147,9 @@ namespace System.Runtime.Serialization.Json
return o;
}
- public override void WriteJsonValueCore(XmlWriterDelegator jsonWriter, object obj, XmlObjectSerializerWriteContextComplexJson context, RuntimeTypeHandle declaredTypeHandle)
+ public override void WriteJso... | [JsonCollectionDataContract->[JsonFormatGetOnlyCollectionReaderDelegate->[ReflectionReadGetOnlyCollection],JsonFormatCollectionReaderDelegate->[ReflectionReadCollection],WriteJsonValueCore->[JsonFormatWriterDelegate,IsGetOnlyCollection],JsonFormatCollectionWriterDelegate->[ReflectionWriteCollection],ReadJsonValueCore->... | Reads and writes an object from the JSON stream. | should obj be nullable? |
@@ -331,10 +331,8 @@ public class FlinkExecutableStageFunction<InputT> extends AbstractRichFunction
public void close() throws Exception {
// close may be called multiple times when an exception is thrown
if (stageContext != null) {
- try (@SuppressWarnings("unused")
- AutoCloseable bundl... | [FlinkExecutableStageFunction->[ReceiverFactory->[create->[create]],InMemoryBagUserStateFactory->[InMemorySingleKeyBagState->[clear->[clear]]]]] | Closes the managed bundle. | Are these no longer needed by any of our tools? |
@@ -618,6 +618,13 @@ public class Util {
*/
}
+ // TODO JENKINS-60563 remove MD5 from all usages in Jenkins
+ @SuppressFBWarnings(value = "WEAK_MESSAGE_DIGEST_MD5", justification =
+ "This method should only be used for non-security applications where the MD5 weakness is not a problem."... | [Util->[intern->[intern],getMethod->[getMethod],getDigestOf->[getDigestOf],getHostName->[getHostName],isSymlink->[isSymlink],getPastTimeString->[getTimeSpanString],tokenize->[tokenize],fixNull->[fixNull],rawEncode->[encode],loadFile->[loadFile],fixEmptyAndTrim->[fixEmpty],toHexString->[toHexString],createFileSet->[crea... | Gets the digest of the given input stream. | Good time to deprecate this and all callers? |
@@ -868,6 +868,16 @@ def check_list_path_option(options):
)
+silence_python_deprecation_warnings = partial(
+ Option,
+ '--no-warn-python-deprecation',
+ dest='silence_python_deprecation_warnings',
+ action='store_true',
+ default=False,
+ help='Silence deprecation warns for Python versio... | [_handle_no_binary->[_get_format_control],_handle_python_version->[_convert_python_version,raise_option_error],_handle_no_use_pep517->[raise_option_error],_handle_no_cache_dir->[raise_option_error],_handle_only_binary->[_get_format_control]] | Creates a command line option that checks that the specified package s archive matches this hash. Get the links to a . | Should have a trailing comma in the argument list here. |
@@ -125,8 +125,11 @@ setuptools.setup(
ext_modules=cythonize([
'**/*.pyx',
'apache_beam/coders/coder_impl.py',
- 'apache_beam/runners/common.py',
'apache_beam/metrics/execution.py',
+ 'apache_beam/runners/common.py',
+ 'apache_beam/runners/worker/logger.py',
+ ... | [get_version->[open,exec],find_packages,get_distribution,system,get_version,format,warn,cythonize,setup,StrictVersion] | Package information for a given package. The Nose plugin. | Would this include `runners/worker/statesampler.pyx` ? |
@@ -63,7 +63,7 @@ setuptools.setup(
'scipy',
'coverage',
'colorama',
- 'scikit-learn>=0.20,<0.22',
+ 'scikit-learn>=0.23',
'pkginfo',
'websockets'
],
| [find_packages,setup,walk,system,NotImplementedError,append,read,format,normpath,join,open,lower] | Define the classes that should be included in the module. | why this one is 0.23 and or others are 0.23.2? |
@@ -1322,11 +1322,11 @@ ROM_END
GAME( 1993, dinopic, dino, dinopic, dino, cps1bl_pic_state, init_dinopic, ROT0, "bootleg", "Cadillacs and Dinosaurs (bootleg with PIC16c57, set 1)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE ) // 930201 ETC
GAME( 1993, dinopic2, dino, dinopic, dino, ... | [No CFG could be retrieved] | ETC GAME - A list of all known GAME components. Ephemeris Energy - Masters Energy - Masters and E. | The tabulation is off on this line. |
@@ -16,6 +16,7 @@ package simulator
import (
"bytes"
"fmt"
+ "github.com/pingcap/pd/tools/pd-simulator/simulator/simutil"
"github.com/pingcap/kvproto/pkg/eraftpb"
"github.com/pingcap/kvproto/pkg/metapb"
| [Step->[incMergeRegion,incTransferLeader,GetStoreId,WithRemoveStorePeer,incPromoteLeaner,Clone,SetRegionConfVer,SetApproximateSize,GetConfVer,incUsedSize,GetPeer,WithEndKey,GetID,GetStartKey,WithStartKey,WithIncConfVer,incRemovePeer,decUsedSize,SetRegion,GetDownPeers,recordRegionChange,GetPeers,GetRegion,GetEndKey,Equa... | responseToTask returns a Task object that represents a single region heartbeat response. This method returns a object that can be used to construct a configuration object for a specific type. | How about moving it to line 20? |
@@ -29,10 +29,11 @@ const (
//
defaultMaxIdleConnections = 4
- enqueueTaskQuery = `SELECT cereal_enqueue_task($1, $2, $3, $4)`
- dequeueTaskQuery = `SELECT * FROM cereal_dequeue_task($1)`
- completeTaskQuery = `SELECT cereal_complete_task($1, $2, $3, $4)`
- getTaskResultQuery = `SELECT task_name, parameters,... | [DequeueTask->[dequeueTask],Close->[Close],ListWorkflowInstances->[Close],ListWorkflowSchedules->[Close]] | This function is used to configure the cereal object. This function is used to find all workflow instances in the system that match the given value. | [style] There's that weird habbit of always using backticks for SQL.... It's not getting us anything if there's neither newlines nor quotes involved. Fine. |
@@ -93,10 +93,9 @@ class MediaSearchSubscriber implements EventSubscriberInterface
public function handlePreIndex(PreIndexEvent $event)
{
$metadata = $event->getMetadata();
- $reflection = $metadata->getClassMetadata()->reflection;
if (
- false === $reflection->isSubclass... | [MediaSearchSubscriber->[handlePreIndex->[setImageUrl,getMedia,getName,getMimeType,addField,getMetadata,getClassMetadata,getDocument,getCollection,createField,getLocale,isSubclassOf,getFileVersion,getFile,getImageUrl,getSubject,getId],getImageUrl->[getThumbnails,warning,addFormatsAndUrl,getId]]] | Adds the missing fields to the document if the document is not indexed. | Can you move the closing bracket from the if into a separate line? This way it reads a little bit strange. |
@@ -121,8 +121,12 @@ func (d *Dispatcher) relocateAppliance() error {
// provider := performance.NewHostMetricsProvider(d.session)
// rankedPolicy := placement.NewRankedHostPolicy()
- randomPolicy := placement.NewRandomHostPolicy()
- if randomPolicy.CheckHost(d.op, d.appliance) {
+ randomPolicy, err := placement.... | [cleanupAfterCreationFailed->[Begin,Sprintf,Folder,cleanupBridgeNetwork,Warnf,End,Errorf,Debugf,removeFolder,Children,cleanupEmptyPool,Debug],relocateAppliance->[Reference,CheckHost,WaitForResult,Error,Infof,Begin,RecommendHost,FolderName,New,End,String,Errorf,HostSystem,Relocate,NewRandomHostPolicy,Debugf],createPool-... | relocateAppliance relocations the VCH VM to the current host of the appliance Relocate a VCH to a host. | I'd suggest moving the `oldHost, err := d.appliance.HostSystem(d.op)` above this line and using the host from that. I'll confess I'm not actually sure why there is an appliance.Host field or under what circumstances it may not be set. |
@@ -8,7 +8,7 @@ namespace DSCore
/// Comparison methods.
/// </summary>
[IsVisibleInDynamoLibrary(false)]
- public static class Compare
+ internal static class Compare
{
/// <summary>
/// Returns true if a is greater than b.
| [Compare->[LessThan->[CompareTo],GreaterThan->[CompareTo],GreaterThanOrEqual->[CompareTo],LessThanOrEqual->[CompareTo]]] | - Comparison methods. Checks if a is less than or equal to b. | If the class or method is internal then we don't need to put IsVisibleInDynamoLibrary attribute. Can we have a small utility to dump the contents in library, and compare that with before and after these changes? |
@@ -122,9 +122,11 @@ std::string getImagePath(std::string path)
Utilizes a thread-safe cache.
*/
-std::string getTexturePath(const std::string &filename)
+std::string getTexturePath(const std::string &filename, bool *is_base_pack)
{
std::string fullpath;
+ if (is_base_pack)
+ *is_base_pack = false;
/*
Che... | [No CFG could be retrieved] | Gets the full path to a texture by first checking if the image exists and if not it returns full path to image file if file extension is not found. | There's no way to tell the source of the texture (in a sane way) after caching the path. It's also not needed to check for it here: `is_base_pack` is only passed when initializing the textures the first time. |
@@ -149,7 +149,7 @@ class Login extends BaseModule
);
}
} catch (Exception $e) {
- Logger::log('authenticate: failed login attempt: ' . Strings::escapeTags($username) . ' from IP ' . $_SERVER['REMOTE_ADDR']);
+ Logger::notice('authenticate: failed login attempt', ['action' => 'login', 'username' => Stri... | [Login->[sessionAuth->[internalRedirect],content->[internalRedirect],form->[getBaseURL],openIdAuthentication->[getMessage,authUrl,getBaseURL,getHostName,internalRedirect],passwordAuthentication->[internalRedirect]]] | This method is called when a user is authenticated by a user that has a password. if a user is not logged in and logged in then redirect to the user. | I think it should be a warning. If humans misstype their password a couple of times, it won't be a problem, but mass login attempts should be dealt with before anything that can show up in the notice log. Meaning that even if I don't want to see the notices, I should see the failed login attempts. |
@@ -5,7 +5,8 @@ describe SetupPresenter do
let(:presenter) do
described_class.new(current_user: user,
user_fully_authenticated: false,
- user_opted_remember_device_cookie: true)
+ user_opted_remember_device_cookie: true,
+ ... | [create,context,new,let,to,build,describe,eq,it,require] | missing setup presenter. | can we update the tests in this file to cover the different values for `opt_out_rem_me` or whatever we name it? |
@@ -108,8 +108,15 @@ class Category < ActiveRecord::Base
}
TOPIC_CREATION_PERMISSIONS ||= [:full]
- POST_CREATION_PERMISSIONS ||= [:create_post, :full]
- scope :topic_create_allowed, -> (guardian) { scoped_to_permissions(guardian, TOPIC_CREATION_PERMISSIONS) }
+ scope :topic_create_allowed, -> (guardian) do... | [Category->[ensure_consistency!->[create_category_definition],ensure_slug->[duplicate_slug?],auto_bump_topic!->[auto_bump_topic!],reset_topic_ids_cache->[reset_topic_ids_cache],set_permissions]] | Creates a new category object. The category_topic_ids attribute provides a cache of all category topic ids. | I am confused ... shouldn't we be fixing `scoped_to_permissions` here? |
@@ -38,11 +38,13 @@ class EncryptedAttribute
private_class_method def self.load_or_build_user_access_key(cost:, key:)
@_uaks_by_key ||= {}
uak_lookup = "#{key}:#{cost}"
- @_uaks_by_key[uak_lookup] ||= UserAccessKey.new(password: key, salt: key, cost: cost)
+ @_uaks_by_key[uak_lookup] ||= Encryption::... | [EncryptedAttribute->[try_decrypt->[new_user_access_key,decrypt],try_decrypt_with_uak->[decrypt],try_decrypt_with_all_keys->[try_decrypt],fingerprint->[fingerprint],old_keys->[old_keys]]] | Load or build a user access key. | Hmm, does this change anything? I don't find something that makes up for this if its just a refactor. |
@@ -15,9 +15,10 @@ except ImportError: # pragma nocover
import distutils.sysconfig as sysconfig
import distutils.util
+from pip.compat import OrderedDict
-logger = logging.getLogger(__name__)
+logger = logging.getLogger(__name__)
_osx_arch_pat = re.compile(r'(.+)_(\d+)_(\d+)_(.+)')
| [get_impl_tag->[get_impl_ver,get_abbr_impl],get_abi_tag->[get_impl_ver,get_flag,get_abbr_impl,get_config_var],get_impl_ver->[get_abbr_impl,get_config_var],get_platform->[get_platform],get_supported->[get_abi_tag,get_platform,is_manylinux1_compatible,get_impl_version_info,get_abbr_impl],get_flag->[get_config_var],is_man... | Get the configuration variable from sysconfig. | Strange diff :astonished: |
@@ -54,6 +54,14 @@ class ColorizationEvaluator(BaseEvaluator):
launcher_settings['device'] = 'CPU'
launcher = create_launcher(launcher_settings, delayed_model_loading=True)
network_info = config.get('network_info', {})
+ colorization_network = network_info.get('colorization_network... | [ColorizationEvaluator->[release->[release],reset->[reset],register_metric->[register_metric],extract_metrics_results->[compute_metrics],get_metrics_attributes->[get_metrics_attributes],print_metrics_results->[compute_metrics]],ColorizationTestModel->[predict->[postprocessing,data_preparation]],ColorizationCheckModel->... | Create a Colorization object from a config dict. | why do you need this? they have this info as keys in network info, why is it not enough for you? |
@@ -2676,9 +2676,7 @@ define([
var proj = Cartesian3.multiplyByScalar(camera.directionWC, Cartesian3.dot(toCenter, camera.directionWC), scratchProj);
var distance = Math.max(frustum.near, Cartesian3.magnitude(proj) - radius);
- scratchDrawingBufferDimensions.x = context.drawingBufferWidth;
- ... | [No CFG could be retrieved] | Updates the showBoundingVolume property of the given model. - - - - - - - - - - - - - - - - - -. | Remove the declaration for `scratchDrawingBufferDimensions` above. |
@@ -0,0 +1,7 @@
+# frozen_string_literal: true
+
+class AddFeaturedTopicIdToUserProfiles < ActiveRecord::Migration[6.0]
+ def change
+ add_reference :user_profiles, :featured_topic, foreign_key: { to_table: 'topics' }
+ end
+end
| [No CFG could be retrieved] | No Summary Found. | We've had some debate internally about using foreign keys. While we might use them in the future for now it's part of a bigger discussion we haven't finished. It would be better if you used a regular NULLable int here |
@@ -37,8 +37,17 @@ import (
const (
beatName = "apm-server"
apmIndexPattern = "apm"
+ cloudEnv = "CLOUD_APM_CAPACITY"
)
+var cloudMatrix = map[string][]int{
+ "512": {5, 267, 2000, 267},
+ "1024": {7, 381, 4000, 381},
+ "2048": {10, 533, 8000, 533},
+ "4096": {14, 762, 16000, 762},
+ "8192": {20,... | [Commands,MustNewConfigFrom,MakeDefaultObserverSupport,Sprintf,ResetFlags,Name,Bool,GenRootCmdWithSettings,String,NewFlagSet,MarkDeprecated,AddCommand,RemoveCommand,Flags] | Provide a list of all the components of the APM server that are able to handle the DefaultSettings returns the default settings for the APM beacon. | Can you please define a struct, and make this a `map[string]struct_name`? |
@@ -7239,7 +7239,9 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
instanceDisk.setController(DiskControllerType.getType(device.getClass().getSimpleName()).toString());
instanceDisk.setControllerUnit(((VirtualS... | [VmwareResource->[getNetworkStats->[networkUsage],ensureDiskControllersInternal->[ensureDiskControllers,ensureScsiDiskControllers],getUnmanageInstanceNics->[compare->[extractInt],getName],connect->[connect],configure->[configure],resizeRootDiskOnVMStart->[appendFileType],canSetEnableSetupConfig->[setBootOptions],execut... | Get the list of unmanaged instance disks. This method is called to set the controller and name of the instance disk. | @DK101010 I think on failure you can decide to fail the entire VM ingestion by (a) returning an empty list and let the user of the `getUnmanageInstanceDisks` method handle the case (when disk list is empty throw an exception), or (b) in the generic exception handler, instead of Exception throw an `UnsupportedOperationE... |
@@ -118,15 +118,12 @@ def freeze(
else:
line = line[len('--editable'):].strip().lstrip('=')
line_req = install_req_from_editable(
- line,
- isolated=isolated,
- ... | [FrozenRequirement->[from_dist->[get_requirement_info]]] | Yields a sequence of strings representing a single . Yields line of requirements file in order to install a missing package. Yields a sequence of strings describing the a . | nit: maintain existing style of one-per-line? |
@@ -20,7 +20,10 @@ public class ClassLoaderInstrumentationModule extends InstrumentationModule {
@Override
protected String[] additionalHelperClassNames() {
- return new String[] {"io.opentelemetry.javaagent.tooling.Constants"};
+ return new String[] {
+ "io.opentelemetry.javaagent.tooling.Constants"... | [ClassLoaderInstrumentationModule->[typeInstrumentations->[asList,ResourceInjectionInstrumentation,ClassLoaderInstrumentation]]] | Returns a list of all the classes that should be included in the compiler. | This class should be picked automaticallty by muzzle, there's no need to specify it. |
@@ -252,7 +252,8 @@ class ExportDepAsJar(ConsoleTask):
# this means 'dependencies'
"targets": [],
"source_dependencies_in_classpath": [],
- "libraries": [],
+ "compile_libraries": [],
+ "runtime_libraries": [],
"roots": [],
... | [ExportDepAsJar->[_get_target_type->[is_test],_make_libraries_entry->[_zip_sources,_get_target_type],_source_roots_for_target->[root_package_prefix],generate_targets_map->[_make_libraries_entry,_get_all_targets,_flat_non_modulizable_deps_for_modulizable_targets,_process_target,_resolve_jars_info,_get_targets_to_make_in... | Process a single target. Yields a M2Coordinate object for the missing key in the global libraries and targets Compute the info of a . | Is this going to introduce breaking changes, or is it okay for us to update fastpass atomically as well? cc @olafurpg |
@@ -150,7 +150,7 @@ class Photo
$uid = $r["uid"];
- $accessible = $uid ? DI::pConfig()->get($uid, 'system', 'accessible-photos') : false;
+ $accessible = $uid ? (bool)DI::pConfig()->get($uid, 'system', 'accessible-photos', false) : false;
$sql_acl = Security::getPermissionsSQLByUserId($uid, $accessible);
... | [Photo->[setPermissionFromBody->[get],isLocalPage->[get],getFields->[getBasePath],update->[getByName,asString,put],getPhoto->[get],importProfilePhoto->[isValid,getExt,getBasePath,scaleDown,scaleToSquare,getContentType,getBody],getImageForPhoto->[getByName,get],getAlbums->[t,set,get],store->[getByName,getHeight,getWidth... | Get a single photo by resource id and scale. | Just FYI, the cast to boolean was unnecessary, the default value was enough to fix the error. Any set config value would have been automatically cast to boolean by the existence of the type-hint in `getPermissionsSQLByUserId`. Only `NULL` values can't be cast to the expected type. |
@@ -1225,7 +1225,17 @@ bool HTTPClient::sendHeader(const char * type)
return false;
}
- String header = String(type) + ' ' + (_uri.length() ? _uri : F("/")) + F(" HTTP/1.");
+ String header;
+ // 168: Arbitrarily chosen to have enough buffer space for avoiding internal reallocations
+ header... | [PUT->[PUT],setURL->[beginInternal,disconnect,clear],connected->[connected],connect->[setTimeout,connected,connect,verify,create],POST->[POST],writeToStream->[connected,disconnect],getStream->[connected],returnError->[errorToString,connected],sendRequest->[setURL,connected,sendRequest],errorToString->[String],handleHea... | Sends a request header using the specified type. | Choosing some estimated upper bound like this is fine, but how about doing a finer estimate here? You have at hand at least the following: - _uri.length(), which in theory could be up to 2048 chars max, although an appropriate length is considered to be 75 - _host.length() which could be up to 255 - userAgent.length() ... |
@@ -3059,6 +3059,18 @@ namespace System.Windows.Forms
User32.SendMessageW(this, (User32.WM)TVM.SELECTITEM, (IntPtr)TVGN.DROPHILITE);
}
+ private void UnhookNodes()
+ {
+ List<TreeNode> result = new List<TreeNode>();
+ foreach (TreeNode rootNode in Nodes)
+ ... | [TreeView->[WmNotify->[CustomDraw,TvnSelected,TvnBeginDrag,TvnExpanded,OnNodeMouseClick],Sort->[RefreshNodes],ToString->[ToString],OnHandleDestroyed->[DestroyNativeStateImageList,OnHandleDestroyed,Dispose],OnMouseLeave->[OnMouseLeave],OnHandleCreated->[OnHandleCreated],CustomDraw->[Dispose,OnDrawNode],UpdateNativeState... | Handler for ContextMenuStripClosing. | `rootNode` isn't getting unhooked, is this expected? |
@@ -28,7 +28,13 @@
select: function(event, ui) {
$("#student_id").val(ui.item.id);
}
- });
+ }).data("ui-autocomplete")._renderItem = function( ul, item ) {
+ console.log(JSON.stringify(item));
+ return $( "<li>" )
+ .data( "ui-autocomplete-i... | [No CFG could be retrieved] | Displays a page that displays a single unique identifier. Displays a hidden field that indicates the next valid minimum group member in the group list. | Please remove this line. |
@@ -30,7 +30,7 @@ public class AllValuesConfig {
public OptionalDouble optDoubleValue;
/** an optional long value */
@ConfigItem
- public Optional<Long> optionalLongValue;
+ public OptionalLong optionalLongValue;
/** A config object with a static of(String) method */
@ConfigItem
publ... | [No CFG could be retrieved] | AllValuesConfig - A class which contains all the values of a config object. A list of strings and long values. | This should not be changed: it is like this deliberately in order to test `Optional`. If we change it to `OptionalLong` then we won't be testing that anymore. |
@@ -51,9 +51,9 @@ export const UserManagement = (props: IUserManagementProps) => {
useEffect(() => {
const params = new URLSearchParams(props.location.search);
const page = params.get('page');
- const sort = params.get('sort');
- if (page && sort) {
- const sortSplit = sort.split(',');
+ cons... | [No CFG could be retrieved] | Component that exports a user - managed object. Displays a single . | is it a function or a regular primitive? (string, number, etc.) here, I guess it's a function because it begins with a verb |
@@ -25,6 +25,13 @@ namespace Content.Client.GameObjects.Components
{
base.Count = value;
+ if (!Owner.Deleted)
+ {
+ _appearanceComponent?.SetData(StackVisuals.Actual, Count);
+ _appearanceComponent?.SetData(StackVisuals... | [StackComponent->[StatusControl->[Update->[Update]]]] | Creates a status control that can be used to show a status bar on the page. | Could add a guard to check if the value changes. Also should hide and maxcount be set every time count is set? Also turns out client appearancecomponent doesn't guard against this so I'm gonna PR that real quick. |
@@ -2492,7 +2492,7 @@ namespace Kratos
iValue(0, 1) = iValue(1, 0) = data.generalizedStresses[2] -
data.generalizedStresses[5];
iValue(0, 2) = iValue(2, 0) = 0.0;
- iValue(1, 2) = iValue(2, 1) = 0.0;
+ iValue(1, 2) = iValue(2, 1) = 0.0;
}
else if (ijob == 8) // SHELL_ORTHOTROPIC_STRESS... | [No CFG could be retrieved] | IValue - > IValue - > IValue - > IValue - > IValue Get the lamina stress and strain values. | uff, i don't understand this statement (i wouldn't be able to tell the order in which it is executed...) |
@@ -28,14 +28,15 @@ class Nalu(CMakePackage):
description='Compile with Tioga support')
# Required dependencies
+ depends_on('cmake@3.20.0:')
depends_on('mpi')
depends_on('yaml-cpp@0.5.3:', when='+shared')
depends_on('yaml-cpp~shared@0.5.3:', when='~shared')
# Cannot build Tri... | [Nalu->[cmake_args->[append,extend,define_from_variant],variant,depends_on,version]] | Return a list of options for the Cmake command. | These are now identical; did you intend to delete `~shared`? I think it would also improve maintainability to write one line for all the variant requirements, then an additional `depends_on('trilinos~shared', when='+shared')`. |
@@ -311,7 +311,8 @@ public class SystemSchema extends AbstractSchema
val.isOvershadowed() ? IS_OVERSHADOWED_TRUE : IS_OVERSHADOWED_FALSE,
segment.getShardSpec(),
segment.getDimensions(),
- segment.getMetrics()
+ segment.getMetrics(),
+ ... | [SystemSchema->[TasksTable->[getAuthorizedTasks->[iterator],scan->[SupervisorsEnumerable->[enumerator->[close->[]]],TasksEnumerable->[enumerator->[close->[close]]],TasksEnumerable]],SupervisorsTable->[getAuthorizedSupervisors->[iterator],scan->[SupervisorsEnumerable->[enumerator->[close->[close]]],TasksEnumerable->[enu... | scan for segments in the druid schema. Returns segments which are authorized to be published. | `CompactionState` includes the `PartitionsSpec` and `indexSpec`. What should a caller of the API do with these? The compaction state appears to be an unbounded json object. Do we foresee any issues around serializing the entire json blob every time we need to call the sys table? |
@@ -102,9 +102,14 @@ namespace Content.Client.GameObjects.Components
&& _spriteLayers.Count > 0
&& entity.TryGetComponent<ISpriteComponent>(out var spriteComponent))
{
+ if (_spritePath == null)
+ {
+ _spritePath = spriteCom... | [StackVisualizer->[OnChangeData->[OnChangeData],InitializeEntity->[InitializeEntity],LoadData->[LoadData]]] | Initialize the entity. | I think C# has a better construct `_spritePath ?? = spriteComponent.BaseRSI!.Path!` |
@@ -90,6 +90,17 @@ public class ZipExtractionInstaller extends ToolInstaller {
}
}
+ /**
+ * Checks if the specified expected location already contains the installed version of the tool.
+ *
+ * This check needs to run fairly efficiently. The current implementation uses the URL of the arc... | [ZipExtractionInstaller->[ChmodRecAPlusX->[process->[process]]]] | Performs the installation of this archive. | this is a bad idea (CSRF risk, DDoS) |
@@ -502,7 +502,8 @@ define([
}
function screenSpaceError(primitive, frameState, tile) {
- if (frameState.mode === SceneMode.SCENE2D) {
+ // TODO: check for sseDenominator so shadow cameras with orthographic frustum works. check correctness.
+ if (frameState.mode === SceneMode.SCENE2D ||... | [No CFG could be retrieved] | The base class for the QuadtreePrimitive. This is a base class that can be used This function is called when a level - zero tile is requested. | What's the plan with this TODO? Roadmap? |
@@ -3,6 +3,18 @@ module Users
module Account
class AddonsController < ApplicationController
layout 'fluid'
+
+ before_action :load_printers, only: :index
+
+ def label_printer
+ @printer = {printer_type: :fluics, ready: true, api_key: 'ISVO42192IUDV168ATFI314UVYGU151USHYEV42'... | [AddonsController->[layout]] | Module Settings - Module Account - Module Account - Module Account - Module Account - Module Account -. | Rails/LexicallyScopedActionFilter: index is not explicitly defined on the class. |
@@ -72,6 +72,14 @@ def dev_build(self, args):
"spack dev-build spec must have a single, concrete version. "
"Did you forget a package version number?")
+ source_path = args.source_path
+ if source_path is None:
+ source_path = os.getcwd()
+ source_path = os.path.abspath(sourc... | [dev_build->[die,abspath,do_install,error,msg,DIYStage,concretize,parse_specs,get,len,setup_package,format,set,execvp,exists,exit,getcwd],setup_parser->[add_common_arguments,add_mutually_exclusive_group,add_argument]] | Dev build of a package. | ... if the user doesn't specify `--source-path` |
@@ -57,14 +57,12 @@ class Work < ActiveRecord::Base
has_many :draft_multiple_episodes, dependent: :destroy
has_many :draft_programs, dependent: :destroy
has_many :draft_staffs, dependent: :destroy
- has_many :draft_work_organizations, dependent: :destroy
has_many :draft_works, dependent: :destroy
has_ma... | [Work->[comments_count->[where,pluck,count],channels->[present?,where,uniq,pluck],chart_labels->[map],chart_values->[pluck],checkins_count->[presence],current_season?->[present?,slug],next_season?->[present?,slug],where,order,scope,joins,transitions,aasm,include,uniq,event,has_many,blank?,each,id,split,state,has_paper_... | A base class for all Work objects that are related to a specific activity. Where clause. | Line is too long. [91/90] |
@@ -21,7 +21,7 @@ OSSL_PROVIDER *OSSL_PROVIDER_load(OPENSSL_CTX *libctx, const char *name)
&& (prov = ossl_provider_new(libctx, name, NULL)) == NULL)
return NULL;
- if (!ossl_provider_activate(prov)) {
+ if (!ossl_provider_activate(prov, libctx)) {
ossl_provider_free(prov);
r... | [OSSL_PROVIDER_add_builtin->[CRYPTOerr,ossl_provider_new,ossl_provider_free],OSSL_ITEM->[ossl_provider_get_param_types],OSSL_PROVIDER_get_params->[ossl_provider_get_params],OSSL_PROVIDER_load->[ossl_provider_activate,ossl_provider_new,ossl_provider_find,ossl_provider_free],OSSL_PROVIDER_unload->[ossl_provider_free]] | Load OSSL_PROVIDER from given library context. | Oh! This didn't show when I looked at the commit that implements this change... |
@@ -90,7 +90,7 @@ def test_label_io():
def test_stc_to_label():
"""Test stc_to_label
"""
- src = read_source_spaces(src_fname)
+ src, _ = read_source_spaces(src_fname)
stc = read_source_estimate(stc_fname)
os.environ['SUBJECTS_DIR'] = op.join(data_path, 'subjects')
labels1 = stc_to_label... | [test_label_io->[assert_labels_equal],test_stc_to_label->[assert_labels_equal],test_label_addition->[assert_labels_equal]] | Test for the fact that the STC file has the same number of labels. | this can be an API breakage. I am seriously considering a class SourceSpaces that would behave as a list like so far but would have an info attribute. Maybe we should keep this for after the release... |
@@ -520,6 +520,7 @@ def plot_bem(subject=None, subjects_dir=None, orientation='coronal',
on top of the midpoint MRI slice with the BEM boundary drawn for that
slice.
"""
+ from .._freesurfer import _check_mri
subjects_dir = get_subjects_dir(subjects_dir, raise_error=True)
mri_fname = _check_... | [plot_ideal_filter->[_get_flim,adjust_axes,_filter_ticks],plot_bem->[_plot_mri_contours],plot_filter->[_get_flim,adjust_axes,_filter_ticks],plot_cov->[_index_info_cov]] | Plot a BEM contours on an atomical slices. Get the next canon - level canon - level canon - level canon - Plots contours of the missing non - zero - segment MRI contours. | It doesn't seem like this should need to be nested, does it actually need to be? |
@@ -30,10 +30,12 @@ class Jetpack_XMLRPC_Methods {
*/
public static function xmlrpc_methods( $methods ) {
- $methods['jetpack.featuresAvailable'] = array( __CLASS__, 'features_available' );
- $methods['jetpack.featuresEnabled'] = array( __CLASS__, 'features_enabled' );
- $methods['jetpack.disconnectBlog'] ... | [Jetpack_XMLRPC_Methods->[json_api->[verify_xml_rpc_signature,serve,get_access_token]]] | Get all xmlrpc methods. | I believe we're trying to move away from the "userless" naming now. See #19734. Maybe we should avoid introducing such changes here now? cc @leogermani |
@@ -44,4 +44,14 @@ public class ForbiddenException extends RuntimeException
{
return super.getMessage();
}
+
+ @Override
+ public ForbiddenException transform(Function<String, String> errorMessageTransformFunction)
+ {
+ if (Strings.isNullOrEmpty(errorMessageTransformFunction.apply(getMessage()))) {
+ ... | [ForbiddenException->[getErrorMessage->[getMessage]]] | Returns the error message for a . | appears to be a logic bug here unit tests please |
@@ -128,6 +128,16 @@ export class AmpAdNetworkDoubleclickImpl extends AmpA4A {
/** @override */
extractCreativeAndSignature(responseText, responseHeaders) {
setGoogleLifecycleVarsFromHeaders(responseHeaders, this.lifecycleReporter_);
+ if (responseHeaders.has(AMP_ANALYTICS_HEADER)) {
+ try {
+ ... | [No CFG could be retrieved] | Handle resize events for AMP element. Returns the ad unit hash key string. | Can this be factored into shared code between AdSense and Doubleclick impls, similar to `setGoogleLifecycleVarsFromHeaders`? Maybe in ads/google/a4a/utils.js? Ditto below for `onCreativeRender`. |
@@ -1,5 +1,6 @@
class CreditsController < ApplicationController
before_action :authenticate_user!
+ before_action :initialize_stripe
def index
@user_unspent_credits_count = current_user.credits.unspent.size
| [CreditsController->[new->[new],create->[new],find_or_create_customer->[create]]] | index This method is called when a user has not previously requested a lease. | Putting these in the controller works fine, but it'd probably be more DRY and reliable in the `Stripe::` object or whatever.... I'm just not sure what the most ideal situation is. |
@@ -77,14 +77,14 @@ class StudentsController < ApplicationController
# active records--creates a new record if the model is new, otherwise
# updates the existing record
return unless @user.save
- redirect_to :action => 'index' # Redirect
+ redirect_to action: 'index' # Redirect
end
#downl... | [StudentsController->[upload_student_list->[redirect_to,size,upload_user_list,post?,blank?,t],create->[redirect_to,save,post?,new],edit->[find_by_id],update->[redirect_to,render,user_name,update_attributes,post?,find_by_id],bulk_modify->[hide_students,nil?,empty?,find,give_grace_credits,construct_table_rows,render,unhi... | POST - > create a new . | Prefer single-quoted strings when you don't need string interpolation or special symbols. |
@@ -276,6 +276,7 @@ export function sanitizeTagsForTripleMustache(html) {
* Tag policy for handling what is valid html in templates.
* @param {string} tagName
* @param {!Array<string>} attribs
+ * @return {*} TODO: Specify return type
*/
function tripleMustacheTagPolicy(tagName, attribs) {
if (tagName == 't... | [No CFG could be retrieved] | Tag policy for handling what is valid html in templates. | `?{tagName: string, attribs: !Array<string>}` |
@@ -54,7 +54,13 @@ class MongoParserVisitor extends HqlParserBaseVisitor<String> {
@Override
public String visitLikePredicate(HqlParser.LikePredicateContext ctx) {
- return ctx.expression(0).accept(this) + ":{'$regex':" + ctx.expression(1).accept(this) + "}";
+ String parameter = ctx.expressio... | [MongoParserVisitor->[visitAndPredicate->[predicate,append,toString,StringBuilder,length,accept],visitEqualityPredicate->[accept],visitLessThanOrEqualPredicate->[accept],visitParameterExpression->[getText,containsKey,escape,get],visitIsNullPredicate->[NOT,accept],visitInequalityPredicate->[accept],visitLikePredicate->[... | String representation of like predicate. | what's in position 0 here? i would expect that to be the leading / |
@@ -27,7 +27,7 @@ import (
)
func composeGoGetImport(owner, repo, sub string) string {
- return path.Join(setting.Domain, setting.AppSubURL, owner, repo, sub)
+ return path.Join(setting.Domain, setting.AppSubURL, owner, repo)
}
// earlyResponseForGoGetMeta responses appropriate go-get meta with status 200
| [sendFile->[IsNotExist,Header,ModTime,Join,Size,Stat,Format,Sprintf,ServeFile,Set,WriteHeader],setHeaderNoCache->[Header,Set],setHeaderCacheForever->[Header,Unix,Sprintf,Now,Set],Handle,HandleText,ComposeHTTPSCloneURL,IsErrTwoFactorNotEnrolled,GetAccessTokenBySHA,Now,sendFile,Close,Fields,GetRepositoryByName,HasPrefix,... | earlyResponseForGoGetMeta returns a response with status 200 if the user has actual Check if the user has a git meta file and if so return it. | Please remove unused parameter `sub` |
@@ -1,8 +1,8 @@
-# -------------------------------------------------------------------------
+# ------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See LICENSE.txt in the project root for
# license info... | [No CFG could be retrieved] | Creates an object containing all the properties of the given object. | Does it make sense to export these without the Async prefix, so that the same credential names can be used in both the sync and async? |
@@ -443,7 +443,7 @@ public final class Pipeline {
return new Builder(pipeline);
}
- private void setReplicaIndexes(Map<DatanodeDetails, Integer> replicaIndexes) {
+ public void setReplicaIndexes(Map<DatanodeDetails, Integer> replicaIndexes) {
this.replicaIndexes = replicaIndexes;
}
| [Pipeline->[sameDatanodes->[getNodeSet],Builder->[build->[setLeaderId,setCreationTimestamp,setNodesInOrder,Pipeline,setReplicaIndexes,isEmpty],getCreationTimestamp,getLeaderId,getSuggestedLeaderId],getFromProtobuf->[getType],getNodesInOrder->[getNodes],getProtobufMessage->[isEmpty],getClosestNode->[getFirstNode],toStri... | Creates a builder for a new pipeline. | I think this should remain private to keep Pipeline immutable. |
@@ -14,6 +14,8 @@ import (
// It returns the modified SubjectAccessReview.
func AddUserToSAR(user user.Info, sar *authorization.SubjectAccessReview) *authorization.SubjectAccessReview {
sar.Spec.User = user.GetName()
+ // reminiscent of the bad old days of C. Copies copy the min number of elements of both source a... | [GetGroups,GetExtra,Create,New,NewForbidden,ExtraValue,GetName] | Authorize adds the requisite user information to a SubjectAccessReview and returns the modified SubjectAccessReview. | @jim-minter @bparees one to catch in future pulls. This leads to annoying bugs. |
@@ -155,7 +155,12 @@ namespace System
/// <summary>Returns a random floating-point number between 0.0 and 1.0.</summary>
/// <returns>A double-precision floating point number that is greater than or equal to 0.0, and less than 1.0.</returns>
- protected virtual double Sample() => _impl.Sample... | [Random->[NextInt64->[NextInt64],Sample->[Sample],Next->[Next],NextDouble->[NextDouble],ThreadSafeRandom->[NextInt64->[ThrowMaxValueMustBeNonNegative,NextInt64,ThrowMinMaxValueSwapped],Next->[ThrowMaxValueMustBeNonNegative,ThrowMinMaxValueSwapped,Next],NextDouble->[NextDouble],NextBytes->[NextBytes],NextSingle->[NextSi... | Sample method. | One would hope the jit would see that all the code inside this method is debug only and this annotation would be superfluous |
@@ -312,6 +312,14 @@ class CompilerBase(object):
can_giveup=config.COMPATIBILITY_MODE
)
+ def _activate_disable_reflected_list(self):
+ self.state.old_dlr = self.state.typingctx.disable_reflected_list
+ self.state.typingctx.disable_reflected_list = \
+ self.state.flag... | [compile_ir->[compile_local->[compile_ir],compile_local,compile_ir],compile_result->[CompileResult],CompilerBase->[_compile_core->[define_pipelines],_compile_bytecode->[_compile_core],_compile_ir->[_compile_core],__init__->[StateDict,_CompileStatus,_make_subtarget]],compile_internal->[Compiler,compile_extra],compile_ex... | Initialize a NestedSequence object. | A minor thing, but `old_dlr` should this not be `old_drl` (last two letters transposed)? |
@@ -367,6 +367,8 @@ jhipster:
host: localhost
port: 5000
queue-size: 512
+ audit-events:
+ retention-period: 30 # Number of days before audit events are deleted.
<%_ if (applicationType === 'uaa') { _%>
uaa:
key-store:
| [No CFG could be retrieved] | The configuration of the authentication key. Additional information about the token key. | Should be available only if generator.authenticationType === 'oauth2' && ['sql', 'mongodb'].includes(generator.databaseType) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.