patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -294,8 +294,9 @@ class TemplatedExternalTool(ExternalTool):
help=(
"URL to download the tool, either as a single binary file or a compressed file "
"(e.g. zip file). You can change this to point to your own hosted file, e.g. to "
- "work with proxies or f... | [rules->[rules],ExternalTool->[split_known_version_str->[ExternalToolError],generate_exe->[generate_url],get_request->[UnknownVersion],get_request_for->[ExternalToolRequest,generate_url,generate_exe,ExternalToolError],check_version_constraints->[UnsupportedVersion]],download_external_tool->[DownloadedExternalTool]] | Register options for the critical section. | Is it not common for url like paths such as these to have a `file://` prefix in front of the path? |
@@ -526,7 +526,7 @@ public class PluginWrapper implements Comparable<PluginWrapper>, ModelObject {
List<String> missingDependencies = new ArrayList<String>();
// make sure dependencies exist
for (Dependency d : dependencies) {
- if (parent.getPlugin(d.shortName) == null)
+ ... | [PluginWrapper->[doMakeEnabled->[enable],doMakeDisabled->[disable],stop->[getPlugin,stop],getBackupFile->[getShortName],getVersionNumber->[getVersion],resolvePluginDependencies->[getPlugin,toString],getBackupVersion->[getBackupFile],hasUpdate->[getUpdateInfo],isPinningForcingOldVersion->[getVersionOf,getVersionNumber,i... | Resolve missing plugin dependencies. | Did you just copy a diff from #2001 under a different commit hash or something? |
@@ -1667,9 +1667,9 @@ namespace Dynamo.Graph.Nodes
if (isPersistent)
{
State = ElementState.PersistentWarning;
- if (!string.Equals(persistentWarning, p))
+ if (!persistentWarnings.Contains(p))
{
- persistentWar... | [NodeModel->[ClearErrorsAndWarnings->[ClearPersistentWarning,ClearTooltipText],BuildAst->[BuildOutputAst],ComputeUpstreamOnDownstreamNodes->[ComputeUpstreamCache],OnPortConnected->[OnConnectorAdded,ConnectOutput,OnNodeModified,ConnectInput],Warning->[Warning,ClearPersistentWarning],UpdateValueCore->[UpdateValueCore],Se... | Warning - add warning if it is not in the list. | Since `persistentWarnings` is a hashset, this check may not be required, right? |
@@ -103,11 +103,15 @@ func (o *PruneDeploymentsOptions) Complete(f *clientcmd.Factory, cmd *cobra.Comm
if err != nil {
return err
}
- appsClient, err := f.OpenshiftInternalAppsClient()
+ clientConfig, err := f.ClientConfig()
if err != nil {
return err
}
- o.AppsClient = appsClient.Apps()
+ appsClient, err... | [Validate->[Errorf],Run->[NewWriter,Flush,Fprintln,Prune,NewDeploymentDeleter,List,Core,DeploymentConfigs,ReplicationControllers,NewPruner],Complete->[DefaultNamespace,Apps,Lookup,UsageErrorf,OpenshiftInternalAppsClient,ClientSet,Flags],DeleteDeployment->[Fprintf,Fprintln,DeleteDeployment],Flags,Examples,Sprintf,LongDe... | Complete completes the options for the prune deployments command. | can you rename this to KubeClient since you are here? |
@@ -367,9 +367,6 @@ public class DirectNetworkGuru extends AdapterBase implements NetworkGuru {
}
}
- if (nic.getIPv6Address() != null) {
- _ipv6Mgr.revokeDirectIpv6Address(nic.getNetworkId(), nic.getIPv6Address());
- }
nic.deallocate();
}
| [DirectNetworkGuru->[canHandle->[isMyIsolationMethod,isMyIsolationMethodVxlanWithSecurityGroups,isMyTrafficType],design->[canHandle],deallocate->[deallocate],allocateDirectIp->[doInTransactionWithoutResult->[allocateDirectIp]]]] | Deallocate a NIC. This method is called when a network offering is not available. | @wido I did not understand this part, who would revoke ipv6 address? Or is the assumption that it is not needed. |
@@ -38,6 +38,13 @@ class Communicator:
self.__deleteAllRequests()
self.__deleteAllReportedValues()
+ # --------------------------------------------------------------------------
+ def initializeRequest(self, response_id, value_request=True, gradient_request=True):
+ if value_request:
+ ... | [Communicator->[__ExtractResponseSettingsRecursively->[__ExtractResponseSettingsRecursively]]] | Initialize the communication. | this function name does not follow the convention, but it seems the whole file is like this, so up to you if you want to change it here. |
@@ -108,6 +108,18 @@ export class AmpGeo extends AMP.BaseElement {
geoResolver(geo);
}
+ /** @override */
+ layoutCallback() {
+ // Let the runtime know we just if we added/changed classes that
+ // may case a re-layout.
+ if (this.mutated_) {
+ return this.mutateElement(() => {
+ /** n... | [No CFG could be retrieved] | The AMPGeo class. find matching country groups. | This needs to be down where the body mutations happen. |
@@ -82,6 +82,13 @@ module Articles
end
end
+ # Test variation: the more comments a post has, the higher it's rated!
+ def more_comments
+ @comment_weight = 2
+ _featured_story, stories = default_home_feed_and_featured_story(user_signed_in: true)
+ stories
+ end
+
def rank_and_... | [Feed->[default_home_feed->[default_home_feed_and_featured_story],default_home_feed_with_more_randomness->[default_home_feed_and_featured_story],more_tag_weight_more_random->[default_home_feed_and_featured_story],mix_default_and_more_random->[default_home_feed],find_featured_story->[find_featured_story],more_tag_weight... | mix_default_and_more_random mix_default_and_more_. | General question: since this is an experiment, we may want to change values without redeploys. Do we maybe want to make them configurable somehow, maybe through a database table? The answer may well be no, as I'm not completely up to do with the field test work, but I just wanted to ask. |
@@ -9,6 +9,6 @@ from bokeh.sampledata.autompg import autompg
@object_page("crossfilter")
def make_object():
autompg['cyl'] = autompg['cyl'].astype(str)
- autompg['origin'] = autompg['cyl'].astype(str)
+ autompg['origin'] = autompg['origin'].astype(str)
app = CrossFilter.create(df=autompg)
return ... | [make_object->[autompg,create],route,object_page] | Create a cross - filter object from the automata. | I believe this was just a copy/paste error. This made origin have the same data as cyl column. |
@@ -3,7 +3,9 @@ module Users
include TwoFactorAuthenticatable
def show
- if current_user.totp_enabled?
+ if current_user&.change_phone_request&.change_phone_allowed?
+ change_phone
+ elsif current_user.totp_enabled?
redirect_to login_two_factor_authenticator_url
elsif c... | [TwoFactorAuthenticationController->[reauthn_param->[permit,dig],show->[redirect_to,two_factor_enabled?,totp_enabled?],flash_error_for_exception->[t,code],send_user_otp->[send,to_s,confirmation_context?,direct_otp,create_direct_otp,increment,constantize],handle_valid_otp_delivery_preference->[lock_out_user,redirect_to,... | if there is no user in system or if there is no user in system redirect to login. | Code Climate says this is not tested. |
@@ -3,9 +3,10 @@ class AnalyticsController < ApplicationController
before_action :confirm_two_factor_authenticated
def create
- unless analytics_saved?
- session[:platform_authenticator] = true
- analytics.track_event(Analytics::PLATFORM_AUTHENTICATOR, results.to_h)
+ results.each do |event, res... | [AnalyticsController->[results->[new],create->[track_event,head,to_h,analytics_saved?],skip_before_action,before_action]] | Creates a new object. | I thought the plan was to have one event and to track all the analytics we gather under that single event. |
@@ -57,11 +57,9 @@ func resourceBigtableInstance() *schema.Resource {
},
},
},
-
"display_name": {
Type: schema.TypeString,
Optional: true,
- ForceNew: true,
Computed: true,
},
| [Printf,NewInstanceAdminClient,CreateInstanceWithClusters,Error,GetOk,Background,IntAtLeast,InstanceInfo,List,Close,Id,StringInSlice,Errorf,GetCluster,SetId,Get,Set,DeleteInstance] | resourceBigtableInstance returns a schema. Resource for the bigtable instance. resourceBigtableInstanceCreate creates a new instance of the bigtable cluster. | Since we haven't added the ability to update this field, we should keep it `ForceNew` right? |
@@ -173,6 +173,9 @@ public class KafkaTopicClientImpl implements KafkaTopicClient {
RetryBehaviour.ON_RETRYABLE.and(e -> !(e instanceof UnknownTopicOrPartitionException))
);
return true;
+ } catch (final TopicAuthorizationException e) {
+ LOG.debug("Topic {} has denied authorization. Ma... | [KafkaTopicClientImpl->[validateTopicProperties->[validateTopicProperties],getConfig->[getConfig],deleteInternalTopics->[listTopicNames,deleteTopics],addTopicConfigLegacy->[topicConfig],deleteTopics->[deleteTopics]]] | Checks if a topic exists. | I originally had the code like this, but @rodesai convinced me that it shouldn't. If we know that we can't access it then we know that it exists. I feel like we should propagate this exception. Is there any issue you found that made you submit this PR? |
@@ -36,11 +36,15 @@ SELECT sg.id
SELECT array_agg( DISTINCT CONCAT (s.origin, '/', s.name, '/', s.version, '/', s.release) )
FROM service AS s
WHERE s.group_id = sg.id
- ) AS releases
+ ) AS releases
+ , d.app_name as app_name
+ , d.environment as environment
FROM service_group AS sg
JOIN ser... | [GetServiceGroups->[OverallHealth,Sprintf,Select,ReleaseString,Errorf,Wrap],ReleaseString->[Sprintf],GetServiceGroupsHealthCounts->[SelectOne],ServiceGroupExists->[SelectOne],ToUpper,Errorf] | -------------- - Status of the given SELECT count of service group health warnings and unknown service group health. | whitespace of despair :( I guess the rest of this is using spaces and your editor did tabs |
@@ -2,6 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
using MockHostTypes;
+using Microsoft.Extensions.Hosting;
namespace CreateHostBuilderInvalidSignature
{
| [Program->[Main->[Build]]] | Creates a new instance of the class. | Are the changes to this file and `tests/CreateHostBuilderPatternTestSite/Program.cs` necessary? |
@@ -165,3 +165,15 @@ func (c *APIServiceRegistrationController) deleteAPIService(obj interface{}) {
glog.V(4).Infof("Deleting %q", castObj.Name)
c.enqueue(castObj)
}
+
+// resyncAll queues all apiservices to be rehandled.
+func (c *APIServiceRegistrationController) resyncAll() {
+ apiServices, err := c.apiServiceL... | [updateAPIService->[enqueue],deleteAPIService->[enqueue],addAPIService->[enqueue]] | deleteAPIService deletes an APIService object from the cache. | don't see where it is used. |
@@ -1752,11 +1752,8 @@ class Archiver:
meta = prepare_dump_dict(msgpack.fallback.unpackb(data, object_hook=StableDict, unicode_errors='surrogateescape'))
- if args.path == '-':
- json.dump(meta, sys.stdout, indent=4)
- else:
- with open(args.path, 'w') as fd:
- ... | [main->[get_args,run,Archiver],with_repository->[decorator->[wrapper->[argument]]],Archiver->[_export_tar->[item_to_tarinfo->[print_warning,item_content_stream],build_filter,print_warning,build_matcher,item_to_tarinfo],do_prune->[print_error,write],do_mount->[print_error],do_check->[print_error],do_extract->[build_filt... | debug_dump_manifest - dump decoded repository manifest and objects. | hmm, guess sys.stdout.buffer is closed on CM exit, is that correct behaviour? |
@@ -852,8 +852,11 @@ class SGDOptimizer(Optimizer):
parameter_list (list, optional): List of ``Variable`` names to update to minimize ``loss``. \
This parameter is required in dygraph mode. \
The default value is None in static mode, at this time all parameters will be updated.
- ... | [MomentumOptimizer->[_append_optimize_op->[_get_accumulator,_create_param_lr],_create_accumulators->[_add_accumulator]],PipelineOptimizer->[_extract_section_ops->[_is_opt_role_op],_find_input_output->[update],minimize->[minimize,_create_vars,_split_program],_split_program->[_extract_section_ops,_find_persistable_vars,u... | The base method for the base class. Initialize the n - node . | You should explain 2 things: - If the parameter has set regularizer using `ParamAttr`, the regularization settings in optimizer for this parameter is ignored. - If the parameter does not set regularizer using `ParamAttr`, the regularization of this parameter would be the one in optimizer settings. |
@@ -982,7 +982,7 @@ function sensors($types, $device, $valid, $pre_cache = array())
global $config;
foreach ((array)$types as $type) {
echo ucfirst($type) . ': ';
-
+ $sensor_type = $type;
$dir = $config['install_dir'] . '/includes/discovery/sensors/' . $type .'/';
if (is_f... | [discover_new_device->[getMessage]] | Checks if a sensor is valid for a given type and device. | @laf You should have change $type -> $sensor_type in the foreach :) |
@@ -175,7 +175,14 @@ abstract class AbstractMessageProcessorChain extends AbstractAnnotatedObject imp
processor, muleContext)))
.then(Mono.empty()))
.onErrorResume(MessagingException.class,
- ... | [AbstractMessageProcessorChain->[fireNotification->[fireNotification],setFlowConstruct->[getMessageProcessorsForLifecycle],setMuleContext->[getMessageProcessorsForLifecycle],stop->[getMessageProcessorsForLifecycle],updateMessagingException->[updateMessagingException],resolveInterceptors->[getProcessingType->[getProcess... | Resolves interceptors for the next chain of interceptors. This method is called by the MuleContext when a Processor is executed. | Have you run all tests? Changes like this usually break everything :) |
@@ -7,11 +7,15 @@ from django.utils.translation import ugettext as _
from satchless.item import Partitioner
from .forms import ReplaceCartLineFormSet
+from . import Cart
def index(request):
- cart_partitioner = Partitioner(request.cart)
- formset = ReplaceCartLineFormSet(request.POST or None, cart=reques... | [index->[TemplateResponse,_,redirect,ReplaceCartLineFormSet,success,Partitioner,is_valid,save]] | Display a single product quantities. | Empty line here serves no purpose. It does not split chunks of separate logic and if it did it might be better to split them into separate functions. |
@@ -92,11 +92,15 @@ function selectVideoSource(videoEl) {
*
* @param {!Element} videoEl
* @param {!Array<!Object>} sources
+ * @param {number} maxBitrate
*/
-function applySourcesToVideo(videoEl, sources) {
+function applySourcesToVideo(videoEl, sources, maxBitrate) {
sources
.sort((a, b) => a['bitrate_... | [No CFG could be retrieved] | Selects and returns the prioritized video source URL. Replace the src attribute of a video element with a source element if it exists. | Don't you need quotes between `"bitrate_kbps"`? |
@@ -24,13 +24,12 @@ $legend = $vars['legend'];
$output = (! empty($vars['output']) ? $vars['output'] : 'default');
$from = parse_at_time($_GET['from']) ?: Config::get('time.day');
$to = parse_at_time($_GET['to']) ?: Config::get('time.now');
-$graph_type = (isset($vars['graph_type']) ? $vars['graph_type'] : Config::g... | [No CFG could be retrieved] | <?php Generate a networkx graph from a specific device ID Print the missing node - id. | Row 41-49 is now dead code |
@@ -1,5 +1,5 @@
# -*- encoding : utf-8 -*-
-class AddRejectedIncomingCountToInfoRequest < !rails5? ? ActiveRecord::Migration : ActiveRecord::Migration[4.2] # 3.2
+class AddRejectedIncomingCountToInfoRequest < ActiveRecord::Migration[4.2] # 3.2
def up
add_column :info_requests, :rejected_incoming_count, :integ... | [AddRejectedIncomingCountToInfoRequest->[up->[add_column],down->[remove_column],rails5?]] | up_nack is the last nack for the request. It is the last n. | Line is too long. [81/80] |
@@ -25,12 +25,15 @@ namespace Internal.TypeSystem.Interop
return new BooleanMarshaller();
case MarshallerKind.AnsiString:
return new AnsiStringMarshaller();
+#if !READYTORUN
+ // UTF8 and Unicode Strings are not supported in R2R
... | [Marshaller->[IsMarshallingRequired->[IsMarshallingRequired,GetMarshallersForMethod]]] | Creates a marshaller for the given marshaller kind. | just realized that this is specific to R2R so just need to remove these instead of `#ifdef`-ing |
@@ -301,7 +301,7 @@ func (vm *VirtualMachine) DeleteExceptDisks(ctx context.Context) (*types.TaskInf
}
// If destroy method is disabled on this VM, re-enable it and retry
- op.Debug("Destroying is disabled. Enabling destroying for VM")
+ op.Debugf("Destroying is disabled. Enabling destroying for VM %q", vm)
err... | [FolderName->[VMPathNameAsURL],WaitForKeyInExtraConfig->[WaitForExtraConfig],fixVM->[LeaveFixingState,EnterFixingState,registerVM],FetchExtraConfig->[FetchExtraConfigBaseOptions],SetVCHUpdateStatus->[WaitForResult],VCHUpdateStatus->[FetchExtraConfig],WaitForResult->[WaitForResult,fixVM,needsFix],Parent->[Properties],Pr... | DeleteExceptDisks deletes all the disks except the ones that are not attached to the VM. | nit: "Destroy is disabled. Enabling destroy for VM.." |
@@ -570,6 +570,7 @@ class Sorbet::Private::GemLoader
rescue LoadError
end
end
+ Bundler.require
end
end
# rubocop:enable PrisonGuard/AutogenLoaderPreamble
| [require_gem->[call,require,puts],require_all_gems->[require_gem,empty?,to_set,autorequire,each,reject,require,name],my_require->[require],send,satisfied_by?,proc,eager_autoload!,my_require,version,puts,map] | Requires all required gems and specs and returns a object. | > since otherwise it fails before we do our own requires Do you have an example of what failed? Or do you think we might be missing a `bundle exec` somewhere? |
@@ -31,14 +31,14 @@ namespace Content.Server.GameObjects.Components.Power.PowerNetComponents
public override void Initialize()
{
base.Initialize();
-
- _battery = Owner.EnsureComponent<BatteryComponent>();
- _supplier = Owner.EnsureComponent<PowerSupplierComponent>()... | [BatteryDischargerComponent->[Initialize->[Initialize],ExposeData->[ExposeData],SetActiveSupplyRate->[UpdateSupplyRate]]] | Initialize the battery and power supply components. | be careful, **componentdependencies do NOT ensure components**, they only tryget it. imo this is faulty logic maybe we should add a `ensure` flag to componentdependencies :thinking: |
@@ -644,13 +644,11 @@ module Engine
end
@last_processed_action = action.id
- self
rescue Engine::GameError => e
@raw_actions.pop
@actions.pop
@exception = e
@broken_action = action
- self
end
def maybe_raise!
| [Base->[end_game!->[format_currency],current_entity->[current_entity],log_cost_discount->[format_currency],float_corporation->[format_currency],after_par->[format_currency,all_companies_with_ability],remove_train->[remove_train],init_hexes->[abilities],place_home_token->[home_token_locations],initialize_actions->[filte... | Process a single action by ID. | why are these removed? |
@@ -6,6 +6,7 @@
#include "DCPS/DdsDcps_pch.h" //Only the _pch include should start with DCPS/
#include "Hash.h"
+#include "Definitions.h"
#include <cstring>
| [No CFG could be retrieved] | Protected from the OpenPGP Public Domain. This function compares the properties of the two independent implementations of the object and the properties of the. | Is this needed? |
@@ -619,6 +619,17 @@ func Str2html(raw string) template.HTML {
return template.HTML(markup.Sanitize(raw))
}
+// Markdown2html render Markdown text to HTML (non-sanitize)
+func Markdown2html(raw string) template.HTML {
+ var err error
+ var renderedContent string
+ if renderedContent, err = markdown.RenderString(&m... | [Title,Nanoseconds,LastIndex,Indent,GenerateEmailAvatarFastLink,PathEscape,Warn,Index,GetRemoteAddress,MergeInto,Sanitize,Count,ValueOf,ForegroundColor,Username,HasPrefix,RenderIssueTitle,GetRemoteName,GetDefinitionForFilename,EncodeSha1,RenderEmoji,RepoPath,HTML,AsUser,Error,Format,Sprint,Marshal,TrimLeftFunc,New,NewP... | AvatarByEmail renders avatars by email address. renderCommitMessage renders the commit message with the optional tag. | The default behavior is `template.HTML(html.EscapeString(raw))` As we discussed before, the `Str2html` is quite misleading, let's forget it. |
@@ -46,7 +46,7 @@ namespace System.Net
_clientSpecifiedSpn = GetClientSpecifiedSpn();
}
- return _clientSpecifiedSpn;
+ return _clientSpecifiedSpn!;
}
}
| [NTAuthentication->[MakeSignature->[MakeSignature],GetOutgoingBlob->[CloseContext,GetOutgoingBlob],VerifySignature->[VerifySignature]]] | The NTAuthentication class. The overload does not impersonate because the thread context is not preserved. | `GetClientSpecifiedSpn()` can return `null`. Are we sure this will never be null? ~Maybe we can change `NegotiateStreamPal.QueryContextClientSpecifiedSpn` to return a `string` and not a nullable string?~ EDIT: Scratch that last idea - that method will return `null` on an error. |
@@ -41,9 +41,11 @@ public interface UserRepository extends <% if (databaseType == 'sql') { %>JpaRep
Optional<User> findOneByLogin(String login);
<%_ if (databaseType == 'sql') { _%>
- @Query(value = "select distinct user from User user left join fetch user.authorities",
- countQuery = "select coun... | [No CFG could be retrieved] | Package private for testing purposes. Creates a statistical summary of the given objects. | Yes you have to create one query by need, in order to fetch only what you need for your purpose. That way it's always optimized and you never grab all the database. Plus, with Spring Data JPA, you have to define every query like `findOneByCode`, `findOneByLabel`, `findOneByName`, ... to get what your want. For the name... |
@@ -933,8 +933,8 @@ func NewContext() {
newMarkup()
sec = Cfg.Section("U2F")
- U2F.TrustedFacets, _ = shellquote.Split(sec.Key("TRUSTED_FACETS").MustString(strings.TrimRight(AppURL, "/")))
- U2F.AppID = sec.Key("APP_ID").MustString(strings.TrimRight(AppURL, "/"))
+ U2F.TrustedFacets, _ = shellquote.Split(sec.Key(... | [IsFile,LastIndex,Dir,SetValue,Warn,TrimRight,Count,RequestURI,MustBool,Close,JoinHostPort,Hostname,TempDir,MustInt,LookupEnv,Info,Strings,MapTo,Error,Clean,Append,Format,SetFallbackHost,Empty,MustInt64,New,NewJwtSecret,SaveTo,Trace,LookPath,TrimSpace,IsAbs,Key,NewInternalToken,Create,Join,NewLogger,Section,Contains,Na... | Config for the language. loadInternalToken loads an internal token from the given section. | Can you keep these two lines as previous otherwise it'll conflict with my PR which has these changes already. |
@@ -126,6 +126,10 @@ public class VertxHttpRecorder {
private static final Handler<HttpServerRequest> ACTUAL_ROOT = new Handler<HttpServerRequest>() {
@Override
public void handle(HttpServerRequest httpServerRequest) {
+ if (httpServerRequest.absoluteURI() == null) {
+ h... | [VertxHttpRecorder->[handle->[run->[],handle],startServerAfterFailedStart->[shutDownDevMode],startServer->[get],processSameSiteConfig->[accept->[apply]],initializeRouter->[get],finalizeRouter->[handle->[run->[],get,handle],get],createPemKeyCertOptions->[getFileContent],createTrustStoreOptions->[getFileContent],WebDeplo... | Handle a non - blocking request. | I don't know about that. It will log something with a full stacktrace and I don't think we want that. Given it's `new URI(httpServerRequest.uri())` that fails, why not do it ourselves and catch the exception? That would avoid the logging that I'm really not sure we want. |
@@ -195,7 +195,10 @@ public class DefaultLocalMuleClient implements MuleClient {
}
protected Event createMuleEvent(InternalMessage message) throws MuleException {
- return baseEventBuilder(message).build();
+ Event event = baseEventBuilder(message).build();
+ muleContext.getRegistry().lookupObject(Stre... | [DefaultLocalMuleClient->[dispatch->[dispatch,createUnsupportedUrlException],send->[createEitherResult,send]]] | create a Mule event. | nope. And in case this turns up to be needed, the streaming manager should be injected on the client's initialisation. This lookup is expensive |
@@ -270,14 +270,14 @@ func StringToVersionedLogData(str string) hexutil.Bytes {
}
data := hex.EncodeToString(cbor)
- version := utils.EVMHexNumber(1)
- offset := "0000000000000000000000000000000000000000000000000000000000000020"
+ version := utils.RemoveHexPrefix(utils.EVMHexNumber(1))
+ offset := "00000000000000... | [Sign->[NewSignature],Delete->[Delete],Add->[Delete,Add],EthTx,MustNewTaskType,EVMHexNumber,ToHash,Add,Panicf,NewServiceAgreementFromRequest,MustDecode,Error,Save,Stop,NewTime,CBOR,RemoveHexPrefix,NewJob,AddAttempt,NewString,Big,StringFrom,Unix,BytesToHash,Repeat,Read,Get,EncodeUint64,ParseJSON,NewBytes32ID,BytesToAddr... | EasyJSONFromString creates a new Ethereum object from a string. NewInt creates new models. Int from interface {}. | This may be because of my systems programming/C background, but I generally prefer to do things bytewise rather than string wise, what do you say to refactoring this a little bit? |
@@ -40,7 +40,7 @@ const LOADER_APPEAR_TIME = 600;
* @enum {boolean}
* @private Visible for testing only!
*/
-const DEFAULT_PLACEHOLDER_WHITELIST_NONE_VIDEO = {
+const DEFAULT_LOADING_BACKGROUND_WHITELIST_NON_VIDEO = {
'AMP-IMG': true,
'AMP-ANIM': true,
'AMP-PINTEREST': true,
| [No CFG could be retrieved] | The loader DOM is the DOM that is used to load the extension. Extra div for the loader. | nit: the name is too long, maybe change to `NON_VIDEO_PLACEHOLDER_ALLOWLIST`? |
@@ -158,7 +158,8 @@ final class NativeDatagramPacketArray {
* Used to pass needed data to JNI.
*/
@SuppressWarnings("unused")
- final class NativeDatagramPacket {
+ @UnstableApi
+ public final class NativeDatagramPacket {
// This is the actual struct iovec*
private long mem... | [NativeDatagramPacketArray->[NativeDatagramPacket->[newDatagramPacket->[newAddress]],MyMessageProcessor->[processMessage->[add0]],release->[release],clear->[clear]]] | The NativeDatagramPacket class. get the if this is a recipient. | how is this exposed as public ? |
@@ -377,6 +377,15 @@ public class CalciteTests
);
public static final List<InputRow> ROWS1_WITH_NUMERIC_DIMS = ImmutableList.of(
+ createRow(
+ ImmutableMap.<String, Object>builder()
+ .put("t", "2001-01-03")
+ .put("m1", "6.0")
+ .put("m2", "6.0")
+ ... | [CalciteTests->[createMockSchema->[createMockSchema,createMockQueryLifecycleFactory],createMockSystemSchema->[getJsonMapper]]] | This method creates a list of input rows that are used to create a sequence of input rows There are many ways to parse the nanomorphism in the table. | Hmm, it seems like this change is causing some unrelated test failures |
@@ -1447,7 +1447,7 @@ function rrdtest($path, &$stdOutput, &$stdError) {
}
function create_state_index($state_name) {
- if (dbFetchRow('SELECT * FROM state_indexes WHERE state_name = ?', array($state_name)) === false) {
+ if (dbFetchRow('SELECT * FROM state_indexes WHERE state_name = ?', array($state_name)) =... | [send_mail->[send,isSMTP,addAddress,isHTML,setFrom],RRDRecursiveFilterIterator->[accept->[isDir,getFilename]]] | create state index. | As the state_name column can't be a null I'm not sure why we're checking against that. Would it make more sense to do !== true? |
@@ -1358,12 +1358,13 @@ def run_ica(raw, n_components, max_pca_components=100,
ica : instance of ICA
The ica object with the detected artifact indices marked for exclusion
"""
- ica = ICA(n_components, max_pca_components,
- n_pca_components, noise_cov, random_state,
- algorit... | [read_ica->[_deserialize,ICA],run_ica->[decompose_raw,find_sources_raw,ICA],ICA->[pick_sources_epochs->[_get_sources_epochs],plot_sources_epochs->[get_sources_epochs],sources_as_raw->[get_sources_raw],pick_sources_raw->[_get_sources_raw],plot_sources_raw->[get_sources_raw],find_sources_epochs->[get_sources_epochs],find... | Run ICA decomposition on raw data and identify artifact sources. The ICA decomposition. This function is called to find the raw components of a single ICA. Find sources in the raw image. Find the best - fit artifact index in the raw data. | '%s' % ica is more readable. Besides this +1 for merge. |
@@ -449,6 +449,11 @@ public final class OzoneConfigKeys {
public static final long OZONE_CLIENT_KEY_PROVIDER_CACHE_EXPIRY_DEFAULT =
TimeUnit.DAYS.toMillis(10); // 10 days
+ public static final String OZONE_CLIENT_KEY_FULL_LOCATION_VERSION =
+ "ozone.client.key.full.location.version";
+ public static ... | [OzoneConfigKeys->[name,toString,toMillis]] | OzoneConfigKeys class. | Do we need to make this default true, as by default we return the full location list(Even before this fix, as the key name says full location version) and false if we return only the latest version? |
@@ -256,6 +256,7 @@ func (o CatMapOutput) MapIndex(k pulumi.StringInput) CatOutput {
}
func init() {
+ pulumi.RegisterInputType(reflect.TypeOf((*CatInput)(nil)).Elem(), &Cat{})
pulumi.RegisterOutputType(CatOutput{})
pulumi.RegisterOutputType(CatPtrOutput{})
pulumi.RegisterOutputType(CatArrayOutput{})
| [ToCatOutputWithContext->[ToOutputWithContext],ToCatMapOutputWithContext->[ToOutputWithContext],ToCatArrayOutput->[ToCatArrayOutputWithContext,Background],Index->[ApplyT,All],ToCatPtrOutputWithContext->[ApplyTWithContext,ToOutputWithContext],ElementType->[Elem,TypeOf],ToCatOutput->[ToCatOutputWithContext,Background],El... | Initialize the Output. | One quick thing I noticed: I'd expect `pulumi.RegisterInputType` calls for `CatArrayInput` and `CatMapInput`. |
@@ -1790,7 +1790,7 @@ final class DefaultChannelHandlerContext extends DefaultAttributeMap implements
DefaultChannelHandlerContext ctx = this;
do {
ctx = ctx.next;
- } while (ctx != null && !(ctx.handler() instanceof ChannelStateHandler));
+ } while (!(ctx.handler() instance... | [DefaultChannelHandlerContext->[fireChannelActive->[executor],hasNextInboundByteBuffer->[hasInboundByteBuffer],fireChannelRegistered->[executor,lazyInitOutboundBuffer],nextInboundMessageBuffer->[hasInboundMessageBuffer,inboundMessageBuffer],invokeUserEventTriggered->[freeHandlerBuffersAfterRemoval],connect->[connect],r... | Finds the next context that is not a state handler or an operation handler. | don't we need the null check as before ? |
@@ -107,8 +107,10 @@ public class HadoopDruidIndexerConfig
new IndexingHadoopModule()
)
);
- jsonMapper = injector.getInstance(ObjectMapper.class);
- properties = injector.getInstance(Properties.class);
+ JSON_MAPPER = injector.getInstance(ObjectMapper.class);
+ INDEX_IO = injecto... | [HadoopDruidIndexerConfig->[getIndexSpec->[getIndexSpec],isIgnoreInvalidRows->[isIgnoreInvalidRows],fromFile->[fromMap],isDeterminingPartitions->[isDeterminingPartitions],makeIntermediatePath->[getDataSource,getWorkingPath],isOverwriteFiles->[isOverwriteFiles],verify->[getDataSource,getGranularitySpec,getWorkingPath],s... | Config for indexing a node. Reads a argSpec from a file. | I wonder if it would be possible to make those fields non-static as well? This might make it easier to have configurable defaults, even for hadoop tasks. |
@@ -1044,6 +1044,7 @@ init_svc_pool(struct pool_svc *svc, struct pool_buf *map_buf,
return rc;
}
ds_pool_iv_ns_update(pool, dss_self_rank());
+
D_ASSERT(svc->ps_pool == NULL);
svc->ps_pool = pool;
return 0;
| [No CFG could be retrieved] | Initialize and update the n - object pool. This function returns the index of the in the pool. | (style) trailing whitespace |
@@ -4404,8 +4404,8 @@ function validateAttributes(
const attrsByName = parsedTagSpec.getAttrsByName();
for (const attr of encounteredTag.attrs()) {
// For transformed AMP, attributes `class` and `i-amphtml-layout` are
- // handled within validateSsrLayout.
- if (context.isTransformed() &&
+ // handl... | [TagStack->[matchChildTagName->[matchChildTagName],updateFromTagResults->[getSpec],exitTag->[childTagMatcher,referencePointMatcher],updateStackEntryFromTagResult_->[childTagMatcher,cdataMatcher,referencePointMatcher],setDescendantConstraintList->[getSpec]],info->[info],Context->[recordAttrRequiresExtension_->[attrsCanS... | This function calculates the effective ssr layout and size for a tag. Validates that the layout of the given tag is valid. | @Gregable @honeybadgerdontcare I'm not happy about hard-coding the sizer here. There's probably a better way... |
@@ -162,6 +162,14 @@ public class TestOzoneFileInterfaces {
omMetrics = cluster.getOzoneManager().getMetrics();
}
+ @NotNull
+ protected OzoneConfiguration getOzoneConfiguration() {
+ OzoneConfiguration conf = new OzoneConfiguration();
+ conf.setBoolean(OMConfigKeys.OZONE_OM_ENABLE_FILESYSTEM_PATHS,
+... | [TestOzoneFileInterfaces->[getDirectoryStat->[verifyOwnerGroup],testOzoneManagerFileSystemInterface->[verifyOwnerGroup]]] | Initialize the Ozone cluster. | Minor: Is this needed here? |
@@ -490,12 +490,6 @@ ddt_get_dedup_object_stats(spa_t *spa, ddt_object_t *ddo_total)
}
}
}
-
- /* ... and compute the averages. */
- if (ddo_total->ddo_count != 0) {
- ddo_total->ddo_dspace /= ddo_total->ddo_count;
- ddo_total->ddo_mspace /= ddo_total->ddo_count;
- }
}
void
| [No CFG could be retrieved] | function to retrieve the number of object in the DMU DDT. Creates a block of DMU DDT from a block of memory. | Looks like this is changing the meaning of ddo_[dm]space, and also what we print in print_dedup_stats()? Maybe the change will be obvious since the number will be so much larger? |
@@ -293,7 +293,6 @@ describe RubricCriterion do
expect(@levels[1].mark).to eq(2.0)
end
end
-
describe 'can scale levels down' do
it 'not raise error' do
expect(@levels[1].mark).to eq(1.0)
| [add_tas,position,create,let,be,to_not,describe,delete_all,first,it,remove_tas,name,assignment,create_or_update_from_csv_row,contain_exactly,to,expect,before,mark,validate_presence_of,destroy,t,belong_to,it_behaves_like,to_s,max_mark,mark_for,destroy_by,update,set_default_levels,validate_numericality_of,each,levels,id,... | Describe the rules of a sequence of nodes. | Revert these changes. In general put 1 blank line between `describe` blocks. |
@@ -1891,11 +1891,11 @@ var _ = Describe("Azure Container Cluster using the Kubernetes Orchestrator", fu
if clusterAutoscalerEngaged {
cpuTarget = 50
for _, profile := range eng.ExpandedDefinition.Properties.AgentPoolProfiles {
- maxPods, _ := strconv.Atoi(profile.KubernetesConfig.KubeletConfig["-... | [ValidateOmsAgentLogs,ParseInput,CreatePVCFromFileDeleteIfExist,HasPrefix,Should,WaitOnReadyMin,GetAll,WaitForIngress,GetAllRunningByPrefixWithRetry,New,CreateServiceFromFileDeleteIfExist,IsWindows,RunLinuxDeployDeleteIfExists,Bool,RequiresDocker,ValidateResources,CreateIfNotExist,PrintCommand,ReadString,ScaleDeploymen... | Ensuring that the php - apache pod is running and that it has outbound internet access expects an error to be thrown if the service is running in the apache service. | So now we're just using `profile.Count` instead of actually fetching nodes to find the `maxTotalPods`. Is this because of Windows, and was there value in making the API call to get the nodes? |
@@ -376,6 +376,15 @@ func (rm *resmon) RegisterResource(ctx context.Context,
parent := resource.URN(req.GetParent())
protect := req.GetProtect()
+ provider := req.GetProvider()
+ if custom && !providers.IsProviderType(t) && provider == "" {
+ ref, err := rm.defaultProviders.getDefaultProviderRef(t.Package())
+ ... | [Invoke->[Package,GetArgs,Wrapf,Invoke,Infof,UnmarshalProperties,Sprintf,Provider,GetTok,V,Errorf,ModuleMember,MarshalProperties],RegisterResourceOutputs->[Wrapf,Infof,UnmarshalProperties,Sprintf,GetUrn,GetOutputs,New,V,URN],ReadResource->[GetParent,Provider,New,GetName,Errorf,Assert,Type,GetDependencies,GetType,ID,Pac... | RegisterResource registers a resource with the resource monitor RegisterResource register a resource with the resource monitor. | There's a lot of potential for deadlock here. In general there should be no blocking in the resource monitor that can't be canceled by closing `rm.cancel`. gRPC is going to wait for all in-flight RPCs to drain before shutting down the server and the `defaultProviders` server is going to exit if it gets canceled mid-ope... |
@@ -100,6 +100,11 @@ def register(config, account_storage, tos_cb=None):
if account_storage.find_all():
logger.info("There are already existing accounts for %s", config.server)
if config.email is None:
+ if not config.register_unsafely_without_email:
+ msg = ("No email was provided ... | [Client->[obtain_certificate_from_csr->[_obtain_certificate],obtain_and_enroll_certificate->[obtain_certificate],obtain_certificate->[_obtain_certificate],__init__->[acme_from_config_key]],view_config_changes->[view_config_changes],register->[acme_from_config_key,register]] | Registers a new account with the ACME CA. Returns an account object and a private key object. | There is no test coverage here. |
@@ -24,7 +24,7 @@ func newLoginCmd() *cobra.Command {
var b backend.Backend
var err error
- if local.IsLocalBackendURL(cloudURL) {
+ if hasDebugCommands() && local.IsLocalBackendURL(cloudURL) {
b, err = local.Login(cmdutil.Diag(), cloudURL)
} else {
b, err = cloud.Login(commandContext(), cmd... | [Printf,Name,Diag,RunFunc,StringVarP,Login,PersistentFlags,IsLocalBackendURL] | newLoginCmd returns a new command that logs into the Pulumi Cloud. | I have a slight preference to having `local.IsLocalBackendURL` actually do the test (and when `PULUMI_DEBUG_COMMANDS` is not set this always returns false. I say that because we call this method in a few other places. I agree this gives us the 95% case. |
@@ -48,7 +48,7 @@ class Url
} elseif (in_array($host, $config->get('github-domains'), true)) {
$url = preg_replace('{(/repos/[^/]+/[^/]+/(zip|tar)ball)(?:/.+)?$}i', '$1/'.$ref, $url);
} elseif (in_array($host, $config->get('gitlab-domains'), true)) {
- $url = preg_replace('{(/a... | [Url->[updateDistReference->[get]]] | Updates the dist reference to the correct reference. Returns the URL of a node in the chain of possible references. | why are you changing the indentation ? |
@@ -225,7 +225,7 @@ public abstract class AbstractMessageProcessorChain extends AbstractAnnotatedObj
};
} else {
return messagingException -> Mono.from(getMessagingExceptionHandler().apply(messagingException))
- .flatMap(handled -> {
+ .flatMapMany(handled -> {
eventCon... | [AbstractMessageProcessorChain->[fireNotification->[fireNotification],setFlowConstruct->[setFlowConstruct,getMessageProcessorsForLifecycle],setMessagingExceptionHandler->[setMessagingExceptionHandler],setMuleContext->[getMessageProcessorsForLifecycle,setMuleContext],stop->[getMessageProcessorsForLifecycle],updateMessag... | Handle exception in chain. | @dfeist please check this change. This should also be changed in other places as the method was deprecated. |
@@ -367,7 +367,7 @@ class NoGasMarketplaceEventHandler extends MarketplaceEventHandler {
throw new Error(`ListingIpfs and Id mismatch: ${listingId} !== ${listing.creator.listing.createDate}`)
}
- if(listing.creator != offer.buyer)
+ if(listing.creator != offer.buyer)
{
if(listing.creato... | [No CFG could be retrieved] | Gets details about an offer by calling Origin - js. Get the list of offer if it s an offer of type offertype. | nit: since we are changing this line, do you mind using the !== operator rather than != ? same thing for line 388 below. |
@@ -204,7 +204,7 @@ function algoliaPaginate(tag){
} else if (homeEl.dataset.feed === "latest") {
paginationArticlesIndex = client.initIndex('ordered_articles_by_published_at_<%= Rails.env %>');
} else {
- searchObj.filters = ('published_at_int > ' + homeEl.dataset.articlesSince);
+ searchObj.tagFilter... | [No CFG could be retrieved] | This function is the main entry point for the new article list. It will fetch the next if indexContainer is present and elCheck is not present then return false. | I'm not following how `searchObj.tagFilters` went from an array of strings to a string. Is it's type array of string or string? |
@@ -282,7 +282,7 @@ foreach ($rule_list as $rule) {
$location_query = 'SELECT locations.location, locations.id FROM alert_location_map, locations WHERE alert_location_map.rule_id=? and alert_location_map.location_id = locations.id ORDER BY location';
$location_maps = dbFetchRows($location_query, [$rul... | [hasGlobalAdmin,toSql] | This function returns a list of all devices except this device or group. a. | a space is missing for "devicesfor" in this line |
@@ -360,6 +360,8 @@ class Configuration(object):
def _get_environ_vars(self):
# type: () -> Iterable[Tuple[str, str]]
"""Returns a generator with all environmental vars with prefix PIP_"""
+ if running_under_virtualenv:
+ os.environ['PIP_USER'] = 'no'
for key, val in os... | [Configuration->[_load_file->[items],_get_environ_vars->[items],_iter_config_files->[get_configuration_files],_normalized_keys->[_normalize_name],_load_config_files->[items],items->[items],unset_value->[_disassemble_key,items],set_value->[_disassemble_key]]] | Returns a generator with all environmental variables with prefix PIP_. | We should be calling this function. |
@@ -121,7 +121,16 @@ export class ArticleComponent {
</div>`;
const {image} = htmlRefs(imgEl);
- addAttributesToElement(image, dict({'src': articleData.image}));
+
+ if (isServedFromCache(doc) && !isAbsoluteUrl(articleData.image)) {
+ const fullUrl = doc.location.href + articleData.... | [No CFG could be retrieved] | Create an element. | Should we write a helper rather than copy/pasting this code in multiple files? |
@@ -620,7 +620,14 @@ module.exports = class gateio extends Exchange {
for (let i = 0; i < response.length; i++) {
const market = response[i];
const id = this.safeString (market, 'name');
- const [ baseId, quoteId, date ] = id.split ('_');
+ ... | [No CFG could be retrieved] | Parse response for a single order. Get the ethernet fee of a currency. | PHP gets an error when there's no date, because these too many values to unpack |
@@ -44,7 +44,7 @@ func newMarkup() {
continue
}
- if name == "sanitizer" {
+ if name == "sanitizer" || strings.HasPrefix(name, "sanitizer.") {
newMarkupSanitizer(name, sec)
} else {
newMarkupRenderer(name, sec)
| [Strings,HasKey,Error,Warn,MatchString,Section,ValueWithShadows,Name,MustBool,ChildSections,TrimPrefix,Compile,MustCompile,MustString,Key] | newMarkupSanitizer - Creates a MarkupSanitizerRule for a given name. Determines if all three keys in markup have the same number of times. | Is it a requirement that the sections have different names? Can we detect that here or they will be mixed together by the ini library if the user repeats names? |
@@ -197,8 +197,8 @@ public class TextIO {
this(null, null, coder, true, TextIO.CompressionType.AUTO);
}
- private Bound(String name, String filepattern, Coder<T> coder, boolean validate,
- TextIO.CompressionType compressionType) {
+ private Bound(String name, ValueProvider<String> f... | [TextIO->[TextSource->[TextBasedReader->[getSplitPointsRemaining->[getSplitPointsRemaining],readNextRecord->[findSeparatorBounds]]],Read->[from->[from],Bound->[populateDisplayData->[populateDisplayData],getSource->[from],apply->[from,apply]],withoutValidation->[withoutValidation],withCompressionType->[withCompressionTy... | Creates a transform that reads from one or more text files and returns a bounded list of elements This method is used to decode each element of the PCollection in the file into a value. | `@Nullable name, @Nullable VP<String>` (thanks for cleaning up existing code, too :p) |
@@ -169,6 +169,10 @@ public class TemplateResponse extends BaseResponseWithTagInformation implements
@Param(description = "additional key/value details tied with template")
private Map details;
+ @SerializedName(ApiConstants.BITS)
+ @Param(description="the processor bit size", since = "4.10")
+ pri... | [TemplateResponse->[getObjectId->[getId]]] | This is a convenience method that can be used to create a ResourceTagResponse object that represents Sets the account id. | Please add "since" in Param |
@@ -936,7 +936,7 @@ module.exports = JhipsterServerGenerator.extend({
this.template(SERVER_MAIN_SRC_DIR + 'package/security/_SecurityUtils.java', javaDir + 'security/SecurityUtils.java', this, {});
this.template(SERVER_MAIN_SRC_DIR + 'package/security/_AuthoritiesConstants.java', javaDir + 'se... | [No CFG could be retrieved] | Copy the files from the server main to the server main res directory Package paths to all the PersistentToken files. | check should be reversed `this.applicationType == 'monolith' && this.authenticationType == 'jwt'` |
@@ -0,0 +1,13 @@
+package io.quarkus.test.hibernate.search.elasticsearch.search;
+
+import org.hibernate.search.backend.elasticsearch.analysis.ElasticsearchAnalysisConfigurer;
+import org.hibernate.search.backend.elasticsearch.analysis.model.dsl.ElasticsearchAnalysisDefinitionContainerContext;
+
+public class DefaultIT... | [No CFG could be retrieved] | No Summary Found. | This is not strictly necessary, as the "standard" analyzer is available by default. |
@@ -1705,6 +1705,11 @@ public class BigQueryIO {
if (getMaxFileSize() != null) {
batchLoads.setMaxFileSize(getMaxFileSize());
}
+ // When running in streaming (unbounded mode) we want to retry failed load jobs
+ // indefinitely. Failing the bundle is expensive, so we set a fai... | [BigQueryIO->[getExtractFilePaths->[build],write->[build],TableRowParser->[TableRowParser],Write->[withMethod->[build],withNumFileShards->[build],withFormatFunction->[build],withMaxFilesPerBundle->[build],withLoadJobProjectId->[withLoadJobProjectId,build],expand->[getJsonSchema,getTableDescription,getDynamicDestination... | Expand the typed data into a single object. return false if any of the rows failed to load. | BQ daily jobs quota is 1000. So 1000 retries seems to be unrealistic. |
@@ -103,6 +103,10 @@ public class QueryResource
try {
requestQuery = ByteStreams.toByteArray(req.getInputStream());
query = objectMapper.readValue(requestQuery, Query.class);
+ queryID = QueryHelper.getQueryId(query);
+ if (queryID == null) {
+ query = QueryHelper.setQueryId(query, i... | [QueryResource->[doPost->[getMessage,writeValue,equals,isCommitted,toString,warn,resetBuffer,setContentType,emit,RequestLogLine,empty,log,DateTime,getRemoteAddr,writerWithDefaultPrettyPrinter,getContentType,writer,currentTimeMillis,getBytes,write,flushBuffer,build,getOutputStream,getInputStream,toByteArray,closeQuietly... | POST a single n - ary object. if e is null write exception message and emit error event. | i kind of like having the query object create its own ID in the object constructor versus using numerous external classes |
@@ -2792,7 +2792,7 @@ class Product extends CommonObject
global $user;
$sql = "SELECT COUNT(DISTINCT f.fk_soc) as nb_customers, COUNT(DISTINCT f.rowid) as nb,";
- $sql.= " COUNT(fd.rowid) as nb_rows, SUM(fd.qty) as qty";
+ $sql.= " COUNT(fd.rowid) as nb_rows, SUM(CASE WHEN type != 2 TH... | [Product->[setCategories->[fetch],get_nb_vente->[_get_stats],get_nb_ordersupplier->[_get_stats],info->[fetch],get_nb_achat->[_get_stats],fetch_prod_arbo->[fetch,fetch_prod_arbo],setPriceExpression->[update],update->[verify,create],LibStatut->[LibStatut],generateMultiprices->[updatePrice],updatePrice->[_log_price],fetch... | load_stats_facture Loads the statistics of facture products. Returns - 1 if there is no error. | To make if into sql, you must use the $db->ifsql method. |
@@ -180,6 +180,5 @@ class NonLinearTest(tf.test.TestCase):
# 9.74681854e-01, 1.19209290e-07]])
# self.assertAllClose(transformed, expected)
-
if __name__ == "__main__":
tf.test.main()
| [NonLinearTest->[testRNN->[_input_fn->[split],predict,assertAllClose,list,TensorFlowRNNClassifier,assertRaises,TensorFlowRNNRegressor,fit,array],testDNNDropout0->[predict,accuracy_score,TensorFlowDNNClassifier,load_iris,assertGreater,format,fit],testDNNDropout0_1->[predict,accuracy_score,TensorFlowDNNClassifier,load_ir... | This method asserts that the transformed array is the same as the expected array. | two new lines is a standard. |
@@ -5,6 +5,8 @@
# -------------------------------------------------------------------------
from enum import Enum
+from datetime import datetime
+from msrest.serialization import UTC
from uamqp import constants, types
VENDOR = b"com.microsoft"
| [AMQPSymbol] | Creates an enum object from a given base - number. API endpoint for handling the response of an entity. | are those two imports used? |
@@ -22,6 +22,7 @@ public class UnbufferedBase64InputStream extends FilterInputStream {
private byte[] decoded;
private int pos;
private final DataInputStream din;
+ private static final Base64.Decoder decoder = Base64.getMimeDecoder();
public UnbufferedBase64InputStream(InputStream in) {
... | [UnbufferedBase64InputStream->[skip->[read],read->[read]]] | This class implements a base64 decoder that decodes base64 bytes without buffering. r - 1 ;. | This seems to be thread-safe. |
@@ -35,15 +35,15 @@ func main() {
panic(err)
}
- if err := c.PutFileURL("images", "master", "liberty.png", "http://imgur.com/46Q8nDz.png", false, false); err != nil {
+ if err := c.PutFileURL("images", "master", "liberty.png", "http://imgur.com/46Q8nDz.png", false); err != nil {
panic(err)
}
- if err := c... | [PutFileURL,NewPFSInput,Println,CreatePipeline,ListPipeline,NewFromAddress,Ctx,Close,NewCrossInput,ListFileAll,NewRepo,CreateRepo] | main is a function that creates a new repository and runs it. Magic number of images and edges. | Someday CI will fail because a kitten cannot be retrieved from imgur. But not today. |
@@ -21,13 +21,12 @@ namespace Dynamo
public class PreferenceSettings : NotificationObject, IPreferences
{
public static string DynamoTestPath = null;
- const string DYNAMO_SETTINGS_FILE = "DynamoSettings.xml";
private LengthUnit lengthUnit;
private AreaUnit areaUnit;
... | [PreferenceSettings->[GetSettingsFilePath->[Combine,AppData,Empty],Save->[Write,Create,Save,Serialize,GetSettingsFilePath,Message,WriteLine,Close,StackTrace],RaisePropertyChanged,Exists,CubicMeter,SquareMeter,Meter,BEZIER]] | PreferenceSettings is a class for displaying various configuration options that are used to persist and retrieve specific DirectoriesToUninstall - List of directories to uninstall. | Parameter-less `Load` and `Save` methods on `PreferenceSettings` class assumes the XML file to be stored in certain location. The behavior was dependent on settings file path in `DynamoPathManager`, but since it is managed outside of `PreferenceSettings`, its outcome is in-deterministic. This change enforces the path t... |
@@ -67,6 +67,7 @@ func NewLineReader(input io.Reader, config Config) (*LineReader, error) {
decodedNl: terminator,
inBuffer: streambuf.New(nil),
outBuffer: streambuf.New(nil),
+ logger: logp.NewLogger("readfile_line"),
}, nil
}
| [decode->[Bytes,Transform,Write],advance->[Reset,Append,IndexFrom,Advance,decode,Len,Errorf,Read],Next->[Reset,Error,Collect,advance,Len,Bytes,HasSuffix,Debugf],NewEncoder,New,Errorf,Bytes,NewDecoder] | Next returns the next potential line from the input buffer. | Nit: can we call this `reader_readfile_line` for consistency? All the other reader log selectors start with `reader_`. |
@@ -275,7 +275,8 @@ class Page(object):
return self.type
def get_md_filename(self):
- return self.get_type() + anchorize(self.get_short_name()) + '.md'
+ deftype = self.type[0].upper() + self.type[1:]
+ return deftype + anchorize(self.get_short_name()) + '.md'
def main(unused_argv):
| [page_with_name->[match],Page->[get_short_name->[get_name],get_md_filename->[get_type,anchorize,get_short_name],__init__->[all_fulls,page_overview,all_briefs]],all_fulls->[full_member_entry],all_briefs->[brief_member_entry],main->[page_in_name_list,get_text,get_md_filename,Page,get_all_indexed_pages,index_page],index_p... | Get the md filename for the missing page. | I just made that same change. I think that's the second commit we're crossing on just today. :) My change is upstream, it'll get to github in the next push out of google. |
@@ -578,6 +578,17 @@ export class Services {
getServiceForDoc(elementOrAmpDoc, 'video-manager')));
}
+ /**
+ * @param {!Window} win
+ * @return {!Promise<?../extensions/amp-viewer-assistance/0.1/amp-viewer-assistance.AmpViewerAssistance>}
+ */
+ static viewerAssistanceForDocOrNull(win) {
+ return... | [Services->[documentStateFor->[getService],userNotificationManagerForDoc->[getElementServiceForDoc],urlReplacementsForDoc->[getExistingServiceForDocInEmbedScope],analyticsForDocOrNull->[getElementServiceIfAvailableForDoc],localizationServiceV01->[getService],viewerPromiseForDoc->[getServicePromiseForDoc],shareTrackingF... | Returns the video manager for the given document or null if there is no video manager. | Does this work? Looks like amp-viewer-assistance.js calls `registerServiceForDoc`, which means we should be using `getElementServiceIfAvailableForDoc`. |
@@ -466,7 +466,7 @@ export class AmpAnalytics extends AMP.BaseElement {
const threshold = parseFloat(spec['threshold']); // Threshold can be NaN.
if (threshold >= 0 && threshold <= 100) {
const key = this.expandTemplate_(spec['sampleOn'], trigger);
- const keyPromise = urlReplacementsForDoc(this.w... | [No CFG could be retrieved] | Determines if the request should be sampled in or not based on sampleOn. template - Template to be rendered trigger - Event to be rendered trigger - Event to be rendered. | Ditto: we need to figure out what's the right argument here. My general reaction is that it should be `this.element` most of the time, but please check. |
@@ -59,7 +59,7 @@ public class ProtobufFormat extends ConnectFormat {
protected ConnectSchemaTranslator getConnectSchemaTranslator(
final Map<String, String> formatProps
) {
- FormatProperties.validateProperties(name(), formatProps, ImmutableSet.of());
+ FormatProperties.validateProperties(name(), fo... | [ProtobufFormat->[getConnectSchemaTranslator->[name]]] | Override to create a ProtobufSerde if a KnowledgeBase is not present. | This is a fix from a previous PR, unrelated to this one, right? |
@@ -5,11 +5,12 @@ using System.Text;
using System.Xml;
using Autodesk.DesignScript.Runtime;
using Dynamo.Models;
+using Dynamo.Properties;
namespace DSCoreNodesUI
{
[NodeName("Legacy Node")]
- [NodeDescription("This is an obsolete node")]
+ [NodeDescription("DummyNode", typeof(Resources))]
[IsMet... | [DummyNode->[SerializeCore->[SerializeCore,SaveNode],DeserializeCore->[DeserializeCore,LoadNode]]] | Creates a DummyNode object from an XML node. region Public API Methods. | Hi @zora-wang, the term `DummyNode` here isn't very descriptive. Localization team would look at this and not sure what to do with it, but if we name it as `DummyNodeNodeDescription`, then it becomes clear, it is _a description for the dummy node_. Does that make sense? So please go through all the `NodeDescription` ta... |
@@ -181,8 +181,7 @@ def get_dropout_mask(dropout_probability: float, tensor_for_masking: torch.autog
This scaling ensures expected values and variances of the output of applying this mask
and the original tensor are the same.
"""
- binary_mask = tensor_for_masking.clone()
- binary_mask.data.copy_(... | [_get_combination->[_get_combination],flatten_and_batch_shift_indices->[get_device_of],batched_index_select->[flatten_and_batch_shift_indices],last_dim_log_softmax->[_last_dimension_applicator],add_positional_features->[get_range_vector],last_dim_softmax->[_last_dimension_applicator],_get_combination_dim->[_get_combina... | Computes and returns an element - wise dropout mask for a given tensor where each element in the. | Looks like the docstring still has a reference to `Variable` - are there others still in the repo, too? |
@@ -40,8 +40,16 @@ public final class MacOsIntegration {
}
/** Sets the specified quit handler to the application. */
- public static void setQuitHandler(final Runnable handler) {
+ public static void setQuitHandler(final BooleanSupplier handler) {
checkNotNull(handler);
- Desktop.getDesktop().setQuit... | [MacOsIntegration->[setQuitHandler->[setQuitHandler],setAboutHandler->[setAboutHandler],setOpenFileHandler->[setOpenFileHandler],clearAboutHandler->[setAboutHandler]]] | Set quit handler. | This reminds me of #5283 Any chance if we're using the files handler the wrong way? #5253 |
@@ -165,6 +165,13 @@ module TwoFactorAuthenticatable
end
end
+ def resend_otp_code_path
+ otp_send_path(otp_delivery_selection_form: {
+ otp_method: @delivery_method,
+ resend: true
+ })
+ end
+
def reenter_phone_number_path
if context == 'id... | [phone_changed->[perform_later,create_user_event],update_invalid_user->[max_login_attempts?,second_factor_attempts_count,now,second_factor_locked_at,save],old_phone->[phone],authenticate_user->[authenticate_user!],reset_attempt_count_if_user_no_longer_locked_out->[no_longer_blocked_from_entering_2fa_code?,update],phone... | display_phone_to_deliver_to Display the phone number to deliver to . | I'd probably just put this one one line, if it fits. (looks like it would?) |
@@ -168,8 +168,8 @@ final class IOUringEventLoop extends SingleThreadEventLoop implements
}
}
} finally {
- if (nextWakeupNanos.get() == AWAKE || nextWakeupNanos.getAndSet(AWAKE) == AWAKE) {
- pendingWakeup = true;
... | [IOUringEventLoop->[newTaskQueue->[newTaskQueue],handle->[remove],remove->[remove],run->[closeAll]]] | This method is called from the main thread. It is responsible for handling a deadlock and do not call this method. | if we don't need the return value we should just call `set(...)` |
@@ -541,6 +541,7 @@ class ActionComm extends CommonObject
// Properties of parent table llx_c_actioncomm (will be deprecated in future)
$this->type_id = $obj->type_id;
$this->type_code = $obj->type_code;
+ $this->color = $obj->color;
$... | [ActionComm->[getActions->[fetch],info->[fetch],build_exportfile->[fetch],createFromClone->[create],add->[create]]] | fetches all actioncomm records that are related to a specific action Initializes the object with properties from the DB. This method initializes the object with properties from the object. | Don't you mean $this->type_color = $obj->type_color ? (later you use $this->type_color) |
@@ -91,6 +91,7 @@ describe InvitesController do
it "fails if you can't invite to the forum" do
sign_in(Fabricate(:user))
+ SiteSetting.min_trust_to_allow_pm_invite = 2
post "/invites.json", params: { email: email }
expect(response).to be_forbidden
end
| [email,update_attribute,find,let,new,to_not,describe,ago,base_url,first,it,put,emailed_status_types,enable_local_logins,contain_exactly,to,root,max_bulk_invites,body,before,post,enable_sso,let!,allow_new_registrations,t,require,grant_admin!,sso_url,username,count,add_owner,change,include,invite_key,from_now,parsed_body... | deletes all the users and groups and creates a new user invite to the forum allows group owners to invite to groups and admin to send multiple invites to same email. | I don't think this is correct because `Guardian#can_invite_to_forum?` uses the `SiteSetting.min_trust_to_allow_invite`. I'm also not sure if we need to set the site setting when the default value is already 2. |
@@ -26,6 +26,10 @@ import paddle.fluid as fluid
import paddle.fluid.core as core
import paddle.fluid.framework as framework
from paddle.fluid.executor import Executor
+from models.model_base import get_decay_learning_rate
+from models.model_base import get_regularization
+from models.model_base import set_error_clip... | [lstm_step->[linear],seq_to_seq_net->[lstm_decoder_with_attention->[lstm_step,simple_attention],lstm_decoder_with_attention,bi_lstm_encoder],get_model->[seq_to_seq_net]] | LSTM step of the LSTM algorithm. | model_base is not uploaded? |
@@ -498,8 +498,10 @@ module.exports = class mexc extends Exchange {
const quote = this.safeCurrencyCode (quoteId);
const settle = this.safeCurrencyCode (settleId);
const state = this.safeString (market, 'state');
+ const fees = this.safeValue (this.fees, 'trading');
+ ... | [No CFG could be retrieved] | Parse response data for a single order reserve. Get the order of the block that a block can have. | This line does not belong here, if it's not a special case, then it will be handled in setMarkets(). |
@@ -225,9 +225,8 @@ func (k KeychainSecretStore) clearSecret(mctx MetaContext, account keychainSlott
}
func NewSecretStoreAll(mctx MetaContext) SecretStoreAll {
- if mctx.G().Env.DarwinForceSecretStoreFile() {
- // Allow use of file secret store for development/testing
- // on MacOS.
+ if mctx.G().Env.ForceSecret... | [updateAccessibility->[serviceName,String],RetrieveSecret->[updateAccessibility],GetUsersWithStoredSecrets->[serviceName],retrieveSecret->[serviceName,String,mobileKeychainPermissionDeniedCheck],StoreSecret->[serviceName,String],clearSecret->[serviceName,String],String->[String],storeSecret->[serviceName,String]] | ClearSecret attempts to clear any secrets for the user. SlottedAccount returns a list of users and accounts that can be used to slot the given. | Also mention linux if people don't want to pollute their keyring. |
@@ -5,8 +5,16 @@ using Dynamo.Interfaces;
namespace Dynamo.Visualization
{
+ /// <summary>
+ /// Example implementation of IRenderPackageFactory.
+ /// DefaultRenderPackageFactory produces DefaultRenderPackages.
+ /// </summary>
public class DefaultRenderPackageFactory : IRenderPackageFactory
... | [DefaultRenderPackage->[AddTriangleVertex->[Count,Add],Clear->[Clear,Empty],ApplyMeshVertexColors->[AddRange,Clear],AddTriangleVertexNormal->[Add],AddLineStripVertexCount->[Add],ApplyLineVertexColors->[AddRange,Clear],AddTriangleVertexColor->[Add],AddLineStripVertex->[Count,Add],AddTriangleVertexUV->[Add],AddLineStripV... | Creates a render package using the specified object. AddTriangleVertex - Add a vertex to a triangle. | Sets or Returns Tessellation parameters. |
@@ -67,8 +67,15 @@ class FreqtradeBot(LoggingMixin):
# Check config consistency here since strategies can set certain options
validate_config_consistency(config)
-
- self.exchange = ExchangeResolver.load_exchange(self.config['exchange']['name'], self.config)
+
+ unwanted_exchan... | [FreqtradeBot->[execute_buy->[get_buy_rate],get_sell_rate->[_order_book_gen],_notify_buy_cancel->[get_buy_rate],_notify_sell->[get_sell_rate],_notify_sell_cancel->[get_sell_rate],cleanup->[cleanup],fee_detection_from_trades->[apply_fee_conditional],handle_trailing_stoploss_on_exchange->[create_stoploss_order],__init__-... | Initializes the object with all variables and objects. Initialize the object. | If an exchange is REALLY not working (confirmed not working) - then please add it to the `BAD_EXCHANGES` Dict in `freqtrade/exchange/common.py` with the reason for it - which will have the same effect. From the issue you posted, i'm not yet convinced about that though... as it seems like some orders have at least been ... |
@@ -108,14 +108,14 @@ public class JdbcIOTest implements Serializable {
dataSource.setServerName("localhost");
dataSource.setPortNumber(port);
-
- JdbcTestDataSet.createReadDataTable(dataSource);
+ JdbcTestHelper.createDataTable(dataSource, JdbcTestHelper.READ_TABLE_NAME);
+ addInitialData(dataSour... | [JdbcIOTest->[testWriteWithEmptyPCollection->[apply],testWrite->[apply],testReadWithSingleStringParameter->[apply]]] | Start the database. | Is there anything gained by having `READ_TABLE_NAME` owned by `JdbcTestHelper`? It seems like the constant could live here, since you pass it to each of the helper methods (this is good IMO). On that note, I don't think creating/deleting this table should be expensive, so I'd actually do it pseudorandomly in each test ... |
@@ -95,7 +95,7 @@ module Api
end
file_tokens = prms.map { |p| p[:attributes][:file_token] }
result_text_params[:text].scan(
- /\[~tiny_mce_id:(\w+)\]/
+ /data-token="(\w+)\"/
).flatten.each do |token|
unless file_tokens.include?(token)
raise ... | [ResultsController->[create->[present?,render],check_manage_permissions->[raise,new,can_manage_module?],show->[render],result_params->[raise,require,permit],load_result->[require,find],create_text_result->[sub!,text,new,transaction,present?,original_filename,link_tiny_mce_assets,save!,raise,create!,for,each,t,id],resul... | tiny_mce_asset_params - find tiny_mce_asset. | I think there is no need to escape second double quote |
@@ -234,6 +234,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels
}
// At this point firing is confirmed
+ ammo.SendMessage(this, new BarrelFiredMessage(projectile));
var direction = (targetPos - shooter.Transform.WorldPosition).ToAngle();
... | [ServerRangedBarrelComponent->[OnAdd->[OnAdd],EjectCasings->[EjectCasing],OnRemove->[OnRemove],ExposeData->[ExposeData]]] | Fires a shooter at the specified target position. | Because I shitcoded FireProjectiles (gun pr fixes it I swear) you'll probably want this under FireProjectiles instead given for example shotgun shells might shoot out multiple times. |
@@ -55,6 +55,10 @@ Rails.application.routes.draw do
post '/login/two_factor/authenticator' => 'two_factor_authentication/totp_verification#create'
get '/login/two_factor/personal_key' => 'two_factor_authentication/personal_key_verification#show'
post '/login/two_factor/personal_key' => 'two_factor_... | [new,redirect,devise_scope,mount,join,put,draw,root,scope,post,require,enable_usps_verification?,enable_identity_verification?,rotation_path_suffix,enable_saml_cert_rotation?,patch,devise_for,match,delete,namespace,get,enable_test_routes] | This method is used to generate a list of routes that can be handled by the OpenID Connect Non devise - controller routes. | For the route /login/two_factor/reset_device_cancel I'd like to leave this as a GET request since it's a link in an email which can be a plain text email. |
@@ -120,7 +120,15 @@ func (p *Processor) Process(fields mapping.Fields, state *fieldState, output com
}
if len(indexMapping) > 0 {
- output.Put(mapping.GenerateKey(field.Name), indexMapping)
+ if field.DynamicTemplate {
+ // Explicit dynamic templates were introduced in
+ // Elasticsearch 7.13, ignore... | [wildcard->[Process],text->[Process],keyword->[Process],group->[Process],object->[scaledFloat]] | Process processes the index mapping of the given fields. This is a helper function that creates a mapping for the index of a keyword. | Should we check here that `ObjectTypeMappingType` & `ObjectType` were not provided? This should avoid human mistake if perhaps `dynamic_template` is misunderstood by the dev. |
@@ -309,7 +309,7 @@ class Feed {
$attachments = [];
- $enclosures = $xpath->query("enclosure", $entry);
+ $enclosures = $xpath->query("enclosure|atom:link[@rel='enclosure']", $entry);
foreach ($enclosures AS $enclosure) {
$href = "";
$length = "";
| [Feed->[import->[query,get_hostname,registerNamespace,loadXML,item]]] | Imports an Atom feed from a given XML string. This function extracts the author name author - id and author - avatar from the feed. This function extracts all the attributes of an author feed. This function extracts the author attributes from the given XML node. | I guess you checked that query? I'm always a little bit lost with this. |
@@ -57,6 +57,8 @@ namespace Kratos
KRATOS_CREATE_LOCAL_FLAG( ConstitutiveLaw, ISOTROPIC, 8 );
KRATOS_CREATE_LOCAL_FLAG( ConstitutiveLaw, ANISOTROPIC, 9 );
+ KRATOS_CREATE_LOCAL_FLAG(ConstitutiveLaw, STENBERG_STABILIZATION_SUITABLE, 10);
+
/**
* Constructor.
*/
| [No CFG could be retrieved] | Flags related to the Features of the Contitutive Law - - - - - - - - - - - - - - - - - -. | @RiccardoRossi this is the flag that we discussed already. Please have a look at the file diffs, then it is clear what the intended usage is |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.