patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -47,7 +47,8 @@ class CartQueryset(models.QuerySet):
return self.filter(status=CartStatus.CANCELED)
def save(self):
- self.update(status=CartStatus.SAVED)
+ self.exclude(status=CartStatus.SAVED).update(status=CartStatus.SAVED,
+ last_st... | [ProductGroup->[is_shipping_required->[is_shipping_required]],CartLine->[get_price_per_item->[get_price_per_item],is_shipping_required->[is_shipping_required]],Cart->[is_shipping_required->[is_shipping_required],change_user->[save,change_status],partition->[partition,is_shipping_required],update_quantity->[save],add->[... | Save all items in the cart. | What does this do? When is it used? |
@@ -20,10 +20,12 @@ class Trinity(MakefilePackage):
"""
homepage = "http://trinityrnaseq.github.io/"
- url = "https://github.com/trinityrnaseq/trinityrnaseq/archive/Trinity-v2.6.6.tar.gz"
+ url = "https://github.com/trinityrnaseq/trinityrnaseq/releases/download/v2.12.0/trinityrnaseq-v2.12.0.... | [Trinity->[build->[make],setup_run_environment->[prepend_path,set],install->[join_path,force_remove,install_tree,remove_linked_tree],setup_build_environment->[append_flags],depends_on,version]] | Create a single object from RNA - seq data. This function is used to check if the system has the required errors. | This change breaks the `2.6.6` build. |
@@ -852,8 +852,9 @@ func FetchBalance(address common.Address) []*AccountState {
}(rpcServerID)
}
wgShard.Wait()
-
- result[shardID] = &AccountState{balance, nonce}
+ if balance.Cmp(big.NewInt(-1)) > 0 {
+ result[shardID] = &AccountState{balance, nonce}
+ }
}(shardID)
}
wg.Wait()
| [ConstructTransactionListMessageAccount,Find,SerializeToHexStr,Info,RunServices,Done,ReadFile,New,Export,Accounts,Bytes,Bool,TerminalFormat,GetFreeToken,GenKeyP2P,Seed,Println,Parsed,GetPublicKey,GetHost,OpenFile,NewClientGroupIDByShardID,GenBlsKeyWithPassPhrase,Mul,LoadBlsKeyWithPassPhrase,Now,Close,IsEqual,Exit,Add,N... | GetFreeToken requests for free token on each shard. GetFreeToken gets a free token from the server and returns it. | what would we do with else condition? |
@@ -34,6 +34,8 @@ import org.nuxeo.common.xmap.annotation.XObject;
*/
@XObject(value = "elasticSearchIndex")
public class ElasticSearchIndexConfig {
+ final public static String DEFAULT_SETTING_FILE = "default-doc-settings.json";
+ final public static String DEFAULT_MAPPING_FILE = "default-doc-mapping.json";
... | [ElasticSearchIndexConfig->[isDocumentIndex->[getType]]] | Returns a string representation of the missing configuration. | Canonical modifiers order is `public static final`. |
@@ -161,8 +161,12 @@ module T::Types
end
def ==(other)
- (T::Utils.resolve_alias(other).class == T::Utils.resolve_alias(self).class) &&
+ case other
+ when T::Types::Base
other.name == self.name
+ else
+ false
+ end
end
alias_method :eql?, :==
| [Base->[hash->[hash],validate!->[error_message_for_obj],error_message->[describe_obj,name],error_message_for_obj->[valid?],error_message_for_obj_recursive->[recursively_valid?],subtype_of?->[subtype_of?,subtype_of_single?],name]] | returns true if self is the same as other. | This change preserves equality between `T::Types::Union` and `T::Private::Types::SimplePairUnion` when they're equivalent (which can basically only happen if the former is explicitly constructed, circumventing `T.any`). It's slightly wider-radius than needed - we could just do this on `T::Types::Union` - but this is a ... |
@@ -128,6 +128,11 @@ class DBStructure {
}
if (DBM::is_result($structures)) {
foreach ($structures AS $field) {
+ // Replace the default size values so that we don't have to define them
+ $search = ['tinyint(1)', 'tinyint(4)', 'smallint(6)', 'mediumint(9)', 'bigint(20)', 'int(11)'];
+ $replace = ['bo... | [No CFG could be retrieved] | Get the structure of a table. This function is used to build the object that will be used to populate the index data. | What if the current field is `int(10) unsigned` like it is in the `challenge` table right now? Will it be changed automatically even if it isn't in the replacement list? |
@@ -234,7 +234,7 @@ int xCreate(sqlite3* db,
} else if (column.at("id") == "attributes") {
// Store the attributes locally so they may be passed to the SQL object.
pVtab->content->attributes =
- (TableAttributes)AS_LITERAL(INTEGER_LITERAL, column.at("attributes"));
+ (TableAttribute... | [No CFG could be retrieved] | Creates a table column in the table. Get the cursor for a column. | Same problem with exceptions from `std::stol`. |
@@ -189,6 +189,7 @@ export function AccordionSection({
const expanded = isExpanded ? isExpanded(id, defaultExpanded) : expandedState;
const animate = contextAnimate ?? defaultAnimate;
+ const contentId = `${prefix || 'a'}_AMP_content_${id}-${suffix}`;
useLayoutEffect(() => {
const hasMounted = hasMou... | [No CFG could be retrieved] | Effect that renders the . | No need for "AMP" here and let's turn underscores to dashes and use lower case. |
@@ -69,6 +69,10 @@ class ProfileTest(unittest.TestCase):
def profile_update_and_get_test(self):
client = TestClient()
client.run("profile new ./MyProfile --detect")
+ if "WARNING: GCC OLD ABI COMPATIBILITY" in client.out:
+ self.assertIn("edit the MyProfile profile at", client.o... | [ProfileTest->[profile_new_test->[assertTrue,TestClient,assertEqual,assertIn,join,run,exists,assertNotIn,load],list_test->[list,system,symlink,sort,append,TestClient,assertEqual,str,join,mkdir,run,create_profile],profile_update_and_get_test->[TestClient,assertEqual,assertIn,join,run,assertNotIn,load],show_test->[TestCl... | Update and get test profiles. Remove a key in the user s profile. | This is still wrong, because the profile is not under the ``profiles`` subfolder, but in a completely different folder (the current one of the user cwd) |
@@ -17,7 +17,7 @@
const FINAL_URL_RE = /^(data|https)\:/i;
const DEG_TO_RAD = (2 * Math.PI) / 360;
const GRAD_TO_RAD = Math.PI / 200;
-const VAR_CSS_RE = /(calc|min|max|clamp|var|url|rand|index|width|height|num|length)\(/i;
+const VAR_CSS_RE = /(calc|min|max|clamp|var|url|rand|index|width|height|num|length|([^a-z]|^... | [No CFG could be retrieved] | Checks if a CSS expression contains variable components. Exports a class that exports a number of sizing nodes. | Hmm. x/y are pretty right here :) Are there any 0x/0y forms/units? Also can look at `\b` and `\w`? |
@@ -305,7 +305,7 @@ def _dtype_to_fieldtype(dtype):
elif dtype.kind == 'S':
return bytes
else:
- raise TypeError("Unsupported dtype in proxy: '%s'" % dtype)
+ return Any
@typehints.with_input_types(Union[pd.DataFrame, pd.Series])
| [UnbatchPandas->[expand->[_unbatch_transform]],_BaseDataframeUnbatchDoFn->[process->[make_null_checking_generator,_get_series]],_unbatch_transform->[element_type_from_dataframe]] | Convert a dtype to a . | Note the execution time unbatching code "just works" because it always iterates over the Series' values. The only thing blocking this was finding an appropriate type mapping. |
@@ -1444,6 +1444,17 @@ class Program(object):
self._endpoints = []
self._trainers_endpoints = []
self._distributed_lookup_table = None
+ self._is_optimized = False
+
+ @property
+ def is_optimized(self):
+ # if the program is optimized, operator input/outputs
+ # ma... | [NameScope->[child->[NameScope]],OpProtoHolder->[__init__->[get_all_op_protos]],_full_name_scope->[parent,name],dtype_is_floating->[convert_np_dtype_to_dtype_],get_all_op_protos->[get_all_op_protos],Operator->[attr_type->[attr_type],to_string->[_debug_string_],_block_attr->[_block_attr_id],output->[output],_rename_inpu... | Initialize the object with a base base object. | make these private? I assume they will be removed after pass migration? |
@@ -527,6 +527,10 @@ collisionMoveResult collisionMoveSimple(Environment *env, IGameDef *gamedef,
is_collision = false;
CollisionInfo info;
+ if (is_collision) {
+ info.new_pos = *pos_f/10;
+ }
+
if (nearest_info.isObject())
info.type = COLLISION_OBJECT;
else
| [No CFG could be retrieved] | Add the direction of the edge to the edge and update the bouncy - direction of The nearest node is the node that is closest to the object that is closest to the object. | should be `*pos_f / BS` this can also be moved into the `if (is_collision)` on line 569 |
@@ -587,13 +587,13 @@ public class FlinkBroadcastStateInternals<K> implements StateInternals<K> {
private final StateNamespace namespace;
private final StateTag<? super K, CombiningState<InputT, AccumT, OutputT>> address;
- private final Combine.KeyedCombineFn<? super K, InputT, AccumT, OutputT> combineF... | [FlinkBroadcastStateInternals->[FlinkCombiningState->[equals->[equals],clear->[clearInternal],mergeAccumulators->[mergeAccumulators],hashCode->[hashCode],getAccum->[readInternal],addAccum->[readInternal,writeInternal],add->[readInternal,writeInternal],isEmpty->[read->[readInternal]],read->[readInternal]],state->[state]... | A helper method to clear the internal state of the object. Adds an input to the state. | Ditto here FWIW. Leaving runner-specific constructs in place. |
@@ -48,6 +48,13 @@ const CHILD_STYLE = {
position: 'relative',
};
+const SECTION_HEADER_STYLE = {
+ cursor: 'pointer',
+ backgroundColor: '#efefef',
+ paddingRight: '20px',
+ border: 'solid 1px #dfdfdf',
+};
+
/**
* @param {!AccordionDef.Props} props
* @return {PreactDef.Renderable}
| [No CFG could be retrieved] | Creates a viewable object that exports a single - section . Register a callback to expand the map if it has a key with a value that is true. | Cursor pointer is ok here. But we can't put any of the rest into the inline style - this would make them un-overridable in stylesheets. Let's remove these styles for now. If the wg decides we want these styles here, we will have to bring JSS back. But for now it's easier to not have it, imho. |
@@ -516,10 +516,12 @@ int tls13_change_cipher_state(SSL *s, int which)
const EVP_MD *md = NULL;
const EVP_CIPHER *cipher = NULL;
#if !defined(OPENSSL_NO_KTLS) && defined(OPENSSL_KTLS_TLS13)
-# ifndef __FreeBSD__
+# ifdef __FreeBSD__
+ struct tls_enable crypto_info;
+# else
struct tls_crypto_info_all ... | [No CFG could be retrieved] | end of function ssl_create_encrypt_hmac Encrypts and writes the read and write IV. | We seem to have done this in several places already - and here is another instance. Perhaps it would be better to introduce our own typedef for this - the definition of which can have the `__FreeBSD__` guards around it - and then from then on we just use that typedef without having to special case FreeBSD everywhere. |
@@ -246,6 +246,17 @@ void AutoHideButtonBar::addButton(touch_gui_button_id button_id,
m_buttons.push_back(btn);
}
+void AutoHideButtonBar::addToggleButton(touch_gui_button_id button_id,
+ const wchar_t* caption, const char* btn_image_1,
+ const char* btn_image_2)
+{
+ addButton(button_id, caption, btn_image_1);
... | [isReleaseButton->[],show->[,Toggle],deactivate->[],translateEvent->[deactivate,getGuiButtonSize,handleButtonEvent,isButton,handleReleaseEvent,getButtonID,isHUDButton],step->[applyJoystickStatus,step],Toggle->[handleReleaseEvent,show,hide],initButton->[addButton],init->[getGuiButtonSize,initButton,init,initJoystickButt... | Adds a button to the button bar. button bar. This method is called when the user clicks on the button. | Please correct all pointer placements: `type *var` |
@@ -136,7 +136,7 @@ func (d *Dispatcher) checkExistence(conf *config.VirtualContainerHostConfigSpec,
verr = errors.Errorf("Found virtual machine %q, but it is not a VCH. Please choose a different virtual app.", conf.Name)
return verr
}
- err = errors.Errorf("Virtual app %q already exists. Please delete it befor... | [createAppliance->[createApplianceSpec,setDockerPort],CheckServiceReady->[CheckDockerAPI,ensureApplianceInitializes],createApplianceSpec->[addIDEController,addNetworkDevices,addParaVirtualSCSIController],ensureApplianceInitializes->[waitForKey,applianceConfiguration],reconfigureApplianceSpec->[encodeConfig,configIso,co... | checkExistence checks if a virtual machine exists in the system. This function will attempt to power off the existing appliance and then delete all files in the Reference to a managed object. | This also references a vapp... but I have not changed that since it was not in scope of this ticket. |
@@ -530,7 +530,7 @@ export class MultidocManager {
* Sets the document's visibility state.
* @param {!VisibilityState} state
*/
- amp.setVisibilityState = function(state) {
+ amp['setVisibilityState'] = function(state) {
setViewerVisibilityState(viewer, state);
};
| [No CFG could be retrieved] | Attaches a new object to the shadow document. Callback for message delivery. | @choumx can these be extern'd instead? i'm not sure what shadowRoot.AMP is. is it the same as the top layer AMP global? |
@@ -224,7 +224,7 @@ func (r *ReplicaChecker) checkBestReplacement(region *core.RegionInfo) *Operator
}
// Make sure the new peer is better than the old peer.
if newScore <= oldScore {
- log.Debugf("[region %d] newScore %f is not better than oldScore %f", region.GetID(), newScore, oldScore)
+ log.L().Debug("no b... | [fixPeer->[SelectBestReplacementStore],checkBestReplacement->[selectWorstPeer,SelectBestReplacementStore]] | checkBestReplacement checks if the region is best replacement for a peer. If it is it. | Inconsistent naming style (space separated instead of kebab) |
@@ -1223,6 +1223,10 @@ func getRegionStatKind(rwTy rwType, dim int) statistics.RegionStatKind {
return statistics.RegionWriteBytes
case rwTy == write && dim == statistics.KeyDim:
return statistics.RegionWriteKeys
+ case rwTy == write && dim == statistics.QueryDim:
+ return statistics.RegionWriteQuery
+ case rw... | [filterDstStores->[GetName],solve->[addPendingInfluence,isValid],getRegion->[isRegionAvailable],Schedule->[GetName],addPendingInfluence->[GetName],balanceHotReadRegions->[GetName],buildOperators->[isReadyToBuild,allowBalanceLeader,GetName],ServeHTTP->[ServeHTTP],allowBalance->[allowBalanceRegion,allowBalanceLeader],all... | returns 0 if the region write bytes or region write keys. | How about using two switch? |
@@ -27,6 +27,8 @@ namespace Content.Client.UserInterface
private readonly HumanoidProfileEditor _humanoidProfileEditor;
private readonly IClientPreferencesManager _preferencesManager;
public readonly Button CloseButton;
+ public readonly Button SaveButton;
+ public readonly Labe... | [CharacterSetupGui->[UpdateUI->[UpdateUI],CharacterPickerButton->[Dispose->[Dispose]],Dispose->[Dispose],Save->[Save]]] | CharacterSetupGui - A class to setup a character UI. Creates a VBoxContainer and a Button to close a dialog. | Is this needed? |
@@ -151,7 +151,10 @@ def try_new_route(state):
def handle_block(state, state_change):
- state.block_number = state_change.block_number
+ state.block_number = max(
+ state.block_number,
+ state_change.block_number,
+ )
iteration = TransitionResult(state, list())
return iteration
| [handle_cancelroute->[cancel_current_route],handle_secretrequest->[cancel_current_route],state_transition->[handle_cancelroute,handle_secretrequest,try_new_route,handle_canceltransfer,handle_routechange,handle_block,handle_secretreveal,handle_transferrefund],handle_canceltransfer->[user_cancel_transfer],handle_transfer... | Handle a single block. | this means that blocks "older" than the current `state`s block number noop, right? would this here be the place to record a chain reorg? |
@@ -1792,7 +1792,7 @@ class WindowInto(ParDo):
accumulation_mode = kwargs.pop('accumulation_mode', None)
timestamp_combiner = kwargs.pop('timestamp_combiner', None)
if kwargs:
- raise ValueError('Unexpected keyword arguments: %s' % kwargs.keys())
+ raise ValueError('Unexpected keyword arguments... | [Map->[_fn_takes_side_inputs,FlatMap],CombineValuesDoFn->[process->[merge_accumulators,create_accumulator,add_inputs,extract_output,apply]],Impulse->[get_windowing->[Windowing],from_runner_api_parameter->[Impulse]],Flatten->[get_windowing->[Windowing],from_runner_api_parameter->[Flatten]],CombineValues->[to_runner_api_... | Initializes a WindowInto transform object. | Just `list(kwargs)` will work too. |
@@ -129,13 +129,10 @@ class BiattentiveClassificationNetwork(Model):
if len(self._elmo._scalar_mixes) != self._num_elmo_layers:
raise ConfigurationError(
- "Elmo object has num_output_representations=%s, but this does not "
- "match the number of use... | [BiattentiveClassificationNetwork->[from_params->[from_params]]] | Initialize the BiattentiveClassificationNetwork with the given parameters. Checks that the passed in object is compatible with the input and output matrices. Check if the specified node has a missing node in the network. | Aside: Did `black` force this change? If not, while I appreciate cleanups, it's probably best to leave them for another PR just to keep the diff small. |
@@ -363,7 +363,8 @@ class FreqtradeBot(object):
logger.debug('Ignoring %s in pair whitelist', trade.pair)
if not whitelist:
- raise DependencyException('No currency pairs in whitelist')
+ logger.info("No currency pairs left in whitelist, no trades can be created.")
+ ... | [FreqtradeBot->[execute_buy->[get_target_bid,_get_min_pair_stake_amount],cleanup->[cleanup],process_maybe_execute_buy->[create_trade],handle_timedout_limit_buy->[handle_buy_order_full_cancel],handle_trade->[get_sell_rate],create_trade->[_get_trade_stake_amount],notify_sell->[get_sell_rate]]] | Checks the implemented trading indicator for a randomly picked pair and creates a new trade object. | What happens if whitelist is empty and there is no open trade? I think we should check if there is at least one open trade then we generate this message otherwise the DependencyException. few lines above we have already Trade.get_open_trades() so maybe keep it somewhere and check here if there is at least an open trade... |
@@ -202,6 +202,17 @@ class OperationCounters(object):
self._sample_counter = 0
self._next_sample = 0
+ if consumers and len(consumers):
+ consumer = consumers[0]
+ if hasattr(consumer, 'spec') and hasattr(consumer.spec, 'serialized_fn'):
+ fns = pickler.loads(consumer.spec.serialized_fn)... | [SideInputReadCounter->[__init__->[update_current_step]],TransformIOCounter->[__exit__->[__exit__],__enter__->[__enter__]],OperationCounters->[_observable_callback->[_observable_callback_inner->[update]],_should_sample->[_compute_next_sample],do_sample->[SumAccumulator,_observable_callback,update],should_sample->[_shou... | Initialize a new object from a sequence of missing values. | You can just do `if consumers` here. As discussed, there may be more than one consumer, so worth thinking about what to do in that case. |
@@ -149,7 +149,13 @@ class GcsFileSystem extends FileSystem<GcsResourceId> {
@Override
protected void copy(List<GcsResourceId> srcResourceIds, List<GcsResourceId> destResourceIds)
throws IOException {
+ Stopwatch stopwatch = Stopwatch.createStarted();
options.getGcsUtil().copy(toFilenames(srcResour... | [GcsFileSystem->[copy->[copy],expand->[create],create->[create],toMatchResult->[create],open->[open]]] | Copy the srcResourceIds to destResourceIds. | Do you think you can use `TimeUnit.SECONDS` here? This will not require dividing by `1e3 ` later. |
@@ -20,6 +20,7 @@ type Source interface {
}
type source struct {
+ storage *fileset.Storage
commitInfo *pfs.CommitInfo
fileSet fileset.FileSet
full bool
| [Iterate->[IsDir,Index,WithCancel,NewIterator,Iterate,NewFile],Peek,Write,NewHash,NewIndexResolver,Index,IsDir,HasPrefix,Next,Is,Sum,NewDirInserter,filter,Errorf,Split,SizeBytes] | NewSource imports a source from a fileset. FileSet. checkFileInfoCache returns an iterator over the files in s. fileSet. | Can we not depend on the whole fileset.Storage? We seem to just grab the ChunkStorage() below. I would prefer to pass that in in the constructor. |
@@ -553,7 +553,11 @@ class Command(object):
if args.graph:
self._outputer.info_graph(args.graph, deps_graph, get_cwd())
- else:
+ if args.json:
+ json_arg = True if args.json == "1" else args.json
+ self._outputer.json_info(deps_graph, ... | [Command->[export->[export],info->[info],install->[install],source->[source],remove->[remove,info],new->[new],imports->[imports],link->[link],upload->[upload],copy->[copy],download->[download],run->[_commands,_warn_python2,_show_help],export_pkg->[export_pkg],test->[test],inspect->[inspect],package->[package],_show_hel... | Gets information about a specific . This function is called from the command line interface. It will return the information about a specific Builds a single object. conan source method. | I think we could output always the paths when json output and forbid the `args.paths` and `args.json` together. It simplifies a bit everything and I would expect a json to be always complete. |
@@ -59,5 +59,11 @@ namespace System
internal const string GetContextInfoMessage = "Use the Graphics.GetContextInfo overloads that accept arguments for better performance and fewer allocations.";
internal const string GetContextInfoDiagId = "SYSLIB0016";
+
+ internal const string RuntimeEnviro... | [No CFG could be retrieved] | This is a helper method to provide a message to the user that the user can use the. | Note that there's another open PR that adds `SYSLIB0017` and `SYSLIB0018`, which is why I skipped those. |
@@ -18,7 +18,7 @@
#include "evp_local.h"
/*
- * EVP_CTRL_RET_UNSUPPORTED = -1 is the returned value from any ctrl function
+ * OSSL_RET_UNSUPPORTED = -2 is the returned value from any ctrl function
* where the control command isn't supported, and an alternative code path
* may be chosen.
* Since these functio... | [No CFG could be retrieved] | Creates a list of all the elements of a n - tuple. \ Function to call the function of the given object. | Regardless of whether `EVP_CTRL_RET_UNSUPPORTED` had the wrong value or not, don't you break applications by returning a different value now? |
@@ -120,6 +120,10 @@ func PostgresDeployment(opts *AssetOpts, hostPath string) *apps.Deployment {
Name: "postgres-storage",
MountPath: "/var/lib/postgresql/data",
},
+ {
+ Name: postgresInitVolumeName,
+ MountPath: "/docker-entrypoint-initdb.d",
+ },
... | [String,Sprintf,Join,MustParse] | returns a Deployment object that represents a single object. PostgresStorageClass returns a storage class based on the given options. | Just curiosity, but why the reference to docker in the volume name? Does docker interact with postgres somehow? |
@@ -2443,6 +2443,8 @@ co_api_compat(void **state)
daos_handle_t coh;
daos_cont_info_t info;
int rc;
+ char uuid_str1[37];
+ char uuid_str2[37];
if (arg->myrank != 0)
return;
| [bool->[daos_acl_validate,daos_acl_dump,daos_acl_get_ace_for_principal,print_message,ace_has_permissions,daos_ace_dump,daos_ace_get_size],int->[test_setup,async_disable,async_enable],run_daos_cont_test->[MPI_Barrier,run_daos_sub_tests,ARRAY_SIZE],daos_prop_t->[daos_prop_alloc,get_daos_acl_with_owner_perms,assert_true,a... | test_api_compat - test case for handling of uuid uuid uuid2 label open a container using label open a container using uuid and destroy it using uuid2. | (style) please, no space before tabs |
@@ -847,10 +847,10 @@ void FreeStringArray(char **strs)
for (i = 0; strs[i] != NULL; i++)
{
free(strs[i]);
+ strs[i] = NULL;
}
free(strs);
- strs = NULL;
}
| [No CFG could be retrieved] | Parse CSVs into char arrays. - 1 ;. | Why bother ? |
@@ -94,6 +94,7 @@ LONGLONG cimDatetimeToUnixtime(const std::string& src) {
IID_PPV_ARGS(&pCimDateTime));
if (!SUCCEEDED(hres)) {
LOG(WARNING) << "Failed to init CoCreateInstance with " << hres;
+ pCimDateTime->Release();
return -1;
}
| [wstringToString->[to_bytes],cimDatetimeToUnixtime->[stringToWstring],bstrToString->[wstringToString],stringToWstring->[from_bytes]] | Convert a CIM Datetime string into a FILETIME and return the corresponding UNIX epoch timestamp. | I think this will segfault because the pointer will be null on error. |
@@ -244,8 +244,8 @@ bio_alloc_init(struct utest_context *utx, bio_addr_t *addr, const void *src,
if (src == NULL) {
addr->ba_hole = 1;
return 0;
- }
-
+ } else
+ addr->ba_hole = 0;
rc = utest_alloc(utx, &umoff, size, init_mem, src);
if (rc != 0)
| [No CFG could be retrieved] | parse_value - parse the value of a header header or header value. Duplicate a bio object from a string. | When the if has brackets, the else should match it and also have brackets...checkpatch will not complain in this case. |
@@ -110,7 +110,7 @@ public class SCMHAInvocationHandler implements InvocationHandler {
response = ratisHandler.submitRequest(
scmRatisRequest);
}
- LOG.info("Invoking method {} on target {}, cost {}us",
+ LOG.trace("Invoking method {} on target {}, cost {}us",
method, ratisHandler,... | [SCMHAInvocationHandler->[invokeRatis->[of,getName,equals,getGrpcTlsConfig,submitRequest,monotonicNowNanos,checkNotNull,getGroup,isSuccess,getParameterTypes,getResult,info,encode,getException,submitScmCertsToRatis],invoke->[debug,getCause,invokeRatis,monotonicNow,isAnnotationPresent,invokeLocal],invokeLocal->[invoke,tr... | Invokes the ratis method. | @hanishakoneru Would it make sense to use different log level depending on whether the response is success or not? (E.g. trace for success, info for failure.) |
@@ -121,6 +121,7 @@ namespace System.Tests
}
[Fact]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/38994", TestPlatforms.Browser)]
public void FriendlyName()
{
string s = AppDomain.CurrentDomain.FriendlyName;
| [AppDomainTests->[IsFullyTrusted->[IsFullyTrusted],LoadBytes->[Load],ExecuteAssembly->[ExecuteAssembly],Load->[Load],ApplyPolicy->[ApplyPolicy],ShadowCopyFiles->[ShadowCopyFiles],FriendlyName->[FriendlyName],IsFinalizingForUnload->[IsFinalizingForUnload],MonitoringIsEnabled->[MonitoringIsEnabled],IsCompatibilitySwitchS... | Friendly name of the node. | You can just fix this one by replacing `Assembly.GetExecutingAssembly().GetName().Name;` below with `DefaultDomain`. |
@@ -45,6 +45,14 @@ public class BeamFilterRel extends Filter implements BeamRelNode {
return new BeamFilterRel(getCluster(), traitSet, input, condition);
}
+ @Override
+ public RelOptCost computeSelfCost(RelOptPlanner planner, RelMetadataQuery mq) {
+ double rowCnt = mq.getRowCount(this);
+ return pla... | [BeamFilterRel->[copy->[BeamFilterRel],Transform->[expand->[toPTransform]]]] | Copy the filter if it has a reserved trait set. | So just checking - this overrides the default of - rowcount - cpu proportional to rowcount - IO zero and makes it - rowcount - cpu proportional to rowcount - IO proportional to rowcount * schema size That seems like a good change. Since it is just a vague generalization, though, I think that you might just put IO cost ... |
@@ -167,6 +167,14 @@ function tests(name) {
}, null)).to.be.rejectedWith(/type/);
});
+ it('should reject unknown type', () => {
+ return expect(getAd({
+ width: 300,
+ height: 250,
+ type: 'unknownType',
+ }, null)).to.be.rejectedWith(/unknownType/);
+ });
+
it('... | [No CFG could be retrieved] | This function checks that the element s implementation_ has a size and that it s size is Checks AMP AMP AMP AMP AMP AMP AMP AMP A. | canonical should be `undefined` otherwise this could also be rejected by none canonical. |
@@ -365,6 +365,15 @@ class FakeLocation {
reload(forceReload) {
this.change_({reload: true, forceReload});
}
+
+ /**
+ * Resets the URL without firing any events or triggering a history
+ * entry.
+ * @param {string} href
+ */
+ setForTesting(href) {
+ this.url_ = parseUrl(resolveRelativeUrl(hre... | [No CFG could be retrieved] | History object for a link. Constructor for the n - tuple object. | Everything here is for testing :) Let's call it something like `setQuiet`. Generally, the intention here is if you need an initially set location, you declare it in `describe`. That might not be applicable in all cases, so I'm fine with the change. |
@@ -35,10 +35,16 @@ OSSL_PROVIDER *OSSL_PROVIDER_try_load(OSSL_LIB_CTX *libctx, const char *name,
actual = prov;
if (isnew && !ossl_provider_add_to_store(prov, &actual, retain_fallbacks)) {
- ossl_provider_deactivate(prov);
+ ossl_provider_deactivate(prov, 1);
ossl_provider_free(prov)... | [OSSL_PROVIDER_add_builtin->[OPENSSL_strdup,memset,ossl_provider_info_clear,ossl_provider_info_add_to_store,ERR_raise],OSSL_PROVIDER_get_params->[ossl_provider_get_params],OSSL_PROVIDER_try_load->[ossl_provider_new,ossl_provider_free,ossl_provider_find,ossl_provider_add_to_store,ossl_provider_activate,ossl_provider_dea... | Load a provider from the given name. | There is one more place where ossl_provider_add_to_store() is called with actual possibly different (in provider_conf_load()). Might be the same change should be done there? |
@@ -1384,11 +1384,8 @@ module.exports = class Exchange {
throw new NotSupported (this.id + ' parseFundingRate() not supported yet')
}
- parseFundingRates (response, market = undefined, since = undefined, limit = undefined) {
- const parsed = response.map ((res) => this.parseFundingRate (res, m... | [No CFG could be retrieved] | Get a list of all ethernet ethernet related attributes for a given currency. Get all order records for a given order symbol. | Is there a reason for removing the `since/limit` filtering? |
@@ -683,7 +683,7 @@ module.exports = class ftx extends Exchange {
this.safeNumber (ohlcv, 'high'),
this.safeNumber (ohlcv, 'low'),
this.safeNumber (ohlcv, 'close'),
- this.safeNumber (ohlcv, 'volume'),
+ this.safeNumber (ohlcv, 'volume', 0),
];
... | [No CFG could be retrieved] | Get the order book order book params and market id for a given key. Get OHLCV . | i don't think we should default to 0 here |
@@ -673,8 +673,16 @@ class Epochs(_BaseEpochs):
for key, val in self.event_id.items():
if val not in events[:, 2]:
- raise ValueError('No matching events found for %s '
- '(event id %i)' % (key, val))
+ msg = ('No matching events foun... | [read_epochs->[_check_delayed,Epochs],combine_event_ids->[copy],equalize_epoch_counts->[drop_epochs,drop_bad_epochs],_BaseEpochs->[__next__->[next]],Epochs->[equalize_event_counts->[drop_epochs,copy,_key_match,drop_bad_epochs],plot_drop_log->[plot_drop_log],_get_data_from_disk->[_check_delayed,_is_good_epoch,_get_epoch... | Initialize the object with a raw sequence of events. Initialize the object with a single missing - block block of events. | This can just be `else: # on_missing == 'ignore'` (no need to check since it's implied by the type checking above). |
@@ -94,8 +94,8 @@ def log_poisson_loss(targets, log_input, compute_full_loss=False, name=None):
raise ValueError(
"log_input and targets must have the same shape (%s vs %s)" %
(log_input.get_shape(), targets.get_shape()))
-
- result = math_ops.exp(log_input) - log_input * targets
+
... | [weighted_cross_entropy_with_logits->[weighted_cross_entropy_with_logits_v2],depthwise_conv2d_v2->[depthwise_conv2d],sigmoid_cross_entropy_with_logits_v2->[sigmoid_cross_entropy_with_logits],separable_conv2d_v2->[separable_conv2d],_compute_sampled_logits->[_sum_rows],weighted_moments_v2->[weighted_moments],moments_v2->... | Computes the log Poisson loss given the log - likelihood loss of the prediction and the missing - missing - missing - missing - missing - missing - missing - missing - missing -. | Please, no trailing whitespace |
@@ -47,12 +47,13 @@ namespace Js
SetEnumerable(propertyId, false);
}
- Var JavascriptError::NewInstance(RecyclableObject* function, JavascriptError* pError, CallInfo callInfo, Var newTarget, Var message)
+ Var JavascriptError::NewInstance(RecyclableObject* function, JavascriptError* pError, CallIn... | [No CFG could be retrieved] | Returns true if the error is not found false otherwise. The Error object for the missing variable. | Could this be defined inside the `if` statement where it's used? it doesn't look like it's used outside of it. |
@@ -0,0 +1,17 @@
+require "rails_helper"
+
+RSpec.describe "credits/new", type: :view do
+ let(:purchaser) { create(:user) }
+ let(:credit) { build(:credit) }
+
+ before do
+ assign(:purchaser, purchaser)
+ assign(:credit, credit)
+
+ sign_in purchaser
+ end
+
+ it "shows the page" do
+ render
+ end
+... | [No CFG could be retrieved] | No Summary Found. | I guess `expect { render }.not_to raise_error` was implied here. |
@@ -43,6 +43,10 @@ class PretrainedTransformerIndexer(TokenIndexer[int]):
self._added_to_vocabulary = False
self._padding_value = self.tokenizer.convert_tokens_to_ids([self.tokenizer.pad_token])[0]
logger.info(f"Using token indexer padding value of {self._padding_value}")
+ self._add_s... | [PretrainedTransformerIndexer->[tokens_to_indices->[_add_encoding_to_vocabulary]]] | Initialize a with the given model name and namespace. | Did you figure this out? Seems like they should be? |
@@ -0,0 +1,14 @@
+// +build linux
+
+package diskio
+
+import (
+ "testing"
+
+ "github.com/stretchr/testify/assert"
+)
+
+func Test_Get_CLK_TCK(t *testing.T) {
+ //usually the tick is 100
+ assert.Equal(t, uint32(100), Get_CLK_TCK())
+}
| [No CFG could be retrieved] | No Summary Found. | Was this intended or some tests are missing? |
@@ -1,8 +1,8 @@
<div class="assignment_file">
<%= form.fields_for :assignment_files, assignment_file do |f| %>
<p>
- <%= f.label :filename, t(:filename).html_safe %>
- <%= f.text_field :filename %>
+ <%= f.label :filename, t(:filename).html_safe %>
+ <%= f.text_field :filename %>
<% if f.object.... | [No CFG could be retrieved] | Renders the hidden input for the nag object. | Please remove the trailing whitespace from these two lines. |
@@ -73,11 +73,11 @@ layer_state_t layer_state_set_user(layer_state_t state) {
if (layer_state_cmp(layer_state, 0)) save_rgb_config();
rgb_by_layer(layer);
}
- return state;
-}
#endif
+ return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
+}
-bool process_record_user(uint16_t ke... | [No CFG could be retrieved] | | - - - - - - - - - - - - - - - - - process_record_user - Process a keycode from the user. | Just a heads up, you may want this at the beginning, as, this way, you won't get the adjust layer properly enabled here. You can use `state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);` at the beginning of the function. |
@@ -25,7 +25,7 @@ export class AdsenseSharedState {
constructor() {
- /** @private {!Array<!{id: string, format: string, client: string}>} */
+ /** @private {!Array<!{id: string, format: string, client: string, slotname: (string|undefined)}>} */
this.previousSlots_ = [];
}
| [No CFG could be retrieved] | Creates a new object containing the state - dependent ad request URL parameters relevant for a given unique Removes a slot from the list of previous slots. | Might be getting to the point where a typedef would be more convenient? |
@@ -871,7 +871,7 @@ Generator.prototype.copyTemplate = function (source, dest, action, _this, _opt,
jhipsterUtils.copyWebResource(source, dest, regex, 'html', _this, _opt, template);
break;
case 'stripJs' :
- var regex = '[a-zA-Z]+\:(\s)?\[[ \'a-zA-Z0-9\$\,\(\)\{\}\n\.\<\%\... | [No CFG could be retrieved] | Generate a date from a Gradle script. Copy templates with all the custom logic applied according to the type. | Won't this regex remove more than `translatePartialLoader` from the resolve block? |
@@ -63,7 +63,6 @@ public class SchemaKSourceFactoryTest {
.build();
private static final String TOPIC_NAME = "fred";
- private static final KsqlConfig CONFIG = new KsqlConfig(ImmutableMap.of());
@Mock
private PlanBuildContext buildContext;
| [SchemaKSourceFactoryTest->[shouldBuildNonWindowedStream->[thenReturn,assertValidSchema,getSources,empty,buildSource,is,instanceOf,assertThat,not,getSourceStep],assertValidSchema->[resolve,getSchema,is,assertThat,getSourceStep],shouldBuildNonWindowedTable->[thenReturn,assertValidSchema,empty,buildSource,is,instanceOf,a... | package - private for testability Sets up the object that will read the next sequence number from Kafka. | I'm not sure if there's a compelling reason to keep this now that I'm mocking some config behavior? |
@@ -493,7 +493,8 @@ public class ModelBrowser extends AnkiActivity {
.onPositive((dialog, which) -> {
JSONObject model = mModels.get(mModelListPosition);
String deckName = mModelNameInput.getText().toStrin... | [ModelBrowser->[deleteModel->[refreshList],onStop->[onStop],onResume->[onResume],refreshList->[updateSubtitleText],onActivityResult->[onActivityResult],onCollectionLoaded->[onCollectionLoaded],onOptionsItemSelected->[onOptionsItemSelected],onCreate->[onCreate],DisplayPairAdapter->[getView->[getName,getCount]],DisplayPa... | Dialog to rename a model. | This seems fine as far as it goes but I'm having a hard time verifying if this is correct or not. I hunted through the python code and I couldn't find anywhere the list of disallowed characters was specified for decks or the field. Do you have a link anywhere from dae/anki on github? Separately, this deck name replaceA... |
@@ -223,7 +223,7 @@ func (*listener) JobID() models.JobID {
// Job complies with log.Listener
func (l *listener) JobIDV2() int32 {
- return l.spec.ID
+ return l.job.ID
}
// IsV2Job complies with log.Listener
| [ServicesForSpec->[NewOracle,Bytes,Address,Errorf],handleCancelOracleRequest->[LoadAndDelete],handleOracleRequest->[Add,CreateLogger,Errorw,Background,CombinedContext,ExecuteAndInsertNewRun,LoadOrStore,With,Err,Done],Start->[Register,New],Close->[Wait,Range,unsubscribeLogs],HandleLog->[handleCancelOracleRequest,Error,D... | JobIDV2 returns the job id of the listener. | Is it possible to get a regression test? |
@@ -101,10 +101,11 @@ public interface ClientProtocol {
/**
* Set Volume Quota.
* @param volumeName Name of the Volume
- * @param quota Quota to be set for the Volume
+ * @param quotaInBytes The maximum size this volume can be used.
+ * @param quotaInCounts The maximum number of buckets in this volume.... | [No CFG could be retrieved] | Set volume quota. | For backward compatibility, I think we should add this method and also keep the original method. (User might implemented this interface and ran it on production.) @xiaoyuyao, would you please be so kind to provide some thoughts :smile: |
@@ -82,6 +82,13 @@ public class HoodieInputFormatUtils {
public static final int HOODIE_PARTITION_PATH_COL_POS = 3;
public static final String HOODIE_READ_COLUMNS_PROP = "hoodie.read.columns.set";
+ public static final String HOODIE_USE_META_FIELDS = "hoodie.use.meta.fields";
+ public static final String DEFA... | [HoodieInputFormatUtils->[filterFileStatusForSnapshotMode->[groupSnapshotPathsByMetaClient,buildMetadataConfig,getFileStatus],getInputFormat->[getInputFormat],getFilteredCommitsTimeline->[filterInstantsTimeline],filterIncrementalFileStatus->[getFileStatus],getFileStatus->[getFileStatus],refreshFileStatus->[getFileStatu... | Get the InputFormat for the given base file format. | rational to use a different naming compared to what we use in table props. This is just a query side variable used just in realtime path. "UseMetaFields" makes more sense from a query standpoint than "hoodiePopulateMetaFields". |
@@ -24,7 +24,7 @@ namespace System.Security.Principal
public class WindowsPrincipal : ClaimsPrincipal
{
- private readonly WindowsIdentity _identity = null;
+ private readonly WindowsIdentity _identity = null!;
//
// Constructors.
| [No CFG could be retrieved] | Creates a new WindowsPrincipal object that is a part of the System. Security. Principal interface Returns all of the claims from the NT token. | Where is the `private WindowsPrincipal() { }` constructor used? That seems to be the only reason this `= null!` is needed, and I don't see anyone using it (plus the type has other ctors that will prevent a default public one from being added). |
@@ -150,8 +150,8 @@ class TestLevelSetConvection(KratosUnittest.TestCase):
# gid_output.ExecuteFinalizeSolutionStep()
# gid_output.ExecuteFinalize()
- self.assertAlmostEqual(max_distance, 1.0617777301844604)
- self.assertAlmostEqual(min_distance, -0.061745786561321375)
+ self.as... | [TestLevelSetConvection->[test_levelset_convection_BFECC->[ConvectionVelocity,BaseJumpedDistance],test_levelset_convection_BFECC_algebraic->[ConvectionVelocity,BaseJumpedDistance],test_levelset_convection->[ConvectionVelocity,BaseDistance]]] | This is a test method that runs the BFECC test on the levelset. Creates a new Kratos - Multiphysics level set and then creates a G This function is used to test the levelset convection process with a BFECC Adds a new node in the model with the highest distance and the minimum distance. | The value change is due to the gradient calculation at each time step right? |
@@ -37,11 +37,17 @@ public final class DropConnectorExecutor {
final ServiceContext serviceContext
) {
final String connectorName = statement.getStatement().getConnectorName();
+ final boolean ifExists = statement.getStatement().getIfExists();
final ConnectResponse<String> response =
ser... | [DropConnectorExecutor->[execute->[of,ErrorEntity,isPresent,getStatementText,get,DropConnectorEntity,getConnectorName,delete]]] | Execute drop connector. | You may want to use `HttpStatus.SC_NOT_FOUND` instead of just `404`. |
@@ -428,6 +428,12 @@ public class HoodieWriteClient<T extends HoodieRecordPayload> extends AbstractHo
HoodieCommitMetadata metadata = new HoodieCommitMetadata();
profile.getPartitionPaths().forEach(path -> {
WorkloadStat partitionStat = profile.getWorkloadStat(path.toString());
+ HoodieWri... | [HoodieWriteClient->[clean->[clean],rollbackInflightCompaction->[rollback],startCommitWithTime->[startCommit],runCompaction->[compact,commitCompaction],startCommit->[startCommit],upsertRecordsInternal->[saveWorkloadProfileMetadataToInflight],scheduleCompactionAtInstant->[scheduleCompaction],savepoint->[savepoint],rollb... | Save the metadata of the given profile to the inflight state. | Can we just leave them unset ? It should just be null.. |
@@ -189,11 +189,15 @@ class ProductPricingInfo(BasePricingInfo):
class ProductVariant(CountableDjangoObjectType, MetadataObjectType):
quantity = graphene.Int(
required=True,
- description="Quantity of a product in the store's possession, "
+ description="DEPRECATED: Will be removed in favou... | [ProductVariant->[resolve_meta->[resolve_meta],resolve_pricing->[VariantPricingInfo],resolve_attributes->[resolve_attribute_list],resolve_private_meta->[resolve_private_meta]],Category->[resolve_meta->[resolve_meta],resolve_private_meta->[resolve_private_meta]],Product->[resolve_private_meta->[resolve_private_meta],res... | Represents availability of a product in the storefront. Required fields for the HotspotCost object. | All of these deprecated fields are regular Graphene fields that provide `deprecation_reason` for the deprecation message. We should revert the original descriptions and use `deprecation_reason` instead. The message can be the same in all these cases: "This field will be removed in Saleor 2.11. Use the `stock` field ins... |
@@ -228,7 +228,7 @@ module Email
@fragment.css('[href]').each do |element|
href = element['href']
- if href =~ /^\/\/#{host}/
+ if href.start_with?("\/\/#{host}")
element['href'] = "#{scheme}:#{href}"
end
end
| [Styles->[format_basic->[add_styles],style->[add_styles]]] | Replaces relative urls with absolute ones. | I'm curious, what's the perf improvement of using `start_with?` as opposed to the regex? |
@@ -329,8 +329,9 @@ class AsSingleton(AsSideInput):
elif len(head) == 1:
return head[0]
raise ValueError(
- 'PCollection with more than one element accessed as '
- 'a singleton view.')
+ 'PCollection of length %d with more than one element accessed as a '
+ 'singleton view. ... | [PCollection->[to_runner_api->[PCollection],from_runner_api->[PCollection]],PValue->[__or__->[apply],apply->[apply]],DoOutputsTuple->[__getitem__->[PCollection],__repr__->[_str_internal],__getattr__->[__getattr__],__str__->[_str_internal]]] | Return the from the runtime iterable. | <!--new_thread; commit:306a1dc4a1e072a65c739e179b5e1017e2069709; resolved:0--> PCollections are unordered, so let's use "First two elements encountered are ...". |
@@ -11,8 +11,9 @@ module Idv
ActiveModel::Name.new(self, nil, 'Address')
end
- def initialize(user)
- @user = user
+ def initialize(pii)
+ @pii = pii
+ @address_edited = false
end
def submit(params)
| [AddressForm->[raise_invalid_address_parameter_error->[raise],model_name->[new],consume_params->[send,to_sym,include?,raise_invalid_address_parameter_error,each],submit->[new,consume_params,valid?],freeze,include,attr_accessor]] | Initialize a new user object. | Interesting... this argument wasn't doing anything before? |
@@ -127,4 +127,9 @@ public class UnitSeparator {
}
return new TreeSet<>(categories.keySet());
}
+
+ private static boolean isRelevantAirUnit(final Unit unit) {
+ return UnitAttachment.get(unit.getType()).getIsAir()
+ && UnitAttachment.get(unit.getType()).getHitPoints() > 1;
+ }
}
| [UnitSeparator->[getSortedUnitCategories->[shouldDrawUnit,getName,sort,getData,getUnits,categorize,removeIf,getAllUnitTypes,thenComparing],categorize->[getWasAmphibious,addUnit,BigDecimal,build,getTransportCost,getHits,get,categorize,containsKey,getMovementLeft,test,UnitCategory,put,keySet,getUnitDamage]]] | categorize. This method is used to categorize the given units. | This method name is too contextual to really help. A casual reader does not know what 'relevant' is or is not. As a suggestion, `isAirWithHitPointsRemaining` would seem like a more descriptive name. |
@@ -195,6 +195,8 @@ struct ll_schedule_domain *timer_domain_init(struct timer *timer, int clk)
zephyr_domain->ll_timer = timer;
zephyr_domain->ll_domain = domain;
+ /* 10 is rather random, we better not accumulate 10 missed timer interrupts */
+ k_sem_init(&zephyr_domain->sem, 0, 10);
ll_sch_domain_set_pdata(... | [bool->[ll_sch_domain_get_pdata,platform_timer_get_atomic],void->[k_thread_suspend,k_wakeup,cpu_get_id],int->[k_thread_start,tr_info,k_timer_init,K_USEC,atomic_read,k_thread_cpu_mask_clear,k_thread_abort,k_thread_cpu_mask_enable,k_thread_create,k_thread_name_set,cpu_get_id,k_timer_stop,ll_sch_domain_get_pdata,tr_dbg,k_... | This function initializes the domain of the schedule. | Can we make 10 a macro. This should bail out in 10 ms - Btw, where do we check this ? |
@@ -67,6 +67,7 @@ export default class Header extends React.Component<IHeaderProps, IHeaderState>
<%_ if (enableTranslation) { _%>
handleLocaleChange = event => {
+ Storage.session.set('locale', event.target.value);
this.props.onLocaleChange(event.target.value);
<%_ if (enableI18nRTL) { _%>
do... | [No CFG could be retrieved] | A header component that displays a menu of header - components. A component that renders a single . | lets assign `event.target.value` to a const and use that everywhere in the method |
@@ -92,11 +92,15 @@ func (m *MetricSet) Fetch(r mb.ReporterV2) {
}
if m.MetricSet.XPack {
- eventsMappingXPack(r, m, content)
+ err = eventsMappingXPack(r, m, content)
} else {
err = eventsMapping(r, content)
if err != nil {
r.Error(err)
}
}
+
+ if err != nil {
+ m.Log.Error(err)
+ }
}
| [Fetch->[FetchContent,Error,IsMaster,HostData,Wrap,Debug],Beta,WithNamespace,MustAddMetricSet,Module,WithHostParser,NewMetricSet,FullyQualifiedName,UnpackConfig] | Fetch fetches the index recovery stats from Elasticsearch. | This error is never reported. Is that intentional? |
@@ -1230,8 +1230,8 @@ def location_validator(archive=None):
def archivename_validator():
def validator(text):
- if '/' in text or '::' in text or not text:
- raise argparse.ArgumentTypeError('Invalid repository name: "%s"' % text)
+ if not Location.archive_valid(text):
+ rais... | [load_pattern_file->[parse_add_pattern],get_cache_dir->[write,get_home_dir],hostname_is_unique->[yes],Location->[to_key_filename->[get_keys_dir],parse->[get,replace_placeholders,match],_parse->[match,normpath_special],__init__->[parse]],get_security_dir->[get_home_dir],BaseFormatter->[format_item->[get_item_data]],json... | A function to validate repository names. | archive_valid() currently accepts empty archive name, which was explicitly forbidden before, see 2 lines above. |
@@ -58,10 +58,16 @@ public class TestMissingContainerTask extends AbstractSqlDatabaseTest {
ReconTaskSchemaDefinition.class);
taskSchemaDefinition.initializeSchema();
- UtilizationSchemaDefinition schemaDefinition =
- getInjector().getInstance(UtilizationSchemaDefinition.class);
+ Container... | [TestMissingContainerTask->[testRun->[assertTrue,size,mock,start,getMockContainerIDs,thenReturn,getInstance,register,await,isEmpty,MissingContainerTask,asList,allMatch,getTaskName,findAll,getLastUpdatedTimestamp,ReconTaskStatusDao,initializeSchema,currentTimeMillis,emptySet,MissingContainersDao,getContainerId,unmodifia... | This test run tests the missing containers table. Checks if a missing container task is present in the missing containers table. | Instead of initializing a schema definition as and when needed in tests, we can create a test harness that creates a test sql DB, and provides access to any DAO that the test may need. This will remove the need for a unit test to know what DAO is needed somewhere deep inside the flow, and the code will be much cleaner.... |
@@ -411,9 +411,12 @@ class AddonBrowseVersionSerializer(
) if key in entry}
def get_validation_url_json(self, obj):
- return absolutify(reverse('reviewers.json_file_validation', args=[
- obj.addon.pk, obj.current_file.id
- ]))
+ return absolutify(drf_reverse(
+ ... | [DraftCommentSerializer->[validate->[get_or_default],CannedResponseSerializer],AddonBrowseVersionSerializer->[get_file_entries->[_get_entries]],AddonBrowseVersionSerializerFileOnly->[FileInfoSerializer],FileEntriesDiffMixin->[_get_entries->[_get_version]],FileInfoSerializer->[get_content->[_get_blob_for_selected_file],... | Returns validation url for a given object. | We have some code using `self._context` but we should change it (no idea why it was done that way), `self.context` is the supported way of accessing the context in a serializer. |
@@ -256,10 +256,10 @@ namespace CoreNodeModels
SelectedIndex = -1;
for (int i = 0; i < items.Count; i++)
{
- if ((items.ElementAt(i)).Name.Equals(currentSelection))
+ if ((items.ElementAt(i)).Item.ToString().Equals(currentSelection... | [DSDropDownBase->[SerializeCore->[SerializeCore],DeserializeCore->[ToString,DeserializeCore],UpdateValueCore->[ToString,UpdateValueCore],ToString],DynamoDropDownItem->[CompareTo->[CompareTo]]] | PopulateItems - Populate the items in the list. | This is still required for maintaining bindings, so we can't use `selectedIndex` here. |
@@ -48,9 +48,8 @@ from .forward import (read_forward_solution, apply_forward, apply_forward_raw,
make_forward_dipole)
from .source_estimate import (read_source_estimate, MixedSourceEstimate,
SourceEstimate, VectorSourceEstimate,
- VolSo... | [set_log_level,set_log_file] | Imports all the classes that are imported from. io. Reads a set of objects from the MRI or MegHelmet SURF. | @TommyClausner by doing this you break the code of many people without warning. I'll revert this so users just have a deprecation warning and not a crash. |
@@ -9,7 +9,7 @@ class Isort(PythonToolBase):
"""The Python import sorter tool (https://timothycrosley.github.io/isort/)."""
options_scope = "isort"
- default_version = "isort>=4.3.21,<4.4"
+ default_version = "isort>=5.0.0,<6.0"
default_extra_requirements = ["setuptools<45"] # NB: `<45` is for P... | [Isort->[register_options->[register,super]]] | Register options for isort. | Given the width of the previous range (and the fact that we don't have a lockfile here), should this be `isort>=5.0.0,<5.1`? |
@@ -21,6 +21,7 @@ public final class BundleDependency {
private BundleDescriptor descriptor;
private BundleScope scope;
private URI bundleUri;
+ private Set<BundleDependency> additionalDependencies;
private BundleDependency() {}
| [BundleDependency->[Builder->[validateIsNotNull->[getNullFieldMessage],BundleDependency]]] | Returns the bundle scope. | It doesn't seem right for me to have a BundleDependency with additionalDependencies. It feels like it's not a proper Object model. Could't that information be in the ClassLoaderModel instead? |
@@ -105,10 +105,12 @@ public class Paragraph extends JobWithProgressPoller<InterpreterResult> implemen
private transient Map<String, String> localProperties = new HashMap<>();
private transient Map<String, ParagraphRuntimeInfo> runtimeInfos = new HashMap<>();
- private static String PARAGRAPH_CONFIG_RUNONSELE... | [Paragraph->[toJson->[toJson],completion->[setText,completion,getBindedInterpreter],createOrGetApplicationState->[getApplicationId],equals->[equals],setAuthenticationInfo->[getUser],setStatusToUserParagraph->[getUser],hashCode->[hashCode],jobRun->[getBindedInterpreter,info,setResult,getText,setText,getReturn,getUser,ge... | The basic data structures for the object. This method is used to set the config of the P2 object. | should this be set to the default the same as interpreter.json ? |
@@ -10,7 +10,7 @@ module Engine
ACTIONS = %w[dividend].freeze
def actions(entity)
- return [] if entity.company? || routes.empty?
+ return [] if entity.company? || @game.routes_revenue(routes).zero?
ACTIONS
end
| [Dividend->[process_dividend->[dividend_options],corporation_dividends->[dividends_for_entity],payout_entity->[corporation_dividends,dividends_for_entity],routes->[routes],payout_shares->[payout_per_share]]] | Returns an array of actions for the given entity. | Trigger the dividend step for games that have revenue that comes from other places beyond their trains. |
@@ -2897,7 +2897,7 @@ evt_mbr_dist(const struct evt_rect *mbr, const struct evt_rect *rect)
}
static int
-evt_sdist_cmp_rect(struct evt_context *tcx, const struct evt_rect_df *mbr,
+evt_sdist_cmp_rect(struct evt_context *tcx, const struct evt_node *nd,
const struct evt_rect_df *rt1, const struct evt_rect_df *... | [No CFG could be retrieved] | Find the number of events that can be added or removed. - - - - - - - - - - - - - - - - - -. | (style) 'nd' may be misspelled - perhaps 'and'? |
@@ -4,12 +4,14 @@ class Identity < ApplicationRecord
belongs_to :user
validates :service_provider, presence: true
+ delegate :metadata, to: :sp, prefix: true
+
def deactivate
update!(session_uuid: nil)
end
- def sp_metadata
- ServiceProvider.from_issuer(service_provider).metadata
+ def sp
+ ... | [Identity->[deactivate->[update!],piv_cac_enabled?->[enabled?],decorate->[new],sp_metadata->[metadata],include,validates,belongs_to]] | Deactivate a by checking the service provider and the friendly name. | Oh, cool. I didn't know this existed, makes total sense. |
@@ -548,10 +548,10 @@ class RestAPI: # pragma: no unittest
def mint_token(
self,
- token_address: typing.TokenAddress,
- to: typing.Address,
- value: typing.TokenAmount,
- contract_method: str,
+ token_address: TokenAddress,
+ to: Address,
+ value: Token... | [endpoint_not_found->[api_error],RestAPI->[initiate_payment->[api_error,api_response],connect->[api_error,api_response],get_raiden_events_payment_history_with_timestamps->[api_error,api_response,get_raiden_events_payment_history_with_timestamps],_deposit->[api_error,api_response,get_channel],get_blockchain_events_token... | Mint a token. | missing return type |
@@ -111,6 +111,13 @@ const files = {
templates: [
'blocks/interceptor/_auth.interceptor.ts'
]
+ },
+ {
+ condition: generator => !generator.skipServer,
+ path: ANGULAR_DIR,
+ templates: [
+ 'blocks/interceptor/_auth... | [No CFG could be retrieved] | Private helper methods for all of the files that are not part of the application. Package hierarchy for all components in a system. | Actually I wouldnt worry much about this as if you are skipping server then you need to make sure you are providing endpoints for all the REST apis else everything will fail so its not really important to validate this. but since you have done it its ok |
@@ -421,14 +421,15 @@ free_htables:
rc2 = d_hash_table_destroy_inplace(&htables[j],
true /* force */);
if (rc2 != 0)
- D_ERROR("d_hash_table_destroy failed, rc: %d.\n", rc2);
+ D_ERROR("d_hash_table_destroy() failed, " DF_RC "\n",
+ DP_RC(rc));
}
D_FREE(htables);
grp_priv->gp_lookup_cache = NU... | [No CFG could be retrieved] | Private method for comparing two key - item structures. This function returns the uri_info of the given tag or NULL if it doesn t exist. | I think DP_RC(rc2) is needed rather than DP_RC(rc) |
@@ -438,6 +438,8 @@ func (i *Ingester) v2Push(ctx context.Context, req *client.WriteRequest) (*clien
}
i.TSDBState.appenderCommitDuration.Observe(time.Since(startCommit).Seconds())
+ db.setLastUpdate(time.Now())
+
// Increment metrics only if the samples have been successfully committed.
// If the code didn't... | [shipBlocks->[getTSDB],runConcurrentUserWorkers->[getTSDBUsers],getOrCreateTSDB->[getTSDB],compactBlocks->[getTSDB],openExistingTSDB->[createTSDB]] | v2Push is the v2 push implementation for the TSDB. This function is used to add a reference to a series in the database. This function is called when an error occurs while reading from the storage. CommitDuration. | We can use `startCommit` instead of `time.Now()`. When called in a hot path, `time.Now()` is a bit slow, so I would avoid if not strictly required (like in this case). |
@@ -272,11 +272,16 @@ namespace System.Windows.Forms
return foundControls;
}
- public override IEnumerator GetEnumerator()
+ public new virtual IEnumerator<Control> GetEnumerator()
{
return new ControlCollectionEnumerator(this);
... | [Control->[ControlCollection->[IndexOf->[IndexOf],Clear->[RemoveAt],Clone->[AddRange],Add->[Add],AddRange->[Add],GetChildIndex->[GetChildIndex,IndexOf],SetChildIndex->[SetChildIndexInternal],RemoveAt->[Remove],Contains->[Contains],RemoveByKey->[IndexOfKey,RemoveAt,IsValidIndex],ArrayList->[Add],Remove->[Remove],SetChil... | This method recursively searches for controls that belong to a key. | This is an attempt to enable `foreach` picking up the generic enumerator, if you have better suggestions I'm open to try them out. This particular attempt is adding a second virtual mehtod `GetEnumeratorCore` on the base class so subclasses can both override and shadow the `GetEnumerator` method at the same time. Alter... |
@@ -31,9 +31,6 @@
#define NUM_HARDWARE_TIMERS 2
-#ifndef SWSERIAL_TIMER_IRQ_PRIO
- #define SWSERIAL_TIMER_IRQ_PRIO 1
-#endif
#ifndef STEP_TIMER_IRQ_PRIO
#define STEP_TIMER_IRQ_PRIO 2
#endif
| [No CFG could be retrieved] | Creates a new object. - - - - - - - - - - - - - - - - - -. | Do we sometimes want to include this from the platform packages? If not, then we can use quotes here to use the local (quoted relative path) include. |
@@ -44,6 +44,7 @@ public class KinesisConfig
private Duration checkpointInterval = new Duration(60000, TimeUnit.MILLISECONDS);
private String logicalProcessName = "process1";
private int iteratorNumber;
+ private int updateInterval;
@NotNull
public String getTableDescriptionLocation()
| [KinesisConfig->[Duration]] | Gets the table description location. | What would be the default value for this ? |
@@ -46,6 +46,10 @@ class ParallelExecutor(object):
improve performance in some cases, defalut False.
share_vars_from(ParallelExecutor, default None): If provied,
it will share variables from the specified ParallelExecutor.
+ use_default_grad_scale(bool, default ... | [ParallelExecutor->[bcast_params->[bcast_params],run->[run],__init__->[ParallelExecutor]]] | Creates a ParallelExecutor object that runs a single in parallel. Initialize the necessary objects for the n - node scenarios. | to gradients of each device? and then aggregated? |
@@ -96,7 +96,7 @@ var (
%[1]s %[2]s . --docker-image=repo/langimage
# Create a Ruby application based on the provided [image]~[source code] combination
- %[1]s %[2]s centos/ruby-22-centos7~https://github.com/openshift/ruby-ex.git
+ %[1]s %[2]s centos/ruby-22-centos7~https://github.com/sclorg/ruby-ex.git
... | [RunNewApp->[PrintObj],PrintObj->[PrintObj],Complete->[Complete],Add,Complete] | Creates an application from a local source code combination and a Docker image that can be used to Create an application from a remote private repository and specify which existing secret to use. | if we're touching this, let's bring it up to a newer image version too. |
@@ -285,7 +285,7 @@ class TransformVisitor(NodeVisitor[Node]):
return WithStmt(self.expressions(node.expr),
self.optional_expressions(node.target),
self.block(node.body),
- self.optional_type(node.target_type))
+ se... | [TransformVisitor->[optional_expressions->[optional_expr],visit_func_def->[copy_argument],copy_ref->[visit_var],optional_expr->[expr],optional_block->[block],optional_names->[duplicate_name],block->[visit_block],types->[type],names->[duplicate_name],statements->[stmt],visit_lambda_expr->[copy_argument],blocks->[block],... | Return an astroid. WithStmt node as a new node with no children. | Interestingly, we do the opposite for assignments, i.e. copy only the analyzed type. I think that we should copy both analyzed and unanalyzed types both here and for assignments. |
@@ -14,6 +14,14 @@ import (
"github.com/urfave/cli"
)
+var (
+ stores = make(map[storage.Store]struct{})
+ LatestFlag = cli.BoolFlag{
+ Name: "latest, l",
+ Usage: "act on the latest container podman is aware of",
+ }
+)
+
const crioConfigPath = "/etc/crio/crio.conf"
func getRuntime(c *cli.Context) (*li... | [StringSlice,WithOCIRuntime,Stat,MatchString,DefaultConfig,Errorf,WithStorageConfig,Wrapf,Join,TypeOf,GlobalStringSlice,WithCNIConfigDir,Split,GlobalIsSet,GlobalString,NewRuntime,WithConmonPath,String,UpdateFromFile] | main import imports the libkpod config from the command line or from the cri parse config from global variables. | Don't change now, but I'm just wondering if this should default to True with BoolTFlag. It's a usability question and I could see it going either way. Something to ponder. |
@@ -78,6 +78,13 @@ class ProcessorNodeBase(msrest.serialization.Model):
self,
**kwargs
):
+ """
+ :keyword name: Required. Node name. Must be unique within the topology.
+ :paramtype name: str
+ :keyword inputs: Required. An array of upstream node references within the... | [PipelineTopology->[__init__->[super,get]],GrpcExtension->[__init__->[super,get]],CognitiveServicesVisionProcessor->[__init__->[super,get]],LivePipeline->[__init__->[super,get]],GrpcExtensionDataTransfer->[__init__->[super,get]],ImageFormatRaw->[__init__->[super]],SpatialAnalysisPersonCountOperation->[__init__->[super]... | Initialize a node with a single . | Should this be `OnvifHostname` |
@@ -332,7 +332,7 @@ class BidirectionalAttentionFlow(Model):
text_field_embedder = TextFieldEmbedder.from_params(vocab, embedder_params)
num_highway_layers = params.pop_int("num_highway_layers")
phrase_layer = Seq2SeqEncoder.from_params(params.pop("phrase_layer"))
- similarity_function... | [BidirectionalAttentionFlow->[from_params->[from_params]]] | Creates a bidirectional attention flow from a dictionary of model parameters. | You don't need this factory at all, you just call `MatrixAttention.from_params()`. |
@@ -516,9 +516,9 @@ function event_by_id($owner_uid = 0, $event_params, $sql_extra = '') {
intval($event_params["event_id"])
);
- if (dbm::is_result($r))
- return $r;
-
+ if (dbm::is_result($r)) {
+ return event_remove_duplicates($r);
+ }
}
/**
| [event_store->[get_hostname]] | query for an event by id. | Well one question: wouldn't it be better to, remove the duplicated entries from the db and avoid the creation of duplicates than to remove the duplicates every time from the array? |
@@ -148,10 +148,10 @@ module GobiertoAdmin
return if params[:version].blank?
version_number = params[:version].to_i
- index = version_number - @project.versions.length
- redirect_to(edit_admin_plans_plan_project_path(@plan, @project), alert: t(".unavailable_version")) and return if ver... | [ProjectsController->[destroy->[destroy],set_filters->[new],create->[new],new->[new],moderation_visibility_action->[new]]] | find_versioned_project returns the project with a ckey matching version number. | Use && instead of and. |
@@ -43,6 +43,7 @@ public class CaffeineCache implements io.druid.client.cache.Cache
{
private static final Logger log = new Logger(CaffeineCache.class);
private static final int FIXED_COST = 8; // Minimum cost in "weight" per entry;
+ private static final int MAX_DEFAULT_BYTES = 1024 * 1024;
private static f... | [CaffeineCache->[put->[put],doMonitor->[get],create->[create,CaffeineCache]]] | Imports a cache. Creates a cache object with the specified configuration. | There should be another `*1024` in here. |
@@ -289,8 +289,15 @@ func (w *watcher) listContainers(options types.ContainerListOptions) ([]*Contain
var result []*Container
for _, c := range containers {
var ipaddresses []string
+ var gateways []string
for _, net := range c.NetworkSettings.Networks {
- ipaddresses = append(ipaddresses, net.IPAddress)
+... | [Containers->[RUnlock,RLock],Stop->[stop],listContainers->[ContainerList],Start->[Unix,Unlock,cleanupWorker,Now,listContainers,Lock,Publish,watch,Add,Debug],Container->[Unlock,Now,RLock,Lock,RUnlock],watch->[Done,Unlock,Sprintf,listContainers,NewArgs,Now,Lock,Publish,Container,Events,Sleep,Err,Add,Debug],ListenStart->[... | listContainers lists all containers in the cluster. | Here, when requesting information from the daemon we could also get the Hostname, at least if we use inspect, not sure with list. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.