patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -0,0 +1,17 @@
+#!/usr/bin/env python3
+
+# Copyright (c) Facebook, Inc. and its affiliates.
+# This source code is licensed under the MIT license found in the
+# LICENSE file in the root directory of this source tree.
+
+from parlai.core.metrics import METRICS_DISPLAY_DATA
+
+
+fout = open('metric_list.inc', 'w')
+
... | [No CFG could be retrieved] | No Summary Found. | maybe a sort just to be sure? |
@@ -18,6 +18,12 @@ class MarksGradersController < ApplicationController
def index
@grade_entry_form = GradeEntryForm.find(params[:grade_entry_form_id])
+ @section_column = ''
+ if Section.all.size > 0
+ @section_column = "section: {display: \"" +
+ I18n.t(:'user.section') +
+ "\",... | [MarksGradersController->[global_actions->[nil?,render,find,size,t,assign_all_graders,unassign_graders,randomly_assign_graders],students_with_assoc->[includes],download_grader_students_mapping->[nil?,send_data,find,user_name,generate,grade_entry_form_id,each,id,push],csv_upload_grader_groups_mapping->[redirect_to,nil?,... | This action shows the missing node in the database. | Align the operands of an expression in an assignment spanning multiple lines. |
@@ -38,6 +38,14 @@ class SecurityAdmin extends Admin
const EDIT_FORM_VIEW = 'sulu_security.role_edit_form';
+ /**
+ * Should be called after ContactAdmin.
+ */
+ public static function getPriority(): int
+ {
+ return -10;
+ }
+
/**
* @var ViewBuilderFactoryInterface
... | [SecurityAdmin->[configureViews->[setBackView,setParent,hasPermission,add,setTitleProperty,addToolbarActions],getConfig->[generate],configureNavigationItems->[addChild,setView,hasPermission,setPosition]]] | Creates a new security admin object. Constructor for . | In other places we were using powers of 2 for similar values, because they easily allow to put other priorities in between them. And maybe we should make sure that there is enough room in between? So use something like `-1024`? |
@@ -209,6 +209,17 @@ public class ScanHBase extends AbstractProcessor implements VisibilityFetchSuppo
.addValidator(StandardValidators.CHARACTER_SET_VALIDATOR)
.build();
+ static final PropertyDescriptor BLOCK_CACHE = new PropertyDescriptor.Builder()
+ .displayName("Block Cache... | [ScanHBase->[ScanHBaseResultHandler->[handle->[getBatchSize,initNewFlowFile,finalizeFlowFile]]]] | This class defines the properties that are used to represent the given row in JSON format. The list of properties that can be used to determine if a resource is not authorized. | I think it would be better to just name it "Block Cache" |
@@ -87,18 +87,6 @@ def create_stage(cls, repo, path, external=False, **kwargs):
check_circular_dependency(stage)
check_duplicated_arguments(stage)
- if stage and stage.dvcfile.exists():
- has_persist_outs = any(out.persist for out in stage.outs)
- ignore_run_cache = (
- not kwarg... | [PipelineStage->[changed_stage->[_changed_stage_entry]],create_stage->[loads_from],Stage->[_status->[status,update],relpath->[relpath],remove->[ignore_remove_outs,unprotect_outs,remove_outs],_status_stage->[changed_stage],changed_entries->[changed_stage,_changed_stage_entry,_changed_entries],get_all_files_number->[filt... | Create a new stage from a DVC file. | Minimal changes to get this out of the way from create_stage. `can_be_skipped` and `is_cached` relations still raise questions. These days the connection to actual run_cache is more apparent, but in this functionality we mixup run_cache and avoiding to write the same contents to the dvcfile. Those need to be separate. |
@@ -31,9 +31,10 @@ def make_array(array_type):
# in _helperlib.c.
class ArrayTemplate(cgutils.Structure):
_fields = [('data', types.CPointer(dtype)),
+ ('parent', types.pyobject),
('shape', types.UniTuple(types.intp, nd)),
('strides', types.Un... | [array_shape->[make_array],array_len->[make_array],array_size->[make_array],iternext_numpy_flatiter->[make_array_flat_cls,make_array],getitem_array1d_slice->[make_array],make_array_flatiter->[make_array_flat_cls],getitem_array_tuple->[make_array],setitem_array1d->[make_array],iternext_array->[make_arrayiter_cls,_getite... | Return the Structure representation of the given array_type. . | I would prefer keeping the original layout. The `parent` field is only needed as a hack to support returning array object passed in as argument. It is not used outside of the call wrapper. Even better is that we remove parent and support return-array-from-argument using static analysis and bake it into the call wrapper... |
@@ -143,4 +143,10 @@ public class GrpcClientConfiguration {
*/
@ConfigItem(defaultValue = "pick_first")
public String loadBalancingPolicy;
+
+ /**
+ * The compression to use for each call. The accepted values are {@code gzip} and {@code identity}.
+ */
+ @ConfigItem
+ public Optional<St... | [No CFG could be retrieved] | Load balancing policy. | Can you list the supported values? Also, I believe we only support gzip in native at the moment (I should be able to get snappy to work too as I did it for Kafka). |
@@ -21,3 +21,17 @@ func Assertf(cond bool, msg string, args ...interface{}) {
failfast(fmt.Sprintf("%v: %v", assertMsg, fmt.Sprintf(msg, args...)))
}
}
+
+// AssertNoError will Fail if the error is non-nil.
+func AssertNoError(err error) {
+ if err != nil {
+ failfast(err.Error())
+ }
+}
+
+// AssertNoErrorf wil... | [Sprintf] | Fail fast assertion. | You may want to use the new stuff I added to cmdutil to recognize and strigify errors with stacks and causers specially. |
@@ -112,7 +112,12 @@ module Users
end
def process_confirmed_user
- analytics.track_event('Email changed and confirmed', @confirmable)
+ if @confirmable.previous_changes.key?('email')
+ analytics.track_event('Email change confirmed', @confirmable)
+ create_user_event(:email_changed, @... | [ConfirmationsController->[do_confirm->[confirm],process_confirmed_user->[after_confirmation_path_for],sign_in_and_redirect_user->[after_confirmation_path_for]]] | Process a user that has not confirmed. | I could be wrong, but I'm pretty sure this method will only be called when an existing user changes their email and confirms it, so there's no need for the conditional. On a higher level, what do you think about calling Event.create from within the Analytics class `track_event` method, as opposed to adding an additiona... |
@@ -50,6 +50,7 @@ def setup_parser(subparser):
def diy(self, args):
+ tty.warn("`spack diy` is deprecated in favor of `spack dev-build`.")
if not args.spec:
tty.die("spack diy requires a package spec argument.")
| [diy->[die,abspath,do_install,error,msg,DIYStage,concretize,parse_specs,get,len,format,set,exists,exit,getcwd],setup_parser->[add_common_arguments,add_mutually_exclusive_group,add_argument]] | Install a single package in the system. | This should really say that all the functionality of *diy* has *moved* to `dev-build`, and that the `diy` command will be removed in a future Spack version. To remove redundant code, I would recommend that we implement `diy` the same way `spack compilers` is implemented -- that is, delete all the code here and have the... |
@@ -56,12 +56,12 @@ public class KsqlRequestConfig extends AbstractConfig {
private static final String KSQL_REQUEST_QUERY_PUSH_SKIP_FORWARDING_DOC =
"Controls whether a ksql host forwards a push query request to another host";
- public static final String KSQL_REQUEST_QUERY_PUSH_REGISTRY_START =
- "r... | [KsqlRequestConfig->[buildConfigDef->[define],buildConfigDef]] | Creates a ConfigDef object from a KsqlRequest object. Missing configuration for the . | I haven't reviewed the rest of the PR yet, so I probably just don't understand why this is here, but offhand, this seems like a weird thing to ask the users to configure. |
@@ -51,6 +51,13 @@ var (
Help: "Bucketed histogram of the batch size of handled requests.",
Buckets: prometheus.ExponentialBuckets(1, 2, 13),
})
+ requestForwarded = prometheus.NewGaugeVec(
+ prometheus.GaugeOpts{
+ Namespace: "pd_client",
+ Subsystem: "request",
+ Name: "forwarded_status"... | [NewHistogramVec,ExponentialBuckets,MustRegister,NewHistogram,WithLabelValues] | Example of how to collect histogram of failed handled cmds. Get all the duration for a given region. | What about add a label to indicate the proxy pd member name? |
@@ -36,10 +36,16 @@ import java.util.stream.Collectors;
/** A docker command wrapper. Simplifies communications with the Docker daemon. */
class DockerCommand {
+
+ private static final String DEFAULT_DOCKER_COMMAND = "docker";
// TODO: Should we require 64-character container ids? Docker technically allows abb... | [DockerCommand->[killContainer->[checkArgument,asList,runShortCommand,matches],runShortCommand->[getMessage,start,InputStreamReader,IOException,TimeoutException,joining,destroy,toMillis,getCause,getErrorStream,format,getInputStream,waitFor,get,ProcessBuilder,BufferedReader,collect,supplyAsync,exitValue],forExecutable->... | Creates a DockerCommand for the given executable. | Just a small note: there's not much point making this public since the class is package-private. |
@@ -1093,8 +1093,6 @@ def generate_stub_from_ast(mod: StubSource,
if subdir and not os.path.isdir(subdir):
os.makedirs(subdir)
with open(target, 'w') as file:
- if add_header:
- write_header(file, mod.module, pyversion=pyversion)
file.write(''.join(gen.output()))
| [get_qualified_name->[get_qualified_name],find_module_paths_using_imports->[StubSource],ImportTracker->[reexport->[require_name]],generate_stubs->[generate_stub_from_ast,generate_asts_for_modules,collect_docs_signatures,mypy_options,collect_build_targets],main->[generate_stubs,parse_options],find_self_initializers->[Se... | Generate type stub from an AST. | Maybe we can keep this as opt-in, but make it more informative, like add a creation date, mypy version, etc.? |
@@ -111,8 +111,12 @@ class WPSEO_Replace_Vars {
}
elseif ( ! method_exists( __CLASS__, 'retrieve_' . $var ) ) {
if ( ! isset( self::$external_replacements[ $var ] ) ) {
+ if ( empty( $var ) ) {
+ return false;
+ }
self::$external_replacements[ $var ] = $replace_function;
- self::regi... | [WPSEO_Replace_Vars->[retrieve_page->[determine_pagenumbering,retrieve_sep],retrieve_pt_plural->[determine_pt_names],retrieve_pt_single->[determine_pt_names],retrieve_caption->[retrieve_excerpt_only],retrieve_pagetotal->[determine_pagenumbering],retrieve_pagenumber->[determine_pagenumbering]]] | Registers a replacement function for a given variable. The command that is executed when the user is about to enter a new state. | This is my mistake, we should have moved this `if` statement between line 112 and 113 |
@@ -388,8 +388,9 @@ function showConfirmation_(message, callback) {
/**
* Loads the AMP_CONFIG objects from whatever the v0.js is that the user has
- * (depends on whether they opted into beta, experimental, or a specific RTV) so
- * that experiment state can reflect the default activated experiments.
+ * (depends... | [No CFG could be retrieved] | Shows confirmation and calls callback if it s approved. Get the AMP_CONFIG from the text. | nit: "... channels or into" (remove "a") |
@@ -16,6 +16,7 @@ class Libunwind(AutotoolsPackage):
version('develop', branch='master')
version('2018.10.12', commit='f551e16213c52169af8bda554e4051b756a169cc')
+ version('1.3.1', sha256='43997a3939b6ccdf2f669b50fdb8a4d3205374728c2923ddc2354c65260214f8')
version('1.3-rc1', sha256='e40f49dcbfdea3f4d... | [Libunwind->[configure_args->[append],depends_on,conflicts,version,provides,variant]] | Creates a new object. Configure the command line arguments for the non - NIC. | I think we can remove the release candidate now that a stable release is out. Also, do we want to make this the default version? |
@@ -180,6 +180,7 @@ public class SchemaTranslationTest {
final String csasStatement = schema.rawSchema().getFields()
.stream()
.map(Schema.Field::name)
+ .map(name -> "`" + name + "`")
.collect(
Collectors.joining(
", ",
| [SchemaTranslationTest->[SttCaseNode->[buildTest->[generateInputRecords,getOutputRecords]]]] | Build a test from the given input and output files. | Why is this change needed as a result of this PR? |
@@ -222,7 +222,7 @@ foreach ($vrfs_lite_cisco as $vrf_lite) {
foreach ($ospf_ports_poll as $ospf_port_id => $ospf_port) {
// If the entry doesn't already exist in the prebuilt array, insert into the database and put into the array
if (empty($ospf_ports_db[$ospf_port_id][$device['context_name']]))... | [No CFG could be retrieved] | This function is called from the main function of the network. It will pull the data from Loop array of entries and update if. | Is this intended? |
@@ -43,8 +43,10 @@ public interface Http2Connection {
void onStreamActive(Http2Stream stream);
/**
- * Notifies the listener that the given stream is now {@code HALF CLOSED}. The stream can be
- * inspected to determine which side is {@code CLOSED}.
+ * Notifies the listener ... | [No CFG could be retrieved] | Called when the stream half is closed. | @nmittler - Note I changed from `{@code CLOSED}` to `{@code HALF CLOSED}`...I think this makes more sense. WDYT? |
@@ -55,7 +55,14 @@ public class HoodieCreateHandle<T extends HoodieRecordPayload> extends HoodieIOH
status.setFileId(UUID.randomUUID().toString());
status.setPartitionPath(partitionPath);
- this.path = makeNewPath(partitionPath, TaskContext.getPartitionId(), status.getFileId());
+ final int sparkParti... | [HoodieCreateHandle->[close->[close],canWrite->[canWrite]]] | Creates a new HoodieCreateHandle object. Checks if a Hoodie record can be written into the current file. | move default assignment to variable declaration. |
@@ -33,6 +33,9 @@ def test_dpss_windows():
assert_array_almost_equal(dpss, dpss_ni)
assert_array_almost_equal(eigs, eigs_ni)
+ dpss, _ = dpss_windows(245411, 4, 8, False, 1000)
+ assert_equal(dpss.shape[-1], 245411)
+
@requires_nitime
def test_multitaper_psd():
| [test_multitaper_psd->[assert_array_almost_equal,RawArray,psd_multitaper,multi_taper_psd,zip,assert_raises,RandomState,LooseVersion,create_info],test_dpss_windows->[assert_array_almost_equal,int,dpss_windows]] | Test computation of DPSS windows. MissingFrequencyPointException is raised if the PSD and frequency arrays are not equal. | is this long to compute? |
@@ -32,3 +32,11 @@ CREATE TABLE IF NOT EXISTS identity.config (
`)
return err
}
+
+// AddTokenExpiryConfig adds expiry fields for token lifespan to the server config
+func AddTokenExpiryConfig(ctx context.Context, tx *sqlx.Tx) error {
+ _, err := tx.ExecContext(ctx, `
+ALTER TABLE identity.config ADD COLUMN
+ id_to... | [EnsureStack,ExecContext] | Check if an object is an object and if so return it. | maybe this is a trivial question, but is it worth calling out somewhere the format of the Expiry string? |
@@ -123,6 +123,8 @@ namespace System.Net.Http
_plaintextStreamFilter = _plaintextStreamFilter,
_initialHttp2StreamWindowSize = _initialHttp2StreamWindowSize,
_activityHeadersPropagator = _activityHeadersPropagator,
+ _defaultCredentialsUsedForProxy = _pr... | [HttpConnectionSettings->[DefaultAutomaticDecompression,Version11,DefaultExpect100ContinueTimeout,AllowHttp3,DefaultInitialHttp2StreamWindowSize,DefaultKeepAlivePingTimeout,DefaultCredentials,DefaultMaxConnectionsPerServer,DefaultResponseDrainTimeout,DefaultUseProxy,DefaultKeepAlivePingDelay,DefaultMaxResponseDrainSize... | CloneAndNormalize returns a shallow copy of this HttpConnectionSettings with all the fields set to Returns the QuicImplementationProvider if the connection pool is not supported. | Should we remove the place where these are set in the constructor? Seems like that code doesn't do anything, and worse, is confusing. |
@@ -0,0 +1,16 @@
+package com.baeldung.l.advanced;
+
+import java.io.File;
+import java.io.IOException;
+
+public class ReadOnlyFileSystem implements FileSystem {
+ public File[] listFiles(String path) {
+ // code to list files
+ return new File[0];
+ }
+
+ public void deleteFile(String path) thr... | [No CFG could be retrieved] | No Summary Found. | Do nothing? or throw exception as per other examples? |
@@ -72,6 +72,15 @@ class PotentialFlowTests(UnitTest.TestCase):
kratos_utilities.DeleteTimeFiles(".")
+ def test_EmbeddedCircleNoWake(self):
+ settings_file_name = "embedded_circle_no_wake_parameters.json"
+ work_folder = "embedded_test"
+
+ with WorkFolderScope(work_folder):
+ ... | [PotentialFlowTests->[test_Naca0012SmallAdjoint->[WorkFolderScope],test_SmallLiftJumpTest->[WorkFolderScope],test_LiftAndMoment->[WorkFolderScope]]] | Test small lift jump test. Missing node in the model. | I am curious, does it still write the time files? I thought I had disabled this globally |
@@ -476,7 +476,10 @@ func (p *PollingDeviationChecker) createJobRun(nextPrice decimal.Decimal, nextRo
if err != nil {
return errors.Wrap(err, fmt.Sprintf("unable to start chainlink run with payload %s", payload))
}
- _, err = p.runManager.Create(p.initr.JobSpecID, &p.initr, &runData, nil, models.NewRunRequest())... | [subscribeToNewRounds->[SubscribeToLogs,Infow,FilterQueryFactory,Hex],consume->[ErrorIf,Error,poll,Unsubscribe,respondToNewRound,Wrap,After,Err,Done],Stop->[cancel],poll->[Hex,Infow,fetchPrices,NewInt,String,createJobRun,WithLabelValues,Add],New->[String,Errorf,Duration],Start->[subscribeToNewRounds,consume,Append,poll... | createJobRun creates a new job run for the given next price and next round. | Would it be better to make this take an argument of request params? |
@@ -135,6 +135,14 @@ func runCmd(
cmd.Args = append(cmd.Args, "--match", filterJourneys.Match)
}
+ // Variant of the command with no params, which could contain sensitive stuff
+ loggableCmd := exec.Command(cmd.Path, cmd.Args...)
+ if len(params) > 0 {
+ paramsBytes, _ := json.Marshal(params)
+ cmd.Args = appe... | [Dir,Warn,Now,Close,Lstat,Buffer,StderrPipe,Info,Done,Add,Marshal,Start,Errorf,Bytes,MustCompile,Wait,NewScanner,Debug,Text,SynthEvents,Match,Join,UnixNano,ExitCode,writeSynthEvent,Kill,StdoutPipe,Scan,Err,Command,NewReader,Sprintf,Unmarshal,Environ,String,Pipe] | runCmd runs the given command and returns a ExecMultiplexer that can be used to findSynthEvents is a helper function to read the standard input and write the synth. | can we move this inside if statement and do only if user has specified params. We could initialize it with loggableCmd as cmd till this point. |
@@ -77,6 +77,14 @@ namespace NServiceBus
}
}
+ string ApplyDistributorLogic(IExtendable context)
+ {
+ IncomingMessage incomingMessage;
+ return context.Extensions.TryGet(out incomingMessage) && incomingMessage.Headers.ContainsKey(LegacyDistributorHeaders.Work... | [UnicastSendRouterConnector->[Task->[MessageType,SpecificInstance,CreateOutgoingLogicalMessageContext,Message,Option,IsNullOrEmpty,ExplicitDestination,Route,RouteToSpecificInstance,RouteToDestination,RouteToAnyInstanceOfThisEndpoint,Extensions,Headers,ConfigureAwait,ToString,Queue,MessageIntent,RouteToThisInstance],Sta... | Route a message to a specific destination. | should we also check the distributorAddress for null here? |
@@ -352,7 +352,11 @@ func (fr *FileReader) drain() error {
return nil
}
-func (d *driverV2) compact(master *work.Master, outputPath string, inputPrefixes []string) error {
+type compactResult struct {
+ OutputSize uint64
+}
+
+func (d *driverV2) compact(master *work.Master, outputPath string, inputPrefixes []strin... | [compactIter->[compactIter],globFileV2->[getTarConditional,Info],Get->[Get]] | drain is the main entry point for the file reader. | I think `compactStats` might be a better name for this. Also, lets stick with `int64` for the size type across the board. |
@@ -165,7 +165,7 @@ func NewAuthServer(pachdAddress string, etcdAddress string, etcdPrefix string) (
nil,
),
}
- go s.getPachClient() // initialize connection to Pachd
+ go pachrpc.InitPachRPC(pachdAddress)
go s.watchAdmins(path.Join(etcdPrefix, adminsPrefix))
go s.retrieveOrGeneratePPSToken()
return s, ... | [GetACL->[LogResp,getEnterpriseTokenState,isAdmin,isActivated,LogReq],getEnterpriseTokenState->[getPachClient],GetScope->[LogResp,getEnterpriseTokenState,isAdmin,isActivated,LogReq],ExtendAuthToken->[isActivated,LogReq,LogResp,isAdmin],Authenticate->[isActivated,LogResp,getEnterpriseTokenState],Activate->[getPachClient... | retrieveOrGeneratePPSToken returns a function that will retrieve the PPS master token or get super user token from STM. | It seems weird that callers should launch this in a goroutine, why not have `InitPachRPC` be the one to call `go`. That way `InitPachRPC` can just be called like a simple function. |
@@ -61,6 +61,14 @@ void mas3507d_device::i2c_scl_w(bool line)
if(i2c_bus_state == STARTED) {
if(i2c_sdai)
i2c_bus_curval |= 1 << i2c_bus_curbit;
+
+ if (i2c_subdest == DATA_READ) {
+ i2c_sdao = BIT(i2c_sdao_data, i2c_bus_curbit + (i2c_bytecount * 8));
+ } else {
+ i2c_sdao_data = 0;
+ i2c_sdao ... | [No CFG could be retrieved] | MAS3507D Device constructor. w - write the i2c device read the i2c device. | The rest of this file is like `if(...)` (no space between control keyword and opening parenthesis of condition). I personally don't like that style, but @galibert does. Please stick with the style of the rest of the file. |
@@ -1247,8 +1247,13 @@ class App
$this->module = "login";
}
+ $router = new App\Router();
+ $this->collectRoutes($router->routeCollector);
+
+ $this->module_class = $router->getModuleClass($this->cmd);
+
$privateapps = $this->config->get('config', 'private_addons', false);
- if (Core\Addon::isEna... | [App->[checkURL->[getBaseURL,getHostName],setBaseURL->[getBasePath],__construct->[getBasePath],getUserAgent->[getBaseURL],removeBaseURL->[getBaseURL],getCurrentThemeStylesheetPath->[getCurrentTheme],redirect->[internalRedirect],initHead->[getBaseURL,registerStylesheet],reload->[getMode,getBasePath],registerFooterScript... | This method is called when the application is running in the frontend. This function is called by the parser when a user is not authorized to access the user s This function is called by the view view and the login action. | What about loading the router outside of `App` and add it (temporary) to the constructor (until we introduced the whole DI framework, which replaces the whole constructor parameters). This will lower the coupling. |
@@ -2489,9 +2489,6 @@ namespace System.Diagnostics.Tracing
#endif
public bool HasRelatedActivityID; // Set if the event method's first parameter is a Guid named 'relatedActivityId'
-#pragma warning disable 0649
- public byte TriggersActivityTracking; // count of listeners that marked ... | [No CFG could be retrieved] | The base class for all of the fields of the EventMetadata object. This is only used for testing. | @LakshanF is adding this attribute sufficient here? (`TraceLoggingEventTypes` initialization & synchronization was moved into this getter in 293538e) |
@@ -191,13 +191,13 @@ ActiveRecord::Schema.define(version: 20180201161105) do
create_table "usps_confirmation_codes", force: :cascade do |t|
t.integer "profile_id", null: false
t.string "otp_fingerprint", null: false
- t.datetime "code_sent_at", default: -> { "now()" }, null: false
+ t.datetime "code... | [define,string,text,add_foreign_key,datetime,integer,json,enable_extension,create_table,boolean,index] | create tables for users on unlock token. | Where did these schema changes come from? |
@@ -77,4 +77,13 @@ public class ObjectBuilderValueResolver<T> extends AbstractComponent
throw new ValueResolvingException(format("Unable to resolve value for parameter '%s'", parameterName));
}
}
+
+ @Override
+ public Map<String, ValueResolver<? extends Object>> getParameters() {
+ if (builder inst... | [ObjectBuilderValueResolver->[isDynamic->[isDynamic],getParameterValue->[getParameterValue]]] | Returns the value of the parameter with the given name. | Return empty HashMap or throw exception like the method above (in this same class)? |
@@ -385,6 +385,7 @@ class SemanticAnalyzer(NodeVisitor):
name = type.name
node = self.lookup_qualified(name, type)
if node and node.kind == UNBOUND_TVAR:
+ assert isinstance(node.node, TypeVarExpr)
result.append((name, cast(TypeVarExpr, node.node)))... | [SemanticAnalyzer->[analyze_comp_for->[analyze_lvalue],build_newtype_typeinfo->[named_type],visit_for_stmt->[visit_block,visit_block_maybe,analyze_lvalue],add_var->[is_func_scope,qualified_name],add_symbol->[is_func_scope],visit_import_all->[normalize_type_alias,add_submodules_to_parent_modules,process_import_over_exis... | Return a list of all unique type variable references in type. | This cast can be removed. |
@@ -334,6 +334,13 @@ public class SchemaKStream<K> {
return (SchemaKStream<Struct>) this;
}
+ if (this instanceof SchemaKTable) {
+ throw new UnsupportedOperationException("Cannot repartition a TABLE source. "
+ + "If this is a join, make sure that the criteria uses the TABLE key "
+ ... | [SchemaKStream->[groupBy->[rekeyRequired],rekeyRequired->[fieldNameFromExpression],resolveSchema->[getSchema]]] | Select a key from the stream. | We should just do this in SchemaKTable rather than checking the type here. |
@@ -32,6 +32,7 @@ module Users
@presenter = PhoneSetupPresenter.new(delivery_preference)
if @user_phone_form.submit(user_params).success?
process_updates
+ set_default_phone
bypass_sign_in current_user
else
render :edit
| [PhonesController->[phone_configuration->[phone_configuration],delivery_preference->[delivery_preference]]] | Updates a single user node. If the user doesn t have a node with the nag. | Is there a reason you are doing this in the controller instead of in the phone form? |
@@ -37,10 +37,10 @@ class CmdList(CmdBaseNoRepo):
if self.args.show_json:
import json
- logger.info(json.dumps(entries))
+ ui.write(json.dumps(entries))
elif entries:
- entries = _prettify(entries, sys.stdout.isatty())
- ... | [add_parser->[add_parser],CmdList->[run->[_prettify]],_prettify->[fmt]] | List a single . | We should always be printing in colors and we should let `colorama` to handle appropriate usage. It might help us with `--color-always` and `--no-color` flags (if we introduced it). |
@@ -43,6 +43,9 @@ func GetClusterAdminClient(adminKubeConfigFile string) (*client.Client, error) {
if err != nil {
return nil, err
}
+ // no rate limit
+ clientConfig.QPS = -1
+
osClient, err := client.New(clientConfig)
if err != nil {
return nil, err
| [IsAlreadyExists,AnonymousClientConfig,Create,Join,OneTermEqualSelector,RequestToken,Secrets,New,ServiceAccounts,TempDir,Env,Poll,List,IsValidServiceAccountToken,Get,GetKubeClient,Namespaces] | GetBaseDir returns the base directory used for testing. Config returns a client kube client and restclient. Config. | Do any tests exercise QPS? If so maybe this should be configured in the tests which want to disable it? |
@@ -571,6 +571,12 @@ EOF;
}
}
+ if (isset($autoloads['files'])) {
+ foreach ($autoloads['files'] as $fileIdentifier => $file) {
+ composerRequire($fileIdentifier, $file);
+ }
+ }
+
return $loader;
}
| [No CFG could be retrieved] | Creates a class loader based on an autoloader map. Returns the code for the include files. | Does this have to be a globally declared function, being declared in a class file? Wouldn't an immediately called closure be scoped enough as well? |
@@ -753,7 +753,7 @@ exports.extensionBundles = [
},
{
name: 'amp-next-page',
- version: ['0.1', '0.2'],
+ version: ['0.1', '1.0'],
latestVersion: '0.1',
options: {hasCss: true},
type: TYPES.MISC,
| [No CFG could be retrieved] | Amp - fx - collection has a special version of the AMP - Fx - A mix of the version of a node that is not supported by AMP. | Sanity check: Does this line need to change? |
@@ -50,3 +50,6 @@ class Xrootd(Package):
cmake(source_directory, *options)
make()
make("install")
+
+ def url_for_version(self, version):
+ return ("{0}/v{1}/xrootd-{1}.tar.gz".format(self.list_url, version))
| [Xrootd->[install->[join_path,append,working_dir,cmake,extend,make],depends_on,version]] | Install a node in the stage. | do you really need that? I think it should pick up urls just fine |
@@ -77,6 +77,7 @@ class AlarmTask(gevent.Greenlet):
def poll_for_new_block(self):
current_block = self.chain.block_number()
+ log.info('block', block=current_block)
if current_block > self.last_block_number + 1:
difference = current_block - self.last_block_number - 1
| [AlarmTask->[poll_for_new_block->[list,debug,error,append,callback,remove,block_number],register_callback->[callable,ValueError,append],_run->[time,list,debug,poll_for_new_block,wait,warning,block_number],remove_callback->[remove],stop_async->[set],__init__->[time,list,super,AsyncResult,Queue]],get_logger,object] | Poll for a new block. | Why add this logging message here? 6 lines below we aleady got a logging function for new blocks |
@@ -768,12 +768,13 @@ class CertificatePolicy(object):
key_size=self.key_size,
reuse_key=self.reuse_key,
curve=self.key_curve_name,
- )
+ ) # type: Optional[models.KeyProperties]
else:
key_properties = None
if sel... | [DeletedCertificate->[_from_deleted_certificate_item->[_from_certificate_item],_from_deleted_certificate_bundle->[_from_certificate_policy_bundle,_from_certificate_item]],CertificateOperationError->[_from_error_bundle->[_from_error_bundle]],CertificateIssuer->[_from_issuer_bundle->[_from_admin_detail,_from_issuer_item]... | Construct a version emulating the generated CertificatePolicy from a CertificatePolicy. This method returns a models. CertificatePolicy object that represents the certificate. | nit: I think the parenthesis after `self.content_type` should be on the next line -- did you try running `black` on this file? |
@@ -73,8 +73,12 @@ public class JAXBSerializer<T> implements VersionedSerializer<T> {
try {
final Marshaller marshaller = jaxbContext.createMarshaller();
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
- marshaller.marshal(t, out);
- } catch (JAXBExce... | [JAXBSerializer->[serialize->[IllegalArgumentException,write,allocate,marshal,setProperty,putInt,SerializationException,put,createMarshaller,array],readDataModelVersion->[get,getInt,read,wrap,SerializationException],deserialize->[IllegalArgumentException,readDataModelVersion,createUnmarshaller,unmarshal,SerializationEx... | Serializes the given object to the given output stream using the specified data model version. | This approach seems like it should work for most cases given that current `XmlRootElement` annotations that specify a `name` attribute follow this pattern. However, what do you think about making this specific to `VersionedProcessGroup`? So if this class is an instance of `VersionedProcessGroup`, then use this approach... |
@@ -206,7 +206,7 @@ def main():
continue
for device, dev_arg in device_args.items():
- print('Test case #{}/{}:'.format(test_case_index, device),
+ print('\nTest case #{}/{}:'.format(test_case_index, device),
... | [main->[option_to_args->[resolve_arg],collect_result,option_to_args,temp_dir_as_path,prepare_models,parse_args],parse_args->[parse_args],main] | Entry point for the missing - nag - sequence command. Check if a missing key is found in the model_info. Exit if there is no n - ary case in the device. | Why do you have that change? |
@@ -620,14 +620,14 @@ function polyfill(win) {
* using transpiled classes (which use ES5 construction idioms).
*
* @param {!Window} win
+ * @suppress {globalThis}
*/
function wrapHTMLElement(win) {
const {HTMLElement, Reflect, Object} = win;
/**
*/
function HTMLElementWrapper() {
- const ctor =... | [No CFG could be retrieved] | Creates a new custom element with a constructor that can be called from within a window. Create a subclass of MissingMissingObject. | @jridgewell LMK if this is OK |
@@ -317,7 +317,8 @@ public class BeamSortRel extends Sort implements BeamRelNode {
}
}
- fieldRet *= (orientation.get(i) ? -1 : 1);
+ fieldRet *= (orientation.get(i) ? 1 : -1);
+
if (fieldRet != 0) {
return fieldRet;
}
| [BeamSortRel->[copy->[BeamSortRel],LimitTransform->[expand->[getCount]]]] | Compares two rows. | nit: you should make this `final`. |
@@ -9,7 +9,7 @@ y = x
source = ColumnDataSource(data=dict(x=x, y=y))
-plot = Figure(plot_width=400, plot_height=400)
+plot = figure(plot_width=400, plot_height=400)
plot.line('x', 'y', source=source, line_width=3, line_alpha=0.6)
callback = CustomJS(args=dict(source=source), code="""
| [ColumnDataSource,Figure,show,output_file,dict,CustomJS,column,range,Slider,line] | Create a column with the power of the n - th element in the data. | noticed a couple of lingering uses of `Figure`, fixed these up in this PR |
@@ -451,8 +451,7 @@ class IntegrationFixture {
/** @const */
this.spec = spec;
if (this.spec.timeout === undefined) {
- this.spec.timeout =
- Math.max(window.ampTestRuntimeConfig.mochaTimeout, 5000);
+ this.spec.timeout = 15000;
}
if (this.spec.retryOnSaucelabs === undefined)... | [RealWinFixture->[setup->[installAmpAdStylesPromise,interceptEventListeners,AMP_TEST_IFRAME,attachFetchMock,onerror,onload,name,installRuntimeStylesPromise,testLocation,location,srcdoc,body,document,win,iframe,fakeRegisterElement,defineProperty,allowExternalResources,mockFetch,installCustomElements,resolve,ampCss,doNot... | A base class for all AMP test cases. | @lannka FYI increased default integration test timeout to 15s. |
@@ -49,7 +49,7 @@ from ..util.serialization import transform_series, transform_array
pd = import_optional('pandas')
rd = import_optional("dateutil.relativedelta")
-NP_EPOCH = np.datetime64('1970-01-01T00:00:00Z')
+NP_EPOCH = np.datetime64(0, 's')
NP_MS_DELTA = np.timedelta64(1, 'ms')
class BokehJSONEncoder(json... | [BokehJSONEncoder->[default->[transform_python_types]]] | A JSON encoder for objects that are passed to a Bokeh Documents or Sequences. nanoseconds to milliseconds. | Note that you probably want to set the appropriate time units here for the constant, though I think this gets cast properly in arithmetic. NumPy's default time resolution is `us`. |
@@ -33,7 +33,13 @@ func isGitFolder(path string) bool {
func isRepositoryFolder(path string) bool {
info, err := os.Stat(path)
- return err == nil && info.IsDir() && info.Name() == BookkeepingDir
+ if err == nil && info.IsDir() && info.Name() == BookkeepingDir {
+ // make sure it has a settings.json file in it
+ ... | [Join,Stat,IsDir,TrimSuffix,WalkUp,Name,Ext] | DetectPackage finds the closest package in the given path. IsDir - Check if the name of the missing file is expected. | Nit: Use a full sentence, capital M and end with a period. |
@@ -210,5 +210,15 @@ module Api
submission_rule
end
+ def grades_summary
+ assignment = Assignment.find(params[:id])
+ send_data assignment.summary_csv(@current_user),
+ type: 'text/csv',
+ filename: "#{assignment.short_identifier}_grades_summary.csv",
+ ... | [AssignmentsController->[create->[nil?,render,new,process_attributes,submission_rule,has_missing_params?,get_submission_rule,find_by_short_identifier,build_assignment_stat,save],show->[xml,nil?,render,respond_to,to_json,json,to_xml,find_by_id],process_attributes->[nil?,new,post?,each,delete],update->[nil?,render,attrib... | get_submission_rule - returns the submission rule with the given parameters. | Layout/EmptyLinesAroundClassBody: Extra empty line detected at class body end. |
@@ -1751,10 +1751,9 @@ namespace Dynamo.Models
public void AddToSelection(object parameters)
{
var selectable = parameters as ISelectable;
- if ((selectable != null) && !selectable.IsSelected)
+ if (selectable != null)
{
- if (!DynamoSelec... | [DynamoModel->[InitializeNodeLibrary->[InitializeIncludedNodes],ForceRun->[ResetEngine],Paste->[Paste,Copy],RemoveWorkspace->[Dispose],UngroupModel->[DeleteModelInternal],ResetEngine->[ResetEngine],ShutDown->[OnShutdownStarted,OnShutdownCompleted],DumpLibraryToXml->[DumpLibraryToXml],ResetEngineInternal->[RegisterCusto... | Adds selectable object to DynamoSelection. | Items inside a group has `IsSelected=true`, so they would not be added |
@@ -230,7 +230,7 @@ def _jit(sigs, locals, target, cache, targetoptions, **dispatcher_args):
return wrapper
-def generated_jit(function=None, target='cpu', cache=False,
+def generated_jit(function=None, cache=False,
pipeline_class=None, **options):
"""
This decorator allows flexibl... | [generated_jit->[_jit,wrapper],_jit->[wrapper->[jit]],jit_module->[jit],njit->[jit]] | A function decorator for generating a . | Whilst this is not strictly on the deprecation list, I suspect it also wasn't working/not in use anywhere. |
@@ -88,6 +88,10 @@ namespace Kratos
NodeType::Pointer pnode2 = rModelPart.CreateNewNode(2, 1.0, 0.0, 0.0);
NodeType::Pointer pnode3 = rModelPart.CreateNewNode(3, 2.0, 0.0, 0.0);
+ if (AdditionalNode) {
+ rModelPart.CreateNewNode(4, 3.0, 0.0, 0.0);
+ }
+
... | [inline->[,SetValue,CreateNewNode,Nodes,Fix,CreateNewMasterSlaveConstraint,GetProcessInfo,Initialize,AddDof,CreateNewProperties,Elements,AddElement,AddNodalSolutionStepVariable,InitializeSolutionStep],CreateModelPart->[size1,size2,rA,KRATOS_CHECK_LESS_EQUAL,ConditionNumberUtility,ExtendedTestBuilderAndSolverDisplacemen... | Basic test builder and displacement. Initialize elements and nodes - no - op if no node in the model has a node with. | rModelPart.CreateNewNode(5, 4.0, 0.0, 0.0); |
@@ -273,7 +273,7 @@ namespace System
/// Clears the contents of this span.
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public void Clear()
+ public unsafe void Clear()
{
if (RuntimeHelpers.IsReferenceOrContainsReferences<T>())
... | [No CFG could be retrieved] | Gets the current element of the enumerator. The length of the array in which the value is stored. | Why is unsafe required here? Are nint/nuint only allowed in unsafe contexts? |
@@ -385,12 +385,14 @@ namespace System.Reflection
for (int i = 0, offset = 0; i < genericArguments.Length; i++)
{
- if (!genericArguments[i].IsValueType)
+ Type t = Nullable.GetUnderlyingType(genericArguments[i]) ?? genericArguments[i];
+
+ ... | [NullabilityInfoContext->[CheckGenericParameters->[ParseNullableState],NullabilityInfo->[CheckNullabilityAttributes]]] | Get the nullability information for a given member. | Since there is actually a product issue, not just test issues, can you re-word the PR title please since it sounds like only test coverage is affected. |
@@ -1741,3 +1741,17 @@ func (c *ConfigLocal) SetDiskCacheMode(m DiskCacheMode) {
c.loadSyncedTlfsLocked()
}
}
+
+// SubscriptionManager implements the Config interface.
+func (c *ConfigLocal) SubscriptionManager() SubscriptionManager {
+ c.lock.Lock()
+ defer c.lock.Unlock()
+ return c.subscriptionManager
+}
+
+/... | [MakeDiskMDCacheIfNotExists->[resetDiskMDCacheLocked],EnableDiskLimiter->[MakeLogger],OfflineAvailabilityForPath->[IsSyncedTlfPath],IsSyncedTlf->[GetTlfSyncState],CheckStateOnShutdown->[MDServer],IsTestMode->[IsTestMode],Shutdown->[MakeLogger,BlockOps,DiskMDCache,MDServer,KBFSOps,KeyServer,KeybaseService,Crypto,BlockSe... | SetDiskCacheMode implements the Config interface for ConfigLocal. | This and below can both be `RLock()`. |
@@ -246,7 +246,7 @@ public class CardBrowserTest extends RobolectricTest {
Note n = addNoteUsingBasicModel("1", "back");
flagCardForNote(n, 1);
- long cardId = n.cards().get(0).getId();
+ long cardId = n.cids().get(0);
CardBrowser b = getBrowserWithNoNewCards();
Map... | [CardBrowserTest->[browserIsNotInitiallyInMultiSelectModeWithNoCards->[getBrowserWithNoNewCards,isInMultiSelectMode,is,assertThat],deleteCardAtPosition->[getCardIds,clearCardData,removeCardFromCollection],selectDefaultDeck->[select],selectAllIsVisibleWhenSelectingOne->[getBrowserWithMultipleNotes,selectOneOfManyCards,i... | Checks if the card flag is shown on the note. | Likely not worth it, but `firstCid()` could be optimised |
@@ -88,6 +88,8 @@ public class IsolatedClassLoaderFactory {
*/
public ArtifactClassLoaderHolder createArtifactClassLoader(List<String> extraBootPackages,
ArtifactsUrlClassification artifactsUrlClassification) {
+ JarInfo appJarInfo = getTestJarInfo... | [IsolatedClassLoaderFactory->[createLauncherArtifactClassLoader->[findResource->[findResource]]]] | Creates a new artifact class loader holder. create a new artifact class loader holder. | test vs app, can the naming be made consistent? |
@@ -25,7 +25,7 @@ func Register(plugins *admission.Plugins) {
}
type validateCustomResourceWithClient struct {
- admission.Interface
+ admission.ValidationInterface
infrastructureGetter configv1client.InfrastructuresGetter
}
| [ValidateInitialization->[ValidateInitialization]] | Register registers a plugin for the given object. InfrastructuresGetter returns the infrastructure getter. | I think we need both. |
@@ -42,7 +42,7 @@ public class CORSConfig {
* default: returns any requested header as valid
*/
@ConfigItem
- public Optional<List<String>> headers;
+ public Optional<String[]> headers;
/**
* HTTP headers exposed in CORS
| [No CFG could be retrieved] | Config property that describes the list of valid origins methods and headers. | These ones don't need to change, since they're being used as lists not arrays. |
@@ -1,6 +1,7 @@
package org.infinispan.commons.marshall;
import org.infinispan.commons.io.ByteBuffer;
+import org.infinispan.commons.io.ByteBufferImpl;
import java.io.IOException;
import java.io.InputStream;
| [AbstractDelegatingMarshaller->[startObjectOutput->[startObjectOutput],objectFromByteBuffer->[objectFromByteBuffer],objectToObjectStream->[objectToObjectStream],startObjectInput->[startObjectInput],stop->[stop],getBufferSizePredictor->[getBufferSizePredictor],objectFromObjectStream->[objectFromObjectStream],finishObjec... | This class is a delegator for marshalling a single object into a single object. Serialize an object to a byte array. | this can be removed and use only the interface |
@@ -79,6 +79,7 @@ class Phist(CMakePackage):
depends_on('cmake@3.8:', type='build')
depends_on('blas')
depends_on('lapack')
+ depends_on('python@3:', when='@1.7:')
depends_on('mpi', when='+mpi')
depends_on('trilinos+anasazi+belos+teuchos', when='+trilinos')
depends_on('trilinos@12:+tpet... | [Phist->[test_install->[working_dir,make],check->[working_dir,make],cmake_args->[],depends_on,version,on_package_attributes,variant,run_after]] | Create a configuration parameter that can be used to configure a single . Create a function to set the cmake arguments for the given n - tuple. | Do you know what it uses Python for? Is it `type='build'` or `type=('build', 'run')`? |
@@ -79,7 +79,7 @@ public class VisitorsBridge {
this.scanners = scannersBuilder.build();
this.executableScanners = scanners;
this.sonarComponents = sonarComponents;
- this.projectClasspath = projectClasspath;
+ this.classLoader = ClassLoaderBuilder.create(projectClasspath);
this.symbolicExecut... | [VisitorsBridge->[processRecognitionException->[processRecognitionException,visitFile]]] | Sets the Java version of the executable. | Why not directly using a `SquidClassLoader` for the type of the `classLoader` field? (And consequently directly cast the result of the method invocation to it) I know that it's using an implementation class rather than the interface, but our `ClassLoaderBuilder` only produces our own class loaders, and it would avoid t... |
@@ -21,3 +21,14 @@ export const APP_WILL_MOUNT = Symbol('APP_WILL_MOUNT');
* }
*/
export const APP_WILL_UNMOUNT = Symbol('APP_WILL_UNMOUNT');
+
+/**
+ * The type of this action sets the platform of user agent
+ * in order to decide to show the landing or not.
+ *
+ * {
+ * type: APP_SET_PLATFORM,
+ * pla... | [No CFG could be retrieved] | export APP_WILL_UNMOUNT. | Sort by alphabetical order. |
@@ -0,0 +1,15 @@
+# -*- coding: utf-8 -*-
+from ethereum.utils import denoms, int_to_big_endian
+
+INITIAL_PORT = 40001
+
+DEFAULT_REVEAL_TIMEOUT = 30
+DEFAULT_SETTLE_TIMEOUT = DEFAULT_REVEAL_TIMEOUT * 20
+DEFAULT_EVENTS_POLL_TIMEOUT = 0.5
+DEFAULT_POLL_TIMEOUT = 60
+DEFAULT_HEALTHCHECK_POLL_TIMEOUT = 1
+ESTIMATED_BLOC... | [No CFG could be retrieved] | No Summary Found. | Maybe rename this to `options` or `settings`? As they are variables we decide on and not constants on the mathematical sense it makes a bit more sense to me. Still not a hard requirement. Can stay as is. |
@@ -157,14 +157,14 @@ public class TypedSet
*/
private int getHashPositionOfElement(Block block, int position)
{
- int hashPosition = getMaskedHash(hashPosition(elementType, block, position));
+ int hashPosition = getMaskedHash(elementHashCodeOperator.hashCodeNullSafe(block, position));
... | [TypedSet->[getRetainedSizeInBytes->[getRetainedSizeInBytes],rehash->[size,getHashPositionOfElement]]] | Returns the hash position of the element at the given position in the given block. | @martint This is the stuff that changed |
@@ -113,6 +113,9 @@ public class MetricHolder
case FLOAT:
holder.floatType.writeToChannel(out);
break;
+ case LONG:
+ holder.longType.writeToChannel(out);
+ break;
case COMPLEX:
if (holder.complexType instanceof GenericIndexed) {
((GenericIndexed) h... | [MetricHolder->[writeToChannel->[writeToChannel],floatMetric->[MetricHolder],complexMetric->[MetricHolder],fromByteBuffer->[MetricHolder,fromByteBuffer],determineType]] | Serializes the given MetricHolder to the given channel. | I don't think this method is used at all. Let's just delete it. |
@@ -1812,6 +1812,7 @@ namespace Dynamo.ViewModels
private void CloseHomeWorkspace(object parameter)
{
+ //TODO potentially dispose viewModel here.
if (ClearHomeWorkspaceInternal())
{
// If after closing the HOME workspace, and there are no other ... | [DynamoViewModel->[CanZoomOut->[CanZoomOut],SaveAs->[SaveAs,AddToRecentFiles,Save],ExportToSTL->[ExportToSTL],ShowOpenDialogAndOpenResult->[Open,CanOpen],ShowSaveDialogIfNeededAndSave->[SaveAs],ImportLibrary->[ImportLibrary],ReportABug->[ReportABug],ClearLog->[ClearLog],Escape->[CancelActiveState],ShowSaveDialogIfNeede... | if the HOME workspace is closed and there are no other workspaces open then we should show the. | Lately I have been adding "// TODO, QNTM-XXXX:" instead of just "// TODO" so that there is a connection between the todo and why it was created. It also makes it searchable by number. I'm not sure this is really necessary (or a good thing, though it seems good to me, opinions requested). |
@@ -53,7 +53,7 @@ export const <%= entityReactName %>Detail = (props: I<%= entityReactName %>Detai
<Row>
<Col md="8">
<h2 data-cy="<%= entityInstance %>DetailsHeading">
- <Translate contentKey="<%= i18nKeyPrefix %>.detail.title"><%= entityClass %></Translate> [<strong>{<%= entityInstance %... | [No CFG could be retrieved] | The detail component is a component that exports a single unique identifier for a given entity. Field javadoc. | At angular I've removed the primary key value here and let it show in the fields by removing the id filter. |
@@ -31,6 +31,7 @@ module.exports =
, index
, ordered: x => x // a stub to keep assoc keys in order (in JS it does nothing, it's mostly for Python)
, unique: x => Array.from (index (x))
+ , arrayConcat: (a, b) => a.concat (b)
/* ............................................. */
| [No CFG could be retrieved] | Creates an object that can be used to store a list of unique keys in a given object --------------------- --------------------- --------------------- --------------------- --------------------- ---------------------. | I think we need to keep `arrayConcat`, since it's used in too many exchanges ) |
@@ -861,9 +861,9 @@ namespace System.Security.Principal
{
Debug.Assert(!_safeTokenHandle.IsInvalid && !_safeTokenHandle.IsClosed, "!m_safeTokenHandle.IsInvalid && !m_safeTokenHandle.IsClosed");
- using (SafeLocalAllocHandle information = GetTokenInformation(_safeTokenHandle, tokenInfo... | [WindowsIdentity->[SafeAccessTokenHandle->[GetHRForWin32Error],SafeLocalAllocHandle->[Dispose],RunImpersonatedAsync->[RunImpersonated],Dispose->[Dispose],Task->[RunImpersonated],CheckNtTokenForSid]] | Get the token information of the given type. | Same as earlier, for all such cases. |
@@ -113,8 +113,8 @@ func (s *Server) isSameLeader(leader *pdpb.Leader) bool {
func (s *Server) marshalLeader() string {
leader := &pdpb.Leader{
- Addr: proto.String(s.GetAddr()),
- Pid: proto.Int64(int64(os.Getpid())),
+ Addr: s.GetAddr(),
+ Pid: int64(os.Getpid()),
}
data, err := proto.Marshal(leader)... | [leaderCmp->[getLeaderPath],campaignLeader->[enableLeader,getLeaderPath],watchLeader->[getLeaderPath],GetLeader->[getLeaderPath],resignLeader->[getLeaderPath]] | marshalLeader marshals the leader into a string. | You can use leader.Marshal() instead of proto.Marshal(). So as proto.Unmarshal(). |
@@ -140,10 +140,11 @@ class SubmissionEditForm(MyModelForm):
# ensure they're preserved across the edit.
instance = kwargs.get('instance', None)
if instance:
- if instance.challenge_closed():
- for fieldname in ('demo_package', 'challenge_tags'):
- ... | [SubmissionEditForm->[save->[save_m2m->[get,set_ns,super_save_m2m,getattr],save_m2m,super,hasattr],clean->[error_class,super,validate_demo_zipfile],__init__->[all_ns,get,pop,super,unicode,challenge_closed],x,ChoiceField,parse_tags,MultipleChoiceField,values],MyModelForm->[as_ul->[_html_output]],SubmissionNewForm->[__in... | Initialize the object with a object. | Nitpick: This is a pretty long line; might be nice to break up the list comprehension to a 2nd line |
@@ -127,6 +127,9 @@ private:
uint8_t m_term_data;
uint16_t m_serial_status;
uint16_t m_serial_status2;
+ std::queue<uint8_t> kbd_queue;
+ std::queue<uint16_t> serial_status_queue;
+ bool serial_input;
// End registers
address_space *m_mem;
| [No CFG could be retrieved] | region Private methods t smioc_dma_r_length smioc_dma_. | Are you thinking about how you'll support save states? Variable-length structures like an unbounded queue aren't conducive to this. Do you have any clues as to what the actual queue depth is on the hardware and what it does on overrun? |
@@ -567,10 +567,7 @@ class _BaseSourceEstimate(ToDataFrameMixin, TimeMixin):
Window to use in resampling. See scipy.signal.resample.
n_jobs : int
Number of jobs to run in parallel.
- verbose : bool, str, int, or None
- If not None, override default verbose level (see... | [SourceEstimate->[center_of_mass->[_center_of_mass,sum],save->[_write_stc,_write_w],extract_label_time_course->[extract_label_time_course]],_make_stc->[_get_src_type],VectorSourceEstimate->[normal->[SourceEstimate],magnitude->[SourceEstimate]],_BaseSourceEstimate->[__imul__->[_verify_source_estimate_compat,_remove_kern... | Resample the data to a new window using a resampling window. | ` Defaults to self.verbose` will be used in (almost?) all methods of our classes, so I made an entry for it. |
@@ -25,6 +25,7 @@ class SearchController < ApplicationController
sort_by
tag_names
user_id
+ class_name
].freeze
def tags
| [SearchController->[tags->[search_documents,render],chat_channels->[search_documents,id,render,to_h],sanitize_params->[delete_if,blank?],chat_channel_params->[permit],format_integer_params->[present?,to_i],classified_listing_params->[permit],feed_params->[permit],classified_listings->[search_documents,render,to_h],user... | Returns all tags with a given name that are not supported by the current user. | Need to permit this for searching |
@@ -32,13 +32,12 @@ import java.util.Optional;
*/
public abstract class AbstractInputStreamBuffer extends AbstractStreamingBuffer implements InputStreamBuffer {
- private final ByteBufferManager bufferManager;
+ protected final ByteBufferManager bufferManager;
private InputStream stream;
private Readable... | [AbstractInputStreamBuffer->[deallocate->[deallocate],reloadBuffer->[consumeForwardData],get->[get],doGet->[get,doGet,getFromCurrentData],getFromCurrentData->[getBackwardsData]]] | Abstract input stream buffer. Buffer is a buffer of bytes so we can use it to fill the buffer with the bytes. | Why not keep private with getter? |
@@ -92,12 +92,16 @@ export function getWinOrigin(win) {
* testing by freezing the object.
* @param {string} url
* @param {boolean=} opt_nocache
+ * Cache is altogether ignored on ESM builds, since an <a> is not used.
* @return {!Location}
*/
export function parseUrlDeprecated(url, opt_nocache) {
if (!a)... | [No CFG could be retrieved] | Returns the correct origin for a given URL. Parses a URL into a location object. | The old proposed code is actually better here. We don't need to worry about `a` having a different base HREF here, since both `a` and `URL` originate from the same window context (this current one). |
@@ -35,8 +35,6 @@ describes.realWin('amp-ad-ui handler', {
uiHandler = new AmpAdUIHandler(adImpl);
uiHandler.setDisplayState(AdDisplayState.LOADING);
// Always set to true since this is in PROD.
- // TODO: clean once experiment flag gets removed.
- toggleExperiment(window, UX_EXPERIMENT, true);
... | [No CFG could be retrieved] | Package that contains a single and its children. should toggle fallback when collapse fail. | nit: you can delete this line as well |
@@ -94,7 +94,7 @@ public class RegexTest implements Serializable {
public void testMatches() {
PCollection<String> output =
- p.apply(Create.of("a", "x", "y", "z")).apply(Regex.matches("[xyz]"));
+ p.apply(Create.of("a", "x", "y", "z")).apply(Regex.matches("[xyz]"));
PAssert.that(outp... | [RegexTest->[testKVMatchesNone->[matchesKV,empty,apply,run],testKVMatches->[of,apply,matchesKV,run,containsInAnyOrder],testSplitsWithEmpty->[split,apply,run,containsInAnyOrder],testReplaceAll->[replaceAll,apply,run,containsInAnyOrder],testMatchesGroup->[matches,apply,run,containsInAnyOrder],testFind->[find,apply,run,co... | Test if a missing tag matches a missing tag. | Formatting here actually. Use `google-java-format` if you can. |
@@ -109,7 +109,7 @@ void AddCustomStrategiesToPython(pybind11::module& m)
// Prebuckling Strategy
py::class_< PrebucklingStrategyType, typename PrebucklingStrategyType::Pointer,BaseSolvingStrategyType >(m,"PrebucklingStrategy")
- .def(py::init<ModelPart&, BaseSchemeType::Pointer, BuilderAndSolverPoi... | [AddCustomStrategiesToPython->[BaseSchemeType>,>,Pointer,ConvergenceCriteriaType>]] | Add custom strategies to Python. Custom types for the kim scheme. Magic base class for all types of types. - - - - - - - - - - - - - - - - - -. | Please, instead of overloaded constructors use Parameters as input |
@@ -288,6 +288,10 @@ class WrappedFunction(function.ConcreteFunction):
operation_fetches + tensor_fetches,
pruned_graph,
sources=flat_feeds + internal_captures)
+
+ # Note that we deliberately add the component tensors of any SparseTensors
+ # to the returned function's outputs list; th... | [VariableHolder->[call_with_variable_creator_scope->[wrapped->[variable_creator_scope]]],_lift_unlifted_variables->[_lift_single_variable,_should_lift_variable],function_from_graph_def->[prune,wrap_function],WrappedGraph->[_wrap_function->[_filter_returned_ops,prune,call_with_variable_creator_scope],__init__->[WrappedF... | Removes a subgraph of the function s underlying graph that contains all of the given feeds and fetches The function to prune. A function that creates a that can be used to create a single node in the graph. | Change "SparseTensors" to "composite tensors" here, since it applies to all composite tensors. |
@@ -164,6 +164,7 @@ namespace System.Net.Quic.Implementations.Mock
if (endStream)
{
streamBuffer.EndWrite();
+ WritesCompletedTcs.TrySetResult();
}
}
| [No CFG could be retrieved] | Override ValueTask. This method is asynchronous and may block. This is a override of FlushAsync that calls Abort on the Task that is already in the. | Should this also be called in `Shutdown`? Or maybe we should be calling `Shutdown` here in case of `endStream`, but that's not the goal of this PR. |
@@ -136,14 +136,6 @@ class WikiTablesSemanticParser(Model):
self._question_entity_params = None
self._question_neighbor_params = None
- self._decoder_step = WikiTablesDecoderStep(encoder_output_dim=self._encoder.get_output_dim(),
- act... | [WikiTablesSemanticParser->[_get_neighbor_indices->[append,len,pad_sequence_to_length,Variable,enumerate],_get_linking_probabilities->[softmax,new,size,append,linking_scores,cat,len,stack,Variable,enumerate,range,unsqueeze],_action_history_match->[new,max,size,min,len,eq],_get_type_vector->[new,append,startswith,pad_se... | Initialize a new SemanticParser with a sequence embedding. Creates a layer that implements the entity word average embedding. Missing missing rule. | I think you can just remove this method entirely. It's already abstract. |
@@ -992,6 +992,12 @@ const adConfig = jsonConfiguration({
renderStartImplemented: true,
},
+ 'ssp': {
+ prefetch: 'https://ssp.imedia.cz/static/js/ssp.js',
+ renderStartImplemented: true,
+ consentHandlingOverride: true,
+ },
+
'strossle': {
preconnect: [
'https://amp.spklw.com',
| [No CFG could be retrieved] | Provides a mapping of all possible urls to the page that is used by the view. Provides a list of urls to embed a single object with the necessary features. | Nit: these configs are sorted in alphabetical order. Pls move it to match the file. |
@@ -1,7 +1,9 @@
<% flash.to_hash.slice(*ApplicationController::FLASH_KEYS).each do |type, message| %>
<% if message.present? %>
- <div class='alert <%= "alert-#{type}" %>' role='alert'>
- <%= safe_join([message.html_safe]) %>
- </div>
+ <%= render 'shared/alert', {
+ type: type,
+ message: s... | [No CFG could be retrieved] | Renders flash messages into alert elements. | the safe_join on a manually HTML-safe'd string is confusing to me....? Do we store `<p>` tag or something inside our messages? |
@@ -321,6 +321,10 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
ResourceManager resourceManager;
@Inject
private AnnotationDao annotationDao;
+ @Inject
+ Ipv6Service _ipv6Service;
+ @Inject
+ DataCenterIpv6AddressDao _ipv6AddressDao;
List<NetworkGu... | [NetworkOrchestrator->[reallocate->[doInTransactionWithoutResult->[cleanupNics,allocate]],unmanageNics->[removeNic],prepare->[implementNetwork],setupNetwork->[doInTransactionWithoutResult->[updateRouterIpInNetworkDetails],setupNetwork],removeNic->[release,releaseNic,removeNic],isNtwConfiguredInCluster->[createNicTOFrom... | Returns the list of network gurus. | Is the prefix `_` needed? |
@@ -112,6 +112,9 @@ func (je *journeyEnricher) enrichSynthEvent(event *beat.Event, se *SynthEvent) e
}
switch se.Type {
+ case "cmd/status":
+ je.journeyComplete = false
+ return je.createSummary(event)
case "journey/end":
je.journeyComplete = true
return je.createSummary(event)
| [enrichSynthEvent->[MergeEventFields,SetID,GetValue,SetEventDataset,createSummary,ToMap,Put],enrich->[enrich,MergeEventFields,enrichSynthEvent,Timestamp,Now,IsZero],createSummary->[Sub,Errorf,MergeEventFields],NewV1,String,Errorf] | enrichSynthEvent adds the synth event to the event object. | We should guard this summary creation event. If the user has afterAll hook that throws error, we would have both `journey/end` followed by `cmd/status`. |
@@ -213,7 +213,7 @@ xyze_float_t Planner::previous_speed;
float Planner::previous_nominal_speed_sqr;
#if ENABLED(DISABLE_INACTIVE_EXTRUDER)
- last_move_t Planner::g_uc_extruder_last_move[EXTRUDERS] = { 0 };
+ last_move_t Planner::g_uc_extruder_last_move[E_STEPPERS] = { 0 };
#endif
#ifdef XY_FREQUENCY_LIMIT
| [No CFG could be retrieved] | Creates a new object from a list of variables. The main entry point for the planner. | This feature might need a refresh. The `SWITCHING_EXTRUDER` is now able to use up to 3 motors, with each motor pertaining to 2 extruder indexes. But I don't think the use of the `g_uc_extruder_last_move` array is correct for `SWITCHING_EXTRUDER`, particularly with the `ENABLE_ONE_E` macro below. For the case of a switc... |
@@ -145,7 +145,7 @@ define([
var viewportHeight = context.getCanvas().clientHeight;
if (viewportHeight !== this._viewportHeight) {
this._viewportHeight = viewportHeight;
- this._quad.setRectangle(new BoundingRectangle(this._rectangle.x, viewportHeight - canvasHeight - this._rec... | [No CFG could be retrieved] | Draws a line of the performance display. Creates a line that will draw a single object if the object is not already drawn. | You could create a single instance of BoundingRectangle owned by the PerformanceDisplay, pass that to ViewportQuad, and just update the x/y/w/h values instead of creating new instances. Sorry for complicating your simple bugfix pull request. |
@@ -547,7 +547,7 @@ class Jetpack_Color {
* @param Jetpack_Color $color Another color
* @return float
*/
- public function getDistanceLuminosityFrom(Jetpack_Color $color) {
+ public function getDistanceLuminosityFrom( Jetpack_Color $color) {
$L1 = $this->toLuminosity();
$L2 = $color->toLuminosity();
... | [Jetpack_Color->[toHsl->[toRgbInt],getDistanceLuminosityFrom->[toLuminosity],incrementLightness->[toHsl,fromHsl],toHsvInt->[toRgbInt],toLabCie->[toXyz],getMaxContrastColor->[fromHex,toLuminosity],getDistanceLabFrom->[toLabCie],incrementHue->[toHsl,fromHsl],toLuminosity->[toRgbInt],toCSS->[toHsl,toRgbInt],getReadableCon... | Get distance luminosity from another color. | Needs space towards right. |
@@ -68,7 +68,7 @@ namespace Dynamo.Wpf.Views
};
var wordList = engineController.CodeCompletionServices.GetClasses();
- String regex = String.Format(@"\b({0})({0})?\b", String.Join("|", wordList));
+ String regex = String.Format(@"\b({0})\b", String.Join("|", wordList));... | [CodeHighlightingRuleFactory->[CustomizedBrush->[ToString->[ToString]]]] | Create a class highlight rule. | Where do you think this was used before? |
@@ -62,7 +62,7 @@ public class SegmentNukeAction implements TaskAction<Void>
@Override
public Void perform(Task task, TaskActionToolbox toolbox) throws IOException
{
- toolbox.verifyTaskLocks(task, segments);
+ TaskActionPreconditions.checkTaskLocks(task, toolbox.getTaskLockbox(), segments);
toolbox... | [SegmentNukeAction->[perform->[setDimension,build,emit,getType,deleteSegments,toString,verifyTaskLocks,getSize],copyOf]] | Deletes all segments in the task. | Does the segment delete need upgraded locks? |
@@ -342,11 +342,11 @@ func TestValidationCreatePolicy_Actions(t *testing.T) {
classes := map[bool][]string{
true: {
"*",
- "infra:ingestNodeRuns:create",
+ "ingest:camelCaseThings:create",
"no:camels:here",
"*:mark-for-deletion", // legacy
"infra:*:create",
- "infra:ingestNodeRuns:*",
+ "in... | [Join,Error,Marshal,Sprintf,Validate,Must,AssertCompiledInUpToDate,NewV4,NoError,String,Log,Run] | TestValidationCreatePolicy_Actions tests that create policy actions are valid. TestValidationCreatePolicy_Resources tests that the create policy is valid. | the "realness" of the action wasn't important here-- these tests are for validation of format. |
@@ -51,6 +51,7 @@ module GobiertoAdmin
assert has_field?("gobierto_budgets_options_receipt_configuration", with: "{}")
refute find("#gobierto_budgets_options_comparison_tool_enabled", visible: false).checked?
refute find("#gobierto_budgets_options_comparison_context_table_en... | [OptionsTest->[test_update_annual_budgets_data->[visit,with_signed_in_admin,has_message?,click_link,assert,with_current_site,with_stubbed_s3_upload!],test_enable_options->[visit,fill_in,trigger,with_signed_in_admin,has_content?,has_message?,click_button,with_javascript,refute,assert,with_current_site,checked?,has_field... | This test checks if the user has the necessary checkboxes and if they are enabled. Find all budget options that have been enabled. | Prefer single-quoted strings when you don't need string interpolation or special symbols.<br>Line is too long. [98/80] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.