patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -354,7 +354,7 @@ module.exports = function(grunt) {
grunt.registerTask('minify', ['bower','clean', 'build', 'minall']);
grunt.registerTask('webserver', ['connect:devserver']);
- grunt.registerTask('package', ['bower','clean', 'buildall', 'minall', 'collect-errors', 'docs', 'copy', 'write', 'compress']);
+ grunt.registerTask('package', ['bower', 'validate-angular-files','clean', 'buildall', 'minall', 'collect-errors', 'docs', 'copy', 'write', 'compress']);
grunt.registerTask('ci-checks', ['ddescribe-iit', 'merge-conflict', 'jshint', 'jscs']);
grunt.registerTask('default', ['package']);
};
| [No CFG could be retrieved] | Register all tasks that can be run on the server. | Not directly related to this PR, but there's a space missing before `'clean'` :grin: |
@@ -24,7 +24,8 @@ function createFixture() {
return createFixtureIframe('test/fixtures/3p-ad.html', 3000, () => {});
}
-describe('amp-ad 3P', () => {
+//TODO(erwinm, #30528): unskip this for IE when possible
+describe.configure().run('amp-ad 3P', () => {
let fixture;
beforeEach(() => {
| [No CFG could be retrieved] | Creates a new with the given name. Requires that the window. context is available. | IIRC, `describe` and `describes` were recently fixed to reliably not run IE tests by default, so you don't have to adopt this workaround. /cc @rcebulko who knows the status of this. |
@@ -1049,11 +1049,6 @@ zfsctl_snapshot_unmount(char *snapname, int flags)
}
#define MOUNT_BUSY 0x80 /* Mount failed due to EBUSY (from mntent.h) */
-#define SET_MOUNT_CMD \
- "exec 0</dev/null " \
- " 1>/dev/null " \
- " 2>/dev/null; " \
- "mount -t zfs -n '%s' '%s'"
int
zfsctl_snapshot_mount(struct path *path, int flags)
| [No CFG could be retrieved] | Unmounts a file system snapshot. zfsctl_snapshot_path - mounces of a snapshot. | It looks like the old `SET_MOUNT_CMD` would fail and potentially execute arbitrary code if the mountpoint were to contain a single quote. |
@@ -94,7 +94,11 @@ void ScriptApiClient::on_hp_modification(int32_t newhp)
lua_getfield(L, -1, "registered_on_hp_modification");
// Call callbacks
lua_pushinteger(L, newhp);
- runCallbacks(1, RUN_CALLBACKS_MODE_OR_SC);
+ try {
+ runCallbacks(1, RUN_CALLBACKS_MODE_OR_SC);
+ } catch (LuaError &e) {
+ getClient()->setFatalError(e);
+ }
}
void ScriptApiClient::on_death()
| [No CFG could be retrieved] | This function pushes a message to the stack This is called from ScriptApiClient. It is called from ScriptApiClient. It is. | The client needs this because it does not have a central place to catch `LuaError`s |
@@ -579,7 +579,7 @@ EXT_RETURN tls_construct_ctos_psk_kex_modes(SSL *s, WPACKET *pkt,
s->ext.psk_kex_mode = TLSEXT_KEX_MODE_FLAG_KE_DHE;
if (nodhe)
s->ext.psk_kex_mode |= TLSEXT_KEX_MODE_FLAG_KE;
-#endif
+#endif /* OPENSSL_NO_TLS1_3 */
return EXT_RETURN_SENT;
}
| [tls_parse_stoc_maxfragmentlen->[PACKET_get_1,IS_MAX_FRAGMENT_LENGTH_EXT_VALID,PACKET_remaining,SSLfatal],tls_construct_ctos_ec_pt_formats->[WPACKET_sub_memcpy_u8,WPACKET_put_bytes_u16,use_ecc,tls1_get_formatlist,SSLfatal,WPACKET_start_sub_packet_u16,WPACKET_close],tls_construct_ctos_ems->[WPACKET_put_bytes_u16,SSLfatal],tls_construct_ctos_early_data->[OPENSSL_memdup,SSLfatal,PACKET_buf_init,psk_client_callback,WPACKET_put_bytes_u16,SSL_SESSION_set1_master_key,strlen,SSL_SESSION_set_protocol_version,SSL_SESSION_free,PACKET_get_length_prefixed_1,SSL_SESSION_set_cipher,OPENSSL_cleanse,SSL_SESSION_new,strcmp,SSL_CIPHER_find,WPACKET_close,psk_use_session_cb,OPENSSL_free,memset,ssl_handshake_md,WPACKET_start_sub_packet_u16,PACKET_equal],tls_construct_ctos_psk->[time,WPACKET_put_bytes_u32,WPACKET_put_bytes_u16,ssl_md,WPACKET_get_curr,ssl_handshake_md,tls_psk_do_binder,SSLfatal,WPACKET_fill_lengths,WPACKET_close,EVP_MD_size,WPACKET_sub_allocate_bytes_u8,WPACKET_get_total_written,WPACKET_sub_memcpy_u16,WPACKET_start_sub_packet_u16],tls_construct_ctos_post_handshake_auth->[SSLfatal,WPACKET_close,WPACKET_put_bytes_u16,WPACKET_start_sub_packet_u16],tls_construct_ctos_maxfragmentlen->[WPACKET_put_bytes_u16,WPACKET_put_bytes_u8,SSLfatal,WPACKET_start_sub_packet_u16,WPACKET_close],tls_construct_ctos_use_srtp->[WPACKET_put_bytes_u16,STACK_OF,WPACKET_put_bytes_u8,SSLfatal,sk_SRTP_PROTECTION_PROFILE_num,sk_SRTP_PROTECTION_PROFILE_value,SSL_get_srtp_profiles,WPACKET_start_sub_packet_u16,WPACKET_close],tls_construct_ctos_etm->[WPACKET_put_bytes_u16,SSLfatal],tls_parse_stoc_session_ticket->[SSLfatal,tls_use_ticket,PACKET_remaining,session_ticket_cb,PACKET_data],tls_construct_ctos_padding->[WPACKET_put_bytes_u16,ssl_md,memset,SSLfatal,WPACKET_sub_allocate_bytes_u16,EVP_MD_size,WPACKET_get_total_written],tls_parse_stoc_status_request->[tls_process_cert_status_body,PACKET_remaining,SSL_IS_TLS13,SSLfatal],tls_parse_stoc_alpn->[PACKET_get_1_len,PACKET_copy_bytes,PACKET_get_net_2_len,OPENSSL_free,memcmp,OPENSSL_memdup,ossl_assert,SSLfatal,PACKET_remaining,OPENSSL_malloc],tls_construct_ctos_srp->[WPACKET_put_bytes_u16,WPACKET_start_sub_packet_u8,WPACKET_memcpy,strlen,SSLfatal,WPACKET_set_flags,WPACKET_start_sub_packet_u16,WPACKET_close],int->[sk_SSL_CIPHER_num,WPACKET_put_bytes_u16,OPENSSL_free,ossl_assert,ssl_generate_pkey_group,SSLfatal,EVP_PKEY_free,EVP_PKEY_get1_tls_encodedpoint,sk_SSL_CIPHER_value,PACKET_remaining,SSL_get1_supported_ciphers,PACKET_get_length_prefixed_1,STACK_OF,sk_SSL_CIPHER_free,WPACKET_sub_memcpy_u16],tls_construct_ctos_session_ticket->[WPACKET_put_bytes_u16,memcpy,SSLfatal,tls_use_ticket,OPENSSL_malloc,WPACKET_sub_memcpy_u16],tls_construct_ctos_sct->[WPACKET_put_bytes_u16,SSLfatal],tls_parse_stoc_use_srtp->[PACKET_get_1,SSLfatal,PACKET_get_net_2,sk_SRTP_PROTECTION_PROFILE_num,sk_SRTP_PROTECTION_PROFILE_value,PACKET_remaining,SSL_get_srtp_profiles,STACK_OF],tls_parse_stoc_key_share->[ssl_derive,EVP_PKEY_set1_tls_encodedpoint,tls1_get_supported_groups,ssl_generate_pkey,tls_curve_allowed,EVP_PKEY_free,PACKET_get_net_2,SSLfatal,PACKET_remaining,PACKET_as_length_prefixed_2,PACKET_data],tls_parse_stoc_cookie->[SSLfatal,PACKET_memdup,PACKET_as_length_prefixed_2],tls_construct_ctos_psk_kex_modes->[WPACKET_put_bytes_u16,WPACKET_start_sub_packet_u8,WPACKET_put_bytes_u8,SSLfatal,WPACKET_start_sub_packet_u16,WPACKET_close],tls_construct_ctos_key_share->[tls1_get_supported_groups,WPACKET_put_bytes_u16,tls_curve_allowed,add_key_share,SSLfatal,WPACKET_start_sub_packet_u16,WPACKET_close],tls_parse_stoc_early_data->[SSLfatal,PACKET_remaining,PACKET_get_net_4],tls_construct_ctos_supported_groups->[tls1_get_supported_groups,WPACKET_put_bytes_u16,use_ecc,tls_curve_allowed,SSLfatal,WPACKET_start_sub_packet_u16,WPACKET_close],tls_construct_ctos_status_request->[WPACKET_put_bytes_u16,sk_OCSP_RESPID_num,i2d_OCSP_RESPID,i2d_X509_EXTENSIONS,WPACKET_put_bytes_u8,WPACKET_allocate_bytes,sk_OCSP_RESPID_value,SSLfatal,WPACKET_sub_allocate_bytes_u16,WPACKET_start_sub_packet_u16,WPACKET_close],tls_construct_ctos_supported_versions->[WPACKET_put_bytes_u16,WPACKET_start_sub_packet_u8,SSLfatal,WPACKET_start_sub_packet_u16,ssl_get_min_max_version,WPACKET_close],tls_construct_ctos_cookie->[WPACKET_put_bytes_u16,OPENSSL_free,SSLfatal,WPACKET_start_sub_packet_u16,WPACKET_sub_memcpy_u16,WPACKET_close],tls_construct_ctos_renegotiate->[WPACKET_sub_memcpy_u8,WPACKET_put_bytes_u16,SSLfatal,WPACKET_start_sub_packet_u16,WPACKET_close],tls_parse_stoc_renegotiate->[PACKET_get_1_len,memcmp,ossl_assert,SSLfatal,PACKET_get_bytes,PACKET_remaining],tls_construct_ctos_npn->[SSL_IS_FIRST_HANDSHAKE,WPACKET_put_bytes_u16,SSLfatal],tls_parse_stoc_supported_versions->[SSLfatal,PACKET_remaining,PACKET_get_net_2],tls_parse_stoc_server_name->[PACKET_remaining,OPENSSL_strdup,SSLfatal],tls_parse_stoc_psk->[memcpy,SSLfatal,PACKET_get_net_2,SSL_SESSION_free,PACKET_remaining],tls_parse_stoc_sct->[PACKET_data,PACKET_copy_bytes,custom_ext_parse,OPENSSL_free,SSLfatal,PACKET_remaining,OPENSSL_malloc,custom_ext_find],tls_construct_ctos_server_name->[WPACKET_put_bytes_u16,strlen,WPACKET_put_bytes_u8,SSLfatal,WPACKET_start_sub_packet_u16,WPACKET_sub_memcpy_u16,WPACKET_close],tls_construct_ctos_sig_algs->[WPACKET_put_bytes_u16,tls12_copy_sigalgs,SSLfatal,WPACKET_close,SSL_CLIENT_USE_SIGALGS,WPACKET_start_sub_packet_u16,tls12_get_psigalgs],tls_construct_ctos_alpn->[WPACKET_put_bytes_u16,SSLfatal,WPACKET_start_sub_packet_u16,SSL_IS_FIRST_HANDSHAKE,WPACKET_sub_memcpy_u16,WPACKET_close],tls_parse_stoc_npn->[OPENSSL_free,memcpy,ssl_next_proto_validate,SSLfatal,PACKET_remaining,npn_select_cb,OPENSSL_malloc,SSL_IS_FIRST_HANDSHAKE,PACKET_data],tls_parse_stoc_ec_pt_formats->[PACKET_copy_bytes,OPENSSL_free,SSLfatal,PACKET_remaining,OPENSSL_malloc,PACKET_as_length_prefixed_1]] | Construct the PSK KEX modes for CTCP. | Looks like there is a bug here in the existing code. `EXT_RETURN_SENT` should only be returned if the extension has actually been added. In the case of `OPENSSL_NO_TLS1_3` it isn't sent so we should return `EXT_RETURN_NOT_SENT`. |
@@ -919,6 +919,13 @@ class RaidenAPI: # pragma: no unittest
payment_network_address=payment_network_address,
token_address=token_address,
)
+
+ if token_network_address is None:
+ raise UnknownTokenAddress(
+ "Token {to_checksum_address(token_address) is not registered "
+ "with the network {to_checksum_address(registry_address)}."
+ )
+
payment_status = self.raiden.mediated_transfer_async(
token_network_address=token_network_address,
amount=amount,
| [transfer_tasks_view->[flatten_transfer,get_transfer_from_task],RaidenAPI->[get_raiden_events_payment_history_with_timestamps->[event_filter_for_payments],get_pending_transfers->[transfer_tasks_view,get_channel],start_health_check_for->[start_health_check_for],get_raiden_events_payment_history->[get_raiden_events_payment_history_with_timestamps],channel_open->[is_already_existing_channel],get_blockchain_events_channel->[get_channel_list]]] | Transfer a block of tokens from a given token network to a target token. This method is called to send a single payment_status object to a token network. | Ah, this one is missing |
@@ -1495,7 +1495,7 @@ class ExpressionChecker(ExpressionVisitor[Type]):
# We try returning a precise type if we can. If not, we give up and just return 'Any'.
if all_same_types(return_types):
return return_types[0], inferred_types[0]
- elif all_same_types(erase_type(typ) for typ in return_types):
+ elif all_same_types([erase_type(typ) for typ in return_types]):
return erase_type(return_types[0]), erase_type(inferred_types[0])
else:
return self.check_call(callee=AnyType(TypeOfAny.special_form),
| [ExpressionChecker->[visit_star_expr->[accept],analyze_ordinary_member_access->[analyze_ref_expr],check_overload_call->[check_call,infer_arg_types_in_empty_context],visit_await_expr->[accept],check_any_type_call->[infer_arg_types_in_empty_context],erased_signature_similarity->[check_argument_count,check_argument_types],visit_int_expr->[infer_literal_expr_type],check_op->[check_method_call_by_name,check_op_reversible,combine_function_signatures],defn_returns_none->[defn_returns_none],check_method_call_by_name->[is_literal_context],check_call_expr_with_callee_type->[transform_callee_type],visit_enum_call_expr->[accept],analyze_super->[is_literal_context],transform_callee_type->[apply_method_signature_hook],infer_overload_return_type->[check_call],check_lst_expr->[check_call],visit_unicode_expr->[infer_literal_expr_type],accept->[visit_call_expr,accept],named_type->[named_type],has_member->[has_member],visit_yield_from_expr->[check_awaitable_expr,accept,check_method_call_by_name],infer_function_type_arguments_pass2->[infer_function_type_arguments,infer_arg_types_in_context],visit_index_with_type->[visit_index_with_type,check_method_call_by_name],object_type->[named_type],check_callable_call->[apply_function_plugin],plausible_overload_call_targets->[has_shape,check_argument_count],visit_dict_expr->[check_call,check_method_call_by_name,check_typeddict_call_with_dict],infer_literal_expr_type->[is_literal_context],apply_type_arguments_to_callable->[apply_generic_arguments],check_awaitable_expr->[named_type,check_method_call_by_name],check_method_call->[transform_callee_type,method_fullname,check_call],analyze_type_type_callee->[analyze_type_type_callee],union_overload_result->[union_overload_result,infer_overload_return_type],check_op_reversible->[lookup_operator->[make_local_errors,is_literal_context],lookup_definer,make_local_errors,check_method_call,check_method_call_by_name,lookup_operator],visit_str_expr->[infer_literal_expr_type],visit_tuple_expr->[check_lst_expr],visit_yield_expr->[accept],is_valid_keyword_var_arg->[named_type],apply_generic_arguments->[apply_generic_arguments],check_list_multiply->[check_op],visit_member_expr->[extract_refexpr_names],visit_bytes_expr->[infer_literal_expr_type],check_generator_or_comprehension->[check_call],visit_unary_expr->[check_method_call_by_name],infer_function_type_arguments->[infer_function_type_arguments,infer_arg_types_in_context],find_typeddict_context->[find_typeddict_context],visit_dictionary_comprehension->[check_call],check_call->[transform_callee_type,check_call],check_union_call->[check_call],bool_type->[named_type],visit_name_expr->[extract_refexpr_names],apply_method_signature_hook->[apply_method_signature_hook]],has_any_type->[accept],ArgInferSecondPassQuery->[visit_callable_type->[accept]],is_literal_type_like->[is_literal_type_like],has_erased_component->[accept],has_uninhabited_component->[accept],any_causes_overload_ambiguity->[has_any_type],arg_approximate_similarity->[is_typetype_like,arg_approximate_similarity]] | Attempts to find the first matching callable from the given list. Check if a type of any is ambiguous. | Note that `all_same_types()` calls `list()` on its argument. Maybe skip that if it's already a `list`? |
@@ -309,8 +309,8 @@ class ReviewForm(happyforms.Form):
u'email)'))
adminflag = forms.BooleanField(required=False,
label=_(u'Clear Admin Review Flag'))
- clear_info_request = forms.BooleanField(
- required=False, label=_(u'Clear more info requested flag'))
+ info_request = forms.BooleanField(
+ required=False, label=_(u'Is more info requested?'))
def is_valid(self):
# Some actions do not require comments.
| [ThemeReviewForm->[save->[save]],AllAddonSearchForm->[clean_application_id->[version_choices_for_app_id]],ReviewForm->[NonValidatingChoiceField]] | Check if the object is a and if so set the required fields to the missing values. | Is this the label shown to the reviewer? I think this might be slightly confusing, would "Request information from the developer" work? |
@@ -17,10 +17,15 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
+ * Original Code:
+ *
* @link https://www.librenms.org
*
* @copyright 2018 Tony Murray
* @author Tony Murray <murraytony@gmail.com>
+ *
+ * Modified by:
+ * @author Peca Nesovanovic <peca.nesovanovic@sattrakt.com>
*/
namespace App\Models;
| [No CFG could be retrieved] | Creates a new instance of the NetworkRelatedModel class based on the given . | You don't have to mark original code and modified by. (we have git history for that) Preferred way is just to add @author. You can also add @copyright if you feel it is appropriate. |
@@ -327,7 +327,7 @@ namespace System.Runtime.Serialization
string returnType = _baseType;
return _needsFixup && TypeArguments.Count > 0 ?
- returnType + '`' + TypeArguments.Count.ToString(CultureInfo.InvariantCulture) :
+ $"{returnType}`{(uint)TypeArguments.Count}" :
returnType;
}
set
| [No CFG could be retrieved] | Creates a CodeTypeReference object that can be used to reference a type argument. RipOffAssemblyInformationFromTypeName - RipOff assembly information from typeName. | @stephentoub, just curious, has the default of string interpolation changed from current culture to InvariantCulture? |
@@ -272,5 +272,10 @@ class QueueFile:
def __moveFile(self, origPath, path):
if not os.path.exists(path):
os.makedirs(path)
- timestamp = str(int(round(time.time())))
- os.rename(origPath, path + "/" + self.fileName + "." + timestamp)
+
+ zipped_file_name = path + "/" + self.fileName + "." + str(uuid.uuid4()) + ".gz"
+
+ with open(origPath, 'rb') as f_in, gzip.open(zipped_file_name, 'wb') as f_out:
+ shutil.copyfileobj(f_in, f_out)
+
+ os.remove(origPath)
| [DataBag->[load->[load]],QueueFile->[load->[updateDataBag,load]],updateDataBag->[processGuestNetwork->[load],processCLItem->[load],process->[setKey,load,DataBag,save,getDataBag]]] | Move file to path. | would it make sense to have the timestamp in the filename as well? for easy ordering |
@@ -258,6 +258,15 @@ namespace Dynamo
/// </summary>
public class CustomNodeInfo
{
+ /// <summary>
+ /// Creates CustomNodeInfo
+ /// </summary>
+ /// <param name="functionId">Custom node unique ID</param>
+ /// <param name="name">Custom node name</param>
+ /// <param name="category">Custom node category</param>
+ /// <param name="description">Custom node description</param>
+ /// <param name="path">Path to custom node</param>
+ /// <param name="isVisibleInDynamoLibrary">Bool value, that sets visibility in library search</param>
public CustomNodeInfo(Guid functionId, string name, string category, string description, string path, bool isVisibleInDynamoLibrary = true)
{
if (functionId == Guid.Empty)
| [CustomNodeDefinition->[FindAllDependencies->[FindAllDependencies]]] | Creates a custom node with the given name category description path and visibility in Dynamo library. | This function creates CustomNodeInfo. |
@@ -45,7 +45,8 @@ describes.endtoend(
).to.equal(0);
});
- it('should open the lightbox', async () => {
+ // TODO(wg-components, #28948): Flaky during CI.
+ it.skip('should open the lightbox', async () => {
const open = await controller.findElement('#open');
await controller.click(open);
| [No CFG could be retrieved] | General example of how to show a custom close button with an optional filter to close the light Clicks the open and close button. | This test is still red on `master`. Looks like the failure source is in `extensions/amp-lightbox/test-e2e/test-amp-lightbox.js`. |
@@ -338,7 +338,10 @@ public class KafkaTopicGroupingWorkUnitPacker extends KafkaWorkUnitPacker {
*/
@VisibleForTesting
static double getContainerCapacityForTopic(List<Double> capacities, ContainerCapacityComputationStrategy strategy) {
- Preconditions.checkArgument(capacities.size() > 0, "Capacities size must be > 0");
+ //No previous stats for a topic? Return default.
+ if (capacities == null) {
+ return DEFAULT_CONTAINER_CAPACITY;
+ }
Collections.sort(capacities);
log.info("Capacity computation strategy: {}, capacities: {}", strategy.name(), capacities);
switch (strategy) {
| [KafkaTopicGroupingWorkUnitPacker->[squeezeMultiWorkUnits->[squeezeMultiWorkUnits]]] | Returns the container capacity for the given list of capacities. | Just curious how did we deal with the new topics previous? Asking because capacities for new topics should always be null? |
@@ -142,7 +142,7 @@ public class AnnotationPropertyValuesAdapterTest {
private static class TestBean {
@Reference(
- interfaceClass = DemoService.class, interfaceName = "org.apache.dubbo.config.spring.api.DemoService", version = "${version}", group = "group",
+ interfaceClass = DemoService.class, interfaceName = "com.alibaba.dubbo.config.spring.api.DemoService", version = "${version}", group = "group",
url = "${url} ", client = "client", generic = true, injvm = true,
check = false, init = true, lazy = true, stubevent = true,
reconnect = "reconnect", sticky = true, proxy = "javassist", stub = "stub",
| [AnnotationPropertyValuesAdapterTest->[test->[convert->[arrayToCommaDelimitedString,toStringMap],getRegistry,MockEnvironment,isAsync,getLazy,getActives,isInit,getGroup,AnnotationPropertyValuesAdapter,getMonitor,getMock,getSticky,getProtocol,getVersion,put,getModule,isGeneric,getFilter,getRetries,getValidation,getClient,setProperty,getUrl,getLoadbalance,getSent,getTimeout,valueOf,DataBinder,isInjvm,setDisallowedFields,getOnconnect,getApplication,getCallbacks,getConsumer,getOndisconnect,isCheck,getOwner,getInterface,setConversionService,getProxy,assertEquals,getConnections,DefaultConversionService,getStubevent,getReconnect,addConverter,getInterfaceClass,findField,getCache,getAnnotation,bind,getListener,getParameters,ReferenceBean,getStub,getLayer,getCluster]]] | Bean compare. | Why change to com.alibaba but not org.apache? |
@@ -286,6 +286,9 @@ class DataflowPipelineRunner(PipelineRunner):
'%s.%s' % (transform_node.full_label, PropertyNames.OUT)),
PropertyNames.ENCODING: step.encoding,
PropertyNames.OUTPUT_NAME: PropertyNames.OUT}])
+ step.add_property(
+ PropertyNames.DISPLAY_DATA,
+ DisplayData.create_from(transform).output())
def run_CreatePCollectionView(self, transform_node):
step = self._add_step(TransformNames.COLLECTION_TO_SINGLETON,
| [DataflowPipelineRunner->[_get_encoded_output_coder->[_get_typehint_based_encoding],run_Flatten->[_get_encoded_output_coder,_add_step],apply_GroupByKey->[_get_coder],run_Create->[_get_cloud_encoding,_add_step],poll_for_job_completion->[rank_error],run_Read->[_get_cloud_encoding,_add_step],run__NativeWrite->[_get_cloud_encoding,_add_step],run_ParDo->[_get_encoded_output_coder,_add_step],_add_step->[_get_unique_step_name],run_CreatePCollectionView->[_get_side_input_encoding,_add_step],run_GroupByKey->[_get_encoded_output_coder,_add_step],run_CombineValues->[_get_encoded_output_coder,_add_step]],DataflowPipelineResult->[__str__->[current_state,job_id]]] | Runs the Create transform on a node. Returns a new instance of the class that will be used to create the class. | Could this be added inside _add_step instead to eliminate redundancy? |
@@ -61,6 +61,7 @@ public class ConnectionAbstract extends InputAbstract {
}
JmsConnectionFactory cf = new JmsConnectionFactory(user, password, brokerURL);
if (clientID != null) {
+ System.out.println("Consumer:: clientID = " + clientID);
cf.setClientID(clientID);
}
| [ConnectionAbstract->[createAMQPConnectionFactory->[input,JmsConnectionFactory,getMessage,setClientID,createConnection,println,substring,close,userPassword,startsWith],userPassword->[input,inputPassword],createConnectionFactory->[createAMQPConnectionFactory,IllegalStateException,createCoreConnectionFactory,equals],createCoreConnectionFactory->[input,getMessage,ActiveMQConnectionFactory,setClientID,println,createConnection,close,userPassword]]] | Creates a connection factory based on the user password and broker URL. | This appears to have been left by mistake. Can you confirm? |
@@ -56,7 +56,7 @@ func (d *Downloader) doShortRangeSync() (int, error) {
}
n, err := d.ih.verifyAndInsertBlocks(blocks)
if err != nil {
- if !errors.As(err, &sigVerifyError{}) {
+ if !errors.As(err, &emptySigVerifyError) {
sh.removeStreams(whitelist) // Data provided by remote nodes is corrupted
}
return n, errors.Wrap(err, "InsertChain")
| [doGetBlockHashesRequest->[Str,RemoveStream,Msg,Warn,WithTimeout,New,Err,GetBlockHashes],removeStreams->[RemoveStream],handleResultError->[removeStreamID,Lock,Unlock],doGetBlocksByHashesRequest->[Str,WithWhitelist,Msg,Warn,WithTimeout,Err,GetBlocksByHashes,RemoveStream],isDone->[Lock,Unlock],getResults->[New,Lock,Unlock],getHashChain->[doGetBlockHashesRequest,Add,prepareBlockHashNumbers,computeLongestHashChain,addResult,Err,Wait,Done],doShortRangeSync->[Str,removeStreams,finishSyncing,As,CurrentBlock,getHashChain,setTargetBN,Wrap,startSyncing,verifyAndInsertBlocks,getBlocksByHashes,With,Is,NumberU64,Logger,checkPrerequisites],getNextHashes->[New,numBlocksPerRequest,Lock,Unlock],addResult->[Lock,Unlock],getBlocksByHashes->[isDone,handleResultError,doGetBlocksByHashesRequest,Msg,Unlock,Add,getResults,Wait,WithCancel,getNextHashes,Lock,addResult,After,Err,Done],checkPrerequisites->[New,NumStreams],Ceil,New,Errorf,Hash] | doShortRangeSync performs a short range sync on the remote node. | is emptySigVerifyError an pointer? |
@@ -140,7 +140,7 @@ class GroupsController < ApplicationController
end
def populate
- @assignment = Assignment.find(params[:id], :include => [{:groupings => [{:student_memberships => :user, :ta_memberships => :user}, :group]}])
+ @assignment = Assignment.find(params[:id], include: [{groupings: [{student_memberships: :user, ta_memberships: :user}, :group]}])
@groupings = @assignment.groupings
@table_rows = {}
@groupings.each do |grouping|
| [GroupsController->[remove_member->[remove_member],add_group->[add_group]]] | Populates the table rows with the n - node node id. | Line is too long. [133/80]<br>Space inside { missing.<br>Space inside } missing. |
@@ -0,0 +1,18 @@
+# Generated by Django 2.0.8 on 2018-09-29 12:07
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('product', '0071_attributechoicevalue_value'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='product',
+ name='tax_rate',
+ field=models.CharField(blank=True, choices=[('accomodation', 'accommodation'), ('admission to cultural events', 'admission to cultural events'), ('admission to entertainment events', 'admission to entertainment events'), ('admission to sporting events', 'admission to sporting events'), ('advertising', 'advertising'), ('agricultural supplies', 'agricultural supplies'), ('baby foodstuffs', 'baby foodstuffs'), ('bikes', 'bikes'), ('books', 'books'), ('childrens clothing', 'childrens clothing'), ('domestic fuel', 'domestic fuel'), ('domestic services', 'domestic services'), ('e-books', 'e-books'), ('foodstuffs', 'foodstuffs'), ('hotels', 'hotels'), ('medical', 'medical'), ('newspapers', 'newspapers'), ('passenger transport', 'passenger transport'), ('pharmaceuticals', 'pharmaceuticals'), ('property renovations', 'property renovations'), ('restaurants', 'restaurants'), ('social housing', 'social housing'), ('standard', 'standard'), ('water', 'water')], default='standard', max_length=128),
+ ),
+ ]
| [No CFG could be retrieved] | No Summary Found. | Could you please rebase with the latest master? I think we are already on 72nd migration. |
@@ -64,7 +64,6 @@ final class Attachment extends Thread implements Response {
private String attachError;
private final AttachHandler handler;
private final String key;
- private TargetDiagnosticsProvider diagProvider;
private static final String START_REMOTE_MANAGEMENT_AGENT = "startRemoteManagementAgent"; //$NON-NLS-1$
private static final String START_LOCAL_MANAGEMENT_AGENT = "startLocalManagementAgent"; //$NON-NLS-1$
| [Attachment->[run->[connectToAttacher],replyWithProperties->[replyWithProperties]]] | Creates a new instance of Attachment that can be used to attach a response to a specific command load the module for the given name. | Blank lines help separate sections of code visually: why did you remove this one? |
@@ -27,7 +27,12 @@ func NewSender(gc *globals.Context) *Sender {
func (s *Sender) MakePreview(ctx context.Context, filename string, outboxID chat1.OutboxID) (res chat1.MakePreviewRes, err error) {
defer s.Trace(ctx, func() error { return err }, "MakePreview")()
- src, err := NewFileReadResetter(filename)
+ var src ReadCloseResetter
+ if IsKbfsPath(filename) {
+ src, err = NewKbfsReadResetter(ctx, s.G().GlobalContext, filename)
+ } else {
+ src, err = NewFileReadResetter(filename)
+ }
if err != nil {
return res, err
}
| [PostFileAttachment->[makeBaseAttachmentMessage],makeBaseAttachmentMessage->[preprocess],PostFileAttachmentMessage->[makeBaseAttachmentMessage]] | MakePreview implements keybase. OutboxInterface. MakePreview. | Would be nice if this got moved out to some other function. |
@@ -1,12 +1,7 @@
package org.infinispan.container.offheap;
-import org.infinispan.configuration.cache.CacheMode;
-import org.infinispan.configuration.cache.ConfigurationBuilder;
-import org.infinispan.configuration.cache.StorageType;
-import org.infinispan.eviction.EvictionType;
-import org.testng.annotations.Test;
-
import java.util.Map;
+import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorCompletionService;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
| [OffHeapBoundedSingleNodeStressTest->[testLotsOfWrites->[TimeoutException,getTestThreadFactory,poll,awaitTermination,get,put,cache,shutdown,newFixedThreadPool,debugf,randomBytes,submit],createCacheManagers->[addClusterEnabledCacheManager,getDefaultClusteredCacheConfig,size]]] | package org. infinispan. container. offheap. container. offheap. container. creates a random key and value and writes it to the cache. | I'd set it to 2, in the unlikely case an issue only appears when two buckets are modified concurrently. |
@@ -470,11 +470,11 @@ please consider changing to GITEA_CUSTOM`)
}
sec = Cfg.Section("security")
- InstallLock = sec.Key("INSTALL_LOCK").MustBool()
- SecretKey = sec.Key("SECRET_KEY").String()
- LogInRememberDays = sec.Key("LOGIN_REMEMBER_DAYS").MustInt()
- CookieUserName = sec.Key("COOKIE_USERNAME").String()
- CookieRememberName = sec.Key("COOKIE_REMEMBER_NAME").String()
+ InstallLock = sec.Key("INSTALL_LOCK").MustBool(false)
+ SecretKey = sec.Key("SECRET_KEY").MustString("!#@FDEWREWR&*(")
+ LogInRememberDays = sec.Key("LOGIN_REMEMBER_DAYS").MustInt(7)
+ CookieUserName = sec.Key("COOKIE_USERNAME").MustString("gitea_awesome")
+ CookieRememberName = sec.Key("COOKIE_REMEMBER_NAME").MustString("gitea_incredible")
ReverseProxyAuthUser = sec.Key("REVERSE_PROXY_AUTHENTICATION_USER").MustString("X-WEBAUTH-USER")
sec = Cfg.Section("attachment")
| [IsFile,Title,LastIndex,KeysHash,Dir,Warn,Count,MustBool,TempDir,MustInt,Info,In,Strings,MapTo,Error,Clean,Append,SetFallbackHost,Empty,MustInt64,New,LookPath,TrimSpace,Key,IsAbs,Join,NewLogger,Section,ParseAddress,Contains,Name,GetSection,ToLower,ParseUint,MustString,CurrentUsername,MkdirAll,Split,SetUseHTTPS,TrimSuffix,Sprintf,NewSection,SetSecureFallbackHost,Keys,Replace,Fatal,HomeDir,Parse,Abs,String,Getenv,Trim] | Initialize SSH configuration. Reads the configuration of the Attachment. | Really? This gets generated for me on the installer |
@@ -262,7 +262,7 @@ func NewLeaderElectionManager(
Identity: id,
},
},
- ReleaseOnCancel: true,
+ ReleaseOnCancel: false,
LeaseDuration: 15 * time.Second,
RenewDeadline: 10 * time.Second,
RetryPeriod: 2 * time.Second,
| [Start->[Start],Stop->[Stop],GenerateHints->[GenerateHints],String] | NewLeaderElectionManager creates a new EventManager object that manages the leader election of a Catches the event from the leader election manager and generates hints for the event. | Could you please open a follow-up issue to find a way of releasing the lock on shutdown for faster failover? |
@@ -345,8 +345,9 @@ public final class GlobalEventExecutor extends AbstractEventExecutor {
}
}
+ Queue<ScheduledFutureTask<?>> delayedTaskQueue = scheduledTaskQueue;
// Terminate if there is no task in the queue (except the purge task).
- if (taskQueue.isEmpty() && delayedTaskQueue.size() == 1) {
+ if (taskQueue.isEmpty() && (delayedTaskQueue == null || delayedTaskQueue.size() == 1)) {
// Mark the current thread as stopped.
// The following CAS must always success and must be uncontended,
// because only one thread should be running at the same time.
| [GlobalEventExecutor->[schedule->[execute,schedule,inEventLoop],scheduleAtFixedRate->[schedule],TaskRunner->[run->[run,takeTask]],execute->[addTask,inEventLoop],scheduleWithFixedDelay->[schedule],GlobalEventExecutor]] | This method is invoked by the worker thread to check if a task is available in the queue. | `scheduledTaskQueue = this.scheduledTaskQueue` |
@@ -800,7 +800,7 @@ def shift_time_events(events, ids, tshift, sfreq):
----------
events : array, shape=(n_events, 3)
The events
- ids : array int
+ ids : array int | 'all'
The ids of events to shift.
tshift : float
Time-shift event. Use positive value tshift for forward shifting
| [find_stim_steps->[_find_stim_steps],AcqParserFIF->[get_condition->[_mne_events_to_category_t0,find_events],_mne_events_to_category_t0->[_events_mne_to_dacq]],read_events->[pick_events,_read_events_fif],_find_events->[_find_stim_steps],find_events->[_find_unique_events,_find_events]] | Shift an event. by a given number of time - shifts. | In other event things we use `None`, might as well do it here, too |
@@ -130,6 +130,8 @@ func (p *Properties) SetAzureStackCloudSpec() error {
//KubernetesSpecConfig
asccKubernetesSpecConfig := ascc.KubernetesSpecConfig
azsKubernetesSpecConfig := azureStackCloudSpec.KubernetesSpecConfig
+
+ azureStackCloudSpec.KubernetesSpecConfig.AzureTelemetryPID = helpers.EnsureString(asccKubernetesSpecConfig.AzureTelemetryPID, DefaultAzurestackDeployTelemetryPID)
azureStackCloudSpec.KubernetesSpecConfig.ACIConnectorImageBase = helpers.EnsureString(asccKubernetesSpecConfig.ACIConnectorImageBase, azsKubernetesSpecConfig.ACIConnectorImageBase)
azureStackCloudSpec.KubernetesSpecConfig.AzureCNIImageBase = helpers.EnsureString(asccKubernetesSpecConfig.AzureCNIImageBase, azsKubernetesSpecConfig.AzureCNIImageBase)
azureStackCloudSpec.KubernetesSpecConfig.CalicoImageBase = helpers.EnsureString(asccKubernetesSpecConfig.CalicoImageBase, azsKubernetesSpecConfig.CalicoImageBase)
| [SetAzureStackCloudSpec->[EnsureString,IsAzureStackCloud,New],SetCustomCloudProfileEnvironment->[TrimSuffix,Sprintf,IsAzureStackCloud,Unmarshal,Replace,Errorf,Get,ReadAll,HasPrefix],setCustomCloudProfileDefaults->[SetAzureStackCloudSpec,SetCustomCloudProfileEnvironment,IsAzureStackCloud,Errorf,EnsureString]] | SetAzureStackCloudSpec sets the AzureStackCloudSpec based on the properties in the A list of all the available configuration options A list of all the configuration options that are not specified in the spec. | The reason we don't bother to set a scale- or upgrade-specific ID here is because the `AzureEnvironmentSpecConfig` will never be non-nil in a scale or upgrade scenario? |
@@ -40,10 +40,12 @@ Return Type: Boolean
def is_prime_recursive(num, i=2):
# Base Cases
- if(num <= 1 or n % i == 0):
+ if num == 2:
+ return True
+ if num <= 1 or n % i == 0:
return False
- if num == 2 or i * i > n:
+ if i * i > n:
return True
# check the next divisor
| [is_prime_recursive->[is_prime_recursive],is_prime_iterative,is_prime_recursive] | Check if a number of nodes is prime recursive. | Add a line break after this. |
@@ -58,7 +58,12 @@ class RaidenAPIActionTask(Task):
f'Expected {self._expected_http_status}: {resp.text}',
)
try:
- return self._process_response(resp.json())
+ if resp.content == b'':
+ # Allow empty responses
+ response_dict = {}
+ else:
+ response_dict = resp.json()
+ return self._process_response(response_dict)
except (ValueError, UnicodeDecodeError) as ex:
raise RESTAPIError(
f'Error decoding response for url {url}: {resp.status_code} {resp.text}',
| [RaidenAPIActionTask->[_run->[_process_response]]] | Perform the REST - API call and return the result. | Should we check here as well that the code is 204? |
@@ -76,10 +76,15 @@ public class PrepareCommand extends AbstractTransactionBoundaryCommand {
public PrepareCommand() {
}
- public final Object perform(InvocationContext ignored) throws Throwable {
+ public Object perform(InvocationContext ignored) throws Throwable {
if (ignored != null)
throw new IllegalStateException("Expected null context!");
+ if (recoveryManager != null && recoveryManager.isTransactionPrepared(globalTx)) {
+ log.trace("The transaction %s is already prepared. Skipping prepare call.", globalTx);
+ return null;
+ }
+
// 1. first create a remote transaction
RemoteTransaction remoteTransaction = txTable.getRemoteTransaction(globalTx);
boolean remoteTxInitiated = remoteTransaction != null;
| [PrepareCommand->[getAffectedKeys->[getAffectedKeys],copy->[PrepareCommand],containsModificationType->[getModifications],toString->[toString]]] | This method is invoked by the method that is invoked by the caller. | When is the recovery manager ever null? |
@@ -39,13 +39,13 @@ func (t *Team) ExportToTeamPlusApplicationKeys(ctx context.Context, idTime keyba
return ret, err
}
- var writers []keybase1.UserVersion
- var onlyReaders []keybase1.UserVersion
+ var writers, onlyReaders, onlyBots []keybase1.UserVersion
writers = append(writers, members.Writers...)
writers = append(writers, members.Admins...)
writers = append(writers, members.Owners...)
onlyReaders = append(onlyReaders, members.Readers...)
+ onlyReaders = append(onlyBots, members.Bots...)
ret = keybase1.TeamPlusApplicationKeys{
Id: t.chain().GetID(),
| [ExportToTeamPlusApplicationKeys->[IsPublic,myRole,IsImplicit,GetID,Members,chain,Name,String]] | ExportToTeamPlusApplicationKeys exports the user s application keys to a list of application keys. | `onlyReaders -> onlyBots` |
@@ -18,7 +18,7 @@ class TestSoftmaxOp(unittest.TestCase):
def setUp(self):
self.type = "softmax"
- self.inputs = {'X': np.random.random((32, 100)).astype("float32")}
+ self.inputs = {'X': np.random.random((32, 22)).astype("float32")}
self.outputs = {
'Y': np.apply_along_axis(stable_softmax, 1, self.inputs['X'])
}
| [TestSoftmaxOp->[setUp->[apply_along_axis,random]],SoftmaxGradOpTest->[test_softmax->[uniform,set,create_op,check_grad]],stable_softmax->[sum,max,exp],main] | Sets up the object with random nanoseconds. | Let us use small prime numbers. |
@@ -459,7 +459,12 @@ class WPSEO_Utils {
*/
public static function register_cache_clear_option( $option, $type = '' ) {
self::$cache_clear[ $option ] = $type;
- add_action( 'update_option', array( 'WPSEO_Utils', 'clear_transient_cache' ) );
+
+ $function = array( __CLASS__, 'clear_transient_cache' );
+ $hook = 'update_option';
+ if ( ! has_action( $hook, $function ) ) {
+ add_action( $hook, $function );
+ }
}
/**
| [WPSEO_Utils->[get_roles->[get_names],translate_score->[get_label,get_css_class],clear_sitemap_cache->[query],get_title_separator->[get_separator_options]]] | Register a cache clear option. | Can you align the vars? |
@@ -50,7 +50,11 @@ module View
lines = @log.map do |line|
if line.is_a?(String)
- h(:div, line)
+ if line.start_with?('--')
+ h(:div, { style: { fontWeight: 'bold', color: 'green' } }, line)
+ else
+ h(:div, line)
+ end
elsif line.is_a?(Engine::Action::Message)
h(:div, { style: { fontWeight: 'bold' } }, "#{line.entity.name}: #{line.message}")
end
| [Log->[render->[call,h,scrollTop,is_a?,message,map,color_for,store,lambda,name,clientHeight,target,scrollHeight],needs,include],require] | Renders a in the chatlog. | i think the green might be too much also i think this may be a bit cleaner if you only do the style programatically so line_props = { style: {}} line_props[:style][:fontWeight] = 'bold' if line.start_with?('--') h(:div, line_props, line) |
@@ -494,7 +494,7 @@ class CheckpointManager(object):
"""
def __init__(self, checkpoint, directory,
- max_to_keep, keep_checkpoint_every_n_hours=None):
+ max_to_keep, keep_checkpoint_every_n_hours=None, checkpoint_name=None):
"""Configure a `CheckpointManager` for use in `directory`.
If a `CheckpointManager` was previously used in `directory`, its
| [get_checkpoint_state->[_GetCheckpointFilename],CheckpointManager->[save->[_sweep,_record_state],_sweep->[_delete_file_if_exists],_record_state->[update_checkpoint_state_internal],__init__->[get_checkpoint_state]],get_checkpoint_mtimes->[match_maybe_append,_prefix_to_checkpoint_path],update_checkpoint_state_internal->[_GetCheckpointFilename,generate_checkpoint_state_proto],latest_checkpoint->[get_checkpoint_state,_prefix_to_checkpoint_path],checkpoint_exists->[_prefix_to_checkpoint_path]] | Initialize a checkpoint manager. This method is called by checkpoint_manager to determine the checkpoint timestamp and path of the last Check if there are any missing missing files. | Why None? Seems slightly clearer to just default the argument to "ckpt". And could you add a short blurb to the Args: section of the docstring? |
@@ -163,7 +163,8 @@ module Dependabot
return nil if e.message.match?(/Reference cannot be updated/i)
if e.message.match?(/force\-push to a protected/i) ||
- e.message.match?(/not authorized to push/i)
+ e.message.match?(/not authorized to push/i) ||
+ e.message.match?(/must not contain merge commits/)
raise BranchProtected
end
| [PullRequestUpdater->[Github->[pull_request->[pull_request],create_tree->[create_tree],create_commit->[create_commit]]]] | Updates a branch in the repository. | Since this case is not well understood, it makes sense to treat it as a protected branch error, but I wonder if we should instrument this specific outcome. I guess the question is if this is the result of Dependabot, or a user modifying a Dependabot branch somehow? |
@@ -386,11 +386,14 @@ public class PutHDFS extends AbstractHadoopProcessor {
});
}
- protected void changeOwner(final ProcessContext context, final FileSystem hdfs, final Path name) {
+ protected void changeOwner(final ProcessContext context, final FileSystem hdfs, final Path name, final FlowFile flowFile) {
try {
// Change owner and group of file if configured to do so
- String owner = context.getProperty(REMOTE_OWNER).getValue();
- String group = context.getProperty(REMOTE_GROUP).getValue();
+// String owner = context.getProperty(REMOTE_OWNER).getValue();
+// String group = context.getProperty(REMOTE_GROUP).getValue();
+ String owner = context.getProperty(REMOTE_OWNER).evaluateAttributeExpressions(flowFile).getValue();
+ String group = context.getProperty(REMOTE_GROUP).evaluateAttributeExpressions(flowFile).getValue();
+
if (owner != null || group != null) {
hdfs.setOwner(name, owner, group);
}
| [PutHDFS->[changeOwner->[getValue,warn,setOwner],onScheduled->[getValue,parseShort,FsPermission,getProperty,setUMask,isSet,getConfiguration,abstractOnScheduled],onTrigger->[run->[process->[getValue,create,equals,append,flush,BufferedInputStream,copy,close,createOutputStream,delete],getValue,Path,longValue,equals,getDefaultBlockSize,getInt,IOException,toString,warn,info,getSize,yield,getDefaultReplication,getDuration,rename,calculateDataRate,intValue,InputStreamCallback,transfer,getAttribute,changeOwner,ProcessException,asDataSize,error,sleep,stop,asInteger,isDirectory,mkdirs,read,getDefaultExtension,exists,startsWith,delete,send,getName,getCompressionCodec,penalize,putAttribute,key,shortValue,StopWatch],error,yield,doAs,get,getConfiguration,getUserGroupInformation,getFileSystem,transfer],getSupportedPropertyDescriptors->[add,build],build,add,unmodifiableSet,AllowableValue]] | On trigger. This method is called when a file is read from the input stream and if it is not if we get a remote exception we don t notice problems This method is called when a process is done with a lease. | Please remove these old lines. We don't have to keep old code unless if there's a strong needs. |
@@ -1538,11 +1538,12 @@ namespace System.Xml.Serialization
}
}
- public LocalBuilder this[string key]
+ [DisallowNull]
+ public LocalBuilder? this[string key]
{
get
{
- LocalBuilder value;
+ LocalBuilder? value;
TryGetValue(key, out value);
return value;
}
| [MethodBuilderInfo->[MethodBuilder],CodeGenerator->[Ldstr->[Ldstr],Beq->[Beq],Ldc->[New,Ldc,Call,Ldtoken],LoadAddress->[Load],Ldloc->[Ldloc],InitElseIf->[MarkLabel,Pop,Br,EndIf],WhileEndCondition->[Brtrue],Stelem->[Stelem],LocalBuilder->[TryDequeueLocal],If->[If],EndExceptionBlock->[EndExceptionBlock],Box->[Box],BeginCatchBlock->[BeginCatchBlock],Stloc->[Stloc],Ldloca->[Ldloca],Castclass->[Castclass],Ldarg->[Ldarg],GotoMethodEnd->[Br],Call->[Call],WhileEnd->[MarkLabel,Pop],InternalConvert->[Ldobj,Box,Nop,Castclass,Unbox],Ret->[Ret],Unbox->[Unbox],InternalIf->[Brfalse,Brtrue,EndIf],Cne->[Ceq],Dup->[Dup],Throw->[Throw],Ldtoken->[Ldtoken],Add->[Add],Ldelem->[Ldelem],EndIf->[EndIf],Brtrue->[Brtrue],Brfalse->[Brfalse],Ldlen->[Ldlen],Ceq->[Ceq],Br->[Br],Pop->[Pop],IfState->[Pop],AndIf->[If,Brfalse],WhileContinue->[Br],StoreArrayElement->[Call],BeginExceptionBlock->[BeginExceptionBlock],MarkLabel->[MarkLabel],Blt->[Blt],Type->[Call],Ble->[Ble],Ldelema->[Ldelema],Leave->[Leave],Clt->[Clt],WhileBeginCondition->[MarkLabel,Nop],Ldobj->[Ldobj],Stobj->[Stobj],Br_S->[Br_S],WhileBegin->[Ldc,MarkLabel,Brtrue],Ldarga->[Ldarga],Nop->[Nop],EndFor->[AssertHasInterface],StoreMember->[Call],Nop],LocalScope->[TryGetValue->[TryGetValue],ContainsKey->[ContainsKey],AddToFreeLocals->[TryGetValue,Add],TryGetValue]] | TryGetValue - try to find a value in the cache. | The setter doesn't have an explicit null check here right? Is the `DisallowNull` attribute still correct? |
@@ -26,12 +26,15 @@ import lombok.extern.java.Log;
*/
@Log
public final class LobbyServerPropertiesFetcher {
- private final Function<String, Optional<File>> fileDownloader;
+ private final BiFunction<String, Function<InputStream, LobbyServerProperties>,
+ Optional<LobbyServerProperties>> fileDownloader;
@Nullable
private LobbyServerProperties lobbyServerProperties;
- LobbyServerPropertiesFetcher(final Function<String, Optional<File>> fileDownloader) {
+ LobbyServerPropertiesFetcher(
+ final BiFunction<String, Function<InputStream, LobbyServerProperties>,
+ Optional<LobbyServerProperties>> fileDownloader) {
this.fileDownloader = fileDownloader;
}
| [LobbyServerPropertiesFetcher->[getTestOverrideProperties->[getTestOverrideProperties]]] | Produces a class which can be used to fetch the lobby server properties from the remote source Returns the last possible lobby server properties. | So there's this... Not sure what do do about that. |
@@ -108,8 +108,11 @@ func (plugin *OsdnNode) syncEgressDNSPolicyRules() {
continue
}
- plugin.egressPoliciesLock.Lock()
- defer plugin.egressPoliciesLock.Unlock()
- plugin.updateEgressNetworkPolicyRules(vnid)
+ func() {
+ plugin.egressPoliciesLock.Lock()
+ defer plugin.egressPoliciesLock.Unlock()
+
+ plugin.updateEgressNetworkPolicyRules(vnid)
+ }()
}
}
| [syncEgressDNSPolicyRules->[Unlock,Infof,Warningf,GetVNID,V,Lock,updateEgressNetworkPolicyRules,Forever],SetupEgressNetworkPolicy->[EgressNetworkPolicies,Unlock,Warningf,GetVNID,List,Lock,Errorf,updateEgressNetworkPolicyRules,Forever,Add],UpdateEgressNetworkPolicyVNID->[Lock,Unlock,updateEgressNetworkPolicyRules],watchEgressNetworkPolicies->[Unlock,GetVNID,Delete,Lock,Errorf,updateEgressNetworkPolicyRules,Add]] | syncEgressDNSPolicyRules is a long running goroutine that periodically updates the egress DNS policy. | at this point, why not just not use defer? Just lock, <op>, unlock would be simpler IMHO. |
@@ -44,6 +44,8 @@ https://arxiv.org/abs/1802.05365
The batch size to use.
--cuda-device CUDA_DEVICE
The cuda_device to run on.
+ --use-sentence-keys USE_SENTENCE_KEYS
+ Whether to use line numbers or sentence keys as ids.
--include-package INCLUDE_PACKAGE
additional packages to include
"""
| [ElmoEmbedder->[embed_batch->[batch_to_embeddings,empty_embedding],embed_sentences->[embed_batch],embed_file->[embed_sentences]],elmo_command->[ElmoEmbedder,embed_file]] | \ brief \ This module provides a simple interface to the allennlp elmo command This function returns an Elmo object with the specified options and weights. | I find this "sentence keys as ids" wording confusing, I might have said something like "Normally a sentence's line number is used as the HDF5 key for its embedding. If this flag is specified, the sentence itself will be used as the key." |
@@ -30,6 +30,12 @@ namespace Content.Server.Atmos
ResetCooldowns();
}
+ public bool RemoveTile(TileAtmosphere tile)
+ {
+ tile.ExcitedGroup = null;
+ return _tile.Remove(tile);
+ }
+
public void MergeGroups(ExcitedGroup other)
{
var ourSize = _tile.Count;
| [ExcitedGroup->[Dismantle->[ExcitedGroup],Dispose->[Dismantle],MergeGroups->[ExcitedGroup],AddTile->[ExcitedGroup]]] | Add a tile atmosphere to thisExcitedGroup. | nitpick: why isn't `_tile` plural? it is a collection after all. |
@@ -504,6 +504,11 @@ describe('filters', function() {
expect(date(morning, 'yy/xxx')).toEqual('10/xxx');
});
+ it('should allow newlines in format', function() {
+ expect(date(midnight, 'EEE\nMMM d\'\n\'yy/xxx\n')).
+ toEqual('Fri\nSep 3\n10/xxx\n');
+ });
+
it('should support various iso8061 date strings with timezone as input', function() {
var format = 'yyyy-MM-dd ss';
| [No CFG could be retrieved] | expect date object with nanoseconds Date should be in the format yyyy - MM - dd HH - mm - ss. | Nit: There is not need for this to be a new line. |
@@ -467,6 +467,12 @@ class DistributeTranspiler(object):
recv_op_role_var_name = splited_trainer_grad[0].name
if param_varname in self.sparse_param_to_height_sections:
+
+ for table_name in table_names:
+ distributed_var = self.vars_overview.get_distributed_var_by_slice(
+ table_name)
+ distributed_var.vtype = "RemotePrefetch"
+
height_sections = self.sparse_param_to_height_sections[
param_varname]
self._update_remote_sparse_update_op(
| [DistributeTranspiler->[_append_pserver_ops->[_get_param_block->[same_or_split_var],_get_optimizer_input_shape,_get_param_block,_append_dc_asgd_ops],_get_lr_ops->[log],_get_lr_ops_deprecated->[_is_op_connected,_is_optimizer_op],_get_pserver_grad_param_var->[_orig_varname],_create_ufind->[_is_op_connected],get_startup_program->[_get_splited_name_and_shape->[same_or_split_var],_get_splited_name_and_shape],_orig_varname->[_get_varname_parts],_get_optimize_pass->[_is_opt_role_op,log],get_pserver_programs->[get_pserver_program],_init_splited_vars->[_update_dist_lookup_table_vars,slice_variable],_is_opt_op_on_pserver->[same_or_split_var],_append_pserver_grad_merge_ops->[_get_varname_parts,_orig_varname],transpile->[_get_all_remote_sparse_update_op,_update_remote_sparse_update_op,_is_input_of_remote_sparse_update_op,_transpile_nccl2],get_pserver_program->[__clone_lr_op_sub_block__->[__clone_lr_op_sub_block__],__append_optimize_op__,log,__clone_lr_op_sub_block__],get_trainer_program->[__str__],__init__->[DistributeTranspilerConfig],_insert_split_op->[_is_input_of_remote_sparse_update_op],_append_dc_asgd_ops->[__create_temp_var__],_append_pserver_non_opt_ops->[_get_pserver_grad_param_var]],slice_variable->[VarBlock]] | This function is called by the transpiler module to transpile a single . get all the n - node network parameters and gradient variables for a single node This function is called to generate the gradient variables for the network. | It's a good idea to pack variable distribution but seems `vars_overview` is only used for remote table, this can be used by the whole transpiler though. maybe I can try make the transpiler implementation simpler using this class. |
@@ -14,6 +14,16 @@
* limitations under the License.
*/
+/** @enum {number} */
+const IframePosition = {
+ PREVIOUS: -1,
+ CURRENT: 0,
+ NEXT: 1,
+};
+
+/** @const {number} */
+const MAX_IFRAMES = 2;
+
/**
* Manages the iframes used to host the stories inside the player. It keeps
* track of the iframes hosting stories, and what stories have an iframe.
| [No CFG could be retrieved] | Creates an object that represents a single non - empty which is used to manage the Adds a new element to the array of storyIdsWithIframe and returns the index of. | You lost me here, why does the player have two `MAX_IFRAMES` constant that are different? |
@@ -23,10 +23,10 @@ class GenericRule extends Rule
protected $literals;
/**
- * @param array $literals
- * @param int $reason A RULE_* constant describing the reason for generating this rule
- * @param Link|PackageInterface $reasonData
- * @param array $job The job this rule was created from
+ * @param array $literals
+ * @param int|null $reason A RULE_* constant describing the reason for generating this rule
+ * @param Link|PackageInterface|null $reasonData
+ * @param array $job The job this rule was created from
*/
public function __construct(array $literals, $reason, $reasonData, $job = null)
{
| [GenericRule->[__toString->[isDisabled],equals->[getLiterals]]] | Initializes the object with the given literals. | Also not sure why those two were marked nullable. Rather undo unless there's a good explanation. |
@@ -4,9 +4,7 @@ import (
"context"
"fmt"
"sort"
- "sync"
- "github.com/hashicorp/golang-lru"
"github.com/keybase/client/go/chat/globals"
"github.com/keybase/client/go/chat/types"
"github.com/keybase/client/go/chat/utils"
| [GetChannelTopicName->[GetChannelsTopicName],GetChannelsTopicName->[writeToCache,fetchFromCache],invalidate->[key],fetchFromCache->[key],ChannelsChanged->[GetChannelsTopicName,invalidate],writeToCache->[key]] | chat import imports a package containing a list of channel names that are present in the writeToCache writes the to the cache and returns true if it was written to. | Can just call `Read` |
@@ -792,7 +792,13 @@ EOT
}
$similarPackages = array();
+ $installedRepo = $this->getComposer()->getRepositoryManager()->getLocalRepository();
+
foreach ($results as $result) {
+ if ($installedRepo->hasPackageName($result['name'])) {
+ // Ignore installed package
+ continue;
+ }
$similarPackages[$result['name']] = levenshtein($package, $result['name']);
}
asort($similarPackages);
| [InitCommand->[determineRequirements->[findPackages],formatAuthors->[parseAuthorString],findBestVersionAndNameForPackage->[getMinimumStability,getPool],getPool->[getRepos]]] | Finds similar packages. | Please rather use `->findPackage($result['name'], '*')` to avoid adding a new method to all repositories. |
@@ -58,8 +58,8 @@ namespace Microsoft.Extensions.Primitives
public bool Equals(Microsoft.Extensions.Primitives.StringSegment other) { throw null; }
public static bool Equals(Microsoft.Extensions.Primitives.StringSegment a, Microsoft.Extensions.Primitives.StringSegment b, System.StringComparison comparisonType) { throw null; }
public bool Equals(Microsoft.Extensions.Primitives.StringSegment other, System.StringComparison comparisonType) { throw null; }
- public override bool Equals(object obj) { throw null; }
- public bool Equals(string text) { throw null; }
+ public override bool Equals(object? obj) { throw null; }
+ public bool Equals(string? text) { throw null; }
public bool Equals(string text, System.StringComparison comparisonType) { throw null; }
public override int GetHashCode() { throw null; }
public int IndexOf(char c) { throw null; }
| [No CFG could be retrieved] | Tests if two StringSegments are equal. | We typically attribute the parameter with `[NotNullWhen(true)]`. |
@@ -10,7 +10,7 @@ class TeeLogger:
sys.stdout = TeeLogger("stdout.log", sys.stdout)
sys.stderr = TeeLogger("stdout.log", sys.stderr)
"""
- def __init__(self, filename: str, terminal: io.TextIOWrapper) -> None:
+ def __init__(self, filename: str, terminal: TextIO) -> None:
self.terminal = terminal
parent_directory = os.path.dirname(filename)
os.makedirs(parent_directory, exist_ok=True)
| [TeeLogger->[flush->[flush],__init__->[open,makedirs,dirname],write->[replace,write]]] | Initialize the object with terminal and log. | @joelgrus This is nasty - we are printing to this instead of `sys.stdout` so that we can save a copy. `sys.stdout` has type `io.TextIOWrapper`, but when I try to subclass this, it takes a `buffer` parameter in its constructor which doesn't appear in the actual `io` library. I'm a little out of my depth .... |
@@ -1795,7 +1795,7 @@ static gboolean _view_map_button_press_callback(GtkWidget *w, GdkEventButton *e,
if(e->button == 1)
{
// check if the click was in a location form - crtl gives priority to images
- if(lib->loc.main.id > 0 && !(e->state & GDK_CONTROL_MASK))
+ if(lib->loc.main.id > 0 && !dt_modifier_is(e->state, GDK_CONTROL_MASK))
{
OsmGpsMapPoint *p = osm_gps_map_get_event_location(lib->map, e);
| [No CFG could be retrieved] | This is the main callback for the view map. It is called when the user clicks on check if another location is clicked - ctrl gives priority to images. | This used to get executed if just SHIFT was pressed. From the surrounding code it looks like that was intentional? |
@@ -23,12 +23,12 @@ type Statistic struct {
func GetStatistic() (stats Statistic) {
stats.Counter.User = CountUsers()
stats.Counter.Org = CountOrganizations()
- stats.Counter.PublicKey, _ = db.DefaultContext().Engine().Count(new(PublicKey))
+ stats.Counter.PublicKey, _ = db.GetEngine(db.DefaultContext).Count(new(PublicKey))
stats.Counter.Repo = CountRepositories(true)
- stats.Counter.Watch, _ = db.DefaultContext().Engine().Count(new(Watch))
- stats.Counter.Star, _ = db.DefaultContext().Engine().Count(new(Star))
- stats.Counter.Action, _ = db.DefaultContext().Engine().Count(new(Action))
- stats.Counter.Access, _ = db.DefaultContext().Engine().Count(new(Access))
+ stats.Counter.Watch, _ = db.GetEngine(db.DefaultContext).Count(new(Watch))
+ stats.Counter.Star, _ = db.GetEngine(db.DefaultContext).Count(new(Star))
+ stats.Counter.Action, _ = db.GetEngine(db.DefaultContext).Count(new(Action))
+ stats.Counter.Access, _ = db.GetEngine(db.DefaultContext).Count(new(Access))
type IssueCount struct {
Count int64
| [DefaultContext,GroupBy,Table,Count,Find,Select,Engine] | GetStatistic returns the statistics for a single . Counter stats getter. | Could introduce a variable to reduce the calls. |
@@ -113,7 +113,7 @@ void WorldSession::HandleAddIgnoreOpcode(WorldPacket& recv_data)
return;
uint64 IgnoreGuid = MAKE_NEW_GUID(lowGuid, 0, HIGHGUID_PLAYER);
- FriendsResult ignoreResult = FRIEND_IGNORE_NOT_FOUND;
+ FriendsResult ignoreResult;
if (IgnoreGuid == GetPlayer()->GetGUID()) //not add yourself
ignoreResult = FRIEND_IGNORE_SELF;
| [HandleAddIgnoreOpcode->[outDebug,c_str,GetGlobalPlayerGUID,GetAcoreString,GetPlayer,SendFriendStatus,MAKE_NEW_GUID,normalizePlayerName],HandleSetContactNotesOpcode->[GUID_LOPART,GetSocial],HandleDelFriendOpcode->[outDebug,GUID_LOPART,GetPlayer,SendFriendStatus,GetSocial],HandleAddFriendOpcode->[getBoolConfig,outDebug,GetGlobalPlayerData,GetSecurity,IsVisibleGloballyFor,GetSession,c_str,GetGlobalPlayerGUID,GetAcoreString,GetPlayer,SendFriendStatus,MAKE_NEW_GUID,normalizePlayerName],HandleDelIgnoreOpcode->[GUID_LOPART,GetPlayer,SendFriendStatus,GetSocial],HandleContactListOpcode->[GetSocial,outDebug]] | Handle a add ignore action. | this value was never used, it will be either `FRIEND_IGNORE_SELF`, `FRIEND_IGNORE_ALREADY` or `FRIEND_IGNORE_FULL` (see below) |
@@ -126,6 +126,16 @@ class CryptographyClient(KeyVaultClientBase):
"""
return self._key_id.source_id
+ @classmethod
+ def from_jwk(cls, jwk):
+ # type: (dict) -> CryptographyClient
+ """Creates a client that can only perform cryptographic operations locally.
+
+ :param dict jwk: the key's cryptographic material, as a dictionary.
+ """
+ key_id = "https://key-vault.vault.azure.net/keys/local-key"
+ return cls(KeyVaultKey(key_id, jwk), object, _local_only=True)
+
@distributed_trace
def _initialize(self, **kwargs):
# type: (**Any) -> None
| [CryptographyClient->[unwrap_key->[_initialize,unwrap_key],decrypt->[_initialize,decrypt,_validate_arguments],verify->[_initialize,verify],sign->[_initialize,sign],encrypt->[_initialize,_validate_arguments,encrypt],wrap_key->[_initialize,wrap_key]]] | The full identifier of the client s key. | Using a real URL as a signal value makes me nervous. Also, I think we should try to use "kid" from the JWK, if it has one. That entails relaxing KeyProperties to return None for the properties it would normally parse from a Key Vault identifier, which seems okay to me, and doing so would also allow defaulting to None here |
@@ -0,0 +1,7 @@
+class Internal::PermissionsController < Internal::ApplicationController
+ layout "internal"
+
+ def index
+ @users = User.with_role(:admin).to_a + User.with_role(:super_admin).to_a + User.with_role(:single_resource_admin, :any)
+ end
+end
| [No CFG could be retrieved] | No Summary Found. | I think you can use union here: `User.with_role(:admin).union(User.with_role(:super_admin)).union(User.with_role(:single_resource_admin, :any))` :) |
@@ -67,12 +67,8 @@ class LateralPlanner():
def reset_mpc(self, x0=np.zeros(6)):
self.x0 = x0
self.lat_mpc.reset(x0=self.x0)
- self.desired_curvature = 0.0
- self.safe_desired_curvature = 0.0
- self.desired_curvature_rate = 0.0
- self.safe_desired_curvature_rate = 0.0
- def update(self, sm, CP):
+ def update(self, sm):
v_ego = sm['carState'].vEgo
active = sm['controlsState'].active
measured_curvature = sm['controlsState'].curvature
| [LateralPlanner->[publish->[bool,send,all_alive_and_valid,float,new_message],__init__->[arange,reset_mpc,LanePlanner,ones,zeros,LateralMpc],update->[any,max,column_stack,sec_since_boot,min,norm,warning,abs,list,get_d_path,len,clip,isnan,set_weights,parse_model,reset_mpc,run,interp,array],reset_mpc->[zeros,reset]]] | reset the MPC and the curvature rates Compute the next n - node node - change state and probability. missing - time - delay for lane change missing - state - dependent on the path missing - nan in mpc. | @HaraldSchafer Was the rate limit removed in the MPC refactor? |
@@ -98,7 +98,8 @@ class CollectionController extends AbstractRestController implements ClassResour
SystemCollectionManagerInterface $systemCollectionManager,
CollectionManagerInterface $collectionManager,
array $defaultCollectionType,
- array $permissions
+ array $permissions,
+ string $collectionClass
) {
parent::__construct($viewHandler, $tokenStorage);
| [CollectionController->[saveEntity->[toArray,handleView,getData,getBooleanRequestParameter,get,checkSystemCollection,getId,getRequestParameter,save,view],getAction->[toArray,handleView,checkPermission,getBooleanRequestParameter,get,getOffset,getKey,getTreeById,responseGetById,getById,getRequestParameter,getSearchPattern,view],moveEntity->[handleView,getRequestParameter,view,move],getData->[getRequestParameter,get],postTriggerAction->[toArray,handleView,moveEntity,getRequestParameter,view],getOffset->[get],checkSystemCollection->[isSystemCollection],getSecuredObjectId->[get],cgetAction->[all,toArray,handleView,getOffset,getBooleanRequestParameter,get,trans,getPage,getLimit,hasPermission,getRequestParameter,getSearchPattern,getCount,view,getTree],deleteAction->[getMessage,handleView,get,checkSystemCollection,responseDelete,getCode,delete],postAction->[saveEntity],putAction->[saveEntity]]] | Initializes the object. | For BC this should be nullable, throw a bc message and set it to `Collection:class` then. |
@@ -821,6 +821,8 @@ void GUIFormSpecMenu::parseItemImage(parserData* data, const std::string &elemen
GUIItemImage *e = new GUIItemImage(Environment, this, spec.fid,
core::rect<s32>(pos, pos + geom), name, m_font, m_client);
+ auto style = getStyleForElement("item_image", spec.fname);
+ e->setNotClipped(style.getBool(StyleSpec::NOCLIP, false));
e->drop();
m_fields.push_back(spec);
| [parseLabel->[getElementBasePos,getRealCoordinateBasePos],parseList->[getElementBasePos,getRealCoordinateBasePos],parseScrollBar->[getElementBasePos,getRealCoordinateGeometry,getRealCoordinateBasePos],parseItemImageButton->[getElementBasePos,getRealCoordinateGeometry,getRealCoordinateBasePos],parseElement->[parseScrollBarOptions,parseLabel,parseList,parseScrollBar,parseItemImageButton,parseTableColumns,parseImageButton,parseListRing,parseItemImage,parseImage,parsePwdField,parseStyle,parseBackgroundColor,parseDropDown,parseVersionDirect,parseBackground,parseContainer,parseTooltip,parseHyperText,parseListColors,parseContainerEnd,parseVertLabel,parseTableOptions,parseBox,parseTextList,parseCheckbox,parseButton,parseField,parseTabHeader,parseTable,parseFieldCloseOnEnter],parseImageButton->[getElementBasePos,getRealCoordinateGeometry,getRealCoordinateBasePos],parseItemImage->[getElementBasePos,getRealCoordinateGeometry,getRealCoordinateBasePos],parseImage->[getElementBasePos,getRealCoordinateGeometry,getRealCoordinateBasePos],preprocessEvent->[acceptInput],parseSimpleField->[getElementBasePos,createTextField],parsePwdField->[getElementBasePos,getRealCoordinateGeometry,getRealCoordinateBasePos],parseDropDown->[getElementBasePos,getRealCoordinateGeometry,getRealCoordinateBasePos],parseBackground->[getElementBasePos,getRealCoordinateGeometry,getRealCoordinateBasePos],regenerateGui->[parseVersionDirect,setInitialFocus,parsePositionDirect,parseSizeDirect,removeChildren,parseAnchorDirect,parseElement],drawMenu->[drawList,regenerateGui,drawSelectedItem],parseTooltip->[getElementBasePos,getRealCoordinateGeometry,getRealCoordinateBasePos],OnEvent->[getItemAtPos,updateSelectedItem,OnEvent,acceptInput,tryClose],parseHyperText->[getElementBasePos,getRealCoordinateGeometry,getRealCoordinateBasePos],parseTextArea->[createTextField,getElementBasePos,getRealCoordinateGeometry,getRealCoordinateBasePos],parseVertLabel->[getElementBasePos,getRealCoordinateBasePos],acceptInput->[getTable,getDropDownValues],parseBox->[getElementBasePos,getRealCoordinateGeometry,getRealCoordinateBasePos],parseTextList->[getElementBasePos,getRealCoordinateGeometry,getRealCoordinateBasePos],parseCheckbox->[getElementBasePos,getRealCoordinateBasePos],parseButton->[getElementBasePos,getRealCoordinateGeometry,getRealCoordinateBasePos],parseField->[parseSimpleField,parseTextArea],parseSizeDirect->[parseSize],parseTabHeader->[getRealCoordinateGeometry,getRealCoordinateBasePos],parseTable->[getElementBasePos,getRealCoordinateGeometry,getRealCoordinateBasePos],tryClose->[acceptInput]] | Parse an item image element. end of line. | Actually, before #8652 `item_image`s weren't clipped, too. |
@@ -59,6 +59,9 @@ func main() {
// Set our panel of external services.
g.SetServices(externals.GetServices())
+ // Set a pvl source
+ pvlsource.NewPvlSourceAndInstall(g)
+
// Don't abort here. This should not happen on any known version of Windows, but
// new MS platforms may create regressions.
if err != nil {
| [GetRunMode,SkipOutOfDateCheck,RegisterProtocolsWithContext,GetAutoFork,GetForkCmd,SaveConsoleMode,Exit,StartLoopbackServer,RegisterLogger,Error,Stop,NewLogUIProtocol,Warning,GetLogClient,Init,GetExtraFlags,ConfigureCommand,Notify,Errorf,RestoreConsoleMode,GetDoLogForward,AutoForkServer,InitUI,GetStandalone,GetDebug,AddHelpTopics,PrintOutOfDateWarnings,GetCommands,Debug,NewService,GetHelpTopics,IsSystemAdminUser,SendPath,Shutdown,NewCommandLine,GetLogForward,StartupMessage,IsNoStandalone,Printf,TODO,SetServices,SaferDLLLoading,AddCommands,FixVersionClash,IsService,Parse,AutoInstall,Cancel,GetServices,Sleep,Run,VersionString] | github. com. kingpin. io checks if the user is in the system. | is there an error case here to worry about? |
@@ -14,12 +14,10 @@ import (
evmconfig "github.com/smartcontractkit/chainlink/core/chains/evm/config"
"github.com/smartcontractkit/chainlink/core/chains/evm/types"
"github.com/smartcontractkit/chainlink/core/logger"
- "github.com/smartcontractkit/chainlink/core/service"
"github.com/smartcontractkit/chainlink/core/services"
"github.com/smartcontractkit/chainlink/core/services/bulletprooftxmanager"
"github.com/smartcontractkit/chainlink/core/services/eth"
"github.com/smartcontractkit/chainlink/core/services/headtracker"
- httypes "github.com/smartcontractkit/chainlink/core/services/headtracker/types"
"github.com/smartcontractkit/chainlink/core/services/keystore"
"github.com/smartcontractkit/chainlink/core/services/keystore/keys/ethkey"
"github.com/smartcontractkit/chainlink/core/services/log"
| [Start->[Start],Close->[Close],Ready->[Ready],Healthy->[Healthy]] | Package that imports a single object. newChain creates a new chain object from a database. | The split between `services`/`service` was there because `services` will pull in a few more services (only balance monitor, prom reporter, it's a lot better now that the v1 code was removed). They should be moved away from the root crate then. |
@@ -82,7 +82,8 @@ class _DestWrapper:
class LegacyBuildGraph(BuildGraph):
"""A directed acyclic graph of Targets and dependencies. Not necessarily connected.
- This implementation is backed by a Scheduler that is able to resolve TransitiveHydratedTargets.
+ This implementation is backed by a Scheduler that is able to resolve
+ LegacyTransitiveHydratedTargets.
"""
@classmethod
| [transitive_hydrated_target->[TransitiveHydratedTarget],hydrate_target->[HydratedTarget],transitive_hydrated_targets->[TransitiveHydratedTargets],addresses_with_origins_from_filesystem_specs->[OwnersRequest],hydrated_targets->[HydratedTargets],hydrate_sources->[HydratedField,_eager_fileset_with_spec],find_owners->[owns_any_source,Owners],OwnersRequest->[validate->[InvalidOwnersOfArgs]],sort_targets->[HydratedTargets,TopologicallyOrderedTargets],topo_sort->[recursive_topo_sort->[recursive_topo_sort],recursive_topo_sort],hydrate_sources_snapshot->[SourcesSnapshot],sources_snapshots_from_filesystem_specs->[SourcesSnapshots,SourcesSnapshot],hydrate_bundles->[HydratedField,_eager_fileset_with_spec],LegacyBuildGraph->[_index->[inject],resolve_address->[inject_address_closure],create->[target_types_from_build_file_aliases],_inject_address_specs->[_resolve_context,_index],_instantiate_remote_sources->[_DestWrapper],clone_new->[LegacyBuildGraph]],sources_snapshots_from_address_specs->[SourcesSnapshots]] | Construct a new legacy build graph given a Scheduler and a list of BuildFileAliases. | Could you expand the description of #4535 to account for this new layer of indirection? |
@@ -0,0 +1,12 @@
+<?php
+
+namespace Yoast\WP\SEO\Wrappers;
+
+use WPSEO_Shortlinker;
+
+class WP_Shortlink_Wrapper {
+
+ public function get ( $url ) {
+ return WPSEO_Shortlinker::get( $url );
+ }
+}
\ No newline at end of file
| [No CFG could be retrieved] | No Summary Found. | Needs newline at the end of the file |
@@ -102,6 +102,14 @@ class ParallaxElement {
/** @private @const {!Element} */
this.element_ = element;
+
+ /** @private {number} */
+ this.translateYOffset_ = 0;
+
+ /** @private {boolean} */
+ this.mutateScheduled_ = false;
+
+ this.boundTranslateY_ = this.translateY_.bind(this);
}
/**
| [No CFG could be retrieved] | The parallax effect for an element. Private method for checking if the user provided factor is 1 - based. | this doesn't seem to change value |
@@ -535,6 +535,12 @@ int main_(Teuchos::CommandLineProcessor &clp, Xpetra::UnderlyingLib& lib, int ar
}//end reruns
+#ifdef HAVE_MUELU_AMGX
+// Finalize AMGX
+//MueLu::MueLu_AMGX_finalize();
+//MueLu::MueLu_AMGX_finalize_plugins();
+#endif
+
return EXIT_SUCCESS;
}
| [main->[Automatic_Test_ETI],Temporary_Replacement_For_Kokkos_abs->[extent],equilibrateMatrix->[computeRowAndColumnOneNorms,getRowMap,extent,leftAndOrRightScaleCrsMatrix],main_->[get<double>,isParameter,recogniseAllOptions,size,getEntry,what,GetInstantiation,fopen,dup,name,MUELU_SWITCH_TIME_MONITOR,barrier,setOutputToRootOnly,getGlobalElement,flags,c_str,end,begin,getRank,getDataNonConst,set,fileno,omp_get_max_threads,isSublist,parse,rcp,getDomainMap,get<int>,sublist,ptr,getIndexBase,SystemSolve,equilibrateMatrix,setOption,Write,TEUCHOS_ASSERT,setEntry,compare,fclose,str,fflush,TEUCHOS_TEST_FOR_EXCEPTION,string>,dup2,GetParameterList,is_null,PreconditionerSetup]] | Main entry point for the Teuchos2D command line interface. Sets the solver options. scaled Krylov residual history This function is called when a new node is requested. Retrieve the missing node - specific information from the system. | Is there a reason you're not finalizing? |
@@ -32,9 +32,9 @@ class RouteServiceProvider extends ServiceProvider {
// file. This "namespace" helper will load the routes file within a
// route group which automatically sets the controller namespace.
$this->namespaced(function()
- {
- require app_path().'/Http/routes.php';
- });
+ {
+ App::make('App\Http\FrontendRoutes')->map();
+ });
});
}
| [RouteServiceProvider->[map->[namespaced]]] | This helper will load the routes file in the route group automatically sets the controller namespace. | Indentation has gone wrong here. |
@@ -1204,10 +1204,8 @@ static void dt_iop_gui_off_callback(GtkToggleButton *togglebutton, gpointer user
{
module->enabled = 0;
- //if current module is set as the CAT instance, remove that setting
- dt_iop_order_entry_t *CAT_instance = module->dev->proxy.chroma_adaptation;
-
- if(CAT_instance != NULL && CAT_instance->o.iop_order == module->iop_order)
+ // if current module is set as the CAT instance, remove that setting
+ if(module->dev->proxy.chroma_adaptation == module)
module->dev->proxy.chroma_adaptation = NULL;
dt_iop_set_module_in_trouble(module, FALSE);
| [No CFG could be retrieved] | Internal function to set the state of the module. set expanded status of a module. | I completely forgot about that part of the code |
@@ -206,10 +206,15 @@ func (u *cloudUpdate) RecordAndDisplayEvents(
close(done)
}()
+ encrypter, err := u.sm.Encrypter()
+ if err != nil {
+ encrypter = config.BlindingCrypter
+ }
+
// Start the Go-routines for displaying and persisting events.
go display.ShowEvents(
label, action, stackRef.Name(), op.Proj.Name,
- displayEvents, displayEventsDone, opts, isPreview)
+ displayEvents, displayEventsDone, opts, isPreview, encrypter)
go persistEngineEvents(
u, opts.Debug, /* persist debug events */
persistEvents, persistEventsDone)
| [recordEngineEvents->[GetToken],getTarget->[getSnapshot],Complete->[Close,GetToken],recordEngineEvents] | RecordAndDisplayEvents records the given events and persists them to the console or the P. | As an alternative, we could change this function to return an error. |
@@ -778,6 +778,12 @@ class Probe
$data["poll"] = $json["dfrn-poll"];
}
+ if (isset($json["hide"])) {
+ $data["hide"] = (bool)$json["hide"];
+ } else {
+ $data["hide"] = false;
+ }
+
return $data;
}
| [Probe->[pumpioProfileData->[item,loadHTMLFile],getFeedLink->[query,loadHTMLFile],ownHost->[getHostName],hostMeta->[isTimeout,getBody,isSuccess],feed->[getBody,isTimeout],webfinger->[getBody,isTimeout],pollHcard->[query,loadHTML,getBody,isTimeout,item],pollNoscrape->[getBody,isTimeout],ostatus->[getBody,isTimeout]]] | Polls a Noscriber s API for a given profile. This function returns an object that can be used to create a new object from a JSON object. | Are you sure `hide` can't be the strings `"true"` or `"false"` ? |
@@ -11,7 +11,7 @@ class RestApiClient(object):
Rest Api Client for handle remote.
"""
- def __init__(self, output, requester, put_headers=None):
+ def __init__(self, output, requester, block_v2, put_headers=None):
# Set to instance
self.token = None
| [RestApiClient->[search_packages->[_get_api],search->[_get_api],get_conan_manifest->[_get_api],upload_recipe->[_get_api],check_credentials->[_get_api],server_info->[_get_api],get_package_info->[_get_api],remove_packages->[_get_api],authenticate->[_get_api],remove_conanfile->[_get_api],get_path->[_get_api],get_package_manifest->[_get_api],get_recipe_sources->[_get_api],upload_package->[_get_api],get_package->[_get_api],get_recipe->[_get_api]]] | Initialize the object with the given parameters. | Please, express it as `revisions_enabled`, it will add more consistence across the codebase. |
@@ -454,10 +454,15 @@ public class SlaveComputer extends Computer {
String defaultCharsetName = channel.call(new DetectDefaultCharset());
- String remoteFs = getNode().getRemoteFS();
+ Slave node = getNode();
+ if (node == null) { // Node has been disabled/removed during the connection
+ throw new IOException("Node "+nodeName+" has been deleted during the channel setup");
+ }
+
+ String remoteFs = node.getRemoteFS();
if(_isUnix && !remoteFs.contains("/") && remoteFs.contains("\\"))
log.println("WARNING: "+remoteFs+" looks suspiciously like Windows path. Maybe you meant "+remoteFs.replace('\\','/')+"?");
- FilePath root = new FilePath(channel,getNode().getRemoteFS());
+ FilePath root = new FilePath(channel,node.getRemoteFS());
// reference counting problem is known to happen, such as JENKINS-9017, and so as a preventive measure
// we pin the base classloader so that it'll never get GCed. When this classloader gets released,
| [SlaveComputer->[getRetentionStrategy->[getNode,getRetentionStrategy],setNode->[setNode],getClassLoadingTime->[call],getResourceLoadingCount->[call],getNode->[getNode],grabLauncher->[getLauncher],taskCompleted->[taskCompleted],taskCompletedWithProblems->[taskCompletedWithProblems],getIcon->[getIcon],disconnect->[disconnect],getResourceLoadingTime->[call],getOSDescription->[call],getSlaveVersion->[call],getLogRecords->[call],getClassLoadingCount->[call],taskAccepted->[getNode,taskAccepted],isLaunchSupported->[isLaunchSupported],getClassLoadingPrefetchCacheCount->[call],kill->[kill],setChannel->[call,setChannel]]] | Sets the slave channel. This method is called when the slave is online. It is called by the slave when it. | Could reuse the `remoteFs` variable here, right? |
@@ -660,11 +660,9 @@ namespace Microsoft.Xna.Framework
AssertNotDisposed();
if (Platform.BeforeUpdate(gameTime))
{
- // Once per frame, we need to check currently
- // playing sounds to see if they've stopped,
- // and return them back to the pool if so.
- SoundEffectInstancePool.Update();
-
+ FrameworkDispatcher.Update();
+ DynamicSoundEffectInstanceManager.UpdatePlayingInstances();
+
Update(gameTime);
//The TouchPanel needs to know the time for when touches arrive
| [Game->[InitializeExistingComponents->[Initialize],OnDeactivated->[AssertNotDisposed],Log->[Log],DoUpdate->[AssertNotDisposed,Update],Components_ComponentAdded->[Initialize],DoDraw->[Draw,EndDraw,AssertNotDisposed,BeginDraw],Exit->[Exit],Platform_ApplicationViewChanged->[AssertNotDisposed],DoInitialize->[AssertNotDisposed,Initialize],ResetElapsedTime->[ResetElapsedTime],ExitEverything->[Dispose],DoExiting->[OnExiting,UnloadContent],SortingFilteringCollection->[Clear->[Clear],ProcessAddJournal->[Clear,Add],CopyTo->[CopyTo],Item_FilterPropertyChanged->[InvalidateCache],ProcessRemoveJournal->[Clear],Add->[Add],Item_SortPropertyChanged->[UnsubscribeFromItemEvents,InvalidateCache,Add],Contains->[Contains],Remove->[Remove,Add],GetEnumerator->[GetEnumerator]],OnActivated->[AssertNotDisposed],Run->[Run,AssertNotDisposed],Initialize->[LoadContent],Platform_AsyncRunLoopEnded->[AssertNotDisposed,EndRun],AddJournalEntry->[Equals->[Equals],GetHashCode->[GetHashCode]],Dispose->[Dispose]]] | Updates the game time with the given time. | This should go now too right? |
@@ -224,6 +224,10 @@ class UM3OutputDevicePlugin(OutputDevicePlugin):
def _onNetworkRequestFinished(self, reply):
reply_url = reply.url().toString()
+ address = ""
+ device = None
+ properties = {} # type: Dict[bytes, bytes]
+
if "system" in reply_url:
if reply.attribute(QNetworkRequest.HttpStatusCodeAttribute) != 200:
# Something went wrong with checking the firmware version!
| [UM3OutputDevicePlugin->[_onMachineSwitched->[checkCloudFlowIsPossible],stop->[stop],removeManualDevice->[resetLastManualDevice],start->[start],startDiscovery->[resetLastManualDevice]]] | Check if the device has a specific version of the cluster and if so request it. This function is called when we know what big it is. | Boyscouting; needs typing. |
@@ -2543,6 +2543,11 @@ def lstm(input,
weight_size = 0
num_dirrection = 2 if is_bidirec == True else 1
+ print(
+ 'This API (fluid.layers.LSTM) has been deprecated. It is recommended to use the new API (class paddle.nn.LSTM).'
+ 'Please refer to the link: https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/layer/rnn/LSTM_cn.html#lstm'
+ )
+
for i in range(num_layers):
if i == 0:
input_weight_size = (input_size * hidden_size) * 4 * num_dirrection
| [ArrayWrapper->[__getitem__->[__getitem__],append->[append]],BeamSearchDecoder->[_beam_search_step->[StateWrapper,OutputWrapper,_mask_probs,_gather],step->[_beam_search_step],initialize->[StateWrapper]],RNNCell->[__call__->[call],get_initial_states->[Shape]],_dynamic_decode_declarative->[step,finalize,initialize,_maybe_copy,_create_array_out_of_while],_rnn_dynamic_graph->[ArrayWrapper,append,get_initial_states],dynamic_decode->[_dynamic_decode_imperative,_dynamic_decode_declarative],_dynamic_decode_imperative->[ArrayWrapper,step,finalize,append,initialize,_maybe_copy],_rnn_static_graph->[get_initial_states,rnn],BasicDecoder->[step->[next_inputs,sample,OutputWrapper],initialize->[initialize]],birnn->[get_initial_states,rnn]] | This function computes the LSTM of a single node in a network. The Hadamard product of a matrix with the same dimension as the input and the Parameters for the last hidden state of the LSTM. of LSTM of the last N - layer of the LSTM. | Why not use @deprecated decorator? |
@@ -510,6 +510,12 @@ def run_private_blockchain(
seal_account=seal_account,
)
+ for config in nodes_configuration:
+ if config.get("mine"):
+ datadir = eth_node_to_datadir(config["nodekeyhex"], base_datadir)
+ keyfile_path = geth_keyfile(datadir, config["address"])
+ eth_create_account_file(keyfile_path, config["nodekey"])
+
elif blockchain_type == "parity":
genesis_path = os.path.join(base_datadir, "chainspec.json")
parity_generate_chain_spec(
| [run_private_blockchain->[eth_node_config_set_bootnodes,eth_node_config,parity_generate_chain_spec,eth_check_balance,geth_generate_poa_genesis,eth_run_nodes,parity_create_account],geth_prepare_datadir->[geth_init_datadir],parity_generate_chain_spec->[parity_extradata],eth_nodes_to_cmds->[geth_create_account,geth_prepare_datadir,parity_to_cmd,eth_node_to_datadir,geth_to_cmd],geth_generate_poa_genesis->[geth_clique_extradata],eth_run_nodes->[eth_nodes_to_cmds,eth_node_to_logpath],parity_create_account->[parity_write_key_file]] | Starts a private blockchain with the given private key. Context manager for parity client. | This was a bug, now all nodes which are miners will have their keys created. A future improvement may be to check that only one of the nodes is a miner for parity's PoA |
@@ -30,3 +30,16 @@ module SiteSessionHelpers
end
end
end
+
+def stub_current_site(site)
+ raise(Exception, 'GobiertoSiteConstraint.matches? already stubbed. Maybe with_current_site is in use outside this block?') if GobiertoSiteConstraint.new.public_methods.include?(:__minitest_any_instance_stub__matches?)
+ GobiertoSiteConstraint.stub_any_instance(:matches?, true) do
+ ApplicationController.stub_any_instance(:current_site, site) do
+ GobiertoAdmin::BaseController.stub_any_instance(:current_site, SiteDecorator.new(site)) do
+ ::GobiertoCore::CurrentScope.current_site = site
+ yield
+ ::GobiertoCore::CurrentScope.current_site = nil
+ end
+ end
+ end
+end
| [with_current_site_with_host->[with_current_site],with_each_current_site->[with_current_site]] | with_current_site_with_host yields a with the current site host and. | Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.<br>Line is too long. [219/180] |
@@ -93,9 +93,15 @@ class UsersController < ApplicationController
def confirm_destroy
destroy_token = Rails.cache.read("user-destroy-token-#{@user.id}")
- raise ActionController::RoutingError, "Not Found" unless destroy_token.present? && destroy_token == params[:token]
- set_current_tab("account")
+ # rubocop:disable Layout/LineLength
+ if destroy_token.blank?
+ flash[:settings_notice] = "Your token has expired, please request a new one. Tokens only last for 12 hours after account deletion is initiated."
+ redirect_to user_settings_path("account") and return
+ end
+ # rubocop:enable Layout/LineLength
+
+ raise ActionController::RoutingError, "Not Found" unless destroy_token == params[:token]
end
def full_delete
| [UsersController->[add_org_admin->[update],remove_org_admin->[update],remove_identity->[update]]] | Confirm the user has a non - blank destroy token and if yes ask the user to delete. | Makes sense, to avoid using the `and return` we might want to restructure the if (haven'te tested) into: ```ruby if destroy_token.blank? redirect elsif destroy_token != params[:token] raise end |
@@ -37,7 +37,7 @@ public class TestConsoleHandler implements TestListener {
public void handleInput(int[] keys) {
if (disabled) {
for (int i : keys) {
- if (i == 'e') {
+ if (i == 'r') {
TestSupport.instance().get().start();
}
}
| [TestConsoleHandler->[install->[pushInputHandler],testsEnabled->[setStatus,setPrompt],printFullResults->[error,get,getFailingClasses,getFailing,isEmpty,getStatus,info,getDisplayName],testsDisabled->[setStatus,setPrompt],handleInput->[printFullResults,printUsage,start,stop,toggleInstrumentation,runAllTests,get,runFailedTests,info,toggleBrokenOnlyMode,setDisplayTestOutput],testRunStarted->[runComplete->[getTotalTime,error,size,get,setStatus,getFailing,toString,isEmpty,StringBuilder,getDisplayName,entrySet,setPrompt],testComplete->[incrementAndGet,getStatus],runStarted->[setStatus,set],runAborted->[setStatus,setPrompt],noTests->[setStatus,setPrompt],testStarted->[getDisplayName,setStatus,get],TestRunListener,AtomicLong,accept],listenerRegistered->[setStatus],printUsage->[println],InputHandler,getLogger]] | Handle input of the n - th key. | Should it be changed to paused? |
@@ -11,13 +11,13 @@ from pants.util.meta import classproperty
class PantsRequirement:
- """Exports a `python_requirement_library` pointing at the active pants' corresponding sdist.
+ """Exports a `python_requirement_library` pointing at the active Pants's corresponding sdist.
This requirement is useful for custom plugin authors who want to build and test their plugin with
- pants itself. Using the resulting target as a dependency of their plugin target ensures the
- dependency stays true to the surrounding repo's version of pants.
+ Pants itself. Using the resulting target as a dependency of their plugin target ensures the
+ dependency stays true to the surrounding repo's version of Pants.
- NB: The requirement generated is for official pants releases on pypi; so may not be appropriate
+ NB: The requirement generated is for official Pants releases on PyPI; so may not be appropriate
for use in a repo that tracks `pantsbuild/pants` or otherwise uses custom pants sdists.
:API: public
| [PantsRequirement->[__call__->[basename,TargetDefinitionException,create_object,pants_version,startswith,format,Address,PythonRequirement]]] | Creates a dependency of a pants target. Check if the target is available for pantsbuild. pants. | Nit: this may not be an sdist. In particular, the core is a shipped as a wheel. |
@@ -38,6 +38,8 @@ class LinkTreeTest(unittest.TestCase):
def setUp(self):
self.stage = Stage('link-tree-test')
+ # FIXME : possibly this test needs to be refactored to avoid the explicit call to __enter__ and __exit__
+ self.stage.__enter__()
with working_dir(self.stage.path):
touchp('source/1')
| [LinkTreeTest->[test_merge_to_existing_directory->[check_file_link],test_merge_to_new_directory->[check_file_link]]] | This method sets up the link - tree. | Why not move the logic in `__enter__` and `__exit__` into more appropriately named functions, then make `__enter__` and `__exit__` call them? This would mirror Python's builtin file objects, which expose `open` and `close` but wrap them with `__enter__` and `__exit__`. |
@@ -1318,7 +1318,7 @@ TICKET_RETURN tls_decrypt_ticket(SSL *s, const unsigned char *etick,
/* Some additional consistency checks */
if (p != sdec + slen || sess->session_id_length != 0) {
SSL_SESSION_free(sess);
- return 2;
+ return TICKET_NO_DECRYPT;
}
/*
* The session ID, if non-empty, is used by some clients to detect
| [No CFG could be retrieved] | This function checks the encrypted ticket and the session id. This function is called from the constructor of the TLS12 class. | Is this well defined behaviour? We seem to be doing pointer arithmetic on a pointer that was freed a couple of lines above. |
@@ -362,13 +362,8 @@ public abstract class HttpContentEncoder extends MessageToMessageCodec<HttpReque
private final EmbeddedChannel contentEncoder;
public Result(String targetContentEncoding, EmbeddedChannel contentEncoder) {
- if (targetContentEncoding == null) {
- throw new NullPointerException("targetContentEncoding");
- }
- if (contentEncoder == null) {
- throw new NullPointerException("contentEncoder");
- }
-
+ ObjectUtil.checkNotNull(targetContentEncoding, "targetContentEncoding");
+ ObjectUtil.checkNotNull(contentEncoder, "contentEncoder");
this.targetContentEncoding = targetContentEncoding;
this.contentEncoder = contentEncoder;
}
| [HttpContentEncoder->[channelInactive->[channelInactive],encodeContent->[encode],handlerRemoved->[handlerRemoved],cleanupSafely->[cleanup]]] | Get the target content encoding. | nit: you can merge lines above as `checkNotNull` will return the given argument |
@@ -18,9 +18,16 @@ $taxonomies = apply_filters( 'wpseo_sitemaps_supported_taxonomies', get_taxonomi
if ( is_array( $taxonomies ) && $taxonomies !== array() ) {
foreach ( $taxonomies as $tax ) {
// Explicitly hide all the core taxonomies we never want in our sitemap.
- if ( in_array( $tax->name, array( 'link_category', 'nav_menu', 'post_format' ) ) ) {
+ if ( in_array( $tax->name, array( 'link_category', 'nav_menu' ) ) ) {
continue;
}
+
+ $all_options = WPSEO_Options::get_all();
+
+ if ( 'post_format' === $tax->name && ! empty( $all_options['disable-post_format'] ) ) {
+ continue;
+ }
+
if ( isset( $tax->labels->name ) && trim( $tax->labels->name ) != '' ) {
$yform->toggle_switch(
'taxonomies-' . $tax->name . '-not_in_sitemap',
| [toggle_switch] | Filters taxonomies to present in interface for exclusion. | It it possible to use WPSEO_Options::get_option() instead of get_all(). It seems to only be used for disable-post-format? |
@@ -0,0 +1,13 @@
+package old
+
+import (
+ "github.com/ethereum/go-ethereum/common"
+ "github.com/smartcontractkit/chainlink/store/models"
+)
+
+// IndexableBlockNumber captured in old state for tests.
+type IndexableBlockNumber struct {
+ Number models.Big `json:"number" gorm:"index;type:varchar(255);not null"`
+ Digits int `json:"digits" gorm:"index"`
+ Hash common.Hash `json:"hash"`
+}
| [No CFG could be retrieved] | No Summary Found. | Perhaps this should be private so people don't accidentally use it? |
@@ -37,6 +37,7 @@ import java.util.Set;
*/
public class LifecycleModule implements Module
{
+ private final LifecycleScope initScope = new LifecycleScope(Lifecycle.Stage.INIT);
private final LifecycleScope scope = new LifecycleScope(Lifecycle.Stage.NORMAL);
private final LifecycleScope lastScope = new LifecycleScope(Lifecycle.Stage.LAST);
| [LifecycleModule->[configure->[getEagerBinder],getLifecycle->[start->[start]]]] | Provides a module that registers a class to instantiate eagerly. Registers a class or annotation combination to instantiate eagerly. | Can you add a doc somewhere that mentions things in this lifecycle should not log anything. So that means things should expect to fail silently and be fine, or might need to exit the whole jvm if there is a problem. But logging or warning do not fit into this lifecycle |
@@ -47,6 +47,11 @@ func VolumeCreateNotFoundError(msg string) error {
return derr.NewErrorWithStatusCode(fmt.Errorf("No volume store named (%s) exists", msg), http.StatusInternalServerError)
}
+// VolumeNotFoundError returns a 404 docker error for a volume get request.
+func VolumeNotFoundError(msg string) error {
+ return derr.NewErrorWithStatusCode(fmt.Errorf("No such volume: %s", msg), http.StatusNotFound)
+}
+
// NotFoundError returns a 404 docker error when a container is not found.
func NotFoundError(msg string) error {
return derr.NewRequestNotFoundError(fmt.Errorf("No such container: %s", msg))
| [Error->[Sprintf],NewErrorWithStatusCode,NewRequestNotFoundError,Errorf,NewRequestConflictError] | InvalidBindError returns a string describing the error that occurred while binding a volume. | Does this trigger volume creation in the client in the same way image 404 triggers pull? IIRC that on-demand creation was implemented explicitly, but don't recall hearing that we checked for implicit behaviours. |
@@ -393,6 +393,7 @@ func TestWebhook(ctx *context.Context) {
}
}
+// DeleteWebhook delete a webhook
func DeleteWebhook(ctx *context.Context) {
if err := models.DeleteWebhookByRepoID(ctx.Repo.Repository.ID, ctx.QueryInt64("id")); err != nil {
ctx.Flash.Error("DeleteWebhookByRepoID: " + err.Error())
| [Handle,Status,Message,Redirect,IsSliceContainsStr,GetWebhooksByRepoID,NewGitSig,Add,Info,GetWebhookByOrgID,HTML,Error,CreateWebhook,PrepareWebhooks,Marshal,New,UpdateEvent,SendEverything,NewGhostUser,HookContentType,QueryInt64,JSON,HasError,UpdateWebhook,Tr,Written,ParamsInt64,IsErrWebhookNotExist,ToLower,History,DeleteWebhookByRepoID,MustIDFromString,ChooseEvents,GetSlackHook,APIFormat,GetWebhookByRepoID,Sprintf,HTMLURL,String,Params,PushOnly,Success] | PrepareWebhooks creates a new webhook and deletes it. | nitpicking: I think the phrases should be english phrases, like "DeleteWebhook deletes a web hook" (note the ending `s` for third person subject being the function) |
@@ -13,7 +13,7 @@ class Tag < ActiveRecord::Base
has_many :tag_groups, through: :tag_group_memberships
def self.tags_by_count_query(opts={})
- q = TopicTag.joins(:tag, :topic).group("topic_tags.tag_id, tags.name").order('count_all DESC')
+ q = Topic.unscoped { TopicTag.joins(:tag, :topic).group("topic_tags.tag_id, tags.name").order('count_all DESC') }
q = q.limit(opts[:limit]) if opts[:limit]
q
end
| [Tag->[top_tags->[max_tags_in_filter_list,filter_allowed_tags,allowed_category_ids,pluck,where,id,map],tags_by_count_query->[order,limit],include_tags?->[show_filter_by_tag,tagging_enabled],category_tags_by_count_query->[where,id],full_url->[base_url,name],has_many,validates]] | This method is used to provide a count of tags in a category. | Is there a `default_scope` that we don't want on `Topic`? |
@@ -34,7 +34,7 @@ namespace {
ACE_Message_Block temp(mb.data_block (), ACE_Message_Block::DONT_DELETE);
temp.rd_ptr(mb.rd_ptr()+offset);
temp.wr_ptr(mb.wr_ptr());
- OpenDDS::DCPS::Serializer ser(&temp, swap);
+ OpenDDS::DCPS::Serializer ser(&temp, OpenDDS::DCPS::Encoding::KIND_CDR_UNALIGNED, swap ? OpenDDS::DCPS::ENDIAN_LITTLE : OpenDDS::DCPS::ENDIAN_BIG);
ser.buffer_read(reinterpret_cast<char*>(&dest), sizeof(T), swap);
return true;
}
| [No CFG could be retrieved] | Reads a single header from a message block and stores it in a variable number of bytes. Reads the next n - bytes from the message block and copies the remaining data into dest. | I think you're mixing up NATIVE/NONNATIVE with BIG/LITTLE here and looks like you've done this at least a couple of times. Also this line and the changed line below are way too long. For this particular situation these `mb_*` functions are only used in `DataSampleHeader::partial` and it looks like there is already an encoding object that I put there, but it's not doing everything it could do. You could move that encoding object up, the swap argument on these functions `mb_*` functions to `const Encoding& encoding` and pass the encoding object in, and set swap when it has that information. |
@@ -271,7 +271,7 @@ ds_rsvc_lookup(enum ds_rsvc_class_id class, d_iov_t *id,
entry = d_hash_rec_find(&rsvc_hash, id->iov_buf, id->iov_len);
if (entry == NULL) {
- char *path;
+ char *path = NULL;
struct stat buf;
int rc;
| [No CFG could be retrieved] | This function is called by the D - SVC code to find the specified object in the Retrieves the latest from the database and fills it into the hint. | Should we skip the 'stat()' call when path is NULL? I'm not sure if 'stat' on a NULL path will cause problem. |
@@ -20,6 +20,11 @@ import org.apache.kafka.connect.data.Schema;
import java.util.List;
import java.util.Objects;
+import java.util.function.Supplier;
+import java.util.stream.Collectors;
+
+import io.confluent.ksql.function.udf.Kudf;
+import io.confluent.ksql.util.KsqlException;
public class KsqlFunction {
| [KsqlFunction->[hashCode->[hash],equals->[getClass,equals],requireNonNull]] | PUBLIC CONSTRUCTORS This class represents a KsqlFunction which returns a specific object in the Checks if the given object is an instance of KsqlFunction. | nit: `kudfClass` should be `Class<? extends Kudf>`, same elsewhere. |
@@ -163,11 +163,11 @@ public class WorkerResource
@QueryParam("offset") @DefaultValue("0") long offset
)
{
- final Optional<InputSupplier<InputStream>> stream = taskRunner.streamTaskLog(taskid, offset);
+ final Optional<ByteSource> stream = taskRunner.streamTaskLog(taskid, offset);
if (stream.isPresent()) {
- try {
- return Response.ok(stream.get().getInput()).build();
+ try (InputStream logStream = stream.get().openStream()) {
+ return Response.ok(logStream).build();
}
catch (Exception e) {
log.warn(e, "Failed to read log for task: %s", taskid);
| [WorkerResource->[doEnable->[build,updateWorkerAnnouncement],getTasks->[build],doDisable->[build,updateWorkerAnnouncement],isEnabled->[build,equalsIgnoreCase,getWorker],doShutdown->[build,shutdown,error],doGetLog->[isPresent,streamTaskLog,build,warn],getIp,getCapacity,Worker,Logger,getHost]] | Gets the log of a task. | using a try-with-resources here broke task log streaming, because the stream gets closed when exiting the try-catch block instead of letting Jersey read out and close the inputstream |
@@ -376,6 +376,11 @@ Func::TryCodegen()
{
Assert(!IsJitInDebugMode() || !GetJITFunctionBody()->HasTry());
+ if (this->GetScriptContext()->IsInDebugButCantDoJITInDebug())
+ {
+ return;
+ }
+
BEGIN_CODEGEN_PHASE(this, Js::BackEndPhase);
{
// IRBuilder
| [No CFG could be retrieved] | Try to codegen a number object. This is the main entry point for the IR to global object. | Why are we queueing the working item and get here at all of EnableJitInDebugMode is false? Shouldn't we not queue those instead? |
@@ -72,9 +72,9 @@ public class StringInputRowParser implements ByteBufferInputRowParser
}
@Override
- public InputRow parse(ByteBuffer input)
+ public List<InputRow> parseBatch(ByteBuffer input)
{
- return parseMap(buildStringKeyMap(input));
+ return ImmutableList.of(parseMap(buildStringKeyMap(input)));
}
@JsonProperty
| [StringInputRowParser->[parseString->[parse,initializeParser],withParseSpec->[getEncoding,StringInputRowParser],parseMap->[parse],startFileFromBeginning->[startFileFromBeginning,initializeParser]]] | Parse a key - value map from a ByteBuffer. | Throws NPE if parseMap returns a null. Maybe in general it's better to prefer your `Utils.nullableListOf()` instead of `ImmutableList.of()` throughout - for example `NoopInputRowParser` will also throw an NPE if input is null which is not the same behavior as previously. |
@@ -237,4 +237,5 @@ class Users::RegistrationsController < Devise::RegistrationsController
def after_inactive_sign_up_path_for(resource)
new_user_session_path
end
+
end
| [create->[create,persisted?,new,created_by,render,valid?,build_resource,save,name],generate_upload_posts->[avatar_file_size,megabytes,path,avatar_content_type,presigned_post,url,each,fields,push],avatar->[to_sym,redirect_to,url,find_by_id],sign_up_params->[merge,empty?,permit,join],account_update_params->[permit],update->[respond_to,errors,is_flashing_format?,respond_with,html,update_resource,block_given?,get!,resource,include?,unconfirmed_email,json,clean_up_passwords,keep,set_flash_message,render,to_key,update_needs_confirmation?,sign_in,respond_to?],update_resource->[avatar_path,update_with_password,update_without_password,include?,valid_password?,blank?,destroy,add,last,mime_type,delete],signature->[render,respond_to,json,valid?,errors,empty_avatar],before_action] | after_inactive_sign_up_path for resource. | Extra empty line detected at class body end. |
@@ -2028,6 +2028,10 @@ class TestBrowseUploadVolume(cloudstackTestCase):
"""
Test Browser_volume_Life_cycle - This includes upload volume,attach to a VM, write data ,Stop ,Start, Reboot,Reset of a VM, detach,attach back to the VM, delete volumes
"""
+ if self.hypervisor.lower() == 'hyperv':
+ self.skipTest("cann't be run for % hypervisor as it doesn't support volume resize operation" % self.hypervisor)
+
+
try:
self.debug("========================= Test 1: Upload Browser based volume and validate ========================= ")
| [TestBrowseUploadVolume->[reboot_ssvm->[waitForSystemVMAgent],attach_deleted_volume->[attach_volume],uploadwithextendedfileextentions->[validate_uploaded_volume],posturlwithdeletedvolume->[validate_uploaded_volume,delete_volume],vmoperations->[start_vm,reboot_vm,stop_vm],test_06_Browser_Upload_Volume_with_extended_file_extenstions->[uploadwithextendedfileextentions],volume_snapshot->[__verify_values],test_01_Browser_volume_Life_cycle_tpath->[destroy_vm,resize_volume,expunge_vm,detach_volume,deletevolume_fail,volume_snapshot_template,browse_upload_volume_with_md5,vmoperations,browse_upload_volume,download_volume,deploy_vm,attach_volume,resize_fail,volume_snapshot_volume,restore_vm,volume_snapshot,recover_destroyed_vm],uploadvolwithssvmreboot->[validate_uploaded_volume,reboot_ssvm],test_08_Browser_Upload_Volume_TamperedPostURL->[invalidposturl],test_15_Browser_Upload_Volume_primary_storage_resource_limits->[browse_upload_volume,getstoragelimts],browse_upload_volume_with_md5->[validate_uploaded_volume],reboot_vm->[validate_vm],test_13_Browser_Upload_Volume_volume_resource_limits->[browse_upload_volume,getvolumelimts],test_17_Browser_Upload_Volume_secondary_storage_resource_limits_after_deletion->[browse_upload_volume,getstoragelimts],reuse_url->[validate_uploaded_volume],test_03_Browser_Upload_Volume_Global_Config_TPath->[browse_upload_volume,validate_max_vol_size],stop_vm->[validate_vm],test_12_Browser_Upload_Volume_with_all_API_parameters->[browse_upload_volume_with_out_format,browse_upload_volume_with_projectid,browse_upload_volume,browse_upload_volume_with_out_zoneid],test_09_Browser_Upload_Volume_PostURL_with_Deleted_Uploadvolume_Details->[onlyupload,posturlwithdeletedvolume],test_14_Browser_Upload_Volume_secondary_storage_resource_limits->[browse_upload_volume,getstoragelimts],test_10_Browser_Upload_Volume_API_with_imagepoolid->[uploadwithimagestoreid],volume_snapshot_template->[__verify_values],uploadwithimagestoreid->[validate_uploaded_volume],browse_upload_volume_with_projectid->[validate_uploaded_volume],test_07_Browser_Upload_Volume_Storage_Cleanup_Config_Validation->[invalidposturl,validate_storage_cleanup],uploadvol->[validate_uploaded_volume,reboot_ssvm],test_16_Browser_Upload_volume_resource_limits_after_deletion->[browse_upload_volume,getvolumelimts],test_11_migrate_upload_volume->[volume_migration,resize_volume,detach_volume,vmoperations,browse_upload_volume,deploy_vm,attach_volume],stop_ssvm->[waitForSystemVMAgent,list_sec_storage_vm],test_04_Browser_Upload_Volume_Negative_Scenarios_TPath->[uploadvolwithssvmreboot,attach_deleted_volume,uploadwithcustomoffering,onlyupload,browse_upload_volume,deploy_vm,reuse_url,invalidupload,uploadwithsamedisplaytext,uploadvol],uploadwithcustomoffering->[validate_uploaded_volume],detach_volume->[detach_volume],test_05_Browser_Upload_Volume_MultiSSVM_Scenarios_TPath->[uploadvolwithmultissvm],destroy_ssvm->[waitForSystemVMAgent],browse_upload_volume->[validate_uploaded_volume],browse_upload_volume_with_invalid_md5->[validate_uploaded_volume],deploy_vm->[validate_vm],attach_volume->[validate_uploaded_volume,attach_volume],start_vm->[validate_vm],test_02_SSVM_Life_Cycle_With_Browser_Volume_TPath->[reboot_ssvm,stop_ssvm,expunge_vm,detach_volume,destroy_ssvm,vmoperations,browse_upload_volume,deploy_vm,attach_volume],uploadvolwithmultissvm->[destroy_vm,detach_volume,vmoperations,browse_upload_volume,deploy_vm,attach_volume],invalidposturl->[validate_uploaded_volume]]] | This test tests browser volume life cycle. This test deletes a volume which has not been attached to a VM. This test creates a new volume in ACS which has not yet been uploaded. Deploy a Browser based volume with checksum and validate VM operations after deploy. | Should be %s instead of %. Change for all applicable places. |
@@ -245,6 +245,7 @@ define([
this.debugCommandFilter = undefined;
this._debugSphere = undefined;
+ this._debugSphereInverseModelMatrix = undefined;
// initial guess at frustums.
var near = this._camera.frustum.near;
| [No CFG could be retrieved] | Displays a single object. Provides methods for the object. | This feels hacky. Are you sure about this approach? |
@@ -273,17 +273,8 @@ class RemoteRegistry(object):
def add(self, remote_name, url, verify_ssl=True, insert=None, force=None):
self._validate_url(url)
remotes = self.load_remotes()
- renamed = remotes.add(remote_name, url, verify_ssl, insert, force)
+ remotes.add(remote_name, url, verify_ssl, insert, force)
remotes.save(self._filename)
- if renamed:
- with self._cache.editable_packages.disable_editables():
- for rrev in self._cache.all_refs():
- if self._cache.get_remote(rrev) == renamed:
- self._cache.set_remote(rrev, remote_name)
- for pkg_id in self._cache.get_package_ids(rrev):
- for prev in self._cache.get_package_revisions(pkg_id):
- if self._cache.get_remote(prev) == renamed:
- self._cache.set_remote(prev, remote_name)
def update(self, remote_name, url, verify_ssl=True, insert=None):
self._validate_url(url)
| [Remotes->[dumps->[values],loads->[loads,Remotes],_get_by_url->[values],all_items->[items],all_values->[values],_upsert->[items],_add_update->[_get_by_url,items],items->[items],values->[values],save->[dumps,save,items],get->[get],__nonzero__->[__bool__],clear->[clear],add->[_upsert],defaults->[Remotes],rename->[items],set_disabled_state->[values]],RemoteRegistry->[define->[get_remote,save],update->[_validate_url,load_remotes,save,update],initialize_remotes->[defaults,save],reset_remotes->[initialize_remotes],load_remotes->[loads,initialize_remotes],remove->[get_remote,load_remotes,save],add->[get_remote,save,load_remotes,add,_validate_url],clear->[save,load_remotes,clear],rename->[save,get_remote,load_remotes,rename],set_disabled_state->[save,load_remotes,set_disabled_state]]] | Add a new remote to the cache. | Is ``conan remote clean`` command removed? |
@@ -46,6 +46,7 @@ public class NarayanaJtaRecorder {
public void setDefaultTimeout(TransactionManagerConfiguration transactions) {
transactions.defaultTransactionTimeout.ifPresent(defaultTimeout -> {
+ arjPropertyManager.getCoordinatorEnvironmentBean().setDefaultTimeout((int) defaultTimeout.getSeconds());
TxControl.setDefaultTimeout((int) defaultTimeout.getSeconds());
});
}
| [NarayanaJtaRecorder->[setDefaultTimeout->[setDefaultTimeout]]] | Sets the default timeout for all transactions. | +1 - could the TxControl statement immediately following be removed too do you think? |
@@ -0,0 +1,17 @@
+package hbstream
+
+import "github.com/prometheus/client_golang/prometheus"
+
+var (
+ heartbeatStreamCounter = prometheus.NewCounterVec(
+ prometheus.CounterOpts{
+ Namespace: "pd",
+ Subsystem: "hbstream",
+ Name: "region_message",
+ Help: "Counter of message hbstream sent.",
+ }, []string{"address", "store", "type", "status"})
+)
+
+func init() {
+ prometheus.MustRegister(heartbeatStreamCounter)
+}
| [No CFG could be retrieved] | No Summary Found. | Please add license header like other files. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.