patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -180,11 +180,14 @@ class EmailAttestation extends Component {
<div className="my-3 verification-code">
<input
type="tel"
+ maxLength="6"
ref={ref => (this.inputRef = ref)}
className="form-control form-control-lg"
... | [No CFG could be retrieved] | Renders the view for a single user - defined verification code. Renders a hidden hidden hidden hidden hidden hidden hidden hidden hidden hidden hidden hidden hidden hidden hidden hidden. | Can we show an error if the user tries to submit a non-numeric code instead of just disallowing non-numeric characters? User may wonder why they can't type otherwise |
@@ -33,6 +33,13 @@ public class LeadFunction
private final int offsetChannel;
private final int defaultChannel;
private final boolean ignoreNulls;
+ private long lastNonNull = -1;
+
+ @Override
+ public void reset()
+ {
+ lastNonNull = -1;
+ }
public LeadFunction(List<Integer... | [LeadFunction->[processRow->[isNull,withinPartition,getLong,appendNull,appendTo,checkCondition,toIntExact],withinPartition->[size],get,size]] | This method is used to create a new instance of the LeadFunction class. Returns the window index of the next window in the partition. | move below ctor |
@@ -213,13 +213,13 @@ public class DependencyGraph implements Comparator<AbstractProject> {
private List<Dependency> get(Map<AbstractProject, List<DependencyGroup>> map, AbstractProject src) {
List<DependencyGroup> v = map.get(src);
if(v==null) {
- return ImmutableList.of();
+ ... | [DependencyGraph->[hasIndirectDependencies->[getDownstream],compare->[compare],addDependency->[addDependency],getDownstreamDependencies->[get],getTransitive->[get],Dependency->[hashCode->[hashCode],toString->[toString]],get->[get,build],add->[add],getUpstreamDependencies->[get],DependencyGroup->[add->[add],getDownstrea... | Get the list of dependencies from the given map. | `builder` was declared within this method and goes out of scope at the end of the method, so nothing else can modify it. We do not need to copy it. |
@@ -27,7 +27,8 @@ func (*contextProvider) Run(comm corecomp.ContextProviderComm) error {
return err
}
err = comm.Set(map[string]interface{}{
- "id": a.AgentID(),
+ "id": a.AgentID(),
+ "host_id": a.HostID(),
"version": map[string]interface{}{
"version": release.Version(),
"commit": rele... | [Run->[NewAgentInfo,Commit,Format,Version,New,BuildTime,AgentID,Snapshot,Set],AddContextProvider] | Run runs the context provider. | I think this should not be added here, and instead it should replace the `host.id` that is defined in the `host` provider, as this will become the new `host.id` that is consistent. |
@@ -56,7 +56,7 @@ class JvmPlatform(Subsystem):
help='Compile settings that can be referred to by name in jvm_targets.')
register('--default-platform', advanced=True, type=str, default=None, fingerprint=True,
help='Name of the default platform to use if none are specified.')
- regist... | [JvmPlatform->[default_platform->[IllegalDefaultPlatform],platforms_by_name->[_parse_platform],get_platform_by_name->[UndefinedJvmPlatform],get_platform_for_target->[get_platform_by_name]],JvmPlatformSettings->[_validate_source_target->[IllegalSourceTargetCombination],__init__->[parse_java_version]]] | Register options for the command line tool. | Might be good to remove `'zinc'` from `cls._COMPILER_CHOICES` now that it's not allowed? |
@@ -295,7 +295,7 @@ public class OperationTypeImpl implements OperationType {
}
int size = result.size();
if (size == 0) {
- return null;
+ return new InvokableMethod[] {};
}
if (size == 1) {
return new InvokableMethod[] { result.get(0).met... | [OperationTypeImpl->[inject->[getId,resolveObject,getType],newInstance->[newInstance],getParamDocumentationType->[getParamDocumentationType],getDocumentation->[getInputType,getType],getMethodsMatchingInput->[Match]]] | Returns an array of methods matching the input class. | That's a change in behavior for which we probably don't have tests. Don't follow SonarQube here. |
@@ -8,7 +8,7 @@
<%= javascript_include_tag 'upload_button_control.js',
id: 'upload_script',
upload_id: 'upload_file',
- button_id: 'upload' %>
+ button_id: 'upload', nonce: true %>
<%= t('upload_h... | [No CFG could be retrieved] | Renders a modal with the necessary content for the user to upload a graders. Show a list of all elements. | Can you actually change `upload` to `upload-groupings` (or change the button id below)? This javascript currently doesn't do anything (it's supposed to disable the button when no file has been selected). |
@@ -9616,8 +9616,8 @@ l2arc_log_blk_read(l2arc_dev_t *dev,
}
/* Make sure the buffer checks out */
- fletcher_4_native(this_lb,
- L2BLK_GET_PSIZE((this_lbp)->lbp_prop), NULL, &cksum);
+ psize = L2BLK_GET_PSIZE((this_lbp)->lbp_prop);
+ fletcher_4_native(this_lb, psize, NULL, &cksum);
if (!ZIO_CHECKSUM_EQUAL(... | [No CFG could be retrieved] | finds the next log block in the log and if not attempts to issue it now. read the header of the block and return the header of the block. | Nit: Would it be better to move this up out of the 'Make sure the buffer checks out' section now that this is possibly used for some subsequent stuff too? |
@@ -80,5 +80,5 @@ var pangaeaReshardingEpoch = []*big.Int{
params.PangaeaChainConfig.StakingEpoch,
}
-var pangaeaV0 = MustNewInstance(4, 27, 27, numeric.OneDec(), genesis.TNHarmonyAccounts, genesis.TNFoundationalAccounts, pangaeaReshardingEpoch, PangaeaSchedule.BlocksPerEpoch())
-var pangaeaV1 = MustNewInstance(4,... | [EpochLastBlock->[BlocksPerEpoch],CalcEpochNumber->[BlocksPerEpoch],IsLastBlock->[BlocksPerEpoch],BlocksPerEpoch] | params. PangaeaChainConfig. StakingEpoch. | should be 50? we switched internal to be 60 so that it's divisible by 3 P2 with multikey: 4 shards x (60 internals + 50 externals) = 400 total slots, 200 external slots. max 20*4 + 200 = 280 physical machines |
@@ -132,10 +132,15 @@ class MetisTuner(Tuner):
self.x_types[idx] = 'range_continuous'
elif key_type == 'choice':
self.x_bounds[idx] = key_range
+
+ for key_value in key_range:
+ if (not isinstance(key_value, int)) and (... | [MetisTuner->[_selection->[_pack_output],generate_parameters->[_pack_output]]] | Update the self. x_bounds and self. x_types by the search_space Randomly choose a sequence of points. | actually this can be reduced to isinstance(key_value, [int, float]). But it does not matter. |
@@ -64,7 +64,6 @@ def client_info(request):
'HTTP_USER_AGENT',
'HTTP_X_COUNTRY_CODE',
'HTTP_X_FORWARDED_FOR',
- 'HTTP_X_REQUEST_VIA_CDN',
'REMOTE_ADDR',
)
data = {key: request.META.get(key) for key in keys}
| [SiteStatusView->[get->[SiteStatusSerializer,object,Response],as_view->[non_atomic_requests,super]],robots->[HttpResponse,render],handler500->[render,getattr,base_500_data,dumps,HttpResponse],loaded->[HttpResponse],monitor->[all,timer,getattr,dumps,values,HttpResponse],csrf_failure->[render],_frontend_view->[ViewDoesNo... | Get client info. | I didn't need that anymore, so might as well remove it even if the view is limited to dev. |
@@ -323,7 +323,7 @@ class WPSEO_Sitemaps {
continue;
}
- $links = $provider->get_sitemap_links( $type, $this->max_entries, $this->current_page );
+ $links = $provider->get_sitemap_links( $type, $this->get_entries_per_page(), $this->current_page );
if ( empty( $links ) ) {
$this->bad_sitemap = ... | [WPSEO_Sitemaps->[redirect->[set_n,sitemap_close],refresh_sitemap_cache->[set_n]]] | Builds a sitemap for a given type. | I would put the value of `get_entries_per_page` outside of the `foreach` |
@@ -276,7 +276,7 @@ func (d *Dispatcher) deleteVolumeStoreIfForced(conf *config.VirtualContainerHost
for label, url := range conf.VolumeLocations {
volumeStores.WriteString(fmt.Sprintf("\t%s: %s\n", label, url.Path))
}
- log.Warnf("Since --force was not specified, the following volume stores will not be remo... | [deleteVolumeStoreIfForced->[deleteDatastoreFiles]] | deleteVolumeStoreIfForced deletes all volumes in the specified volume locations if force is set Delete all datastore files on the datastore. | Hey @hickeng -- I remember in a PR seeing you tell Emma to use `%q` at the end of this log string, so I wanted to bring your attention to this and make sure it's OK that I replaced it with `%s`. When it was `%q` it was printing out like this: <pre>WARN[2016-08-10T12:08:50-05:00] Since --force was not specified, the fol... |
@@ -26,7 +26,6 @@ define([
* @alias PinBuilder
* @constructor
*
- * @demo {@link http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Map%20Pins.html|Cesium Sandcastle PinBuilder Demo}
*/
function PinBuilder() {
this._cache = {};
| [No CFG could be retrieved] | Creates an empty pin with the specified color and size. Creates a canvas element that represents the generated pin. | This link can stay |
@@ -76,9 +76,9 @@ public class Jstack {
}
try {
diagProvider.attach(vmid);
- DiagnosticsInfo groupInfo = diagProvider.getThreadGroupInfo(printSynchronizers);
- out.printf("Virtual machine: %s JVM information %s%n", vmid, groupInfo.getJavaInfo()); //$NON-NLS-1$
- out.println(groupInfo.toString());
... | [Jstack->[parseArguments->[inStreamToStringList,equals,isEmpty,printf,add,startsWith],main->[getMessage,equals,matches,detach,toString,printf,getVmId,getAgentProperties,parseArguments,processExists,getJavaInfo,println,now,printStackTrace,attach,getSystemProperties,getThreadGroupInfo,AttacherDiagnosticsProvider,parseLon... | This is the main method of the attacher. This method is called by the diagnostic system when the diagnostic system is not available. | This changes the way the information is presented to users: was that intentional? If so, why? |
@@ -36,7 +36,9 @@ class PostAnalyzer
result = Oneboxer.apply(cooked) do |url|
@onebox_urls << url
Oneboxer.invalidate(url) if opts[:invalidate_oneboxes]
- Oneboxer.cached_onebox(url)
+ onebox = Oneboxer.cached_onebox(url)
+ @found_oneboxes = true if onebox.present?
+ onebox
e... | [PostAnalyzer->[cook->[cook],linked_hosts->[parse_uri_rfc2396],cooked_stripped->[cook],has_oneboxes?->[found_oneboxes?]]] | Returns a single tag with a raw html or html content if no tag is found. | Should we keep track of `onebox_urls` if `Oneboxer.cached_onebox` might fail later? |
@@ -359,10 +359,9 @@ class Profile
$remote_url = $r[0]['url'];
$message_path = preg_replace('=(.*)/profile/(.*)=ism', '$1/message/new/', $remote_url);
$wallmessage_link = $message_path . base64_encode($profile['addr']);
+ } else if (!empty($profile['nickname'])) {
+ $wallmessage_link = 'wallmessage/... | [Profile->[load->[set_template_engine,getCurrentTheme],openWebAuthInit->[get_hostname]]] | This function is used to create a sidebar of the user s profile. This function is used to create a link to a contact in a network. This function is used to generate a link to the profile menu. Edit a profile return array of all contact data profile_vcard - > profile_vcard Call the profile_sidebar hooks. | Could you remove the space? |
@@ -84,7 +84,7 @@ namespace System.Reflection.Internal
{
ByteArrayUnion union = default;
union.ImmutableArray = array;
- return union.UnderlyingArray;
+ return union.UnderlyingArray!;
}
[StructLayout(LayoutKind.Explicit)]
| [ImmutableByteArrayInterop->[DangerousGetUnderlyingArray->[UnderlyingArray,ImmutableArray],ByteArrayUnion->[Explicit],DangerousCreateFromUnderlyingArray->[UnderlyingArray,ImmutableArray]]] | DangerousGetUnderlyingArray - get underlying array. | From doc above the method could return null, also seems `union.UnderlyingArray` should be nullable too > /// \<returns>The underlying array, or null if \<see cref="ImmutableArray{T}.IsDefault"/> is true.\</returns> |
@@ -77,6 +77,6 @@ html = template.render(js_resources=js_resources,
div=div)
with open(filename, 'w') as f:
- f.write(html)
+ f.write(html.encode('utf8'))
view(filename)
| [components,Range1d,render,write,view,render_css,scatter,render_js,open,figure,Template] | Show the ethernet network network network network network network network network network network network network network network. | A better solution would be to use `io.open(..., encoding='utf-8')`, especially using it uniformly across code base. |
@@ -15,6 +15,11 @@ class Protocol < ApplicationRecord
in_repository_archived: 4
}
+ scope :recent_protocols, lambda { |user, team, amount|
+ where(team: team, protocol_type: 3).or(where(team: team, protocol_type: 2, added_by: user))\
+ .order(updated_at: :desc).limit(... | [Protocol->[deep_clone->[clone_contents],destroy_contents->[space_taken],clone_contents->[deep_clone_assets],space_taken->[space_taken],in_repository?->[in_repository_active?],load_from_repository->[clone_contents],update_parent->[clone_contents],update_from_parent->[clone_contents],deep_clone_my_module->[new_blank_for... | The protocol class Creates a new Query object. | You can use :in_repository_private instead of simple number and there is no need to put backslash in the end of the line |
@@ -1076,6 +1076,8 @@ class TimeDecoding(_GeneralizationAcrossTime):
one time sample.
If None, empty dict.
+ predict_function : str
+ Function used to make estimator predictions. Defaults to 'predict'.
predict_mode : {'cross-validation', 'mean-prediction'}
Indicates h... | [_GeneralizationAcrossTime->[score->[predict],predict->[_DecodingTime,chunk_X],fit->[f],__init__->[_DecodingTime]],_sliding_window->[find_time_idx,_DecodingTime],TimeDecoding->[score->[predict],_prep_times->[_DecodingTime]],_fit_slices->[fit],_predict->[predict]] | Parameters for the cross - validation model. The training times of the y. | I think the docs should make explicit what's actually going on. So something like: "The method used to make predictions by calling a method of this name on each estimator on each time point per trial. Must be a method of the estimator and follow the scikit-learn predict API. Must return values compatible with the input... |
@@ -357,7 +357,7 @@ class Seq2seqAgent(Agent):
loss.backward()
self.update_params()
losskey = 'loss' if not lm else 'lmloss'
- loss_dict = {losskey: loss.mul_(len(xs)).data}
+ loss_dict = {losskey: loss.mul_(len(xs)).data[0]}
else:
self.... | [Seq2seqAgent->[add_cmdline_args->[dictionary_class],load->[load],observe->[parse],shutdown->[save],save->[save],act->[batch_act],cuda->[cuda],predict->[update_params,zero_grad],batch_act->[predict,batchify,v2t],batchify->[valid,parse],zero_grad->[zero_grad]]] | Produce a prediction from our model. | actually this was intentionally returning the cuda tensor so that we didn't have to pull the tensor back from the GPU, it's possible it's not affecting the performance much though |
@@ -909,7 +909,7 @@ def _plot_update_epochs_proj(params, bools=None):
params['projector'], _ = setup_proj(params['info'], add_eeg_ref=False,
verbose=False)
- start = params['t_start'] / len(params['epochs'].times)
+ start = int(params['t_start'] / len(params['epochs... | [plot_drop_log->[_drop_log_stats],_mouse_click->[plot_epochs_image,_pick_bad_epochs,_plot_window],_toggle_labels->[_plot_vert_lines],_epochs_navigation_onclick->[_draw_epochs_axes],_plot_onkey->[_plot_traces,_plot_window]] | Helper function to update the epochs of a project. | @jaeilepp can you verify this was correct? It's used to create a slice into `Epochs` so I think it's supposed to be an integer, but I'm not sure whether you intended truncation vs rounding here. (I was getting warnings about slices having non-integer values.) |
@@ -904,11 +904,11 @@ def get_config(key, default=None, raise_error=False, home_dir=None):
Returns
-------
- value : str | None
+ value : str | None | dict
The preference key value.
"""
- if not isinstance(key, string_types):
+ if key and not isinstance(key, string_types):
... | [ProgressBar->[update_with_increment_value->[update]],_chunk_read->[ProgressBar],_fetch_file->[_HTTPResumeURLOpener,_fetch_file,_chunk_read_ftp_resume,_chunk_read],set_config->[get_config_path],_chunk_write->[update_with_increment_value],get_config->[get_config_path],_TempDir->[__new__->[__new__]],set_log_file->[WrapSt... | Get the value of a key from the environment. | Prefer `if key is not None` to `if key` (more explicit) |
@@ -85,6 +85,10 @@ type modContext struct {
disableUnionOutputTypes bool // Disable unions in output types.
}
+func (mod *modContext) String() string {
+ return mod.mod
+}
+
func (mod *modContext) details(t *schema.ObjectType) *typeDetails {
details, ok := mod.typeDetails[t]
if !ok {
| [genResource->[getConstValue,genAlias,getDefaultValue,genPlainType,typeString],genTypes->[genHeader,sdkImports,getImports],genType->[details,genPlainType],gen->[genResource,genTypes,sdkImports,genFunction,isReservedSourceFileName,getImports,genHeader,add,genConfig],genFunction->[genPlainType],getTypeImports->[getTypeIm... | details returns the typeDetails for the given type. | This makes debugging easier by putting the mod names next to the type in the debugger window. |
@@ -164,7 +164,7 @@ class StoriesController < ApplicationController
return
end
assign_user_comments
- @pinned_stories = Article.published.where(id: @user.profile_pins.pluck(:pinnable_id)).
+ @pinned_stories = Article.published.where(id: @user.profile_pins.select(:pinnable_id)).
limited_col... | [StoriesController->[assign_second_and_third_user->[find,third_user_id,blank?,present?,second_user_id],handle_base_index->[user_signed_in?,headers,to_i,new,offset,render,set_surrogate_key_header,include?,where,article_finder,order,sample],redirect_if_view_param->[redirect_to,id],redirect_to_changed_username_profile->[r... | This action handles the user index lease. It is used to display a hidden list of all. | This will be `SELECT articles.* FROM articles where published = true AND id IN (select pinnable_id from profile_pins) etc. etc` |
@@ -19,18 +19,6 @@ class ChatChannel < ApplicationRecord
validates :status, presence: true, inclusion: { in: %w[active inactive blocked] }
validates :slug, uniqueness: true, presence: true
- algoliasearch index_name: "SecuredChatChannel_#{Rails.env}" do
- attribute :id, :viewable_by, :slug, :channel_type,
-... | [ChatChannel->[adjusted_slug->[direct?],pusher_channels->[invite_only?,open?],user_obj->[last_opened_at]]] | check if a channel is open or direct. | some of these attributes are methods just used by the index that can also be removed: - `viewable_by` - `messages_count` |
@@ -23,6 +23,7 @@ from freqtrade.exceptions import (DependencyException, InvalidOrderException,
OperationalException, TemporaryError)
from freqtrade.exchange.common import BAD_EXCHANGES, retrier, retrier_async
from freqtrade.misc import deep_merge_dicts, safe_value_fallback
+from fr... | [available_exchanges->[is_exchange_bad,ccxt_exchanges],Exchange->[fetch_ticker->[fetch_ticker,markets],validate_pairs->[markets,get_pair_quote_currency],sell->[create_order,dry_run_order],_async_get_trade_history->[_async_get_trade_history_time,_async_get_trade_history_id],_store_dry_order->[get_pair_quote_currency],ge... | Create a new object of type Any that implements the interface. Initializes this module with the given config and validates whether the specified exchange and pairs are valid. | This import causes a circular import (exchange needs `freqtrade.pairlist` - and `freqtrade.pairlist` needs exchange. I guess if we intend to use these type-stubs more frequently, the best place might be `freqtrade.typing` ... so circular dependencies are not an issue. |
@@ -30,6 +30,7 @@ public class ConnectionStatus implements Cloneable {
private String destinationId;
private String destinationName;
private String backPressureDataSizeThreshold;
+ private Boolean predictionsAvailable;
private long backPressureBytesThreshold;
private long backPressureObjectT... | [ConnectionStatus->[toString->[toString],clone->[ConnectionStatus]]] | Creates a connection status object from a single object. Gets the queued bytes. | Any reason to use a `Boolean` object here rather than a `boolean`? Doesn't seem like something that would be unset. |
@@ -112,11 +112,17 @@ int SM2_encrypt(const EC_KEY *key,
kG = EC_POINT_new(group);
kP = EC_POINT_new(group);
if (kG == NULL || kP == NULL)
+ {
+ SM2err(SM2_F_SM2_ENCRYPT, ERR_R_MALLOC_FAILURE);
goto done;
+ }
ctx = BN_CTX_new();
if (ctx == NULL)
+ {
+ SM2... | [No CFG could be retrieved] | SM2_plaintext_size - Given a key and a digest return the number of EC_POINT_new - creates a new group point from a group point and a new. | you are using the old style ... this brace should be aligned just below the 'i' of if |
@@ -7,10 +7,12 @@
package org.mule.extensions.jms;
import static java.util.Optional.ofNullable;
+import static org.mule.extensions.jms.TransactionStatus.NONE;
import static org.slf4j.LoggerFactory.getLogger;
-import org.mule.extensions.jms.api.config.AckMode;
+import org.mule.extensions.jms.api.connection.JmsSessi... | [JmsSessionManager->[ack->[debug,isPresent,getSessionInformation,acknowledge,isDebugEnabled],registerMessageForAck->[debug,isDebugEnabled,SessionInformation,containsKey,put],recoverSession->[debug,isPresent,isLocked,get,unlock,getSessionInformation,recover,isDebugEnabled,ifPresent],getSessionInformation->[remove,ofNull... | Creates a managed object that can be used to register a single session with a specific ackId Register message for ack. | not in internal nor api package |
@@ -7,6 +7,7 @@
"""
import requests
import subprocess
+from requests.exceptions import ConnectionError
from cryptography import x509
from cryptography.hazmat.backends import default_backend
| [verify_string->[verify],verify->[crl_verify,ocsp_verify]] | Check if a is valid. Checks if the certificate is valid and if it has a CRL False otherwise. | Why was this added? |
@@ -947,8 +947,16 @@ namespace Dynamo.ViewModels
// that can't be handled reliably
try
{
- string xmlFilePath = parameters as string;
+ var xmlFilePath = parameters as string;
ExecuteCommand(new DynamoModel.OpenFileCommand(xmlFilePath... | [DynamoViewModel->[CanZoomOut->[CanZoomOut],SaveAs->[SaveAs],ExportToSTL->[ExportToSTL],ShowOpenDialogAndOpenResult->[Open,CanOpen],ShowSaveDialogIfNeededAndSave->[SaveAs,Save],ImportLibrary->[ImportLibrary],ReportABug->[ReportABug],ClearLog->[ClearLog],Escape->[CancelActiveState],ShowSaveDialogIfNeededAndSaveResult->[... | Open the file specified by the parameters. | All of this code related to the `Dispatcher` was setting off alarms in my head. The question is - is it necessary? `PropertyChanged` events are automatically marshalled to the UI thread, and it would seem that `FitView` would only do that, but maybe I'm wrong. Either way, I'm a bit weary looking at this code. |
@@ -3468,6 +3468,10 @@ define([
mesh : runtimeMeshesByName[mesh.name]
};
+ if (defined(model._pickInfo)) {
+ owner = combine(owner, model._pickInfo);
+ }
+
var castShadows = ShadowMode.castShadows(model._shadows);
... | [No CFG could be retrieved] | Creates a command to draw a single . Picks the uniform from the shader if it is defined. | I'm starting to rethink this. If the custom pick object exists then it should be used directly, not combined with `owner`. I doubt anyone picking a tile needs to know what gltf node/mesh are picked. |
@@ -4,8 +4,11 @@ import (
"net/url"
errs "github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors"
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/api/validation"
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/util"
buildapi "github.com/openshift/origin/pkg/build/api"
+ image "github.com/openshift/origin/... | [Parse,Prefix,PrefixIndex,NewFieldInvalid,NewFieldRequired] | Validate requires all required fields to be set in the Build. validateAllErrors returns a list of validation errors if any of the input is not a build. | ~/go/src/github.com/openshift/origin -> grep 'imageapi "github' -r pkg/ | wc -l 16 care about fixing those? |
@@ -159,7 +159,7 @@ func (bt *osquerybeat) Run(b *beat.Beat) error {
}
// Connect publisher
- bt.client, err = b.Publisher.Connect()
+ processors, err := bt.reconnectPublisher(b, bt.config.Inputs)
if err != nil {
return err
}
| [Run->[initContext,Run,close],Stop->[close],execute->[executeQuery],executeQuery->[executeQueryWithLimiter]] | Run starts the osquerybeat Connect to the osqueryd socket and connect to the socket and connect to the socket. osquery - child process. | the client should always be closed on shutdown. The reason we have a `Connect` is that processors might be stateful. If possible a `beat.Client` must not be shared between multiple inputs, but each input should have its own instance. |
@@ -1618,7 +1618,9 @@ func (pkg *pkgContext) genResourceModule(w io.Writer) {
if topLevelModule {
fmt.Fprintf(w, "\tversion, err := PkgVersion()\n")
} else {
- fmt.Fprintf(w, "\tversion, err := %s.PkgVersion()\n", pkg.pkg.Name)
+ // Some package names contain '-' characters, so grab the name from the base path... | [outputType->[resolveObjectType,resolveResourceType,tokenToType,outputType],genOutputTypes->[tokenToType,plainType,outputType],genResourceModule->[genHeader],getImports->[getTypeImports],tokenToResource->[tokenToPackage],genConfig->[genHeader,getDefaultValue,getImports],inputType->[tokenToType,inputType],genResource->[... | genResourceModule generates the code for a resource module. Register all provider resources The main entry point for the package package. | What do you expect this to make azure-nextgen and equinix-metal? |
@@ -154,7 +154,10 @@ namespace NServiceBus
ActivateAndInvoke<IWantToRunBeforeConfigurationIsFinalized>(TypesToScan, t => t.Run(this));
- featureActivator.SetupFeatures(new FeatureConfigurationContext(this));
+ var featureStats = featureActivator.SetupFeatures(new FeatureConfigurat... | [Configure->[Initialize->[WireUpConfigSectionOverrides]]] | Initialize method. | I don't think we need the initialized flag anymore in this method right? |
@@ -238,11 +238,14 @@ static void *alloc_cont_blocks(struct mm_heap *heap, int level,
/* check if we have enough consecutive blocks for requested
* allocation size.
*/
- for (current = map->first_free; current < map->count; current++) {
+ for (current = map->first_free; current < map->count &&
+ remaining ... | [_zalloc->[_malloc,bzero],free_heap->[dcache_writeback_region,panic,cpu_get_id,trace_mem_error],_balloc->[spin_lock_irq,spin_unlock_irq,_balloc_unlocked],_brealloc->[spin_unlock_irq,memcpy_s,_rfree_unlocked,spin_lock_irq,_balloc_unlocked],inline->[dcache_writeback_invalidate_region,block_get_size],heap_trace->[trace_me... | Allocate consecutive blocks of the specified size. | @keyonjie, wouldn't remove this `if(!remaining)` and move the assignment `start = current` below `remaining = 0` be better? |
@@ -681,7 +681,14 @@ func (g *generator) genApply(w io.Writer, expr *model.FunctionCallExpression) {
// If we only have a single output, just generate a normal `.Apply`
g.Fgenf(w, "%.v.ApplyT(%.v)%s", applyArgs[0], then, typeAssertion)
} else {
- // TODO
+ g.Fgenf(w, "pulumi.All(%.v", applyArgs[0])
+ applyAr... | [GenTemplateExpression->[GenLiteralValueExpression],genLiteralValueExpression->[genLiteralValueExpression],GenUnaryOpExpression->[GetPrecedence],GenBinaryOpExpression->[GetPrecedence],literalKey->[GenTemplateExpression,GenLiteralValueExpression],genStringLiteral->[genNYI]] | genApply generates the code for a given apply call. | What does the `%.v` format do differently than `%v`? |
@@ -293,6 +293,9 @@ namespace Microsoft.XmlSerializer.Generator
ImportType(type, mappings, importedTypes, warnings, importer, parsableerrors);
}
}
+ string nameOrLocation = assembly.Location;
+ if (nameOrLocation == string.Empty)
+ ... | [Sgen->[FormatMessage->[FormatMessage],WriteError->[WriteError,FormatMessage],Assembly->[WriteWarning],WriteWarning->[WriteWarning,FormatMessage],GetXmlSerializerAssemblyName->[GetXmlSerializerAssemblyName]]] | Generate a file with the given parameters. Checks if a type can be found in the system. private BindingFlags. Public | BindingFlags. NonPublic. | Should this also check for `null`? |
@@ -28,6 +28,7 @@ func resourceAwsDefaultVpc() *schema.Resource {
// assign_generated_ipv6_cidr_block is a computed value for Default VPCs
dvpc.Schema["assign_generated_ipv6_cidr_block"] = &schema.Schema{
Type: schema.TypeBool,
+ Optional: true,
Computed: true,
}
| [Printf,DescribeVpcs,StringValue,StringSlice,String,Errorf,SetId] | region resource - specific functions This function is a legacy function to remove a resource from the state file. It is not. | For backwards compatibility I don't set the `Default: false` flag here as is done for the equivalent attribute in the `aws_vpc` resource. |
@@ -933,6 +933,7 @@ def while_loop(cond, body, loop_vars, is_test=False, name=None):
body(Callable): A callable returning a tuple or list of tensors and LoDTensorArrays of the same arity
(length and structure) and types as ``loops_vars`` .
loop_vars(list|tuple): A list or tuple of tensors... | [Switch->[default->[ConditionalBlock,ConditionalBlockGuard],case->[_case_check_args->[],ConditionalBlock,ConditionalBlockGuard]],IfElseBlockGuard->[__exit__->[__exit__],__enter__->[__enter__],__init__->[block]],DynamicRNN->[_parent_block_->[block],block->[array_write,block,increment,less_than,array_to_lod_tensor],stati... | While loop. Returns the variable list of the last n - nodes in the system. | tensors and LoDTensorArrays tensors **or** LoDTensorArrays? |
@@ -146,9 +146,6 @@ public class UnitImageFactory {
// URL uses '/' not '\'
final String fileName = FILE_NAME_BASE + id.getName() + "/" + baseImageName + ".png";
final URL url = resourceLoader.getResource(fileName);
- if (url == null) {
- ClientLogger.logError("MISSING IMAGE (this unit or image w... | [UnitImageFactory->[getBaseImageURL->[getBaseImageURL],getHighlightImage->[getImage],getBaseImage->[getBaseImageURL,getImage],getIcon->[getBaseImage]]] | Get base image URL. | The code attempts to find image files in a bit of a shot-gun approach, and tries many paths which are not expected to be there. So this means we log an error quite frequently, whenever all unit images are being displayed. This means some paths of entry to this code point are happy with missing images, and others are no... |
@@ -1258,7 +1258,6 @@ export class VideoEventTracker extends EventTracker {
this.boundOnSession_ = this.sessionObservable_.fire.bind(
this.sessionObservable_
);
-
Object.keys(VideoAnalyticsEvents).forEach((key) => {
this.root
.getRoot()
| [No CFG could be retrieved] | Creates an event tracker for the given timerId. Adds an event that can be triggered by a video. | nit: undo this line removal to keep the history clean. |
@@ -18,11 +18,11 @@ import (
gouuid "github.com/satori/go.uuid"
"github.com/urfave/cli"
- "github.com/gogits/gogs/models"
- "github.com/gogits/gogs/modules/base"
- "github.com/gogits/gogs/modules/httplib"
- "github.com/gogits/gogs/modules/log"
- "github.com/gogits/gogs/modules/setting"
+ "github.com/go-gitea/gite... | [IsErrUpdateTaskNotExist,GetPublicKeyByID,GetUserByKeyID,Getenv,SetEngine,Now,Close,PushUpdate,Setenv,GetRepositoryByName,UpdateDeployKey,Exit,Response,IsSet,WorkDir,IsErrRepoNotExist,HasDeployKey,Error,SetTLSClientConfig,Args,MustInt64,NewV4,NewGitLogger,GetUpdateTaskByUUID,Run,Trace,Chdir,SplitN,HasSuffix,GetDeployKe... | Commands for the given user. handleUpdateTask returns uuid of the update task. | are relative imports not supported ? |
@@ -230,6 +230,12 @@ public class RemoteInterpreterProcess implements ExecuteResultHandler {
}
}
+ public void setMaxPoolSize(int size) {
+ if (clientPool != null) {
+ //Size + 2 for progress poller , cancel operation
+ clientPool.setMaxTotal(size + 2);
+ }
+ }
/**
* Called when angul... | [RemoteInterpreterProcess->[dereference->[releaseClient,getClient],updateRemoteAngularObject->[releaseClient,getClient]]] | Get the number of idle clients in the pool. | I suggest not limit the thrift client pool size. RemoteInterpreter's maximum concurrency is already limited (1 on FIFO, maxPoolSize on Parallel scheduler), so i think it'll generally safe without limiting thrift clientpool size. Also limiting two different concurrency parameters (one concurrency of job in scheduler, th... |
@@ -65,8 +65,10 @@ class TestParallelExecutorBase(unittest.TestCase):
main.random_seed = seed
loss = method(use_feed=feed_dict is not None)
- if memory_opt or use_ir_memory_optimize:
+ if memory_opt:
loss.persistable = True
+ else:
+ ... | [TestParallelExecutorBase->[check_network_convergence->[run_executor]]] | Check network convergence. Adds the necessary ops to the build_strategy. get the loss of the and the loss of the last node in the network. | loss.persistable = memory_opt |
@@ -1,4 +1,5 @@
"""Tests for letsencrypt.cli."""
+import configobj
import itertools
import os
import shutil
| [DetermineAccountTest->[test_no_accounts_email->[_call],test_single_account->[_call],test_no_accounts_no_email->[_call],test_args_account_set->[_call],test_multiple_accounts->[_call]],CLITest->[test_plugins->[_call],test_config_changes->[_call],test_rollback->[_call]]] | Tests for different commands. Test the number of changes. | import in wrong section |
@@ -108,6 +108,11 @@ func (te *TreeEntry) IsRegular() bool {
return te.gogitTreeEntry.Mode == filemode.Regular
}
+// IsExecutable if the entry is an executable file (not necessarily binary)
+func (te *TreeEntry) IsExecutable() bool {
+ return te.gogitTreeEntry.Mode == filemode.Executable
+}
+
// Blob returns the ... | [Type->[Mode],Blob->[Name],Sort->[Sort],FollowLink->[IsLink,Name,Blob,Size],CustomSort->[Sort],GetSubJumpablePathName->[IsSubModule,Name,IsDir,GetSubJumpablePathName],IsSubModule,Name,IsDir] | IsRegular returns true if the tree entry is a regular file. | This isn't in the original PR. Please submit a PR to master with this change first, thenit can be backported |
@@ -296,6 +296,7 @@ public class Task implements TaskIFace {
@Override
@SuppressWarnings("unchecked")
public void run() {
+ recordsPulled.set(0L);
MDC.put(ConfigurationKeys.TASK_KEY_KEY, this.taskKey);
this.startTime = System.currentTimeMillis();
this.taskState.setStartTime(startTime);
| [Task->[getProgress->[isStreamingTask],addConstructsFinalStateToTaskState->[toString],getBytesWritten->[getBytesWritten],updateRecordMetrics->[updateRecordMetrics],processRecord->[isStreamingTask],run->[areSingleBranchTasksSynchronous,completeShutdown,isStreamingTask,shutdownRequested],commit->[addConstructsFinalStateT... | This method is invoked when the task is executed. This method is called when a task is in a streaming state. This method is called when the extractor is finished with the results. | For retry from the beginning, setting `recordsPulled` to 0 makes sense. But for retry from failed point, this logic is wrong. We do need a configuration key to identify which retry mode is favored, making sure each is implemented correctly (all states should be cleared for retry from beginning, keep previous states for... |
@@ -97,7 +97,7 @@ namespace Microsoft.WebAssembly.Diagnostics
{
// Generate a random suffix
string suffix = Guid.NewGuid().ToString().Substring(0, 5);
- string prefix = ma_str.Trim().Replace(".", "_");
+ ... | [EvaluateExpression->[CompileAndRunTheExpression->[VisitInternal,ResolveElementAccess,ResolveMethodCalls,ResolveIdentifiers,ResolveMemberAccessExpressions],FindVariableNMethodCall->[GetTypeFullName->[ConvertJSToCSharpType],Visit->[Visit]]]] | Replace variables in the syntax tree. 2. Generate a random suffix and add a corresponding method param and the unique element access. Updates a node with a new id parameter. | should we have this regex cached? |
@@ -654,6 +654,13 @@ def plot_evoked(evoked, picks=None, exclude='bads', unit=True, show=True,
raise ValueError('Number of axes (%g) must match number of channel '
'types (%g)' % (len(axes), n_channel_types))
+ fig = axes[0].get_figure()
+
+ # instead of projecting during each... | [plot_evoked->[_mutable_defaults,tight_layout],plot_raw->[_mutable_defaults],tight_layout->[tight_layout],plot_image_epochs->[_mutable_defaults,tight_layout],plot_topo_power->[_plot_topo],plot_cov->[tight_layout],_plot_raw_onkey->[_plot_raw_time,_toggle_options],plot_topo_tfr->[_plot_topo],plot_topo_image_epochs->[_plo... | Plot an evoked evoked critical channel type. Generate a sequence of missing - free items. Plots the n - component criticalness of a channel. | This seems more elegant to me than applying the projs at each iteration. Another advantage is, that evoled.plot(True) now will operate on a copy --> reversible (captures the dropped example 3 from plot_delayed_ssp |
@@ -838,8 +838,7 @@ static SSL_CIPHER ssl3_ciphers[] = {
1,
TLS1_3_TXT_AES_128_GCM_SHA256,
TLS1_3_CK_AES_128_GCM_SHA256,
- SSL_kRSA,
- SSL_aRSA,
+ 0, 0,
SSL_AES128GCM,
SSL_AEAD,
TLS1_3_VERSION, TLS1_3_VERSION,
| [No CFG could be retrieved] | This function is used to filter out protocol specific errors. ECDSA with AES - 128 and AES - 256 cipher. Only return SSL_HIGH if any of the flags are set. | I'm wondering if there is anything preventing us from adding the remaining TLSv1.3 MTI ciphersuites at this point. |
@@ -76,7 +76,7 @@ public class SymbolicExecutionVisitor extends SubscriptionVisitor {
} else {
return walker.visitMethod(methodTree);
}
- } catch (ExplodedGraphWalker.MaximumStepsReachedException | ExplodedGraphWalker.ExplodedGraphTooBigException | BinaryRelation.TransitiveRelationExceededExce... | [SymbolicExecutionVisitor->[methodCanNotBeOverriden->[isPrivate,isFinal,flags,isAbstract,isStatic],nodesToVisit->[newArrayList],visitNode->[execute],execute->[methodCanNotBeOverriden,createWalker,getSemanticModel,visitMethod,debug,MethodBehavior,completed,add,symbol],ExplodedGraphWalkerFactory,BehaviorCache,get]] | Executes a method tree. | Why not `RelationalSymbolicValue.TransitiveRelationExceededException` ? |
@@ -162,11 +162,13 @@
"git add"
]
},
+ "husky": {
+ "hooks": {
+ "pre-commit": "lint-staged"
+ }
+ },
<%_ } _%>
"scripts": {
- <%_ if(!skipCommitHook) { _%>
- "precommit": "lint-staged",
- <%_ } _%>
"prettier:format": "prettier --write \"src/**/*.{ts,css,scss}\"",
"l... | [No CFG could be retrieved] | The webpack - dev - server version of the server. The main webpack process. | Please retain the condition in the new husky block as well |
@@ -386,6 +386,13 @@ class Exchange:
f'On exchange stoploss is not supported for {self.name}.'
)
+ # Limit price threshold: As limit price should always be below stop-price
+ # Used for limit stoplosses on exchange
+ limit_price_pct = order_types.get('stoploss_on_exc... | [available_exchanges->[is_exchange_bad,ccxt_exchanges],Exchange->[fetch_ticker->[fetch_ticker,markets],validate_pairs->[markets,get_pair_quote_currency],sell->[create_order,dry_run_order],_async_get_trade_history->[_async_get_trade_history_time,_async_get_trade_history_id],_store_dry_order->[get_pair_quote_currency],ge... | Checks if order - types are supported. | I don't think this is exchange specific - so maybe adding it to the validation in constants.py would suffice? (you can add min / max values there ...) This works perfectly well for sure - but i guess we should try to not manually code things which are really just schema validations ... |
@@ -5727,8 +5727,8 @@ DRIVER_INIT_MEMBER(namcos2_state,marvland)
DRIVER_INIT_MEMBER(namcos2_state,metlhawk)
{
/* unscramble sprites */
- uint8_t *data = memregion("gfx1")->base();
- for (int i=0; i<0x200000; i+=32*32)
+ uint8_t *data = memregion("sprites")->base();
+ for (int i=0; i<memregion("sprites")->bytes(); i... | [No CFG could be retrieved] | Enumerate all members of the namcos2 state machine. - - - - - - - - - - - - - - - - - - 00000 + i + j + k = 0. | Please at least lift the call to `memregion("sprites")->bytes()` out of the loop - right now you're doing a tagmap lookup when it checks the condition on every iteration of the loop. |
@@ -68,14 +68,12 @@ class AssignWindowsParDoFnFactory implements ParDoFnFactory {
}
private static class AssignWindowsParDoFn<T, W extends BoundedWindow> implements ParDoFn {
- private final DataflowExecutionContext.DataflowStepContext stepContext;
private final WindowFn<T, W> windowFn;
private @... | [AssignWindowsParDoFnFactory->[create->[getBytes,getWindowFn,deserializeWindowingStrategy,getStepContext],AssignWindowsParDoFn->[startBundle->[checkState,getSimpleName],processElement->[element->[getValue],window->[getOnlyElement,getWindows],timestamp->[getTimestamp],getValue,of,assignWindows,process,getTimestamp,Assig... | Starts a bundle with the given receivers. | Isn't the `stepContext` argument also unused now? It's curious that that doesn't raise a warning too. |
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-import PriorityQueue from '../../../../src/core/data-structures/priority-queue';
+import PriorityQueue from '#core/data-structures/priority-queue';
describes.sandboxed('PriorityQueue', {}, () => {
let pq;
| [No CFG could be retrieved] | Creates an array of objects from the given priority queue. The following functions enqueue enqueue enqueue enqueue enqueue enqueue enqueue enqueue enqueue enqueue enqueue enqueue enqueue enqueue enqueue. | Imports like this really show how much cleaner imports can be, and how much easier it'll be to reorganize files when you don't have to update `../../../` to `../../../../../src/core` etc |
@@ -177,6 +177,12 @@ define([
return when.resolve();
}
+ if (FeatureDetection.isInternetExplorer()) {
+ return when.reject({
+ message : 'Draco decoding is not supported in legacy environments.'
+ });
+ }
+
var loadResources = model._lo... | [No CFG could be retrieved] | Schedules decoding tasks available for the given object. | To be a little more obvious, maybe just say "Draco decoding is not currently support in Internet Explorer" |
@@ -89,7 +89,11 @@ public class LogEntryProvider implements BaseLogEntryProvider {
Object entry = entries.get(0);
if (entry instanceof LogEntry) {
for (Object logEntry : entries) {
- doPublish((LogEntry) logEntry);
+ try {
+ doPublish((LogE... | [LogEntryProvider->[queryLogsByPage->[append,toString,doPublish,queryLogsByPage],addLogEntry->[doPersist],nativeQuery->[doPublishIfEntries],getLogEntriesFor->[doPublish,append],createProvider->[LogEntryProvider],getLogEntryByID->[doPublish],queryLogs->[doPublish,append],nativeQueryLogs->[doPublish],toString->[toString]... | doPublishIfEntries - Publishes the given list of log entries if any of the given. | Which exception has been observed here? Please don't catch exceptions when we don't actually know what they are. |
@@ -81,6 +81,12 @@ class Cache
return false;
}
+ /**
+ * @param $file
+ * @param $contents
+ * @return bool|int
+ * @throws \ErrorException
+ */
public function write($file, $contents)
{
if ($this->enabled) {
| [Cache->[gc->[size,getIterator,valid,unlink,getPathname,format,modify,next,date],write->[writeError,getMessage],getFinder->[files],copyFrom->[ensureDirectoryExists,writeError,isDebug],read->[writeError],remove->[unlink],clear->[removeDirectory],copyTo->[writeError],__construct->[writeError]]] | Reads a file from the cache and writes it into the cache if it exists. | putting phpdoc without putting types means this phpdoc is invalid. |
@@ -112,7 +112,7 @@ var config = {
}
},
watchOptions: {
- poll: 500,
+ poll: 2000,
ignored: [
// Ignore node_modules in watch except for the origin-js directory
/node_modules([\\]+|\/)+(?!origin)/,
| [No CFG could be retrieved] | Config for webpack - version - specific webpack. Config for the module. | This reduces docker CPU usage by 50% on my Macbook pro. I don't notice delay in webpack compilation. |
@@ -1669,6 +1669,14 @@ class Model(object):
if fluid.in_dygraph_mode():
with fluid.framework._dygraph_guard(None):
layer = self.network
+ if self._shapes is None: # No provided or inferred
+ raise RuntimeError(
+ "Saving in... | [StaticGraphAdapter->[parameters->[parameters],save->[_save->[to_numpy],_save],_run->[flatten_list,restore_flatten_list,to_list],_make_program->[_all_gather,to_list]],init_communicator->[wait_server_ready],DynamicGraphAdapter->[parameters->[parameters],load->[_load_state_from_path->[],parameters],train_batch->[to_numpy... | Save the inference model of a specific n - node. Build input and output variables for a single n - layer layer. This function saves the missing - block block model to disk. | 1. inputs 2. shape |
@@ -183,6 +183,14 @@ class Git(VersionControl):
else:
url, rev = super(Git, self).get_url_rev()
+ reg="^((.+):[^/][^/](.+))@(.+)$"
+ match = re.match(reg, url)
+ print "url: %s" % url
+ if match:
+ url = match.group(1)
+ rev = match.group(4)
+ ... | [Git->[get_src_requirement->[get_revision,get_url,get_branch_revs,get_tag_revs],obtain->[check_rev_options],update->[check_rev_options]]] | Returns the URL and revision of the . | need to remove debug print |
@@ -9,8 +9,8 @@ from django.conf import settings
from django.contrib.auth.middleware import AuthenticationMiddleware
from django.contrib.auth.models import AnonymousUser
from django.contrib.sessions.middleware import SessionMiddleware
+from django.core.exceptions import ImproperlyConfigured
from django.db import tr... | [SetRemoteAddrFromForwardedFor->[process_request->[is_valid_ip]],CommonMiddleware->[process_request->[safe_query_string]]] | The main entry point for the ethernet authentication. If the is not in the request and the user has not requested it to set. | I can't find any django docs on `constant_time_compare` |
@@ -172,4 +172,10 @@ class ApacheHttp01(common.TLSSNI01):
self.configurator.parser.add_dir(
vhost.path, "Include", self.challenge_conf_post)
+ if not vhost.enabled:
+ from certbot_apache.parser import get_aug_path
+ self.configurator.parser.add_di... | [ApacheHttp01->[perform->[str,ensure_listen,_set_up_challenges,_mod_config,prepare_http01_modules,save],_mod_config->[register_file_creation,debug,write,str,format,_relevant_vhosts,_set_up_include_directives,find_best_http_vhost,open],_set_up_challenges->[append,isdir,chmod,_set_up_challenge,makedirs],prepare_http01_mo... | Adds Include directives to the Augeas search tree. | Can we move this import to the top of the file? |
@@ -356,8 +356,11 @@ void Server::init()
infostream << "- game: " << m_gamespec.path << std::endl;
// Create world if it doesn't exist
- if (!loadGameConfAndInitWorld(m_path_world, m_gamespec))
- throw ServerError("Failed to initialize world");
+ std::string error;
+ if (!loadGameConfAndInitWorld(m_path_world,... | [No CFG could be retrieved] | Create a server object. Create the N - tuple of the server map and initialize the scripting and inventory managers. | Spaces -> tabs |
@@ -704,7 +704,7 @@ void
RtpsUdpDataLink::disassociated(const RepoId& local_id,
const RepoId& remote_id)
{
- release_reservations_i(local_id, remote_id);
+ release_reservations_i(remote_id, local_id);
ACE_GUARD(ACE_Thread_Mutex, g, locators_lock_);
| [No CFG could be retrieved] | - > - > - > - > - > - > - > - > - > - > Register for writer - > Unregister for reader - > Register for writer - >. | wow... how long has this been wrong? |
@@ -9093,6 +9093,7 @@ namespace System.Runtime.CompilerServices
}
public static partial class RuntimeHelpers
{
+ [System.ObsoleteAttribute("OffsetToStringData is obsolete. Use string.GetPinnableReference() instead.")]
public static int OffsetToStringData { get { throw null; } }
p... | [No CFG could be retrieved] | A class that is used to mark a variable as being used by the runtime. Prepare the runtime method for the runtime. | Should we be following @terrajobst's new plan for obsoletion? |
@@ -242,3 +242,6 @@ async def test_send_over_websocket_async(connstr_receivers):
received.extend(r.receive(timeout=3))
assert len(received) == 20
+
+ for r in receivers:
+ r.close()
| [test_send_batch_async->[batched],test_send_batch_with_app_prop_async->[batched],test_send_partition_batch_async->[batched]] | Test send over websocket async. | This should be awaited? |
@@ -199,6 +199,9 @@ def detection_output(loc,
scores,
prior_box,
prior_box_var,
+ arm_loc=None,
+ arm_scores=None,
+ objectness_threshold=0.5,
background_label=0,
... | [detection_map->[__create_var],prior_box->[_is_list_or_tuple_],anchor_generator->[_is_list_or_tuple_],density_prior_box->[_is_list_or_tuple_],ssd_loss->[target_assign,bipartite_match,box_coder,iou_similarity,__reshape_to_2d],multi_box_head->[_is_list_or_tuple_and_equal->[_is_list_or_tuple_],_is_list_or_tuple_and_equal,... | This function is the base method for the detection output layer. This function is a function that performs a series of top k detections. Multiple - class NMS filter. | RefineDetdetection output RefineDet |
@@ -16,7 +16,7 @@ class UnvOutputProcess(KratosMultiphysics.Process):
# then paraview will not be able to group them
default_parameters = KratosMultiphysics.Parameters("""{
"model_part_name" : "PLEASE_SPECIFY_MODEL_PART_NAME",
- "output_frequency" ... | [UnvOutputProcess->[PrintOutput->[PrintOutput],__init__->[__init__]]] | Initialize the object with the specified model and settings. | missing import: `from KratosMultiphysics.deprecation_management import DeprecationManager` |
@@ -1,2 +1,3 @@
export { default as VideoBackgroundButton } from './VideoBackgroundButton';
export { default as VirtualBackgroundDialog } from './VirtualBackgroundDialog';
+export { default as VirtualBackgroundPreview } from './VirtualBackgroundPreview';
| [No CFG could be retrieved] | Exports the default background buttons. | This is not used anywhere else outside this feature, right? Then let's not export it. |
@@ -65,11 +65,12 @@ func HTTP(ctx *context.Context) {
return
}
- var isPull bool
+ var isPull, pushCreate bool
service := ctx.Query("service")
if service == "git-receive-pack" ||
strings.HasSuffix(ctx.Req.URL.Path, "git-receive-pack") {
isPull = false
+ pushCreate = true
} else if service == "git-up... | [sendFile->[IsNotExist,Header,ModTime,Join,Size,Stat,Format,Sprintf,ServeFile,Set,WriteHeader],setHeaderNoCache->[Header,Set],setHeaderCacheForever->[Header,Unix,Sprintf,Now,Set],Status,HandleText,IsErrUserProhibitLogin,IsErrTwoFactorNotEnrolled,GetAccessTokenBySHA,sendFile,NotFoundOrServerError,Close,Fields,GetReposit... | HTTP - HTTP protocol Get the access mode of a unit. | Can the content of `service` be faked by a malicious user? |
@@ -1167,7 +1167,12 @@ public class CollectionTask<ProgressBackground, ResultBackground> extends BaseAs
Timber.d("doInBackgroundSearchCards was cancelled so return null");
return null;
}
- searchResult.get(i).load(false, mColumn1Index, mColumn2In... | [CollectionTask->[getCol->[getCol],DeleteNote->[actualTask->[UndoDeleteNote]],DismissNotes->[task->[actualTask]],ExportApkg->[task->[getContext]],nonTaskUndo->[undo],ChangeDeckMulti->[actualTask->[UndoChangeDeckMulti]],PartialSearch->[doProgress->[doProgress,isCancelled,add],add->[add],isCancelled->[isCancelled],getPro... | This method is called when a task is executed when the search is complete. | likewise: probably better as a general exception handler |
@@ -102,10 +102,12 @@ func (e *ListTrackersEngine) ensureUID() error {
e.uid = e.G().GetMyUID()
return nil
}
- user, err := libkb.LoadUser(libkb.NewLoadUserByNameArg(e.G(), e.username))
- if err != nil {
- return err
- }
- e.uid = user.GetUID()
- return nil
+
+ arg := libkb.NewLoadUserByNameArg(e.G(), e.userna... | [Prereqs->[IsNil],ensureUID->[NewLoadUserByNameArg,Exists,GetUID,G,GetMyUID,LoadUser],Run->[ensureUID,NewTrackerSyncer,Trackers,Account,LoginState,LocalSession,G,LoggedIn,RunSyncer],ExportedList->[List,Export],NewContextified] | ensureUID ensures that the UID of the user is set. | This isn't always self. `keybase list-trackers someoneelse` will run this. |
@@ -15,9 +15,12 @@ the different coordinate frames involved in this process.
Let's start out by loading some data.
"""
+import os
import os.path as op
import numpy as np
+import nibabel as nib
+from scipy import linalg
import mne
from mne.datasets import sample
| [plot_alignment,print,setup_volume_source_space,mean,data_path,read_source_spaces,make_sphere_model,len,norm,read_raw_fif,read_trans,join,dig_mri_distances,set_3d_view] | A function to plot a single well aligned in space for the main sample. This function automatically looks for the which is the MRI surfaces to show from. | the only place you use `os` is in a call to `os.path`, which is already imported as `op` on the next line. Personally I prefer fully spelling out `os.path.join()` in tutorials (more transparent what it's doing), but others like `op.join()` so I don't insist. But I do insist that within a tutorial you pick one or the ot... |
@@ -88,12 +88,12 @@ public final class DefaultTicketRegistry extends AbstractTicketRegistry {
}
@Override
- public int sessionCount() {
+ public long sessionCount() {
return (int) this.cache.values().stream().filter(t -> t instanceof TicketGrantingTicket).count();
}
@Override
- ... | [DefaultTicketRegistry->[updateTicket->[addTicket]]] | Update ticket count. | Well, if we go with `long`, then this cast should be removed. |
@@ -1906,7 +1906,11 @@ join_merge_window(daos_handle_t ih, struct agg_merge_window *mw,
/* Lookup physical entry, enqueue if it doesn't exist */
phy_ent = lookup_phy_ent(mw, &phy_ext, entry);
if (phy_ent == NULL) {
- D_ASSERT(phy_ext.ex_lo == lgc_ext.ex_lo);
+ if (phy_ext.ex_lo != lgc_ext.ex_lo) {
+ /** Tail ... | [No CFG could be retrieved] | Enqueue removal or remove records. Enqueue the logical entry and optionally flush the merge window. | I think we should assert "partial" as well? It looks to me it can only happen when a physical entry spanning merge window, and it was fully removed in prior window flush since it's fully covered by a removal entry, I just don't quite see why such physical entry (a fully removed entry) will result in partial logical ent... |
@@ -503,7 +503,7 @@ if (empty($reshook) && $action == 'update')
$object->note_private = trim(GETPOST("note", "restricthtml"));
$object->fk_element = GETPOST("fk_element", "int");
$object->elementtype = GETPOST("elementtype", "alphanohtml");
- if (!$datef && $percentage == 100)
+ if (!$datef && $percentage =... | [fetch,create,select_projects,form_project,formconfirm,fetch_object,lasterror,select_all_categories,selectTypeDuration,loadReminders,getNomUrl,selectcontacts,rollback,select_type_actions,createFromClone,select_dolusers,showCategories,setCategories,begin,initHooks,form_select_status_action,idate,fetch_contact,load,conta... | Dol \ Model \ Header \ Header \ Header user - > user - > user - > user - > user - > user - >. | Whe should not use the code to know if end date is required or not. This is a rule on the value percentage and date end. If we want no end date, it means it is a punctual event in such a case, percentage value must be -1. percentage = 100 means the event has a start a different end date and is finished. |
@@ -189,8 +189,8 @@ namespace R2RDump
/// </summary>
internal override void DumpDisasm(RuntimeFunction rtf, int imageOffset)
{
- int indent = (_options.Naked ? 11 : 32);
- string indentString = new string(' ', indent);
+ int indent = (_options.Naked ? _options... | [TextDumper->[DumpHeader->[WriteDivider,SkipLine],DumpMethod->[SkipLine,WriteSubDivider],DumpSectionContents->[DumpBytes],DumpQueryCount->[SkipLine],DumpBytes->[SkipLine],DumpEntryPoints->[WriteDivider],DumpRuntimeFunction->[SkipLine],DumpAllMethods->[WriteDivider,SkipLine],DumpSection->[SkipLine,WriteSubDivider]]] | Dumps the disassembly instructions for the specified image and code. | I would prefer using spaces. My editing tools have tab set to 4 spaces, some people prefer 8 spaces ... |
@@ -22,10 +22,11 @@ import java.util.concurrent.atomic.AtomicReferenceArray;
import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
/**
- * Default {@link AttributeMap} implementation which use simple synchronization per bucket to keep the memory overhead
+ * Default {@link DefaultAttributeMap} implementat... | [DefaultAttributeMap->[DefaultAttribute->[remove->[remove0,set],getAndRemove->[getAndSet,remove0],setIfAbsent->[get,compareAndSet]],attr->[compareAndSet,get,requireNonNull,DefaultAttribute,index],hasAttr->[get,index,requireNonNull],index->[id],newUpdater]] | Creates a new instance of the DefaultAttributeMap class. Set the object s attributes. | @doom369 should we merge this class with `AbstractChannel` ? |
@@ -355,7 +355,7 @@ namespace System.Security.Cryptography.X509Certificates.Tests
}
}
- [Theory, MemberData(nameof(BrainpoolCurves))]
+ [ConditionalTheory(nameof(SupportsBrainpool)), MemberData(nameof(BrainpoolCurves))]
public static void TestKey_ECDsabrainpool_PublicKey(b... | [PublicKeyTests->[TestECDHPublicKey_DeriveSecret->[PublicKey],PublicKey->[PublicKey],TestECDHPublicKey->[PublicKey],TestDSAPublicKey->[VerifyKey_DSA]]] | Tests that the public key is valid for a given signature. Checks that the test fails. | Hmm. macOS doesn't support Brainpool, nor does Windows7. I think this suggests we're throwing a PNSE out of Android where we throw a CryptographicException elsewhere. |
@@ -1078,6 +1078,10 @@ public class IcebergMetadataWriter implements MetadataWriter {
long newCompletenessWatermark = DEFAULT_COMPLETION_WATERMARK;
SortedSet<ZonedDateTime> datePartitions = new TreeSet<>(Collections.reverseOrder());
+ @Setter
+ String dbName;
+ @Setter
+ String tableName;
@... | [IcebergMetadataWriter->[mergeOffsets->[getLastOffset],createTable->[createTable],write->[getIcebergTable],writeEnvelope->[write,getAndPersistCurrentWatermark],computeCandidateSchema->[getIcebergTable],addLatePartitionValueToIcebergTable->[addPartitionToIcebergTable],close->[close],getAndPersistCurrentWatermark->[getIc... | This class is used to obtain the table metadata for a given sequence of tables. Get or init appendFiles or init deleteFiles. | Why this two arg needed here? |
@@ -136,8 +136,11 @@ class MessageBuilder:
for info in errs:
self.errors.add_error_info(info)
- def disable_errors(self) -> None:
+ @contextmanager
+ def disable_errors(self) -> Iterator[None]:
self.disable_count += 1
+ yield
+ self.disable_count -... | [format_type_bare->[format_type_inner,find_type_overlaps],for_function->[callable_name,format],pretty_callable->[format_type_bare,format],format_key_list->[format],find_type_overlaps->[format,collect_all_instances],append_invariance_notes->[format],make_inferred_type_note->[format],format_type->[quote_type_string],call... | Add errors in messages to this builder. | Should use try-finally |
@@ -54,6 +54,11 @@ class RawBrainVision(_BaseRaw):
events (stimulus triggers will be unaffected). If None, response
triggers will be ignored. Default is 0 for backwards compatibility, but
typically another value or None will be necessary.
+ event_id : dict | None
+ The id of the eve... | [read_raw_brainvision->[RawBrainVision],_get_vhdr_info->[_read_vmrk_events]] | Initialize a new object from a montage file containing the electrode positions. Reads the VHDR file and creates event channels. | I think this is a bit confusingly written ... these values are assigned _in addition_ to numeric values that are pulled by default, right? |
@@ -203,10 +203,14 @@ public class AnnotationBean extends AbstractConfig implements DisposableBean, Be
@Override
public Object postProcessBeforeInitialization(Object bean, String beanName)
throws BeansException {
- if (!isMatchPackage(bean)) {
+ Class targetClass=bean.getClass();
+ ... | [AnnotationBean->[destroy->[destroy],postProcessAfterInitialization->[setApplicationContext],refer->[setApplicationContext]]] | This method is called after the bean is initialized. It checks for the required fields and methods. | Make sure the code format is right pls. |
@@ -378,14 +378,15 @@ func (r *Rotator) rotate(reason rotateReason) error {
}
func (r *Rotator) rotateByInterval(reason rotateReason) error {
- fi, err := os.Stat(r.filename)
+ _, err := os.Stat(r.filename)
+
if os.IsNotExist(err) {
return nil
} else if err != nil {
return errors.Wrap(err, "failed to rota... | [Sync->[Sync],openFile->[dirMode,dir],closeFile->[Close],rotate->[closeFile,purgeOldBackups],Write->[Write],rotateByInterval->[Rotate],purgeOldSizedBackups->[backupName],openNew->[dirMode,dir],rotateBySize->[backupName]] | rotateByInterval rotate the backup files by interval. | what about the situation where last entry was yesterday then service was down and now we're writing again? shouldn't log say that the file we're trying to backup was created and logged into yesterday only? |
@@ -649,6 +649,7 @@ namespace Dynamo.Controls
private void DynamoViewModelRequestShowHideGallery(bool showGallery)
{
+ HidePopupWhenWindowDeactivated(ShowHideFlags.Hide);
if (showGallery)
{
if (galleryView == null) //On-demand instantiation
| [DynamoView->[DynamoView_Unloaded->[UnsubscribeNodeViewCustomizationEvents],DynamoViewModelRequestShowPackageManagerSearch->[DisplayTermsOfUseForAcceptance],Log->[Log],WindowClosing->[PerformShutdownSequenceOnViewModel],WorkspaceTabs_SizeChanged->[ToggleWorkspaceTabVisibility],WindowClosed->[PerformShutdownSequenceOnVi... | DynamoViewModelRequestShowHideGallery method. | This is quite cumbersome to call this function before show any dialog. |
@@ -8684,6 +8684,18 @@ void LowererMD::GenerateFastInlineBuiltInCall(IR::Instr* instr, IR::JnHelperMeth
Assert(helperMethod == (IR::JnHelperMethod)0);
return GenerateFastInlineBuiltInMathAbs(instr);
+ case Js::OpCode::InlineMathPow:
+#ifdef _M_IX86
+ if (!instr->GetSrc2()->IsFloat())
+ ... | [No CFG could be retrieved] | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -. | If the exponent int32 type-spec can happen for both x86/x64, why restrict this to x86 ? |
@@ -212,7 +212,7 @@ public abstract class HiveRegister implements Closeable {
* @param tableName the table name
* @throws IOException
*/
- public abstract void dropTableIfExists(String dbName, String tableName) throws IOException;
+ public abstract void dropTableIfExists(String dbName, String tableName, S... | [HiveRegister->[createOrAlterTable->[alterTable,createTableIfNotExists],get->[get],addOrAlterPartition->[alterPartition,addPartitionIfNotExists]]] | Drop a table if it exists. | You shouldn't modify public APIs. Furthermore, these parameters shouldn't be part of this method. The HiveRegister implementation must already know the metastoreURI, while the azkabanUri should be injected into the EventSubmitted. |
@@ -18,6 +18,10 @@ def get_list(text):
def get_bool_from_env(name, default_value):
if name in os.environ:
value = os.environ[name]
+ # Enable Pythonic environment variables,
+ # i.e. DEBUG='' or DEBUG= is Falsy but would generate an error
+ if value == '':
+ return False
... | [get_list->[strip,split],get_bool_from_env->[literal_eval,ValueError,format],get_host->[get_current],get_currency_fraction,bool,int,pgettext_lazy,_,parse,append,get_list,dirname,insert,get,getenv,config,setdefault,join,normpath,get_bool_from_env,CACHES] | Get a boolean value from environment variables. | The value should be defaulting to whatever is `default_value`. If the value is \*not\* set. Which was the expected behavior from him. Otherwise it doesn't make sense (for me at least). I would suggest to replace `if name in os.environ: ...` by a `if value: ...` (where value is from a `environ.get`) which would handle t... |
@@ -17,15 +17,16 @@
*/
package org.apache.beam.sdk.transforms;
-import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkArgument;
+import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkArgument;
import java.io.Serializable;
import java... | [ParDo->[codersForStateSpecTypes->[of],getDoFnSchemaInformation->[getFieldAccessDescriptorFromParameter],isSplittable->[isSplittable],MultiOutput->[expand->[validateStateApplicableForInput,validateWindowType,finishSpecifyingStateSpecs],populateDisplayData->[populateDisplayData],withSideInputs->[withSideInputs],toString... | Imports a single non - null object. Imports all components of the SDK. | We need to validate that the types of the parameters match the types of the side input. Possibly we should do this in the validate() method - there we can look up the elementT of each parameter and make sure it matches the elementT of the PCollectionView. |
@@ -55,6 +55,7 @@ func TestEnrichAWSConfigWithEndpoint(t *testing.T) {
awssdk.Config{},
awssdk.Config{
EndpointResolver: awssdk.ResolveWithEndpointURL("https://cloudwatch.us-west-1.amazonaws.com"),
+ Region: "us-west-1",
},
},
}
| [Equal,ResolveWithEndpointURL,NoError,Run,Retrieve] | checks the correctness of an in the case of a failure. | Does the other testcase validate that the region defaults to `us-east-1` if it's empty? |
@@ -303,13 +303,13 @@ class BaseResources(object):
return (files, raw)
def _inline(self, path):
- begin = "/* BEGIN %s */" % path
+ begin = "/* BEGIN %s */"
try:
with open(path, 'rb') as f:
middle = f.read().decode("utf-8")
except IOError:
... | [JSResources->[_render_custom_models_static->[_escape_code],js_files->[_resolve],js_raw->[_resolve]],CSSResources->[css_files->[_resolve],css_raw->[_resolve]],_get_server_urls->[mk_url],_get_cdn_urls->[mk_url,_cdn_base_url],Resources->[render->[render_js,render_css]],BaseResources->[_cdn_urls->[_get_cdn_urls],_server_u... | Return a string containing the inline sequence of a . | You should remove `%s` as well (the same below). Preferably use `os.path.basename(path)`, so that we know what component we're dealing with. |
@@ -346,8 +346,12 @@ def vcvars_dict(settings, arch=None, compiler_version=None, force=False, filter_
@contextmanager
def vcvars(*args, **kwargs):
- new_env = vcvars_dict(*args, **kwargs)
- with environment_append(new_env):
+ settings = args[0]
+ if settings.get_safe("os") == "Windows":
+ new_env... | [vcvars->[vcvars_dict],vcvars_dict->[relevant_path,vcvars_command],vcvars_command->[find_windows_10_sdk,vs_installation_path],run_in_windows_bash->[escape_windows_cmd,unix_path],unix_path->[get_cased_path]] | Yields a sequence of environment variables that can be used to set a critical critical variable in. | I think it shouldn't be based on the setting but in the current system. |
@@ -92,6 +92,7 @@ type testBlockOpsConfig struct {
initModeGetter
clock Clock
reporter Reporter
+ subsciptionManager SubscriptionManager
subsciptionManagerPublisher SubscriptionManagerPublisher
}
| [Decode->[Decode],Get->[Get],cryptoPure,Get,putError] | TlfID implements the KeyMetadata interface for fakeKeyMetadata. BlockCache returns a BlockCache instance that can be used to cache the data and the encryption. | ouch, I guess we're committed to the spelling mistake now ;) |
@@ -102,7 +102,7 @@ function classDirective(name, selector) {
* @example Example that demonstrates basic bindings via ngClass directive.
<example>
<file name="index.html">
- <p ng-class="{strike: deleted, bold: important, red: error}">Map Syntax Example</p>
+ <p ng-class="{'strike': deleted, 'bo... | [No CFG could be retrieved] | A directive that can be used to add duplicate classes to a NgClass element. <file name = style. css type = bold strike or red >. | this is actually completely valid the way it was before, is there any reason you want to write it like this? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.