patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -108,6 +108,10 @@ const defaultCommands = {
option: '--skip-user-management',
desc: 'Skip the user management module during app generation',
},
+ {
+ option: '--unidirectional-relationships',
+ desc: 'Generate unidirectional relationships',
+ },
],
desc: `Cr... | [No CFG could be retrieved] | The command line interface for generating multiple applications. config is a configuration for the current application. | this doesn't look like an option, what about `--generate-unilateral-relationships` ? |
@@ -72,7 +72,8 @@ import org.joda.time.Instant;
*
* <ul>
* <li>Tracking the windows that are active (have buffered data) as elements arrive and triggers are
- * fired.
+ *
+ * fired.
* <li>Holding the watermark based on the timestamps of elements in a pane and releasing it when the
* trigger fires.
... | [ReduceFnRunner->[emit->[shouldDiscardAfterFiring],prefetchOnTrigger->[prefetchOnTrigger],processElement->[toMergedWindows],onTimers->[EnrichedTimerData,windowIsActiveAndOpen],OnMergeCallback->[prefetchOnMerge->[activeWindows,prefetchOnMerge],onMerge->[activeWindows,onMerge]],processElements->[windowsThatShouldFire,win... | This class manages the execution of a ReduceFn after a group by only. The ReduceFnRunner is responsible for computing the reduce function. | revert the new line added here? |
@@ -602,11 +602,11 @@ def read_raw_brainvision(vhdr_fname, montage=None,
eog : list or tuple of str
Names of channels or list of indices that should be designated
EOG channels. Values should correspond to the vhdr file
- Default is ('HEOGL', 'HEOGR', 'VEOGb').
+ Default is ``('HEOGL... | [read_raw_brainvision->[RawBrainVision],_get_eeg_info->[_read_vmrk_events]] | This function reads a single Brain Vision file from a file - like object. A RawBrainVision object containing the data of a single node in the B. | Add deprecation warning here too |
@@ -69,7 +69,7 @@ CavesNoiseIntersection::~CavesNoiseIntersection()
void CavesNoiseIntersection::generateCaves(MMVManip *vm,
- v3s16 nmin, v3s16 nmax, u8 *biomemap)
+ v3s16 nmin, v3s16 nmax, u16 *biomemap)
{
assert(vm);
assert(biomemap);
| [generateCaves->[getExtent,getRaw,MapNode,m_data,perlinMap3D,get,assert,contour,index], assert->[assert,getId],makeCave->[makeTunnel,size,MYMAX,getBiomeAtPoint,v3s16,addEvent,rangelim,assert,range,v3f,next],generateCaverns->[getExtent,MapNode,m_data,perlinMap3D,get,assert,MYMIN,index],makeTunnel->[isPosAboveSurface,get... | This method is called from the CavesNoiseIntersection class. This function is used to generate the roof of the map. Floor place nodes in the surface. | this should rather use `biome_t` to prevent any future mistakes |
@@ -118,9 +118,10 @@ class RestApiClient(object):
# TODO: Get fist an snapshot and compare files and download only required?
- # Download the resources
- contents = self.download_files(urls, self._output)
- return contents
+ # Download the resources to a temp folder
+ tem... | [RestApiClient->[auth->[JWTAuth],_get_json->[get_exception_from_error],_remove_conanfile_files->[check_credentials],upload_files->[_file_server_capabilities],_remove_package_files->[check_credentials],remove_packages->[check_credentials],remove_conanfile->[check_credentials],download_files->[_file_server_capabilities],... | Gets a dict of filename contents from a conan file. | I'd prefer if the temp folder were located in the conan local cache storage. Probably try to completely remove it after usage (maybe not after each download, but after an install). |
@@ -1135,7 +1135,7 @@ class ElggPlugin extends \ElggObject {
foreach ($spec as $entity) {
if (isset($entity['type'], $entity['subtype'], $entity['class'])) {
- update_subtype($entity['type'], $entity['subtype']);
+ elgg_set_entity_class($entity['type'], $entity['subtype']);
}
}
}
| [ElggPlugin->[getFriendlyName->[getDisplayName],getAllSettings->[getID,getStaticConfig],includeFile->[getID],setSetting->[getID],unsetAllUsersSettings->[getID],setUserSetting->[getID],getAllUserSettings->[getID,getStaticConfig],activateEntities->[getStaticConfig],deactivate->[canDeactivate,isActive,getID],__construct->... | Deactivate all entities. | This will have no effect. Can be removed |
@@ -59,7 +59,8 @@ public abstract class FileBasedExtractor<S, D> extends InstrumentedExtractor<S,
private Iterator<D> currentFileItr;
private String currentFile;
- private boolean readRecordStart;
+ private boolean hasNext = false;
+ private final boolean shouldSkipFirstRecord;
protected enum CounterNam... | [FileBasedExtractor->[downloadFile->[hasNext,getMessage,lineIterator,getFileStream,getPropAsBoolean,register,IOException,info,next],closeCurrentFile->[error,close],getSchema->[getProp],incrementBytesReadCounter->[getMessage,debug,inc,getFileSize,info],close->[getMessage,error,close],getHighWatermark->[info],readRecordI... | Abstract class for file based extractors. Initializes a list of files to pull on the first call to the method. | Please make sure the variable is properly initialized. |
@@ -174,13 +174,16 @@ class ProtobufGen(CodeGen):
DEFAULT_PACKAGE_PARSER = re.compile(r'^\s*package\s+([^;]+)\s*;\s*$')
OPTION_PARSER = re.compile(r'^\s*option\s+([^ =]+)\s*=\s*([^\s]+)\s*;\s*$')
+SERVICE_PARSER = re.compile(r'^\s*(service)\s+([^\s{]+).*')
TYPE_PARSER = re.compile(r'^\s*(enum|message)\s+([^\s{]+).... | [calculate_java_genfiles->[path],calculate_genfiles->[camelcase,string_value,bool_value],ProtobufGen->[_calculate_sources->[collect_sources->[is_gentarget]],javadeps->[resolve_deps],pythondeps->[resolve_deps]]] | Convert snake casing where present to camel casing Returns a dictionary of all genfiles for the given node - type. | There are dozens of ways to do this I guess. I would have changed the string.split('_') to re.split("[_-]", string) |
@@ -56,6 +56,10 @@ public enum SchedulingStrategy {
*/
TIMER_DRIVEN(1, "0 sec"),
/**
+ * NOTE: This option has been deprecated with the addition of the
+ * execution-node combo box. It still exists for backward compatibility
+ * with existing flows that still have this value for schedulingS... | [No CFG could be retrieved] | This class is used to configure the number of concurrent tasks and the scheduling strategy. | Probably should actually mark this option as deprecated using an annotation. |
@@ -28,10 +28,8 @@ final class DebugMenu extends JMenu {
add(SwingAction.of("Show Hard AI Logs", e -> ProAi.showSettingsWindow())).setMnemonic(KeyEvent.VK_X);
}
- add(new EnablePerformanceLoggingCheckBox());
add(SwingAction.of("Show Console", e -> {
- ErrorConsole.showConsole();
- ErrorC... | [DebugMenu->[getLocalPlayers,anyMatch,setMnemonic,add,EnablePerformanceLoggingCheckBox,initialize]] | Add menu items to the menu. | Normally I'd use `String.valueOf(true)` for this, but not really important |
@@ -52,6 +52,9 @@ class Search_Replace_Command extends WP_CLI_Command {
* [--verbose]
* : Prints rows to the console as they're updated.
*
+ * [--regex]
+ * : Runs the search using a regular expression. Using --regex slows the search-replace down significantly.
+ *
* ## EXAMPLES
*
* wp search-r... | [Search_Replace_Command->[__invoke->[setHeaders,setRows,display,get_row],php_handle_col->[update,run],sql_handle_col->[get_var,query,prepare],esc_like->[esc_like],get_columns->[get_results],get_table_list->[prepare,get_col]]] | This method is invoked by the command line interface. \ ~english Get the list of tables to use. | Can you include some more prominent "Warning: " with specific numbers as to how much it will slow things down? |
@@ -274,9 +274,13 @@ if avx_supported():
from .core_avx import _save_dygraph_dict
from .core_avx import _load_dygraph_dict
from .core_avx import _save_lod_tensor
+ from .core_avx import _save_lod_tensor_memory
from .core_avx import _load_lod_tensor
+ from .core_avx impo... | [pre_load->[get_dso_path,load_dso],get_dso_path->[run_shell_command],less_than_ver->[to_list],avx_supported->[asm_func],get_libc_ver->[run_shell_command],pre_load,get_libc_ver,less_than_ver,avx_supported,set_paddle_lib_path] | This module is used to import AVX and AVX_MODULEs. import avx core. | `_save_lod_tensor_memory` -> `_save_lod_tensor_to_memory`? |
@@ -1,5 +1,5 @@
"""Utilities related to determining the reachability of code (in semantic analysis)."""
-
+import platform
from typing import Tuple, TypeVar, Union, Optional
from typing_extensions import Final
| [contains_sys_version_info->[isinstance,is_sys_attr],infer_condition_value->[infer_condition_value,consider_sys_platform,consider_sys_version_info,isinstance],assert_will_always_fail->[infer_condition_value],infer_reachability_of_if_statement->[infer_condition_value,len,mark_block_unreachable,Block,mark_block_mypy_only... | Utilities related to determining the reachability of code. Checks if the if statement s body is reachable from the if block. | I don't think this import is needed? |
@@ -375,5 +375,13 @@ namespace Content.Server.GameObjects.Components.Chemistry
component.TryEject(user);
}
}
+
+ private class ReagentInventoryComparer : Comparer<ReagentDispenserInventoryEntry>
+ {
+ public override int Compare(ReagentDispenserInventoryEn... | [ReagentDispenserComponent->[TryEject->[UpdateUserInterface],Initialize->[Initialize],ExposeData->[ExposeData],TryClear->[UpdateUserInterface],EjectBeakerVerb->[Activate->[TryEject]],TryDispense->[UpdateUserInterface],SolutionChanged->[UpdateUserInterface],InteractUsing->[UpdateUserInterface],HandleMessage->[HandleMess... | Activate the component. | I would personally use `StringComparison.InvariantCultureIgnoreCase` here. |
@@ -2319,9 +2319,9 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
throw new InvalidParameterValueException("For creating a custom compute offering cpu and memory all should be null");
}
// if any of them is null, then all of them shoull be ... | [ConfigurationManagerImpl->[updateConfiguration->[start,updateConfiguration],commitVlan->[doInTransaction->[createVlanAndPublicIpRange]],deletePod->[checkIfPodIsDeletable],checkPodCidrSubnets->[getCidrAddress,getCidrSize],createPod->[createPod,checkPodAttributes],editPod->[editPod,podHasAllocatedPrivateIPs,checkPodAttr... | Creates a service offering. Creates a service offering with the specified parameters. create a new service offering object. Creates a service offering. This method is called to populate the command object with all the information that is needed to create. | `cpuSpeed` null check not required here, it is always not null as per the above changes. |
@@ -430,3 +430,18 @@ function update_1330()
return Update::SUCCESS;
}
+
+function update_1332()
+{
+ $condition = ["`is-default` IS NOT NULL"];
+ $profiles = DBA::select('profile', [], $condition);
+
+ while ($profile = DBA::fetch($profiles)) {
+ DI::profileField()->migrateFromProfile($profile);
+ }
+ DBA::close(... | [update_1191->[set,get,delete],update_1278->[t,set],update_1179->[set,get],update_1189->[set,get,delete],update_1260->[t,set],update_1330->[set,get,delete],update_1298->[getAvailableLanguages],update_1245->[set,get]] | Update the storage class in the database. | How many profile fields do you expect to update at large nodes? Will this work fast enough? I had this discussion with @annando in my last PR, so I've to ask :D |
@@ -36,6 +36,11 @@ return array(
'default' => array(),
),
+ 'community_packages_dir' => array(
+ 'default' => '~/.wp-cli-community-packages',
+ 'desc' => 'Location to install community packages',
+ ),
+
'disabled_commands' => array(
'file' => '<list>',
'default' => array(),
| [No CFG could be retrieved] | Returns an array of strings that describe the given PHP version of the WordPress command. Returns a JSON - serializable object with the given name. | Given that `WP_CLI_CONFIG_PATH` defaults to `~/.wp-cli/config.yml`, the default here should be `~/.wp-cli`, IMO. |
@@ -88,9 +88,9 @@ public class OAuth2AuthenticationService {
log.debug("successfully authenticated user {}", params.get("username"));
}
return ResponseEntity.ok(accessToken);
- } catch (Exception ex) {
+ } catch (HttpClientErrorException ex) {
log.er... | [No CFG could be retrieved] | This method is used to authenticate a user by username and password. get OAuth2 tokens from UAA. | We can throw the correct `InvalidPasswordException` by catching `HttpClientErrorException` instead of a generic `Exception`. For other errors (no UAA up or connection refused), the behavior is the same as before - the exception is thrown |
@@ -331,7 +331,13 @@ public abstract class BaseLivyInterpreter extends Interpreter {
private InterpreterResult getResultFromStatementInfo(StatementInfo stmtInfo,
boolean displayAppInfo) {
if (stmtInfo.output != null && stmtInfo.output.isError()) {
- r... | [BaseLivyInterpreter->[createSession->[getSessionInfo],CreateSessionRequest->[toJson->[toJson]],isSessionExpired->[getSessionInfo],LivyVersionResponse->[fromJson->[fromJson]],StatementInfo->[fromJson->[fromJson],StatementOutput->[toJson->[toJson]]],initLivySession->[getSessionKind],createRestTemplate->[close],callRestA... | Get interpreter result from statement info. get the next n - node in the tree. | why do you split the traceback into interpreter result instead of concating them via '\n'? Do you have an example that has multiple lines of trackback and attach a screenshot for that ? |
@@ -176,6 +176,18 @@ func (s Socket) toMapStr() common.MapStr {
return mapstr
}
+// entityID creates an ID that uniquely identifies this socket across machines.
+func (s Socket) entityID(hostID string) string {
+ h := system.NewEntityHash()
+ binary.Write(h, binary.LittleEndian, []byte(hostID))
+ binary.Write(h, b... | [reportState->[String],Hash->[String],toMapStr->[String],String,toMapStr] | toMapStr converts a Socket to a MapStr. | Have you compared with what goes into the `community_id` hash, for this one? I don't think we should use community_id. I'm just suggesting as a sanity check on what gets considered to calculate our entity_id. I think this is fine, though. I like the inclusion of the inode. |
@@ -244,8 +244,8 @@ class Version(amo.models.OnChangeMixin, amo.models.ModelBase):
The result is based on which app(s) the version targets.
"""
app_ids = [a.application for a in self.apps.all()]
- targets_mobile = amo.MOBILE.id in app_ids
- targets_other = any((id_ != amo.MOBILE... | [update_status->[update_status],Version->[is_public->[is_public],flush_urls->[flush_urls],transformer->[rollup,_compat_map],is_allowed_upload->[compatible_platforms],from_upload->[from_upload],transformer_activity->[rollup],VersionManager],watch_source->[save],inherit_nomination->[reset_nomination_time],License->[Licen... | Returns a dict of compatible file platforms for this version. | It's interesting that this didn't cause problems before... From what I can tell, it should have only made it possible to upload files for Android Firefox if they also claimed to support XUL Fennec, or specified a platform in the XPI. |
@@ -924,7 +924,14 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
webApp.setFilteredDoActionTriggerListener(actionListener);
webApp.setFilteredFieldTriggerListener(actionListener);
- adjuncts = new AdjunctManager(servletContext, pluginManager.ub... | [Jenkins->[getUser->[get],_cleanUpShutdownTcpSlaveAgent->[add],setNumExecutors->[updateComputerList],getPlugin->[getPlugin],_cleanUpCloseDNSMulticast->[add],getViewActions->[getActions],getJDK->[getJDKs,get],setViews->[addView],getCloud->[getByName],getStaplerFallback->[getPrimaryView],getStoredVersion->[getActiveInsta... | The main entry point for the Jenkins application. This function is called when a bug in Jenkins is not available. | I think you can always create the manager with the "classLoaderToAssign" object? |
@@ -67,7 +67,7 @@ module GobiertoBudgets
filter: {
bool: {
must: [
- {term: { ine_code: organization_id }},
+ {term: { organization_id: organization_id }},
{term: { kind: kind}},
{term: { year: year }},
... | [SearchController->[all_categories->[get_suggestions_from_custom_categories,to_i,respond_to,downcase,render,get_suggestions_from_default_categories,to_json,organization_id,json],get_suggestions_from_custom_categories->[nil?,compact,build_new_suggestion,code,domain,kind,each,area_name,map],get_year_codes->[index_forecas... | Get all year codes for a given organization_id kind and year. | Space inside { missing.<br>Space inside } missing. |
@@ -615,8 +615,8 @@ public class MovePanel extends AbstractMovePanel {
final boolean isCorrectTerritory =
(firstSelectedTerritory == null) || firstSelectedTerritory.equals(territory);
if (someOwned && isCorrectTerritory) {
- final Map<Territory, List<Unit>> highlight = ne... | [MovePanel->[sortTransportsToLoad->[getUnitOwner],allowSpecificUnitSelection->[getMovableMatch,getTransportsToLoad,sortUnitsToMove],sortTransportsToUnload->[getUnitOwner],getRouteNonForced->[getUnitOwner],getTransportsToLoad->[sortTransportsToLoad,getUnitOwner],setUpSpecific->[setFirstSelectedTerritory],sortUnitsToMove... | mouse enter. | ditto with singleton |
@@ -13,7 +13,7 @@
{
StringBuilder logOutput;
string testQueueName = "NServiceBus.Core.Tests.QueuePermissionsTests";
-
+
[OneTimeSetUp]
public void TestFixtureSetup()
{
| [QueuePermissionsTests->[Should_warn_if_queue_doesnt_exist->[ToString,Contain,That,CheckQueue],TestFixtureSetup->[Level,Debug,WriteTo,LogManager],Should_log_when_queue_is_remote->[ToString,Contain,That,CheckQueue],Should_warn_if_queue_has_public_access->[Create,Contain,That,FullControl,SetPermissions,CheckQueue,ToStrin... | TestFixtureSetup - TestFixture setup. | Making this [Teardown] should fix the issue `OneTimeSetUp` seems to be a misstake? |
@@ -252,6 +252,12 @@ func (e *ExtensionValidator) validateShoot(kindToTypesMap map[string]sets.String
}
for i, worker := range spec.Provider.Workers {
+ if worker.CRI != nil {
+ for j, cr := range worker.CRI.ContainerRuntimes {
+ requiredExtensions = append(requiredExtensions, requiredExtension{extensionsv1... | [waitUntilReady->[AssignReadyFunc],Validate->[waitUntilReady]] | validateShoot validates that the given Shoot is registered. Index of child nodes that are not registered. | Great thanks. Can we also have a unit test, please? :) |
@@ -71,11 +71,7 @@ class AutoMixedPrecisionLists(object):
# The set of ops that support fp16 calculation and are considered numerically-
# safe and performance-critical. These ops are always converted to fp16.
-white_list = {
- 'conv2d',
- 'matmul',
- 'mul',
-}
+white_list = {'conv2d', 'matmul', 'mul', 'fu... | [AutoMixedPrecisionLists->[_update_list->[remove,ValueError,add],__init__->[copy,_update_list]]] | Update the black and white lists according to the users s custom list. This set contains two types of cross entropy. | I think `fused_bn_add_activation` should be added in the `gray_list `. |
@@ -154,13 +154,10 @@ class CoercingEncoder(json.JSONEncoder):
return super().encode(self.default(o))
-def json_hash(
- obj: Any, digest: Optional[Digest] = None, encoder: Optional[Type[json.JSONEncoder]] = None
-) -> str:
+def json_hash(obj: Any, encoder: Optional[Type[json.JSONEncoder]] = None) -> str... | [Sharder->[is_in_shard->[compute_shard],compute_shard->[hash_all],__init__->[ensure_int->[InvalidShardSpec],InvalidShardSpec,ensure_int]],hash_all->[hexdigest,update],hash_file->[hexdigest,update],stable_json_sha1->[json_hash],hash_dir->[hash_file,hexdigest,update],json_hash->[hash_all],CoercingEncoder->[default->[_is_... | Hashes the given object by dumping to JSON. . | I don't understand why we would remove the `digest` option here when it's a very small amount of code and defaults to `None`? |
@@ -3,8 +3,17 @@
import React from "react";
import PropTypes from "prop-types";
import { connect } from "react-redux";
+import styled from "styled-components";
import Results from "./Results";
+import { Collapsible } from "yoast-components/composites/Plugin/Shared/components/Collapsible";
+
+const AnalysisHeader ... | [No CFG could be retrieved] | The readability analysis component. | We should avoid importing by using a full path. |
@@ -65,8 +65,10 @@ func (conCache *containerCache) Containers(state *State) []*Container {
if !isContainerID(id) {
continue
}
-
- if state == nil || *state == con.CurrentState() {
+ // filter by container state
+ // DO NOT use container.CurrentState as that can
+ // cause cache deadlocks
+ if state == ni... | [Containers->[CurrentState,RUnlock,RLock],Remove->[String,Lock,Unlock,Reference],Container->[RUnlock,RLock],put->[Reference,String],sync->[put,Lock,Unlock],Put->[put,Lock,Unlock],Parse] | Containers returns a list of containers in the cache. | Should we name those functions appropriately? Eg; StateWithoutLock() |
@@ -297,11 +297,15 @@ class BeamSearchDecoder(decoder.Decoder):
"""
finished, start_inputs = self._finished, self._start_inputs
+ log_probs = array_ops.one_hot( # shape(batch_sz, beam_sz)
+ array_ops.zeros([self._batch_size], dtype=dtypes.int32),
+ depth=self._beam_width, on_value=0.0,
+ ... | [tile_batch->[_tile_batch],_maybe_tensor_gather_helper->[_check_maybe],BeamSearchDecoder->[output_dtype->[BeamSearchDecoderOutput,_rnn_output_size],step->[_merge_batch_beams,_split_batch_beams],_maybe_split_batch_beams->[_check_maybe,_split_batch_beams],finalize->[FinalBeamSearchDecoderOutput],initialize->[BeamSearchDe... | Initialize the decoder. | make sure that this dtype matches that of the input. it could probably also be one of float64 or float16. |
@@ -132,8 +132,11 @@ class Layer(core.Layer):
out = mylayer(x)
"""
- # global setting
- framework._dygraph_tracer().train_mode()
+ # global setting in dygraph
+ # NOTE(chenweihang): nn.Layer also can be used in static mode,
+ # but _dygraph_tracer() can not... | [Layer->[named_sublayers->[named_sublayers],register_forward_post_hook->[HookRemoveHelper],train->[train],create_parameter->[create_parameter],__delattr__->[__delattr__],__init__->[_convert_camel_to_snake],eval->[eval],state_dict->[state_dict],__setattr__->[__setattr__,_remove_if_exist],set_state_dict->[_set_var,_check... | Sets this Layer and all its sublayers to training mode. Sets this Layer and all. | Actually, _dygraph_tracer().train_mode() can be removed. |
@@ -141,8 +141,9 @@ class FileViewer(object):
if self.is_search_engine() and self.src.endswith('.xml'):
shutil.copyfileobj(
- storage.open(self.src),
- open(os.path.join(self.dest, self.file.filename), 'w'))
+ s... | [DiffHelper->[is_extracted->[is_extracted],is_binary->[is_binary],cleanup->[cleanup],extract->[extract],__init__->[FileViewer],get_deleted_files->[keep->[get_url],is_search_engine,get_files,keep],is_diffable->[is_binary,is_directory],get_files->[get_files,get_url],read_file->[read_file],select->[is_search_engine,get_de... | Extracts the files from the source directory and returns True if successfully extracted False otherwise. | I wonder if leave all the files fixes out (other than the ones that aren't needed for tests to pass elsewhere) |
@@ -296,7 +296,7 @@ export default function initAdmin( jQuery ) {
// Clear the selection and move focus back to the trigger.
event.clearSelection();
// Handle ClipboardJS focus bug, see https://github.com/zenorocha/clipboard.js/issues/680
- jQuery( event.trigger ).focus();
+ jQuery( event.trigger )... | [No CFG could be retrieved] | Initializes the Copy to clipboard button for the Zapier API Key. Check if the user has toggled off the author archives titles metas content and if the. | 1. Make sure `Yoast SEO Premium` is active. 2. Go to `SEO` > `General` > `Features`. 3. Enable `Zapier integration`. 4. Click `Copy to clipboard` next to the Zapier API key. 5. The button should be focussed properly. 6. No `jQuery.fn.focus() event shorthand is deprecated` should be thrown. |
@@ -511,6 +511,15 @@ class WPSEO_Upgrade {
*/
private function upgrade_71() {
$this->cleanup_option_data( 'wpseo_social' );
+
+ // Move the breadcrumbs setting and invert it.
+ $title_options = $this->get_option_from_database( 'wpseo_titles' );
+
+ if ( array_key_exists( 'breadcrumbs-blog-remove', $title_opt... | [WPSEO_Upgrade->[upgrade_47->[query,prepare],upgrade_55->[add],upgrade_56->[query,get_table_name],upgrade_49->[get_blog_prefix,prepare,get_results],remove_about_notice->[get_id],upgrade_22->[cleanup_option_data],upgrade_63->[cleanup_option_data],upgrade_20->[cleanup_option_data,get_option_from_database,save_option_sett... | To upgrade to 7. 0. | I think doing `WPSEO_Options::save_option( 'wpseo_titles', 'breadcrumbs-display-blog-page', ! $title_options['breadcrumbs-blog-remove'] );` might be faster. |
@@ -196,11 +196,13 @@ public class ConcurrentLongHashMap<V> {
// A section is a portion of the hash map that is covered by a single
@SuppressWarnings("serial")
private static final class Section<V> extends StampedLock {
+
+ private static final AtomicIntegerFieldUpdater<Section> CAPACITY_UPDATER = Atom... | [ConcurrentLongHashMap->[keys->[size,forEach],putIfAbsent->[put],forEach->[forEach],Section->[forEach->[accept]],values->[size,forEach],computeIfAbsent->[put],containsKey->[get],get->[get],remove->[remove],clear->[clear],put->[put],keysLongHashSet->[size,forEach]]] | A section of the hash map. Returns the value of the specified key or null if there is no such key. | This needs to be volatile otherwise ++ or -- modifications of size can become inconsistent. during put, remove etc. |
@@ -386,3 +386,16 @@ func (w *Worker) subtaskFunc(subtaskKey string, processFunc ProcessFunc) subtask
}
}
}
+
+// UnclaimedTasks returns how many unclaimed tasks there are in the queue.
+func (w *Worker) UnclaimedTasks(ctx context.Context) (int, error) {
+ subTasks, err := w.subtaskCol.ReadOnly(ctx).Count()
+ if ... | [taskFunc->[subtaskFunc,Unmarshal,ReadOnly,Close,WithFilterDelete,WithFilterPut,Watch,WatchOne,runSubtask,Err,Done],RunSubtasksChan->[AddInt64,Printf,createSubtask,LoadInt64,deleteSubtasks,WithCancel,Unmarshal,Go,ReadOnly,WatchOneF,Err,runSubtaskBlock,Is,Wait],subtaskFunc->[Printf,ReadWrite,Error,NewSTM,Claim,IsErrNotF... | subtaskFunc returns a function that can be used to create a subtask that will run processFunc is the main callback for the claimCtx subtask. It is called by the. | heads up that because this isn't done transactionally, you may get a negative number here (and possibly even if it is done transactionally, I haven't checked the other code). |
@@ -184,10 +184,13 @@ def main():
return False
model_format = 'onnx'
+ model_dir = get_model_dir(model)
+
expanded_mo_args = [
string.Template(arg).substitute(dl_dir=args.download_dir / model.subdirectory,
mo_dir=m... | [convert_to_onnx->[printf,subprocess],JobWithQueuedOutput->[cancel->[cancel]],main->[start->[JobWithQueuedOutput,QueuedOutputContext],convert->[convert_to_onnx,printf,subprocess],complete,DirectOutputContext,cancel,convert],main] | Main function of the model conversion script. Check if a object is present in the system. Convert a object to IR. | I don't think `model_dir` is the best name for this. First, `dl_dir` and `conv_dir` also pertain to the model. Second, this directory doesn't have the model itself in it. IMO, it should be named `config_dir`, since it's the directory that contains the model config (and will probably contain the AC config for the model ... |
@@ -74,9 +74,12 @@ class Embedding(TokenEmbedder, Registrable):
construct it in the original training. We store vocab_namespace used during the original
training as an attribute, so that it can be retrieved during fine-tuning.
pretrained_file : `str`, (optional, default=None)
- Used to kee... | [EmbeddingsTextFile->[close->[close],__exit__->[close],_get_the_only_file_in_the_archive->[format_embeddings_file_uri],__init__->[parse_embeddings_file_uri]],parse_embeddings_file_uri->[EmbeddingsFileURI]] | Initialize a embedding module. Index of the n - node vectors in the model. | a URL instead of an URL? Or is that a British / American difference? |
@@ -1465,7 +1465,9 @@ export class AmpStory extends AMP.BaseElement {
actions.execute(this.sidebar_, 'open', /* args */ null,
/* source */ null, /* caller */ null, /* event */ null,
ActionTrust.HIGH);
+ this.openMask_()
} else {
+ this.closeMask_();
this.side... | [AmpStory->[pauseCallback->[TOGGLE_PAUSED,PAUSED_STATE],buildSystemLayer_->[element],onPausedStateUpdate_->[PLAYING,PAUSED],registerAndPreloadBackgroundAudio_->[upgradeBackgroundAudio,childElement,tagName],constructor->[documentStateFor,timerFor,forElement,getStoreService,registerServiceBuilder,platformFor,TOGGLE_RTL,i... | On sidebar state update. | Nit: since this file is unfortunately a 2k+ lines monster with a lot of different things, what do you think of adding something like `opacity` in the same, ie `openOpacityMask`? |
@@ -263,6 +263,7 @@ public class WorkItemStatusClient {
return status;
}
+ // todo this method should return List<CounterUpdate> instead of setting it to WorkitemStatus
@VisibleForTesting
synchronized void populateCounterUpdates(WorkItemStatus status) {
if (worker == null) {
| [WorkItemStatusClient->[extractMsecCounters->[extractMsecCounters],createStatusUpdate->[populateMetricUpdates],reportSuccess->[uniqueWorkId],extractThrottleTime->[extractThrottleTime],reportError->[uniqueWorkId]]] | Creates a status update. | Please add a username and/or jira |
@@ -113,7 +113,7 @@ class NginxHttp01(common.ChallengePerformer):
:returns: list of :class:`certbot_nginx.obj.Addr` to apply
:rtype: list
"""
- addresses = []
+ addresses = [] # type: List
default_addr = "%s" % self.configurator.config.http01_port
ipv6_addr = "... | [NginxHttp01->[_make_server_block->[_default_listen_addresses],_make_or_mod_server_block->[_make_server_block,_location_directive_for_achall],_location_directive_for_achall->[_get_validation_path]]] | Finds the default addresses for a challenge block to listen on. | I think this should be `List[obj.Addr]`. |
@@ -140,6 +140,13 @@ def test_dipole_fitting(tmpdir):
rank='info') # just to test rank support
assert isinstance(residual, Evoked)
+ # Test conversion of dip.pos to MNI coordinates.
+ dip_mni_pos = dip.to_mni('sample', fwd['mri_head_t'],
+ su... | [test_len_index_dipoles->[_compare_dipoles,_check_dipole],test_bdip->[_check_dipole],test_io_dipoles->[_compare_dipoles]] | Test dipole fitting. Check if a residue in the source is missing a missing residue in the target. Returns the total number of non - zero values of a . | can you try making one call with the str input passing the file name? find the -trans.fif file in the testing data. just to make sure we test the different input types |
@@ -43,6 +43,15 @@ public interface IndexerMetadataStorageCoordinator
*/
List<DataSegment> getUsedSegmentsForInterval(String dataSource, Interval interval);
+ /**
+ * Get all used segments and the created_date of these segments in a given datasource and interval
+ *
+ * @param dataSource The datasource... | [No CFG could be retrieved] | Get the list of used segments for the given interval. | I suggest to modify `List<DataSegment> getUsedSegmentsForInterval(String dataSource, Interval interval);` to return `List<Pair<DataSegment, String>>` rather than adding a new method. |
@@ -206,7 +206,7 @@ App.StackService = DS.Model.extend({
}.property('coSelectedServices', 'serviceName'),
isHiddenOnSelectServicePage: function () {
- var hiddenServices = ['MAPREDUCE2'];
+ var hiddenServices = [];
return hiddenServices.contains(this.get('serviceName')) || !this.get('isInstallable') ... | [No CFG could be retrieved] | Determines if a single service is tagged as a primary DFS. Determines if the service required for reporting hadoop service metrics. | Have we made a decision to remove this? If yes, the fix would include removing the entire framework for co-selected services. |
@@ -7,7 +7,7 @@ from pants.testutil.pants_integration_test import run_pants
_no_explicit_setting_msg = "An explicit setting will get rid of this message"
_no_repo_id_msg = 'set `repo_id = "<uuid>"` in the [anonymous-telemetry] section of pants.toml'
-_bad_repo_id_msg = "The repo_id must be between 30 and 60 charact... | [test_warn_if_no_explicit_setting->[assert_success,run_pants],test_warn_if_repo_id_unset->[assert_success,run_pants],test_warn_if_repo_id_invalid->[assert_success,run_pants],test_no_warn_if_explicitly_off->[assert_success,run_pants],test_no_warn_if_explicitly_on->[assert_success,run_pants]] | Test if there is no explicit setting. | To validate that this is fixed, dropping `use_pantsd` from any of these that are expecting to fail would be good. Since the message is in the constructor, it should be rendered deterministically before the run actually starts. |
@@ -131,6 +131,13 @@ class AnalyticsManager implements AnalyticsManagerInterface
$domainEntity = $this->findOrCreateNewDomain($domain);
$analytics->addDomain($domainEntity);
}
+
+ switch ($analytics->getType()) {
+ case 'google_tag_manager':
+ break;
+... | [AnalyticsManager->[remove->[remove],removeMultiple->[remove],update->[find]]] | Sets data for given analytics. | i dont think this is needed :) |
@@ -76,7 +76,7 @@ class AddressField(fields.Field):
try:
value = unhexlify(value[2:])
- except TypeError:
+ except binascii.Error:
self.fail('invalid_data')
if len(value) != 20:
| [AddressListSchema->[AddressField],ChannelRequestSchema->[AddressField],BaseOpts->[__init__->[__init__]],PartnersPerTokenSchema->[AddressField],TransferSchema->[AddressField],ChannelSchema->[AddressField],TokenSwapsSchema->[AddressField],AddressSchema->[AddressField]] | Deserialize a value. | nice, did not know binascii had its own python3 exceptions. |
@@ -506,7 +506,10 @@ class MatrixTransport:
peer_address=peer_address,
)
return
- self._receive_message(message)
+ if isinstance(message, Delivered):
+ self._receive_delivered(message)
+ else:
+ self._r... | [MatrixTransport->[_handle_presence_change->[UserPresence],_get_room_id_for_address->[_set_room_id_for_address],_send_queued_messages->[start_health_check,send_async],_update_address_presence->[_get_user_presence],_get_user_presence->[UserPresence],_validate_userid_signature->[_recover],_cachegetter]] | Handle a message received from a room. Receive a message from the peer. | the matrix transport doesn't need to do this, it's handled by the node logic. |
@@ -3431,6 +3431,18 @@ static FnCallResult FnCallMergeData(EvalContext *ctx, ARG_UNUSED const Policy *p
return FnFailure();
}
+ // Fail on json primitives, only merge containers
+ if (JsonGetElementType(json) != JSON_ELEMENT_TYPE_CONTAINER)
+ {
+ if (allocated)
+ ... | [No CFG could be retrieved] | This function free the memory allocated by the variable and merge the data into a single container variable Get the JSON representation of the first in the containers. | Memory leak. You have to `SeqDestroy(containers)`. |
@@ -894,7 +894,7 @@ func loadServices(client Client, namespace string, targets []v1alpha1.HTTPRouteF
var portStr string
for _, subset := range endpoints.Subsets {
for _, p := range subset.Ports {
- if portName == p.Name {
+ if portSpec.Name == p.Name {
port = p.Port
break
}
| [makeGatewayStatus->[New,Now,Append],createGatewayConf->[makeGatewayStatus,fillGatewayConf,UpdateGatewayStatus,Errorf],entryPointName->[FormatInt,HasSuffix,Errorf],fillGatewayConf->[Normalize,Sprintf,GetHTTPRoutes,Now,SelectorFromSet,entryPointName],newK8sClient->[FromContext,Infof,Sprintf,Parse,Errorf,Getenv],Provide-... | DroppedRoutes reason. getService returns the service object and the service object for the next service. | that's a good cleanup. we should check if we can do the same in other places of the codebase. |
@@ -81,10 +81,6 @@ setup(
"azure.keyvault",
]
),
+ python_requires=">=3.7",
install_requires=["azure-common~=1.1", "azure-core<2.0.0,>=1.15.0", "msrest>=0.6.21", "six>=1.11.0"],
- extras_require={
- ":python_version<'3.0'": ["azure-keyvault-nspkg"],
- ":python_version... | [find_packages,setup,search,replace,read,format,join,RuntimeError,open,Exception] | Requires the Azure key vault to be installed. | you shouldn't need six anymore i think |
@@ -523,7 +523,7 @@ public class VmwareStorageManagerImpl implements VmwareStorageManager {
String details = null;
boolean success = false;
- String newVolumeName = UUID.randomUUID().toString().replaceAll("-", "");
+ String newVolumeName = UUID.randomUUID().toString().replace("-", "");... | [VmwareStorageManagerImpl->[createOvaForVolume->[execute],copyVolumeToSecStorage->[exportVolumeToSecondaryStroage],setVolumeToPathAndSize->[getVMSnapshotChainSize],deleteDir->[execute],restoreVolumeFromSecStorage->[execute],createOva->[execute],execute->[setVolumeToPathAndSize,getNewDiskMap],createTemplateFromVolume->[... | Execute the CreateVolumeFromSnapshotCommand. | we need to use replaceAll here. The UUID contains 4 "-". |
@@ -82,6 +82,8 @@ def get_product_variant_payload(variant: ProductVariant):
return {
"id": variant.id,
"weight": str(variant.weight or ""),
+ "is_preorder": variant.is_preorder,
+ "preorder_end_date": variant.preorder_end_date,
**get_default_images_payload(images),
}
... | [get_order_line_payload->[get_product_variant_payload,get_product_payload],get_default_order_payload->[get_discounts_payload,get_lines_payload,get_address_payload],send_fulfillment_confirmation_to_customer->[get_default_fulfillment_payload],send_fulfillment_update->[get_default_fulfillment_payload],get_product_payload-... | Get the payload of a product variant. This method is called when a tax rate is not available. It is called by the unit. | Should we add global_treshold here? |
@@ -49,6 +49,10 @@ def run():
parser.add_option("-n", "--no-decimate", dest="no_decimate",
help="Disable medium and sparse decimations "
"(dense only)", action='store_true')
+ parser.add_option("-i", "--allow-incomplete", dest="allow_incomplete",
+ ... | [_run->[check_seghead->[exists,join],check_seghead,get_subjects_dir,getenv,_check_file,join,RuntimeError,info,enumerate,ETSContext,dict,copy,replace,write_bem_surfaces,len,format,exists,zip,decimate_surface,run_subprocess,_surfaces_to_bem],_check_file->[IOError,isfile],run->[print,parse_args,_run,vars,getenv,print_help... | Run command. | it's not a dupe of the --force option? |
@@ -239,9 +239,9 @@ RtpsUdpSendStrategy::send_single_i(const iovec iov[], int n,
std::memcpy(iter, iov[i].iov_base, iov[i].iov_len);
iter += iov[i].iov_len;
}
- const ssize_t result = link_->unicast_socket().send(buffer, iter - buffer, addr);
+ const ssize_t result = link_->unicast_socket().send(buffer, ... | [No CFG could be retrieved] | private static int send_single_i = 0 ; - - - - - - - - - - - - - - - - - -. | The log message from below is going to log the wrong address. Probably better to bring this up to above the `#ifdef` as its own variable. |
@@ -2591,9 +2591,11 @@ export class AmpStory extends AMP.BaseElement {
const nextPageEl = nextPage.element;
const nextPageId = nextPageEl.id;
- pageToBeInsertedEl.setAttribute(advanceAttr, nextPageId);
- pageToBeInsertedEl.setAttribute(Attributes.AUTO_ADVANCE_TO, nextPageId);
- nextPageEl.setAttrib... | [AmpStory->[onBookendStateUpdate_->[BOOKEND_ACTIVE,setHistoryState],isBrowserSupported->[Boolean,CSS],initializeMediaQueries_->[forEach,getMediaQueryService,onMediaQueryMatch,getAttribute],isStandalone_->[STANDALONE],onUIStateUpdate_->[DESKTOP_PANELS,DESKTOP_FULLBLEED,MOBILE,isExperimentOn],closeOpacityMask_->[dev,togg... | Inserts a page before a given page. | Could you please give more context around this? Is this just a small optimization, or something that you needed to do for any reason? |
@@ -62,6 +62,12 @@ class CallTransformer(gast.NodeTransformer):
return node
func_str = ast_to_source_code(node.func).strip()
+
+ # NOTE(liym27): Don't convert `pad.set_trace` even if the convertion doesn't work finally, because
+ # it is clearer to see where it is called from.
+ ... | [CallTransformer->[visit_Call->[_no_need_convert_call]]] | Convert a call to a static function call. | Should we make this string a constant? |
@@ -74,6 +74,17 @@ final class SchemaFactory implements SchemaFactoryInterface
$items = $schema['items'];
unset($schema['items']);
+ switch ($schema->getVersion()) {
+ case Schema::VERSION_JSON_SCHEMA:
+ $mappingPropDefinition = ['type' => ['strin... | [SchemaFactory->[buildSchema->[buildSchema,getDefinitions,getItemsDefinitionKey,getRootDefinitionKey],__construct->[addDistinctFormat]]] | Builds a schema with a reserved key. Schema for a . | Could you initialize the property before the switch and rename it `$nullableStringDefinition`? In case we want to reuse it elsewhere. |
@@ -18,7 +18,7 @@ module SignUp
Analytics::USER_REGISTRATION_AGENCY_HANDOFF_COMPLETE,
service_provider_attributes
)
- redirect_to after_sign_in_path_for(current_user)
+ redirect_to sp_session[:request_url]
end
private
| [CompletionsController->[verify_confirmed->[redirect_to,identity_not_verified?],service_provider_attributes->[sp_name],update->[track_event,redirect_to,after_sign_in_path_for],show->[track_event,present?,redirect_to,user_fully_authenticated?],before_action]] | update the nag record and redirect to the verify_path if the record is not found. | would someone ever get to this point without being referred by an SP? |
@@ -74,7 +74,8 @@ public class KsqlEngine implements KsqlExecutionContext, Closeable {
processingLogContext,
serviceInfo.serviceId(),
new MetaStoreImpl(functionRegistry),
- (engine) -> new KsqlEngineMetrics(engine, serviceInfo.customMetricsTags()));
+ (engine) -> new KsqlEngineM... | [KsqlEngine->[prepare->[prepare],getServiceContext->[getServiceContext],parse->[parse],execute->[execute,getServiceContext],getPersistentQuery->[getPersistentQuery],getMetaStore->[getMetaStore],close->[close],registerQuery->[registerQuery]]] | Creates a new instance of KsqlEngine. Update engine metrics. | why not pass in the whole `ServiceInfo`? |
@@ -498,7 +498,7 @@ public class SlaveComputer extends Computer {
@Override public Long call() {
Channel c = Channel.current();
if (c == null) {
- return Long.valueOf(-1);
+ return (long) -1;
}
return resource ? c.resourceLoading... | [SlaveComputer->[getRetentionStrategy->[getNode,getRetentionStrategy],setNode->[setNode],getClassLoadingTime->[call],getResourceLoadingCount->[call],getNode->[getNode],grabLauncher->[getLauncher],getDelegatedLauncher->[getLauncher],taskCompleted->[taskCompleted],taskCompletedWithProblems->[taskCompletedWithProblems],ge... | Returns the loading time of the current channel or - 1 if the current channel is not currently. | why not `-1L` ? |
@@ -489,10 +489,10 @@ namespace System.Xml.Linq
{
public XStreamingElement(System.Xml.Linq.XName name) { }
public XStreamingElement(System.Xml.Linq.XName name, object content) { }
- public XStreamingElement(System.Xml.Linq.XName name, params object[] content) { }
+ public XStreaming... | [No CFG could be retrieved] | Add method to add content to the list of objects. | Should this be `object? content`? |
@@ -51,6 +51,17 @@ def get_endpoint(server):
return u'{server}/1.0/sign_addon'.format(server=server)
+def get_id(addon):
+ """Return the addon GUID if <= 64 chars, or its sha256 hash otherwise.
+
+ We don't want GUIDs longer than 64 chars: bug 1203365.
+ """
+ guid = addon.guid
+ if len(guid) <=... | [sign_file->[get_endpoint,call_signing,supports_firefox],call_signing->[SigningError]] | Get the jar signature and send it to the signing server. | Does the id need to be prefixed with sha256: or something so that the client can detect if it has been hashed? Or will it be able to do that by looking at other data and know this has been hashed? |
@@ -1479,7 +1479,13 @@ namespace System.Windows.Forms
public override AccessibleObject GetFocused()
{
+ if (!CheckedListBox.IsHandleCreated)
+ {
+ return null;
+ }
+
int index = CheckedListBox.FocusedIndex;
+
... | [CheckedListBox->[WmReflectCommand->[WmReflectCommand,LbnSelChange],OnBackColorChanged->[OnBackColorChanged],ObjectCollection->[Add->[SetItemCheckState,Add]],CheckedItemCollection->[IndexOf->[IndexOf],IndexOfIdentifier->[IndexOfIdentifier],Contains->[IndexOf]],OnFontChanged->[OnFontChanged],CheckedListBoxAccessibleObje... | GetFocused - gets the focused object. | [nit] This empty line is not needed. Personally for me it breaks the logical block - "get value, check value" |
@@ -135,8 +135,9 @@ public class MessageAttachmentsTestCase extends AbstractELTestCase
DefaultMuleMessage message = new DefaultMuleMessage("", muleContext);
message.addInboundAttachment("foo", Mockito.mock(DataHandler.class));
message.addInboundAttachment("bar", Mockito.mock(DataHandler.class... | [MessageAttachmentsTestCase->[outboundPutAll->[assertEquals,getClass,evaluate,DefaultMuleMessage],outboundValues->[size,mock,addOutboundAttachment,evaluate,contains,DefaultMuleMessage,assertEquals],outboundInboundRemove->[assertTrue,mock,addOutboundAttachment,evaluate,DefaultMuleMessage,assertFalse],assignValueToInboun... | Checks if inbound key set contains a message. | why is this test case affected by removing asm? this is a smell that something got broken |
@@ -271,7 +271,15 @@ def affine(img, matrix, interpolation=0, fill=None):
@torch.jit.unused
-def rotate(img, angle, interpolation=0, expand=False, center=None, fill=None):
+def rotate(
+ img: Image.Image,
+ angle: float,
+ interpolation: int = 0,
+ expand: bool = False,
+ center: Optional[Tuple[int,... | [autocontrast->[autocontrast,_is_pil_image],adjust_brightness->[_is_pil_image],vflip->[_is_pil_image],pad->[_is_pil_image,pad],_get_image_num_channels->[_is_pil_image],crop->[_is_pil_image,crop],adjust_gamma->[_is_pil_image],resize->[resize,_is_pil_image],adjust_saturation->[_is_pil_image],adjust_sharpness->[_is_pil_im... | Rotate an image by angle. | Please apply the same as I suggested above here and anywhere else. |
@@ -337,7 +337,10 @@ require 'mocha/setup'
context 'without error on an assignment that already has criteria' do
setup do
- post_as @admin, :create, :assignment_id => @assignment.id, :flexible_criterion => {:flexible_criterion_name => 'first', :max => 10}
+ post_as @admin, :create,
+... | [FlexibleCriteriaControllerTest->[position,find,size,render_template,post_as,fixture_file_upload,flexible_criteria,flexible_criterion_name,assert_raise,put,should,respond_with,assert_equal,body,post,returns,destroy_all,assigns,t,assert_not_nil,header,delete_as,get_as,make,id,delete,context,assert_response,get,assert,se... | Initialize the administration section. on : upload on a single node with file containing incomplete records. | Line is too long. [83/80] |
@@ -42,6 +42,12 @@ namespace Microsoft.Extensions.Configuration
{
throw new InvalidOperationException(SR.StreamConfigurationProvidersAlreadyLoaded);
}
+
+ if (Source.Stream == null)
+ {
+ throw new NullReferenceException("Source.Stream");
+... | [StreamConfigurationProvider->[Load->[StreamConfigurationProvidersAlreadyLoaded,Stream,Load],nameof]] | Load the configuration providers. | Never throw a NullReferenceException explicitly. This should be an `InvalidOperationException`. #Closed |
@@ -198,6 +198,17 @@ Route::group(['middleware' => ['auth'], 'guard' => 'auth'], function () {
Route::permanentRedirect('demo', '/');
});
+// routes that don't need authentication
+Route::group([], function () {
+ // Ajax routes
+ Route::group(['prefix' => 'ajax'], function () {
+ // misc ajax cont... | [group,middleware,where,only,name] | Register the routes for the application. Register the routes for the legacy auth and unauth routes. | Don't really need the groups here, you can just set it on one line (or one group). |
@@ -40,8 +40,9 @@ module GobiertoPeople
ends_at: event.ends_at,
state: event.state,
locations: [],
- attendees: []
- }
+ attendees: [],
+ integration_name: 'google'
+ }.merge(attrs)
end
def valid_event_form
| [CalendarSyncEventFormTest->[test_error_messages_with_invalid_attributes->[save,assert_equal,size],nelson->[gobierto_people_people],site->[sites],test_save_event_out_of_sync_range->[new,sync_range_end,merge,sync_range_start,refute,save,day],invalid_event_form->[id,new],valid_event_form->[new],test_scopes_event_search_o... | The event attributes that are not found in the calendar. These attributes are required for the calendar. | Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping. |
@@ -197,8 +197,10 @@ class DLSDKLauncher(Launcher):
optional=True, is_directory=True, description="TF Object Detection API Config."
),
'_tf_custom_op_config_dir': PathField(
- optional=True, is_directory=True, description="TF Custom Operation Config."
+ ... | [DLSDKLauncher->[parameters->[CPUExtensionPathField],_prepare_bitstream_firmware->[_is_fpga],_set_affinity->[_devices_list],get_cpu_extension->[get_cpu_extensions_list],create_ie_plugin->[get_cpu_extension,_is_vpu,set_nireq,_is_multi,_devices_list],_create_network->[output_preprocessing,_set_batch_size,_is_hetero,_set_... | Returns a dict of all the parameters of the Kaldi model. Parameters for a single - device mode. | Shouldn't the description say it's a prefix, like it does for `_tf_custom_op_config_dir`? |
@@ -475,11 +475,10 @@ def lod_tensor_to_array(x, table):
def array_to_lod_tensor(x, table):
- """This function performs the operations that converts an array to
- an LOD_Tensor.
+ """Convert a LoD_Tensor_Aarry to an LoDTensor.
Args:
- x (Variable|list): The array that needs to be converte... | [IfElseBlockGuard->[__exit__->[__exit__],__enter__->[__enter__],__init__->[block]],DynamicRNN->[_parent_block_->[block],block->[array_write,block,increment,less_than,array_to_lod_tensor],update_memory->[_assert_in_rnn_block_],__init__->[While],output->[_assert_in_rnn_block_,array_write],step_input->[_assert_in_rnn_bloc... | This function performs the operations that converts an array to an LOD_Tensor. | Should `converted to a tensor` be `converted to a LoDTensor` here |
@@ -58,7 +58,6 @@ function cleanupOldFiles(generator) {
generator.removeFile(`${ANGULAR_DIR}shared/auth/user-route-access-service.ts`);
generator.removeFile(`${ANGULAR_DIR}shared/language/language.constants.ts`);
generator.removeFile(`${ANGULAR_DIR}shared/language/language.helper.ts`);
- ... | [No CFG could be retrieved] | removeFile and removeFolder methods should be called in order to remove all files and folders that remove all karma components from the test source. | Revert this change. And add removed modal files to jhipster 7 cleanup. |
@@ -143,7 +143,7 @@ func (ir *Runtime) NewFromLocal(name string) (*Image, error) {
// New creates a new image object where the image could be local
// or remote
-func (ir *Runtime) New(ctx context.Context, name, signaturePolicyPath, authfile string, writer io.Writer, dockeroptions *DockerRegistryOptions, signingopt... | [RepoDigests->[Names,Digest],InputIsID->[ID],GetChildren->[TopLayer,GetImages],ociv1Image->[toImageRef],getImage->[newFromStorage],GetParent->[TopLayer,Layer,GetImages],GetConfigBlob->[ID,toImageRef],GetImages->[newFromStorage],Shutdown->[Shutdown],toStorageReference->[ID],imageInspectInfo->[toStorageReference],Save->[... | New creates a new image from the given name signature policy path authfile and label. | We really need to convert this to accept a struct at some point, the signature has gotten well and truly out of hand |
@@ -125,6 +125,11 @@ public class DbConnector
dataSource.setPassword(config.getDatabasePassword());
dataSource.setUrl(config.getDatabaseConnectURI());
+ if (config.isValidationQuery()) {
+ dataSource.setValidationQuery("SELECT 1");
+ dataSource.setTestOnBorrow(true);
+ }
+
return dataSo... | [DbConnector->[createConfigTable->[createTable,format],createTable->[withHandle->[info,format,isEmpty,select,execute],withHandle,warn],createSegmentTable->[createTable,format],createRuleTable->[createTable,format],getDatasource->[getDatabaseConnectURI,getDatabaseUser,getDatabasePassword,setUrl,setPassword,BasicDataSour... | getDataSource - get DataSource. | Should we let the validation query be set as a parameter? |
@@ -265,8 +265,8 @@ namespace Kratos
if (key != 0) {// NOTE: key == 0 is the MainModelPart
if (colors.find(key) != colors.end()) {
for (auto sub_model_part_name : colors[key]) {
- ModelPart& r_sub_model_part = SubModelPartsListUti... | [first_model_part->[find,KRATOS_CHECK_EQUAL,CreateNewNode,ElementsEnd,pGetNode,NodesEnd,pGetProperties,end,CreateNewElement,AddElements,GetSubModelPartNames,NumberOfElements,pGetElement,AddNode,KRATOS_CHECK_NOT_EQUAL,ComputeSubModelPartsList,GetSubModelPart,Id,AddNodes,NumberOfNodes,Nodes,CreateSubModelPart,Elements,Ad... | Tests if a test case is in a suite of Kratos sub - modelparts. Add nodes to random modelparts. Create new random 2D3N element. ZSubModelPart3 - Create the second model part. Names - Get all sub - model parts names in the model. | why do you need a Pointer anyway? |
@@ -2699,7 +2699,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver {
'qb_where' => array(),
'qb_orderby' => array(),
'qb_keys' => array(),
- 'qb_limit' => FALSE
+ 'qb_limit' => FALSE,
)
);
}
| [CI_DB_query_builder->[not_group_start->[group_start],get->[from,limit],_reset_select->[_reset_run],_merge_cache->[_track_aliases],having->[_wh],update->[where,set,limit],get_compiled_select->[from],_compile_select->[_limit,_from_tables],replace->[set],or_group_start->[group_start],_reset_write->[_reset_run],or_having-... | Reset the write table. | no need of comma here (and some spaces after the comma as far as I can see)... |
@@ -55,9 +55,10 @@ func VerifyAndCreateValidatorFromMsg(
wrapper.Delegations = []staking.Delegation{
staking.NewDelegation(v.Address, msg.Amount),
}
- wrapper.Snapshot.Epoch = epoch
- wrapper.Snapshot.NumBlocksSigned = big.NewInt(0)
- wrapper.Snapshot.NumBlocksToSign = big.NewInt(0)
+ zero := big.NewInt(0)
+ wra... | [CreateValidatorFromNewMsg,UpdateValidatorFromEditMsg,GetStakingInfo,Set,Add,GetBalance,Cmp,New,IsNil,Bytes,Sub,Sign,Wrapf,Equal,ReadValidatorSnapshot,Int64,NewDelegation,GT,IsValidator,MustAddressToBech32,SetUint64,Undelegate,NewInt,String,Abs,TotalInUndelegation,SanityCheck] | VerifyAndCreateValidatorFromMsg verifies the message is a valid validator for the given block number check if the message has a valid block number and if so update it. | don't change LastEpochInCommittee. It's wrong here. LastEpochInCommittee is 0 if the validator is never selected in committee (new validator) |
@@ -167,6 +167,9 @@ class RepoFileSystem(BaseFileSystem): # pylint:disable=abstract-method
def isdir(self, path): # pylint: disable=arguments-differ
fs, dvc_fs = self._get_fs_pair(path)
+ if dvc_fs and dvc_fs.repo.dvcignore.is_ignored_dir(path):
+ return False
+
try:
... | [RepoFileSystem->[metadata->[metadata,stat,_get_fs_pair,_get_repo],isfile->[exists,_get_fs_pair],stat->[stat,_get_fs_pair],_walk->[is_dvc_repo->[_is_dvc_repo],_subrepo_walk,_walk,_dvc_walk],_dvc_walk->[_dvc_walk],info->[_get_fs_pair,info],walk_files->[walk],exists->[exists,_get_fs_pair],isexec->[exists,isexec,_get_fs_p... | Check if path is a directory. | ignore_subrepos is need here. |
@@ -87,8 +87,9 @@ public class SecurityContextPropagationChannelInterceptor
SecurityContextHolder.setContext(originalContext);
}
}
- catch (Throwable t) {
+ catch (Throwable t) {//NOSONAR - ok, we re-throw below
SecurityContextHolder.clearContext();
+ throw t;
}
}
| [SecurityContextPropagationChannelInterceptor->[obtainPropagatingContext->[getAuthentication,getTargetClass,isAssignableFrom],afterMessageHandled->[cleanup],populatePropagatedContext->[setAuthentication,getContext,set,createEmptyContext,setContext],cleanup->[clearContext,equals,get,remove,setContext],createEmptyContext... | This method is called when the thread is exiting. | I think it's safe to just eat it - we're about to return to the task executor |
@@ -14,6 +14,8 @@ class OpenidConnectUserInfoPresenter
iss: root_url,
email: email_from_sp_identity(identity),
email_verified: true,
+ alternate_emails: alternate_emails_from_sp_identity(identity),
+ alternate_emails_verified: true,
}
info.merge!(ial2_attributes) if scoper.ial... | [OpenidConnectUserInfoPresenter->[phone->[e164,blank?],email_from_sp_identity->[email],ial2_data->[ial2_strict_session?,ial2_session?,ialmax_session?,new_from_hash,load],user_info->[new,x509_scopes_requested?,scope,verified_at_requested?,merge!,filter,uuid_from_sp_identity,ial2_scopes_requested?,email_from_sp_identity]... | User info for missing node in system. | I would drop this attribute... the only reason we have `email_verified` is it's part of the spec and we kept it, so since we're inventing a new trait I would not add a corresponding `_verified` However if we do feel strongly about keeping it, I think it should be an array (that could be zipped with the emails, or maybe... |
@@ -32,6 +32,9 @@ type Condition struct {
name string
filters map[string]match.Matcher
}
+ hasfields struct {
+ fields []string
+ }
rangexp map[string]RangeValue
or []Condition
and []Condition
| [checkAND->[Check],Run->[Check,Run],checkNOT->[Check],checkOR->[Check],String->[String]] | NewConditional imports and returns a new condition object. NewMatchMatchfunc - creates a new match object. | 1. Maybe better just have hasfields []string? 2. And maybe rename it to requiredFields? In this case would be more natural "requiredFields []string" |
@@ -101,7 +101,10 @@ func (pm *Manager) ExecDirEnv(timeout time.Duration, dir, desc string, env []str
stdOut := new(bytes.Buffer)
stdErr := new(bytes.Buffer)
- cmd := exec.Command(cmdName, args...)
+ ctx, cancel := context.WithTimeout(context.Background(), timeout)
+ defer cancel()
+
+ cmd := exec.CommandContext(... | [Exec->[ExecDir],ExecDir->[ExecDirEnv],Kill->[Unlock,Kill,Exited,Lock,Errorf],Remove->[Lock,Unlock],ExecDirEnv->[Error,Kill,Remove,Start,String,Errorf,After,Wait,Add,Command],Add->[Lock,Unlock,Now],ExecTimeout->[ExecDir],New] | ExecDirEnv executes a command in the given directory with the given arguments. If the command. | What happens if the `timeout` is negative? (Since the functions docs says to use `-1 for DefaultTimeout` (which we don't seems to honour... ) |
@@ -22,6 +22,7 @@ class WarehouseQueryset(models.QuerySet):
class Warehouse(models.Model):
id = models.UUIDField(default=uuid.uuid4, primary_key=True)
name = models.CharField(max_length=255)
+ slug = models.SlugField(max_length=50, unique=True)
company_name = models.CharField(blank=True, max_length=2... | [Warehouse->[delete->[delete]],StockQuerySet->[get_or_create_for_country->[for_country,get_variant_stock_for_country],get_variant_stock_for_country->[for_country]],WarehouseQueryset->[for_country->[prefetch_data]]] | Create a base class for all of the object s related objects. Get a queryset of ProductVariant objects for a given country. | Same here about `max_length`. |
@@ -37,8 +37,15 @@ try:
except ImportError:
pubsub = None
+try:
+ from google.protobuf.timestamp_pb2 import Timestamp
+except ImportError:
+ Timestamp = None
+
@unittest.skipIf(pubsub is None, 'PubSub dependencies are not installed.')
+@unittest.skipIf(Timestamp is None,
+ 'Google Protobuf de... | [PubSubMatcherTest->[test_message_matcher_strip_success->[init_matcher],test_message_matcher_success->[init_matcher],test_message_matcher_timeout->[init_matcher],test_message_matcher_attributes_success->[init_matcher],test_message_matcher_mismatch->[init_matcher],test_message_matcher_attributes_fail->[init_matcher],tes... | Test for PubSub verifier. This method is used to test the get_sub method. It is called by the test. | Could this move into the same try statement as above? Do we expect protobuf and pubsub to be not installed at the same time? |
@@ -388,8 +388,10 @@ public class MavenBndRepository
if (registry != null) {
Workspace ws = registry.getPlugin(Workspace.class);
if (ws != null)
- base = ws.getBase();
+ base = ws.getBuildDir();
}
+
+ Workspace ws = registry.getPlugin(Workspace.class);
File indexFile = IO.getFile(base, c... | [MavenBndRepository->[tooltip->[getName,toString],getDescriptor->[getDescriptor],versions->[list],title->[getBundleDescriptor,getName,isLocal,toString],init->[getName],refresh->[refresh],get->[get],doSearchMaven->[get],getMapFromQuery->[put],getBundleDescriptor->[getDescriptor],close->[close],list->[list],getUser->[get... | Initializes the repository. | This can execute if registry is null |
@@ -188,8 +188,8 @@ namespace Microsoft.Xna.Framework
A = (byte)MathHelper.Clamp(color.W * 255, Byte.MinValue, Byte.MaxValue);
}
- /// <summary>
- /// Creates a new instance of <see cref="Color"/> struct.
+ /// <summary>
+ /// Constructs a color.
/// </summary>
... | [Color->[ToString->[ToString],Equals->[Equals],GetHashCode->[GetHashCode]]] | Color for the color of the . Creates a new color object with the specified RGB values. | How about mentioning what happens with the alpha? |
@@ -420,12 +420,15 @@ export class Extensions {
/* completeCallback */ resolve,
/* isRuntime */ false,
extensionId);
- });
+ }).then(() => extension); // Forward `extension` to chained Promise.
}
- }).then(() => {
+ return extensi... | [No CFG could be retrieved] | Creates or updates the extension holder for the given extensionId. Extension holder for the extension currently being registered. | E.g. here, why can't we also have `extension.services.forEach(service => if (isAdoptable(service) {service.adopt()}))`? |
@@ -40,7 +40,7 @@ type (
// NewSingletonPeerWrapper creates a new peer based on the p2p keys in the keystore
// It currently only supports one peerID/key
// It should be fairly easy to modify it to support multiple peerIDs/keys using e.g. a map
-func NewSingletonPeerWrapper(keyStore *keystore.OCR, config *orm.Config... | [Start->[GetPeerID,P2PV2DeltaReconcile,P2PNetworkingStack,Duration,Wrap,DB,P2PAnnounceIP,OCRBootstrapCheckInterval,P2PPeerID,P2PListenIP,New,P2PListenPort,Start,Errorf,OCRNewStreamTimeout,DecryptedP2PKeys,P2PPeerstoreWriteInterval,ID,OCROutgoingMessageBufferSize,Join,OCRIncomingMessageBufferSize,P2PAnnouncePort,P2PV2An... | NewSingletonPeerWrapper creates a new singleton peer based on the given p2p keys. service - returns an error if the p2pkeys list is empty or if there is. | Accept the service level config |
@@ -56,6 +56,17 @@ func NewCmdSimpleFSStat(cl *libcmdline.CommandLine, g *libkb.GlobalContext) cli.
}
}
+func prefetchStatusString(e keybase1.Dirent) string {
+ if e.PrefetchStatus != keybase1.PrefetchStatus_IN_PROGRESS ||
+ e.PrefetchProgress.BytesTotal == 0 {
+ return e.PrefetchStatus.String()
+ }
+
+ return f... | [ParseArgv->[Int,Args,New,String,Bool],Run->[GetTerminalUI,Printf,SimpleFSMakeOpid,G,SimpleFSGetRevisions,FormatTime,SimpleFSStat,SimpleFSClose,SimpleFSWait,TODO,SimpleFSReadRevisions],SetNoStandalone,NewContextified,ChooseCommand] | Run - SimpleFSStat command. \ t \ t \ t \ t \ t \ t \ n. | I think maybe it's confusing to say "sync in progress" only when there are 0/n bytes synced. Not sure if I have any better alternatives. "Sync waiting to start" or something? |
@@ -0,0 +1,11 @@
+package statistics
+
+import "github.com/pingcap/pd/server/core"
+
+// RegionStatInformer provides access to a shared informer of statistics.
+type RegionStatInformer interface {
+ IsRegionHot(region *core.RegionInfo) bool
+ RegionWriteStats() map[uint64][]*HotPeerStat
+ RegionReadStats() map[uint64][... | [No CFG could be retrieved] | No Summary Found. | Is this necessary to separate these two interfaces into different files? |
@@ -38,6 +38,7 @@ namespace Dynamo.Models
private readonly ObservableCollection<NodeModel> nodes;
private readonly ObservableCollection<NoteModel> notes;
private readonly UndoRedoRecorder undoRecorder;
+ private Guid guid;
#endregion
| [WorkspaceModel->[SaveAs->[OnWorkspaceSaved],Clear->[Clear,Dispose],AddNode->[OnNodeAdded,OnRequestNodeCentered],SaveInternal->[Save],ReloadModel->[Undo],Save->[SaveAs],Log->[Log],Undo->[Undo],NoteModel->[AddNote],AddNote->[OnRequestNodeCentered],DisposeNode->[OnNodeRemoved],GetStringRepOfWorkspace->[PopulateXmlDocumen... | Creates an abstract class that can be used to repsond to a saved workspace. This is a public API and is used to respond to a change in the zoom factor of. | I really don't like relying on the default struct initilizer code for Guids. I'm not even sure if it's Guid.Empty - in which case this won't work. Could we add a call in the ctor of the model guid = Guid.NewGuid() or something similar? |
@@ -400,15 +400,9 @@ final class Attachment extends Thread implements Response {
} catch (Throwable e) {
throw new IbmAttachOperationFailedException("startLocalManagementAgent error starting agent:" + e.getClass() + " " + e.getMessage()); //$NON-NLS-1$ //$NON-NLS-2$
}
- /*
- * sun.management.Agent.startL... | [Attachment->[doCommand->[streamReceiveBytes,getMessage,logMessage,startAgent,startLocalAgent,streamSend,parseLoadAgent,receiveProperties,bytesToString,toString,internalGetProperties,ByteArrayInputStream,startsWith,getAgentProperties,replyWithProperties],connectToAttacher->[getMessage,Socket,getPort,logMessage,getOutpu... | This method is called to start a local agent in the JVM. This method is called to start the local management agent. | Does removing this break the IBM internal builds of Java 8 and Java 9 b148? |
@@ -656,6 +656,17 @@ abstract class Base_Admin_Menu {
// phpcs:enable WordPress.Security.NonceVerification
}
+ /**
+ * Adds the necessary CSS class to the admin body class.
+ *
+ * @param string $admin_body_classes Contains all the admin body classes.
+ *
+ * @return string
+ */
+ public function admin_bod... | [Base_Admin_Menu->[handle_preferred_view->[set_preferred_view,get_current_screen],get_preferred_view->[get_preferred_views]]] | Handles the user s preferred view. Enable nonce verification. | Can you add a space in the beginning and at the end of the string to avoid possible plugin conflicts? |
@@ -55,7 +55,9 @@ public class MuleDeploymentService implements DeploymentService
public static final Set<String> SYSTEM_PACKAGES = ImmutableSet.of(
"java.", "org.mule", "com.mulesoft.mule.config", "com.mulesoft.mule.bti", "com.mulesoft.mule.cache",
"com.mulesoft.mule.cluster", "com.mules... | [MuleDeploymentService->[removeDomainDeploymentListener->[removeDeploymentListener],addDeploymentListener->[addDeploymentListener],stop->[stop],start->[start],redeploy->[redeploy,findApplication],addDomainDeploymentListener->[addDeploymentListener],redeployDomain->[redeploy,findDomain],removeDeploymentListener->[remove... | Method that creates a service which is responsible for importing the Mule deployment. Tenant - related methods. | Should org.apache.commons.logging and org.apache.log4j be registered too? |
@@ -28,8 +28,15 @@ class GetDVCFileError(DvcException):
)
+# Dummy exception raised to signal a plain file copy is needed
+class _DoPlainCopy(DvcException):
+ pass
+
+
@staticmethod
def get(url, path, out=None, rev=None):
+ from dvc.repo import Repo
+
out = resolve_output(path, out)
if ... | [_get_cached->[PathInfo,abspath,checkout,pull,get_used_cache],get->[_get_cached,UrlNotDvcRepoError,abspath,resolve_output,uuid,dirname,isabs,str,fs_copy,PathMissingError,GetDVCFileError,join,find_out_by_relpath,remove,external_repo,is_valid_filename],GetDVCFileError->[__init__->[super]],getLogger] | Get a single from the DVC repository. | No longer need that. |
@@ -309,13 +309,8 @@ namespace DotNetNuke.Modules.Admin.Security
{
canSend = false;
}
- else
+ else
{
- if (_user.Membership.Approved == false... | [SendPassword->[OnInit->[OnInit],OnSendPasswordClick->[GetUser],OnLoad->[OnLoad]]] | OnSendPasswordClick - Send password click. check if user has password and password token Add a message to the module. | Why was this removed? |
@@ -278,3 +278,11 @@ func admissionFlags(admissionPluginConfig map[string]configv1.AdmissionPluginCon
return args, nil
}
+
+func sniCertKeys(namedCertificates []configv1.NamedCertificate) []string {
+ args := []string{}
+ for _, nc := range namedCertificates {
+ args = append(args, fmt.Sprintf("%s,%s:%s", nc.Cert... | [Strings,NewBuffer,ConvertOpenshiftAdmissionConfigToKubeAdmissionConfig,Write,DeepCopy,ReadFile,SplitHostPort,Sprintf,TempFile,Decode,Name,Close,ReadYAML,WriteYAML] | args args args args args args args args. | have you checked that we support `foo,bar:` without the names? |
@@ -1092,7 +1092,7 @@ function createCesiumJs() {
define([' + moduleIds.join(', ') + '], function(' + parameters.join(', ') + ') {\n\
\'use strict\';\n\
var Cesium = {\n\
- VERSION : "' + version + '",\n\
+ VERSION : \'' + version + '\',\n\
_shaders : {}\n\
};\n\
' + assignments.join('\n ') + '... | [No CFG could be retrieved] | Creates a Cesium Cesium JS and a list of Cesium Ces Create a gallery list. | This is the one by-hand change I had to make. Otherwise ESLint fails when checking `Source/Cesium.js` |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.