patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -979,7 +979,7 @@ namespace System.Windows.Forms
/// <summary>
/// Returns a detailed TOOLINFO_TOOLTIP structure that represents the specified region.
/// </summary>
- private unsafe ToolInfoWrapper<Control> GetTOOLINFO(Control control, string caption)
+ private protected virtual unsafe ToolInfoWrapper<Control> GetTOOLINFO(Control control, string caption)
{
TTF flags = TTF.TRANSPARENT | TTF.SUBCLASS;
| [ToolTip->[TimerHandler->[Hide],DestroyHandle->[DestroyHandle],RemoveAll->[HandleDestroyed,DestroyRegion,HandleCreated,ClearTopLevelControlEvents],ToString->[ToString],WmMove->[Reposition],SetTool->[Hide,GetWinTOOLINFO],Show->[ShowTooltip,IsWindowActive],WndProc->[WmWindowPosChanging,GetToolTip,WmWindowPosChanged,WmWindowFromPoint,WmShow,WmMouseActivate,WmPop,OnDraw,WmMove],RecreateHandle->[GetHandleCreated,CreateAllRegions,DestroyHandle,CreateHandle],ShowTooltip->[SetToolTipInternal],WmShow->[GetCaptionForTool,AnnounceText,OnPopup],OnTopLevelPropertyChanged->[ClearTopLevelControlEvents],SetToolTipInternal->[HandleCreated,HandleDestroyed,CheckNativeToolTip,GetTOOLINFO,CheckCompositeControls],CreateHandle->[CreateHandle],Hide->[GetHandleCreated,SetToolInfo,GetToolTip,ClearTopLevelControlEvents],MouseMove->[CreateRegion,MouseMove],SetDelayTime->[GetHandleCreated,AdjustBaseFromAuto,GetDelayTime],HideAllToolTips->[Hide],StopTimer->[Dispose],Dispose->[Dispose,DestroyHandle,ClearTopLevelControlEvents],WmPop->[HandleDestroyed,HandleCreated],CreateRegion->[SetToolInfo],ClearTopLevelControlEvents->[HandleDestroyed,HandleCreated],DestroyHandle]] | Returns ToolInfoWrapper if control has a ToolTip or ToolTip text in the left -. | Please remove it too because it is not necessary |
@@ -565,7 +565,7 @@ func (e *Kex2Provisionee) pushLKSServerHalf() error {
return err
}
- err = libkb.PostDeviceLKS(e.G(), e, e.device.ID, e.device.Type, e.lks.GetServerHalf(), e.lks.Generation(), chrText, chrKID)
+ err = libkb.PostDeviceLKS(context.TODO(), e.G(), e, e.device.ID, e.device.Type, e.lks.GetServerHalf(), e.lks.Generation(), chrText, chrKID)
if err != nil {
return err
}
| [HandleHello2->[Debug,handleHello],HandleDidCounterSign2->[Debug],dhKeyProof->[Debug],HandleHello->[Debug],addDeviceSibkey->[Debug],Debug->[Debug],handleDidCounterSign->[Debug]] | pushLKSServerHalf pushes the server half of the device s LKS to. | can't this be ctx.GetNetContext() too? will have to pass ctx into this func. |
@@ -73,10 +73,10 @@ public class SleepingTask extends BaseAbstractTask {
} catch (InterruptedException e) {
log.error("Sleep interrupted.");
Thread.currentThread().interrupt();
- Throwables.propagate(e);
+ failTask(e, taskContext);
} catch (IOException e) {
log.error("IOException encountered when creating {}", taskStateFile.getName(), e);
- Throwables.propagate(e);
+ failTask(e, taskContext);
}
}
}
| [SleepingTask->[run->[propagate,error,getName,sleep,info,IOException,currentTimeMillis,warn,createNewFile,run,interrupt],propagate,getParent,getProp,error,deleteOnExit,getPropAsLong,createParentDirs,IOException,getTaskState,exists,File,delete]] | This method will block until the next is found. | SleepingTask was written to test cancellation code or hanging issues. It is meant to sleep for some amount of time to simulate as a hanging task in production. It is supposed propagate exceptions like any normal task would do. |
@@ -1249,6 +1249,10 @@ class Flow:
if self.storage is None:
self.storage = get_default_storage_class()(**kwargs)
+ if isinstance(self.storage, prefect.environments.storage.Local):
+ self.environment.labels.add("local")
+ self.environment.labels.add(slugify(self.name))
+
client = prefect.Client()
deployed_flow = client.deploy(
flow=self,
| [Flow->[copy->[copy],upstream_tasks->[edges_to],load->[load],update->[add_edge,add_task],reference_tasks->[terminal_tasks],chain->[add_edge],edges_to->[all_upstream_edges],set_dependencies->[add_edge,add_task],run->[parameters,_run_on_schedule,run],edges_from->[all_downstream_edges],validate->[reference_tasks],serialize->[validate,update],_sorted_tasks->[copy,upstream_tasks,downstream_tasks,update],downstream_tasks->[edges_from],_run_on_schedule->[update],add_edge->[copy,add_task],visualize->[get_color,edges_to],deploy->[deploy]]] | Deploy a specific lease in this project to Prefect Cloud. | Can you add a note of these labels being automatically added? Maybe to the docstrings for the Local storage |
@@ -627,8 +627,8 @@ func (s *Server) ScatterRegion(ctx context.Context, request *pdpb.ScatterRegionR
}
cluster.RLock()
- defer cluster.RUnlock()
co := cluster.coordinator
+ cluster.RUnlock()
op, err := co.regionScatterer.Scatter(region)
if err != nil {
return nil, err
| [ScatterRegion->[GetRegion],notBootstrappedHeader->[errorHeader],incompatibleVersion->[errorHeader],AskBatchSplit->[GetRegion],RegionHeartbeat->[Send,Recv],Send->[Send],AskSplit->[GetRegion],Recv->[Recv],GetRegionByID->[GetRegionByID],PutStore->[GetStore]] | ScatterRegion returns a scattering region. | This `RLock()` is like the above one, no meaning. |
@@ -56,8 +56,6 @@ const WEBSERVER_TIMEOUT_RETRIES = 10;
const NAVIGATE_TIMEOUT_MS = 30000;
const MAX_PARALLEL_TABS = 5;
const WAIT_FOR_TABS_MS = 1000;
-const BUILD_STATUS_URL =
- 'https://amphtml-percy-status-checker.appspot.com/status';
const ROOT_DIR = path.resolve(__dirname, '../../../');
| [No CFG could be retrieved] | The main function for the generation of the n - js plugin. Override PERCY_ * environment variables if passed via gulp task parameters. | Yay! I assume we can shut this down after you're satisfied that this PR has landed with no chance of a revert? :smiley: |
@@ -24,7 +24,14 @@ namespace CoreNodeModels
[JsonConstructor]
private Range(IEnumerable<PortModel> inPorts, IEnumerable<PortModel> outPorts) : base(inPorts, outPorts)
{
+ if (inPorts.Count() == 3)
+ {
+ inPorts.ElementAt(0).DefaultValue = startPortDefaultValue;
+ inPorts.ElementAt(1).DefaultValue = endPortDefaultValue;
+ inPorts.ElementAt(2).DefaultValue = stepPortDefaultValue;
+ }
ArgumentLacing = LacingStrategy.Auto;
+ SetNodeStateBasedOnConnectionAndDefaults();
}
public Range()
| [Sequence->[BuildOutputAst->[BuildFunctionObject,StepSize,BuildAssignment,ToList,GetAstIdentifierForOutputIndex,kFunctionRangeExpression,AddRange],RegisterAllPorts,Output,Input,Auto,RangePortDataSeqToolTip,RangePortDataAmountToolTip,RangePortDataStepToolTip,CORE_LISTS_CREATE,RangePortDataStartToolTip,Add],Range->[BuildOutputAst->[BuildFunctionObject,StepSize,BuildAssignment,ToList,GetAstIdentifierForOutputIndex,kFunctionRangeExpression,AddRange],RegisterAllPorts,Output,Input,Auto,RangePortDataSeqToolTip,RangePortDataStepToolTip,RangePortDataEndToolTip,CORE_LISTS_CREATE,RangePortDataStartToolTip,Add]] | Creates a new range node with the given input ports and output ports. returns an array of node identifiers for a range expression. | any reason for checking this? or is there another Range node that has < 3 inports? |
@@ -148,8 +148,7 @@ public class DefaultMuleContextFactoryTestCase extends AbstractMuleTestCase {
context = muleContextFactory.createMuleContext("log4j2-test.xml", properties);
} catch (ConfigurationException e) {
assertEquals("No suitable configuration builder for resource \"[ConfigResource{resourceName='log4j2-test.xml'}]\" found. "
- + "Check you have configuration module on your classpath and are using correct file extension. "
- + "(org.mule.runtime.core.api.config.ConfigurationException)", e.getMessage());
+ + "Check you have configuration module on your classpath and are using correct file extension.", e.getMessage());
}
assertNull(context);
| [DefaultMuleContextFactoryTestCase->[testCreateMuleContextConfigurationBuilder->[assertMuleContextConfiguration,TestConfigurationBuilder,createMuleContext,assertNoDefaults,assertConfigurationBuilder1Objects],disposeContext->[dispose,isDisposed],assertNoDefaults->[lookupObject,assertNull],testCreateMuleContextConfigurationBuilderMuleContextBuilder->[assertConfigurationBuilder2Objects,assertCustomMuleContext,createMuleContext,TestMuleContextBuilder,TestConfigurationBuilder2,assertNoDefaults,asList],testCreateMuleContextConfigurationBuilderProperties->[assertMuleContextConfiguration,TestConfigurationBuilder,createMuleContext,lookupObject,Properties,assertNoDefaults,asList,assertEquals,put,assertConfigurationBuilder1Objects],notifiesMuleContextEvents->[onCreation,thenReturn,mock,createMuleContext,onConfiguration,onInitialization,inOrder,addListener],assertCustomMuleContext->[assertTrue,isInitialised,getLifecycleManager,notNullValue,getConfiguration,getNotificationManager,instanceOf,assertThat],testCreateMuleContext->[assertDefaults,assertMuleContextConfiguration,createMuleContext,DefaultsConfigurationBuilder],assertDefaults->[assertNotNull,lookupObject],testCreateMuleContextListMuleContextBuilder->[assertConfigurationBuilder2Objects,TestConfigurationBuilder,assertCustomMuleContext,createMuleContext,TestMuleContextBuilder,TestConfigurationBuilder2,assertNoDefaults,add,assertConfigurationBuilder1Objects],TestConfigurationBuilder2->[doConfigure->[registerObject]],assertMuleContextConfiguration->[assertTrue,isInitialised,getLifecycleManager,notNullValue,getConfiguration,getNotificationManager,instanceOf,assertThat],assertConfigurationBuilder2Objects->[assertEquals,lookupObject],testCreateMuleContextMuleContextBuilder->[SimpleConfigurationBuilder,assertCustomMuleContext,createMuleContext,TestMuleContextBuilder,assertNoDefaults,asList],TestConfigurationBuilder->[doConfigure->[Banana,registerObject]],testCreateMuleContextString->[createMuleContext,getMessage,assertEquals,assertNull],TestMuleContextBuilder->[createDefaultMuleContext->[TestMuleContext]],testCreateMuleContextStringProperties->[getMessage,createMuleContext,assertNull,Properties,assertEquals,put],assertConfigurationBuilder1Objects->[assertNotNull,getClass,assertEquals,lookupObject],DefaultMuleContextFactory,TestServicesConfigurationBuilder]] | Test method to create a MuleContext using the properties specified in the log4j2. | migrate to hamcrest |
@@ -5,8 +5,9 @@ import logging
import operator
import os
import shutil
-import site
+from distutils.util import change_root
from optparse import SUPPRESS_HELP
+from site import ENABLE_USER_SITE
from pip._vendor import pkg_resources
from pip._vendor.packaging.utils import canonicalize_name
| [InstallCommand->[run->[get_check_binary_allowed]],reject_location_related_install_options->[format_options],decide_user_install->[site_packages_writable],site_packages_writable->[get_lib_location_guesses]] | Imports a single package object. Get a function to check if a is binary allowed. | I'd suggest we don't use `change_root` here, as distutils is likely to be deprecated at some point, and at that point this function may no longer be available. |
@@ -204,6 +204,8 @@ module.exports = class extends BaseGenerator {
} catch (error) {
this.error(`Error while generating entities from the parsed JDL\n${error}`);
}
+
+ statistics.sendCrashReport('source', 'stack', 'generatorVersion', 'yorc', 'jdl');
}
};
}
| [No CFG could be retrieved] | Generate the entities from the exported entities Generates application files for the given application. | I didnt find this method implementation? |
@@ -8,8 +8,8 @@ namespace Microsoft.Extensions.Configuration
{
public static partial class FileConfigurationExtensions
{
- public static System.Action<Microsoft.Extensions.Configuration.FileLoadExceptionContext> GetFileLoadExceptionHandler(this Microsoft.Extensions.Configuration.IConfigurationBuilder builder) { throw null; }
- public static Microsoft.Extensions.FileProviders.IFileProvider GetFileProvider(this Microsoft.Extensions.Configuration.IConfigurationBuilder builder) { throw null; }
+ public static System.Action<Microsoft.Extensions.Configuration.FileLoadExceptionContext>? GetFileLoadExceptionHandler(this Microsoft.Extensions.Configuration.IConfigurationBuilder builder) { throw null; }
+ public static Microsoft.Extensions.FileProviders.IFileProvider? GetFileProvider(this Microsoft.Extensions.Configuration.IConfigurationBuilder builder) { throw null; }
public static Microsoft.Extensions.Configuration.IConfigurationBuilder SetBasePath(this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, string basePath) { throw null; }
public static Microsoft.Extensions.Configuration.IConfigurationBuilder SetFileLoadExceptionHandler(this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, System.Action<Microsoft.Extensions.Configuration.FileLoadExceptionContext> handler) { throw null; }
public static Microsoft.Extensions.Configuration.IConfigurationBuilder SetFileProvider(this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, Microsoft.Extensions.FileProviders.IFileProvider fileProvider) { throw null; }
| [No CFG could be retrieved] | Sets the file load exception handler. | Shouldn't `System.Action<Microsoft.Extensions.Configuration.FileLoadExceptionContext> handler` be marked as nullable? |
@@ -17410,13 +17410,14 @@ GlobOpt::EmitMemop(Loop * loop, LoopCount *loopCount, const MemOpEmitData* emitD
RemoveMemOpSrcInstr(memopInstr, emitData->stElemInstr, emitData->block);
if (!isMemset)
{
- if (((MemCopyEmitData*)emitData)->ldElemInstr->GetSrc1()->IsIndirOpnd())
+ IR::Instr* ldElemInstr = ((MemCopyEmitData*)emitData)->ldElemInstr;
+ if (ldElemInstr->GetSrc1()->IsIndirOpnd())
{
- baseOpnd = ((MemCopyEmitData*)emitData)->ldElemInstr->GetSrc1()->AsIndirOpnd()->GetBaseOpnd();
+ baseOpnd = ldElemInstr->GetSrc1()->AsIndirOpnd()->GetBaseOpnd();
isLikelyJsArray = baseOpnd->GetValueType().IsLikelyArrayOrObjectWithArray();
- ProcessNoImplicitCallArrayUses(baseOpnd, baseOpnd->IsArrayRegOpnd() ? baseOpnd->AsArrayRegOpnd() : nullptr, emitData->stElemInstr, isLikelyJsArray, true);
+ ProcessNoImplicitCallArrayUses(baseOpnd, baseOpnd->IsArrayRegOpnd() ? baseOpnd->AsArrayRegOpnd() : nullptr, ldElemInstr, isLikelyJsArray, true);
}
- RemoveMemOpSrcInstr(memopInstr, ((MemCopyEmitData*)emitData)->ldElemInstr, emitData->block);
+ RemoveMemOpSrcInstr(memopInstr, ldElemInstr, emitData->block);
}
InsertNoImplicitCallUses(memopInstr);
noImplicitCallUsesToInsert->Clear();
| [No CFG could be retrieved] | region value type str - > base index - > ldBase Checks if the given instruction is a MemSet and if so stores it in the MemSet. | `stElemInstr` was removed by `RemoveMemOpSrcInstr` above. `ProcessNoImplicitCallArrayUses` only uses the instr argument to get the func, so `ldElemInstr` works as well. I noticed this when running `test/benchmarks/Octane/mandreel.js`. |
@@ -295,7 +295,6 @@ define([
return;
}
this.onTransitionStart.raiseEvent(this, this._previousMode, SceneMode.SCENE3D, true);
- this._previousMode = SceneMode.MORPHING;
updateFrustums(this);
scene.mode = SceneMode.MORPHING;
| [No CFG could be retrieved] | Creates a morph between the two objects in the scene. This method is used to check if an object is destroyed. | Lines 242 and 269 have the same code. Does it have to be removed there as well? I also need to make sure that this doesn't break anything else (SceneModePicker for instances). |
@@ -13,7 +13,7 @@ module.exports = {
},
reporters: [
'default',
- [ 'jest-junit', { output: './<%= BUILD_DIR %>test-results/jest/TESTS-results.xml' } ]
+ [ 'jest-junit', { output: './<%= BUILD_DIR %>surefire-reports/TESTS-results-jest.xml' } ]
],
testResultsProcessor: 'jest-sonar-reporter',
transformIgnorePatterns: ['node_modules/(?!@angular/common/locales)'],
| [No CFG could be retrieved] | Config for the reporter. | @Tcharl You forget to change the path to 'test-results' here also |
@@ -46,7 +46,7 @@ public class Analysis {
private Expression havingExpression = null;
- private Optional<Integer> limitClause = Optional.empty();
+ private Integer limitClause = null;
void addSelectItem(final Expression expression, final String alias) {
| [Analysis->[addSelectItem->[add],getFromDataSource->[get],addDataSource->[add],empty]] | Adds a select item to the list of expressions. | why would you leave Optional? Why not use functional style and avoid dealing with NPE? |
@@ -401,6 +401,7 @@ public class InterpreterSettingManager implements InterpreterSettingManagerMBean
InterpreterInfo interpreterInfo =
new InterpreterInfo(registeredInterpreter.getClassName(), registeredInterpreter.getName(),
registeredInterpreter.isDefaultInterpreter(), registeredInterpreter.getEditor());
+ interpreterInfo.setConfig(registeredInterpreter.getConfig());
group = registeredInterpreter.getGroup();
runner = registeredInterpreter.getRunner();
// use defaultOption if it is not specified in interpreter-setting.json
| [InterpreterSettingManager->[getDefaultInterpreterSetting->[get,getByName],get->[get],remove->[saveToFile,get,remove],close->[close],getAllResourcesExcept->[getAllInterpreterGroup],removeRepository->[saveToFile],restart->[copyDependenciesFromLocalPath],removeResourcesBelongsToParagraph->[getAllInterpreterGroup],createNewSetting->[initInterpreterSetting,saveToFile],closeNote->[getInterpreterSettings],getEditorSetting->[getInterpreterSettings],init->[saveToFile,loadFromFile],removeResourcesBelongsToNote->[removeResourcesBelongsToParagraph],setPropertyAndRestart->[saveToFile,loadFromFile],loadFromFile->[initInterpreterSetting],addRepository->[saveToFile],getSettingIds->[get],onNoteRemove->[removeResourcesBelongsToNote],recursiveBuildLibList->[recursiveBuildLibList]]] | Register interpreter - setting. | Put it into constructor. |
@@ -135,18 +135,9 @@ func (v *ValidateSeed) Validate(ctx context.Context, a admission.Attributes, o a
return apierrors.NewInternalError(err)
}
- backupbuckets, err := v.backupBucketLister.List(labels.Everything())
- if err != nil {
- return apierrors.NewInternalError(err)
- }
-
if admissionutils.IsSeedUsedByShoot(seedName, shoots) {
return admission.NewForbidden(a, fmt.Errorf("cannot delete seed '%s' which is still used by shoot(s)", seedName))
}
- if admissionutils.IsSeedUsedByBackupBucket(seedName, backupbuckets) {
- return admission.NewForbidden(a, fmt.Errorf("cannot delete seed '%s' which is still used by backupbucket(s)", seedName))
- }
-
return nil
}
| [ValidateInitialization->[New],AssignReadyFunc->[SetReadyFunc],SetInternalCoreInformerFactory->[Informer,Lister,BackupBuckets,Core,Shoots,InternalVersion,Seeds],Validate->[GetSubresource,Everything,GetKind,IsSeedUsedByShoot,WaitForReady,New,NewForbidden,Kind,List,AssignReadyFunc,GetName,Errorf,IsSeedUsedByBackupBucket,NewInternalError,GroupKind],Register,NewHandler,WantsInternalCoreInformerFactory] | Validate ensures that the seed is not being deleted and that it is not being used by any. | Please, remove the backup bucket lister related code from lines 51, 82, 96. |
@@ -54,6 +54,11 @@ public class HoodieIndexConfig extends DefaultHoodieConfig {
// TODO: On by default. Once stable, we will remove the other mode.
public static final String BLOOM_INDEX_BUCKETIZED_CHECKING_PROP = "hoodie.bloom.index.bucketized.checking";
public static final String DEFAULT_BLOOM_INDEX_BUCKETIZED_CHECKING = "true";
+ public static final String BLOOM_INDEX_FILTER_TYPE = "hoodie.bloom.index.filter.type";
+ public static final String DEFAULT_BLOOM_INDEX_FILTER_TYPE = Integer.toString(BloomFilterTypeCode.SIMPLE.ordinal());
+ public static final String HOODIE_BLOOM_INDEX_FILTER_DYNAMIC_MAX_ENTRIES = "hoodie.bloom.index.filter.dynamic.max.entries";
+ public static final String DEFAULT_HOODIE_BLOOM_INDEX_FILTER_DYNAMIC_MAX_ENTRIES = "100000";
+
// 1B bloom filter checks happen in 250 seconds. 500ms to read a bloom filter.
// 10M checks in 2500ms, thus amortizing the cost of reading bloom filter across partitions.
public static final String BLOOM_INDEX_KEYS_PER_BUCKET_PROP = "hoodie.bloom.index.keys.per.bucket";
| [HoodieIndexConfig->[Builder->[build->[HoodieIndexConfig]]]] | This is a static property that can be used to configure the hoodie bloom index This method is used to provide a string that can be used to define the path to the. | could we keep it as a string.. much easier to configure than the ordinal? |
@@ -292,10 +292,14 @@ public class BatchUploadObject extends AbstractResource<ResourceTypeImpl> {
protected Object executeBatch(String batchId, String fileIdx, String operationId, HttpServletRequest request,
ExecutionRequest xreq) throws UnsupportedEncodingException {
- RequestContext.getActiveContext(request).addRequestCleanupHandler(req -> {
- BatchManager bm = Framework.getService(BatchManager.class);
- bm.clean(batchId);
- });
+
+ if (!Boolean.parseBoolean(
+ RequestContext.getActiveContext(request).getRequest().getHeader(BatchManagerConstants.NO_DROP_FLAG))) {
+ RequestContext.getActiveContext(request).addRequestCleanupHandler(req -> {
+ BatchManager bm = Framework.getService(BatchManager.class);
+ bm.clean(batchId);
+ });
+ }
try {
CoreSession session = ctx.getCoreSession();
| [BatchUploadObject->[initBatch->[initBatch],getFileInfo->[getFileInfo],buildHTMLResponse->[buildResponse],executeBatch->[execute],buildJSONResponse->[buildResponse],buildResponse->[buildResponse],buildTextResponse->[buildResponse]]] | Execute a batch. | The code is ok, but in case the files are not removed as part of the batch and if the "client" does not properly call the DELETE endpoint: who will do the cleanup ? |
@@ -56,7 +56,10 @@ BE_post_init(char*[], long)
ACE_CString included;
DRV_add_include_path(included, include_dds.c_str(), 0, true);
- if (idl_global->idl_version_ >= IDL_VERSION_4) {
+ if (idl_global->idl_version_ < IDL_VERSION_4) {
+ idl_global->ignore_files_ = true; // Exit without parsing files
+ be_global->error("opendds_idl requires IDL version to be 4 or greater");
+ } else {
DRV_cpp_putarg("-D__OPENDDS_IDL_HAS_ANNOTATIONS");
be_global->builtin_annotations_.register_all();
}
| [No CFG could be retrieved] | - DENSOR - DENSOR - DENSOR - DENSOR - D. | When would this error occur? Is the user explicitly setting a version? Should that be allowed, or should the BE just set the version it wants to use? |
@@ -210,11 +210,11 @@ class EditValidator {
static String validateChangeHitDamage(final GameData data, final IntegerMap<Unit> unitDamageMap,
final Territory territory) {
- String result = null;
if (unitDamageMap == null || unitDamageMap.isEmpty()) {
return "Damage map is empty";
}
- if ((result = validateTerritoryBasic(data, territory)) != null) {
+ String result = validateTerritoryBasic(data, territory);
+ if (result != null) {
return result;
}
final Collection<Unit> units = new ArrayList<>(unitDamageMap.keySet());
| [EditValidator->[validateAddUnits->[validateTerritoryBasic],validateChangeBombingDamage->[validateTerritoryBasic],validateChangeHitDamage->[validateTerritoryBasic],validateChangeTerritoryOwner->[validateTerritoryBasic],validateRemoveUnits->[validateTerritoryBasic]]] | Validate change hit damage. | Another `final` candidate. |
@@ -6,6 +6,10 @@ module Api
skip_before_action :verify_authenticity_token, only: %w[create destroy]
+ def index
+ @webhooks = @user.webhook_endpoints
+ end
+
def create
@webhook = @user.webhook_endpoints.create!(webhook_params)
render "show", status: :created
| [WebhooksController->[webhook_params->[permit],create->[create!,render],show->[find],destroy->[head,destroy!,find],skip_before_action,before_action,respond_to]] | POST - Create a new lease. | would be great to have ordering here |
@@ -246,13 +246,12 @@ class Annotate:
Function annotations persist across compilation for newly encountered
type signatures and as a result annotations are shown for all signatures.
"""
- def __init__(self, function, **kwargs):
+ def __init__(self, function, signature=None, **kwargs):
style = kwargs.get('style', 'default')
if not function.signatures:
raise ValueError('function need to be jitted for at least one signature')
- for sig in function.signatures:
- ann = function.get_annotation_info(sig)
+ ann = function.get_annotation_info(signature=signature)
self.ann = ann
for k,v in ann.items():
| [Annotate->[__repr__->[get_ansi_template],_repr_html_->[get_html_template],__init__->[htlines,hllines,reform_code]]] | Initialize the object with the contents of the given function. | I think this docstring might need an update now? |
@@ -677,8 +677,8 @@ class Solver
$systemLevel = $level;
}
- for ($i = 0, $n = 0; $n < count($this->rules); $i++, $n++) {
- if ($i == count($this->rules)) {
+ for ($i = 0, $n = 0, $count = count($this->rules); $n < $count; $i++, $n++) {
+ if ($i == $count) {
$i = 0;
}
| [Solver->[analyzeUnsolvableRule->[analyzeUnsolvableRule],solve->[makeAssertionRuleDecisions,setupInstalledMap],runSat->[propagate,selectAndInstall,analyzeUnsolvable,setPropagateLearn,revert],resetSolver->[makeAssertionRuleDecisions],selectAndInstall->[setPropagateLearn],analyzeUnsolvable->[analyzeUnsolvableRule],setPropagateLearn->[propagate,revert]]] | Runs the chain of rules until a satisfied rule is found. Checks if there are any items that can be picked from the decision queue. if there is no node in the tree that is not a node in the tree that is. | This is wrong. The logic inside the loop can modify `$this->rules`, sohte count can change |
@@ -324,6 +324,10 @@ public class BoundedConcurrentHashMap<K, V> extends AbstractMap<K, V>
public void onEntryEviction(Map<K, V> evicted) {
// Do nothing.
}
+ @Override
+ public void passivate(V internalCacheEntry) {
+ // Do nothing.
+ }
}
public interface EvictionPolicy<K, V> {
| [BoundedConcurrentHashMap->[contains->[containsValue],KeySet->[size->[size],contains->[containsKey],remove->[remove],clear->[clear],isEmpty->[isEmpty],iterator->[KeyIterator]],get->[hash,hashCode,get],remove->[hash,hashCode,remove],LRU->[execute->[clear],clear->[clear]],WriteThroughEntry->[setValue->[put,setValue]],Segment->[rehash->[newArray],containsValue->[readValueUnderLock,equals],containsKey->[getFirst,equals],get->[onEntryHit,readValueUnderLock,getFirst,equals],remove->[onEntryMiss,onEntryRemove,equals],attemptEviction->[execute,thresholdExpired],clear->[clear],put->[onEntryMiss,equals,onEntryHit,strategy,execute],notifyEvictionListener->[put,onEntryEviction],replace->[onEntryHit,getFirst,equals],make,newArray],HashIterator->[nextEntry->[advance],remove->[remove]],containsKey->[hash,hashCode,containsKey],KeyIterator->[nextElement->[nextEntry],next->[nextEntry]],replace->[hash,hashCode,replace],putIfAbsent->[hash,hashCode,put],EntryIterator->[next->[nextEntry,WriteThroughEntry]],containsValue->[containsValue],LIRS->[onEntryMiss->[transitionHIRResidentToHIRNonResident,transitionToLIRResident],handleLIRHit->[recency],handleHIRHit->[transitionToLIRResident],switchBottomostLIRtoHIRAndPrune->[recency,transitionLIRResidentToHIRResident],execute->[recency,clear],clear->[clear],onEntryRemove->[recency]],HashEntry->[hashCode->[hashCode],equals->[equals]],put->[hash,hashCode,put],readObject->[put,readObject,setTable],ValueIterator->[nextElement->[nextEntry],next->[nextEntry]],putAll->[put],Values->[size->[size],contains->[containsValue],clear->[clear],isEmpty->[isEmpty],iterator->[ValueIterator]],EntrySet->[size->[size],contains->[get,equals],remove->[remove],clear->[clear],isEmpty->[isEmpty],iterator->[EntryIterator]],clear->[clear],writeObject->[writeObject],newArray]] | On entry evicted. | Passivate abstraction is out of scope here, a higher-level concept that does not belong in this context. How about "onChosenForEviction" ? |
@@ -9,13 +9,10 @@ class OffHeapLruNode {
private static final OffHeapMemory MEMORY = OffHeapMemory.INSTANCE;
private static final int ADDRESS_SIZE = 8;
- private static final int HASHCODE_SIZE = 4;
- private static final int HASH_ENTRY_OFFSET = 0;
- private static final int PREVIOUS_NODE_OFFSET = HASH_ENTRY_OFFSET + ADDRESS_SIZE;
+ private static final int PREVIOUS_NODE_OFFSET = 0;
private static final int NEXT_NODE_OFFSET = PREVIOUS_NODE_OFFSET + ADDRESS_SIZE;
- private static final int HASHCODE_OFFSET = NEXT_NODE_OFFSET + ADDRESS_SIZE;
- private static final int SIZE = HASHCODE_OFFSET + HASHCODE_SIZE;
+ private static final int SIZE = NEXT_NODE_OFFSET + ADDRESS_SIZE;
private OffHeapLruNode() {
}
| [OffHeapLruNode->[debugString->[getNext,getHashCode,getEntry,getPrevious]]] | Returns SIZE. | I'd just remove the class and add the LRU-related methods to `OffHeapEntryFactory`. |
@@ -86,6 +86,17 @@ class NavierStokesMPIEmbeddedMonolithicSolver(navier_stokes_embedded_solver.Navi
if (self.settings["solver_type"].GetString() == "EmbeddedDevelopment"):
self.element_name = "EmbeddedSymbolicNavierStokes"
+ # TODO: Remove this once we finish the new implementations
+ if (self.settings["solver_type"].GetString() == "EmbeddedAusas"):
+ self.settings["is_slip"].SetBool(True)
+ self.element_name = "EmbeddedAusasNavierStokes"
+ self.condition_name = "EmbeddedAusasNavierStokesWallCondition"
+
+ # TODO: Remove this once we finish the new implementations
+ if (self.settings["solver_type"].GetString() == "EmbeddedAusasDevelopment"):
+ self.settings["is_slip"].SetBool(True)
+ self.element_name = "EmbeddedSymbolicNavierStokesDiscontinuous"
+
## Construct the linear solver
import trilinos_linear_solver_factory
self.trilinos_linear_solver = trilinos_linear_solver_factory.ConstructSolver(self.settings["linear_solver_settings"])
| [NavierStokesMPIEmbeddedMonolithicSolver->[ImportModelPart->[ImportModelPart]]] | Initialize the NavierStokes embedded solver. | does the trilinos version work with the fm_ale? |
@@ -26,6 +26,9 @@ static int opt_concur = 1;
static int opt_secs;
static int opt_stack;
static int opt_cr_type;
+#ifdef ULT_MMAP_STACK
+static int opt_mmap = false;
+#endif
static inline uint64_t
abt_current_ms(void)
| [inline->[clock_gettime],void->[ABT_thread_create,ABT_thread_yield,ABT_eventual_create,ABT_cond_create,ABT_mutex_lock,ABT_mutex_unlock,assert,ABT_cond_free,ABT_mutex_free,ABT_cond_wait,ABT_rwlock_free,ABT_eventual_free,printf,ABT_mutex_create,ABT_rwlock_create,ABT_cond_broadcast,abt_current_ms],main->[ABT_init,ABT_cond_create,D_ASSERT,ABT_mutex_free,atoi,getopt_long,printf,fprintf,ABT_thread_attr_set_stacksize,ABT_mutex_lock,ABT_cond_free,ABT_xstream_self,ABT_xstream_get_main_pools,ABT_mutex_unlock,abt_sched_rate,ABT_mutex_create,ABT_thread_attr_free,ABT_thread_create,ABT_thread_attr_create,abt_reset,ABT_cond_wait,ABT_finalize,exit,abt_ult_create_rate]] | System functions for reading the n - th nanoseconds from the System clock. | (style) do not initialise statics to false |
@@ -58,9 +58,9 @@ namespace System.Text.Json.Serialization.Converters
public override object CreateFromDictionary(ref ReadStack state, IDictionary sourceDictionary, JsonSerializerOptions options)
{
- Type immutableCollectionType = state.Current.JsonPropertyInfo.RuntimePropertyType;
+ Type immutableCollectionType = state.Current.JsonPropertyInfo!.RuntimePropertyType;
- JsonClassInfo elementClassInfo = state.Current.JsonPropertyInfo.ElementClassInfo;
+ JsonClassInfo elementClassInfo = state.Current.JsonPropertyInfo.ElementClassInfo!;
Type elementType = elementClassInfo.Type;
string delegateKey = DefaultImmutableEnumerableConverter.GetDelegateKey(immutableCollectionType, elementType, out _, out _);
| [DefaultImmutableDictionaryConverter->[IsImmutableDictionary->[IsGenericType,FullName],CreateFromDictionary->[CreateRootProperty,PolicyProperty,GetDelegateKey,ElementClassInfo,Assert,RuntimePropertyType,Type,CreateImmutableDictionaryInstance],RegisterImmutableDictionary->[GetType,GetDelegateKey,ImmutableDictionaryCreateRange,CreateRangeDelegatesContainsKey,TryAddCreateRangeDelegate]]] | Create an immutable collection from a dictionary. | These properties `state.Current.JsonPropertyInfo` and `state.Current.JsonPropertyInfo.ElementClassInfo` are nullable but always set in case of Dictionary or Enumerable type, so just banged them |
@@ -136,7 +136,7 @@ func (l *LocalWorkspace) GetConfig(ctx context.Context, fqsn string, key string)
if err != nil {
return val, errors.Wrapf(err, "could not get config, unable to select stack %s", fqsn)
}
- stdout, stderr, errCode, err := l.runPulumiCmdSync(ctx, "config", "get", key, "--show-secrets", "--json")
+ stdout, stderr, errCode, err := l.runPulumiCmdSync(ctx, "config", "get", key, "--json")
if err != nil {
return val, newAutoError(errors.Wrap(err, "unable to read config"), stdout, stderr, errCode)
}
| [runPulumiCmdSync->[PulumiHome,WorkDir,GetEnvVars],SetAllConfig->[SetConfig],RefreshConfig->[GetAllConfig],RemoveAllConfig->[RemoveConfig],ListStacks->[ProjectSettings,WhoAmI],SaveStackSettings,SaveProjectSettings] | GetConfig retrieves a config value from the current workspace. | `--show-secrets` was an intentional decision here (and below). The return type of `GetConfig` is a `ConfigValue` which has: - `Value`: the plaintext context of the config - `Secret`: a boolean flag indicating secretness This allows users (who are presumably privileged) to handle secrets with the maximum flexibility possible without overcomplicating the API surface. |
@@ -100,7 +100,12 @@ class OptionsBootstrapper(datatype([
short_flags = set()
def filecontent_for(path):
- return FileContent(ensure_text(path), read_file(path, binary_mode=True))
+ is_executable = os.stat(path).st_mode & stat.S_IXUSR == stat.S_IXUSR
+ return FileContent(
+ ensure_text(path),
+ read_file(path, binary_mode=True),
+ is_executable=is_executable,
+ )
def capture_the_flags(*args, **kwargs):
for arg in args:
| [OptionsBootstrapper->[get_full_options->[_full_options],bootstrap_options->[parse_bootstrap_options],create->[filecontent_for,get_config_file_paths,parse_bootstrap_options],_full_options->[get_bootstrap_options,create]]] | Parses the minimum amount of configuration necessary to create an OptionsBootstrapper. Load a from the config file and return a new Config object. | This was probably an abuse of FileContent... won't ask to remove it, but would you mind adding a TODO saying that this codepath doesn't really need to be using FileContent, per-se? |
@@ -134,8 +134,7 @@
<input type="hidden" name="article_id" value="<%= article.id %>" />
<p> Twitter MAIN</p>
<textarea cols="37" rows="6" wrap="hard" name="tweet" maxlength="255"><%= article.title %>
-<% if !article.user.twitter_username.blank? %>
{ author: @<%= article.user.twitter_username %> } #DEVCommunity<% end %>
- </textarea>
+<% if article.user.twitter_username %>
{ author: @<%= article.user.twitter_username %> } #DEVCommunity<% end %></textarea>
<button class="btn btn-info" style="font-size:1em;">🦅 Tweet to @<%= ApplicationConfig["SITE_TWITTER_HANDLE"] %></button>
<% end %>
<% if (article.decorate.cached_tag_list_array & Tag.bufferized_tags).any? %>
| [No CFG could be retrieved] | Displays a hidden hidden input that allows to share to Buffer and a Twitter Twitter Renders the hidden hidden fields and the hidden fields in order to show the hidden fields in order. | I suggest using `twitter_username?` method to preserve the logic. `twitter_username` will be truthy in case it equals an empty string. Though we shouldn't have such values in the db I still suggest using the method with the question mark to be extra sure. |
@@ -76,6 +76,8 @@ export const loadIcons = () => {
faFlag,
faBell,
faHome,
+ faRoad,
+ faTimesCircle,
faRoad
);
};
| [No CFG could be retrieved] | faFlag - A n vanzas. | isn't this duplicate of last entry? |
@@ -119,10 +119,11 @@ public class MockedBeamSqlTable extends BaseBeamTable {
@Override
public BeamIOType getSourceType() {
- return BeamIOType.UNBOUNDED;
+ return BeamIOType.BOUNDED;
}
@Override
+
public PCollection<BeamSqlRow> buildIOReader(Pipeline pipeline) {
return PBegin.in(pipeline).apply(
"MockedBeamSQLTable_Reader_" + COUNTER.incrementAndGet(), Create.of(inputRecords));
| [MockedBeamSqlTable->[of->[apply,withInputRecords],buildIOReader->[of,apply],OutputStore->[expand->[of,apply]]]] | Build a reader for a single record in the table. | Rename this class MockedBoundedTable to reflect the fact it's an unbounded variation of MockedUnboundedTable? |
@@ -21,10 +21,7 @@ class EventsConfigParserPlugin : public ConfigParserPlugin {
public:
std::vector<std::string> keys() { return {"events"}; }
- Status setUp() {
- data_.put_child("events", pt::ptree());
- return Status(0, "OK");
- }
+ EventsConfigParserPlugin() { data_.put_child("events", pt::ptree()); }
Status update(const std::map<std::string, pt::ptree>& config) {
if (config.count("events") > 0) {
| [EventsConfigParserPlugin->[update->[at,Status,put_child,count],setUp->[Status,put_child]],REGISTER_INTERNAL] | Keys of events in the tree. | This helps unit tests, which expect the "events" key to exist. |
@@ -85,7 +85,7 @@ TaxRateType = graphene.Enum(
JobStatusEnum = to_enum(JobStatus)
PermissionEnum = graphene.Enum("PermissionEnum", get_permissions_enum_list())
WeightUnitsEnum = graphene.Enum(
- "WeightUnitsEnum", [(str_to_enum(unit[0]), unit[0]) for unit in WeightUnits.CHOICES]
+ "WeightUnits", [(str_to_enum(unit[0]), unit[0]) for unit in WeightUnits.CHOICES]
)
| [to_enum->[upper,getattr,Enum,setdefault,str_to_enum],OrderDirection->[description->[ValueError]],to_enum,get_permissions_enum_list,Enum,from_enum,str_to_enum] | Enum constructor for the given enum class Missing error codes. | Why not `JobStatus`, and `WeightUnits` as variable names? |
@@ -361,7 +361,7 @@ public class Druids
public SearchQueryBuilder filters(String dimensionName, String value)
{
- dimFilter = new SelectorDimFilter(dimensionName, value, null);
+ dimFilter = new SelectorDimFilter(dimensionName, value, null, null);
return this;
}
| [Druids->[newSearchQueryBuilder->[SearchQueryBuilder],TimeBoundaryQueryBuilder->[copy->[context]],newTimeseriesQueryBuilder->[TimeseriesQueryBuilder],TimeseriesQueryBuilder->[virtualColumns->[virtualColumns]],SelectQueryBuilder->[virtualColumns->[virtualColumns],copy->[context]],DataSourceMetadataQueryBuilder->[copy->[context]],SegmentMetadataQueryBuilder->[copy->[context]],newSegmentMetadataQueryBuilder->[SegmentMetadataQueryBuilder],newSelectQueryBuilder->[SelectQueryBuilder],newScanQueryBuilder->[ScanQueryBuilder],newDataSourceMetadataQueryBuilder->[DataSourceMetadataQueryBuilder],ScanQueryBuilder->[virtualColumns->[virtualColumns]],SearchQueryBuilder->[copy->[context],fragments->[fragments],dimensions->[apply]],newTimeBoundaryQueryBuilder->[TimeBoundaryQueryBuilder]]] | Adds a dimension filter to the query. | Could call the old constructor |
@@ -78,6 +78,9 @@ public class RocksDBStore<K, V> implements NonBlockingStore<K, V> {
private static final Log log = LogFactory.getLog(MethodHandles.lookup().lookupClass(), Log.class);
private static final boolean trace = log.isTraceEnabled();
+ private static final byte[] BEGIN_KEY = new byte[0];
+ private static final byte[] END_KEY = new byte[] {(byte) 0xffffffff};
+
static final String DATABASE_PROPERTY_NAME_WITH_SUFFIX = "database.";
static final String COLUMN_FAMILY_PROPERTY_NAME_WITH_SUFFIX = "data.";
static final byte[] META_COLUMN_FAMILY = "meta-cf".getBytes();
| [RocksDBStore->[SegmentedRocksDBHandler->[handleIteratorFunction->[size,publish],removeSegments->[close],approximateSize->[getHandle],getHandleForMarshalledKey->[getHandle,unmarshall],recreateColumnFamily->[newDescriptor,byteArrayFromInt],publishEntries->[RocksEntryIterator],close->[close],clearForSegment->[delete,wrapIterator],open->[open,newDescriptor,byteArrayFromInt],addSegments->[newDescriptor,byteArrayFromInt]],approximateSize->[approximateSize],write->[write],handlePossiblyExpiredKey->[delete],putExpireDbData->[marshall,ExpiryBucket,unmarshall],ExpiryEntry->[hashCode->[hashCode],equals->[equals]],addSegments->[addSegments],unmarshallEntry->[unmarshall],batch->[delete],RocksEntryIterator->[getNext->[unmarshallEntry,unmarshall]],size->[size],load->[load],RocksDBHandler->[load->[unmarshallEntry,getHandle,marshall],write->[getHandle,addNewExpiry,marshall],writeMetadata->[marshall,MetadataImpl],delete->[delete,marshall,getHandle],loadMetadata->[unmarshall],publish->[close]],actualPurgeExpired->[getNext->[delete]],NonSegmentedRocksDBHandler->[removeSegments->[clear],approximateSize->[size],reinitAllDatabases->[getLocation,expiredDbOptions,getExpirationLocation,dataDbOptions,openDatabase,close,open],clear->[delete,wrapIterator,unmarshall,clear],close->[close],publishEntries->[RocksEntryIterator,publish],open->[newDescriptor,open]],delete->[delete],publishEntries->[publishEntries],removeSegments->[removeSegments],clear->[clear]]] | Create a store that uses RocksDB. Initializes the object. | This is equivalent to `new byte[] {(byte) 0xff}`, it creates an array with a single byte element. |
@@ -160,10 +160,11 @@ def main():
for arg in model.mo_args]
for model_precision in sorted(model_precisions):
+ dir_precision = model_precision + '-INT8' if model.quantized else model_precision
mo_cmd = [str(args.python), '--', str(mo_path),
'--framework={}'.format(model_format),
'--data_type={}'.format(model_precision),
- '--output_dir={}'.format(output_dir / model.subdirectory / model_precision),
+ '--output_dir={}'.format(output_dir / model.subdirectory / dir_precision),
'--model_name={}'.format(model.name),
*expanded_mo_args, *extra_mo_args]
| [main->[convert->[run_pre_convert,convert_to_onnx],convert],main] | Main function of the model optimization script. Generate a file in the output directory that represents a single . Checks if a is found in the specified directory. | This is not the right place for this. `model_precision` should already equal `FP32-INT8`/`FP16-INT8`. What you need to do is change the code in `common.py` that sets `model.precisions` so that it works appropriately for quantized models. That way: * info dumper's output will be correct; * Converter options like `--precisions=FP32-INT8` will work correctly. |
@@ -112,8 +112,8 @@ class GiftCardError(Error):
code = GiftCardErrorCode(description="The error code.", required=True)
-class ExtensionsError(Error):
- code = ExtensionsErrorCode(description="The error code.", required=True)
+class PluginsError(Error):
+ code = PluginsErrorCode(description="The error code.", required=True)
class StockError(Error):
| [WishlistError->[WishlistErrorCode],PermissionDisplay->[PermissionEnum,String],IntRangeInput->[Int],LanguageDisplay->[LanguageCodeEnum,String],ExtensionsError->[ExtensionsErrorCode],StockError->[StockErrorCode],SeoInput->[String],Weight->[String,Float],TaxType->[String],ShippingError->[ShippingErrorCode,NonNull,List],Error->[String],ShopError->[ShopErrorCode],ProductError->[ProductErrorCode],BulkProductError->[Int],GiftCardError->[GiftCardErrorCode],MenuError->[MenuErrorCode],WebhookError->[WebhookErrorCode],CheckoutError->[CheckoutErrorCode],WarehouseError->[WarehouseErrorCode],OrderError->[OrderErrorCode],BulkStockError->[Int],PageError->[PageErrorCode],AccountError->[AccountErrorCode],DiscountError->[DiscountErrorCode],DateRangeInput->[Date],DateTimeRangeInput->[DateTime],CountryDisplay->[String,Field],Image->[get_adjusted->[build_absolute_uri,get_thumbnail,Image],String],MetadataError->[MetadataErrorCode],PaymentError->[PaymentErrorCode],ProductAttributeError->[List,NonNull],PriceRangeInput->[Float]] | Error handler for errors thrown by the API. Required. The name and description are the name of the permission object. | This should be singular I think. |
@@ -941,9 +941,10 @@ OSSL_STORE_CTX *OSSL_STORE_attach(BIO *bp, const char *scheme,
const OSSL_PROVIDER *provider =
OSSL_STORE_LOADER_provider(fetched_loader);
void *provctx = OSSL_PROVIDER_get0_provider_ctx(provider);
+ OSSL_CORE_BIO *cbio = ossl_core_bio_new_from_bio(bp);
- if ((loader_ctx =
- fetched_loader->p_attach(provctx, (OSSL_CORE_BIO *)bp)) == NULL) {
+ if (cbio != NULL
+ && (loader_ctx = fetched_loader->p_attach(provctx, cbio)) == NULL) {
OSSL_STORE_LOADER_free(fetched_loader);
fetched_loader = NULL;
} else if (propq != NULL) {
| [No CFG could be retrieved] | region OSSL_STORE_SEARCH_get0_digest Method PARAM params = OSSL_STORE_PARAM_PROPERTIES. | This looks weird. You're IMO mixing non-failure and failure cases here. |
@@ -193,12 +193,9 @@ spring:
<%_ } _%>
<%_ if (searchEngine === 'elasticsearch') { _%>
elasticsearch:
- cluster-name:
- cluster-nodes: localhost:9300
properties:
path:
- logs: <%= BUILD_DIR %>elasticsearch/log
- data: <%= BUILD_DIR %>elasticsearch/data
+ home: <%= BUILD_DIR %>elasticsearch
<%_ } _%>
<%_ if (databaseType === 'couchbase') { _%>
couchbase:
| [No CFG could be retrieved] | cache configuration for missing cache entries Configuration of a specific application. | as this is a Spring Data Elasticsearch property, is this being used by Jest also? |
@@ -39,10 +39,8 @@ class DataLakeStorageClientConfiguration(Configuration):
if url is None:
raise ValueError("Parameter 'url' must not be None.")
- if file_system is None:
- raise ValueError("Parameter 'file_system' must not be None.")
- if path1 is None:
- raise ValueError("Parameter 'path1' must not be None.")
+ # if file_system is None:
+ # raise ValueError("Parameter 'file_system' must not be None.")
super(DataLakeStorageClientConfiguration, self).__init__(**kwargs)
self._configure(**kwargs)
| [DataLakeStorageClientConfiguration->[__init__->[super,format,ValueError,_configure,add_user_agent],_configure->[UserAgentPolicy,ProxyPolicy,AsyncRedirectPolicy,get,AsyncRetryPolicy,HeadersPolicy,CustomHookPolicy,NetworkTraceLoggingPolicy]]] | Initialize a DataLakeStorageClientConfiguration object with a . | What happened here? Is this something that needs to be fixed in the swagger spec? Or generator? |
@@ -46,7 +46,7 @@ class BiEncoderRankerAgent(TorchRankerAgent):
super().__init__(opt, shared)
# it's easier for now to use DataParallel when
self.data_parallel = opt.get('data_parallel') and self.use_cuda
- if self.data_parallel:
+ if self.data_parallel and shared is None:
self.model = torch.nn.DataParallel(self.model)
if is_distributed():
raise ValueError('Cannot combine --data-parallel and distributed mode')
| [BiEncoderModule->[forward->[context_encoder,cand_encoder],__init__->[super,from_pretrained,BertWrapper]],to_bert_input->[long],BiEncoderRankerAgent->[set_vocab_candidates->[,load_candidates,tqdm,padded_3d,append,print,encode_candidates,save_candidates,get,isfile,len,cat,_vectorize_text,cuda,range],build_model->[BiEncoderModule],_set_text_vec->[surround,force_set,super],encode_candidates->[to_bert_input,cpu,model],score_candidates->[size,bmm,view,squeeze,len,to_bert_input,transpose,mm,t,model,unsqueeze],vectorize_fixed_candidates->[_vectorize_text],init_optim->[get,get_bert_optimizer],add_cmdline_args->[set_defaults,add_common_args],__init__->[DataParallel,is_distributed,get,download,super,ValueError,join,CrossEntropyLoss],share->[super]]] | Initialize the object with a object. | this is good but i'm just noticing that the `self.rank_loss` below is not correct. we should override `build_criterion` instead. |
@@ -333,12 +333,6 @@ EVP_RAND_CTX *EVP_RAND_CTX_new(EVP_RAND *rand, EVP_RAND_CTX *parent)
return NULL;
}
if (parent != NULL) {
- if (!EVP_RAND_enable_locking(parent)) {
- ERR_raise(ERR_LIB_EVP, EVP_R_UNABLE_TO_ENABLE_PARENT_LOCKING);
- CRYPTO_THREAD_lock_free(ctx->refcnt_lock);
- OPENSSL_free(ctx);
- return NULL;
- }
if (!evp_rand_ctx_up_ref(parent)) {
ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
CRYPTO_THREAD_lock_free(ctx->refcnt_lock);
| [No CFG could be retrieved] | This function returns a pointer to an OSSL_RAND object that can be used to Frees the given context object. | Removing this block seems wrong. The parent needs to support locking for a child to safely use it. Do you remember the rationale behind removing this? |
@@ -154,7 +154,7 @@ public class SingleMapBlock
long hashCode;
try {
- hashCode = (long) keyNativeHashCode.invoke(nativeValue);
+ hashCode = (long) mapType.getKeyNativeHashCode().invoke(nativeValue);
}
catch (Throwable throwable) {
throw handleThrowable(throwable);
| [SingleMapBlock->[getLoadedBlock->[getLoadedBlock,SingleMapBlock],getRetainedSizeInBytes->[getRetainedSizeInBytes],toString->[getPositionCount],retainedBytesForEachPart->[getRetainedSizeInBytes]]] | Returns the index of the key in the hash table that matches the given native value. | These invokes seem to repeated throughout the class. Maybe introduce some helper methods. |
@@ -387,6 +387,7 @@ func (a *APIServer) runJob(ctx context.Context, jobInfo *pps.JobInfo, pool *grpc
}
// set the initial values
updateProgress(0)
+ protolion.Infof("Updated initial job state (%v)\n", jobInfo)
for i := 0; i < df.Len(); i++ {
limiter.Acquire()
| [scaleDownWorkers->[PipelineRcName,Get,ReplicationControllers,Update],runJob->[NewHashTree,InputCommits,InspectJob,Unlock,InspectCommit,BuildCommit,NewInfiniteBackOff,Close,NewClientFromURLAndSecret,Clone,Merge,PushObj,Acquire,NewFile,Done,Put,updateJobState,Serialize,New,SetMaxConcurrentStreams,Lock,Errorf,Len,Process,Bytes,CloseAndRecv,WriteFromStreamingBytesClient,Wait,Datum,InspectFile,Release,NewSTM,InspectPipeline,Send,Get,Deserialize,ReadWrite,Chunk,Finish,WithCancel,TrimPrefix,Parse,RetryNotify,GetTag,PutObject],scaleUpWorkers->[GetExpectedNumWorkers,ReplicationControllers,PipelineRcName,Get,Update],jobSpawner->[InspectJob,InspectCommit,AfterFunc,Close,Clone,PipelineRcName,GetByIndex,Done,CreateJob,DurationFromProto,VisitInput,scaleUpWorkers,Errorf,newBranchSetFactory,PachDialOptions,Chan,Next,scaleDownWorkers,NewPool,GetExpectedNumWorkers,ReadOnly,runJob],master->[ReadWrite,Join,Unlock,Infof,NewDLock,NewSTM,Background,WithCancel,NewInfiniteBackOff,Lock,Errorf,RetryNotify,Get,jobSpawner,Put],Error,Contains,NewCommit,Now,TimestampProto] | runJob runs a single job in a given pool. This function is used to process all the data in a single job. process a single n - ary commit InspectFile - inspect a file This function is called by the process of reading the hashtree from the server and reading read all the data from the input commits and build the final state of the job This function is used to run a job in a background. | We don't need a log line to tell us we update progress... we'll be able to see that by checking progress. |
@@ -179,6 +179,8 @@ type client struct {
tsDeadline sync.Map // Same as map[string]chan deadline
// dc-location -> *lastTSO
lastTSMap sync.Map // Same as map[string]*lastTSO
+
+ checkTSDeadlineCh chan struct{}
}
// NewClient creates a PD client.
| [GetAllStores->[leaderClient,GetAllStores],GetLocalTS->[Wait,GetLocalTSAsync],UpdateServiceGCSafePoint->[leaderClient,UpdateServiceGCSafePoint],GetStore->[leaderClient,GetStore],GetPrevRegion->[leaderClient,parseRegionResponse,GetPrevRegion],SplitRegions->[leaderClient,SplitRegions],UpdateGCSafePoint->[leaderClient,UpdateGCSafePoint],Close->[Close,revokeTSORequest],GetRegionFromMember->[parseRegionResponse,GetRegion],GetTS->[GetTSAsync,Wait],GetRegionByID->[leaderClient,parseRegionResponse,GetRegionByID],GetRegion->[leaderClient,parseRegionResponse,GetRegion],ScanRegions->[leaderClient,ScanRegions],scatterRegionsWithOptions->[ScatterRegion,leaderClient,requestHeader],tsLoop->[checkStreamTimeout],scatterRegionsWithGroup->[ScatterRegion,leaderClient],GetOperator->[leaderClient,GetOperator]] | NewClient returns a client for the given number of physical and logical cluster identifiers. c returns a client that can be used to wait for a deadline. | It seems more reasonable to use `context` and `cancel`. |
@@ -45,6 +45,7 @@ namespace System
*/
[MethodImpl(MethodImplOptions.InternalCall)]
+ [PreserveDependency("Ctor(System.Char[])", "System.String")]
public extern String(char[] value);
#if !CORECLR
| [No CFG could be retrieved] | Creates a new string from a char array containing the characters of the current . Construct a string from a char array. | It's interesting that these are necessary. For coreclr, the build system is currently generating an illink xml file containing everything the runtime references, which I expect includes the Ctor methods. I assume then that this is necessary when building the corelib targeting mono? Personally I'd prefer this approach wherever possible instead of having the build generated illink xml file. |
@@ -138,7 +138,7 @@ function gulpClosureCompile(compilerOptions, nailgunPort) {
};
if (compilerOptions.includes('SINGLE_FILE_COMPILATION=true')) {
- // For single-pass compilation, use the default compiler.jar
+ // For single file compilation, use the default compiler.jar
closureCompiler.compiler.JAR_PATH = require.resolve(
'../../node_modules/google-closure-compiler-java/compiler.jar'
);
| [No CFG could be retrieved] | Creates a stream that writes a file relative to the sourcemap. The nailgun - server version of the . | The only place where `SINGLE_FILE_COMPILATION` is set is in `build-system/compile/single-pass.js`. I'm pretty sure this `if/else` block can be replaced with just the contents of the `else` clause. |
@@ -89,9 +89,10 @@ class mailing_fraise extends MailingTargets
*/
function getNbOfRecipients($sql='')
{
+ global $conf;
$sql = "SELECT count(distinct(a.email)) as nb";
$sql .= " FROM ".MAIN_DB_PREFIX."adherent as a";
- $sql .= " WHERE (a.email IS NOT NULL AND a.email != '')";
+ $sql .= " WHERE (a.email IS NOT NULL AND a.email != '') AND aentity IN (".getEntity('member').")";
// La requete doit retourner un champ "nb" pour etre comprise
// par parent::getNbOfRecipients
| [mailing_fraise->[add_to_target->[query,error,transnoentities,num_rows,fetch_object,jdate,url,idate,load],formFilter->[query,trans,num_rows,fetch_object,select_date,load],getSqlArrayForStats->[trans,escape,load]]] | getNbOfRecipients function. | @ptibogxiv replace "aentity" with "entity" ;-) |
@@ -124,8 +124,8 @@
for (uint8_t s = 0; s < strokes; s++)
for (uint8_t i = 0; i < NOZZLE_CLEAN_CIRCLE_FN; i++)
do_blocking_move_to_xy(
- middle.x + sin((M_2_PI / NOZZLE_CLEAN_CIRCLE_FN) * i) * radius,
- middle.y + cos((M_2_PI / NOZZLE_CLEAN_CIRCLE_FN) * i) * radius
+ middle.x + sin((2.0 * M_PI / NOZZLE_CLEAN_CIRCLE_FN) * i) * radius,
+ middle.y + cos((2.0 * M_PI / NOZZLE_CLEAN_CIRCLE_FN) * i) * radius
);
// Let's be safe
| [park->[do_blocking_move_to_z,min,do_blocking_move_to_xy,max],clean->[circle,stroke,zigzag],stroke->[ENABLED,do_blocking_move_to_xy,do_blocking_move_to],circle->[ENABLED,sin,do_blocking_move_to_xy,cos,do_blocking_move_to],zigzag->[ENABLED,FABS,do_blocking_move_to_xy,do_blocking_move_to],ENABLED] | Circle Nozzle Method. | `RADIANS(360)` would probably be the most appropriate. (`(360 * / 180)`) |
@@ -75,7 +75,10 @@ class InternalLinks extends ComplexContentType
$languageCode,
$segmentKey
) {
- $data = json_decode($node->getPropertyValueWithDefault($property->getName(), '{}'), true);
+ $data = $node->getPropertyValueWithDefault($property->getName(), '{}');
+ if (is_string($data)) {
+ $data = json_decode($data, true);
+ }
$this->setData($data, $property, $webspaceKey, $languageCode);
}
| [InternalLinks->[write->[getValue,toArray,getName,setProperty,getIdentifier,getNodesByIdentifier,getSession],readForPreview->[toArray,setData],getContentData->[getData],read->[getPropertyValueWithDefault,getName,setData],setData->[getParams,setValue,getDefaultParams],remove->[remove]]] | Reads a node s data from JSON. | Why is this necessary? Looks to me like the data is stored in different ways, which should absolutely not be the case. |
@@ -264,6 +264,11 @@ func (repo *Repository) HTMLURL() string {
return setting.AppURL + repo.FullName()
}
+// APIURL returns the repository API URL
+func (repo *Repository) APIURL() string {
+ return strings.TrimRight(setting.AppURL, "/") + "/" + path.Join("api/v1/repos", repo.FullName())
+}
+
// APIFormat converts a Repository to api.Repository
func (repo *Repository) APIFormat(mode AccessMode) *api.Repository {
cloneLink := repo.CloneLink()
| [CreateNewBranch->[LocalCopyPath,UpdateLocalCopyBranch],GetUnit->[getUnits],Link->[FullName],mustOwner->[getOwner],RepoPath->[repoPath],APIFormat->[HTMLURL,FullName,APIFormat],CloneLink->[cloneLink],SavePatch->[PatchPath],GetAssignees->[getAssignees],RelLink->[FullName],FullName->[MustOwner],GetOwner->[getOwner],repoPath->[mustOwner],AllowsPulls->[CanEnablePulls,EnableUnit],UpdateLocalCopyBranch->[LocalCopyPath,RepoPath],PatchPath->[GetOwner],cloneLink->[MustOwner],GitConfigPath->[RepoPath],getAssignees->[getOwner],ComposeCompareURL->[MustOwner],EnableUnit->[getUnits],ComposeMetas->[MustOwner,GetUnit],HTMLURL->[FullName],GitConfigPath,LocalCopyPath,RepoPath,deleteWiki,repoPath,GetOwner,CloneLink,getOwner] | HTMLURL returns a string representation of the repository. | Support `setting.AppURL` include end slash or not |
@@ -375,7 +375,7 @@ public abstract class SeekableStreamIndexTaskRunner<PartitionIdType, SequenceOff
// Sanity checks.
if (!restoredNextPartitions.getStream().equals(ioConfig.getStartPartitions().getStream())) {
throw new ISE(
- "WTF?! Restored stream[%s] but expected stream[%s]",
+ "WTF?! Restored topic[%s] but expected topic[%s]",
restoredNextPartitions.getStream(),
ioConfig.getStartPartitions().getStream()
);
| [SeekableStreamIndexTaskRunner->[getUnparseableEvents->[authorizationCheck],resume->[isPaused],pause->[isPaused],getStartTime->[authorizationCheck],stop->[authorizationCheck,stopGracefully],getEndOffsetsHTTP->[authorizationCheck],pauseHTTP->[authorizationCheck],setEndOffsetsHTTP->[authorizationCheck],resumeHTTP->[authorizationCheck],maybePersistAndPublishSequences->[publishAndRegisterHandoff],persistSequences->[getSequencesPersistFile],restoreSequences->[getSequencesPersistFile],getCurrentOffsets->[authorizationCheck,getCurrentOffsets],setEndOffsets->[persistSequences,isPaused,setEndOffsets],getRowStats->[authorizationCheck],getCheckpointsHTTP->[authorizationCheck],getStatusHTTP->[authorizationCheck],sendResetRequestAndWait->[requestPause]]] | This method is called when the task is starting up. Create a new sequence sequence sequence and record for the given sequence. This method is called when the next partition of the stream has been restored. | IIRC, the term `stream` was used intentionally in #6431 because the author thought it's a more generic term to represent both Kafka topic and Kinesis stream. This `stream` is used in other places in Druid too. |
@@ -154,7 +154,7 @@ class Application extends BaseApplication
*/
private function getNewWorkingDir(InputInterface $input)
{
- $workingDir = $input->getParameterOption(array('--working-dir', '-d'));
+ $workingDir = $input->getParameterOption(['--working-dir', '-d']);
if (false !== $workingDir && !is_dir($workingDir)) {
throw new \RuntimeException('Invalid working directory specified.');
}
| [Application->[getLongVersion->[getVersion,getName],getDefaultInputDefinition->[addOption],getNewWorkingDir->[getParameterOption],renderException->[writeln,get,getComposer,getConfig],getComposer->[getErrors,getMessage,write],doRun->[getHelperSet,setInteractive,hasParameterOption,getCommandName,getVerbosity,getNewWorkingDir,has,writeln,add,enableDebugging],getDefaultHelperSet->[set]]] | Get the new working directory. | php 5.4 only, and composer needs to be able to run on 5.3s (a bother, I know) |
@@ -9,6 +9,11 @@ class PinpointSupportedCountries
PINPOINT_SMS_URL = 'https://docs.aws.amazon.com/pinpoint/latest/userguide/channels-sms-countries.html'.freeze
PINPOINT_VOICE_URL = 'https://docs.aws.amazon.com/pinpoint/latest/userguide/channels-voice-countries.html'.freeze
+ # The list of countries where we have our sender ID registered
+ SENDER_ID_COUNTRIES = %w[
+ PH
+ ].to_set.freeze
+
CountrySupport = Struct.new(
:iso_code,
:name,
| [PinpointSupportedCountries->[digits_only?->[to_s],load_country_dialing_codes->[new,supports_voice,iso_code,country_code,reduce,raise,name_to_iso_code,phone_data,supports_sms,remap_iso_code,name,map],merge->[merge,new,to_h],country_code->[digits_only?],download->[print,body,puts,get],run->[raise,to_h,size,keys],remap_iso_code->[fetch],trim_trailing_digits_spaces->[gsub],voice_support->[trim_trailing_digits_spaces,new,map],sms_support->[trim_trailing_digits_spaces,new,map],TableConverter->[convert->[to_h,text,first,each,map],attr_reader],freeze,new],require] | Creates a new instance of the class with all the attributes of the object. returns an Array of CountrySupport objects for all the country - specific records in the SMS config. | idk if source code is the best place to leave this, but seeing as the rest of our configs are in source code, might as well leave it. open to suggestions for better spots! |
@@ -339,7 +339,7 @@ class TokenNetwork:
self._new_channel_postconditions(
partner=partner, block=receipt_or_none["blockNumber"]
)
- raise RaidenUnrecoverableError("creating new channel failed")
+ raise RaidenUnrecoverableError("Creating new channel failed.")
channel_identifier: ChannelID = self._detail_channel(
participant1=self.node_address, participant2=partner, block_identifier="latest"
| [TokenNetwork->[all_events_filter->[events_filter],_check_channel_state_before_settle->[_detail_channel],update_transfer->[chain_id,_detail_participant,raise_on_call_returned_empty,_detail_channel],safety_deprecation_switch->[safety_deprecation_switch],new_netting_channel->[raise_if_invalid_address_pair],_set_total_deposit->[channel_participant_deposit_limit,token_network_deposit_limit,safety_deprecation_switch,_detail_participant],_check_channel_state_after_settle->[_check_channel_state_before_settle],_check_for_outdated_channel->[_detail_channel],_set_total_withdraw->[_detail_channel,_detail_participant],close->[chain_id,raise_on_call_returned_empty,_detail_channel],detail_participants->[ParticipantsDetails,get_channel_identifier,_detail_participant],unlock->[_detail_participant,raise_on_call_returned_empty,_detail_channel],channel_participant_deposit_limit->[channel_participant_deposit_limit],set_total_withdraw->[chain_id,_detail_participant,raise_on_call_returned_empty,_detail_channel],settle->[_settle_preconditions],settlement_timeout_max->[settlement_timeout_max],set_total_deposit->[raise_on_call_returned_empty,channel_participant_deposit_limit,token_network_deposit_limit,safety_deprecation_switch,_detail_participant,_detail_channel],token_network_deposit_limit->[token_network_deposit_limit],_get_channel_state->[_detail_channel],detail->[token_address,ChannelDetails,chain_id,detail_participants,_detail_channel],_detail_participant->[raise_if_invalid_address_pair,ParticipantDetails],_unlock->[_detail_channel,_detail_participant],get_channel_identifier->[raise_if_invalid_address_pair],_update_transfer->[_detail_participant,_detail_channel],_detail_channel->[raise_if_invalid_address_pair,get_channel_identifier,ChannelData],can_transfer->[channel_is_opened,_detail_participant],_close->[_detail_channel,_detail_participant],settlement_timeout_min->[settlement_timeout_min],_new_netting_channel->[_new_channel_postconditions]]] | Creates a new channel with the given parameters. | please, use the block hash for the mined transaction, not latest. |
@@ -428,6 +428,11 @@ def callable_type(fdef: FuncItem, fallback: Instance,
column=fdef.column,
implicit=True,
)
+ if no_self and typ.arg_types:
+ typ = typ.copy_modified(arg_types=typ.arg_types[1:],
+ arg_kinds=typ.arg_kinds[1:],
+ arg_names=typ.arg_names[1:])
+ return typ
def try_getting_str_literals(expr: Expression, typ: Type) -> Optional[List[str]]:
| [true_only->[true_only,make_simplified_union],bind_self->[expand,bind_self],map_type_from_supertype->[tuple_fallback],false_only->[make_simplified_union,false_only],erase_to_union_or_bound->[make_simplified_union],erase_def_to_union_or_bound->[make_simplified_union],true_or_false->[make_simplified_union,true_or_false]] | Returns the callable type for a given function item. Returns a list of strings that can be used to generate a sequence of strings. | Can we use `bind_self` here? |
@@ -1004,6 +1004,8 @@ define([
boundingVolume.radius += size + offset;
}
+ var writers = [];
+
/**
* Called when {@link Viewer} or {@link CesiumWidget} render the scene to
* get the draw commands needed to render this primitive.
| [No CFG could be retrieved] | Creates a collection of all the billboards that are attached to the camera. Load all the texture atlas if not defined. | Sorry to bother with local variable names, but can we include `scratch` in this like we do everywhere else? |
@@ -313,11 +313,11 @@ namespace System
=> (byte)BitOperations.PopCount(value);
[RequiresPreviewFeatures]
- static byte IBinaryInteger<byte>.RotateLeft(byte value, byte rotateAmount)
+ static byte IBinaryInteger<byte>.RotateLeft(byte value, int rotateAmount)
=> (byte)((value << (rotateAmount & 7)) | (value >> ((8 - rotateAmount) & 7)));
[RequiresPreviewFeatures]
- static byte IBinaryInteger<byte>.RotateRight(byte value, byte rotateAmount)
+ static byte IBinaryInteger<byte>.RotateRight(byte value, int rotateAmount)
=> (byte)((value >> (rotateAmount & 7)) | (value << ((8 - rotateAmount) & 7)));
[RequiresPreviewFeatures]
| [Byte->[Parse->[Byte,Parse],Max->[Max],ToDouble->[ToDouble],ToInt64->[ToInt64],PopCount->[PopCount],Clamp->[Clamp],ToBoolean->[ToBoolean],ToSingle->[ToSingle],ToUInt32->[ToUInt32],LeadingZeroCount->[LeadingZeroCount],ToDecimal->[ToDecimal],ToUInt64->[ToUInt64],ToChar->[ToChar],IsPow2->[IsPow2],Min->[Min],ToInt32->[ToInt32],ToInt16->[ToInt16],TypeCode->[Byte],TryParse->[TryParse],ToUInt16->[ToUInt16],TrailingZeroCount->[TrailingZeroCount],Log2->[Log2],ToSByte->[ToSByte],DivRem->[DivRem]]] | A sequence of bits that can be used to rotate a byte value left or right. | This was a mistake in the interface definition? |
@@ -599,7 +599,7 @@ bool WalletImpl::open(const std::string &path, const std::string &password)
// Rebuilding wallet cache, using refresh height from .keys file
m_rebuildWalletCache = true;
}
- m_wallet->set_ring_database(get_default_ringdb_path());
+ m_wallet->get_ring_database();
m_wallet->load(path, password);
m_password = password;
| [recoverFromKeysWithPassword->[LOG_PRINT_L1],store->[store],doInit->[daemonBlockChainHeight,init,setTrustedDaemon,isNewWallet,daemonSynced],doRefresh->[daemonSynced,refresh,getListener],rescanSpent->[trustedDaemon,clearStatus],daemonSynced->[daemonBlockChainTargetHeight,daemonBlockChainHeight],close->[LOG_PRINT_L1],createSweepUnmixableTransaction->[status],createTransaction->[,status],open->[get_default_ringdb_path],daemonBlockChainTargetHeight->[daemonBlockChainHeight],recover->[recover],parse_uri->[parse_uri],isNewWallet->[watchOnly,blockChainHeight],loadUnsignedTx->[,status,errorString],amountFromDouble->[amountFromString],LOG_PRINT_L1->[LOG_PRINT_L1],balance->[balance],setListener->[setListener],path->[path]] | Opens a wallet with the given path and password. | That does nothing. Is this intended ? |
@@ -440,6 +440,15 @@ int X509_CRL_check_suiteb(X509_CRL *crl, EVP_PKEY *pk, unsigned long flags)
}
#endif
+
+static X509 *x509upref(X509 *x)
+{
+ if (!X509_up_ref(x))
+ return NULL;
+
+ return x;
+}
+
/*
* Not strictly speaking an "up_ref" as a STACK doesn't have a reference
* count but it has the same effect by duping the STACK and upping the ref of
| [X509_chain_check_suiteb->[X509_get0_pubkey],X509_find_by_subject->[X509_get_subject_name,X509_NAME_cmp],X509_find_by_issuer_and_serial->[X509_issuer_and_serial_cmp],X509_check_private_key->[X509_get0_pubkey]] | - - - - - - - - - - - - - - - - - -. | I'm not a big fan of pretending that we're not modifying the original, and have to wonder how the compiler might optimize it. |
@@ -102,6 +102,13 @@ $yform->checkbox( 'enablexmlsitemap', __( 'Check this box to enable XML sitemap
</div>
+ <div id="exclude-post" class="wpseotab">
+ <?php
+ echo '<p>' . sprintf( __( 'You can exclude posts from the sitemap by entering a comma separated string with the Post ID\'s. The format will become something like: %1$s.', 'wordpress-seo' ), '<code>1,2,99,100</code>' ) . '</p>';
+ $yform->textinput( 'excluded-posts', __( 'Post to exclude', 'wordpress-seo' ) );
+ ?>
+ </div>
+
<div id="taxonomies" class="wpseotab">
<?php
| [checkbox,admin_header,admin_footer,textinput] | Check the user - role - not_in_sitemap checkboxes for all objects. Show the administration of the . | If you `echo` multiple values you should use `,`s instead of `.`s |
@@ -178,7 +178,16 @@ func (issue *Issue) loadPullRequest(e Engine) (err error) {
}
return fmt.Errorf("getPullRequestByIssueID [%d]: %v", issue.ID, err)
}
- issue.PullRequest.Issue = issue
+ err = issue.PullRequest.LoadIssue()
+ if err != nil {
+ return fmt.Errorf("LoadIssue: %v", err)
+ }
+ }
+ if issue.PullRequest != nil && issue.PullRequest.Issue == nil {
+ issue.PullRequest.LoadIssue()
+ if err != nil {
+ return fmt.Errorf("LoadIssue: %v", err)
+ }
}
return nil
}
| [DiffURL->[HTMLURL],ChangeStatus->[changeStatus,loadRepo,loadPoster],loadAttributes->[loadPullRequest,loadTotalTimes,loadRepo,loadLabels,loadAttributes,isTimetrackerEnabled,loadPoster,loadComments,loadReactions],ClearLabels->[loadPullRequest,loadRepo,clearLabels],ReplaceLabels->[removeLabel,addLabels,loadLabels],APIURL->[APIURL],isTimetrackerEnabled->[loadRepo,IsTimetrackerEnabled],clearLabels->[getLabels,removeLabel],BlockedByDependencies->[getBlockedByDependencies],changeStatus->[getLabels],PatchURL->[HTMLURL],BlockingDependencies->[getBlockingDependencies],ChangeTitle->[loadRepo],HasLabel->[hasLabel],LoadAttributes->[loadAttributes],LoadPullRequest->[loadPullRequest],apiFormat->[loadPullRequest,loadRepo,loadLabels,State,APIURL,APIFormat,loadPoster],ResolveMentionsByVisibility->[loadRepo],HTMLURL->[HTMLURL],addLabel,setupSession,LoadAttributes,loadAttributes,loadPoster] | loadPullRequest loads the pull request from the given issue. | Why we need reload issue? |
@@ -1,7 +1,7 @@
module Articles
module Feeds
class Basic
- def initialize(user: nil, number_of_articles: 25, page: 1, tag: nil)
+ def initialize(user: nil, number_of_articles: Article::DEFAULT_FEED_PAGINATION_WINDOW_SIZE, page: 1, tag: nil)
@user = user
@number_of_articles = number_of_articles
@page = page
| [Basic->[default_home_feed->[cached_blocked_ids_for_blocker,reverse!,not,id,includes],initialize->[new],delegate]] | Initializes the object with the given parameters. | This is a notable change for the `Articles::Feeds::Basic`, could someone provide context as to why I may not want this to be 50? Perhaps @benhalpern or someone from SRE? |
@@ -156,7 +156,8 @@ public class SqlAnalyzer {
"Failed to define function %s", String.join(".", createFunctionStmt.getNamePath())),
e);
}
- } else if (resolvedStatement.nodeKind() != RESOLVED_QUERY_STMT) {
+ } else if (resolvedStatement.nodeKind() != RESOLVED_QUERY_STMT
+ && resolvedStatement.nodeKind() != RESOLVED_CREATE_TABLE_FUNCTION_STMT) {
throw new UnsupportedOperationException(
"Unrecognized statement type " + resolvedStatement.nodeKindString());
}
| [SqlAnalyzer->[extractTableNames->[isEndOfInput],Builder->[analyze->[analyze],build->[SqlAnalyzer]],initAnalyzerOptions->[initAnalyzerOptions],analyzeNextStatement->[analyzeNextStatement]]] | Analyze the next statement in the sequence. | We should check set membership instead to make this more readable/scalable. |
@@ -108,10 +108,11 @@ def train(use_cuda, save_dirname):
feed_order=['img', 'label'])
-def infer(use_cuda, save_dirname=None):
+def infer(use_cuda, inference_program, save_dirname=None):
place = fluid.CUDAPlace(0) if use_cuda else fluid.CPUPlace()
- inferencer = fluid.Inferencer(param_path=save_dirname, place=place)
+ inferencer = fluid.Inferencer(
+ infer_func=inference_program, param_path=save_dirname, place=place)
batch_size = 1
tensor_img = numpy.random.uniform(-1.0, 1.0,
| [train->[train],train_program->[inference_program],infer->[infer],main->[train,infer],main] | Infer a single from a random tensor. | `test_recognize_digits_conv ` fails on this line. |
@@ -5,14 +5,15 @@ require_relative 'base'
module Engine
module Ability
class Token < Base
- attr_reader :hexes, :price, :teleport_price, :extra, :from_owner
+ attr_reader :hexes, :price, :teleport_price, :extra, :from_owner, :discount
- def setup(hexes:, price:, teleport_price: nil, extra: nil, from_owner: nil)
+ def setup(hexes:, price: nil, teleport_price: nil, extra: nil, from_owner: nil, discount: nil)
@hexes = hexes
@price = price
@teleport_price = teleport_price
@extra = extra || false
@from_owner = from_owner || false
+ @discount = discount
end
end
end
| [Token->[attr_reader],require_relative] | Initialize a new object with the given parameters. | why did you change price? |
@@ -112,6 +112,15 @@ class SdkHarness(object):
data_channel_factory=self._data_channel_factory,
fns=self._fns)
+ if status_address:
+ try:
+ self._status_handler = FnApiWorkerStatusHandler(
+ status_address, self._bundle_processor_cache)
+ except Exception:
+ traceback_string = traceback.format_exc()
+ _LOGGER.info('Error creating worker status request handler, skipping '
+ 'status report. Trace back: %s' % traceback_string)
+
# TODO(BEAM-8998) use common UnboundedThreadPoolExecutor to process bundle
# progress once dataflow runner's excessive progress polling is removed.
self._report_progress_executor = futures.ThreadPoolExecutor(max_workers=1)
| [_Future->[wait->[wait],set->[set],get->[wait],done->[_Future,set]],CachingStateHandler->[process_instruction_id->[process_instruction_id],blocking_get->[get],done->[done],clear->[clear],extend->[extend,get,append_raw],_materialize_iter->[get_raw]],BundleProcessorCache->[lookup->[get]],GrpcStateHandler->[start->[request_iter->[get],start,request_iter],_blocking_request->[_request,get]],GrpcStateHandlerFactory->[close->[clear]],SdkWorker->[process_bundle_progress->[_log_lull_in_bundle_processor,lookup],register->[register],finalize_bundle->[discard,lookup,release,finalize_bundle],process_bundle_split->[lookup],process_bundle->[discard,process_bundle,get,release]],SdkHarness->[_request_register->[_execute],run->[get_responses],_request_execute->[task->[_execute]],_request_process_bundle_action->[task->[_execute]]]] | Initialize the object. Initializes SDKHarness with unbounded number of workers. | Let's move it in `sdk_worker_main` where we keep other reporting related code. |
@@ -711,7 +711,8 @@ if ($resql)
if (! empty($arrayfields['p.ref']['checked']))
{
print '<td class="tdoverflowmax200">';
- print $product_static->getNomUrl(1);
+ $pagination = 'page='.$page.'&limit='.$limit.'&contextpage='.$contextpage.'&type='.$type.'&search_type='.$search_type.'&sortfield='.$sortfield.'&sortorder='.$sortorder;
+ print $product_static->getNomUrl(1,'',0,-1,$pagination);
print "</td>\n";
if (! $i) $totalarray['nbfield']++;
}
| [selectMassAction,fetch_object,order,selectyesno,getNomUrl,print_all_ways,selectarray,display_price_product_fournisseur,initHooks,find_min_price_product_fournisseur,load,plimit,executeHooks,loadLangs,select_categories,LibStatut,escape,getDefaultLang,showCheckAddButtons,close,textwithpicto,load_stock,free,query,fetch_name_optionals_label,getCanvas,list_product_fournisseur_price,trans,num_rows,getOptionalsFromPost,multiSelectArrayWithCheckbox,showFilterButtons] | Package private methods This function checks if a ref supplier is checked and if so returns it. | What is goal of this ? Fix a bug ? Can you describe how to reproduce ? |
@@ -149,7 +149,7 @@ async def setup(
return Setup(process_request)
-@rule(name="Format using Black")
+@named_rule(name="black_fmt", desc="Format using Black", rule_type=NamedRuleType("format"))
async def fmt(formatter: BlackFormatter, black: Black) -> FmtResult:
if black.options.skip:
return FmtResult.noop()
| [rules->[rules],fmt->[SetupRequest],setup->[generate_args,Setup],lint->[SetupRequest]] | Format the node ID. | The `rule_type` seems redundant, since it should already be possible to determine it by looking for "subgraph of a union" to determine whether some rule is providing a particular capability. To the extent that we're not actually recording unions in the rule graph, we should probably do that rather than adding a separate "type" argument. |
@@ -106,7 +106,14 @@ class ShareLeaseClient(LeaseClientBase):
lease_id=self.id,
timeout=kwargs.pop('timeout', None),
cls=return_response_headers,
+ **kwargs) if isinstance(self._client, FileOperations) \
+ else await self._client.renew_lease(
+ lease_id=self.id,
+ timeout=kwargs.pop('timeout', None),
+ sharesnapshot=self.snapshot,
+ cls=return_response_headers,
**kwargs)
+
except StorageErrorException as error:
process_storage_error(error)
self.etag = response.get('etag') # type: str
| [ShareLeaseClient->[change->[get,process_storage_error,pop,change_lease],__enter__->[TypeError],__exit__->[release],break_lease->[pop,get,break_lease,process_storage_error],__aexit__->[release],release->[get,pop,process_storage_error,release_lease],acquire->[get,acquire_lease,pop,process_storage_error]],TypeVar] | Releases the lease for this file. | this is calling a wrong api |
@@ -408,8 +408,12 @@ namespace Microsoft.Xna.Framework.Content
}
else if ((typeof(T) == typeof(SoundEffect)))
{
+#if ANDROID
+ return new SoundEffect(assetName);
+#else
using (Stream s = TitleContainer.OpenStream(assetName))
return SoundEffect.FromStream(s);
+#endif
}
else if ((typeof(T) == typeof(Video)))
{
| [ContentManager->[ReloadAsset->[Dispose],T->[Dispose],ContentReader->[Dispose],Normalize->[Normalize],Unload->[Dispose],Dispose->[RemoveContentManager,Dispose],AddContentManager]] | read an asset from the device. | I'd rather not see this change here. The problem is that Android needs `SoundEffect.FromStream()` supported... we should fix it there. |
@@ -39,6 +39,7 @@ import java.util.*;
/**
* Notebook repository sync with remote storage
*/
+@Immediate
public class NotebookRepoSync implements NotebookRepoWithVersionControl {
private static final Logger LOGGER = LoggerFactory.getLogger(NotebookRepoSync.class);
private static final int maxRepoNum = 2;
| [NotebookRepoSync->[deleteNotes->[remove],setNoteRevision->[setNoteRevision,getRepoCount,isRevisionSupportedInRepo,getMaxRepoNum],get->[get,isRevisionSupportedInDefaultRepo],remove->[remove],pushNotes->[save,get],close->[close],move->[move],notesCheckDiff->[get],checkpoint->[getRepoCount,isRevisionSupportedInRepo,get,checkpoint,getMaxRepoNum],sync->[sync,get],init->[init],save->[save],list->[list],isRevisionSupportedInRepo->[getRepo],revisionHistory->[isRevisionSupportedInDefaultRepo,revisionHistory],getSettings->[getSettings],getRepo->[get,getRepoCount],convertNoteFiles->[init],updateSettings->[updateSettings]]] | Package private for testing purposes. Initializes the object with the given configuration. | What is this annotation used for ? |
@@ -472,6 +472,8 @@ class Convai2EvalWorld(MultiAgentDialogWorld):
acts[0]['message_id'][-1] != '0' else \
acts[0]['message_id'][:-1] + '1'
self.dialog.append((idx, acts[idx]['text']))
+ if 'reranked_samples' in acts[idx]:
+ self.reranked_cands.append((idx, acts[idx]['reranked_samples']))
time.sleep(len(acts[idx]['text'].split(' ')) * 0.5)
agent.observe(acts[idx])
| [Convai2EvalWorld->[shutdown->[shutdown_agent->[shutdown]],check_timeout->[get_instruction],save_data->[push_persona]],PersonasGenerator->[pop_persona->[add_idx_stack]],PersonaProfileWorld->[parley->[pop_persona,push_persona,save_idx_stack]]] | parley - parley - parley Returns a sequence of all agents that have a non - zero value. This function observes the user - agent and its agents. This function is called by the user when a user enters a missing or missing node in observe - observes the user - specified in the model agent and the agent. | as discussed, may want to take this out |
@@ -150,6 +150,8 @@ class CsNetfilters(object):
new_rule.set_table(fw[0])
if isinstance(fw[1], int):
new_rule.set_count(fw[1])
+
+ logging.debug("Checking if the rule already exists: rule=%s table=%s chain=%s", new_rule.get_rule(), new_rule.get_table(), new_rule.get_chain())
if self.has_rule(new_rule):
logging.debug("Exists: rule=%s table=%s", fw[2], new_rule.get_table())
else:
| [CsNetfilter->[__eq__->[get_chain,get_rule,get_table]],CsNetfilters->[compare->[has_rule,get,get_unseen],add_chain->[has_chain,add],get_all_rules->[get_count,last,add_rule,add],has_table->[get],__init__->[CsChain,CsTable],has_chain->[has_chain],has_rule->[get_count,get]]] | Compare reality with what is needed. | is this log-line helpful during dev only? |
@@ -879,6 +879,11 @@ class Commande extends CommonOrder
// $date_commande is deprecated
$date = ($this->date_commande ? $this->date_commande : $this->date);
+ if (empty($this->warehouse_id) || $this->warehouse_id = -1){
+ if (!empty($conf->global->MAIN_DEFAULT_WAREHOUSE)) $this->warehouse_id = $conf->global->MAIN_DEFAULT_WAREHOUSE;
+ if (!empty($conf->global->MAIN_DEFAULT_WAREHOUSE_USER) && $user->fk_warehouse > -1) $this->warehouse_id = $user->fk_warehouse;
+ }
+
// Multicurrency (test on $this->multicurrency_tx because we should take the default rate only if not using origin rate)
if (!empty($this->multicurrency_code) && empty($this->multicurrency_tx)) list($this->fk_multicurrency, $this->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($this->db, $this->multicurrency_code, $date);
else $this->fk_multicurrency = MultiCurrency::getIdFromCode($this->db, $this->multicurrency_code);
| [Commande->[valid->[getNextNumRef],deleteline->[fetch],insert_discount->[fetch],getLinesArray->[fetch_lines],info->[fetch],updateline->[fetch],fetch_lines->[fetch],createFromClone->[create],createFromProposal->[valid,create],getNomUrl->[getLibStatut],delete->[nb_expedition]]] | Create a new object in the system Fetches company from database SQL to get the list of all records in the sequence that are not null. create a new object in DB This function converts a line of data into an object. | $this->warehouse_id = -1 is surely a bug. == ? |
@@ -199,14 +199,15 @@ class Jetpack_Debugger {
</div>
<hr />
<div id="sync-related-posts">
- <p><?php echo esc_html__( 'Some features of Jetpack use the WordPress.com infrastructure and require that your public content be mirrored there. If you see intermittent issues only affecting certain posts, please try requesting a reindex of your posts.', 'jetpack' ); ?></p>
- <?php echo Jetpack::init()->sync->reindex_ui() ?>
+ <p><?php echo esc_html__( 'Some features of Jetpack uses the WordPress.com infrastructure and requires that your public content be mirrored there. If you see intermittent issues only affecting certain posts, please try requesting a reindex of your posts.', 'jetpack' ); ?></p>
+
+ <?php echo Jetpack_Sync_Reindex::reindex_ui(); ?>
</div>
<?php endif; ?>
</div>
<div id="contact-message" <?php if( ! isset( $_GET['contact'] ) ) {?> style="display:none" <?php } ?>>
<?php if ( self::is_jetpack_support_open() ): ?>
- <form id="contactme" method="post" action="http://jetpack.com/contact-support/">
+ <form id="contactme" method="post" action="https://jetpack.com/contact-support/">
<input type="hidden" name="action" value="submit">
<input type="hidden" name="jetpack" value="needs-service">
| [Jetpack_Debugger->[jetpack_debug_display_handler->[get_error_message,get,reindex_ui,exists]]] | This function is a debug display handler that displays the options of the Jetpack. Debug info about the network This test tests the Jetpack connection. This is a hack to work around the bug in Jetpack. | This is overwriting a change that was made in b4bc0ed4b768869433e1994da11a59b773701301 |
@@ -1,7 +1,6 @@
<?php
-
/*
- * LibreNMS
+ * Librenms
*
* Copyright (c) 2014 Neil Lathwood <https://github.com/laf/ http://www.lathwood.co.uk/fa>
*
| [No CFG could be retrieved] | This function returns a string with the description of the nms - nms - nms Get a list of messages from the log. | Really petty but this should still be `LibreNMS` |
@@ -375,7 +375,7 @@ var ProductMetadataJSON = `
}
],
"deleted_packages": [
- "chef/data-lifecycle-service/0.0.1/20190816162731"
+ "chef/data-lifecycle-service/0.0.1/20191101111721"
],
"collections": [
{
| [No CFG could be retrieved] | The chef - automate - plugin - manager metadata object. Order of packages in order to be able to run a service in order to run a service. | I guess we forgot to run `make generate` at some point. |
@@ -40,6 +40,11 @@ func (node *Node) getNeighborPeers(neighbor *sync.Map) []p2p.Peer {
return tmp
}
+// GetSync gets sync-ed to blockchain without joining consensus
+func (node *Node) GetSync() {
+ go node.DoSyncing(node.blockchain, node.Worker, node.GetSyncingPeers, false) //Don't join consensus
+}
+
// GetBeaconSyncingPeers returns a list of peers for beaconchain syncing
func (node *Node) GetBeaconSyncingPeers() []p2p.Peer {
return node.getNeighborPeers(&node.BeaconNeighbors)
| [GetBeaconSyncingPeers->[getNeighborPeers],DoBeaconSyncing->[GetBeaconSyncingPeers],GetSyncingPeers->[getNeighborPeers],SupportSyncing->[DoSyncing],SupportBeaconSyncing->[DoBeaconSyncing]] | getNeighborPeers returns a slice of peers that are connected to the given neighbor. | GetSync is not good naming. DoSyncing is better. |
@@ -47,7 +47,10 @@ class PyNumpy(PythonPackage):
# FIXME: numpy._build_utils and numpy.core.code_generators failed to import
# FIXME: Is this expected?
-
+
+ version('1.14.2', '080f01a19707cf467393e426382c7619')
+ version('1.14.1', 'b8324ef90ac9064cd0eac46b8b388674')
+ version('1.14.0', 'c12d4bf380ac925fcdc8a59ada6c3298')
version('1.13.3', '300a6f0528122128ac07c6deb5c95917')
version('1.13.1', '2c3c0f4edf720c3a7b525dacc825b9ae')
version('1.13.0', 'fd044f0b8079abeaf5e6d2e93b2c1d03')
| [PyNumpy->[setup_dependent_package->[join_path,system,machine,spec,format],build_args->[str,Version],install_test->[working_dir,python],patch->[LibraryList,system,write,satisfies,mac_ver,join,open],variant,depends_on,version]] | Creates a new object. Setup dependent package. | This line still has spaces at the beginning. You should be able to configure your text editor to automatically remove trailing whitespace. |
@@ -79,6 +79,9 @@ func (g *GiteaASTTransformer) Transform(node *ast.Document, reader text.Reader,
}
link = []byte(giteautil.URLJoin(pc.Get(urlPrefixKey).(string), lnk))
}
+ if len(link) > 0 && link[0] == '#' {
+ link = []byte("#user-content-" + string(link)[1:])
+ }
v.Destination = link
}
return ast.WalkContinue, nil
| [RegisterFuncs->[Register],GenerateWithDefault->[HasPrefix,Sprintf,CleanValue,BytesToReadOnlyString],Transform->[AppendChild,URLJoin,NewLink,IsLink,Replace,Parent,ReplaceChild,Get,HasPrefix,Walk],Generate->[GenerateWithDefault],renderTaskCheckBox->[WriteString],Put->[BytesToReadOnlyString],NewConfig,SetHTMLOption] | Transform transforms an ast. Document into a Gitea AST. link is a link a hash link or mailto. | The `if` can be rearranged with the code above so the conditions are only checked once (e.g. `len(link)>0` and `link[0]=='#'`) |
@@ -326,10 +326,14 @@ $GLOBALS['wp_locale'] = new WP_Locale();
// Load the functions for the active theme, for both parent and child theme if applicable.
global $pagenow;
if ( ! defined( 'WP_INSTALLING' ) || 'wp-activate.php' === $pagenow ) {
- if ( TEMPLATEPATH !== STYLESHEETPATH && file_exists( STYLESHEETPATH . '/functions.php' ) )
- include( STYLESHEETPATH . '/functions.php' );
- if ( file_exists( TEMPLATEPATH . '/functions.php' ) )
- include( TEMPLATEPATH . '/functions.php' );
+ if ( !Utils\is_theme_skipped( TEMPLATEPATH ) ) {
+ if ( !Utils\is_theme_skipped( TEMPLATEPATH ) ) {
+ if ( TEMPLATEPATH !== STYLESHEETPATH && file_exists( STYLESHEETPATH . '/functions.php' ) )
+ include( STYLESHEETPATH . '/functions.php' );
+ if ( file_exists( TEMPLATEPATH . '/functions.php' ) )
+ include( TEMPLATEPATH . '/functions.php' );
+ }
+ }
}
do_action( 'after_setup_theme' );
| [init] | Setup the WordPress roles and locale objects. Initialize the . | Er, do we really need this conditional twice ? |
@@ -150,6 +150,7 @@ QueryData genRpmPackages(QueryContext& context) {
r["size"] = getRpmAttribute(header, RPMTAG_SIZE, td);
r["sha1"] = getRpmAttribute(header, RPMTAG_SHA1HEADER, td);
r["arch"] = getRpmAttribute(header, RPMTAG_ARCH, td);
+ r["epoch"] = getRpmAttribute(header, RPM_EPOCH, td);
rpmtdFree(td);
results.push_back(r);
| [No CFG could be retrieved] | Get the list of all the package - specific RPM records. Query for RPM package files. | Looks like you've caught some other code changes up in this? Perhaps try rebasing first before we move forward to ensure you're only modifying the certificates table. |
@@ -52,6 +52,14 @@ module TwoFactorAuthenticatableMethods # rubocop:disable Metrics/ModuleLength
redirect_to after_otp_verification_confirmation_url
end
+ def check_aal3_bypass
+ return unless aal3_policy.aal3_configured_and_required?
+ method = two_factor_authentication_method
+ return if AAL3Policy::AAL3_METHODS.include? method
+ aal3_redirect = aal3_redirect_url(current_user)
+ redirect_to aal3_redirect || aal3_required_url
+ end
+
def reset_attempt_count_if_user_no_longer_locked_out
return unless decorated_user.no_longer_locked_out?
| [handle_invalid_otp->[handle_second_factor_locked_user],generic_data->[personal_key_unavailable?],phone_configuration->[phone_configuration]] | check_already_authenticated - checks if user has already authenticated a node and if so. | If `aal3_redirect` is nil (i.e., they don't have a configured aal3 option) then they should be redirected to `two_factor_options_url`. `aal3_required_url` is the dead-end andI think we can get rid of the aal3_controller all together. |
@@ -379,6 +379,17 @@ class MouvementStock extends CommonObject
$movestock = 0;
if ($product->type != Product::TYPE_SERVICE || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) $movestock = 1;
+ // check unicity for serial numbered equipments ( different for lots managed products)
+ if ( $movestock && $product->status_batch == 2 )
+ {
+ if ( abs($qty) > 1 )
+ {
+ $this->errors[] = $langs->trans("TooManyQtyForSerialNumber", $product->ref, $batch);
+ $this->db->rollback();
+ return -2;
+ }
+ }
+
// Check if stock is enough when qty is < 0
// Note that qty should be > 0 with type 0 or 3, < 0 with type 1 or 2.
if ($movestock && $qty < 0 && empty($conf->global->STOCK_ALLOW_NEGATIVE_TRANSFER))
| [MouvementStock->[_createSubProduct->[_create],livraison->[_create],createBatch->[fetch],get_origin->[fetch],reception->[_create]]] | Creates a new product item in the system. Initialize a new object with the given parameters. This class is used to initialize a new product object This function checks if there are any duplicate product - lot records in the database and if not This function is called when a serial already exists with different dates. | If we have a corruption of data and qty in stock is 10 and we want to fix to get 1 (because it is a unique serial) for example after a direct import or because we changed the status of batch from 1 to 2 later, this test will make not possible to fix situation. Must be removed. |
@@ -65,6 +65,14 @@ var (
Help: "Status of the scheduler.",
}, []string{"kind", "type"})
+ schedulerCounter = prometheus.NewCounterVec(
+ prometheus.CounterOpts{
+ Namespace: "pd",
+ Subsystem: "scheduler",
+ Name: "banalcer",
+ Help: "Counter of balancer events.",
+ }, []string{"type", "name"})
+
regionHeartbeatCounter = prometheus.NewCounterVec(
prometheus.CounterOpts{
Namespace: "pd",
| [NewCounterVec,NewGaugeVec,ExponentialBuckets,NewHistogramVec,NewCounter,MustRegister] | Collector for aggregated processing time of handled txns. MustRegister metrics for missing metrics. | Need to change name and help too. Rest LGTM. |
@@ -194,7 +194,7 @@ class Embedding(TokenEmbedder, Registrable):
model_path : `str`, (optional, default=None)
Path traversing the model attributes upto this embedding module.
Eg. "_text_field_embedder.token_embedder_tokens". This is only useful
- to give helpful error message when extend_vocab is implicitly called
+ to give a helpful error message when extend_vocab is implicitly called
by fine-tune or any other command.
"""
# Caveat: For allennlp v0.8.1 and below, we weren't storing vocab_namespace as an attribute,
| [EmbeddingsTextFile->[close->[close],__exit__->[close],_get_the_only_file_in_the_archive->[format_embeddings_file_uri],__init__->[parse_embeddings_file_uri]],parse_embeddings_file_uri->[EmbeddingsFileURI]] | Extends the embedding matrix according to the extended vocabulary. Checks if a node in the vocab has a node in the pre - trained file or if f"embedding extension please pass the mapping by -- embedding - sources argument. | I noticed that `Embedding.extend_vocab` is used only in tests now. Should it be removed? |
@@ -281,6 +281,18 @@ def parse_section(prefix: str, template: Options,
return results, report_dirs
+def convert_to_boolean(value: Optional[Any]) -> bool:
+ """Return a boolean value translating from other types if necessary.
+ """
+ if isinstance(value, bool):
+ return value
+ if not isinstance(value, str):
+ value = str(value)
+ if value.lower() not in configparser.RawConfigParser.BOOLEAN_STATES:
+ raise ValueError('Not a boolean: %s' % value)
+ return configparser.RawConfigParser.BOOLEAN_STATES[value.lower()]
+
+
def split_directive(s: str) -> Tuple[List[str], List[str]]:
"""Split s on commas, except during quoted sections.
| [mypy_comments_to_config_map->[split_directive],split_and_match_files->[expand_path],parse_mypy_comments->[parse_section,mypy_comments_to_config_map],expand_path] | Split s on commas except during quoted sections. Causes the parts to be split on commas. | Style nit: Have both `"""` sequences on the same line. |
@@ -224,8 +224,7 @@ hash_lookup(dfs_sys_t *dfs_sys, struct sys_path *sys_path)
rc = dfs_lookup(dfs_sys->dfs, sys_path->dir_name, O_RDWR, &hdl->obj,
&mode, NULL);
if (rc != 0) {
- D_ERROR("dfs_lookup() %s failed: %s\n",
- sys_path->dir_name, strerror(rc));
+ D_DEBUG(DB_TRACE, "dfs_lookup() %s failed: %s\n", sys_path->dir_name, strerror(rc));
D_GOTO(free_hdl_name, rc);
}
| [No CFG could be retrieved] | Lookup name in dfs and add it to the hash table. Frees a cache directory. | I'm okay with this (debug probably makes more sense anyway), but how does this related to fault injection? (genuine question) |
@@ -103,14 +103,17 @@ public class TimeBoundaryQuery extends BaseQuery<Result<TimeBoundaryResultValue>
return new TimeBoundaryQuery(
dataSource,
getQuerySegmentSpec(),
+ bound,
getContext()
);
}
public byte[] getCacheKey()
{
- return ByteBuffer.allocate(1)
+ final byte[] excludeBytes = bound.getBytes();
+ return ByteBuffer.allocate(1 + excludeBytes.length)
.put(CACHE_TYPE_ID)
+ .put(excludeBytes)
.array();
}
| [TimeBoundaryQuery->[withQuerySegmentSpec->[TimeBoundaryQuery],withDataSource->[TimeBoundaryQuery],withOverriddenContext->[TimeBoundaryQuery]]] | Creates a new TimeBoundaryQuery with a data source. | boundBytes? Also need to specify charset for getBytes |
@@ -35,8 +35,9 @@ class ModelPartController:
},
"design_surface_sub_model_part_name" : "DESIGN_SURFACE_NAME",
"damping" : {
- "apply_damping" : false,
- "damping_regions" : []
+ "apply_damping" : false,
+ "max_neighbor_nodes" : 10000,
+ "damping_regions" : []
},
"mesh_motion" : {
"apply_mesh_solver" : false,
| [ModelPartController->[__ImportOptimizationModelPart->[SetMinimalBufferSize],Initialize->[Initialize],UpdateMeshAccordingInputVariable->[UpdateMeshAccordingInputVariable]]] | Initialize the object with default parameters. | Have you tried what happens it the limit is reached? I guess it will result in a kink in the shape. Unlike the filtering the damping is not so forgiving when it comes to cutting the used filter function... |
@@ -54,6 +54,7 @@ final class EntrypointAction
$this->graphiqlEnabled = $graphiqlEnabled;
$this->graphQlPlaygroundEnabled = $graphQlPlaygroundEnabled;
$this->defaultIde = $defaultIde;
+ $this->errorHandler = $errorHandler;
}
public function __invoke(Request $request): Response
| [EntrypointAction->[parseMultipartRequest->[parseData]]] | Initializes the object. Get a JSON array of the result of a single node. | Please add it before `$this->debug`. |
@@ -8,9 +8,6 @@ module EffectiveUser
private
def effective_user_id
- [
- session[:doc_capture_user_id],
- current_user&.id,
- ].find(&:present?)
+ [session[:doc_capture_user_id], current_user&.id].find(&:present?)
end
end
| [effective_user->[id,find_by],effective_user_id->[find]] | Finds the effective user id by a . | The orig is easier to parse visually. |
@@ -1689,7 +1689,7 @@ abstract class WPCOM_JSON_API_Endpoint {
function get_link() {
$args = func_get_args();
$format = array_shift( $args );
- $base = WPCOM_JSON_API__BASE;
+ $base = JETPACK__WPCOM_JSON_API_BASE;
$path = array_pop( $args );
| [No CFG could be retrieved] | Get the last segment of a relative path and generate a link to the endpoint Get the link to the resource. | I think we can keep the old `WPCOM_JSON_API__BASE` name. |
@@ -8,15 +8,15 @@ namespace Microsoft.Xna.Framework.Content.Pipeline.Graphics
[TypeConverter(typeof(CharacterRegionTypeConverter))]
public struct CharacterRegion
{
- public char Start;
- public char End;
+ public int Start;
+ public int End;
// Enumerates all characters within the region.
public IEnumerable<Char> Characters()
{
for (var c = Start; c <= End; c++)
{
- yield return c;
+ yield return (char)c;
}
}
| [CharacterRegion->[Distinct->[ContainsKey,Default,Add],SelectMany->[selector],Any->[MoveNext]]] | Get all characters in this range. | I'm not sure about this change. I suspect the actual issue is somewhere else. Reading chars correctly is critical to the intermediate deserializer working. Let me investigate a bit with the new unit tests and see. |
@@ -94,7 +94,12 @@ func (helper *broadcasterHelper) start() {
require.NoError(helper.t, err)
}
-func (helper *broadcasterHelper) register(listener log.Listener, contract log.AbigenContract, numConfirmations uint64) {
+type abigenContract interface {
+ Address() common.Address
+ ParseLog(log types.Log) (generated.AbigenLog, error)
+}
+
+func (helper *broadcasterHelper) register(listener log.Listener, contract abigenContract, numConfirmations uint64) {
logs := []generated.AbigenLog{
flux_aggregator_wrapper.FluxAggregatorNewRound{},
flux_aggregator_wrapper.FluxAggregatorAnswerUpdated{},
| [unsubscribeAll->[Sleep],start->[Start,NoError],registerWithTopics->[Register],logOnBlockNumWithTopics->[RawNewRoundLogWithTopics],register->[registerWithTopics],MarkConsumed->[NewORM,MarkBroadcastConsumed,RawLog],logsOnBlocks->[LatestBlockHash,RawLog,LatestBlockNumber],WasAlreadyConsumed->[NewORM,RawLog,WasBroadcastConsumed],assertExpectations->[AssertExpectations],IsV2Job->[IsZero],stop->[Close,NoError,storeCleanup],handleLogBroadcast->[True,NoError,MarkConsumed,WasAlreadyConsumed,Helper],subscribeCallCount->[LoadInt32],logOnBlockNum->[RawNewRoundLog],unsubscribeCallCount->[LoadInt32],requireAllReceived->[Eventually,Equal,Lock,Unlock],registerWithTopicValues->[Register],HandleLog->[Unlock,LatestBlockNumber,Warnf,Lock,handleLogBroadcast,LatestBlockHash,RawLog],String->[Sprintf],NewHash,NewAddress,NewStore,Set,checkFilterLogs,CreateJob,NewJob,AddInt32,NewBroadcaster,On,EnvVarName,Times,NewORM,NoError,Int64,Get,Return,Run,Helper] | start is the main entry point for the Broadcaster helper. It starts the listener and. | Not necessary anymore? |
@@ -354,6 +354,7 @@ def random_flip_up_down(image, seed=None):
Returns:
A tensor of the same type and shape as `image`.
+
Raises:
ValueError: if the shape of `image` not supported.
"""
| [resize_image_with_pad_v2->[_resize_fn->[resize_images_v2],_resize_image_with_pad_common],encode_png->[encode_png],_resize_images_common->[_ImageDimensions],resize_bicubic->[resize_bicubic],crop_to_bounding_box->[_assert,_ImageDimensions,_CheckAtLeast3DImage,_is_tensor],resize_image_with_crop_or_pad->[max_->[_is_tensor],equal_->[_is_tensor],min_->[_is_tensor],_ImageDimensions,_assert,max_,crop_to_bounding_box,min_,pad_to_bounding_box,_CheckAtLeast3DImage,_is_tensor,equal_],resize_images_v2->[resize_fn->[resize_with_scale_and_translate],_resize_images_common],resize_nearest_neighbor->[resize_nearest_neighbor],ssim_multiscale->[_ssim_per_channel,_verify_compatible_image_shapes,do_pad,convert_image_dtype],draw_bounding_boxes->[draw_bounding_boxes_v2],transpose->[_AssertAtLeast3DImage,transpose],draw_bounding_boxes_v2->[draw_bounding_boxes_v2],resize_images->[_resize_images_common],rgb_to_grayscale->[convert_image_dtype],ssim->[_ssim_per_channel,_verify_compatible_image_shapes,convert_image_dtype],sobel_edges->[transpose],per_image_standardization->[_AssertAtLeast3DImage],adjust_gamma->[_assert],sample_distorted_bounding_box->[sample_distorted_bounding_box_v2],pad_to_bounding_box->[_assert,_ImageDimensions,_CheckAtLeast3DImage,_is_tensor],adjust_saturation->[convert_image_dtype,adjust_saturation],adjust_hue->[adjust_hue,convert_image_dtype],grayscale_to_rgb->[_AssertGrayscaleImage],generate_bounding_box_proposals->[generate_bounding_box_proposals],extract_glimpse_v2->[extract_glimpse],_ssim_per_channel->[_fspecial_gauss,_ssim_helper],resize_image_with_pad_v1->[_resize_fn->[resize_images],_resize_image_with_pad_common],_flip->[fix_image_flip_shape,_AssertAtLeast3DImage],extract_glimpse->[extract_glimpse],_Assert3DImage->[_Check3DImage],psnr->[_verify_compatible_image_shapes,convert_image_dtype],adjust_jpeg_quality->[convert_image_dtype,_is_tensor],decode_image->[_gif->[convert_image_dtype],_jpeg->[convert_image_dtype],_png->[convert_image_dtype],check_png->[_is_png],_bmp->[convert_image_dtype],is_jpeg],_random_flip->[fix_image_flip_shape,_AssertAtLeast3DImage],resize_bilinear->[resize_bilinear],central_crop->[_get_dim,_AssertAtLeast3DImage],rot90->[_AssertAtLeast3DImage],non_max_suppression_with_overlaps->[non_max_suppression_with_overlaps],combined_non_max_suppression->[combined_non_max_suppression],_resize_image_with_pad_common->[max_->[_is_tensor],resize_fn,_ImageDimensions,_assert,max_,pad_to_bounding_box,_CheckAtLeast3DImage]] | Randomly flips an image vertically upside down. | Hey! :smile: We already have an example for this function. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.