patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -37,7 +37,7 @@ public class RedisThrottledSubmissionHandlerInterceptorAdapter extends AbstractI
val clientInfo = ClientInfoHolder.getClientInfo();
val remoteAddress = clientInfo.getClientIpAddress();
- val keys = (Set<String>) this.redisTemplate.keys(RedisAuditTrailManager.CAS_AUDIT_CONTEX... | [RedisThrottledSubmissionHandlerInterceptorAdapter->[exceedsThreshold->[keys,toList,getClientInfo,calculateFailureThresholdRateAndCompare,collect,getClientIpAddress]]] | Exceed threshold boolean. | Remove the cast |
@@ -0,0 +1,18 @@
+{
+ "baseUrl": "http://localhost:<%= serverPort %>/",
+ "testFiles": "**/*_spec.ts",
+ "supportFile": "src/test/javascript/cypress/support/index.ts",
+ "video": false,
+ "integrationFolder": "src/test/javascript/cypress/integration",
+ "fixturesFolder": "src/test/javascript/cypress/fixtures",
+ ... | [No CFG could be retrieved] | No Summary Found. | shouldn't it be set to true ? If it is specific to Oauth2, maybe set it to false only with Oauth2 |
@@ -23,9 +23,12 @@ import (
"github.com/spf13/cobra"
)
+const allKeyword = "all"
+
func newPolicyRmCmd() *cobra.Command {
+
var cmd = &cobra.Command{
- Use: "rm <org-name>/<policy-pack-name> <version>",
+ Use: "rm <org-name>/<policy-pack-name> <all|version>",
Args: cmdutil.ExactArgs(2),
Short: "Rem... | [Wrapf,ExactArgs,RunFunc,Remove,Atoi] | newPolicyRmCmd creates a new Command that removes a Policy Pack from a Pul Create a new ethernet command. | I thought the plan was to align with `policy_enable.go` and either have to specify a `version` arg or specify a `--all` flag (like `enable` having to either specify a version or `--latest`)? |
@@ -419,10 +419,8 @@ func TestV2IngesterTransfer(t *testing.T) {
limits, err := validation.NewOverrides(defaultLimitsTestConfig())
require.NoError(t, err)
- dir1, err := ioutil.TempDir("", "tsdb")
- require.NoError(t, err)
- dir2, err := ioutil.TempDir("", "tsdb")
- require.NoError(t, err)
+ dir1 := filepath.Join... | [TransferChunks->[TransferChunks,ErrorAndClose],TransferTSDB->[ErrorAndClose,TransferTSDB]] | TestV2IngesterTransfer tests that the user has a token in the ring and New creates a new object and checks the state of an object in the ingestion. | Out of curiosity: why do you need this change? Did you get failing or flaky tests with the previous code? |
@@ -89,8 +89,8 @@ public class ClusterIntegrationTest {
IntegrationJobCancelSuite.TASK_STATE_FILE)
.withValue(SleepingTask.SLEEP_TIME_IN_SECONDS, ConfigValueFactory.fromAnyRef(100));
this.suite = new IntegrationJobCancelSuite(jobConfigOverrides);
- HelixManager helixManager = getHelixManager()... | [ClusterIntegrationTest->[testJobShouldGetCancelled->[getHelixManager],testJobRestartViaSpec->[getHelixManager]]] | This test is used to test if a job should be cancelled. Assert that the future task is cancelled. | is this change relevant ? |
@@ -31,8 +31,15 @@ from apache_beam.transforms.external import NamedTupleBasedPayloadBuilder
__all__ = ['SqlTransform']
+_SQL_PLANNERS = {
+ 'zetasql': 'org.apache.beam.sdk.extensions.sql.zetasql.ZetaSQLQueryPlanner',
+ 'calcite': 'org.apache.beam.sdk.extensions.sql.impl.CalciteQueryPlanner',
+}
+
SqlTransf... | [SqlTransform->[__init__->[SqlTransformSchema,super,BeamJarExpansionService,NamedTupleBasedPayloadBuilder]],NamedTuple] | Creates a new object of type u_t u_t u_t u_t This is a workaround for the fact that the SQL transform is not supported by the Beam. | I wonder if it would make more sense for this mapping to live on the Java side, and to have this parameter by called "dialect" or similar. |
@@ -16,6 +16,9 @@ function post_update() {
if (!post_update_1198())
return;
+
+ if (!post_update_1206())
+ return;
}
/**
| [No CFG could be retrieved] | This function is called after the update of the server is done. | [standards] Please add braces to this instance and retroactively to the three previous ones |
@@ -437,7 +437,7 @@ namespace System.Globalization
char* pTable = (char*)table;
Interop.Globalization.InitOrdinalCasingPage(pageNumber, pTable);
}
- s_casingTable[pageNumber] = casingTable;
+ s_casingTable![pageNumber] = casingTable;
retu... | [OrdinalCasing->[IndexOf->[EqualSurrogate,ToUpper],LastIndexOf->[EqualSurrogate,ToUpper],InitOrdinalCasingPage->[InitOrdinalCasingPage],EqualSurrogate->[ToUpperSurrogate],ToUpperInvariantMode->[ToUpperInvariantMode],ToUpperOrdinal->[ToUpper],CompareStringIgnoreCase->[ToUpperSurrogate,ToUpper]]] | Initialize the ordinal casing table for the specified page. | Existing bug: this really should be `Volatile.Write(ref s_casingTable[pageNumber], casingTable)`. We want the page's table to be published only after the table's contents have been populated. Technically there's currently no official runtime that works on a weak memory model, but may as well stave off possible future p... |
@@ -305,9 +305,13 @@ class Checkout:
self._add_to_user_address_book(
self.billing_address, is_billing=True)
- shipping_price = (
- self.shipping_method.get_total() if self.shipping_method
- else Price(0, currency=settings.DEFAULT_CURRENCY))
+ if self.shipping_... | [load_checkout->[func->[from_storage,for_storage]],Checkout->[billing_address->[_get_address_from_storage],create_order->[_save_order_shipping_address,_save_order_billing_address,_add_to_user_address_book,is_shipping_required],is_shipping_required->[is_shipping_required],shipping_address->[_get_address_from_storage],de... | Create an order from the checkout session. This method is called when a cart is not in the cart. | Why do we intentionally discard the net price here? |
@@ -206,6 +206,7 @@ namespace NServiceBus
Func<string> getEndpointNameAction = () => EndpointHelper.GetDefaultEndpointName();
Func<string> getEndpointVersionAction = () => EndpointHelper.GetEndpointVersion();
IList<Type> scannedTypes;
- SettingsHolder settings = new SettingsHolder();
+... | [ConfigurationBuilder->[Configure->[SetDefault,Exists,getEndpointNameAction,RegisterSingleton,BuildConventions,ToList,BinDirectory,getEndpointVersionAction,Combine,settings,BaseDirectory,AppDomainAppId,ScanAssembliesInDirectory],GetDefaultEndpointName,GetEndpointVersion]] | Get the default endpoint name and version. | So this is just for convenience? |
@@ -5,6 +5,7 @@ import (
"context"
"flag"
"fmt"
+ "io"
"io/ioutil"
"net/url"
"strings"
| [GetChunks->[GetParallelChunks],getBlobURL->[NewBlockBlobURL,Sprintf,NewPipeline,Replace,Parse,NewSharedKeyCredential],RegisterFlags->[DurationVar,StringVar,IntVar],PutChunks->[UploadStreamToBlockBlob,NewReader,getBlobURL,Encoded,ExternalKey],getChunk->[WithTimeout,getBlobURL,Download,Decode,Close,Body,ReadAll,External... | RegisterFlags imports flags related to chunk storage. Upload buffer size for downloads. | You forgot to implement `List()` in `BlobStorage`. |
@@ -1848,9 +1848,9 @@ int speed_main(int argc, char **argv)
e = setup_engine(engine_id, 0);
/* No parameters; turn on everything. */
- if (argc == 0 && !doit[D_EVP] && !doit[D_EVP_HMAC]) {
+ if (argc == 0 && !doit[D_EVP] && !doit[D_EVP_HMAC] && !doit[D_EVP_CMAC]) {
for (i = 0; i < ALGOR_NUM; ... | [No CFG could be retrieved] | region ethernet functions Initialize the engine after the fork. | Typo: `1` instead of `i` is compared against `D_EVP_CMAC`. |
@@ -91,6 +91,16 @@ import org.joda.time.Instant;
*/
public abstract class DoFn<InputT extends @Nullable Object, OutputT extends @Nullable Object>
implements Serializable, HasDisplayData {
+ /** Information accessible while within the {@link Setup} method. */
+ @SuppressWarnings("ClassCanBeStatic") // Converti... | [DoFn->[ProcessContinuation->[withResumeDelay->[shouldResume]]]] | This abstract class is used to create a bundle context from a given type of the element. This method is called when the element is not modified in any way. | You shouldn't need this. This is the "old" DoFn way of doing it. |
@@ -2,8 +2,13 @@
<% @heading_buttons = [
{ link_text: t('exam_templates.back_to_exam_template_page'),
- link_path: assignment_exam_templates_path }
-] %>
+ link_path: assignment_exam_templates_path }]
+ if !Dir[File.join(MarkusConfigurator.markus_exam_template_dir,
+ @assignment.short_id... | [No CFG could be retrieved] | Renders the list of all log entries for a given node. | Use `unless` instead of `if !` |
@@ -200,7 +200,13 @@ public class UnpackContent extends AbstractProcessor {
if (fileFilter == null) {
fileFilter = Pattern.compile(context.getProperty(FILE_FILTER).getValue());
tarUnpacker = new TarUnpacker(fileFilter);
- zipUnpacker = new ZipUnpacker(fileFilter);
+
+ ... | [UnpackContent->[ZipUnpacker->[unpack->[process->[fileMatches]]],TarUnpacker->[unpack->[process->[fileMatches]]]]] | On scheduled task. Returns a that can be used to unpack the given flow file. | If the PD no longer supports EL, this chained method is also unnecessary. |
@@ -24,6 +24,10 @@ def setup_parser(subparser):
def stage(parser, args):
+ custom_path = os.path.realpath(args.path) if args.path else None
+ if custom_path:
+ spack.stage.ensure_external_stage_path(custom_path)
+
if not args.specs:
env = ev.get_env(args, 'stage')
if env:
| [stage->[die,msg,matching_spec_from_env,parse_specs,get,len,set,traverse,get_env,values,do_stage],setup_parser->[add_common_arguments,add_argument]] | Stage a package or a set of packages. | Is there any reason to call realpath here? I don't think it can hurt here, but in general I think we should use the interface to the filesystem that the user requests, instead of realpathing if it's not absolutely necessary. |
@@ -282,6 +282,7 @@ class TestPipEnvironment(TestFileEnvironment):
environ['PIP_NO_INPUT'] = '1'
environ['PIP_LOG_FILE'] = str(self.root_path/'pip-log.txt')
+ environ['PIP_USE_MIRRORS'] = 'false'
super(TestPipEnvironment, self).__init__(
self.root_path, ignore_hidden=F... | [FastTestPipEnvironment->[__init__->[_use_cached_pypi_server,demand_dirs,run,__init__,relpath,install_setuptools,create_virtualenv,clear_environ]],mkdir->[mkdir],TestPipEnvironment->[run->[TestPipResult],__init__->[demand_dirs,relpath,install_setuptools,create_virtualenv,clear_environ]],_change_test_package_version->[r... | Initialize a new environment with a specific . Create a in the user_site_path and add it to the environment. | Is there a reason the tests shouldn't use mirrors? Isn't that going to leave a lot of code paths untested? |
@@ -43,8 +43,7 @@ namespace Microsoft.Xna.Framework.Graphics
{
public enum GraphicsProfile
{
- HiDef, // Use the largest available set of graphic features and capabilities to target devices, such as an Xbox 360 console and a Windows-based computer, that have more enhanced graphic capabilities.
- Reach, // Use ... | [No CFG could be retrieved] | The type of image that is used to display the image. | I double checked this and it doesn't match XNA... Reach should be 0 and HiDef should be 1. |
@@ -51,12 +51,12 @@ if (option.file && !option.webdriver) {
// Run the app.
require('module')._load(packagePath, module, true);
} catch(e) {
+ console.error('App threw an error when running', e);
if (e.code == 'MODULE_NOT_FOUND') {
app.focus();
- dialog.showErrorBox('Error opening app',... | [No CFG could be retrieved] | Load the app and run it. Reads the application. js file and runs it if it exists. | why move this , since you have already handled `MODULE_NOT_FOUND` in dialog ? besides we are not throwing if its `MODULE_NOT_FOUND` . |
@@ -0,0 +1,2 @@
+<%= button_to @presenter.button, idv_usps_path, method: 'put',
+ class: 'btn btn-primary btn-wide', form_class: 'inline-block mr2' %>
| [No CFG could be retrieved] | No Summary Found. | personal style: I would indent the `class` past the `button_to` and maybe line it up with `@presenter` |
@@ -29,6 +29,7 @@ class BaseInput<T: EventTarget> extends React.Component<
'aria-labelledby': null,
'aria-describedby': null,
adjoined: ADJOINED.none,
+ autocomplete: 'on',
autoFocus: false,
disabled: false,
error: false,
| [No CFG could be retrieved] | Creates a base input component that is a child of a component that is attached to a container Private methods - Get the input props of the component. | Should we be consistent with `autoFocus` and use `autoComplete` ? |
@@ -147,7 +147,7 @@ class Web3Provider extends Component {
curr = curr && curr.toLowerCase()
if (curr !== next) {
- curr && Store.dispatch(showAlert('MetaMask account has changed.'))
+ curr && Store.dispatch(showAlert('{this.state.currentProvider} account has changed.'))
this.setState({
... | [No CFG could be retrieved] | ComponentDidMount - Component that is called when the component is mounted. Check if network is connected and if not set it will delay and condition the use of the. | Looks like this is supposed to be a template literal. |
@@ -51,10 +51,12 @@ public class ITWikipediaQueryTest
ITRetryUtil.retryUntilTrue(
() -> coordinatorClient.areSegmentsLoaded(WIKIPEDIA_DATA_SOURCE), "wikipedia segment load"
);
- coordinatorClient.initializeLookups(WIKIPEDIA_LOOKUP_RESOURCE);
- ITRetryUtil.retryUntilTrue(
- () -> coordina... | [ITWikipediaQueryTest->[testWikipediaQueriesFromFile->[testQueriesFromFile],before->[areSegmentsLoaded,initializeLookups,areLookupsLoaded,retryUntilTrue]]] | Method that must be executed before any other test. | assert this against StringUtils.format(QueryCapacityExceededException.ERROR_MESSAGE_TEMPLATE, "one") instead? |
@@ -115,6 +115,11 @@ type Interface interface {
Edges() []graph.Edge
}
+type NodeDescriber interface {
+ Object() interface{}
+ Kind() string
+}
+
type Namer interface {
ResourceName(obj interface{}) string
}
| [Edges->[Edges],Name->[String,UniqueName],Object->[Object],ResourceName->[String,UniqueName],DOTAttributes->[Kinds],Subgraph->[Edges,AddNode,addEdges],EdgeSubgraph->[Edges,AddNode,addEdges],AddNode->[AddNode],SubgraphWithNodes->[Edges,AddNode,addEdges],addEdges->[Kinds],SuccessorNodesByNodeAndEdgeKind->[SuccessorNodesB... | AddEdge creates a new edge between two nodes. New creates a new graph from an input to an output graph. | @deads2k i need this to build functions that can take either ReplicaSetNode or ReplicationControllerNode. I wonder if we already have this interface somewhere or not as I was not able to locate any. |
@@ -166,10 +166,6 @@ public class DefaultDnsRecordDecoder implements DnsRecordDecoder {
return ROOT;
}
- if (name.charAt(name.length() - 1) != '.') {
- name.append('.');
- }
-
return name.toString();
}
}
| [DefaultDnsRecordDecoder->[decodeRecord->[decodeRecord]]] | Decodes a name from the specified byte buffer. name. append. to name. | `name` will always end with "." when reaching here, so these codes are redundant. |
@@ -413,6 +413,9 @@ namespace Microsoft.Xna.Framework.Graphics
// Dispose of all remaining graphics resources before disposing of the graphics device
GraphicsResource.DisposeAll();
+ // Clear the effect cache.
+ EffectCache.Clear();
+
... | [GraphicsDevice->[ApplyRenderTargets->[Clear],DrawUserPrimitives->[DrawUserPrimitives],Dispose->[Dispose],SetRenderTarget->[SetRenderTarget],SetIndexBuffer,Initialize]] | Disposes all the objects in the specified region that are not in the system. | I guess the idea here is that `GraphicsResource.DisposeAll()` is taking care of calling `Effect.Dispose()`? |
@@ -389,8 +389,6 @@ class InvalidationCacheManager(object):
except Exception as e:
# This is a catch-all for problems we haven't caught up with and given a better diagnostic.
# TODO(Eric Ayers): If you see this exception, add a fix to catch the problem earlier.
- exc_info = sys.exc_info()
... | [VersionedTarget->[create_results_dir->[ensure_legal]],InvalidationCacheManager->[cacheable->[cacheable],_key_for->[CacheValidationError],update->[update,ensure_legal],wrap_targets->[vt_iter->[VersionedTarget],vt_iter],force_invalidate->[force_invalidate],previous_key->[previous_key],check->[InvalidationCheck]],Version... | Returns a key for the given target. | `raise from` is Python 3 syntactic sugar that provides the same functionality as `exc_info[2]`. |
@@ -606,6 +606,7 @@ void MassConservationCheckProcess::ShiftDistanceField( double deltaDist ){
for(int count = 0; count < static_cast<int>(rNodes.size()); count++){
ModelPart::NodesContainerType::iterator i_node = rNodes.begin() + count;
i_node->FastGetSolutionStepValue( DISTANCE ) += deltaDist;
... | [No CFG could be retrieved] | Find the intersection of the velocity over the negative area of the condition. Function to calculate the possible 3D coordinates for a triangle in a 3D mesh. | Considering that this correction is independent to what this process does, I wouldn't calculate the distance difference in here. Note that by doing so you oblige to use the mass conservation process to use the momentum correction. |
@@ -19,6 +19,7 @@ namespace System.IO
_name = NormalizeDriveName(driveName);
}
+ [UnsupportedOSPlatform("browser")]
void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
{
throw new PlatformNotSupportedException();
| [DriveInfo->[NormalizeDriveName,Exists,nameof]] | GetObjectData - not supported on this platform. | This is same as #41085. It does not make sense to be marking serialization infrastructure like this as unsupported. I think this PR can be closed. |
@@ -145,6 +145,7 @@ namespace System.Diagnostics.Tracing
Send = 9,
Receive = 240,
}
+ [System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.All)]
public partial class EventSource : System.IDisposable
{
... | [EventSource->[EventData->[Sequential]],EventSourceAttribute->[Class],EventDataAttribute->[Struct,Class],EventIgnoreAttribute->[Property],NonEventAttribute->[Method],EventSourceOptions->[Sequential],EventFieldAttribute->[Property],EventAttribute->[Method]] | A class that represents a single EventSource. Get the GUID of the given event source. | Do we really need `All` - is that because of the NestedTypes issue? (we should fix that then - it's been agreed that we should change the behavior of that already). |
@@ -631,7 +631,7 @@ void LocalPlayer::applyControl(float dtime)
speedV.Y = movement_speed_walk;
}
}
- else if(m_can_jump || (control.sneak && m_sneak_ladder_detected))
+ else if(m_can_jump)
{
/*
NOTE: The d value in move() affects jump height by
| [bool->[ARRLEN,GETNODE,v2s16,get],getLightPosition->[v3f,floatToInt],getEyeOffset->[v3f],accelerateHorizontal->[normalize,getLength],getStandingNodePos->[v3f,getPosition,floatToInt],applyControl->[accelerateHorizontal,normalize,setYaw,crossProduct,getSpeed,accelerateVertical,getBool,setSpeed,event,v3f,getYaw,rotateXZBy... | Apply control to the specified node. This is a bit of a hack to work around the problem of the user - interface. private static final int MOTION_SPEED = 0x7fffffff ; The main entry point for the move action. | can you fix this brace ? |
@@ -350,6 +350,7 @@ namespace Kratos
py::class_<ResidualBasedAdjointBossakSchemeType, typename ResidualBasedAdjointBossakSchemeType::Pointer, BaseSchemeType>
(m, "ResidualBasedAdjointBossakScheme")
.def(py::init<Kratos::Parameters, AdjointResponseFunction::Pointer>())
+ ... | [UnaliasedAdd->[UnaliasedAdd],Dot->[Dot],CreateEmptyMatrixPointer->[CreateEmptyMatrixPointer],CreateEmptyVectorPointer->[CreateEmptyVectorPointer],TransposeMult->[TransposeMult],ScaleAndAdd->[ScaleAndAdd],Mult->[Mult],TwoNorm->[TwoNorm]] | Add strategies to Python module. Magic - based scheme types. Missing base scheme in the chain. A sequence of objects representing the types of a residual - based adjoint bossak scheme Package - private for testability. | why do you add this ctor if there is already one with `Paramaters`? This goes a bit opposite of what we usually do and will also not be used once we finally have the factories |
@@ -43,9 +43,13 @@ public class MapSplitterTestCase extends AbstractMuleContextTestCase {
mapSplitter.process(eventBuilder().message(of(testMap)).build());
- assertEquals(3, splitPayloads.size());
- assertTrue(splitPayloads.contains("one"));
- assertTrue(splitPayloads.contains("two"));
- assertTrue... | [MapSplitterTestCase->[testSplit->[assertTrue,size,build,process,contains,assertEquals,put],doSetUp->[doSetUp,MapSplitter,setListener,setMuleContext,getMessageAsString,add]]] | Test split. | Side note: Be good to upgrade to hamcrest 2.0 in order to has `hasKey(), hasValue(), hasEntry() etc. |
@@ -195,12 +195,12 @@ public class AsyncOperationAdapter extends DefaultAdapter {
CoreSession s = CoreInstance.getCoreSession(repoName, principal);
opCtx.setCoreSession(s);
service.run(opCtx, opId, xreq.getParams());
- } catch... | [AsyncOperationAdapter->[abort->[abort],setCompleted->[setCompleted],attach->[attach],isCompleted->[isCompleted,isAsync],exists->[exists],setError->[setError],setOutput->[getTransientStore],getResult->[getTransientStore,getResult],detach->[detach]]] | This method is called when the request is executed. This method is called when an asynchronous operation is requested. It is called by the AsyncOperation. | nit: formatting seems off here |
@@ -6492,8 +6492,7 @@ func TestMaxQueueSize(t *testing.T) {
ParallelismSpec: &pps.ParallelismSpec{
Constant: 2,
},
- MaxQueueSize: 1,
- ChunkSpec: &pps.ChunkSpec{
+ DatumSetSpec: &pps.DatumSetSpec{
Number: 10,
},
})
| [StartTransaction,DurationProto,PrintDetailedCommitInfo,Message,DeepEqual,JoinHostPort,SubscribeCommit,WaitJobsetAll,GetAuthenticatedPachClient,CreateRepo,WaitJob,Itoa,NewPipeline,VisitInput,NotNil,StartCommit,FormatLabelSelector,GetFile,DeletePipeline,ExecuteInTransaction,PrintDetailedJobInfo,NoError,Fatalf,FinishTran... | TestMaxQueueSize tests the maximum queue size of a master. TestHTTPAuth checks if a job is in the list of jobs and if so checks if. | I would remove this whole test since it is just testing this configuration. |
@@ -130,6 +130,8 @@ if ( ! function_exists( 'jetpack_social_menu_social_links_icons' ) ) :
'behance.net' => 'behance',
'codepen.io' => 'codepen',
'deviantart.com' => 'deviantart',
+ 'discord.gg' => 'discord',
+ 'discordapp.com' => 'discord',
'digg.com' => 'digg',
'dribbble... | [No CFG could be retrieved] | This function is used to get the list of social links icons that are supported by Jet This function is used to get a list of social links icons. | This looks great and I will be to approve it but would you mind adding Discord to `modules/widgets/social-icons.php` so the Social Icons Widget can also benefit from this addition. |
@@ -557,7 +557,10 @@ const serverFiles = {
},
{
condition: generator =>
- generator.applicationType === 'gateway' && generator.authenticationType === 'jwt' && generator.serviceDiscoveryType,
+ !generator.reactive &&
+ generator.applicationType ... | [No CFG could be retrieved] | Returns a filter that can be used to filter a resource. The main directory where the authentication is done. | Why does Prettier not allow me to put everything on one line? It's annoying. |
@@ -41,7 +41,9 @@ def build_argparser():
args.add_argument("-m_en", "--m_encoder", help="Required. Path to encoder model", required=True, type=str)
args.add_argument("-m_de", "--m_decoder", help="Required. Path to decoder model", required=True, type=str)
args.add_argument("-i", "--input",
- ... | [build_argparser->[add_argument_group,ArgumentParser,add_argument],video_demo->[run_pipeline,ResultRenderer],main->[add_extension,splitext,basename,set_config,replace,strip,read,ValueError,IECore,video_demo,build_argparser,open,IEModel],exit,main] | Build the argument parser for the command. | If it's required, you should add `required=True`. |
@@ -4,6 +4,7 @@ import (
"context"
"database/sql"
"fmt"
+ "math/big"
"sync"
"time"
| [reportMaxUnconfirmedAge->[SetMaxUnconfirmedAge],reportPendingEthTxes->[SetUnconfirmedTransactions],reportPipelineRunStats->[Close,SetPipelineTaskRunsQueued,SetPipelineRunsQueued],reportMaxUnconfirmedBlocks->[SetMaxUnconfirmedBlocks]] | Services for the given type. promUnconfirmedTransactions sets the number of unconfirmed transactions. | Do we need to talk with Observability or node ops about these changes? |
@@ -22,6 +22,7 @@ namespace System.Net.Http
private Uri? _requestUri;
private HttpRequestHeaders? _headers;
private Version _version;
+ private HttpVersionPolicy _versionPolicy;
private HttpContent? _content;
private bool _disposed;
private IDictionary<string... | [HttpRequestMessage->[ToString->[ToString],Dispose->[Dispose],CheckDisposed->[ToString]]] | Creates a new object. Replies the request URI of the resource that is associated with the resource. | We could save some memory if we packed `_sendStatus`, `_versionPolicy`, and `_disposed` into a single `int`. |
@@ -41,7 +41,7 @@ func (e *EthTx) TaskType() models.TaskType {
// Perform creates the run result for the transaction if the existing run result
// is not currently pending. Then it confirms the transaction was confirmed on
// the blockchain.
-func (etx *EthTx) Perform(input models.RunInput, store *strpkg.Store) mode... | [Perform->[Status,ConcatBytes,Connected,Bytes,NewRunOutputError,Wrap,PendingConfirmations],Status,Warn,BumpGasUntilSafe,Add,PendingConfirmations,ToInt,EVMTranscodeJSONWithFormat,Unconfirmed,Errorw,New,EVMWordUint64,HexToHash,NewRunOutputPendingConnection,StringFrom,Bytes,ConcatBytes,Data,Hex,NewRunOutputComplete,CheckA... | Perform performs a single transaction. | Does the linter suggest using single letter variables here? |
@@ -138,7 +138,7 @@ public class CuratorModule implements Module
new DefaultExhibitorRestClient(exConfig.getUseSsl()),
exConfig.getRestUriPath(),
exConfig.getPollingMs(),
- new BoundedExponentialBackoffRetry(BASE_SLEEP_TIME_MS, MAX_SLEEP_TIME_MS, MAX_RETRIES)
+ config.getQuitOnC... | [CuratorModule->[makeCurator->[start->[start]],makeEnsembleProvider->[start->[start]]]] | Creates a new ensemble provider based on the given configuration. | Line longer than 120 cols. Extract a variable. |
@@ -19,6 +19,10 @@ import {Sidebar} from '../component';
import {mount} from 'enzyme';
describes.sandboxed('Sidebar preact component', {}, (env) => {
+ const isOpened = (sidebarElement) => {
+ return !sidebarElement.className.includes('unmounted');
+ };
+
describe('basic actions', () => {
let wrapper;
... | [No CFG could be retrieved] | Creates a UI element that displays a single - side menu item. close the sidebar when the backdrop is clicked. | How the unit tests check whether the sidebar is opened or not must be updated throughout the test. |
@@ -273,7 +273,12 @@ SmallVideo.prototype.setVideoMutedView = function(isMuted) {
var videoMutedSpan = this.getVideoMutedIndicator();
- videoMutedSpan[isMuted ? 'show' : 'hide']();
+ if (isMuted) {
+ // hide and close tooltip
+ videoMutedSpan.hide().trigger('mouseleave');
+ } else {
+ ... | [No CFG could be retrieved] | Creates an audio or video element for a particular MediaStream. Shows or hides the audio muted indicator over small videos. | If there's no way around this we should at least add a general show and hide functions in UIUtil that make sure the tooltip is taken care of (call mouseleave or directly remove the tooltip for the element). |
@@ -203,7 +203,9 @@ int ASYNC_start_job(ASYNC_JOB **job, ASYNC_WAIT_CTX *wctx, int *ret,
}
if (ctx->currjob->status == ASYNC_JOB_PAUSED) {
- ctx->currjob = *job;
+ if ((ctx->currjob = *job) == NULL)
+ continue;
+
/*
... | [async_start_func->[async_get_ctx],ASYNC_get_current_job->[async_get_ctx],ASYNC_pause_job->[async_get_ctx],ASYNC_start_job->[async_get_ctx],ASYNC_block_pause->[async_get_ctx],int->[async_get_ctx],ASYNC_unblock_pause->[async_get_ctx]] | async_start_job - start a new async job Initialize a new async job. | I'm not even sure that this line is needed. It looks redundant to me - but certainly if this is NULL then something has gone badly wrong. We should error out. |
@@ -494,8 +494,8 @@ Chunk index: {0.total_unique_chunks:20d} {0.total_chunks:20d}"""
else:
chunk_idx = chunk_idx or ChunkIndex()
logger.info('Fetching archive index for %s ...' % archive_name)
- fetch_and_build_idx(archive_... | [Cache->[sync->[create_master_idx->[cleanup_outdated,lookup_name,mkpath,repo_archives,cached_archives,fetch_and_build_idx],cleanup_outdated->[mkpath],fetch_and_build_idx->[mkpath],create_master_idx,legacy_cleanup,begin_txn],_do_open->[_check_upgrade],file_known_and_unchanged->[_read_files],commit->[save],__init__->[ass... | Re - synchronize chunks cache with known backup archive indexes. Add a new chunk index for a given archive. Fetch the master chunk index and build the index. | csize=0 is another safe choice and has a more compact representation (1 byte vs 5 bytes). |
@@ -468,7 +468,11 @@ if (\LibreNMS\Config::get('enable_bgp')) {
if ($vrfId) {
dbUpdate($peer['update'], 'bgpPeers', '`device_id` = ? AND `bgpPeerIdentifier` = ? AND `vrf_id` = ?', [$device['device_id'], $peer['bgpPeerIdentifier'], $vrfId]);
} else {
- ... | [addDataset,getFamily,uncompressed,toSnmpIndex,compressed] | Update the data of the BGP node. Polls each AFI for this peer. | The other code is fine, but I don't feel like this is correct. |
@@ -3056,11 +3056,7 @@ func TestSetAddonsConfig(t *testing.T) {
Enabled: to.BoolPtr(false),
},
{
- Name: AzureFileCSIDriverAddonName,
- Enabled: to.BoolPtr(false),
- },
- {
- Name: AzureDiskCSIDriverAddonName,
+ Name: CloudNodeManagerAddonName,
Enabled: to.BoolPtr(fa... | [Itoa,BoolPtr,DeepEqual,Bool,Parallel,Errorf,Fatalf,setAddonsConfig,Run] | Config for the non - masquerade - cidr and non - masquerade - cn Configuration for ClusterAutoscalerAddon. | This was a duplicated pair of entries introduced in an earlier PR. |
@@ -540,10 +540,8 @@ public class XmlSourceTest {
exception.expectMessage("MyCustomValidationEventHandler failure mesage");
try (Reader<WrongTrainType> reader = source.createReader(null)) {
- List<WrongTrainType> results = new ArrayList<>();
for (boolean available = reader.start(); available; av... | [XmlSourceTest->[testReadXMLWithCharset->[Train],trainsToStrings->[toString],testReadXMLNoBundleSize->[trainsToStrings,Train],testReadXMLSmallPipeline->[Train],testReadXMLWithMultiByteChars->[Train],createRandomTrainXML->[trainToXMLElement],testReadXMLLarge->[generateRandomTrainList,trainsToStrings,createRandomTrainXML... | This test method reads the XML file invalid record class with custom event handler. Read everything from the source and return an array of all the bytes read. | This should probably make an assertion about results instead of removing it |
@@ -75,6 +75,7 @@ public class HoodieWriteConfig extends DefaultHoodieConfig {
public static final String TIMELINE_LAYOUT_VERSION = "hoodie.timeline.layout.version";
public static final String BASE_PATH_PROP = "hoodie.base.path";
public static final String AVRO_SCHEMA = "hoodie.avro.schema";
+ public static f... | [HoodieWriteConfig->[Builder->[build->[HoodieWriteConfig,validate,setDefaults]],isClusteringEnabled->[isInlineClustering,isAsyncClusteringEnabled],getFileListingParallelism->[getFileListingParallelism],resetViewStorageConfig->[setViewStorageConfig],shouldAssumeDatePartitioning->[shouldAssumeDatePartitioning],useFileLis... | Returns a string that can be used to identify the table. This is a static property that can be used to provide a string description of the object that. | may be we can call this as "latest table schema". |
@@ -0,0 +1,16 @@
+using System.Windows.Media;
+
+namespace Dynamo.Wpf.Interfaces
+{
+ public enum ResourceName
+ {
+ StartPageLogo,
+ AboutBoxLogo
+ }
+
+ public interface IBrandingResourceProvider
+ {
+ ImageSource GetImageSource(ResourceName resourceName);
+ string GetStrin... | [No CFG could be retrieved] | No Summary Found. | To align with the other API method `GetImageSource`, this method should have the form of `GetXxxYyy` where `XxxYyy` is the type this method returns (without the word `Resource` since that is implied by the interface name "Resource Provider"). Please rename this method and I'll merge it right in! (Sorry for being pain i... |
@@ -261,7 +261,7 @@ func (provider *Kubernetes) loadIngresses(k8sClient k8s.Client) (*types.Configur
log.Warnf("Endpoints not found for %s/%s, falling back to Service ClusterIP", service.ObjectMeta.Namespace, service.ObjectMeta.Name)
templateObjects.Backends[r.Host+pa.Path].Servers[string(service.UID)] ... | [loadIngresses->[Itoa,GetService,GetIngresses,Warnf,ToLower,Errorf,getPassHostHeader,GetEndpoints],createClient->[ReadFile,Errorf,NewClient,Getenv,Debugf],loadConfig->[getConfiguration,Error],String->[Sprintf],Provide->[createClient,loadIngresses,NewTimer,loadConfig,Go,DeepEqual,WatchAll,Errorf,RetryNotify,NewBackOff,N... | loadIngresses loads all ingresses from kubernetes This function is used to add a route to a frontend This function will return nil if no endpoints are found. | Not sure about this change... I don't think we need this since k8s does not add servers to the backend until they are ready... |
@@ -225,7 +225,7 @@ public class BattleTracker implements Serializable {
// We must look at all territories,
// because we could have conquered the end territory if there are no units there
for (final Territory current : route.getAllTerritories()) {
- if (!relationshipTracker.isAllied(current.getOwn... | [BattleTracker->[addBattle->[addBombingBattle,addBattle],fightDefenselessBattles->[getPendingBattle,getPendingBattleSites],removeBattle->[removeDependency],clearBattleRecords->[clear],addMustFightBattleChange->[addBattle],getBlocked->[getDependentOn],addAirBattle->[addBattle],clear->[clear],fightAirRaidsAndStrategicBom... | Undo a battle. | Strange... It appears 84f7868 is empty and didn't actually revert this line. Maybe there was a rebase in between? Regardless, could you please push a new commit to revert this line? |
@@ -154,6 +154,16 @@ class Gcc(AutotoolsPackage):
# See https://gcc.gnu.org/gcc-5/changes.html
conflicts('languages=jit', when='@:4')
+ # NVPTX offloading supported in 7 and later by limited languages
+ conflicts('+nvptx', when='@:6')
+ conflicts('languages=ada', when='+nvptx')
+ conflicts('lang... | [Gcc->[url_for_version->[Version,format],write_rpath_specs->[join_path,gcc,write,set_install_permissions,startswith,format,warn,open],spec_dir->[glob,format],setup_environment->[join_path,set],patch->[join_path,install,Version,isfile,filter_file,format,mkdirp],configure_args->[satisfies,append,Version,extend,format,joi... | Creates a new object. Find all the patch objects that are available on the system. | I'm a bit on the fence regarding these language conflicts. Gcc still builds when compiling it with e.g. `spack install gcc +nvptx languages=objc,c,c++,fortran`, and offloads C/C++/Fortran correctly. So these language conflicts might not be necessary. |
@@ -72,10 +72,10 @@ describe('isExperimentOn', () => {
expectExperiment('AMP_EXP=e2 , e1', 'e1').to.be.true;
});
- it('should return "off" when disabling value is in the list', () => {
- expectExperiment('AMP_EXP=-e1,e1', 'e1').to.be.false;
+ it('should return "off" when disabling value is afte... | [No CFG could be retrieved] | The default configuration for the hash feature. Provide a description of the global flags. | Hence here it should be `false`. Why are you switching it to `true`? |
@@ -111,7 +111,7 @@ public class ApacheHttpAsyncClientInstrumentation implements TypeInstrumentation
@Override
public HttpRequest generateRequest() throws IOException, HttpException {
HttpRequest request = delegate.generateRequest();
- GlobalOpenTelemetry.getPropagators()
+ tracer().getPropag... | [ApacheHttpAsyncClientInstrumentation->[TraceContinuedFutureCallback->[completeDelegate->[completed],failDelegate->[failed],cancelDelegate->[cancelled]],DelegatingRequestProducer->[failed->[failed],isRepeatable->[isRepeatable],generateRequest->[generateRequest],resetRequest->[resetRequest],produceContent->[produceConte... | Override generateRequest to inject the span name and span name into the request. | I updated this particular instrumentation because I wanted to make sure that the basic idea was workable. |
@@ -38,6 +38,11 @@ namespace Dynamo.Engine
/// </summary>
public event AstBuiltEventHandler AstBuilt;
+ /// <summary>
+ /// The event notifies client that the VMLibraries have been reset and the VM is now ready to run the new code.
+ /// </summary>
+ public static event ... | [EngineController->[EnableProfiling->[Dispose],GetExecutedAstGuids->[GetExecutedAstGuids],ReconcileTraceDataAndNotify->[OnTraceReconciliationComplete],ImportLibrary->[ImportLibrary],LibraryLoaded->[OnLibraryLoaded],GetRuntimeWarnings->[GetRuntimeWarnings],RemoveRecordedAstGuidsForSession->[RemoveRecordedAstGuidsForSess... | A controller for handling the creation of a new node. - True if every action should be logged. Used in debug mode. | what do you think about making this internal? Is it useful to anyone but us? |
@@ -261,6 +261,11 @@ class NodeActivateCommand(PulpCliCommand):
strategy = kwargs[STRATEGY_OPTION.keyword]
delta = {'notes': {constants.NODE_NOTE_KEY: True, constants.STRATEGY_NOTE_KEY: strategy}}
+ if node_activated(self.context, consumer_id):
+ msg = ALREADY_ACTIVATED_NOTHING_DON... | [BindingCommand->[missing_resources->[missing_resources]],NodeBindCommand->[run->[missing_resources]],NodeListRepositoriesCommand->[get_repositories->[get_repositories]],NodeUnbindCommand->[run->[missing_resources]],NodeUpdateCommand->[run->[missing_resources]]] | Runs the node - specific action. | Is CONSUMER the correct substitution here? That'll produce "Consumer already activated as a child node." That sounds ok, I'm just double checking that you didn't mean to use the consumer ID here to produce something like "localhost already activated as a child node." |
@@ -482,7 +482,7 @@ define([
},
/**
- * Gets the command to toggle the visibility of a {@link PerformanceDisplay}
+ * Gets the command to toggle the visibility of the performance display
* @memberof CesiumInspectorViewModel.prototype
*
* @type {Command}
| [No CFG could be retrieved] | Provides a list of functions that can be used to control the visibility of a specific command. Commands that can be toggled on or off of the Globe. | This feels like an unfinished sentence, does it just need a period at the end? |
@@ -77,7 +77,7 @@ func (p *Prospector) initProspectorer(outlet channel.Outleter, states []file.Sta
case harvester.RedisType:
prospectorer, err = redis.NewProspector(config, outlet)
case harvester.LogType:
- prospectorer, err = log.NewProspector(config, states, outlet, p.done)
+ prospectorer, err = log.NewProsp... | [Stop->[Wait],initProspectorer->[Errorf,NewProspector],stop->[ID,Info,Wait,Stop],Start->[ID,Add,stop,Run,Info,Wait,Done],Run->[After,Info,Run,Debug],initProspectorer,Unpack,Hash] | initProspectorer initializes the prospector. | In the past the p.beatDone was already part of the outlet. I assume this changes now as the prospector itselfs creates different outlets? |
@@ -712,12 +712,6 @@ class MatrixTransport(Runnable):
)
return
- if not self._address_mgr.is_address_known(peer_address):
- self.log.debug(
- "Got invited by a non-whitelisted user - ignoring", room_id=room_id, user=user
- )
- return
-
... | [_RetryQueue->[enqueue->[_expiration_generator,_MessageData],_check_and_send->[message_is_in_queue],_run->[_check_and_send],enqueue_unordered->[enqueue]],MatrixTransport->[_broadcast_worker->[_broadcast],_send_with_retry->[enqueue,_get_retrier],send_to_device->[send_to_device],_get_retrier->[start,_RetryQueue],stop->[s... | Handle a room invite. Checks if a node is not already in the system and if so joins it. | With this check removed we need to handle this case in `_handle_message` (or probably even better with a sync filter) otherwise we will open ourselves up to being spammed. |
@@ -47,12 +47,17 @@ def main(checks):
run("./scripts/check_requirements_and_setup.py", shell=True, check=True)
print("check requirements passed")
+ if "check-files-sizes" in checks:
+ print("Checking all added files have size <= 2MB", flush=True)
+ run("./scripts... | [main->[str,print,exit,run],ArgumentParser,parse_args,main,add_argument] | Run all checks. | Would you rename this "check-large-files"? |
@@ -1303,9 +1303,7 @@ def test_password_reset_email(
"""
email = customer_user.email
variables = {"email": email}
- response = staff_api_client.post_graphql(
- query, variables, permissions=[permission_manage_users]
- )
+ response = staff_api_client.post_graphql(query, variables)
con... | [test_query_staff->[assert_no_permission,all,len,sorted,post_graphql,get_graphql_content],test_customer_delete_errors->[raises,Mock,clean_instance],test_password_reset_email_non_existing_user->[post_graphql,get_graphql_content,assert_not_called],test_customer_create->[get_user_model,convert_dict_keys_to_camel_case,as_d... | Test password reset email. | Why did we drop the permission checks? |
@@ -0,0 +1,8 @@
+from hashlib import sha256
+
+from raiden.utils.typing import Secret, SecretHash
+
+
+def sha256_secrethash(secret: Secret) -> SecretHash:
+ """Compute the secret hash using sha256."""
+ return SecretHash(sha256(secret).digest())
| [No CFG could be retrieved] | No Summary Found. | Seems simple enough, but a simple test would be nice. |
@@ -0,0 +1,17 @@
+package org.infinispan.rest.framework;
+
+import org.infinispan.rest.framework.impl.Invocations;
+
+/**
+ * Handles all the logic related to a REST resource.
+ *
+ * @since 10.0
+ */
+public interface ResourceHandler {
+
+ /**
+ * Return the {@link Invocations} handled by this ResourceHandler.
+ ... | [No CFG could be retrieved] | No Summary Found. | Why not just return `Iterable<Invocation>`? |
@@ -691,7 +691,11 @@ func (s SigID) ToBytes() []byte {
if err != nil {
return nil
}
- return b[0:SIG_ID_LEN]
+ n := len(b)
+ if n > SIG_ID_LEN {
+ n = SIG_ID_LEN
+ }
+ return b[0:n]
}
func (s SigID) StripSuffix() SigIDBase {
| [FindDeviceKey->[Equal],IsPublic->[IsPublic],ListSubteams->[IsNil,String],RootID->[ToTeamID,RootAncestorName],KeySummary->[KeySummary],MaxReaderPerTeamKeyGeneration->[MaxReaderPerTeamKey],AddUVWithRole->[IsRestrictedBot],SwapLastPart->[Parent,Append],Append->[String],AssertionValue->[String],GoError->[Error],PrefixMatc... | ToBytes converts a SigID to a byte slice. | mixed opinions about this. while it's a little silly to panic here from a malformed sigID, i found a weird bug with sigID suffixes a few weeks ago because of this panic. i dunno - not a dealbreaker for me. just something to point out. there are pros to blowing up hard with something unexpected here. |
@@ -88,7 +88,7 @@ func (Renderer) Render(ctx *markup.RenderContext, input io.Reader, output io.Wri
// FIXME: don't read all to memory
rawBytes, err := ioutil.ReadAll(input)
- if err != nil {
+ if err != nil && err != io.EOF {
return err
}
| [Render->[NewWriter,Itoa,Flush,NewReader,CreateReaderAndGuessDelimiter,Read,ReadAll,WriteString,EscapeString],SanitizerRules->[MustCompile],RegisterRenderer,WriteString,EscapeString] | Render renders a CSV file into a HTML table. This function is called when a user has no permission to write a new block. | ioutil cannot return io.EOF |
@@ -145,4 +145,10 @@ class DefaultSourceCallbackContext implements SourceCallbackContextAdapter {
public <T, A> SourceCallback<T, A> getSourceCallback() {
return sourceCallback;
}
+
+ private I18nMessage createWrongConnectionMessage(Object connection) {
+ return createStaticMessage(format("Internal Error... | [DefaultSourceCallbackContext->[hasVariable->[containsKey],bindConnection->[IllegalArgumentException,XaTransactionHandle,getConnectionHandler,checkArgument,getSimpleName,getConfigurationInstance,isTransacted,getTransactionConfig,DefaultTransactionHandle,bindToTransaction,getTransactionManager],getVariable->[get,ofNulla... | Returns the source callback. | i don't understand what this error means. the user probably won't either |
@@ -37,6 +37,11 @@ func (consensus *Consensus) handleMessageUpdate(payload []byte) {
return
}
+ if msg.GetConsensus().ShardId != consensus.ShardID {
+ consensus.getLogger().Warn("Received consensus message from different shard",
+ "myShardId", consensus.ShardID, "receivedShardId", msg.GetConsensus().ShardId)
... | [onCommitted->[Unlock,Warn,IsEqual,Info,Mode,verifySenderKey,PutUint64,AddMessage,Error,Stop,Start,Lock,After,Debug,readSignatureBitmapPayload,CountOneBits,IsActive,getLogger,tryCatchup,SetMode,VerifyHash,Quorum],tryPrepare->[ShardID,switchPhase,SendMessageToGroups,Warn,getLogger,constructPrepareMessage,NewGroupIDBySha... | handleMessageUpdate handles message update. | view change message has different format, msg.GetViewchange(). need separate checking |
@@ -140,6 +140,16 @@ public class TxDistributionInterceptor extends BaseDistributionInterceptor {
// If this was a remote put record that which sent it
if (isL1CacheEnabled && !ctx.isOriginLocal() && !skrg.generateRecipients().contains(ctx.getOrigin()))
l1Manager.addRequestor(command.getKey(), c... | [TxDistributionInterceptor->[remoteGetAndStoreInL1->[lockAndWrap,isNotInL1],ignorePreviousValueOnBackup->[ignorePreviousValueOnBackup],handleWriteCommand->[shouldFetchRemoteValuesForWriteSkewCheck],visitReplaceCommand->[visitReplaceCommand],visitPutKeyValueCommand->[ignorePreviousValueOnBackup],visitLockControlCommand-... | This method is called for put key - value commands. It is called by the visitor to. | Hmmm, why check that is not transactional? PFER is primarily designed for transactional environments, where you wanna avoid locks held by other transactions, which might be lengthy, to affect PFER operations. |
@@ -88,7 +88,7 @@ class BidirectionalAttentionFlowTest(ModelTestCase):
span_begin_probs = torch.FloatTensor([[0.1, 0.3, 0.05, 0.3, 0.25]]).log()
span_end_probs = torch.FloatTensor([[0.65, 0.05, 0.2, 0.05, 0.05]]).log()
- begin_end_idxs = BidirectionalAttentionFlow.get_best_span(span_begin_pro... | [BidirectionalAttentionFlowTest->[test_forward_pass_runs_correctly->[output_dict,index_instances,Batch,sum,tuple,instances,get_metrics,isinstance,as_tensor_dict,model,assert_almost_equal],test_model_can_train_save_and_load->[ensure_model_can_train_save_and_load],test_get_best_span->[numpy,FloatTensor,get_best_span,asse... | This method checks if the best answer is in the correct order. This function checks that the best span of the BidirectionalAttentionFlow has a single. | It'd be best to move this test to a new util test file, parallel to where you moved the logic. |
@@ -18,7 +18,7 @@ REGION = os.getenv('FORMRECOGNIZER_LOCATION', None)
FormRecognizerPreparer = functools.partial(
PowerShellPreparer,
'formrecognizer',
- formrecognizer_test_endpoint="https://region.api.cognitive.microsoft.com/",
+ formrecognizer_test_endpoint="https://fakeendpoint.cognitiveservices.az... | [GlobalClientPreparer->[create_resource->[client_cls,AzureKeyCredential,update],__init__->[super]],partial,getenv] | Creates a new object. Creates a new instance of the VariableRowsClient class. | also remove the trailing slash here so it matches the conftest sanitizer value. In fact, I think PowershellPreparer sanitizing is now enabled so you might not even need the conftest sanitizer anymore. Haven't tested that yet myself. |
@@ -315,6 +315,7 @@ class StreamingCache(CacheManager):
StreamingCacheSource(self._cache_dir, l,
self._is_cache_complete).read(tail=True)
for l in labels
+ if not [sub_l for sub_l in l if self.sentinel_label() in sub_l]
]
headers = [next(r) for r in reade... | [StreamingCacheSource->[read->[_wait_until_file_exists,_emit_from_file]],StreamingCacheSink->[expand->[StreamingWriteToText]],StreamingCache->[read->[exists,StreamingCacheSource],write->[exists,write],cleanup->[exists],exists->[exists],read_multiple->[StreamingCacheSource],Reader->[_event_stream_caught_up_to_target->[_... | Reads multiple records from file and writes them to cache. | This is a little hard to read. Isn't a label `l` a `str`, so a `sub_l` is a character of that `str`? I suppose `if not [sub_l for ...]` evaluates to `True` when the `[sub_l for ...]` is empty. And the emptiness of `[sub_l for ...]` is based on whether the `sentinel_label` exists in the `sub_l`? This is where I get conf... |
@@ -929,6 +929,10 @@ func (ss *StateSync) SyncLoop(bc *core.BlockChain, worker *worker.Worker, isBeac
isBeacon, bc.ShardID(), otherHeight, currentHeight)
break
}
+ if outOfSyncCount < syncStatusCheckCount {
+ outOfSyncCount++
+ continue
+ }
utils.Logger().Info().
Msgf("[SYNC] Node is OUT OF SY... | [SyncLoop->[purgeAllBlocksFromCache,getMaxPeerHeight,purgeOldBlocksFromCache,RegisterNodeInfo,ProcessStateSync],GetBlockHashesConsensusAndCleanUp->[getHowManyMaxConsensus,cleanUpPeers],GetBlocks->[GetBlocks],purgeAllBlocksFromCache->[ForEachPeer],getMaxConsensusBlockFromParentHash->[ForEachPeer],getMaxPeerHeight->[ForE... | SyncLoop is the main loop for the state sync Add consensus last mile. | Why checking multiple times? Actually the ticker here shall be removed. Why do we need this check? This will reduce the sync performance a lot. Do you think this is the problem of the current sync? |
@@ -232,7 +232,7 @@ public abstract class AbstractWorkManagerTest {
}
@Test
- public void testWorkManagerWork() throws Exception {
+ public void testWorkManagerWork() throws InterruptedException {
int duration = getDurationMillis() * 3;
SleepWork work = new SleepWork(duration);
... | [AbstractWorkManagerTest->[SleepAndFailWork->[work->[getTitle,work]],testWorkManagerWork->[assertDiff,getDurationMillis],testWorkManagerDisableProcessingAll->[assertDiff,getDurationMillis],itCanFireWorkFailureEvent->[SleepAndFailWork],testWorkManagerScheduling->[SleepAndFailWork,assertDiff,assertState,getDurationMillis... | Test work manager work. | For tests I don't see what this brings, I must say I'm not a fan of having detailed exceptions here. |
@@ -1559,8 +1559,9 @@ void Client::handleCommand_MediaPush(NetworkPacket *pkt)
m_media_pushed_files.insert(filename);
// create a downloader for this file
- auto downloader = new SingleMediaDownloader(cached);
- m_pending_media_downloads.emplace_back(token, downloader);
+ std::unique_ptr<SingleMediaDownloader> do... | [handleCommand_DeathScreen->[push],handleCommand_StopSound->[stopSound,find,end],handleCommand_AccessDenied->[getCommand,empty,wide_to_utf8,getSize],handleCommand_HudChange->[push],handleCommand_FormspecPrepend->[assert,getLocalPlayer],handleCommand_HudSetParam->[size,getLocalPlayer,c_str,readS32,assert],handleCommand_... | This method is called when a new media file is pushed to the server. This method is called when a file is pushed to the client. It will create a downloader. | You can't move the downloader at this point, it is used on the lines below. `m_pending_media_downloads.emplace_back(token, std::unique_ptr<T>(downloader));` might work here (leaving the declaration as-is) |
@@ -35,8 +35,8 @@ class MockChain:
# let's make a single mock token network for testing
self.token_network = MockTokenNetwork()
- def payment_channel(self, token_network_address, channel_id):
- return MockPaymentChannel(self.token_network, channel_id)
+ def payment_channel(self, canonic... | [MockChain->[payment_channel->[MockPaymentChannel],__init__->[MockTokenNetwork]],MockRaidenService->[on_message->[on_message],sign->[sign],__init__->[MockChain]]] | Initialize a mock node. | Shouldn't you use `canonical_identifier.token_network` here instead of `self.token_network`? |
@@ -671,11 +671,8 @@ export class AmpStoryPage extends AMP.BaseElement {
}
this.cssVariablesStyleEl_.textContent =
`:root {` +
- `--story-page-vh: ${px(state.vh)};` +
- `--story-page-vw: ${px(state.vw)};` +
- `--story-page-vmin: ${px(state.vmin)};` +
-... | [AmpStoryPage->[setState->[PLAYING,dev,NOT_ACTIVE,PAUSED],isAutoplaySupported_->[isAutoplaySupported],constructor->[resolve,timerFor,getAmpdoc,NOT_ACTIVE,getStoreService,mutatorForDoc,platformFor,promise,getMediaPerformanceMetricsService,debounce,reject],emitProgress_->[dict,PAGE_PROGRESS,NOT_ACTIVE,dispatch],setPageDe... | Updates the layout size of the story page. no - op if story page is not enabled. | Why don't we go 100% CSS? I'd like it if we could remove this code entirely. It's just duplicating the CSS and at worst can cause CLS for no good reason |
@@ -408,12 +408,14 @@ export class AmpAnimation extends AMP.BaseElement {
/**
* Creates the runner but animations will not start.
* @param {?JsonObject=} opt_args
+ * @param {?Object=} opt_positionObserverArgs
* @return {!Promise}
* @private
*/
- createRunnerIfNeeded_(opt_args) {
+ createRunn... | [No CFG could be retrieved] | Creates a runner if it is not already running. Creates a runner for a given . | `opt_viewportData` is cleaner IMO. Avoiding position-observer naming and logic throughout the amp-animation stack would be nice. |
@@ -138,8 +138,8 @@ public class ShiroAuthenticationService implements AuthenticationService {
@Override
public Collection<Realm> getRealmsList() {
String key = ThreadContext.SECURITY_MANAGER_KEY;
- DefaultWebSecurityManager defaultWebSecurityManager = (DefaultWebSecurityManager) ThreadContext.get(key);
-... | [ShiroAuthenticationService->[getAssociatedRoles->[getRealmsList,isAuthenticated,getPrincipal],extractPrincipal->[getPrincipal],isAuthenticated->[isAuthenticated],getMatchedUsers->[getRealmsList],getMatchedRoles->[getRealmsList]]] | This method returns the list of realms that are registered in the security manager. | Using a less specific class made it easier to test (hit a weird issue trying to create a DefaultWebSecurityManager and it seemed unnecessary) |
@@ -26,6 +26,8 @@ class BaseUploader < CarrierWave::Uploader::Base
# strip EXIF (and GPS) data
def strip_exif
+ return if file.content_type.include?("svg")
+
manipulate! do |image|
image.strip unless image.frames.count > FRAME_STRIP_MAX
image = yield(image) if block_given?
| [BaseUploader->[validate_frame_count->[raise,count],store_dir->[id,underscore],strip_exif->[manipulate!,strip,block_given?,count],size_range->[megabytes],process,freeze,include]] | Remove any EXIF image that is not in the frame queue. | There will be no exif data for an SVG |
@@ -219,6 +219,11 @@ namespace Dynamo.ViewModels
return PreviewState.None;
}
}
+
+ public bool IsFrozen
+ {
+ get { return Nodevm.IsFrozen; }
+ }
#endregion
/// <summary>
| [ConnectorViewModel->[DynamoViewModel_PropertyChanged->[RaisePropertyChanged,ConnectorType,Redraw,PropertyName,BEZIER],Model_PropertyChanged->[RaisePropertyChanged,PropertyName],StartOwner_PropertyChanged->[RaisePropertyChanged,PropertyName,Redraw],Redraw->[X,AsWindowsType,Input,Redraw,End,BezVisibility,Pow,Y,PortType,... | Creates a view and start drawing of a node. This method is called when the node viewModel of the node has changed. It is called. | Connector gets the state of the node. |
@@ -129,6 +129,7 @@ public class ServerDaemon implements Daemon {
setKeystorePassword(properties.getProperty(KEYSTORE_PASSWORD));
setWebAppLocation(properties.getProperty(WEBAPP_DIR));
setAccessLogFile(properties.getProperty(ACCESS_LOG, "access.log"));
+ setSessionTimeo... | [ServerDaemon->[destroy->[destroy],stop->[stop],main->[ServerDaemon],start->[start],getResource->[getResource]]] | Initializes the daemon with the specified configuration. | @marcaurele you have a default value in the property file, which is 30, and here it is 10 (at line 85). Moreover, what about using the value of variable `sessionTimeout ` as the default values? The variable already starts with the default value anyways. |
@@ -140,8 +140,12 @@ public class MessagePublishingErrorHandler implements ErrorHandler, BeanFactoryA
}
private MessageChannel resolveErrorChannel(Throwable t) {
- Message<?> failedMessage = (t instanceof MessagingException) ?
- ((MessagingException) t).getFailedMessage() : null;
+ Throwable actualThrowable ... | [MessagePublishingErrorHandler->[resolveErrorChannel->[getDefaultErrorChannel]]] | Resolves the error channel for the given Throwable. | According to the `OriginalMessageContainingMessagingException` ctor the cause is always `MessagingException`. Do you have anything else in mind? |
@@ -742,7 +742,7 @@ export class Viewer {
* Triggers "documentLoaded" event for the viewer.
*/
postDocumentReady() {
- this.sendMessageUnreliable_('documentLoaded', {
+ this.sendMessageUnreliable('documentLoaded', {
title: this.win.document.title,
sourceUrl: getSourceUrl(this.ampdoc.getUr... | [No CFG could be retrieved] | Adds a callback to the viewer s events. Requests to cancel the full overlay mode from the viewer. | I'd like to reconsider these calls in an alternative way. We already have a very clear idea whether or not (a) doc is embedded; and (b) where the messaging is expected. With this in mind, I'd rather change this code to either wait for messaging ready and reliably send this message or not even try if messaging is not co... |
@@ -128,7 +128,7 @@ public abstract class CauseOfInterruption implements Serializable {
final User userInstance = getUser();
listener.getLogger().println(
Messages.CauseOfInterruption_ShortDescription(
- userInstance != null ? ModelHyperlinkNote.encodeTo... | [CauseOfInterruption->[print->[getShortDescription],UserInterruption->[print->[getUser],hashCode->[hashCode],equals->[equals]]]] | Print the cause of interruption. | FTR thanks to getUser() being `@NonNull` |
@@ -300,7 +300,7 @@ func (d *defaultProviders) newRegisterDefaultProviderEvent(
event := ®isterResourceEvent{
goal: resource.NewGoal(
providers.MakeProviderType(req.Package()),
- req.Name(), true, inputs, "", false, nil, "", nil, nil, nil, nil, nil, nil, "", nil),
+ req.Name(), true, inputs, "", false, ... | [ReadResource->[getDefaultProviderRef],handleRequest->[newRegisterDefaultProviderEvent],Invoke->[Invoke],serve->[handleRequest],RegisterResource->[getDefaultProviderRef],getDefaultProviderRef,serve] | newRegisterDefaultProviderEvent creates a new registerResourceEvent and a channel that will be sent newRegisterDefaultProviderEvent creates a new event that will be sent when a default provider is. | Would it be worth wrapping these params in a struct? This list is getting unwieldy. |
@@ -129,6 +129,9 @@ Writer::svc()
e._tao_print_exception("Exception caught in svc():");
}
+ // Patch to prevent premature shutdown
+ Sleep(1000);
+
finished_instances_ ++;
return 0;
| [No CFG could be retrieved] | Check if a single is not already present in the service. | This isn't going to compile on all platforms |
@@ -0,0 +1,15 @@
+from django import template
+
+from ..filters import DEFAULT_SORT
+
+register = template.Library()
+
+
+@register.inclusion_tag('category/_sort_menu.html', takes_context=True)
+def sort_menu(context, attributes):
+ context['sort_by'] = \
+ context['request'].GET.get('sort_by', DEFAULT_SORT).... | [No CFG could be retrieved] | No Summary Found. | Again, instead of returning whole context you received as first argument, you should construct your own dictionary with data required by `_sort_menu.html` snippet. |
@@ -63,4 +63,18 @@ public abstract class DataPublisher implements Closeable {
public State getState() {
return this.state;
}
+
+ /**
+ * Get an instance of {@link DataPublisher}.
+ *
+ * @param dataPublisherClass A concrete class that extends {@link DataPublisher}.
+ * @param state A {@link State} u... | [DataPublisher->[publish->[publishMetadata,publishData]]] | get the state of the node. | Should be `implements`. |
@@ -106,6 +106,10 @@ func (p JobPresenter) FriendlyCreatedAt() string {
if p.KeeperSpec != nil {
return p.KeeperSpec.CreatedAt.Format(time.RFC3339)
}
+ case presenters.CronJobSpec:
+ if p.KeeperSpec != nil {
+ return p.KeeperSpec.CreatedAt.Format(time.RFC3339)
+ }
default:
return "unknown"
}
| [Migrate->[Present,Args,Sprintf,First,Append,Post,New,Close,errorOut,renderAPIResponse,Errorf,ReadAll],FriendlyTasks->[GetTasks],RenderTable->[SetAutoMergeCells,ToRows,newTable,Append],toRow->[FriendlyCreatedAt,String,GetID],CreateJobV2->[Printf,First,Args,Present,Marshal,NewReader,Post,New,Append,Close,errorOut,render... | FriendlyCreatedAt returns the string representation of the job s creation time. | cc @spooktheducks this seemed to be missing |
@@ -66,6 +66,13 @@ def gen_content_unit_with_directory(content_type_id, content_root, name=None):
return unit
+def gen_shitload_of_content_units(content_type_id, content_root, num_units):
+ unit_name_format = '%%s-%%0%dd' % len(str(num_units))
+ for i in xrange(1, num_units+1):
+ unit_name = unit_... | [OrphanManagerTests->[test_associated_unit->[gen_content_unit,associate_content_unit_with_repo,unassociate_content_unit_from_repo],test_list_one_orphan->[gen_content_unit],test_delete_one_orphan->[number_of_files_in_content_root,gen_content_unit],test_delete_by_id->[number_of_files_in_content_root,gen_content_unit],tes... | Associate a content_unit with the repository. | I get that we like to have jokes, but it's a tad unprofessional to have a method in our code that uses the word "shitload". Please change. |
@@ -151,6 +151,10 @@ public final class TicketGrantingTicketImpl extends AbstractTicket implements Ti
final List<Authentication> authentications = getChainedAuthentications();
service.setPrincipal(authentications.get(authentications.size()-1).getPrincipal());
+ if (registeredService.isOnlyKee... | [TicketGrantingTicketImpl->[getChainedAuthentications->[getAuthentication,getChainedAuthentications]]] | Grant service ticket. | This is where the hostname/path comparison comes into play to compare services based on ids. |
@@ -5,7 +5,6 @@ bot constants
"""
DEFAULT_CONFIG = 'config.json'
DEFAULT_EXCHANGE = 'bittrex'
-DYNAMIC_WHITELIST = 20 # pairs
PROCESS_THROTTLE_SECS = 5 # sec
DEFAULT_TICKER_INTERVAL = 5 # min
HYPEROPT_EPOCH = 100 # epochs
| [No CFG could be retrieved] | This function is used to set the default values for the bot class. Schema for the . | This is not used anymore - so no need to keep this constant. |
@@ -255,13 +255,14 @@ def main():
cmd_parser.add_argument('-u', '--user', default='micro', help='the telnet login username')
cmd_parser.add_argument('-p', '--password', default='python', help='the telnet login password')
cmd_parser.add_argument('-c', '--command', help='program passed in as string')
+ ... | [Pyboard->[exec_->[exec_raw,PyboardError],exit_raw_repl->[write],enter_raw_repl->[inWaiting,read,write,read_until,PyboardError],follow->[read_until,PyboardError],execfile->[exec_,read],__init__->[TelnetToSerial],exec_raw->[follow,exec_raw_no_follow],read_until->[inWaiting,read],close->[close],exec_raw_no_follow->[read,... | Main entry point for the script. This function is called when a user presses Ctrl - C. | There's an option you can provide here to make sure args.wait is an int. |
@@ -767,7 +767,7 @@ public class ConfigurationConverterTest extends AbstractInfinispanTest {
assertEquals("org.infinispan.persistence.jdbc.configuration.DummyKey2StringMapper", jdbcStringBasedStoreConfiguration.key2StringMapper());
assertTrue(jdbcStringBasedStoreConfiguration.table().dropOnExit());
... | [ConfigurationConverterTest->[assertCompatibilityConverted->[assertTrue,enabled,isClustered,marshaller,assertFalse,getCacheConfiguration],assertIndexingConverted->[isClustered,assertFalse,get,assertEquals,name,getCacheConfiguration],assertCustomInterceptorsConverted->[assertTrue,interceptor,isClustered,size,assertFalse... | Checks that persistence is converted to persistent. Checks if the configuration is valid. This method checks if the configuration is valid. Checks if all the configuration values are set. Checks if the configuration is valid. | @ryanemerson should table().batchSize() return the maxBatchSize() anyway ? |
@@ -0,0 +1,16 @@
+// Copyright 2019 The Gitea Authors. All rights reserved.
+// Use of this source code is governed by a MIT-style
+// license that can be found in the LICENSE file.
+
+package migrations
+
+import "github.com/go-xorm/xorm"
+
+func addEmailNotificationEnabledToUser(x *xorm.Engine) error {
+ // Issue see... | [No CFG could be retrieved] | No Summary Found. | default string is `VARCHAR(255)`, I think it's unnecessary to use 255 bytes. Maybe 10 or 20 is enough. |
@@ -23,7 +23,7 @@
*/
package hudson.node_monitors;
-import hudson.Util;
+
import hudson.Extension;
import hudson.model.Computer;
import hudson.remoting.Callable;
| [ResponseTimeMonitor->[monitor->[monitor],Data->[toString->[getAverage,failureCount],hasTooManyTimeouts->[failureCount]],newInstance->[ResponseTimeMonitor]]] | This function imports and imports a single object. Monitors the round - trip response time to this slave. | Shouldn't these lines just be removed? |
@@ -20,7 +20,7 @@ function tagrm_post(&$a) {
);
if(! dbm::is_result($r))
- goaway($a->get_baseurl() . '/' . $_SESSION['photo_return']);
+ goaway(App::get_baseurl() . '/' . $_SESSION['photo_return']);
$arr = explode(',', $r[0]['tag']);
for($x = 0; $x < count($arr); $x ++) {
| [tagrm_content->[get_baseurl],tagrm_post->[get_baseurl]] | tagrm_post - tag rm action. | Standards: Can you please add brackets to this conditional statement? |
@@ -168,11 +168,11 @@ abstract class AbstractStandardMessageHandlerFactoryBean extends AbstractSimpleM
|| "handleMessage".equals(targetMethodName));
}
- protected boolean canBeUsedDirect(AbstractReplyProducingMessageHandler handler) {
+ protected boolean canBeUsedDirect(AbstractMessageProducingHandler handler)... | [AbstractStandardMessageHandlerFactoryBean->[extractTypeIfPossible->[extractTypeIfPossible],createMessageProcessingHandler->[createMethodInvokingHandler]]] | Method isHandleMessageOrEmpty - Checks if the method is a string or has a name that. | Again the blank line in the end of file issue... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.