patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -89,7 +89,6 @@ func resourceAwsFsxLustreFileSystem() *schema.Resource {
"storage_capacity": {
Type: schema.TypeInt,
Required: true,
- ForceNew: true,
ValidateFunc: validation.IntAtLeast(1200),
},
"subnet_ids": {
| [StringLenBetween,StringValueSlice,GetChange,UniqueId,IgnoreAws,DriveCacheType_Values,UpdateFileSystem,StringInSlice,Set,DeleteFileSystem,FsxKeyValueTags,GetOk,IntAtLeast,AutoImportPolicyType_Values,All,New,HasChange,Errorf,SetId,MustCompile,Bool,IntInSlice,CreateFileSystem,Timeout,IgnoreConfig,Id,Int64,Get,Map,StorageType_Values,StringMatch,DefaultTimeout,StringValue,Printf,Println,String,IntBetween,FsxUpdateTags,FsxTags,LustreDeploymentType_Values] | A schema that is used to validate a resource s resource. The time schema for the Kms object. | lets add a check to reduce the size, its probably not a valid case and we should trigger a recreate on that case. |
@@ -19,7 +19,7 @@
// Project includes
-#include "includes/define.h"
+#include "containers/variable_component.h"
#include "containers/data_value_container.h"
| [Merge->[end,ValueType,begin,Delete,push_back,Clone,Is],KRATOS_CREATE_LOCAL_FLAG] | - - - - - - - - - - - - - - - - - - c - > n - > n - > n - > n - > n - >. | One question why did you move this to the cpp? |
@@ -203,7 +203,9 @@ class Driver(object):
self.pid = None
try:
if config.DISABLE_CUDA:
- raise CudaSupportError("CUDA disabled by user")
+ msg = ("CUDA disabled by user. Disabled due to NUMBA_DISABLE_CUDA=1 or "
+ "on a 32-bit system, which CUDA doesn't support")
+ raise CudaSupportError(msg)
self.lib = find_driver()
except CudaSupportError as e:
self.is_initialized = True
| [Device->[reset->[release_primary_context,reset]],host_memory_size->[host_memory_extents],Driver->[__new__->[__new__],is_available->[initialize],__getattr__->[initialize],reset->[reset],initialize->[_getpid,_make_logger],__init__->[deref->[],find_driver],_check_error->[_getpid,CudaAPIError]],device_to_device->[device_pointer],Module->[unload->[unload_module],get_global_symbol->[MemoryPointer]],Stream->[auto_synchronize->[synchronize]],_device_pointer_attr->[device_ctypes_pointer],require_device_memory->[is_device_memory],device_extents->[device_ctypes_pointer],_event_finalizer->[core->[add_item]],device_memset->[device_pointer],device_memory_size->[device_extents],Context->[mempin->[allocator,_attempt_allocation],memalloc->[_attempt_allocation],_attempt_allocation->[clear],memhostalloc->[allocator,_attempt_allocation],reset->[clear],push->[_PendingDeallocs,get_memory_info],__ne__->[__eq__]],_pinnedalloc_finalizer->[core->[add_item]],device_pointer->[device_ctypes_pointer],OwnedPointer->[__init__->[deref->[free]]],host_to_device->[device_pointer,host_pointer],device_to_host->[device_pointer,host_pointer],_make_mem_finalizer->[mem_finalize->[core->[add_item]]],load_module_image->[CudaAPIError],_pinned_finalizer->[core->[add_item]],launch_kernel->[device_ctypes_pointer],Function->[_read_func_attr_all->[_read_func_attr]],device_pointer_type->[_device_pointer_attr],_stream_finalizer->[core->[add_item]],_module_finalizer->[core->[add_item]],profiling->[profile_stop,profile_start],Linker->[add_file->[LinkerError],add_ptx->[LinkerError],add_file_guess_ext->[add_file],complete->[LinkerError]],MemoryPointer->[view->[MemoryPointer]],Driver,_SizeNotSet,_build_reverse_device_attrs,_build_reverse_error_map] | Initialize the object with a unique device ID and a list of devices. | I think we can streamline this message to "CUDA is disabled due to setting NUMBA_DISABLE_CUDA=1 in the environment, or because CUDA is unsupported on 32-bit systems." |
@@ -56,6 +56,7 @@ import {adpicker} from '#ads/vendors/adpicker';
import {adplugg} from '#ads/vendors/adplugg';
import {adpon} from '#ads/vendors/adpon';
import {adpushup} from '#ads/vendors/adpushup';
+import {andbeyond} from '#ads/vendors/andbeyond';
import {adreactor} from '#ads/vendors/adreactor';
import {adsensor} from '#ads/vendors/adsensor';
import {adservsolutions} from '#ads/vendors/adservsolutions';
| [No CFG could be retrieved] | Imports an object from the specified assets. Package - level functions. | You no longer need the changes in this file, sorry this likely changed while this PR was in flight. |
@@ -58,10 +58,10 @@ class ApplicabilityManager(object):
:param repo_criteria: The repo selection criteria.
:type repo_criteria: dict
- :param units: A dictionary of type_id : list of unit metadata
+ :param unit_criteria: A dictionary of type_id : unit selection criteria
:type units: dict
- {<type_id1> : [{<unit1_metadata>}, {<unit2_metadata>}, ..],
- <type_id2> : [{<unit1_metadata>}, {<unit2_metadata>}, ..]}
+ {<type_id1> : <unit_criteria_for_type_id1>,
+ <type_id2> : <unit_criteria_for_type_id2>}
:return: a dictionary with applicability reports for each unit
keyed by a consumer id and further keyed by unit type id.
| [ApplicabilityManager->[units_applicable->[units_applicable]]] | Determines which of the specified content units are applicable to the specified content consumers specified by the I Get a list of all applicability reports for all consumers that are applicable to a given This function is called when the profiler is not returning applicability reports. | The naming here is a bit tricky, since it's not a single unit criteria. Consider something like unit_criteria_list or something of the sort. |
@@ -246,13 +246,14 @@ final class ApiPlatformExtension extends Extension implements PrependExtensionIn
private function getResourcesToWatch(ContainerBuilder $container, array $resourcesPaths): array
{
- // Flex structure
+ $paths = array_unique(array_merge($resourcesPaths, $this->getBundlesResourcesPaths($container)));
+
+ // Flex structure (only if nothing specified)
$projectDir = $container->getParameter('kernel.project_dir');
- if (is_dir($dir = "$projectDir/config/api_platform")) {
- $resourcesPaths[] = $dir;
+ if (!$paths && is_dir($dir = "$projectDir/config/api_platform")) {
+ $paths = [$dir];
}
- $paths = array_unique(array_merge($resourcesPaths, $this->getBundlesResourcesPaths($container)));
$resources = ['yml' => [], 'xml' => [], 'dir' => []];
foreach ($paths as $path) {
| [ApiPlatformExtension->[load->[load],registerBundlesConfiguration->[load],registerMetadataConfiguration->[load],getResourcesToWatch->[getBundlesResourcesPaths],registerSwaggerConfiguration->[load],registerJsonHalConfiguration->[load],registerJsonProblemConfiguration->[load],registerGraphqlConfiguration->[load],registerHttpCache->[load],registerJsonLdConfiguration->[load],registerJsonApiConfiguration->[load]]] | Returns the list of resources to watch. | `if (!$paths && is_dir($dir = "$projectDir/config/api_platform"))`? It's a micro-optim, but then... |
@@ -272,6 +272,10 @@ func (p *builtinProvider) getResource(inputs resource.PropertyMap) (resource.Pro
contract.Assert(ok)
contract.Assert(urn.IsString())
+ // TODO(pdg): track secret outputs in the resource map. This is necessary to ensure that the
+ // `additionalSecretOutputs` option that was provided when the resource was registered is properly respected by
+ // `getResource`.
+
state, ok := p.resources.get(resource.URN(urn.StringValue()))
if !ok {
return nil, errors.Errorf("unknown resource %v", urn.StringValue())
| [StreamInvoke->[Errorf],getResource->[IsString,StringValue,get,Errorf,Assert,NewObjectProperty,NewStringProperty,URN],readStackResourceOutputs->[IsString,StringValue,New,Assert,NewObjectProperty,GetStackResourceOutputs],Create->[ID,NewV4,readStackReference,String,Assert,Type],Invoke->[readStackReference,readStackResourceOutputs,getResource,Errorf],GetPluginInfo->[New],Construct->[New],SignalCancellation->[cancel],readStackReference->[Slice,IsString,StringValue,New,GetStackOutputs,String,Assert,ContainsSecrets,NewObjectProperty,NewStringProperty,NewArrayProperty],Delete->[Type,Assert],Read->[readStackReference,Type,Assert],Check->[IsString,IsComputed,Sprintf,Errorf,Type],Diff->[Type,DeepEquals,Assert],Update->[Failf,Type,New,Assert],Background,WithCancel] | getResource returns a property map that represents the resource that is not in the inputs. | Open an issue to track and link to it? |
@@ -5544,9 +5544,9 @@ function getCommonSubstitutionArray($outputlangs, $onlykey=0, $exclude=null, $ob
{
$substitutionarray['__DATE_YMD__'] = is_object($object)?(isset($object->date) ? dol_print_date($object->date, 'day', 0, $outputlangs) : '') : '';
$substitutionarray['__DATE_DUE_YMD__'] = is_object($object)?(isset($object->date_lim_reglement)? dol_print_date($object->date_lim_reglement, 'day', 0, $outputlangs) : '') : '';
- $substitutionarray['__AMOUNT__'] = is_object($object)?$object->total_ttc:'';
- $substitutionarray['__AMOUNT_EXCL_TAX__'] = is_object($object)?$object->total_ht:'';
- $substitutionarray['__AMOUNT_VAT__'] = is_object($object)?($object->total_vat?$object->total_vat:$object->total_tva):'';
+ $substitutionarray['__AMOUNT__'] = is_object($object)?price($object->total_ttc):'';
+ $substitutionarray['__AMOUNT_EXCL_TAX__'] = is_object($object)?price($object->total_ht):'';
+ $substitutionarray['__AMOUNT_VAT__'] = is_object($object)?($object->total_vat?price($object->total_vat):price($object->total_tva)):'';
if ($onlykey != 2 || $mysoc->useLocalTax(1)) $substitutionarray['__AMOUNT_TAX2__'] = is_object($object)?($object->total_localtax1?$object->total_localtax1:$object->total_localtax1):'';
if ($onlykey != 2 || $mysoc->useLocalTax(2)) $substitutionarray['__AMOUNT_TAX3__'] = is_object($object)?($object->total_localtax2?$object->total_localtax2:$object->total_localtax2):'';
| [dolGetCountryCodeFromIp->[getCountryCodeFromIP],img_phone->[trans],dol_print_graph->[trans],complete_head_from_modules->[executeHooks,trans,load],dol_print_error->[transnoentities,trans,lasterror,lastqueryerror,lasterrno,lastquery,load],dol_print_phone->[fetch_clicktodial,trans],dol_print_url->[trans],getCommonSubstitutionArray->[getFullName,fetch_optionals,fetch_name_optionals_label,getCivilityLabel,getFullAddress,trans,useLocalTax],natural_search->[escape,trans],img_help->[trans],img_search->[trans],get_localtax->[fetch_object,query],make_substitutions->[transnoentitiesnoconv,load],dol_print_ip->[trans],img_edit_remove->[trans],getBrowserInfo->[isMobile,is,isTablet],dol_print_address->[executeHooks],img_warning->[trans],img_error->[trans],img_previous->[trans],img_right->[trans],dol_mktime->[getTimestamp,setDate,setTime],img_action->[transnoentitiesnoconv],img_allow->[trans],get_htmloutput_mesg->[trans,load],printCommonFooter->[executeHooks],get_default_npr->[fetch_product_fournisseur_price,fetch],dol_get_fiche_head->[executeHooks,trans],dol_print_date->[transnoentities,transnoentitiesnoconv,trans],img_split->[trans],getEntity->[getEntity],dol_syslog->[setIdent,export],get_localtax_by_third->[fetch_object,query],img_info->[trans],img_up->[trans],yn->[trans],print_fleche_navigation->[trans],price->[getCurrencySymbol,transnoentitiesnoconv],showDirectDownloadLink->[getLastMainDocLink,trans],get_product_vat_for_country->[fetch,plimit,free,query,fetch_object,get_buyprice],img_left->[trans],get_date_range->[transnoentitiesnoconv],img_next->[trans],img_down->[trans],dol_format_address->[transnoentitiesnoconv,convToOutputCharset],img_edit->[trans],price2num->[transnoentitiesnoconv],dol_print_skype->[load,trans],getAdvancedPreviewUrl->[trans],dol_print_email->[trans,load],img_edit_add->[trans],info_admin->[trans],getTitleFieldOfList->[textwithpicto,trans],dol_banner_tab->[getVentilExportCompta,getBannerAddress,show_photos,getLibStatut,trans,is_photo_available,showbarcode,showphoto,load,showrefnav],img_pdf->[trans],img_delete->[trans],dol_user_country->[getCountryCodeFromIP],getDictvalue->[fetch_object,query],dol_print_error_email->[trans,load],img_view->[trans],img_printer->[trans],dol_getIdFromCode->[fetch_object,query,escape,free],dol_print_size->[trans],fieldLabel->[trans],dol_shutdown->[close],picto_from_langcode->[trans],get_default_tva->[isACompany],getLocalTaxesFromRate->[fetch_object,query],img_searchclear->[trans],getTaxesFromId->[fetch_object,query],get_product_localtax_for_country->[fetch,fetch_object,query,plimit]] | Get an array of substitutions for all common keys - - - - - - - - - - - - - - - - - - Protected get security keys Date - based substitution for all members of a user object. Substitution array for \ Dolfin \ Mail \ Entity \ NestedRelation Dolgenis Email - > Email Create dynamic tags for a given object - - - - - - - - - - - - - - - - - - This function is used to generate a substitution array for a specific block of block. | The "price" function is a function that format the date for output (according to user language and decimal setup). So original value of amout is corrupted and can not be used anymore in a template that make calculation for example. As a solution, i backported the new substitution keys that were intorduced in v8 __AMOUNT_FORMATED__ __AMOUNT_EXCL_TAX_FORMATED__ __AMOUNT_TAX_FORMATED__ that will have content of price function. |
@@ -734,15 +734,15 @@ check_ioctl_on_open(int fd, struct fd_entry *entry, int flags, int status)
il_reply.fir_cont) != 0)
continue;
- D_GOTO(get_file, 0);
+ D_GOTO(get_file, rc = 0);
}
- D_GOTO(open_cont, 0);
+ D_GOTO(open_cont, rc = 0);
}
/* Allocate data for pool */
D_ALLOC_PTR(pool);
if (pool == NULL)
- D_GOTO(err, 0);
+ D_GOTO(err, rc = ENOMEM);
pool_alloc = true;
uuid_copy(pool->iop_uuid, il_reply.fir_pool);
| [No CFG could be retrieved] | finds the n - node object that can be used to open a node in the I finds the n - op in the list of n - op - containers that are in. | For this function it just returns true/false depending on if it was successful or not, and if it wasn't then the I/O is routed through the kernel, the err label does not read the value of rc at all. |
@@ -161,7 +161,6 @@ register('yieldbot', yieldbot);
register('yieldmo', yieldmo);
register('zergnet', zergnet);
register('yieldone', yieldone);
-
register('_ping_', function(win, data) {
win.document.getElementById('c').textContent = data.ping;
});
| [No CFG could be retrieved] | Registers all of the functions in the kargo module. The event is fired when ad actually starts rendering. | please keep the blank line |
@@ -335,7 +335,8 @@ public class MaterializedViewSupervisor implements Supervisor
Map<Interval, String> toDropInterval = new HashMap<>(difference.entriesOnlyOnRight());
// if some intervals are in running tasks and the versions are the same, remove it from toBuildInterval
// if some intervals are in running tasks, but the versions are different, stop the task.
- for (Interval interval : runningVersion.keySet()) {
+ for (Map.Entry<Interval, String> entry : runningVersion.entrySet()) {
+ Interval interval = entry.getKey();
if (toBuildInterval.containsKey(interval)
&& toBuildInterval.get(interval).equals(runningVersion.get(interval))
) {
| [MaterializedViewSupervisor->[checkSegmentsAndSubmitTasks->[getStatus]]] | Checks if the given base segments are used to create a task. if any of the baseSegments in toDropInterval is not present in the runningTasks list. | What's the purpose of this change? |
@@ -103,10 +103,13 @@ public class UDPBroadcastThread extends Thread {
}
} catch (ClosedByInterruptException e) {
// shut down
- } catch (BindException e) {
- // if we failed to listen to UDP, just silently abandon it, as a stack trace
+ } catch (SocketException e) {
+ if (shutdown) { // forcibly closed
+ return;
+ } // if we failed to listen to UDP, just silently abandon it, as a stack trace
// makes people unnecessarily concerned, for a feature that currently does no good.
- LOGGER.log(Level.WARNING, "Failed to listen to UDP port "+PORT,e);
+ LOGGER.log(Level.INFO, "Cannot listen to UDP port {0}, skipping: {1}", new Object[] {PORT, e});
+ LOGGER.log(Level.FINE, null, e);
} catch (IOException e) {
if (shutdown) return; // forcibly closed
LOGGER.log(Level.WARNING, "UDP handling problem",e);
| [UDPBroadcastThread->[shutdown->[interrupt,close],tag->[append],run->[send,all,getRootUrl,getPort,append,getSocketAddress,buildFragment,receive,log,joinGroup,DatagramPacket,getLegacyInstanceId,StringBuilder,getBytes,signal,tag,getTcpSlaveAgentListener],getInteger,getName,getByAddress,Error,OneShotEvent,getLogger,MulticastSocket]] | This method is run in a thread. It will block until a block is received or until. | You should always use a message - as there is zero guarantee that the exception line will be printed immediately after the previous entry leading to exceptions that are "free floating" in the logs. |
@@ -663,12 +663,11 @@ void gcm_gmult_4bit_x86(u64 Xi[2], const u128 Htable[16]);
void gcm_ghash_4bit_x86(u64 Xi[2], const u128 Htable[16], const u8 *inp,
size_t len);
# endif
-# elif defined(__arm__) || defined(__arm) || defined(__aarch64__)
+# elif (defined(__arm__) || defined(__arm) || defined(__aarch64__)) && defined(GHASH_ASM)
# include "arm_arch.h"
# if __ARM_MAX_ARCH__>=7
# define GHASH_ASM_ARM
# define GCM_FUNCREF_4BIT
-# define PMULL_CAPABLE (OPENSSL_armcap_P & ARMV8_PMULL)
# if defined(__arm__) || defined(__arm)
# define NEON_CAPABLE (OPENSSL_armcap_P & ARMV7_NEON)
# endif
| [No CFG could be retrieved] | # - > - > - > - > - > - > - > - > - # if defined ( OpenSSL_ARMCAP_P & ARMV7_NE. | Just because it appears counter-intuitive it doesn't mean it's wrong. 32-bit code can take advantage of ARMv8 extensions, and that's what this placement is about. |
@@ -1028,6 +1028,7 @@ static void updateAllFastFaceRows(MeshMakeData *data,
MapBlockMesh::MapBlockMesh(MeshMakeData *data, v3s16 camera_offset):
m_mesh(new scene::SMesh()),
+ m_minimap_mapblock(new MinimapMapblock),
m_gamedef(data->m_gamedef),
m_tsrc(m_gamedef->getTextureSource()),
m_shdrsrc(m_gamedef->getShaderSource()),
| [getInteriorLight->[getInteriorLight],void->[getNodeTile,getFaceLight,getSmoothLight,FastFace],getNodeTile->[getNodeTileN],getFaceLight->[getFaceLight],drop->[drop],animate->[finalColorBlend], m_mesh->[finalColorBlend]] | This method maps a block of meshes to a mesh. This method is called to add a new object to the mapblock. This function is called when a material is not available in the MapBlockMesh. It is This is a bit of a hack to work around the bug in the video library. | Is this a memory leak? |
@@ -443,7 +443,7 @@ class Category extends ApiEntityWrapper
/**
* Takes a user entity and returns the fullname.
*
- * @param $user
+ * @param User $user
*
* @return string
*/
| [Category->[getDescription->[getDescription],getParentId->[getId,getParent],getKey->[getKey],getCreated->[getCreated],setParent->[setParent],getSingleMetaById->[getId],getDefaultLocale->[getDefaultLocale],getChanged->[getChanged],setTranslation->[setTranslation,getId,getLocale,getDefaultLocale],toArray->[getKeywords,getKey,getName,getId,getCreated,getCreator,getMeta,getDefaultLocale,getChanged,getChanger],getId->[getId],getTranslationByLocale->[getLocale],getGhostLocale->[getLocale],setKey->[setKey],setMeta->[getKey,getMeta,getId,getLocale],getMeta->[getKey,getMeta,getId,getLocale],getLocale->[getLocale],getChanger->[getChanger],getKeywords->[getKeywords],getChildren->[getChildren],getMedias->[getMedias],getCreator->[getCreator],getTranslation->[getDefaultLocale],getMediasRawData->[getId],getParent->[getParent]]] | get user full name. | would use `UserInterface` (`Sulu\Component\Security\Authentication\UserInterface`) here |
@@ -683,8 +683,11 @@ class Client:
# returns "https://cloud.prefect.io/my-tenant-slug/flow-run/424242-ca-94611-111-55"
```
"""
- # Generate direct link to Cloud flow
- tenant_slug = self.get_default_tenant_slug(as_user=as_user)
+ # Generate direct link to UI
+ if "prefect.io" in urlparse(prefect.config.cloud.api).netloc:
+ tenant_slug = self.get_default_tenant_slug(as_user=as_user)
+ else:
+ tenant_slug = ""
base_url = (
re.sub("api-", "", prefect.config.cloud.api)
| [Client->[delete_task_tag_limit->[graphql],get_latest_cached_states->[graphql],get_flow_run_info->[graphql],create_flow_run->[graphql],get_default_tenant_slug->[graphql,get],set_task_run_state->[graphql,get],get_task_run_info->[graphql],register->[graphql],graphql->[post],login_to_tenant->[graphql,_save_local_settings,_load_local_settings],_request->[post,get],write_run_log->[graphql],write_run_logs->[graphql],update_task_run_heartbeat->[graphql],create_project->[graphql],logout_from_tenant->[_save_local_settings,_load_local_settings],set_flow_run_state->[graphql],update_flow_run_heartbeat->[graphql],get_available_tenants->[graphql],update_task_tag_limit->[graphql],set_secret->[graphql],save_api_token->[_save_local_settings,_load_local_settings],get_task_tag_limit->[graphql],_refresh_access_token->[graphql]]] | Returns the base URL corresponding to the Cloud page. | Jw, why were all of the `prefect.io` checks added? |
@@ -30,8 +30,11 @@ URL = 'http://ai.stanford.edu/%7Eamaas/data/sentiment/aclImdb_v1.tar.gz'
MD5 = '7c2ac02c03563afcf9b574c7e56c153a'
-# Read files that match pattern. Tokenize and yield each file.
def tokenize(pattern):
+ """
+ Read files that match pattern. Tokenize and yield each file.
+ """
+
with tarfile.open(paddle.v2.dataset.common.download(URL, 'imdb',
MD5)) as tarf:
# Note that we should use tarfile.next(), which does
| [train->[reader_creator],test->[reader_creator],word_dict->[build_dict],reader_creator->[load->[tokenize],reader],build_dict->[tokenize]] | Tokenize the image. | `pattern` ==> `the given pattern` the, a, an `some patterns` |
@@ -1319,7 +1319,9 @@ static __owur int set_ciphersuites(STACK_OF(SSL_CIPHER) **currciphers, const cha
/* Parse the list. We explicitly allow an empty list */
if (*str != '\0'
- && !CONF_parse_list(str, ':', 1, ciphersuite_cb, newciphers)) {
+ && (CONF_parse_list(str, ':', 1, ciphersuite_cb, newciphers) <= 0
+ || sk_SSL_CIPHER_num(newciphers) == 0 )) {
+ ERR_raise(ERR_LIB_SSL, SSL_R_NO_CIPHER_MATCH);
sk_SSL_CIPHER_free(newciphers);
return 0;
}
| [No CFG could be retrieved] | This function returns the initial list of ciphers that are not available in the list. This function is used to collect the list of ciphers that are already present in the list. | Nit: extra space after 0 |
@@ -185,8 +185,9 @@ class DaemonPantsRunner(ProcessManager):
# Set context in the process title.
set_process_title('pantsd-runner [{}]'.format(' '.join(self._args)))
- # Broadcast our pid to the remote client so they can send us signals (i.e. SIGINT).
- NailgunProtocol.send_pid(self._socket, bytes(os.getpid()))
+ # Broadcast our process group ID (in PID form - i.e. negated) to the remote client so
+ # they can send signals (e.g. SIGINT) to all processes in the runners process group.
+ NailgunProtocol.send_pid(self._socket, bytes(os.getpgrp() * -1))
# Setup a SIGINT signal handler.
self._setup_sigint_handler()
| [DaemonPantsRunner->[pre_fork->[pre_fork],post_fork_child->[exit,set_finalizer,_raise_deferred_exc,_nailgunned_stdio,run,_setup_sigint_handler]]] | Post - fork child process callback. Returns the number of nodes in the pool. | If this is negated into a process group, is it referred to as something else? A `PGID` or something? |
@@ -109,6 +109,7 @@ ActiveRecord::Schema.define(version: 20170215175444) do
t.datetime "updated_at"
t.boolean "active", default: false, null: false
t.boolean "approved", default: false, null: false
+ t.boolean "native", default: false, null: false
end
add_index "service_providers", ["issuer"], name: "index_service_providers_on_issuer", unique: true, using: :btree
| [string,text,add_foreign_key,datetime,integer,add_index,json,enable_extension,create_table,boolean,define] | t. string deactivation_reason Indexes the service providers on the issuer. | add `null: false`, too, to be consistent with other booleans in this table? |
@@ -42,7 +42,7 @@ public class VarcharDecoder
if (value == null) {
output.appendNull();
}
- else if (value instanceof String) {
+ else if (value instanceof String || value instanceof Number) {
VARCHAR.writeSlice(output, Slices.utf8Slice(value.toString()));
}
else {
| [VarcharDecoder->[decode->[PrestoException,getSimpleName,get,utf8Slice,writeSlice,toString,format,appendNull],requireNonNull]] | Decodes a from the given field. | The error message in the `else` case needs to be adjusted to say "Expected a string or numeric value for ..." |
@@ -128,6 +128,18 @@ func (c *asyncClient) publishWindowed(
ref *msgRef,
data []outputs.Data,
) (int, error) {
+ if c.ttl != nil {
+ select {
+ case <-c.ttl:
+ if err := c.Close(); err != nil {
+ return 0, err
+ }
+ if err := c.Connect(0); err != nil {
+ return 0, err
+ }
+ default:
+ }
+ }
batchSize := len(data)
windowSize := c.win.get()
debug("Try to publish %v events to logstash with window size %v",
| [AsyncPublishEvent->[Send],done->[dec,tryGrowWindow,Add],publishWindowed->[sendEvents,get],Connect->[connect,Debug],dec->[AddInt32,cb,Err,Add],Close->[Close,Debug],callback->[done,fail],sendEvents->[AddInt32,Send],AsyncPublishEvents->[dec,Close,Add,publishWindowed],fail->[dec,shrinkWindow,Add],CompressionLevel,Timeout,init,Connect,NewAsyncClientWithConn,JSONEncoder] | publishWindowed publishes events to logstash with a window size. | I'm not sure I like to have the reconnect here. reason is the windowing. The output is supposed todo a slow start, increasing the window size to deal with potential timing problems if batch gets too big (e.g. connection lost, as processingt takes too long for very big events/batches). As this PR is supposed to help with load-balancers, after a reconnect the next batch might take another route. Here we should consider resetting the windowing parameters. Maybe move the timeout check before the call to publishWindowed and reset `win` to it's initial parameters. |
@@ -4702,8 +4702,12 @@ void Parser::AppendFunctionToScopeList(bool fDeclaration, ParseNodePtr pnodeFnc)
Parse a function definition.
***************************************************************************/
template<bool buildAST>
-bool Parser::ParseFncDeclHelper(ParseNodePtr pnodeFnc, ParseNodePtr pnodeFncParent, LPCOLESTR pNameHint, ushort flags, bool *pHasName, bool fUnaryOrParen, bool noStmtContext, bool *pNeedScanRCurly)
+bool Parser::ParseFncDeclHelper(ParseNodePtr pnodeFnc, LPCOLESTR pNameHint, ushort flags, bool *pHasName, bool fUnaryOrParen, bool noStmtContext, bool *pNeedScanRCurly)
{
+ ParseNodePtr pnodeFncSave = buildAST ? m_currentNodeFunc : m_currentNodeDeferredFunc;
+ ParseNodePtr pnodeFncSaveNonLambda = buildAST ? m_currentNodeNonLambdaFunc : m_currentNodeNonLambdaDeferredFunc;
+ int32* pAstSizeSave = m_pCurrentAstSize;
+
bool fDeclaration = (flags & fFncDeclaration) != 0;
bool fLambda = (flags & fFncLambda) != 0;
bool fAsync = (flags & fFncAsync) != 0;
| [No CFG could be retrieved] | Check for missing node in array. - - - - - - - - - - - - - - - - - -. | Will calling GetCurrentFunctionNode() work? |
@@ -330,8 +330,7 @@ class AddonIndexer(BaseSearchIndexer):
# add-ons stored in ES.
data['platforms'] = [amo.PLATFORM_ALL.id]
try:
- data['has_theme_rereview'] = (
- obj.persona.rereviewqueuetheme_set.exists())
+ data['has_theme_rereview'] = False
# Theme popularity is roughly equivalent to average daily users
# (the period is not the same and the methodology differs since
# themes don't have updates, but it's good enough).
| [get_mappings->[get_mapping],AddonIndexer->[extract_document->[extract_version]]] | Extract a document from a object. Get the data for a object. This method returns a dict with all the data for a . | You can remove that entirely (and the associated checks in `test_indexers.py`) |
@@ -68,6 +68,12 @@ namespace System.Text.Json.Serialization.Converters
enumerator = (IDictionaryEnumerator)state.Current.CollectionEnumerator;
}
+ // Avoid using GetKeyConverter here
+ // IDictionary is a spacial case since it has polymorphic object semantics on serialization.
+ // But needs to use JsonConverter<string> on deserialization.
+ JsonClassInfo objectKeyClassInfo = options.GetOrAddClass(typeof(object));
+ JsonConverter<object> keyConverter = (JsonConverter<object>)objectKeyClassInfo.PropertyInfoForClassInfo.ConverterBase;
+
JsonConverter<object?> converter = GetValueConverter(ref state);
do
{
| [IDictionaryConverter->[CreateCollection->[CreateObject,JsonClassInfo,IsAbstract,IsAssignableFrom,ThrowNotSupportedException_DeserializeNoConstructor,IsReadOnly,IsInterface,ThrowNotSupportedException_CannotPopulateCollection,ReturnValue],OnWriteResume->[MoveNext,Value,ShouldFlush,CollectionEnumerator,ThrowJsonException_DeserializeUnableToConvertValue,EndDictionaryElement,Name,GetEnumerator,GetKeyName,WritePropertyName,Key,TryWrite,RuntimePropertyType,GetValueConverter,PropertyState],Add->[JsonPropertyNameAsString,ReturnValue],IsAbstract,IsInterface]] | This method is called when the object is to be written. | Do we need the changes here? Seems like the existing logic suffices. |
@@ -116,6 +116,9 @@ def main(word_dict, net_method, use_cuda):
fetch_list=[cost, acc_out])
print("cost=" + str(cost_val) + " acc=" + str(acc_val))
if cost_val < 0.4 and acc_val > 0.8:
+ if save_dirname is not None:
+ fluid.io.save_inference_model(save_dirname, ["words"],
+ prediction, exe)
return
if math.isnan(float(cost_val)):
sys.exit("got NaN loss, training failed.")
| [TestUnderstandSentiment->[test_stacked_lstm_gpu->[main,new_program_scope],test_stacked_lstm_cpu->[main,new_program_scope],test_conv_gpu->[main,new_program_scope],test_conv_cpu->[main,new_program_scope]],main] | Main function of the n - node network. | Maybe we can extend the `high` to `len(word_dict) - 1` We can get word_dict as: `word_dict = paddle.dataset.imdb.word_dict()` |
@@ -307,6 +307,10 @@ public class DataSourceUtils {
DataSourceWriteOptions.HIVE_SKIP_RO_SUFFIX_FOR_READ_OPTIMIZED_TABLE().defaultValue()));
hiveSyncConfig.supportTimestamp = Boolean.valueOf(props.getString(DataSourceWriteOptions.HIVE_SUPPORT_TIMESTAMP_TYPE().key(),
DataSourceWriteOptions.HIVE_SUPPORT_TIMESTAMP_TYPE().defaultValue()));
+ hiveSyncConfig.useKerberos =
+ Boolean.valueOf(props.getString(DataSourceWriteOptions.HIVE_SYNC_USE_KERBEROS().key(),DataSourceWriteOptions.HIVE_SYNC_USE_KERBEROS().defaultValue()));
+ hiveSyncConfig.kerberosPrincipal =
+ props.getString(DataSourceWriteOptions.HIVE_SYNC_KERBEROS_PRINCIPAL().key(), DataSourceWriteOptions.HIVE_SYNC_KERBEROS_PRINCIPAL().defaultValue());
return hiveSyncConfig;
}
}
| [DataSourceUtils->[createHoodieRecord->[createPayload],buildHiveSyncConfig->[checkRequiredProperties],dropDuplicates->[dropDuplicates],getTablePath->[getTablePath],createHoodieClient->[createHoodieConfig],doWriteOperation->[createUserDefinedBulkInsertPartitioner]]] | Build HiveSyncConfig from typed properties. HiveSyncConfig. properties. | `HIVE_SYNC_KERBEROS_PRINCIPAL` has null default value. This might throw HoodieException. Maybe, we can set EMPTY_STRING as default and validate in HiveSyncTool that this config is not null or empty when `HIVE_SYNC_USE_KERBEROS` is true. |
@@ -23,7 +23,10 @@ const FacebookWrapper = ( props ) => {
{
props.isPremium
? <Slot
- name="YoastFacebookPremium"
+ name={
+ "YoastFacebookPremium" +
+ `${ props.location ? props.location.charAt( 0 ).toUpperCase() + props.location.slice( 1 ) : "" }`
+ }
fillProps={ props }
/>
: <SocialForm { ...props } />
| [No CFG could be retrieved] | Provides a React component that renders the FacebookWrapper. | Since your defaultProp for `location` is `""`, you do not need to do the `props.location` check. `"".charAt( 0 ).toUpperCase() + "".slice( 1 )` = `""` (yay, JavaScript!) and `"YoastFacebookPremium"` + `""` = `"YoastFacebookPremium"` :smile: |
@@ -166,12 +166,16 @@ func (c *FifoCache) Store(ctx context.Context, keys []string, bufs [][]byte) {
// Stop implements Cache.
func (c *FifoCache) Stop() {
+ c.lock.Lock()
+ defer c.lock.Unlock()
+ c.entries = nil
+ c.currSize = 0
}
// Put stores the value against the key.
func (c *FifoCache) Put(ctx context.Context, keys []string, values []interface{}) {
c.entriesAdded.Inc()
- if c.size == 0 {
+ if c.maxSizeBytes == 0 && c.maxSizeItems == 0 {
return
}
| [Store->[Put],RegisterFlagsWithPrefix->[DurationVar,IntVar],Get->[Inc,RUnlock,Since,RLock],Fetch->[Get],put->[Inc,Add,Now],Put->[Inc,put,Lock,Unlock],NewCounterVec,NewGaugeVec,WarnExperimentalUse,WithLabelValues,Set,Sizeof] | Put - Puts a set of keys and values to the cache. | You should update metrics here |
@@ -62,7 +62,8 @@ class BaseExporter:
# give a few more seconds for blob lease operation
# to reduce the chance of race (for perf consideration)
if blob.lease(self._timeout + 5):
- envelopes = blob.get()
+ envelopes = map(
+ lambda x: TelemetryItem(**x), blob.get())
result = self._transmit(list(envelopes))
if result == ExportResult.FAILED_RETRYABLE:
blob.lease(1)
| [is_retryable_code->[bool],BaseExporter->[_transmit_from_storage->[list,get,gets,lease,_transmit,delete],_transmit->[error,append,is_retryable_code,len,as_dict,info,warning,put,track,map],__init__->[AzureMonitorClient,LocalFileStorage,ExporterOptions,ConnectionStringParser,gettempdir,RetryPolicy,join]],getLogger] | Transmit all the blobs from storage. | I'm not familiar with `TelemetryItem(**x)` syntax. How does it work? |
@@ -839,6 +839,7 @@ void push_content_features(lua_State *L, const ContentFeatures &c)
std::string paramtype2(ScriptApiNode::es_ContentParamType2[(int)c.param_type_2].str);
std::string drawtype(ScriptApiNode::es_DrawType[(int)c.drawtype].str);
std::string liquid_type(ScriptApiNode::es_LiquidType[(int)c.liquid_type].str);
+ std::string liquid_move_physics(ScriptApiNode::es_LiquidMoveType[(int)c.liquid_move_physics].str);
/* Missing "tiles" because I don't see a usecase (at least not yet). */
| [read_noiseparams->[getflagsfield],read_hud_change->[string_to_enum],push_noiseparams->[push_flags_string],read_items->[read_item],push_collision_move_result->[push_objectRef],read_content_features->[read_tiledef],read_json_value->[read_json_value],read_hud_element->[getenumfield],read_animation_definition->[getenumfield]] | pushes content features to lua private static int SERVER_COLOUR_COLOR = 0xffffffffffffffffffffff This function push values of all objects from the c object onto the stack This function push values from the specification to the stack read from the legacy_wallmounted field. | This is wrong now that `liquid_move_physics` is a boolean. |
@@ -39,14 +39,14 @@ func (r *RunResultSaver) Start() error {
for {
select {
case rr := <-r.runResults:
- logger.Debugw("RunSaver: saving job run", "run", rr.Run, "task results", rr.TaskRunResults)
+ r.logger.Infow("RunSaver: saving job run", "run", rr.Run, "task results", rr.TaskRunResults)
// We do not want save successful TaskRuns as OCR runs very frequently so a lot of records
// are produced and the successful TaskRuns do not provide value.
ctx, cancel := postgres.DefaultQueryCtx()
defer cancel()
_, err := r.pipelineRunner.InsertFinishedRun(r.db.WithContext(ctx), rr.Run, rr.TaskRunResults, false)
if err != nil {
- logger.Errorw(fmt.Sprintf("error inserting finished results for job ID %v", r.jobID), "err", err)
+ r.logger.Errorw("error inserting finished results", "err", err)
}
case <-r.done:
return
| [Start->[WrapRecover,StartOnce,Errorw,Sprintf,Debugw,DefaultQueryCtx,WithContext,InsertFinishedRun],Close->[StopOnce,Errorw,Sprintf,Debugw,WithContext,DefaultQueryCtx,InsertFinishedRun]] | Start starts the RunResultSaver. It will start the RunResultSaver once. | Why the upgrade to Info? Is this related to the request from @tyrion70 ? |
@@ -26,6 +26,12 @@ ngRouteModule.directive('ngView', ngViewFillContentFactory);
*
* The enter and leave animation occur concurrently.
*
+ * @knownIssue If `ngView` is contained in an asynchronously loaded templated (i.e. not directly
+ * inside your main HTML file, then you need to make sure that `$route` is instantiated
+ * in time to capture the initial `$locationChangeStart` event and load the appropriate
+ * view. One way to ensure `$route` will be instantiated in time, it to have it as a
+ * dependency in a `.run` block: `myModule.run(['$route', function() {}]);`
+ *
* @scope
* @priority 400
* @param {string=} onload Expression to evaluate whenever the view updates.
| [No CFG could be retrieved] | Provides a directive that complements the current route into the main layout. Displays a navigable element that represents a sequence number. | template~~d~~ And I would list the usual use-cases instead (e.g. in an ngInclude or in a directive's templateUrl) |
@@ -65,7 +65,6 @@ BuildRequires: ipmctl-devel
BuildRequires: python-devel python3-devel
BuildRequires: Modules
%if 0%{?is_opensuse}
-# have choice for boost-devel needed by cart-devel: boost-devel boost_1_58_0-devel
BuildRequires: boost-devel
%else
# have choice for libcurl.so.4()(64bit) needed by systemd: libcurl4 libcurl4-mini
| [No CFG could be retrieved] | Requires a specific version of a node identifier. infiniath1 - > _infiniath2 - > _infin. | Looks like you need this even on EL7 now. So just move this above line 72 so that it's unconditional now. |
@@ -17,6 +17,9 @@ import (
func createListener() (net.Listener, error) {
path := strings.TrimPrefix(control.Address(), "unix://")
+ if _, err := os.Stat(path); !os.IsNotExist(err) {
+ os.Remove(path)
+ }
dir := filepath.Dir(path)
if _, err := os.Stat(dir); os.IsNotExist(err) {
err = os.MkdirAll(dir, 0755)
| [IsNotExist,Dir,Stat,Listen,Chmod,TrimPrefix,Close,Address,MkdirAll] | createListener creates a listener for the given . | can we check for errors here, if file exists but you're revoked access to it (too many fd, process reading/writing to it already whatever...) this will fail and we wont know |
@@ -175,7 +175,9 @@ public class RunNiFi {
System.out.println("Status : Determine if there is a running instance of Apache NiFi");
System.out.println("Dump : Write a Thread Dump to the file specified by [options], or to the log if no file is given");
System.out.println("Diagnostics : Write diagnostic information to the file specified by [options], or to the log if no file is given. The --verbose flag may be provided as an option before " +
- "the filename, which may result in additional diagnostic information being written.");
+ "the filename, which may result in additional diagnostic information being written.");
+ System.out.println("Status-history : Save the status history to the file specified by [options]. The command parameters are: status-history <number of days> <dumpFile>. The <number of days>" +
+ " parameter is optional and defaults to 1 day.");
System.out.println("Run : Start a new instance of Apache NiFi and monitor the Process, restarting if the instance dies");
System.out.println();
}
| [RunNiFi->[loadProperties->[getStatusFile],getStatus->[isProcessRunning,loadProperties,isPingSuccessful],sendRequest->[loadProperties],main->[RunNiFi,printUsage],start->[getCurrentPort,getStatusFile,getLockFile,start,isAlive,savePidProperties,getHostname],env->[getStatus],status->[isProcessRunning,getStatus],savePidProperties->[getStatusFile],makeRequest->[getCurrentPort],isNiFiFullyLoaded->[getCurrentPort],getStatusFile->[getBootstrapFile,getStatusFile],newThread->[newThread],decommission->[loadProperties,getStatusFile,getCurrentPort,getLockFile,getPidFile],stop->[loadProperties,getStatusFile,getCurrentPort,getLockFile,getPidFile,notifyStop],waitForShutdown->[notifyStop,isProcessRunning],getLockFile->[getBootstrapFile],getPidFile->[getBootstrapFile],killProcessTree->[killProcessTree,getChildProcesses],setNiFiCommandControlPort->[getStatusFile,savePidProperties],getCurrentPort->[loadProperties,isPingSuccessful],writePidFile->[getPidFile]]] | Prints the command line usage. | I think "The excepted command parameters are..." would be more precise. |
@@ -27,11 +27,11 @@ class TestFormatDecimal(KumaTestCase):
num = _format_decimal(1234.567)
assert '1,234.567' == num
- def test_fy_NL_locale(self):
+ def test_pt_BR_locale(self):
"""Falls back to English for unknown babel locales"""
# Note: if this starts to fail for no apparent reason, it's probably
- # because babel learned about fy-NL since this test was written.
- translation.activate('fy-NL')
- assert 'fy-nl' == translation.get_language()
+ # because babel learned about pt-BR since this test was written.
+ translation.activate('pt-BR')
+ assert 'pt-br' == translation.get_language()
num = _format_decimal(1234.567)
assert '1,234.567' == num
| [TestFormatDecimal->[test_xx_YY_locale->[get_language,_format_decimal,activate],test_fr_locale->[_format_decimal,activate],test_fy_NL_locale->[get_language,_format_decimal,activate],test_default_locale->[_format_decimal]]] | Test for missing locales. | NOTE: `babel` doesn't know about the `pt-XX` locales. If it did, the decimal would be formatted as `1.234,567` rather than `1,234.567`. |
@@ -28,5 +28,7 @@ namespace System.Net.Http
public static readonly TimeSpan DefaultPooledConnectionIdleTimeout = TimeSpan.FromMinutes(1);
public static readonly TimeSpan DefaultExpect100ContinueTimeout = TimeSpan.FromSeconds(1);
public static readonly TimeSpan DefaultConnectTimeout = Timeout.InfiniteTimeSpan;
+ public const int DefaultHttp2MaxStreamWindowSize = 16 * 1024 * 1024;
+ public const double DefaultHttp2StreamWindowScaleThresholdMultiplier = 1.0;
}
}
| [HttpHandlerDefaults->[FromMinutes,InfiniteTimeSpan,None,FromSeconds,Manual,MaxValue]] | Default connection idle timeout and default 100 - continue timeout. | I don't think this is the right place for these. The rest of these are defaults for public properties on HttpClientHandler or SocketsHttpHandler. |
@@ -28,11 +28,11 @@ const (
favoritesCacheExpirationTime = time.Hour * 24 * 7 // one week
kbfsFavoritesCacheSubfolder = "kbfs_favorites"
favoritesDiskCacheFilename = "kbfsFavorites.leveldb"
- favoritesDiskCacheVersion = 1
- favoritesDiskCacheStorageVersion = 1
+ favoritesDiskCacheVersion = 2
+ favoritesDiskCacheStorageVersion = 2
)
-var errNoFavoritesCache = errors.New("Disk favorites cache not present")
+var errNoFavoritesCache = errors.New("disk favorites cache not present")
type errIncorrectFavoritesCacheVersion struct {
cache string
| [loop->[handleReq],RefreshCache->[hasShutdown,Add],Get->[hasShutdown,sendReq],Delete->[hasShutdown,sendReq],sendReq->[waitOnReq,closeReq],Initialize->[readCacheFromDisk],Add->[hasShutdown,sendReq,waitOnReq,startOrJoinAddReq],AddAsync->[hasShutdown,Add,startOrJoinAddReq,closeReq],ClearCache->[hasShutdown,Add],handleReq->[ToKBFolder,writeCacheToDisk,closeReq,sendChangesToEditHistory],ToKBFolder->[ToKBFolder]] | ByKeybaseInc. All rights reserved. Returns a KBFolder object representing the user s . | I don't _think_ you need a new storage version for these changes. It seems like you're only adding data/fields, and in that case msgpack does the right thing and will just initialize those fields as empty until you overwrite them. |
@@ -5,7 +5,7 @@ requires a custom partial
-->
<fieldset class="config-authentication-form">
<div
- class="crayons-notice crayons-notice--warning auth-warning <%= provider_keys_configured?(provider.provider_name) ? "hidden" : "" %>">
+ class="crayons-notice crayons-notice--warning auth-warning <%= authentication_enabled_providers.include?(provider.provider_name) ? "hidden" : "" %>">
<strong>Note:</strong> This authentication provider will <strong>not</strong> be enabled if the key or secret are missing. Please make sure that you enter your key and secret correctly.
</div>
<div class="crayons-field">
| [No CFG could be retrieved] | Displays a partial config of the n - lease. Displays a hidden hidden field that contains the value of the n - node ID. | Since we already have a nice `AuthenticationHelper` module, do we maybe want to add a method like `authentication_provider_enabled?(provider_name)` there instead of leaking an implementation detail into the view? We could change related code in a follow-up PR. |
@@ -312,6 +312,18 @@ def custom_op(arg_types: List[RType],
emit, steals, is_borrowed, 0)
+def call_c_op(name: str,
+ arg_types: List[RType],
+ result_type: Optional[RType],
+ c_function_name: str,
+ error_kind: int,
+ priority: int = 1) -> None:
+ ops = call_c_ops.setdefault(name, [])
+ desc = CFunctionDescription(name, arg_types, result_type,
+ c_function_name, error_kind, priority)
+ ops.append(desc)
+
+
# Import various modules that set up global state.
import mypyc.primitives.int_ops # noqa
import mypyc.primitives.str_ops # noqa
| [call_void_emit->[simple_emit],call_and_fail_emit->[simple_emit],name_emit->[simple_emit],call_negative_bool_emit->[simple_emit],call_emit->[simple_emit],call_negative_magic_emit->[negative_int_emit]] | Creates an OpDescription object for a single - valued object of type C_custom. | Similar to above, something with 'method' in it would be a better name. For example, `c_method_op`. (These names will be temporary as we'll eventually remove `method_op`.) |
@@ -143,7 +143,15 @@ public abstract class AbstractInputStreamBuffer extends AbstractStreamingBuffer
try {
result = streamChannel.read(buffer);
} catch (ClosedChannelException e) {
- result = -1;
+ if (stream instanceof FileInputStream && FileInputStream.class.equals(stream.getClass())) {
+ // Delegate FileChannel is being used, handle ClosedChannelException by returning -1.
+ LOGGER.debug("FileChannel closed.", e);
+ result = -1;
+ } else {
+ // ReadableByteChannel is being used, ClosedChannelException is not expected.
+ LOGGER.error("ReadableByteChannel closed.", e);
+ throw e;
+ }
}
return result;
}
| [AbstractInputStreamBuffer->[getBuffer->[get],hardCopy->[get],deallocate->[deallocate],softCopy->[get],get->[get]]] | This method is used to read from the stream and deallocate the buffer if necessary. | why these 2 conditions and not just the instanceof? |
@@ -109,6 +109,11 @@ class Vtk(CMakePackage):
# For finding Fujitsu-MPI wrapper commands
patch('find_fujitsu_mpi.patch', when='@:8.2.0%fj')
+ # Freetype@2.10.3 no longer exports FT_CALLBACK_DEF, this
+ # patch replaces FT_CALLBACK_DEF with simple extern "C"
+ # See https://gitlab.kitware.com/vtk/vtk/-/issues/18033
+ patch('vtk-freetype-2.10.3-replace-FT_CALLBACK_DEF.patch',
+ when='^freetype@2.10.3:')
def url_for_version(self, version):
url = "http://www.vtk.org/files/release/{0}/VTK-{1}.tar.gz"
| [Vtk->[url_for_version->[up_to,format],setup_build_environment->[set],cmake_args->[satisfies,append,Version,spec,extend,format,join],depends_on,extends,conflicts,version,patch,variant]] | Returns the URL for a given version of the VTK. | Can we retrieve the patch from remote and delete it from the repo? |
@@ -12,6 +12,8 @@ import org.kohsuke.args4j.Argument;
@Extension
public class SetBuildDescriptionCommand extends CLICommand implements Serializable {
+ private static final long serialVersionUID = 2690066739899830515L;
+
@Override
public String getShortDescription() {
return Messages.SetBuildDescriptionCommand_ShortDescription();
| [SetBuildDescriptionCommand->[run->[IllegalArgumentException,equals,checkPermission,toString,setDescription,getBuildByNumber],getShortDescription->[SetBuildDescriptionCommand_ShortDescription]]] | Returns the short description of the . | Not sure it is actually needed with the current synchronization methods |
@@ -80,6 +80,18 @@ def _raise_did_you_mean(address_family: AddressFamily, name: str, source=None) -
raise resolve_error from source
raise resolve_error
+@rule
+async def find_build_file(address: Address) -> BuildFileAddress:
+ address_family = await Get[AddressFamily](Dir(address.spec_path))
+ # NB: `address_family.addressables` is a dictionary of `BuildFileAddress`es and we look it up
+ # with an `Address`. This works because `BuildFileAddress` is a subclass, but MyPy warns that it
+ # could be a bug.
+ struct = address_family.addressables.get(address) # type: ignore[call-overload]
+ addresses = address_family.addressables
+ if not struct or address not in addresses:
+ _raise_did_you_mean(address_family, address.target_name)
+ return next(build_address for build_address in addresses if build_address == address)
+
@rule
async def hydrate_struct(address_mapper: AddressMapper, address: Address) -> HydratedStruct:
| [_hydrate->[ResolvedTypeMismatchError],hydrate_struct->[consume_dependencies->[maybe_consume],collect_inline_dependencies->[maybe_append],_raise_did_you_mean,consume_dependencies,collect_inline_dependencies],addresses_with_origins_from_address_families->[_raise_did_you_mean],address_origin_map->[AddressOriginMap]] | Raise an exception if a is not found in the namespace. Recursively collect all the dependencies of a given object and hydrate them into a list of chains. Get a HydratedStruct with a HydratedStruct with a HydratedDependency. | This is prework for the next step of the project: no longer storing `BuildFileAddress` in `HydratedTarget`. Once we make that change, we need this rule so that we have a way to go from `Address -> BuildFileAddress`. |
@@ -221,7 +221,7 @@ func (s *Server) startServer() error {
s.member.MemberInfo(s.cfg, s.Name(), s.rootPath)
s.idAllocator = id.NewAllocatorImpl(s.client, s.rootPath, s.member.MemberValue())
- s.tso = tso.NewTimestampOracle(s.client, s.rootPath, s.member.MemberValue(), s.cfg.TsoSaveInterval.Duration)
+ s.tso = tso.NewTimestampOracle(s.client, s.rootPath, s.member.MemberValue(), s.cfg.TsoSaveInterval.Duration, func() time.Duration { return s.scheduleOpt.LoadPDServerConfig().MaxResetTSGap })
kvBase := kv.NewEtcdKVBase(s.client, s.rootPath)
path := filepath.Join(s.cfg.DataDir, "region-meta")
regionStorage, err := core.NewRegionStorage(path)
| [SetPDServerConfig->[SetPDServerConfig],Run->[startEtcd,startServer],GetMetaRegions->[GetMetaRegions,GetRaftCluster],leaderLoop->[Name,IsClosed],campaignLeader->[createRaftCluster,Name,Close,stopRaftCluster],CheckHealth->[Close],IsNamespaceExist->[IsNamespaceExist],GetLeader->[GetLeader],SetClusterVersion->[SetClusterVersion],DeleteLabelProperty->[DeleteLabelProperty,SetLabelProperty],Close->[Close],GetRaftCluster->[IsClosed],GetNamespaceConfigWithAdjust->[GetNamespaceConfig],SetLabelProperty->[SetLabelProperty]] | startServer starts the Raft cluster. | would you like to split it into multiple lines |
@@ -1,4 +1,4 @@
-<div class="row my-3">
+<nav class="row my-3" aria-label="Brodcasts navigation">
<div class="col">
<ul class="nav nav-pills">
<li class="nav-item">
| [No CFG could be retrieved] | Displays a list of admin broadcasts and a single admin broadcast. Check - and - set tags for a n - node . | It looks like we're missing an "a" in "Broadcasts navigation"! |
@@ -7,12 +7,12 @@ from olympia.access import acl
from olympia.addons.models import Addon
-def owner_or_unlisted_reviewer(request, addon):
+def owner_or_unlisted_viewer(request, addon):
return (
- acl.check_unlisted_addons_reviewer(request)
+ acl.check_unlisted_addons_viewer(request)
# We don't want "admins" here, because it includes anyone with the
# "Addons:Edit" perm, we only want those with
- # "Addons:ReviewUnlisted" perm (which is checked above).
+ # "ReviewerTools:ViewUnlisted" perm (which is checked above).
or acl.check_addon_ownership(request, addon, admin=False, dev=True)
)
| [addon_view->[wrapper->[owner_or_unlisted_reviewer]]] | Provides a view which can be used to view a specific . Returns the object that represents the node ID of a node that is not a reserved node. | As above, the changes you're proposing would subtly change the meaning of this function: with your changes it reads to me as "the user needs to be an owner or an unlisted viewer" when it would actually do "the user needs to be an owner or an unlisted viewer or an unlisted reviewer (with full write access)". |
@@ -0,0 +1,14 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System.Runtime.InteropServices;
+
+internal partial class Interop
+{
+ internal partial class Powrprof
+ {
+ [DllImport(Libraries.Powrprof, ExactSpelling = true, SetLastError = true)]
+ public static extern BOOLEAN SetSuspendState(BOOLEAN bHibernate, BOOLEAN bForce, BOOLEAN bWakeupEventsDisabled);
+ }
+}
| [No CFG could be retrieved] | No Summary Found. | If we are always just calling this by casting local bools to BOOLEAN, why not create a wrapper / helper function(s) which take bools and just do this work for us? |
@@ -1142,8 +1142,9 @@ def _apply_morph_data(morph, stc_from):
def _morph_one(stc_one):
# prepare data to be morphed
- img_to = _interpolate_data(stc_one, morph, mri_resolution=True,
- mri_space=True)
+ img_to = _interpolate_data(stc_one, morph,
+ mri_resolution=mri_resolution,
+ mri_space=mri_space)
# reslice to match morph
img_to, img_to_affine = reslice(
| [_apply_morph_data->[_morph_one->[_interpolate_data,_get_zooms_orig],_morph_one],_compute_morph_sdr->[_check_dep],_morph_buffer->[_morph_buffer],_morphed_stc_as_volume->[_check_dep],read_source_morph->[SourceMorph],_interpolate_data->[_check_dep,_get_src_data]] | Apply a morph to one source estimate from one subject to another. find the missing data in the system Estimate the source from a single vertex to a single vertex. | In `_apply_morph_data` the arguments to `_interpolate_data` were always True/True... |
@@ -18,7 +18,11 @@ namespace Dynamo.WorkspaceDependency
public class WorkspaceDependencyViewExtension : IViewExtension, ILogSource
{
internal MenuItem workspaceReferencesMenuItem;
- private const String extensionName = "Workspace References";
+ private const string extensionName = "Workspace References";
+ private const string pythonPackage = "DSIronPython_Test";
+ private readonly Version pythonPackageVersion = new Version(1, 0, 7);
+
+ private ICustomNodeManager customNodeManager;
internal WorkspaceDependencyView DependencyView
{
| [WorkspaceDependencyViewExtension->[Shutdown->[Dispose]]] | Extension for the workspace - dependent view. OnMessageLogged - Called when a message is logged - Calls the method of the object that. | Can we download the latest version of a package from PM by default because currently, AFAIK, we have to specify the exact version? Or better yet, can we just publish a 1.0.0 version of the IronPython extension package to prod and never change it? :) |
@@ -976,6 +976,15 @@ func (a *APIServer) uploadOutput(pachClient *client.APIClient, dir string, tag s
if err := putObjsClient.CloseSend(); err != nil {
return err
}
+ // Be sure that the stream finished successfully.
+ for {
+ if err := putObjsClient.RecvMsg(nil); err != nil {
+ if err == io.EOF {
+ break
+ }
+ return err
+ }
+ }
// Serialize datum hashtree
b := &bytes.Buffer{}
if err := tree.Serialize(b); err != nil {
| [cancelCtxIfJobFails->[Logf],getTaggedLogger->[DatumID],getHashtrees->[Close],uploadOutput->[reportUploadStats,Close,Logf,Write],getCommitDatums->[Close],userLogger->[clone],worker->[cancelCtxIfJobFails,acquireDatums,Logf,getParentCommitInfo,mergeDatums,getCommitDatums,Close],Write->[Logf,Write],getParentHashTree->[getParentCommitInfo],downloadData->[Logf,downloadGitData,reportDownloadTimeStats],reportUserCodeStats->[Logf],reportDeferredUserCodeStats->[Logf],writeStats->[Close,Write],merge->[Close],getChunk->[GetChunk],mergeDatums->[Logf,Close],mergeChunk->[Logf],reportUploadStats->[Logf],reportDownloadSizeStats->[Logf],processDatums->[DatumID,getTaggedLogger,Logf,downloadData,userCodeEnv,uploadOutput,runUserErrorHandlingCode,linkData,reportDownloadSizeStats,unlinkData,runUserCode],runUserCode->[Logf,userLogger,reportDeferredUserCodeStats,reportUserCodeStats],reportDownloadTimeStats->[Logf],runUserErrorHandlingCode->[Logf,userLogger],Logf,Close,Write,getTaggedLogger] | uploadOutput uploads the output of the process to the remote object store. empty - test pipeline that does nothing This changes realPath from pfs input to scratch PutFile - upload a file to object storage walking output is the output of the putObjsClient and putObjsClient. | Won't this panic if you don't pass in a message to deserialize into? |
@@ -56,11 +56,14 @@ public class TestLoadDump {
}
@Test
- public void testReadDump() {
+ public void testReadDump() throws IOException {
Path dumpPath = getDumpPath();
Schema schema = ReflectData.get().getSchema(Record.class);
DatumReader<Record> datumReader = new ReflectDatumReader<>(schema);
int count = 0;
+ if (writeToOuput) {
+ openWriter(OUTPUT_FILE, schema);
+ }
try (DataFileReader<Record> dataFileReader = new DataFileReader<>(dumpPath.toFile(), datumReader)) {
while (dataFileReader.hasNext()) {
Record record = dataFileReader.next();
| [TestLoadDump->[getDumpPath->[getResource,toPath],testReadDump->[hasNext,getDumpPath,next,getSchema,StreamRuntimeException,doSomething,toFile],doSomething->[assertTrue,assertEquals,getData,getKey]]] | This method test read dump. | You could import statically `UTF_8` to have a one-lined declaration. |
@@ -520,6 +520,8 @@ export class AmpSlideScroll extends BaseSlides {
setStyle(this.slideWrappers_[i], 'order', '');
}
this.slideWrappers_[i].classList.remove(SHOWN_CSS_CLASS);
+ this.slides_[i] &&
+ this.slides_[i].setAttribute('aria-hidden', 'true');
}
// Pause if not the current slide
if (this.slideIndex_ != i) {
| [AmpSlideScroll->[hideRestOfTheSlides_->[indexOf,setStyle],triggerAnalyticsEvent_->[dev,abs],updateViewportState->[dev],analyticsEvent_->[triggerEvent],constructor->[platformFor,isAndroid,isFirefox],cancelTouchEvents_->[stopPropagation],isLayoutSupported->[isLayoutSizeDefined],moveSlide->[dev],touchMoveHandler_->[timerFor],animateScrollLeft_->[resolve,interpolate,dev,numeric,animate,bezierCurve],onLayoutMeasure->[dev],layoutCallback->[resolve],scrollHandler_->[timerFor],buildSlides->[getAttribute,appendChild,analyticsForOrNull,classList,toString,getStyle],touchEndHandler_->[timerFor],showSlide_->[dev,setStyle,forEach,push],getNextSlideIndex_->[round]]] | Hide the rest of the slides. | these are display none so `aria-hidden` is not needed here. |
@@ -59,6 +59,15 @@ class ShardedDatasetReader(DatasetReader):
# all of the instances within each shard are used.
self.reader.manual_distributed_sharding = True
+ # ShardedDatasetReader is a wrapper for the original base_reader so some of the parameters like 'lazy'
+ # can be safely inherited. However, ShardedDatasetReader is a class instance of a DatasetReader as well.
+ # So we give priority to the parameters for the current instance stored in 'kwargs'.
+ # If not present, we check the ones in the base reader
+ for attr_name, attr_val in self.reader.__dict__.items():
+ # copy over only shared attributes between the two classes
+ if attr_name in self.__dict__:
+ setattr(self, attr_name, kwargs.get(attr_name, attr_val))
+
def text_to_instance(self, *args, **kwargs) -> Instance:
"""
Just delegate to the base reader text_to_instance.
| [ShardedDatasetReader->[text_to_instance->[text_to_instance]]] | Initialize a base reader with a random nanomon. | This makes me a little nervous. I'd rather just explicitly set only the attributes we care about (`lazy` and mabye `max_instances`). Although, I'm not sure about `max_instances`... Setting `max_instances` in the `base_reader` but not in the `ShardedDatasetReader` itself actually has clear and well-defined behavior: at most `max_instances` will be read from *each* shard. |
@@ -155,6 +155,7 @@ def model_pipelines(argv):
def model_pcollection(argv):
"""Creating a PCollection from data in local memory."""
+ # [START model_pcollection]
from apache_beam.utils.pipeline_options import PipelineOptions
class MyOptions(PipelineOptions):
| [examples_wordcount_debugging->[FilterTextFn,RenameFiles],pipeline_monitoring->[CountWords->[expand->[FormatCountsFn,ExtractWordsFn]],CountWords,RenameFiles],model_textio_compressed->[RenameFiles],examples_wordcount_minimal->[RenameFiles],construct_pipeline->[ReverseWords,RenameFiles],pipeline_logging->[ExtractWordsFn],examples_wordcount_wordcount->[FormatAsTextFn,CountWords,RenameFiles],model_custom_source->[ReadFromCountingSource->[expand->[_CountingSource]],ReadFromCountingSource,CountingSource],model_composite_transform_example->[CountWords],model_textio->[RenameFiles],model_multiple_pcollections_partition->[partition_fn->[get_percentile]],model_custom_sink->[WriteToKVSink->[expand->[_SimpleKVSink]],SimpleKVSink,WriteToKVSink]] | Create a PCollection from data in local memory. | I do not think this needs to go up and include the definition for options to show how `Create` works. |
@@ -34,7 +34,8 @@ type outputController struct {
monitors Monitors
observer outputObserver
- queue queue.Queue
+ queue queue.Queue
+ workQueue workQueue
retryer *retryer
consumer *eventConsumer
| [Close->[Close,sigPause,close],Reload->[Set,Name,Unpack],Set->[sigOutputAdded,updateOutputGroup,Close,sigPause,sigOutputRemoved,sigContinue,updOutput],sigContinue] | Creates a new instance of the type. newOutputController creates a new outputController from a given . | This is another change I made, to simplify things. Now the output controller creates a work queue in it's constructor and the same one is used by all output workers across time. This removes the need to drain the old work queue to a new one when outputs are reloaded and new output workers are created in the process. |
@@ -38,8 +38,8 @@ import io.apicurio.datamodels.openapi.v2.models.Oas20ParameterDefinitions;
import io.apicurio.datamodels.openapi.v2.models.Oas20Response;
import io.apicurio.datamodels.openapi.v2.models.Oas20Schema;
import io.syndesis.common.model.DataShape;
-import io.syndesis.common.model.DataShapeKinds;
-import io.syndesis.common.model.DataShapeMetaData;
+import io.syndesis.server.api.generator.openapi.DataShapeGenerator;
+import io.syndesis.server.api.generator.openapi.UnifiedJsonDataShapeSupport;
import io.syndesis.server.api.generator.openapi.util.JsonSchemaHelper;
import io.syndesis.server.api.generator.openapi.util.OasModelHelper;
import org.apache.commons.lang3.StringUtils;
| [UnifiedJsonDataShapeGenerator->[createSchemaFromProperty->[createPropertySchema],createSchemaFor->[addEnumsTo]]] | Imports all the elements of the given object. Creates a data shape from the given JSON object. | Perhaps this can be removed now, not as many methods in here any more |
@@ -20,8 +20,8 @@ namespace System.Text.Json
/// The original JsonPropertyInfo that is not changed. It contains all properties.
/// </summary>
/// <remarks>
- /// For objects, it is either the policy property for the class or the current property.
- /// For collections, it is either the policy property for the class or the policy property for the current element.
+ /// For objects, it is either the "type property" for the class or the current property.
+ /// For collections, it is either the "type property" for the class or the "type property" for the current element.
/// </remarks>
public JsonPropertyInfo? DeclaredJsonPropertyInfo;
| [WriteStackFrame->[JsonConverter->[GetOrAddClass,PolicyProperty,ConverterBase],Reset->[EndProperty],EndDictionaryElement->[None],EndProperty->[None]]] | Plots a single object in the System. Collections. IEnumerable format. - A type of object that is not the policy property. | Since this is a "special" `JsonPropertyInfo`, maybe it should be renamed to reflect that more explicitly. Same elsewhere. |
@@ -553,6 +553,7 @@ PUENTE = {
# in DOMAIN_METHODS.
# http://github.com/jbalogh/zamboni/blob/d4c64239c24aa2f1e91276909823d1d1b290f0ee/settings.py#L254
STANDALONE_DOMAINS = ['django', 'javascript']
+STATICI18N_ROOT = 'build/locale'
STATICI18N_DOMAIN = 'javascript'
PIPELINE_DISABLE_WRAPPER = True
| [get_user_url->[reverse],get_locales->[_Language,items,join,open,load],JINJA_CONFIG->[MemcachedBytecodeCache,isinstance],abspath,path,node,_,dict,dirname,namedtuple,setup_loader,sorted,tuple,dumps,join,items,get_locales,%,lower,reverse_lazy] | Config for a specific object. This module provides a mapping between pipeline. compressors. CleanCSSCompressor and pipeline. | Shouldn't we use the default here? `djangojs`? |
@@ -379,7 +379,7 @@ int write_image(dt_imageio_module_data_t *jpg_tmp, const char *filename, const v
}
}
- uint8_t *row = malloc((size_t)3 * jpg->global.width * sizeof(uint8_t));
+ uint8_t *row = dt_alloc_align(64, (size_t)3 * jpg->global.width * sizeof(uint8_t));
const uint8_t *buf;
while(jpg->cinfo.next_scanline < jpg->cinfo.image_height)
{
| [No CFG could be retrieved] | defines the color space of the image that is used to display the color space of the read_header read header of image and return index of header in image. | This can't be the fix as those are only for jpeg export. |
@@ -160,11 +160,11 @@ end
#
# Indexes
#
-# index_bookmarks_on_post_id (post_id)
-# index_bookmarks_on_reminder_at (reminder_at)
-# index_bookmarks_on_reminder_set_at (reminder_set_at)
-# index_bookmarks_on_reminder_type (reminder_type)
-# index_bookmarks_on_topic_id (topic_id)
-# index_bookmarks_on_user_id (user_id)
-# index_bookmarks_on_user_id_and_post_id (user_id,post_id) UNIQUE
+# index_bookmarks_on_post_id (post_id)
+# index_bookmarks_on_reminder_at (reminder_at)
+# index_bookmarks_on_reminder_set_at (reminder_set_at)
+# index_bookmarks_on_reminder_type (reminder_type)
+# index_bookmarks_on_topic_id (topic_id)
+# index_bookmarks_on_user_id (user_id)
+# index_bookmarks_on_user_id_and_post_id_and_topic_id (user_id,post_id,topic_id) UNIQUE
#
| [Bookmark->[auto_delete_when_reminder_sent?->[auto_delete_preferences],auto_delete_on_owner_reply?->[auto_delete_preferences]]] | INDEXES - Bookmarks ON post ID - Topic ID - Topic ID - Post ID -. | Am I right to say that if `post_id` is present, `topic_id` will be nil and vice versa? If that is the case, shouldn't we maintain two index of `user_id, topic_id` and `user_id, post_id` instead? |
@@ -2570,7 +2570,7 @@ namespace ProtoCore
Options.ExecutionMode,
traceData);
- CallsiteCache.Add(graphNode.UID, csInstance);
+ CallsiteCache.Add(graphNode.CallSiteIdentifier, csInstance);
CallSiteToNodeMap[csInstance.CallSiteID] = graphNode.guid;
ASTToCallSiteMap[graphNode.AstID] = csInstance;
| [Options->[Dispose],FEventSink->[AddText],Core->[GetCurrentBlockId->[GetCodeBlock],Cleanup->[OnDispose],GetCodeBlock->[GetCodeBlock],BfsBuildInstructionStreams->[BfsBuildInstructionStreams],StackValue->[SetUpBounce],ResetForDeltaASTExecution->[ResetForExecution],BfsBuildSequenceTable->[BfsBuildSequenceTable],OnDispose->[Dispose],BfsBuildProcedureTable->[BfsBuildProcedureTable],GenerateExecutable->[GenerateExprExe,BfsBuildInstructionStreams,BfsBuildSequenceTable,BfsBuildProcedureTable],ResetForDeltaExecution->[ResetDeltaCompile],CallSite->[GetAndRemoveTraceDataForNode],ResetAll],DebugProperties->[SetUpCallrForDebug->[SetUpCallr,DebugStackFrameContains,FindEndPCForAssocGraphNode],SetUpStepOverFunctionCalls->[FindEndPCForAssocGraphNode],RestoreCallrForNoBreak->[DebugStackFrameContains]]] | Get a call site for a given method. | .Add() => CallsiteCache[graphNode.CallsiteIdentifier] = csInstance so that the style is consistent. |
@@ -427,10 +427,10 @@ public class PbemSetupPanel extends SetupPanel implements Observer {
void writeToDisk() {
synchronized (mutex) {
try (FileOutputStream fout = new FileOutputStream(file, false);
- ObjectOutputStream out = new ObjectOutputStream(fout)) {
+ final ObjectOutputStream out = new ObjectOutputStream(fout)) {
out.writeObject(map);
} catch (final IOException e) {
- ClientLogger.logQuietly("failed to write local bean cache", e);
+ log.log(Level.SEVERE, "failed to write local bean cache", e);
}
}
}
| [PbemSetupPanel->[update->[loadAll,layoutComponents]]] | Writes the cache to disk. | `final` not required. |
@@ -743,8 +743,7 @@ func TestManualControlOfRevisionWithoutCache(t *testing.T) {
require.Equal(t, delRes.Revision, 3)
}
-// TestKVStoreLocalRace tests that multiple requests at the same time are caught by the server
-// and do not wreck the local revision cache.
+// TestKVStoreLocalRace tests that multiple requests at the same time do not cause errors
func TestKVStoreLocalRace(t *testing.T) {
tc := kvTestSetup(t)
defer tc.Cleanup()
| [Box->[NewKVStoreBoxer,BoxMutateRevision,G,Box],Unbox->[NewKVStoreBoxer,UnboxMutateTeamGen,UnboxMutateCiphertext,G,Unbox],NewKVRevisionCache,NewMetaContextForTest,Encode,Add,Done,PutKVEntry,DelKVEntry,Put,Error,MatchString,Marshal,GetKVRevisionCache,SetupTest,ListKVEntries,ListKVNamespaces,Ctx,CreateRootTeam,NotNil,NotEqual,MustCompile,GetKVEntry,Logf,Wait,SetKVRevisionCache,EqualValues,Equal,Cleanup,ServiceInit,Contains,NewContextified,Regexp,PerTeamKeyGeneration,NoError,Fatalf,DecodeString,Check,Sprintf,Fail,Background,RemoveMember,Decode,NotEmpty,RandBytes,RotateKeyVisible,CreateAndSignupFakeUser,AddMember,EncodeToString,IsType,TODO,Inspect,True] | TestKVStoreLocalRace tests that a user has a unique identifier and has a unique t - The type of error err - The type of error t - The type of error. | is it worth testing that multiple requests at the same time from multiple clients (as in, multiple handlers with distinct local revision cache instances) doesn't cause unexpected errors? |
@@ -123,6 +123,9 @@ class ParameterServerStrategy(distribute_lib.Strategy):
len(self.extended.parameter_devices))
def experimental_distribute_dataset(self, dataset, options=None):
+ if options and options.replication_mode == distribute_lib.InputReplicationMode.PER_REPLICA:
+ raise NotImplementedError("InputReplicationMode.PER_REPLICA "
+ "is only supported in `experimental_distribute_datasets_from_function`.")
self._raise_pss_error_if_eager()
super(ParameterServerStrategy,
self).experimental_distribute_dataset(dataset=dataset,
| [ParameterServerStrategyExtended->[_reduce_to->[_verify_destinations_not_different_worker],_distribute_datasets_from_function->[_input_workers_with_options],_input_workers->[_input_workers_with_options],_configure->[_initialize_multi_worker],_batch_reduce_to->[_verify_destinations_not_different_worker],_experimental_distribute_dataset->[_input_workers_with_options],_update->[_select_single_value],_create_variable->[var_creator]]] | Distribute a dataset to the experimental distribution. | Can you also add this error to tpu_strategy.py ? |
@@ -106,13 +106,7 @@ module SubmissionsHelper
g[:tags] = grouping.tags
g[:commit_date] = grouping.last_commit_date
g[:has_files] = grouping.has_files_in_submission?
- g[:late_commit] =
- # TODO: Enable this check for Git backend. See issue #1866.
- if MarkusConfigurator.markus_config_repository_type == 'git'
- false
- else
- grouping.past_due_date?
- end
+ g[:late_commit] = grouping.past_due_date?
g[:grace_credits_used] =
if assignment.submission_rule.is_a? GracePeriodSubmissionRule
grouping.grace_period_deduction_single
| [get_tr_class->[is_peer_review?,is_collected?,error_collecting],set_pr_release_on_results->[group_name,save!,raise,t,each,released_to_students,peer_reviews_to_others,map],get_exit_directory->[directories_at_path,split,nil?,timestamp,last_modified_date,image_tag,link_to,join,user_id,l],get_directories_info->[last_modified_date,image_tag,object_id,link_to,join,user_id,l,map],get_files_info->[last_modified_date,image_tag,object_id,link_to,user_id,l,map],get_repo_browser_table_info->[directories_at_path,get_exit_directory,path_exists?,get_directories_info,get_files_info,files_at_path,join,repository_folder,id],sanitize_file_name->[gsub,nil?],set_release_on_results->[marking_completed?,group_name,get_latest_result,released_to_students,has_submission?,save,raise,each,t],get_grouping_name_url->[is_a_review?,empty?,edit_assignment_submission_result_path,view_marks_assignment_submission_result_path,is_collected?,submission_id,url_for,assignment,id],get_url_peer->[is_collected?,url_for],get_submissions_table_info->[new,find,group_name,has_files_in_submission?,view_marks_assignment_submission_result_path,group_id,url_for,join,first,order,map,nil?,final_grade,is_a?,last_commit_date,repository_name,message,log,result,is_peer_review?,repo_browser_assignment_submission_path,select,past_due_date?,tags,get_tr_class,is_a_reviewer?,instance,with_index,submission,get_grouping_name_url,grouping,edit_assignment_result_path,id,marking_state,parent_assignment,section,current_result,student?,markus_config_repository_type,result_id,review_for,get_group_name,grace_period_deduction_single],remark_in_progress->[marking_state,remark_result],remark_complete_but_unreleased->[released_to_students,marking_state,remark_result],find_appropriate_grouping->[accepted_grouping_for,admin?,find,ta?],include] | Get the submissions table info for a given assignment and a list of groupings get the object for this assignment. | @adisandro The previous issue here was about performance, not correctness. Just want to make sure you're aware of that and tried this out on a fairly large set of submissions. |
@@ -39,6 +39,17 @@ class Mummer(Package):
patch('Makefile.patch')
patch('scripts-Makefile.patch')
+ def patch(self):
+ """Fix mummerplot's use of defined on hashes (deprecated
+ since perl@5.6 made illegal in perl@5.20."""
+
+ # only fix this for versions where it is actually
+ # an error, not just deprecated.
+ if not self.spec.satisfies('^perl@5.20:'):
+ return
+
+ filter_file(r'defined \(%', '(%', 'scripts/mummerplot.pl')
+
def install(self, spec, prefix):
if self.run_tests:
make('check')
| [Mummer->[install->[join_path,install,format,mkdirp,make],depends_on,version,patch]] | Installs the nucmer binary. | If you use `string=True`, you won't have to escape the parenthesis. |
@@ -99,7 +99,7 @@ public class EqualsNotOverriddenInSubclassCheck extends SubscriptionBaseVisitor
private boolean hasEqualsMethod(TypeSymbol superClassSymbol) {
List<Symbol> equalsMembers = superClassSymbol.members().lookup("equals");
for (Symbol symbol : equalsMembers) {
- if (isEqualsMethod(symbol)) {
+ if (isEqualsMethod(symbol) && !symbol.isFinal()) {
return true;
}
}
| [EqualsNotOverriddenInSubclassCheck->[hasAtLeastOneField->[isField,members],isEqualsMethod->[isKind,is,isEmpty],parentClassImplementsEquals->[getSuperclass,superClass,hasEqualsMethod,getSymbolType,is,isTagged,getSymbol],implementsEquals->[getSymbol,hasEqualsMethod],isField->[contains,is],nodesToVisit->[of],visitNode->[hasAtLeastOneField,parentClassImplementsEquals,addIssue,implementsEquals,hasSemantic],hasEqualsMethod->[isEqualsMethod,lookup]]] | Checks if superClassSymbol has equals method. | please at least rename the method : hasNotFinalEqualsMethod. |
@@ -145,11 +145,11 @@ if (isset($_POST['products_id']) && isset($_POST['categories_id'])) {
WHERE products_id = '" . $products_id . "'");
$db->Execute("UPDATE " . TABLE_PRODUCTS . " SET
- metatags_title_status = '" . zen_db_input($metatags_status->fields['metatags_title_status']). "',
- metatags_products_name_status = '" . zen_db_input($metatags_status->fields['metatags_products_name_status']). "',
- metatags_model_status = '" . zen_db_input($metatags_status->fields['metatags_model_status']). "',
- metatags_price_status= '" . zen_db_input($metatags_status->fields['metatags_price_status']). "',
- metatags_title_tagline_status = '" . zen_db_input($metatags_status->fields['metatags_title_tagline_status']). "'
+ metatags_title_status = '" . zen_db_input($metatags_status->fields['metatags_title_status']) . "',
+ metatags_products_name_status = '" . zen_db_input($metatags_status->fields['metatags_products_name_status']) . "',
+ metatags_model_status = '" . zen_db_input($metatags_status->fields['metatags_model_status']) . "',
+ metatags_price_status= '" . zen_db_input($metatags_status->fields['metatags_price_status']) . "',
+ metatags_title_tagline_status = '" . zen_db_input($metatags_status->fields['metatags_title_tagline_status']) . "'
WHERE products_id = " . $dup_products_id);
$metatags_descriptions = $db->Execute("SELECT language_id, metatags_title, metatags_keywords, metatags_description
| [MoveNext,Execute,add_session,notify,Insert_ID] | Copy attributes from existing products to new ones Insert a new row in the meta tags table for each language. | Aren't all of these integer values? Shouldn't `zen_db_input` basically be replaced with `(int)` and the single quotes removed from around the value (in addition to standardizing the text to have the additional space before the period and the extra parentheses removed from around the variable associated with `zen_db_input`)? |
@@ -18,10 +18,12 @@
# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+import os,sys
import json
import yaml
import psutil
import socket
+from pathlib import Path
from .constants import ERROR_INFO, NORMAL_INFO, WARNING_INFO, COLOR_RED_FORMAT, COLOR_YELLOW_FORMAT
def get_yml_content(file_path):
| [print_warning->[print],detect_port->[socket,connect,int,close],get_yml_content->[print,open,load],print_normal->[print],print_error->[print],detect_process->[is_running,Process],get_json_content->[print,open,load]] | Load yaml file content. | `import sys` the next line |
@@ -1,7 +1,7 @@
# frozen_string_literal: true
class MyModule < ApplicationRecord
- SEARCHABLE_ATTRIBUTES = %i(name description).freeze
+ SEARCHABLE_ATTRIBUTES = ['my_modules.name', 'my_modules.description']
include ArchivableModel
include SearchableModel
| [MyModule->[archived_branch?->[archived_branch?],space_taken->[space_taken],navigable?->[navigable?]]] | The application record is a special case for the application model that is not a module. Many - to - many relationships between experiment and experiment. | Style/MutableConstant: Freeze mutable objects assigned to constants. |
@@ -118,8 +118,8 @@ class Field:
required: ClassVar[bool] = False
# Subclasses may define these.
- deprecated_removal_version: ClassVar[str | None] = None
- deprecated_removal_hint: ClassVar[str | None] = None
+ removal_version: ClassVar[str | None] = None
+ removal_hint: ClassVar[str | None] = None
@final
def __init__(self, raw_value: Optional[Any], address: Address) -> None:
| [Sources->[path_globs->[_prefix_glob_with_address],_prefix_glob_with_address->[prefix_glob_with_dirpath],can_generate->[get],validate_resolved_files->[InvalidFieldException]],ExplicitlyProvidedDependencies->[maybe_warn_of_ambiguous_dependency_inference->[any_are_covered_by_includes,remaining_after_ignores],disambiguated_via_ignores->[any_are_covered_by_includes,remaining_after_ignores]],DictStringToStringSequenceField->[compute_value->[InvalidFieldTypeException]],FieldSet->[create->[_get_field_set_fields_from_target],applicable_target_types->[class_has_fields],is_applicable->[opt_out,has_fields]],_get_field_set_fields_from_target->[get],StringField->[compute_value->[InvalidFieldChoiceException]],generate_subtarget->[has_field,generate_subtarget_address],SequenceField->[compute_value->[InvalidFieldTypeException]],targets_with_sources_types->[has_field,get],BoolField->[compute_value->[InvalidFieldTypeException]],ScalarField->[compute_value->[InvalidFieldTypeException]],Target->[has_fields->[_has_fields],class_field_types->[_find_plugin_fields],class_get_field->[class_field_types],__getitem__->[_maybe_get],get->[_maybe_get],_maybe_get->[_find_registered_field_subclass],class_has_fields->[_has_fields,class_field_types],_has_fields->[_find_registered_field_subclass]],DictStringToStringField->[compute_value->[InvalidFieldTypeException]]] | Initialize the object with raw value. | Now this aligns with deprecating options. |
@@ -32,7 +32,14 @@ async def test_create_chat_thread():
thread_id = "19:bcaebfba0d314c2aa3e920d38fa3df08@thread.v2"
async def mock_send(*_, **__):
- return mock_response(status_code=201, json_payload={"id": thread_id})
+ return mock_response(status_code=201, json_payload={
+ "chatThread": {
+ "id": thread_id,
+ "topic": "test topic",
+ "createdOn": "2020-12-03T21:09:17Z",
+ "createdBy": "8:acs:57b9bac9-df6c-4d39-a73b-26e944adf6ea_9b0110-08007f1041"
+ }
+ })
chat_client = ChatClient("https://endpoint", credential, transport=Mock(send=mock_send))
| [test_get_thread_client->[ChatClient,get_chat_thread_client],test_create_chat_thread->[mock_send->[mock_response],ChatClient,ChatThreadParticipant,CommunicationUser,create_chat_thread,utcnow,Mock],test_delete_chat_thread->[mock_send->[mock_response],ChatClient,Mock,delete_chat_thread],test_get_chat_thread->[mock_send->[mock_response],ChatClient,Mock,get_chat_thread],test_list_chat_threads->[mock_send->[mock_response],ChatClient,append,len,list_chat_threads,Mock],test_create_chat_thread_raises_error->[mock_send->[mock_response],ChatClient,ChatThreadParticipant,CommunicationUser,create_chat_thread,utcnow,Mock],AccessToken,Mock,now] | Test creating a chat thread with a specific thread id. | is this a mock user(not real one)? |
@@ -0,0 +1,16 @@
+import unittest
+from op_test_util import OpTestMeta
+import numpy as np
+
+
+class TestMeanOp(unittest.TestCase):
+ __metaclass__ = OpTestMeta
+
+ def setUp(self):
+ self.type = "mean"
+ self.X = np.random.random((32, 784)).astype("float32")
+ self.Out = np.mean(self.X)
+
+
+if __name__ == '__main__':
+ unittest.main()
| [No CFG could be retrieved] | No Summary Found. | no real test here ? check if mean_op's output equals inputs's mean |
@@ -36,17 +36,6 @@ namespace ILCompiler
_commandLineOptions = commandLineOptions;
}
- private void Help(string helpText)
- {
- Console.WriteLine();
- Console.Write("Microsoft (R) CoreCLR Native Image Generator");
- Console.Write(" ");
- Console.Write(typeof(Program).GetTypeInfo().Assembly.GetName().Version);
- Console.WriteLine();
- Console.WriteLine();
- Console.WriteLine(helpText);
- }
-
private void InitializeDefaultOptions()
{
// We could offer this as a command line option, but then we also need to
| [Program->[Run->[ProcessCommandLine,InitializeDefaultOptions],InnerMain->[Run,DumpReproArguments]]] | Help prints the help text and initializes the default options. | I assume this became dead code after some refactoring. Do we need to track adding the logo back somewhere? All Microsoft command line tools I know of print what they are, so maybe this is mandated somewhere. |
@@ -1306,6 +1306,14 @@ def set_tf_cuda_compute_capabilities(environ_cp):
if ver < 3:
print('Only compute capabilities 3.0 or higher are supported.')
all_valid = False
+ elif warning_flag = False and float(compute_capability) < 3.5:
+ warning_flag = True
+
+ if warning_flag:
+ print('Warning: TensorFlow can be build with CUDA compute capabilities ' \
+ 'higher than 3.0 but it works with compute capabilities >= 3.5 ' \
+ 'only. You may remove all compute capabilities lesser than 3.5 ' \
+ 'to reduce the build time.')
if all_valid:
break
| [set_cc_opt_flags->[is_windows,write_to_bazelrc,is_ppc64le],set_build_var->[write_to_bazelrc,get_var],set_computecpp_toolkit_path->[toolkit_exists->[is_linux],prompt_loop_or_load_from_env,write_action_env_to_bazelrc],get_python_major_version->[run_shell],set_clang_cuda_compiler_path->[write_action_env_to_bazelrc,get_from_env_or_user_or_default],create_android_ndk_rule->[cygpath,is_windows,prompt_loop_or_load_from_env,is_cygwin,is_macos,write_action_env_to_bazelrc],set_tf_cuda_clang->[set_action_env_var],set_tf_cudnn_version->[UserInputError,run_shell,cygpath,is_windows,is_cygwin,is_macos,get_from_env_or_user_or_default,is_linux,write_action_env_to_bazelrc,reformat_version_sequence],set_trisycl_include_dir->[write_action_env_to_bazelrc,get_from_env_or_user_or_default],setup_python->[cygpath,is_windows,get_input,is_cygwin,get_python_major_version,write_to_bazelrc,get_python_path,write_action_env_to_bazelrc],check_ndk_level->[is_cygwin,cygpath,is_windows],set_host_c_compiler->[prompt_loop_or_load_from_env,write_action_env_to_bazelrc],main->[set_cc_opt_flags,is_windows,config_info_line,set_build_var,set_computecpp_toolkit_path,is_macos,set_clang_cuda_compiler_path,create_android_ndk_rule,is_ppc64le,set_tf_cuda_clang,set_tf_cudnn_version,set_trisycl_include_dir,cleanup_makefile,setup_python,set_host_c_compiler,set_tf_download_clang,set_gcc_host_compiler_path,set_tf_nccl_install_path,set_other_mpi_vars,is_linux,write_action_env_to_bazelrc,set_tf_cuda_compute_capabilities,set_action_env_var,set_windows_build_flags,create_android_sdk_rule,set_other_cuda_vars,get_var,set_tf_tensorrt_install_path,write_to_bazelrc,check_bazel_version,UserInputError,reset_tf_configure_bazelrc,set_system_libs_flag,set_tf_cuda_version,configure_apple_bazel_rules,set_host_cxx_compiler,set_mpi_home],set_tf_download_clang->[set_action_env_var],set_gcc_host_compiler_path->[prompt_loop_or_load_from_env,write_action_env_to_bazelrc],set_tf_nccl_install_path->[UserInputError,run_shell,cygpath,is_windows,is_cygwin,is_macos,get_from_env_or_user_or_default,is_linux,write_action_env_to_bazelrc,reformat_version_sequence],set_other_mpi_vars->[sed_in_place,symlink_force],set_tf_cuda_compute_capabilities->[get_from_env_or_user_or_default,write_action_env_to_bazelrc,get_native_cuda_compute_capabilities],write_action_env_to_bazelrc->[write_to_bazelrc],set_windows_build_flags->[write_to_bazelrc,get_var],set_action_env_var->[get_var,write_action_env_to_bazelrc],create_android_sdk_rule->[cygpath,is_windows,prompt_loop_or_load_from_env,is_cygwin,is_macos,write_action_env_to_bazelrc],get_native_cuda_compute_capabilities->[run_shell],set_other_cuda_vars->[write_to_bazelrc],get_var->[UserInputError,get_input],prompt_loop_or_load_from_env->[UserInputError,get_from_env_or_user_or_default],set_tf_tensorrt_install_path->[UserInputError,find_libs,get_var,run_shell,convert_version_to_int,get_from_env_or_user_or_default,is_cuda_compatible,is_linux,write_action_env_to_bazelrc],is_cuda_compatible->[run_shell,convert_version_to_int],check_bazel_version->[run_shell,convert_version_to_int],get_python_path->[run_shell],set_system_libs_flag->[write_to_bazelrc,write_action_env_to_bazelrc],set_tf_cuda_version->[UserInputError,cygpath,is_windows,is_cygwin,is_macos,get_from_env_or_user_or_default,is_linux,write_action_env_to_bazelrc,reformat_version_sequence],configure_apple_bazel_rules->[is_macos],get_from_env_or_user_or_default->[get_input],set_host_cxx_compiler->[prompt_loop_or_load_from_env,write_action_env_to_bazelrc],set_mpi_home->[prompt_loop_or_load_from_env],main] | Set TF_CUDA_COMPUTE_CAPABILITIES if necessary. Set TF_CUDA_COMPUTE_CAPABILITIES to the value of . | Configure script prints a lot. I fear that this may get lost among all the messages. Should we just print the message and call sys.exit(1) here? |
@@ -49,7 +49,7 @@ public class SSLContextFactory {
private final KeyManager[] keyManagers;
private final TrustManager[] trustManagers;
- public SSLContextFactory(final NiFiProperties properties) throws NoSuchAlgorithmException, CertificateException, FileNotFoundException, IOException, KeyStoreException, UnrecoverableKeyException {
+ public SSLContextFactory(final NiFiProperties properties) throws NoSuchAlgorithmException, CertificateException, FileNotFoundException, IOException, KeyStoreException, UnrecoverableKeyException, InvalidAlgorithmParameterException {
keystore = properties.getProperty(NiFiProperties.SECURITY_KEYSTORE);
keystorePass = getPass(properties.getProperty(NiFiProperties.SECURITY_KEYSTORE_PASSWD));
keystoreType = properties.getProperty(NiFiProperties.SECURITY_KEYSTORE_TYPE);
| [SSLContextFactory->[createSslContext->[init,getInstance,setNeedClientAuth,SecureRandom],getPass->[toCharArray],FileInputStream,getProperty,init,getKeyManagers,getTrustManagers,closeQuietly,getPass,getTrustStore,getInstance,getKeyStore,getDefaultAlgorithm,load]] | Creates a SSLContextFactory. Load the truststore from the stream. | Is there an implementation of this constructor / static factory method in the application which can create an SSLContext that does not require the application to have HTTPS enabled? For example, an instance of NiFi running in HTTP mode which needs to use `InvokeHTTP` to communicate with an HTTPS remote endpoint? |
@@ -9950,7 +9950,7 @@ namespace System.Windows.Forms
// you should notify UI Automation by calling the UiaReturnRawElementProvider
// as follows: UiaReturnRawElementProvider(hwnd, 0, 0, NULL). This call tells
// UI Automation that it can safely remove all map entries that refer to the specified window.
- UiaCore.UiaReturnRawElementProvider(new HandleRef(this, handle), IntPtr.Zero, IntPtr.Zero, null);
+ UiaCore.UiaReturnRawElementProvider(handle, 0, 0, null);
}
if (OsVersion.IsWindows8OrGreater && IsAccessibilityObjectCreated)
| [Control->[OnSystemColorsChanged->[OnSystemColorsChanged,Invalidate],UpdateRoot->[GetTopLevel],OnFontChanged->[GetAnyDisposingInHierarchy,DisposeFontHandle,Font,Invalidate],AccessibilityNotifyClients->[AccessibilityNotifyClients],OnParentFontChanged->[IsFontSet,OnFontChanged],AutoValidate->[AutoValidate],OnParentBackColorChanged->[OnBackColorChanged],WmKeyChar->[ProcessKeyMessage,DefWndProc],WmWindowPosChanging->[ActiveXUpdateBounds,DefWndProc],WmMouseHover->[OnMouseHover,DefWndProc],GetNeighboringToolsRectangles->[GetNeighboringToolsRectangles],ScaleBitmapLogicalToDevice->[ScaleBitmapLogicalToDevice],OnDragOver->[OnDragOver],CreateControl->[CreateHandle,CreateControl],WmParentNotify->[ReflectMessage,DefWndProc],ScaleFont->[Size],OnParentEnabledChanged->[OnEnabledChanged,GetState],Refresh->[Invalidate],WmNotifyFormat->[ReflectMessage,DefWndProc],ResetPadding->[ResetPadding],DefWndProc->[DefWndProc],SetVisibleCore->[SelectNextIfFocused,SetState,OnVisibleChanged,GetTopLevel,CreateControl],CanShowToolTipsNow->[CanShowToolTipsNow],OnForeColorChanged->[GetAnyDisposingInHierarchy,Invalidate],OnRightToLeftChanged->[GetAnyDisposingInHierarchy],OnDragLeave->[OnDragLeave],SetAutoSizeMode->[SetAutoSizeMode],WmCtlColorControl->[InitializeDCForWmCtlColor,DefWndProc],SetAcceptDrops->[GetState],PreProcessControlState->[GetExtendedState,IsInputKey,PreProcessMessage,IsInputChar,OnPreviewKeyDown],WmPrintClient->[OnPrint],UpdateStyles->[OnStyleChanged],ProcessKeyMessage->[ProcessKeyEventArgs],OnDragDrop->[OnDragDrop],InitLayout->[InitLayout],WmPaint->[Graphics,PaintWithErrorHandling,GetStyle],OnParentRightToLeftChanged->[OnRightToLeftChanged],PerformContainerValidation->[PerformControlValidation,GetStyle,PerformContainerValidation],SelectNextControl->[Select],WmCaptureChanged->[OnMouseCaptureChanged,DefWndProc],OnVisibleChanged->[GetAnyDisposingInHierarchy,OnParentBecameInvisible,OnParentVisibleChanged,CreateControl],OnParentChanged->[OnTopMostActiveXParentChanged],ShouldPerformContainerValidation->[GetStyle],WmKillFocus->[InvokeLostFocus,DefWndProc],CreateHandle->[CreateHandle],Invoke->[Invoke],ProcessKeyPreview->[ProcessKeyPreview],WmDpiChangedAfterParent->[OnDpiChangedAfterParent,DefWndProc],SendToBack->[GetTopLevel],WmGetControlName->[MarshalStringToMessage],WmOwnerDraw->[ReflectMessage,DefWndProc],Dispose->[DestroyHandle,Dispose,ResetBindings],PrintToMetaFile_SendPrintMessage->[GetStyle],WndProc->[WmDestroy,WmGetControlType,ReflectMessage,WmNotify,WmKeyChar,WmGetControlName,WmEraseBkgnd,WmWindowPosChanging,WmClose,WmMouseUp,WmMouseHover,WmUpdateUIState,WmCommand,WmMove,WmParentNotify,WmNotifyFormat,InvokeMarshaledCallbacks,WmHelp,WmMouseMove,DefWndProc,SetState,OnNotifyMessage,GetStyle,WmCtlColorControl,WmShowWindow,WmCreate,WmMouseDown,WmPrintClient,WmPaint,WmCaptureChanged,WmMouseLeave,WmKillFocus,WmDisplayChange,WmGetObject,WmSetCursor,WmMouseWheel,WmQueryNewPalette,WmSetFocus,WmContextMenu,WmDpiChangedBeforeParent,WmDpiChangedAfterParent,WmWindowPosChanged,WmMouseEnter,WmOwnerDraw],ResumeLayout->[InitLayout,ResumeLayout,PerformLayout,OnLayoutResuming,GetState],T->[Invoke],Load->[Load],GetCaptionForTool->[GetCaptionForTool],PaintTransparentBackground->[InvokePaintBackground,Control,PaintTransparentBackground,InvokePaint,Graphics],WmMouseUp->[OnMouseDoubleClick,DefWndProc,SetState,GetStyle,OnMouseClick,OnClick,OnMouseUp,OnDoubleClick,GetState],DisposeAxControls->[DisposeAxControls],OnHandleCreated->[GetExtendedState,Size,SetRegion,GetStyle,ListenToUserPreferenceChanged,GetTopLevel,GetState],ProcessKeyEventArgs->[OnKeyDown,OnKeyUp,OnKeyPress],WmMove->[UpdateBounds,DefWndProc],OnMove->[Invalidate],WmHelp->[OnHelpRequested,DefWndProc],HRESULT->[OnFrameWindowActivate,Load,IsInputKey,GetStyle,ProcessMnemonic,OnHelpRequested],OnParentBindingContextChanged->[OnBindingContextChanged],ScaleCore->[AssertLayoutSuspendCount,Scale,ResumeLayout],PreProcessMessage->[IsInputKey,GetExtendedState,IsInputChar],UpdateStylesCore->[Invalidate,SetState],OnTopMostActiveXParentChanged->[OnTopMostActiveXParentChanged],CanProcessMnemonic->[CanProcessMnemonic,TraceCanProcessMnemonic],WmShowWindow->[DefWndProc,SetState,OnVisibleChanged,GetState,GetTopLevel,CreateControl],ListenToUserPreferenceChanged->[GetExtendedState],WmMouseDown->[GetExtendedState,DefWndProc,SetState,OnMouseDown,GetStyle,Focus],OnPrint->[DefWndProc,GetStyle],OnResize->[Invalidate,GetState],UnhookMouseEvent->[SetState],OnBackgroundImageChanged->[GetAnyDisposingInHierarchy,Invalidate],UserPreferenceChanged->[OnSystemColorsChanged],WmMouseLeave->[OnMouseLeave,DefWndProc],AdjustWindowRectExForDpi->[AdjustWindowRectExForDpi],Select->[Select],SetTopLevelInternal->[GetExtendedState,SetParentHandle,SetState,ListenToUserPreferenceChanged,GetTopLevel,CreateControl],OnBackgroundImageLayoutChanged->[GetAnyDisposingInHierarchy,Invalidate],WmSetFocus->[InvokeGotFocus,DefWndProc],IsHoveredWithMouse->[IsHoveredWithMouse],OnParentBackgroundImageChanged->[OnBackgroundImageChanged],Scale->[AssertLayoutSuspendCount,Scale,ResumeLayout],WmWindowPosChanged->[UpdateChildControlIndex,UpdateBounds,DefWndProc],UpdateBounds->[OnSizeChanged,AdjustWindowRectExForControlDpi,OnClientSizeChanged,OnLocationChanged,UpdateBounds,GetTopLevel],WmDestroy->[DefWndProc,UnhookMouseEvent,SetState,ReleaseUiaProvider,OnHandleDestroyed,OnMouseLeave,GetState],WmGetControlType->[MarshalStringToMessage],MarshaledInvoke->[WaitForWaitHandle,InvokeMarshaledCallbacks],HookMouseEvent->[GetState],WmNotify->[ReflectMessage,DefWndProc],OnQueryContinueDrag->[OnQueryContinueDrag],ResetMouseEventArgs->[HookMouseEvent,GetState],CheckParentingCycle->[CheckParentingCycle],LogicalToDeviceUnits->[LogicalToDeviceUnits],InitializeDCForWmCtlColor->[GetStyle],OnHandleDestroyed->[GetAnyDisposingInHierarchy,ListenToUserPreferenceChanged,GetState],WmCommand->[ReflectMessage,DefWndProc],OnParentInvalidated->[Invalidate],OnSizeChanged->[OnResize],InvokeMarshaledCallbacks->[InvokeMarshaledCallback],PaintWithErrorHandling->[PaintException,GetStyle,OnPaint,Invalidate,OnPaintBackground,GetState],ScaleChildControls->[Scale],OnDragEnter->[OnDragEnter],OnChildLayoutResuming->[OnChildLayoutResuming],WmCreate->[DefWndProc,GetStyle,UpdateChildZOrder,UpdateBounds,OnHandleCreated],DrawToBitmap->[CreateHandle],OnEnabledChanged->[GetAnyDisposingInHierarchy,Invalidate,GetStyle],WmDisplayChange->[DefWndProc,Invalidate],OnInvalidated->[ActiveXViewChanged],WmGetObject->[DefWndProc],WmMouseWheel->[OnMouseWheel,DefWndProc],Font->[Font],ProcessCmdKey->[ProcessCmdKey],WmQueryNewPalette->[DefWndProc,Invalidate],ScaleControl->[Size,ScaleControl,AdjustWindowRectExForControlDpi],PaintBackground->[RenderColorTransparent,PaintBackground],OnGiveFeedback->[OnGiveFeedback],WmContextMenu->[WmContextMenu,DefWndProc,Contains],PerformLayout->[GetAnyDisposingInHierarchy,GetExtendedState,OnLayout,PerformLayout,GetState],ShouldSerializeEnabled->[GetState],RecreateHandleCore->[OnParentHandleRecreated,DestroyHandle,OnParentHandleRecreating,Focus,CreateControl,GetState,CreateHandle],ChildGotFocus->[ChildGotFocus,ActiveXOnFocus],SetBounds->[Size,SetBoundsCore,InitScaling],ProcessDialogChar->[ProcessDialogChar],DestroyHandle->[DestroyHandle],OnLayout->[ActiveXViewChanged],WmEraseBkgnd->[PaintWithErrorHandling,DefWndProc,GetStyle],OnParentCursorChanged->[OnCursorChanged],WmClose->[DefWndProc],WmUpdateUIState->[OnChangeUICues,Invalidate,DefWndProc],EndUpdateInternal->[EndUpdateInternal],SetBoundsCore->[InitScaling,InitLayout,ResumeLayout,GetState],Save->[Save],SetParentHandle->[GetTopLevel,RecreateHandle],OnGotFocus->[ChildGotFocus,ActiveXOnFocus],WmMouseMove->[OnMouseMove,DefWndProc,GetStyle],SetClientSizeCore->[OnClientSizeChanged],OnPaddingChanged->[Invalidate,GetStyle],OnLostFocus->[ActiveXOnFocus],ShowsOwnToolTip->[ShowsOwnToolTip],Rectangle->[Size],OnParentBecameInvisible->[OnParentBecameInvisible],OnBackColorChanged->[GetAnyDisposingInHierarchy,Invalidate,GetState],PrintToMetaFileRecursive->[PrintToMetaFileRecursive],PerformControlValidation->[NotifyValidated,NotifyValidating],SuspendLayout->[OnLayoutSuspended],AllowsToolTip->[AllowsToolTip],AllowsChildrenToShowToolTips->[AllowsChildrenToShowToolTips],WmSetCursor->[DefWndProc],SelectNextIfFocused->[SelectNextControl],ProcessDialogKey->[ProcessDialogKey],EndInvoke->[WaitForWaitHandle],Size->[Size,LogicalToDeviceUnits,GetStyle,AdjustWindowRectExForControlDpi],OnParentForeColorChanged->[OnForeColorChanged],UpdateWindowFontIfNeeded->[IsFontSet,GetStyle],WmMouseEnter->[DefWndProc,OnMouseEnter],WmDpiChangedBeforeParent->[OnDpiChangedBeforeParent,RescaleConstantsForDpi,DefWndProc,Size,IsScaledByParent,TryGetExplicitlySetFont],Invalidate->[Invalidate],AddReflectChild,AssertLayoutSuspendCount,Control,Size,DisposeFontHandle,GetState]] | This method releases a previously returned provider. | nit: we may need to unify `0` and `default` usage. |
@@ -22,8 +22,7 @@ class NotApplicable(ValueError):
class VoucherQueryset(models.QuerySet):
- def active(self):
- today = date.today()
+ def active(self, today):
queryset = self.filter(
models.Q(usage_limit__isnull=True) |
models.Q(used__lt=models.F('usage_limit')))
| [calculate_discounted_price->[get_product_discounts],Voucher->[get_discount_for_checkout->[get_apply_to_display,NotApplicable,get_fixed_discount_for,validate_limit],validate_limit->[NotApplicable]],Sale->[modifier_for_product->[_product_has_category_discount,NotApplicable,get_discount]],get_product_discounts->[modifier_for_product]] | Returns a queryset of all items that have a usage limit and start date > = today. | If we can now pass any date in the past, does it make sense to call it `today`? |
@@ -762,7 +762,13 @@ class TokenNetwork:
except ValueError:
# If `given_block_identifier` has been pruned the checks cannot be
# performed.
- pass
+ our_details = self._detail_participant(
+ channel_identifier=channel_identifier,
+ detail_for=self.node_address,
+ partner=partner,
+ block_identifier="latest",
+ )
+ given_block_identifier = self.proxy.jsonrpc_client.get_block("latest")["number"]
except BadFunctionCallOutput:
raise_on_call_returned_empty(given_block_identifier)
else:
| [TokenNetwork->[all_events_filter->[events_filter],update_transfer->[chain_id,_detail_participant,_detail_channel],safety_deprecation_switch->[safety_deprecation_switch],new_netting_channel->[raise_if_invalid_address_pair,token_network_deposit_limit,safety_deprecation_switch],_set_total_deposit->[channel_participant_deposit_limit,token_network_deposit_limit,safety_deprecation_switch,_detail_participant],_check_for_outdated_channel->[_detail_channel],_set_total_withdraw->[_detail_channel,_detail_participant],close->[chain_id,_detail_channel],detail_participants->[ParticipantsDetails,get_channel_identifier,_detail_participant],unlock->[_detail_participant,_detail_channel],channel_participant_deposit_limit->[channel_participant_deposit_limit],set_total_withdraw->[chain_id,_detail_participant,_detail_channel],settle->[_detail_participant,_detail_channel],settlement_timeout_max->[settlement_timeout_max],set_total_deposit->[channel_participant_deposit_limit,token_network_deposit_limit,safety_deprecation_switch,_detail_participant,_detail_channel],_settle->[_detail_participant,_detail_channel],token_network_deposit_limit->[token_network_deposit_limit],get_channel_identifier_or_none->[get_channel_identifier],_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->[token_network_deposit_limit,safety_deprecation_switch]]] | Set the total deposit of a channel. This method is called from the channel_operations. py to perform the necessary checks. Checks if the current deposit amount is not larger than the requested total deposit amount. | why are we changing the `given_block_identifier` ? |
@@ -197,7 +197,7 @@ def test_GeneralizationLight():
assert_array_equal(score, manual_score)
# n_jobs
- gl = _GeneralizationLight(LogisticRegression(), n_jobs=2)
+ gl = GeneralizationLight(LogisticRegression(), n_jobs=2)
gl.fit(X, y)
y_pred = gl.predict(X)
assert_array_equal(y_pred.shape, [n_epochs, n_time, n_time])
| [test_GeneralizationLight->[make_data],test_SearchLight->[_LogRegTransformer,make_data]] | Test generalization light. Fit the model with the data and y. Check that the feature shape and y_preds are the same. | why 2 jobs? |
@@ -263,7 +263,7 @@ WebContents.prototype.takeHeapSnapshot = function (filePath) {
}
// Translate the options of printToPDF.
-WebContents.prototype.printToPDF = function (options, callback) {
+WebContents.prototype.printToPDF = function (options) {
const printingSetting = Object.assign({}, defaultPrintingSetting)
if (options.landscape) {
printingSetting.landscape = options.landscape
| [No CFG could be retrieved] | Translate the options of printToPDF and provide a callback to handle the result. 1 meter = 10^6 microns. | we should keep both specs (callback and promise) until the deprecated functions are removed to ensure no regressions |
@@ -319,10 +319,14 @@ func SerializeProperties(props resource.PropertyMap, enc config.Encrypter) (map[
func SerializePropertyValue(prop resource.PropertyValue, enc config.Encrypter) (interface{}, error) {
// Skip nulls and "outputs"; the former needn't be serialized, and the latter happens if there is an output
// that hasn't materialized (either because we're serializing inputs or the provider didn't give us the value).
- if prop.IsComputed() || !prop.HasValue() {
+ if !prop.HasValue() {
return nil, nil
}
+ if prop.IsComputed() {
+ return unknownValue, nil
+ }
+
// For arrays, make sure to recurse.
if prop.IsArray() {
srcarr := prop.ArrayValue()
| [OperationType,IsObject,NewNullProperty,NewArrayProperty,ArrayValue,NewArchiveProperty,Mappable,Assertf,DeserializeAsset,ValueOf,Encrypter,PropertyKey,OfType,Wrap,NewNumberProperty,IsNotEmpty,NewAssetProperty,Serialize,Marshal,insert,ParseTolerant,New,DeserializeArchive,Errorf,UpToDeploymentV2,Assert,StableKeys,DecryptValue,Type,State,IsComputed,IsSecret,AssertNoErrorf,NewPanicCrypter,Failf,IsAsset,HasValue,AssetValue,Require,UpToDeploymentV3,NewStringProperty,MakeSecret,SecretValue,NewSnapshot,NewBoolProperty,Decrypter,IsArchive,EncryptValue,ObjectValue,Unmarshal,encryptSecret,ArchiveValue,IsArray,String,NewObjectProperty,NewState,NewOperation] | SerializeProperties serializes a resource object so that it can be serialized. Asset returns the serialized version of the asset or archive. | Note that these changes are unrelated to the secrets bits, but are necessary in order to properly serialize input properties that contain unknown values. The deserializer has also been updated to understand the unknown sentinel. |
@@ -183,6 +183,11 @@ class VersionedTarget(VersionedTargetSet):
# If the target is valid, both directories can be assumed to exist.
return
+ # If the vt is invalid, clean. Deletes both because if the stable_dir has somehow been replaced with a real dir,
+ # the relative_symlink call below raises an uncaught exception when it attempts to unlink the real directory.
+ safe_rmtree(current_dir)
+ safe_rmtree(stable_dir)
+
# Clone from the previous results_dir if incremental, or initialize.
previous_dir = self._use_previous_dir(allow_incremental, root_dir, current_dir)
if previous_dir is not None:
| [VersionedTarget->[_use_previous_dir->[_results_dir_path],create_results_dir->[_results_dir_path]],InvalidationCacheManager->[_key_for->[CacheValidationError],update->[update],wrap_targets->[vt_iter->[VersionedTarget],vt_iter],force_invalidate->[force_invalidate],previous_key->[previous_key],check->[InvalidationCheck]],VersionedTargetSet->[from_versioned_targets->[VersionedTargetSet],force_invalidate->[force_invalidate],update->[update]]] | Creates a results_dir under the given root_dir if necessary. | IMO, it would be better to blow up in the case of a deleted/replaced results_dir symlink to expose an issue in a task, rather than to silently try to fix it. |
@@ -473,7 +473,7 @@ public class ClickHouseIO {
* @param table table name
* @return table schema
*/
- public static TableSchema getTableSchema(String jdbcUrl, String table) {
+ public static synchronized TableSchema getTableSchema(String jdbcUrl, String table) {
List<TableSchema.Column> columns = new ArrayList<>();
try (ClickHouseConnection connection = new ClickHouseDataSource(jdbcUrl).getConnection();
| [ClickHouseIO->[Write->[expand->[insertQuorum,table,maxInsertBlockSize,insertDeduplicate,insertDistributedSync,jdbcUrl,properties]],WriteFn->[setup->[initialBackoff,withInitialBackoff],flush->[insertSql,schema,table],processElement->[maxInsertBlockSize]]]] | Get TableSchema. | Why is it synchronized? I don't see it doing any concurrent changes |
@@ -612,8 +612,8 @@ simple_wallet::simple_wallet()
m_cmd_binder.set_handler("incoming_transfers", boost::bind(&simple_wallet::show_incoming_transfers, this, _1), tr("incoming_transfers [available|unavailable] - Show incoming transfers, all or filtered by availability"));
m_cmd_binder.set_handler("payments", boost::bind(&simple_wallet::show_payments, this, _1), tr("payments <PID_1> [<PID_2> ... <PID_N>] - Show payments for given payment ID[s]"));
m_cmd_binder.set_handler("bc_height", boost::bind(&simple_wallet::show_blockchain_height, this, _1), tr("Show blockchain height"));
- m_cmd_binder.set_handler("transfer_original", boost::bind(&simple_wallet::transfer, this, _1), tr("transfer [<mixin_count>] <addr_1> <amount_1> [<addr_2> <amount_2> ... <addr_N> <amount_N>] [payment_id] - Transfer <amount_1>,... <amount_N> to <address_1>,... <address_N>, respectively. <mixin_count> is the number of extra inputs to include for untraceability (from 2 to maximum available)"));
- m_cmd_binder.set_handler("transfer", boost::bind(&simple_wallet::transfer_new, this, _1), tr("Same as transfer_original, but using a new transaction building algorithm"));
+ m_cmd_binder.set_handler("transfer_original", boost::bind(&simple_wallet::transfer, this, _1), tr("Same as transfer, but using an older transaction building algorithm"));
+ m_cmd_binder.set_handler("transfer", boost::bind(&simple_wallet::transfer_new, this, _1), tr("transfer [<mixin_count>] <address> <amount> [<payment_id>]. Pay <amount> to <address>. <mixin_count> is the number of extra inputs to include for untraceability (from 2 to maximum available). Multiple payments can be made at once by adding <address_2> <amount_2> [<payment_id_2>] etcetera at the end"));
m_cmd_binder.set_handler("locked_transfer", boost::bind(&simple_wallet::locked_transfer, this, _1), tr("locked_transfer [<mixin_count>] <addr> <amount> <lockblocks>(Number of blocks to lock the transaction for, max 1000000) [<payment_id>]"));
m_cmd_binder.set_handler("sweep_unmixable", boost::bind(&simple_wallet::sweep_unmixable, this, _1), tr("Send all unmixable outputs to yourself with mixin 0"));
m_cmd_binder.set_handler("sweep_all", boost::bind(&simple_wallet::sweep_all, this, _1), tr("sweep_all [mixin] address [payment_id] - Send all unlocked balance an address"));
| [No CFG could be retrieved] | Adds handlers to the command registry. Set handlers for the chain commands. | The last sentence is actually wrong. You can use only a single payment id. I'm fine with the rest of the changes. Though minimum mixin will soon go up, so maybe remove the mention of minimum being 2 while you're at it. |
@@ -76,7 +76,7 @@ func TestAccAWSAmiDataSource_windowsInstance(t *testing.T) {
resource.TestCheckResourceAttr(resourceName, "image_type", "machine"),
resource.TestCheckResourceAttr(resourceName, "most_recent", "true"),
resource.TestMatchResourceAttr(resourceName, "name", regexp.MustCompile("^Windows_Server-2012-R2")),
- resource.TestCheckResourceAttr(resourceName, "owner_id", "801119661308"),
+ testAccMatchResourceAttrAccountID(resourceName, "owner_id"),
resource.TestCheckResourceAttr(resourceName, "platform", "windows"),
resource.TestCheckResourceAttr(resourceName, "public", "true"),
resource.TestCheckResourceAttr(resourceName, "product_codes.#", "0"),
| [ParallelTest,TestMatchResourceAttr,TestCheckResourceAttr,RootModule,ComposeTestCheckFunc,Errorf,MustCompile] | Check for resource attributes. TestAccAWSAmiDataSource - AmiDataSource - AmiDataSource - AmiDataSource. | Unnecessary since `image_owner_alias` is checked to be `amazon`. Also, not consistent across partitions and potentially over time. |
@@ -27,5 +27,10 @@ public enum ExecutionTime {
/**
* The bytecode is run from a main method
*/
- RUNTIME_INIT
+ RUNTIME_INIT,
+
+ /**
+ * The bytecode is run from a main method after all RUNTIME_INIT
+ */
+ AFTER_STARTUP
}
| [No CFG could be retrieved] | This is a main method that is run from a main method. | We don't want to use an entire separate bytecode recorder just for this one case. |
@@ -1031,7 +1031,7 @@ func TestOrgs(t *testing.T) {
Projects: []string{},
})
require.Nil(t, resp)
- assert.Contains(t, err.Error(), "must supply org ID")
+ assert.Error(t, err, "must supply org ID")
grpctest.AssertCode(t, codes.InvalidArgument, err)
resp2, err := cl.UpdateOrg(ctx, &request.UpdateOrg{
| [AssertCode,Delete,CreateServer,ResetState,SetupInfraProxyService,Error,ResetOrgAdminKey,GetOrg,New,NotNil,Nil,Create,Any,Equal,DeleteOrg,UpdateOrg,Contains,GetOrgs,NoError,Read,Update,CreateOrg,Sprintf,Return,Background,EXPECT,NewInfraProxyServiceClient,InsertProjectsIntoNewContext,Run,Helper] | Require that the given org is not nil and that it is not empty. Code updates an organization. | Loosely coupled assert to check the Err object only, avoiding hardcoded error message check here, any thoughts would be helpful! |
@@ -139,6 +139,10 @@ class VmwareVmImplementer {
details.put(VmDetailConstants.NIC_ADAPTER, VirtualEthernetCardType.E1000.toString());
}
}
+ if(vm.getVirtualMachine() instanceof VMInstanceVO){
+ VMInstanceVO vmInstanceVO =(VMInstanceVO) vm.getVirtualMachine();
+ to.setEnableDynamicallyScaleVm(vmInstanceVO.isDynamicallyScalable());
+ }
}
setBootParameters(vm, to, details);
| [VmwareVmImplementer->[configureNestedVirtualization->[getGlobalNestedVirtualisationEnabled,getGlobalNestedVPerVMEnabled],setDetails->[setDetails]]] | Add details to a VM This method is called to set the details of a nested virtual machine. | HypervisorGuruBase is already setting this paramter in toVirtualMachineTO(), can you please double check if this is necessary or redundant in VmwareVMImplementer. to.setEnableDynamicallyScaleVm(isDynamicallyScalable); |
@@ -4,4 +4,15 @@ import org.infinispan.factories.ComponentRegistry;
public interface InjectableComponent {
void inject(ComponentRegistry registry);
+
+ static void inject(ComponentRegistry componentRegistry, Object... objects) {
+ if (componentRegistry == null) {
+ return;
+ }
+ for (Object o : objects) {
+ if (o instanceof InjectableComponent) {
+ ((InjectableComponent) o).inject(componentRegistry);
+ }
+ }
+ }
}
| [No CFG could be retrieved] | Injects the component into the given registry. | -1 for varargs. you only have one or two objects so far. |
@@ -27,7 +27,7 @@ class FmtResult:
@union
-class FmtTarget:
+class TargetWithSources:
"""A union for registration of a formattable target type."""
| [fmt->[Path,hasattr,write,print_stdout,print_stderr,Fmt,isinstance,Get],dataclass] | Format a single object. Get files content from the master. | This no longer seems to mean this. Please loop back to reference #4535 here in a TODO. And given how generally it's being treated, it should likely exist in some other file, near the target API itself. |
@@ -25,6 +25,13 @@ func newOAuthAccessTokens(c *Client) *oauthAccessTokenInterface {
}
}
+// Get returns information about a particular image and error if one occurs.
+func (c *oauthAccessTokenInterface) Get(name string) (result *oauthapi.OAuthAccessToken, err error) {
+ result = &oauthapi.OAuthAccessToken{}
+ err = c.r.Get().Resource("oAuthAccessTokens").Name(name).Do().Into(result)
+ return
+}
+
// Delete removes the OAuthAccessToken on server
func (c *oauthAccessTokenInterface) Delete(name string) (err error) {
err = c.r.Delete().Resource("oAuthAccessTokens").Name(name).Do().Error()
| [Delete->[Error,Do,Resource,Name,Delete],Create->[Into,Do,Resource,Post,Body]] | Delete - deletes an OAuth access token. | Why add this? I don't object, but I'm pretty sure you didn't need to. |
@@ -0,0 +1,18 @@
+package com.baeldung.methodmultiplereturnvalues;
+
+import java.util.List;
+
+class MultipleReturnValuesUsingTuples {
+
+ static Tuple2<Integer, Coordinates> getFirstNullNearbyLocation(List<Coordinates> coordinatesList) {
+
+ int id = 55;
+ return coordinatesList.stream()
+ .filter(coordinates -> coordinates.getNearbyLocation() == null)
+ .map(coordinates -> new Tuple2<Integer, Coordinates>(id, coordinates))
+ .findFirst()
+ .get();
+
+ }
+
+}
| [No CFG could be retrieved] | No Summary Found. | This example is a little harder to follow as the `Coordinates` class has a `NearbyLocation` field that doesn't serve much of a purpose, and the `id` here is a meaningless value. What if you made this example something like `getMostDistantPoint` which had to return a distance and the coordinate from the list which was furthest from some coordinate also supplied. You could implement a distance function in `Coordinates` which uses the pythagoras distance between two coordinates... It might be a good example...? |
@@ -20,7 +20,6 @@ from pants.engine.addresses import Address
from pants.engine.target import FieldSet, Sources, Target, Targets
from pants.engine.unions import UnionMembership
from pants.testutil.rule_runner import MockConsole, MockGet, run_rule_with_mocks
-from pants.testutil.test_base import TestBase
from pants.util.logging import LogLevel
| [MockTypecheckRequest->[typecheck_results->[exit_code]],TypecheckTest->[make_target->[MockTarget],test_summary->[make_target,run_typecheck_rule,exit_code],test_empty_target_noops->[make_target,run_typecheck_rule],test_invalid_target_noops->[make_target,run_typecheck_rule]]] | Provides a way to typecheck a single object. Provides a way to check if a typecheck request has a conditionally succeeding type. | These could have been unit tests the whole time. We don't use `RuleRunner` because there's no reason to. |
@@ -654,11 +654,18 @@ def new_document(request):
return jingo.render(request, 'wiki/new_document.html',
{'is_template': is_template,
+ 'parent_slug': parent_slug,
+ 'parent_id': initial_parent_id,
'document_form': doc_form,
'revision_form': rev_form})
post_data = request.POST.copy()
post_data.update({'locale': request.locale})
+
+ # Prefix this new doc's slug with the parent document's slug.
+ if parent_slug:
+ post_data.update({'slug': parent_slug + '/' + post_data['slug']})
+
doc_form = DocumentForm(post_data)
rev_form = RevisionForm(post_data)
| [edit_document->[_invalidate_kumascript_cache],mindtouch_to_kuma_redirect->[mindtouch_namespace_redirect],_version_groups->[split_slug],_perform_kumascript_post->[_add_kumascript_env_headers,_process_kumascript_body,_process_kumascript_errors],_invalidate_kumascript_cache->[_build_kumascript_cache_keys],_save_rev_and_notify->[_invalidate_kumascript_cache],document->[set_common_headers],preview_revision->[_perform_kumascript_post,_run_kumascript],_perform_kumascript_request->[_add_kumascript_env_headers,_build_kumascript_cache_keys,_process_kumascript_body,_process_kumascript_errors],_version_groups] | Create a new wiki document. This method is used to create a new form element. | To solve the update problem (i.e., changing child slugs when the parent slug changes), you just not save the parent slug in here, but only the child slug. That means you'll need to change the view though where you map URLs to pages in the DB. |
@@ -86,6 +86,7 @@ class Forbidden403Middleware(object):
"""
Renders a 403.html page if response.status_code == 403.
"""
+
def process_response(self, request, response):
if isinstance(response, HttpResponseForbidden):
return handler403(request)
| [RemoveSlashMiddleware->[process_response->[is_valid_path]]] | Process the response from the API. | Was this whitespace suggested by the editor? It can stay, just curious. |
@@ -50,7 +50,11 @@ module Idv
end
def throttled?
- Throttler::IsThrottled.call(document_capture_session.user_id, :idv_acuant)
+ return unless document_capture_session.user
+ Throttle.for(
+ user: document_capture_session.user,
+ throttle_type: :idv_acuant,
+ ).throttled?
end
end
end
| [CaptureDocStatusController->[status->[success?,throttled?,cancelled_at,blank?],show->[compact,render],document_capture_session->[find_by],throttled?->[call,user_id],session_result->[load_doc_auth_async_result,load_result],before_action,respond_to]] | Checks if the user has a lease and if so returns it. | Should it return a boolean? Is it necessary at all, given that I can't see that the previous logic would have guarded for this? |
@@ -26,7 +26,7 @@ var _ = g.Describe("[sig-cli] oc observe", func() {
out, err = oc.Run("observe").Args("daemonsets", "--once").Output()
o.Expect(err).NotTo(o.HaveOccurred())
- o.Expect(out).To(o.ContainSubstring("Nothing to sync, exiting immediately"))
+ o.Expect(out).To(o.Or(o.ContainSubstring("Sync ended"), o.ContainSubstring("Nothing to sync, exiting immediately")))
out, err = oc.Run("observe").Args("clusteroperators", "--once").Output()
o.Expect(err).NotTo(o.HaveOccurred())
| [ContainSubstring,Describe,Or,By,Output,Args,AsAdmin,Expect,HaveOccurred,NewCLIWithoutNamespace,To,GinkgoRecover,Setenv,Unsetenv,It,Run,NotTo] | g. Describe - displays a list of all resources that have been observed Example of how to delete and delete metrics from a service. | It's not clear to me why we need this change here? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.