patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -258,7 +258,9 @@ public class HiveMetaStoreBasedRegister extends HiveRegister {
try (AutoReturnableObject<IMetaStoreClient> client = this.clientPool.getClient()) {
if (client.get().tableExists(dbName, tableName)) {
client.get().dropTable(dbName, tableName);
- HiveMetaStoreEventHelper.submitSuccessfulTableDrop(eventSubmitter, dbName, tableName);
+ String metastoreURI = this.clientPool.getHiveConf().get(HiveMetaStoreClientFactory.HIVE_METASTORE_TOKEN_SIGNATURE, "null");
+ String azkabanUrl = this.props.getProp(ConfigurationKeys.AZKABAN_EXECUTION_URL, "null");
+ HiveMetaStoreEventHelper.submitSuccessfulTableDrop(eventSubmitter, dbName, tableName, azkabanUrl, metastoreURI);
log.info("Dropped table " + tableName + " in db " + dbName);
}
} catch (TException e) {
| [HiveMetaStoreBasedRegister->[getPartitionWithCreateTime->[getPartitionWithCreateTime],createTableIfNotExists->[createTableIfNotExists],getPartition->[getPartition],getTable->[getTable],alterPartition->[getPartition],createDbIfNotExists->[createDbIfNotExists],alterTable->[getTable]]] | Drops the table if it exists. | Please don't include azkaban specific stuff here. Instead, add it at the `RootMetricContext` level, in that case it will be an automatic tag everywhere. |
@@ -207,7 +207,7 @@ public class DatabaseRuleManager
String.format(
"SELECT r.dataSource, r.payload "
+ "FROM %1$s r "
- + "INNER JOIN(SELECT dataSource, max(version) as version, payload FROM %1$s GROUP BY dataSource) ds "
+ + "INNER JOIN(SELECT dataSource, max(version) as version FROM %1$s GROUP BY dataSource) ds "
+ "ON r.datasource = ds.datasource and r.version = ds.version",
getRulesTable()
)
| [DatabaseRuleManager->[start->[createDefaultRule],getRulesTable->[getRulesTable],poll->[withHandle],overrideRule->[withHandle]]] | Polls for a single missing rule. | Hi Ray, payload is required in order to build the rules. See line 232 |
@@ -133,7 +133,7 @@ public class InProcessCreateTest {
return myString.equals(((UnserializableRecord) o).myString);
}
- static class UnserializableRecordCoder extends StandardCoder<UnserializableRecord> {
+ static class UnserializableRecordCoder extends AtomicCoder<UnserializableRecord> {
private final Coder<String> stringCoder = StringUtf8Coder.of();
@Override
| [InProcessCreateTest->[UnserializableRecord->[hashCode->[hashCode],UnserializableRecordCoder->[decode->[UnserializableRecord,decode],verifyDeterministic->[verifyDeterministic],encode->[encode]],equals->[equals]],testThrowsIllegalArgumentWhenCannotInferCoder->[Record,Record2],testSerializableOnUnserializableElements->[UnserializableRecord,UnserializableRecordCoder]]] | Override to implement the equals method. | the change to a deterministic coder is desired? |
@@ -23,10 +23,11 @@ import {validateData} from '../3p/3p';
*/
export function medyanet(global, data) {
- validateData(data, ['slot']);
+ validateData(data, ['slot', 'domain']);
global.adunit = data.slot;
global.size = '[' + data.width + ',' + data.height + ']';
+ global.domain = data.domain;
medyanetAds(global, data);
}
| [No CFG could be retrieved] | Creates an AMP frame with the specified size and size. Renders the start tag. | Do you have any optional arguments that you would like to validate here? |
@@ -12,6 +12,7 @@ class TestMomentumOp(OpTest):
velocity = np.zeros((123, 321)).astype("float32")
learning_rate = np.array([0.001]).astype("float32")
mu = 0.0001
+ use_nesterov = False
self.inputs = {
'Param': param,
| [TestMomentumOp->[test_check_output->[check_output],setUp->[zeros,array,random]],main] | Sets up the object. | Seems that our OpTest framework needs to support multi-version test Cases. |
@@ -827,7 +827,7 @@ def create_task(opt, user_agents):
# Single threaded or hogwild task creation (the latter creates multiple threads).
# Check datatype for train, because we need to do single-threaded for
# valid and test in order to guarantee exactly one epoch of training.
- if opt.get('numthreads', 1) == 1 or 'train' not in opt['datatype']:
+ if opt.get('numthreads', 1) == 1 or 'train' not in opt['datatype'] or opt.get('batchsize', 1) > 1:
if ',' not in opt['task']:
# Single task
world = create_task_world(opt, user_agents)
| [MultiWorld->[__next__->[epoch_done],share->[share],reset->[reset],reset_metrics->[reset_metrics],epoch_done->[epoch_done],display->[getID,display],parley->[parley_init]],World->[reset_metrics->[reset_metrics],reset->[reset],display->[display_messages],_share_agents->[share]],create_task->[MultiWorld,HogwildWorld,create_task_world,_get_task_world,BatchWorld],override_opts_in_shared->[override_opts_in_shared],HogwildWorld->[report->[report],save_agents->[save_agents],__init__->[HogwildProcess],getID->[getID],display->[shutdown]],HogwildProcess->[run->[parley],__init__->[share]],create_task_world->[_get_task_world],BatchWorld->[report->[report],__next__->[epoch_done],save_agents->[save_agents],shutdown->[shutdown],getID->[getID],reset->[reset],reset_metrics->[reset_metrics],__init__->[get_agents,override_opts_in_shared,share],batch_observe->[get_agents,validate,observe],epoch_done->[epoch_done],batch_act->[get_agents,batch_act,get_acts],display->[display],parley->[batch_observe,execute,get_agents,batch_act,parley_init]],DialogPartnerWorld->[shutdown->[shutdown],parley->[validate]],ExecutableWorld->[parley->[observe,execute]],MultiAgentDialogWorld->[epoch_done->[epoch_done],shutdown->[shutdown],episode_done->[episode_done],parley->[validate]]] | Create a task object based on the given options. This is a hack to make sure multiworld is not supported. | maybe we need to explain the interplay of numthreads and batchsize here (as i dont understand myself) |
@@ -25,7 +25,7 @@ __AUTOCLEAN_KEYS__: List[str] = [
"batchindex",
"download_path",
"datapath",
- "batchindex",
+ "verbose",
# we don't save interactive mode or load from checkpoint, it's only decided by scripts or CLI
"interactive_mode",
"load_from_checkpoint",
| [Opt->[__reduce__->[__getstate__],__deepcopy__->[Opt],load->[load]]] | Creates a class for tracking the given object s . Returns a memoized version of the object. | Lol don't kill this! |
@@ -0,0 +1,17 @@
+module Users
+ module DeleteActivity
+ module_function
+
+ def call(user)
+ user.notifications.delete_all
+ user.reactions.delete_all
+ user.follows.delete_all
+ Follow.where(followable_id: user.id, followable_type: "User").delete_all
+ user.messages.delete_all
+ user.chat_channel_memberships.delete_all
+ user.mentions.delete_all
+ user.badge_achievements.delete_all
+ user.github_repos.delete_all
+ end
+ end
+end
| [No CFG could be retrieved] | No Summary Found. | we need to make a mental note to update this everytime we attach a new table to the `User` model |
@@ -126,6 +126,13 @@ public class DefaultHostListener implements HypervisorHostListener {
storagePoolDetailsDao.persist(storagePoolDetailVO);
}
}
+ if (mspAnswer.getPoolInfo().getDetails() != null && mspAnswer.getPoolInfo().getDetails().containsKey("hardwareAccelerationSupported")){
+ StoragePoolDetailVO hardwareAccelerationSupported = storagePoolDetailsDao.findDetail(pool.getId(), "hardwareAccelerationSupported");
+ if (hardwareAccelerationSupported == null) {
+ StoragePoolDetailVO storagePoolDetailVO = new StoragePoolDetailVO(pool.getId(), "hardwareAccelerationSupported", mspAnswer.getPoolInfo().getDetails().get("hardwareAccelerationSupported"), false);
+ storagePoolDetailsDao.persist(storagePoolDetailVO);
+ }
+ }
primaryStoreDao.update(pool.getId(), poolVO);
}
| [DefaultHostListener->[hostConnect->[equals,updateStoragePoolHostVOAndDetails,warn,getResult,info,syncDatastoreClusterStoragePool,getDataCenterId,getDataStore,getDetails,CloudRuntimeException,getLocalDatastoreName,getDatastoreClusterChildren,sendAlert,isShared,getPoolType,getPodId,getName,listLocalStoragePoolByPath,easySend,ModifyStoragePoolCommand,findById,getId,StorageConflictException,getPath],updateStoragePoolHostVOAndDetails->[setCapacityBytes,replaceAll,findByPoolHost,getAvailableBytes,persist,isNotEmpty,StoragePoolDetailVO,getCapacityBytes,update,findById,findDetail,getId,setUsedBytes,getPoolType,setLocalPath,StoragePoolHostVO],getLogger]] | Update storage pool hostVO and storage pool details. | why on host connect again? as this is addressed / updated through API call. |
@@ -43,14 +43,14 @@ public class EqualDistributionWorkerSelectStrategyTest
ImmutableMap.of(
"lhost",
new ImmutableWorkerInfo(
- new Worker("lhost", "lhost", 1, "v1"), 0,
+ new Worker("lhost", "lhost", 5, "v1"), 5,
Sets.<String>newHashSet(),
Sets.<String>newHashSet(),
DateTime.now()
),
"localhost",
new ImmutableWorkerInfo(
- new Worker("localhost", "localhost", 1, "v1"), 1,
+ new Worker("localhost", "localhost", 10, "v1"), 5,
Sets.<String>newHashSet(),
Sets.<String>newHashSet(),
DateTime.now()
| [EqualDistributionWorkerSelectStrategyTest->[testFindWorkerForTask->[newHashSet,RemoteTaskRunnerConfig,of,ImmutableWorkerInfo,NoopTask,get,now,Worker,assertEquals,findWorkerForTask,getHost,EqualDistributionWorkerSelectStrategy],testOneDisableWorkerSameUsedCapacity->[newHashSet,RemoteTaskRunnerConfig,of,ImmutableWorkerInfo,NoopTask,get,now,Worker,assertEquals,findWorkerForTask,getHost,EqualDistributionWorkerSelectStrategy],testOneDisableWorkerDifferentUsedCapacity->[newHashSet,RemoteTaskRunnerConfig,of,ImmutableWorkerInfo,NoopTask,get,now,Worker,assertEquals,findWorkerForTask,getHost,EqualDistributionWorkerSelectStrategy]]] | Finds a worker for a task. | Please keep testing both data sets: (1, 0, 1, 1) and (5, 5, 10, 5) |
@@ -3468,6 +3468,18 @@ p {
add_filter( 'manage_users_columns', array( $this, 'jetpack_icon_user_connected' ) );
add_action( 'manage_users_custom_column', array( $this, 'jetpack_show_user_connected_icon' ), 10, 3 );
add_action( 'admin_print_styles', array( $this, 'jetpack_user_col_style' ) );
+
+ // Accept and store a partner coupon if present, and redirect to Jetpack connection screen.
+ $partner_coupon = isset( $_GET['jetpack-partner-coupon'] ) ? sanitize_text_field( $_GET['jetpack-partner-coupon'] ) : false; // phpcs:ignore WordPress.Security.NonceVerification.Recommended
+ if ( $partner_coupon ) {
+ update_option( 'jetpack_partner_coupon', $partner_coupon );
+
+ if ( static::connection()->is_connected() ) {
+ wp_safe_redirect( self::admin_url( 'showCouponRedemption=1' ) );
+ } else {
+ wp_safe_redirect( self::admin_url() );
+ }
+ }
}
function admin_body_class( $admin_body_class = '' ) {
| [Jetpack->[generate_secrets->[generate_secrets],stat->[initialize_stats],do_server_side_stat->[do_server_side_stat],get_locale->[guess_locale_from_lang],disconnect_user->[disconnect_user],jetpack_show_user_connected_icon->[is_user_connected],admin_page_load->[try_registration,disconnect_user,is_user_connected],jetpack_track_last_sync_callback->[jetpack_track_last_sync_callback],do_stats->[do_stats,initialize_stats],build_stats_url->[build_stats_url],handle_unique_registrations_stats->[do_stats,stat],build_connect_url->[build_connect_url],is_user_connected->[is_user_connected],get_connected_user_data->[get_connected_user_data],try_registration->[try_registration],authorize_starting->[do_stats,stat],register->[try_registration],is_active->[is_active]]] | Initialize the plugin This function is called by the administration code. It is called by the administration code. | I was wondering if it's worth renaming `showCouponRedemption` to e.g. `showPartnerCouponRedemption`? I don't really think it's going to be the case, but technically the naming could conflict with "Normal coupons" in the future. We could also go with `showPartnerCoupon` to keep it shorter? |
@@ -290,7 +290,14 @@ class Conv1D(_Conv):
trainable=True,
name=None,
**kwargs):
- super(Convolution1D, self).__init__(
+ if padding == "causal":
+ if data_format != "channels_last":
+ raise ValueError("causal padding only supports channels_last (NTC) format.")
+ self._causal_padding = True
+ padding = "valid"
+ else:
+ self._causal_padding = False
+ super(Conv1D, self).__init__(
rank=1,
filters=filters,
kernel_size=kernel_size,
| [conv2d->[Conv2D],separable_conv2d->[SeparableConv2D],conv1d->[Conv1D],conv2d_transpose->[Conv2DTranspose],conv3d_transpose->[Conv3DTranspose],conv3d->[Conv3D]] | Initialize a convolution with a single block of no - kernel kernel. | @szpssky note the code block is before invoking `super(Conv1D, self).__init__(`. In your case, `causal` leaks into its parent class. I think there might be two reasons: 1. You might paste the code into wrong place by mistake, or 2. I misunderstand the multiple inheritance rule of python. It might be better to recheck your patch at first :-) |
@@ -13,7 +13,6 @@
*/
#include "internal/deprecated.h"
-#include <stdio.h>
#include <openssl/crypto.h>
#include <openssl/core_names.h>
#include <openssl/engine.h>
| [No CFG could be retrieved] | Creates an object. - > - > - > - > - > - > - > - > - >. | Since you're cleaning up this file, can I ask you to change `#include "openssl/param_build.h"` to `#include <openssl/param_build.h>` and place it in proper order? |
@@ -47,7 +47,7 @@ class BitSnoopProvider(generic.TorrentProvider): # pylint: disable=too-many-inst
self.cache = BitSnoopCache(self)
- def _doSearch(self, search_strings, search_mode='eponly', epcount=0, age=0, epObj=None): # pylint: disable=too-many-branches,too-many-arguments,too-many-locals
+ def _do_search(self, search_strings, search_mode='eponly', epcount=0, age=0, epObj=None): # pylint: disable=R0912,R0913,R0914
results = []
items = {'Season': [], 'Episode': [], 'RSS': []}
| [BitSnoopProvider->[__init__->[__init__]],BitSnoopCache->[_getRSSData->[_doSearch],__init__->[__init__]],BitSnoopProvider] | Initialize the object with a bitSnoop. Get the list of items in the torrent that have the necessary seeders leechers and. | use the short-message for pylint disables |
@@ -134,7 +134,7 @@ function register_post(App $a)
}
// send email to admins
- $admin_mail_list = "'" . implode("','", array_map(dbesc, explode(",", str_replace(" ", "", $a->config['admin_email'])))) . "'";
+ $admin_mail_list = "'" . implode("','", array_map('dbesc', explode(",", str_replace(" ", "", $a->config['admin_email'])))) . "'";
$adminlist = q("SELECT uid, language, email FROM user WHERE email IN (%s)",
$admin_mail_list
);
| [register_content->[get_hostname],register_post->[getMessage]] | Register a new post Register a user Register a user in the system sends a notification to the user that the registration is pending approval. | Code standards: Although I personally would rather we use single quotes everywhere, until we actually do please use the most common quoting style in the file/function/line. |
@@ -26,7 +26,8 @@ const attestationProgressPct = {
kakao: 10,
github: 10,
linkedin: 10,
- wechat: 10
+ wechat: 10,
+ telegram: 10
}
function getAttestations(account, attestations) {
| [No CFG could be retrieved] | Get a list of all the attestations for a given account. Get the object for a given domain name. | The sum of all those is now 120% :) Make each of those 100/12 |
@@ -709,9 +709,11 @@ feature 'Two Factor Authentication' do
describe 'clicking the logo image during 2fa process' do
it 'returns them to the home page' do
- user = build_stubbed(:user, :signed_up)
+ user = create(:user, :signed_up)
sign_in_user(user)
- find("img[alt='login.gov']").click
+ expect(find("img[alt='login.gov']").ancestor('a')[:href]).to eq root_path
+ # find("img[alt='login.gov']").click
+ visit root_path
expect(current_path).to eq root_path
end
end
| [phone_field->[find],submit_2fa_setup_form_with_empty_string_phone->[fill_in],select_country_and_type_phone_number->[send_keys,click],attempt_to_bypass_2fa_setup->[visit],submit_prefilled_otp_code->[t,click_button],submit_2fa_setup_form_with_invalid_phone->[fill_in],attempt_to_bypass_2fa->[visit],submit_2fa_setup_form_with_valid_phone->[fill_in],visit,email,password,create,minute,phone,let,new,to_not,describe,build_stubbed,feature,have_current_path,check,it,travel,contact_url,freeze,to,have_content,sign_in_before_2fa,click_button,click_link,scenario,with,select,t,select_2fa_option,require,fingerprint,header,click,login_two_factor_path,to_s,include,to_i,signin,have_link,update,times,sign_in_user,generate_totp_code,receive,now,privacy_url,click_on,x509_dn_uuid,fill_in,call,context,value,have_received,perform_now,build,select_country_and_type_phone_number,help_url,not_to,choose_another_security_option,eq,adapter,find_by,direct_otp,visit_piv_cac_service,and_return,minutes] | generates a 404 with bad otp_delivery_preference. | Need to revert this and make sure it works. |
@@ -36,9 +36,8 @@ void GcodeSuite::M21() { card.mount(); }
* M22: Release SD Card
*/
void GcodeSuite::M22() {
-
if (!IS_SD_PRINTING()) card.release();
-
+ IF_ENABLED(TFT_COLOR_UI, ui.refresh(LCDVIEW_CALL_REDRAW_NEXT));
}
#endif // SDSUPPORT
| [M22->[release,IS_SD_PRINTING],M21->[mount],ENABLED] | M22 - release . | Is here the right place for that? I prefer that UI code should be handled on UI code, not on core/gcode. I think the right place for that, is right after the menu call, isn't? |
@@ -57,7 +57,7 @@ class AuthenticationGuard extends Component {
}
_hasAuthentication = () => {
- return this.props.settings.biometryType || this.props.settings.pin
+ return this.props.settings.biometryType || this.props.settings.pinStatus
}
_handleAppStateChange = nextAppState => {
| [No CFG could be retrieved] | Component that handles the case where the user is suspended and when the user is active again. Set state of the next app. | Do we need to use the pinStatus setting, can we just use the truthy value of the pin? I believe this will break existing installations that have a pin set because the pinStatus value will be `null` even though they have a pin set. |
@@ -540,7 +540,7 @@ public class ApiServer extends ManagerBase implements HttpRequestHandler, ApiSer
throw new CloudRuntimeException("No APICommand annotation found for class " + cmdClass.getCanonicalName());
}
- BaseCmd cmdObj = (BaseCmd)cmdClass.newInstance();
+ BaseCmd cmdObj = (BaseCmd)cmdClass.getConstructor(cmdClass).newInstance();
cmdObj = ComponentContext.inject(cmdObj);
cmdObj.configure();
cmdObj.setFullUrlParams(paramMap);
| [ApiServer->[logoutUser->[logoutUser],queueCommand->[getBaseAsyncCreateResponse,getBaseAsyncResponse],handleRequest->[configure,checkCharacterInkParams],getSerializedApiError->[getCmdClass,getSerializedApiError],start->[start],loginUser->[createLoginResponse],WorkerTask->[runInContext->[handleRequest]]]] | This method handles the request and returns the response. This method is used to send a command to the server. Get the response of a . | @DaanHoogland what's the difference in doing `newInstance` directly, than getting the constructor first? |
@@ -76,7 +76,7 @@ class TestDatasetsUtils:
assert not utils.check_integrity(nonexisting_fpath)
def test_get_google_drive_file_id(self):
- url = "https://drive.google.com/file/d/1hbzc_P1FuxMkcabkgn9ZKinBwW683j45/view"
+ url = "https://drive.google.com/file/d/1GO-BHUYRuvzr1Gtp2_fqXRsr9TIeYbhV/view"
expected = "1hbzc_P1FuxMkcabkgn9ZKinBwW683j45"
actual = utils._get_google_drive_file_id(url)
| [TestDatasetsUtils->[test_decompress_remove_finished->[create_compressed],test_get_redirect_url->[patch_url_redirection],test_extract_tar->[create_archive],test_get_redirect_url_max_hops_exceeded->[patch_url_redirection],test_extract_zip->[create_archive],test_decompress->[create_compressed]],patch_url_redirection->[patched_opener->[Response]]] | Get a Google drive file ID and check its contents. | Will `expected` still be the same? |
@@ -69,7 +69,7 @@ func (consensus *Consensus) construct(
buffer.Write(consensus.commitBitmap.Bitmap)
consensusMsg.Payload = buffer.Bytes()
case msg_pb.MessageType_ANNOUNCE:
- consensusMsg.Payload = consensus.blockHeader
+ consensusMsg.Payload = consensus.blockHash[:]
}
marshaledMessage, err := consensus.signAndMarshalConsensusMessage(message)
| [construct->[Str,Write,GetConsensus,Msg,Error,Serialize,AggregateVotes,SignHash,populateMessageFields,ConstructConsensusMessage,String,Bytes,signAndMarshalConsensusMessage,Err,Logger]] | construct creates a new consensus message from a given message type. This function takes a message and signs it with the consensus protocol and then marshals it with. | why change this one? please elaborate in the commit message. |
@@ -127,6 +127,16 @@ def _agg_method(base, func):
return frame_base.with_docs_from(base)(wrapper)
+# Docstring to use for head and tail (commonly used to peek at datasets)
+_PEEK_METHOD_EXPLANATION = (
+ "because it is `order-sensitive <https://s.apache.org/dataframe-order-sensitive-operations>`_.\n\n"
+ "If you'd like to use it to peek at a large dataset, interactive Beam's "
+ ":func:`ib.collect <apache_beam.runners.interactive.interactive_beam.collect>` "
+ "with ``n`` specified may be a useful alternative.\n\n"
+ "Also consider using :meth:`DeferredDataFrame.nlargest` if you're "
+ "interested in finding the top-N elements in a dataset.")
+
+
class DeferredDataFrameOrSeries(frame_base.DeferredFrame):
__array__ = frame_base.wont_implement_method(
| [_DeferredLoc->[__getitem__->[checked_callable_index->[index]]],_is_numeric->[_check_str_or_np_builtin],_unliftable_agg->[wrapper->[groupby,_maybe_project_func]],DeferredDataFrame->[duplicated->[duplicated,groupby],cov->[append],join->[_cols_as_temporary_index,join,fill_placeholders,reindex,revert],set_index->[set_index],eval->[_eval_or_query],nsmallest->[nsmallest],dot->[AsScalar],rename->[rename],value_counts->[groupby,dropna],pop->[drop],nlargest->[nlargest],mode->[mode],dropna->[dropna],assign->[assign],corr->[append,corr],corrwith->[align],melt->[melt],reset_index->[reset_index],query->[_eval_or_query],replace->[replace],align->[align,keys],merge->[set_index,merge,drop],explode->[explode],__setitem__->[__setitem__],drop_duplicates->[groupby],append->[append,str],unstack->[unstack],shift->[shift],aggregate->[append,keys],round->[round],insert->[func_elementwise->[insert],func_zip->[insert]],quantile->[quantile],_agg_method],DeferredGroupBy->[agg->[agg,DeferredDataFrame],__getitem__->[checked_callable_index->[],DeferredGroupBy],__getattr__->[DeferredGroupBy],apply->[do_partition_apply->[groupby,reset_index,apply],fn,index_to_arrays,DeferredDataFrame]],_liftable_agg->[wrapper->[groupby,_maybe_project_func]],_DeferredStringMethods->[repeat->[repeat],cat->[cat]],_is_null_slice->[_slice_parts],DeferredDataFrameOrSeries->[droplevel->[droplevel],tz_localize->[tz_localize],groupby->[groupby,droplevel],equals->[equals],fillna->[fillna],bool->[bool],where->[where_execution->[where]],sort_index->[sort_index],drop->[drop],mask->[where],_fillna_alias],_is_unliftable->[_check_str_or_np_builtin],_is_liftable_with_sum->[_check_str_or_np_builtin],_is_associative->[_check_str_or_np_builtin],_is_integer_slice->[_slice_parts,_is_null_slice],DeferredSeries->[var->[compute_moments->[std]],nlargest->[nlargest],duplicated->[duplicated,_wrap_in_df],_corr_aligned->[std],dropna->[dropna],update->[update],append->[append],corr->[corr],nsmallest->[nsmallest],aggregate->[groupby,dropna],unique->[unique],repeat->[repeat],drop_duplicates->[_wrap_in_df,drop_duplicates],replace->[replace],_cov_aligned->[compute_co_moments->[cov]],quantile->[quantile],_agg_method],_liftable_agg,_unliftable_agg,make_str_func,populate_not_implemented] | A method to add aggregation methods to a DataFrame. Compute the missing index and columns for a given column or index. | This should mention `sample` as well, but that is not supported yet. |
@@ -30,14 +30,16 @@ class ElmoTokenEmbedder(TokenEmbedder):
options_file: str,
weight_file: str,
do_layer_norm: bool = False,
- dropout: float = 0.5) -> None:
+ dropout: float = 0.5,
+ requires_grad: bool = False) -> None:
super(ElmoTokenEmbedder, self).__init__()
self._elmo = Elmo(options_file,
weight_file,
1,
do_layer_norm=do_layer_norm,
- dropout=dropout)
+ dropout=dropout,
+ requires_grad=requires_grad)
def get_output_dim(self):
# pylint: disable=protected-access
| [ElmoTokenEmbedder->[get_output_dim->[get_output_dim]]] | Initialize the token embedder with a single node. | Add to the docstring. |
@@ -305,6 +305,10 @@ def ctc_greedy_decoder(inputs, sequence_length, merge_repeated=True):
sequence_length: 1-D `int32` vector containing sequence lengths, having size
`[batch_size]`.
merge_repeated: Boolean. Default: True.
+ blank_index: (optional) Set the class index to use for the blank label.
+ Negative values will start from num_classes, ie, -1 will reproduce the
+ ctc_greedy_decoder behavior of using num_classes - 1 for the blank symbol,
+ which, actually, corresponds to the default.
Returns:
A tuple `(decoded, neg_sum_logits)` where
| [ctc_beam_search_decoder_v2->[ctc_beam_search_decoder],ctc_greedy_decoder->[ctc_greedy_decoder],ctc_loss_v3->[_ctc_loss_op_standard,_generate_defun_backend,_get_context_device_type,_ctc_loss_op_cudnn],_ctc_loss_op_standard->[_ctc_loss_impl],_CTCLossV2Grad->[_CTCLossGradImpl],_CTCLossGrad->[_CTCLossGradImpl],ctc_loss_v2->[ctc_loss],_scan->[body,cond],ctc_loss_and_grad->[_ctc_state_trans,_state_to_olabel,ctc_state_log_probs,_state_to_olabel_unique,_ilabel_to_state],ctc_beam_search_decoder->[ctc_beam_search_decoder],ctc_loss_dense->[compute_ctc_loss->[ctc_loss_and_grad],compute_ctc_loss],_ctc_loss_op_cudnn->[_ctc_loss_impl]] | Performs greedy decoding on the logits given in input. The probabilities of the missing outputs. | (Optional). Default: -1. The class index to use for the blank label. |
@@ -206,9 +206,10 @@ Rails.application.routes.draw do
match '/manage/phone/:id' => 'users/edit_phone#update', via: %i[patch put]
delete '/manage/phone/:id' => 'users/edit_phone#destroy'
get '/manage/personal_key' => 'users/personal_keys#show', as: :manage_personal_key
- post '/account/personal_key' => 'users/personal_keys#create', as: :create_new_personal_key
post '/manage/personal_key' => 'users/personal_keys#update'
+ post '/account/personal_key' => 'accounts/personal_keys#create', as: :create_new_personal_key
+
get '/otp/send' => 'users/two_factor_authentication#send_code'
get '/two_factor_options' => 'users/two_factor_authentication_setup#index'
patch '/two_factor_options' => 'users/two_factor_authentication_setup#create'
| [draw,namespace,root,scope,enable_gpo_verification?,redirect,get,enable_test_routes,post,devise_scope,join,patch,devise_for,each,match,put,delete] | Route to the users. This gem is a list of all the possible backup code management gem names. | the fact that there were two separate prefixes `/manage` and `/account` was a hint to me that some things could be separated |
@@ -106,8 +106,7 @@ public class EntrySetCommand<K, V> extends AbstractLocalCommand implements Visit
return Closeables.iterator(dataContainer.iterator());
}
Iterator<CacheEntry<K, V>> iterator = new DataContainerRemoveIterator<>(cache, dataContainer);
- RemovableIterator<CacheEntry<K, V>> removableIterator = new RemovableIterator<>(iterator, e -> cache.remove(e.getKey(), e.getValue()));
- return new IteratorMapper<>(removableIterator, e -> new EntryWrapper<>(cache, e));
+ return new IteratorMapper<>(iterator, e -> new EntryWrapper<>(cache, e));
}
static <K, V> CloseableSpliterator<CacheEntry<K, V>> closeableCast(Spliterator spliterator) {
| [EntrySetCommand->[BackingEntrySet->[size->[size],stream->[doStream],spliterator->[spliterator,closeableCast],remove->[remove],parallelStream->[doStream],iterator->[iterator]]]] | This method returns an iterator that removes entries from the cache. | I sense an opportunity to eliminate some more lambdas :) There are 3 more instances of `e -> new EntryWrapper<>(cache, e)`, so it would be better to write a new iterator that handles both `Iterator.remove()` and `Entry.setValue()`. Ideally though, I'd like us to stop wrapping `EntrySet` in the interceptor chain: replace `EntrySetCommand`/`KeySetCommand`/`SizeCommand` with a single `IterateCommand` that returns a read-only `Iterator` /`Spliterator`/`Publisher` (whatever is easier to implement), and only wrap it into an entries/keys/values collection once, in `CacheImpl` (removing `DistributedBulkInterceptor` would also be a plus). Off-topic, since the main topic is lambdas now, `DataContainerRemoveIterator` is too specific, it could use any `Iterator`. |
@@ -1116,13 +1116,13 @@ use \Friendica\Core\Config;
$user_info = api_get_user($a);
- if(!x($_FILES,'media')) {
+ if (!x($_FILES,'media')) {
// Output error
throw new BadRequestException("No media.");
}
$media = wall_upload_post($a, false);
- if(!$media) {
+ if (!$media) {
// Output error
throw new InternalServerErrorException();
}
| [api_oauth_access_token->[fetch_access_token,getMessage],api_oauth_request_token->[fetch_request_token,getMessage],api_friendica_notification->[getAll],api_error->[getMessage],api_friendica_notification_seen->[getByID,setSeen],api_statusnet_config->[get_hostname],api_statuses_mediap->[purify,set],api_statuses_update->[purify,set],api_login->[verify_request,loginUser]] | upload a media. | Standards: Please add a space after commas. |
@@ -162,9 +162,14 @@ class FieldInfo:
type_info = console.cyan(f"{indent}type: {self.type_hint}, {required_or_default}")
lines = [field_alias, type_info]
if self.description:
- lines.extend(f"{indent}{line}" for line in textwrap.wrap(self.description, 80))
+ lines.extend(f"{indent}{line}" for line in textwrap.wrap(self.description or "", 80))
return "\n".join(f"{indent}{line}" for line in lines)
+ def as_dict(self) -> Dict[str, Any]:
+ d = dataclasses.asdict(self)
+ d.pop("alias")
+ return d
+
@dataclass(frozen=True)
class VerboseTargetInfo:
| [VerboseTargetInfo->[format_for_cli->[format_for_cli],create->[create]],list_target_types->[format_for_cli,create,TargetTypes]] | Format the object for the CLI output. | `del d['alias']` is better here since you don't need the return value from dict.pop |
@@ -25,6 +25,15 @@ class Spinner extends React.Component<SpinnerPropsT> {
overrides: {},
};
+ componentDidMount() {
+ // TODO(v10): remove warning when switching default Spinner
+ console.warn(
+ `❖ [baseui] Please consider using "StyledSpinnerNext" instead of "Spinner". ` +
+ `In v10, "StyledSpinnerNext" will become the default "Spinner"` +
+ ` and the current SVG based implementation will be deprecated.`,
+ );
+ }
+
render() {
const {overrides = {}} = this.props;
const mergedOverrides = mergeOverrides({Svg: StyledSvg}, overrides);
| [No CFG could be retrieved] | Creates a component that renders a single . A Spinner for the 12 - state . | It should log only in a dev env. |
@@ -21,6 +21,11 @@ namespace System.Globalization.Tests
{
Assert.Equal(expected, value.IsNormalized());
}
+ if (PlatformDetection.IsBrowser && (normalizationForm == NormalizationForm.FormKC || normalizationForm == NormalizationForm.FormKD))
+ {
+ // Browser's ICU doesn't support FormKC and FormKD
+ return;
+ }
Assert.Equal(expected, value.IsNormalized(normalizationForm));
}
| [StringNormalizationTests->[Normalize_Null->[Normalize],Normalize_Invalid->[Normalize],IsNormalized->[IsNormalized],IsNormalized_Null->[IsNormalized],Normalize->[Normalize],IsNormalized_Invalid->[IsNormalized]]] | Tests that a string is normalized according to a given normalization form. | If you want to follow what we do in other places so that this is shown as Skipped in the test output, change this method to be `[ConditionalTheory]` and then instead of returning, `throw new SkipTestException("Browser's ICU...");` |
@@ -374,9 +374,10 @@ void raiden_ms_state::audio_map(address_map &map)
map(0xd000, 0xd7ff).ram();
// area 0xdff0-5 is never ever readback, applying a RAM mirror causes sound to go significantly worse,
// what they are even for? (offset select bankswitch rather than data select?)
- map(0xdff0, 0xdfff).r(m_soundlatch, FUNC(generic_latch_8_device::read)).w(FUNC(raiden_ms_state::unk_snd_dffx_w));
- map(0xe000, 0xe001).w(m_ym1, FUNC(ym2203_device::write));
- map(0xe002, 0xe003).w(m_ym2, FUNC(ym2203_device::write));
+ map(0xdff0, 0xdff7).w(FUNC(raiden_ms_state::unk_snd_dffx_w));
+ map(0xdff8, 0xdff8).rw(m_soundlatch[1], FUNC(generic_latch_8_device::read), FUNC(generic_latch_8_device::clear_w));
+ map(0xdff9, 0xdff9).r(m_soundlatch[0], FUNC(generic_latch_8_device::read));
+ map(0xe000, 0xe003).w(FUNC(raiden_ms_state::ym_w));
map(0xe008, 0xe009).r(m_ym1, FUNC(ym2203_device::read));
map(0xe00a, 0xe00b).r(m_ym2, FUNC(ym2203_device::read));
}
| [No CFG could be retrieved] | 16 - bit word header that can be used to set the word on the ethernet device region System Management Functions. | As written, this will clear the flag for `m_soundlatch[1]` on a read or write, but only clear the flag for `m_soundlatch[0]` on a read. If it clears one of them on either a read or write, wouldn't it be more likely that it just doesn't decode the R/W line for the purpose of clearing the flag on accesses to those addresses? I wouldn't think it would decode R/W for one but not for the other. |
@@ -303,9 +303,15 @@ func (consensus *Consensus) onCommit(msg *msg_pb.Message) {
consensus.preCommitAndPropose(blockObj)
}
- consensus.getLogger().Info().Msg("[OnCommit] Starting Grace Period")
go func(viewID uint64) {
- time.Sleep(1000 * time.Millisecond)
+ waitTime := 1000 * time.Millisecond
+ maxWaitTime := time.Until(consensus.NextBlockDue)
+ if maxWaitTime > waitTime {
+ waitTime = maxWaitTime
+ }
+ consensus.getLogger().Info().Str("waitTime", waitTime.String()).
+ Msg("[OnCommit] Starting Grace Period")
+ time.Sleep(waitTime)
logger.Info().Msg("[OnCommit] Commit Grace Period Ended")
consensus.mutex.Lock()
| [onPrepare->[Unlock,Warn,didReachPrepareQuorum,ParticipantsCount,SignersCount,Add,Error,IsQuorumAchieved,ParseFBFTMessage,HasMatchingViewAnnounce,Lock,Debug,isRightBlockNumAndViewID,Hex,Uint64,Int64,ReadBallot,Deserialize,Err,AddNewVote,GetCurBlockViewID,Str,Msg,switchPhase,SetKeysAtomic,getLogger,HasSingleSender,Interface,VerifyHash],announce->[ShardID,Unlock,EncodeToBytes,Hash,Warn,Msgf,SendWithRetry,Info,AddMessage,GetConsensusLeaderPrivateKey,SetKey,NewGroupIDByShardID,Lock,NumberU64,Debug,construct,Hex,SignHash,Uint64,AddBlock,Err,AddNewVote,Str,Header,ViewID,Msg,switchPhase,ConstructMessage,getLogger,String],onCommit->[Unlock,Warn,Hash,StopRetry,SignersCount,With,Info,Add,preCommitAndPropose,IsQuorumAchieved,Error,GetBlockByHash,ParseFBFTMessage,Lock,Logger,NumberU64,Debug,isRightBlockNumAndViewID,Hex,IsAllSigsCollected,Uint64,Int64,finalCommit,Deserialize,Err,AddNewVote,GetCurBlockViewID,Str,Header,ViewID,Msg,SetKeysAtomic,getLogger,HasSingleSender,Epoch,String,ConstructCommitPayload,checkDoubleSign,VerifyHash,Sleep,IsLastBlockInEpoch]] | onCommit is called when a message is received from the FBFT log and is expected This function is called when a message is received from a view. It is called by the This function is called when the last block in the epoch is committed. | From the variable name I read the condition is supposed to be `waitTime > maxWaitTime`? |
@@ -341,5 +341,6 @@ class DirectStepContext(object):
if not self.existing_keyed_state.get(key):
self.existing_keyed_state[key] = DirectUnmergedState()
if not self.partial_keyed_state.get(key):
- self.partial_keyed_state[key] = self.existing_keyed_state[key].clone()
+ self.partial_keyed_state[key] = (
+ self.existing_keyed_state[key].custom_copy())
return self.partial_keyed_state[key]
| [DirectStepContext->[get_keyed_state->[DirectUnmergedState]],_SideInputsContainer->[__init__->[_SideInputView]],EvaluationContext->[handle_result->[add_values,finalize_value_and_get_tasks],create_bundle->[create_bundle],get_execution_context->[_ExecutionContext],__init__->[_SideInputsContainer],create_empty_committed_bundle->[create_empty_committed_bundle],get_value_or_schedule_after_output->[get_value_or_schedule_after_output],extract_fired_timers->[extract_fired_timers],get_aggregator_values->[get_aggregator_values]]] | Get the state of a key. | <!--new_thread; commit:8650ea65963f8e3efc5555d8b3aa5474292efd20; resolved:0--> Let's just rename this to `clone()`. |
@@ -47,9 +47,10 @@ class ResultsController < ApplicationController
@assignment = @grouping.assignment
assignment = @assignment # TODO: figure out this logic to give this variable a better name.
@old_result = @submission.remark_submitted? ? @submission.get_original_result : nil
-
- @files = @submission.submission_files.sort do |a, b|
+ @filtered = @submission.submission_files.where('filename != ?', ".gitkeep")
+ @files = @filtered.sort do |a, b|
File.join(a.path, a.filename) <=> File.join(b.path, b.filename)
+
end
@feedback_files = @submission.feedback_files
@marks_map = Hash.new
| [ResultsController->[update_remark_request_count->[update_remark_request_count]]] | This method is called when a user changes the neccesary variable. add a new record to the result table and update the missing_nkey values Handles a single node tag which is used by the group. This is a list of tags. | Layout/EmptyLinesAroundBlockBody: Extra empty line detected at block body end. |
@@ -80,5 +80,14 @@ var config = { // eslint-disable-line no-unused-vars
// disables or enables RTX (RFC 4588) (defaults to false).
disableRtx: false,
// Sets the preferred resolution (height) for local video. Defaults to 360.
- resolution: 720
+ resolution: 720,
+ // Enables peer to peer mode. When enabled system will try to establish
+ // direct connection given that there are exactly 2 participants in
+ // the room. If that succeeds the conference will stop sending data through
+ // the JVB and use the peer to peer connection instead. When 3rd participant
+ // joins the conference will be moved back to the JVB connection.
+ //enableP2P: true
+ // How long we're going to wait, before going back to P2P after
+ // the 3rd participant has left the conference (to filter out page reload)
+ //backToP2PDelay: 5
};
| [No CFG could be retrieved] | Sets the default resolution for local video. | Can you elaborate a bit so users can see what this is about? |
@@ -51,7 +51,11 @@ class PyTorch(PythonPackage, CudaPackage):
]
version('master', branch='master', submodules=True)
- version('1.4.0', tag='v1.4.0', submodules=True)
+ version('1.4.1', tag='v1.4.1', submodules=True)
+ # see https://github.com/pytorch/pytorch/issues/35149
+ version('1.4.0', tag='v1.4.0', submodules=True,
+ submodules_delete=['third_party/fbgemm'])
+ conflicts('+fbgemm', when='@1.4.0')
version('1.3.1', tag='v1.3.1', submodules=True)
version('1.3.0', tag='v1.3.0', submodules=True)
version('1.2.0', tag='v1.2.0', submodules=True)
| [PyTorch->[setup_build_environment->[enable_or_disable]]] | Reads a sequence of objects from the Caffe2 library. Get a list of all packages that can be built. | I would move this down with the other conflicts. |
@@ -1,4 +1,10 @@
<?php
-
$version = trim(snmp_get($device, '1.3.6.1.4.1.1588.2.1.1.1.1.6.0', '-Ovq'), '"');
-$hardware = trim(snmp_get($device, 'ENTITY-MIB::entPhysicalDescr.1', '-Ovq'), '"');
+$gethardware = trim(snmp_get($device, 'SNMPv2-SMI::mib-2.75.1.1.4.1.3.1', '-Ovq'), '"');
+$revboard = str_replace("SNMPv2-SMI::enterprises.1588.2.1.1.", "", $gethardware);
+if(strpos($revboard, ".") !== false) {
+ $hardware = rewrite_brocade_fc_switches(strstr(str_replace($revboard, "", $gethardware), ".", true));
+} else {
+ $hardware = rewrite_brocade_fc_switches($revboard);
+}
+
| [No CFG could be retrieved] | Get the version and hardware of the ethernet ethernet - descriptor. | This just seems wrong :) You can probably get what you want by using different -O flags, what does an snmpget look like for it? |
@@ -413,11 +413,16 @@ public class RealtimePlumber implements Plumber
return;
}
+ /*
+ Note: it the plumber crashes after persisting a subset of hydrants then might duplicate data as these
+ hydrants will be read but older commitMetadata will be used. fixing this possibly needs structural
+ changes to plumber.
+ */
for (FireHydrant hydrant : sink) {
synchronized (hydrant) {
if (!hydrant.hasSwapped()) {
log.info("Hydrant[%s] hasn't swapped yet, swapping. Sink[%s]", hydrant, sink);
- final int rowCount = persistHydrant(hydrant, schema, interval);
+ final int rowCount = persistHydrant(hydrant, schema, interval, null);
metrics.incrementRowOutputCount(rowCount);
}
}
| [RealtimePlumber->[persistHydrant->[persist,computePersistDir],getSink->[add],finishJob->[persistAndMerge],persistAndMerge->[doRun->[add]],registerServerViewCallback->[segmentAdded->[abandonSegment]],add->[add],computePersistDir->[computeBaseDir],persist->[add],mergeAndPush->[persistAndMerge,add],bootstrapSinksFromDisk->[compare->[compare],add]]] | This method will persist the given sink and merge the segments into the sink. This method is called from the IndexMerger. mergeQueryableIndex method. | I think that if the node crashes after persisting these segments, it will include these persisted hydrants when starting back up, but will use kafka offsets from earlier segments. So the data will be ingested twice. |
@@ -1272,6 +1272,7 @@ def send_lockedtransfer(
lock = transfer.lock
channel_state.our_state.balance_proof = transfer.balance_proof
channel_state.our_state.merkletree = merkletree
+ channel_state.our_state.nonce = transfer.balance_proof.nonce
channel_state.our_state.secrethashes_to_lockedlocks[lock.secrethash] = lock
return send_locked_transfer_event
| [get_current_balanceproof->[get_amount_locked],register_secret_endstate->[is_lock_locked],handle_block->[is_deposit_confirmed,get_status],send_refundtransfer->[get_status,create_sendlockedtransfer],lock_exists_in_either_channel_side->[get_lock],get_batch_unlock_gain->[UnlockGain],is_valid_refund->[valid_lockedtransfer_check,refund_transfer_matches_transfer],register_onchain_secret_endstate->[_del_lock,is_lock_locked],is_balance_proof_usable_onchain->[is_valid_signature,is_balance_proof_safe_for_onchain_operations],get_distributable->[get_current_balanceproof,get_amount_locked,get_balance],create_sendlockedtransfer->[get_next_nonce,compute_merkletree_with,get_amount_locked,get_distributable,get_status],is_transfer_expired->[is_lock_expired,get_sender_expiration_threshold],valid_lockedtransfer_check->[is_balance_proof_usable_onchain],handle_channel_closed->[get_status,set_closed],handle_channel_newbalance->[is_transaction_confirmed],apply_channel_newbalance->[update_contract_balance],send_unlock->[create_unlock,get_lock,_del_lock],handle_receive_refundtransfercancelroute->[handle_receive_lockedtransfer],create_unlock->[get_next_nonce,get_amount_locked,compute_merkletree_without,is_lock_pending,get_status],is_valid_lock_expired->[get_receiver_expiration_threshold,is_lock_expired,is_balance_proof_usable_onchain],send_lockedtransfer->[create_sendlockedtransfer],register_onchain_secret->[register_onchain_secret_endstate],get_amount_locked->[get_amount_unclaimed_onchain],handle_refundtransfer->[is_valid_refund],events_for_expired_lock->[get_status,_del_unclaimed_lock,create_sendexpiredlock],handle_channel_batch_unlock->[get_status],register_offchain_secret->[register_secret_endstate],handle_channel_settled->[set_settled],get_number_of_pending_transfers->[_merkletree_width],events_for_close->[get_status],_del_lock->[_del_unclaimed_lock,is_lock_pending],state_transition->[handle_action_close,handle_channel_updated_transfer,handle_block,handle_channel_batch_unlock,handle_channel_closed,handle_channel_newbalance,handle_action_set_fee,handle_channel_settled],handle_action_close->[events_for_close],handle_unlock->[_del_lock,is_valid_unlock],handle_receive_lock_expired->[_del_unclaimed_lock,is_valid_lock_expired],create_sendexpiredlock->[get_next_nonce,get_amount_locked,compute_merkletree_without],is_valid_unlock->[is_balance_proof_usable_onchain],handle_receive_lockedtransfer->[is_valid_lockedtransfer]] | Creates a SendLockedTransfer object and returns it. | This makes the update in `create` unnecessary. |
@@ -129,6 +129,9 @@ Writer::svc()
e._tao_print_exception("Exception caught in svc():");
}
+ // Patch to prevent premature shutdown
+ Sleep(1000);
+
finished_instances_ ++;
return 0;
| [No CFG could be retrieved] | Check if a single is not already present in the service. | This isn't going to compile on all platforms |
@@ -527,10 +527,11 @@ public class TrafficCounter {
*/
@Override
public String toString() {
- return "Monitor " + name + " Current Speed Read: " +
- (lastReadThroughput >> 10) + " KB/s, Write: " +
- (lastWriteThroughput >> 10) + " KB/s Current Read: " +
- (currentReadBytes.get() >> 10) + " KB Current Write: " +
- (currentWrittenBytes.get() >> 10) + " KB";
+ return "Monitor " + name + " Current Speed Read: " + (lastReadThroughput >> 10) + " KB/s, " +
+ "Asked Write: " + (lastWriteThroughput >> 10) + " KB/s, " +
+ "Real Write: " + (realWriteThroughput >> 10) + " KB/s, " +
+ "Current Read: " + (currentReadBytes.get() >> 10)
+ + " KB, Current asked Write: " + (currentWrittenBytes.get() >> 10) + " KB, " +
+ "Current real Write: " + (realWrittenBytes.get() >> 10) + " KB";
}
}
| [TrafficCounter->[start->[TrafficMonitoringTask],writeTimeToWait->[bytesWriteFlowControl],readTimeToWait->[bytesRecvFlowControl],configure->[start,stop]]] | Returns a String representation of the last heartbeat. | Use a StringBuilder() to build this string? |
@@ -337,9 +337,10 @@ public class ContentEnricher extends AbstractReplyProducingMessageHandler implem
Object value = valueProcessor.processMessage(replyMessage);
targetHeaders.put(header, value);
}
- }
- return this.getMessageBuilderFactory().withPayload(targetPayload).copyHeaders(targetHeaders).build();
- }
+ }
+ return
+ this.getMessageBuilderFactory().withPayload(targetPayload).copyHeaders(targetHeaders).build();
+ }
}
/**
| [ContentEnricher->[Gateway->[sendAndReceiveMessage->[sendAndReceiveMessage]],isRunning->[isRunning],stop->[stop],doInit->[setReplyTimeout,setReplyChannel,setRequestTimeout,setRequestChannel],start->[start]]] | This method is called to handle a request message. This method is used to process the header expressions. | Nit picky: looks bad from code format. |
@@ -137,6 +137,8 @@ class GlobalResourceGroupPreparer(AzureMgmtPreparer):
class StorageTestCase(AzureMgmtTestCase):
+ live_api_version = '2019-02-02'
+
def __init__(self, *args, **kwargs):
super(StorageTestCase, self).__init__(*args, **kwargs)
self.replay_processors.append(XMSRequestIDBody())
| [storage_account->[build_service_endpoint],StorageTestCase->[assertNamedItemInContainer->[_is_string],generate_fake_token->[FakeTokenCredential],sleep->[sleep],__init__->[XMSRequestIDBody]],LogCaptured->[__exit__->[configure_logging],__enter__->[enable_logging]]] | Initialize the StorageTestCase with a sequence of missing values. | Can we extract this to settings_fake.py |
@@ -20,11 +20,10 @@ package org.apache.dubbo.common.utils;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
-import java.net.Inet6Address;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.UnknownHostException;
+import java.net.*;
+import java.util.Collections;
+import static org.apache.dubbo.common.constants.CommonConstants.DUBBO_NETWORK_IGNORED_INTERFACE;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.greaterThan;
| [NetUtilsTest->[testGetLocalSocketAddress->[assertTrue,getLocalSocketAddress,isAnyLocalAddress,getPort,getHostName,assertEquals],testToAddress->[getPort,toAddress,equalTo,getHostName,assertThat],testMatchIpRangeMatchWhenIpv6->[assertTrue,assertFalse,matchIpRange],testMatchIpv4WithIpPort->[assertTrue,matchIpRange,assertThrows,matchIpExpression,assertFalse],testLocalHost->[assertTrue,getLocalHost,getHostAddress,assertFalse,isValidLocalHost,assertEquals,isInvalidLocalHost],testGetIpByHost->[assertThat,equalTo,getIpByHost],testIsValidV6Address->[getProperty,assumeTrue,equalTo,isPreferIPV6Address,setProperty,getLocalAddress,assertThat],testGetRandomPort->[greaterThanOrEqualTo,assertThat,getRandomPort],testIsLocalHost->[assertTrue,assertFalse,isLocalHost],testMatchIpRangeMatchWhenIpv6Exception->[assertTrue,matchIpRange,contains,assertThrows],testIsMulticastAddress->[assertTrue,assertFalse,isMulticastAddress],testMatchIpMatch->[assertTrue,matchIpExpression],testIsValidAddress->[assertTrue,thenReturn,mock,isValidV4Address,assertFalse],testGetHostName->[assertNotNull,getHostName],testNormalizeV6Address->[getHostAddress,thenReturn,mock,equalTo,assertThat,normalizeV6Address],testToURL->[assertThat,equalTo,toURL],testGetLocalAddress->[assertNotNull,assertTrue,getHostAddress,isValidLocalHost,getLocalAddress],testMatchIpv6WithIpPort->[assertTrue,assertFalse,matchIpRange],testIsAnyHost->[assertTrue,assertFalse,isAnyHost],testGetLocalHost->[assertNotNull,getLocalHost],testMatchIpRangeMatchWhenIpv4->[assertTrue,assertFalse,matchIpRange],testMatchIpRangeMatchWhenIpWrongException->[assertTrue,matchIpRange,contains,assertThrows],testIsInvalidLocalHost->[assertTrue,assertFalse,isInvalidLocalHost],testGetAvailablePort->[greaterThanOrEqualTo,getAvailablePort,assertThat,greaterThan],testIsValidLocalHost->[assertTrue,isValidLocalHost],testFilterLocalHost->[getLocalHost,equalTo,filterLocalHost,assertNull,assertThat,assertEquals],testIsInvalidPort->[assertTrue,assertFalse,isInvalidPort],testValidAddress->[assertTrue,assertFalse,isValidAddress],testToAddressString->[thenReturn,mock,equalTo,InetSocketAddress,assertThat,toAddressString]]] | Imports a single object. This test fails if there is no port available on the network. | Please avoid using "import *" |
@@ -112,6 +112,11 @@ public class FilteringArtifactClassLoader extends ClassLoader implements Artifac
}
}
+ private Boolean isVerboseClassLoading()
+ {
+ return valueOf(getProperty(MULE_LOG_VERBOSE_CLASSLOADING));
+ }
+
protected Enumeration<URL> getResourcesFromDelegate(ArtifactClassLoader artifactClassLoader, String name) throws IOException
{
return artifactClassLoader.findResources(name);
| [FilteringArtifactClassLoader->[findLocalResource->[findLocalResource],addShutdownListener->[addShutdownListener],getArtifactName->[getArtifactName],getClassLoaderLookupPolicy->[getClassLoaderLookupPolicy],loadClass->[loadClass],findResources->[findResources],findResource->[findResource]]] | This method logs a trace message if the log level is enabled or if the log level is. | This function is duplicated. Can be moved to a place where it can be reused? |
@@ -363,6 +363,7 @@ class MatrixTransport(Runnable):
else:
prev_user_id = prev_access_token = None
+ self._address_mgr.start()
login_or_register(
client=self._client,
signer=self._raiden_service.signer,
| [_RetryQueue->[enqueue->[_expiration_generator,_MessageData],_run->[_check_and_send],enqueue_global->[enqueue],_check_and_send->[message_is_in_queue]],MatrixTransport->[_send_with_retry->[enqueue,_get_retrier],_handle_to_device_message->[_receive_to_device,_get_user],send_to_device->[send_to_device],_get_retrier->[start,_RetryQueue],stop->[notify],start->[start],start_health_check->[whitelist],_global_send_worker->[_send_global],_address_reachability_changed->[notify],_user_presence_changed->[_spawn],_receive_message->[enqueue_global]]] | Starts a new node. Start the missing node in the network. | the address manager wasn't used before? |
@@ -157,10 +157,9 @@ namespace Dynamo.DocumentationBrowser
switch (e)
{
case OpenNodeAnnotationEventArgs openNodeAnnotationEventArgs:
- var mdLink = packageManagerDoc.GetAnnotationDoc(openNodeAnnotationEventArgs.MinimumQualifiedName);
+ var mdLink = packageManagerDoc.GetAnnotationDoc(openNodeAnnotationEventArgs.MinimumQualifiedName, openNodeAnnotationEventArgs.PackageName);
link = string.IsNullOrEmpty(mdLink) ? new Uri(String.Empty, UriKind.Relative) : new Uri(mdLink);
targetContent = CreateNodeAnnotationContent(openNodeAnnotationEventArgs);
-
break;
case OpenDocumentationLinkEventArgs openDocumentationLink:
| [DocumentationBrowserViewModel->[ContainsResource->[GetResourceNameWithCultureName],LoadContentFromResources->[Dispose],Assembly->[ContainsResource],Dispose->[Dispose],EnsurePageHasContent->[NavigateToNoContentPage]]] | HandleLocalResource - Handle local resource. | style: can you split this into two lines. |
@@ -170,10 +170,13 @@ class Experiment:
while True:
time.sleep(10)
status = self.get_status()
+ print('zqlllll: ', status)
if status == 'DONE' or status == 'STOPPED':
return True
if status == 'ERROR':
return False
+ except KeyboardInterrupt:
+ _logger.warning('KeyboardInterrupt detected')
finally:
self.stop()
| [Experiment->[start->[append,start_experiment,Thread,getLogger,start,register,net_if_addrs,join,info,MsgDispatcher],stop->[unregister,kill_command,join,close,info],get_status->[get,RuntimeError],run->[sleep,start,stop,get_status],__init__->[ExperimentConfig,isinstance]],getLogger,init_logger_experiment] | Run the experiment. | What's this line used for? |
@@ -68,7 +68,8 @@ public class RestSchemaRegistryClient implements SchemaRegistryClient {
private static final String SCHEMA_REGISTRY_CONTENT_TYPE = "application/vnd.schemaregistry.v1+json";
- public RestSchemaRegistryClient(final List<String> baseUrls, final int timeoutMillis, final SSLContext sslContext, final ComponentLog logger) {
+ public RestSchemaRegistryClient(final List<String> baseUrls, final String authType, final String authUser,
+ final String authPass, final int timeoutMillis, final SSLContext sslContext, final ComponentLog logger) {
this.baseUrls = new ArrayList<>(baseUrls);
final ClientConfig clientConfig = new ClientConfig();
| [RestSchemaRegistryClient->[getSubjectPath->[encode,valueOf],fetchJsonResponse->[readEntity,SchemaNotFoundException,getTrimmedBase,get,getStatus,getStatusCode,IOException,target,getPath],getTrimmedBase->[substring,length,endsWith],createRecordSchema->[SchemaNotFoundException,parse,build,asText,createSchema,asInt],getSchema->[postJsonResponse,SchemaNotFoundException,getSubjectPath,fetchJsonResponse,asText,getSchemaPath,createRecordSchema],getSchemaPath->[encode,valueOf],getPath->[startsWith],postJsonResponse->[readEntity,SchemaNotFoundException,getTrimmedBase,json,post,getStatus,toString,getStatusCode,target,getPath],ClientConfig,createClient,property]] | Provides a fluent interface for the NiFi REST API. | Is there any requirement that the password is populated? If the `authType` is `BASIC` but the `authUser` is empty, basic auth won't be enabled but no error/warning will be communicated to the user. |
@@ -2857,7 +2857,14 @@ public final class DtoFactory {
}
}
- return entityFactory.createAffectedComponentEntity(affectedComponent, revision, permissions, groupNameDto);
+ final List<BulletinDTO> bulletins = createBulletins(componentNode);
+ return entityFactory.createAffectedComponentEntity(affectedComponent, revision, permissions, groupNameDto, bulletins);
+ }
+
+ private List<BulletinDTO> createBulletins(final ComponentNode componentNode) {
+ final PermissionsDTO permissions = createPermissionsDto(componentNode);
+ final List<BulletinDTO> bulletins = createBulletinDtos(bulletinRepository.findBulletinsForSource(componentNode.getIdentifier()));
+ return bulletins;
}
public VariableRegistryDTO createVariableRegistryDto(final ProcessGroup processGroup, final RevisionManager revisionManager) {
| [DtoFactory->[createVersionControlComponentMappingDto->[createVersionControlComponentMappingDto],createProcessGroupFlowDto->[createBreadcrumbEntity,createPermissionsDto],createReportingTaskDto->[compare->[compare]],createFlowDto->[createProcessorStatusDto,createRemoteProcessGroupStatusDto,createPortDto,createPermissionsDto,createProcessGroupDto,createFunnelDto,createPortStatusDto,createLabelDto,createConciseProcessGroupStatusDto,createRemoteProcessGroupDto,createConnectionStatusDto,createConnectionDto,getComponentStatus],createPortDto->[createPositionDto],createProcessGroupStatusDto->[createConciseProcessGroupStatusDto,createRemoteProcessGroupStatusDto,createProcessGroupStatusDto],createFunnelDto->[createPositionDto],fromDocumentedTypes->[getDeprecationReason,getExplicitRestrictions,getTags,getCapabilityDescription,createControllerServiceApiDto,getUsageRestriction,fromDocumentedTypes,isRestricted,createBundleDto],createBreadcrumbEntity->[createBreadcrumbEntity],createConnectionDiagnosticsDto->[createConnectionDto],copy->[copy],compare->[compare],createControllerServiceReferencingComponentDTO->[compare->[compare]],createClassLoaderDiagnosticsDto->[createClassLoaderDiagnosticsDto,createBundleDto],createPermissionsDto->[createPermissionsDto],createLabelDto->[createPositionDto],createControllerServiceApiDto->[createBundleDto],createPropertyDescriptorDto->[createBundleDto],createLineageDto->[createProvenanceEventNodeDTO,createFlowFileNodeDTO,createProvenanceLinkDTO],createProcessorDto->[compare->[compare],getCapabilityDescription,createPositionDto,createBundleDto,isRestricted],createRemoteProcessGroupDto->[createPositionDto,createRemoteProcessGroupPortDto],createProcessorDiagnosticsDto->[createProcessorStatusDto,createProcessorDto],createDropRequestDTO->[isDropRequestComplete],createVariableRegistryDto->[createAffectedComponentEntities],createProcessGroupContentsDto->[createPortDto,createRemoteProcessGroupDto,createProcessGroupDto,createFunnelDto,createLabelDto,createConciseProcessGroupDto,createConnectionDto],createControllerServiceDto->[compare->[compare]],flattenProcessGroups->[flattenProcessGroups],createProcessorConfigDto->[compare->[compare]],populateAffectedComponents->[createAffectedComponentEntities],createProcessGroupDto->[createProcessGroupDto],createConciseProcessGroupDto->[createPositionDto,createPermissionsDto,createParameterContextReference],createListingRequestDTO->[isListingRequestComplete,createQueueSizeDTO],createAffectedComponentEntity->[createAffectedComponentDto,createAffectedComponentEntity,createPermissionsDto],createConnectionDto->[createPositionDto]]] | Create a affected component entity. This method returns a VariableRegistryDTO with the missing fields set. | This is unused. |
@@ -841,7 +841,7 @@ class TestCmdReproChdir(TestDvc):
self.assertTrue(filecmp.cmp(foo, bar, shallow=False))
-class TestReproExternalBase(SingleStageRun, TestDvc):
+class ReproExternalTestMixin(SingleStageRun, TestDvc):
cache_type = None
@staticmethod
| [TestReproChangedDir->[test->[_run,_get_stage_target]],TestReproAllPipelines->[test->[_run]],TestReproCyclicGraph->[test->[_run]],TestReproChangedCode->[test->[_get_stage_target]],TestRepro->[setUp->[_run]],TestNonExistingOutput->[test->[_get_stage_target]],TestReproForce->[test->[_get_stage_target]],TestReproNoCommit->[test->[_get_stage_target]],TestReproExternalLOCAL->[write->[write]],TestReproPipelines->[setUp->[_run]],TestReproExternalSSH->[write->[write]],TestReproFail->[test->[_get_stage_target]],TestReproFrozenCallback->[test->[_run,_get_stage_target]],TestReproExternalHDFS->[write->[write]],TestReproAlreadyCached->[test->[_run,_get_stage_target]],TestReproDry->[test->[_get_stage_target,swap_foo_with_bar]],TestReproUpToDate->[test->[_get_stage_target]],TestReproFrozen->[test->[_get_stage_target,_run,swap_foo_with_bar]],TestReproDepUnderDir->[test->[_run,_get_stage_target]],TestReproPipeline->[test_cli->[_get_stage_target],test->[_get_stage_target]],TestCmdRepro->[test->[_get_stage_target,swap_foo_with_bar]],test_recursive_repro_default->[_read_out,_rewrite_file],TestReproChangedData->[test->[_get_stage_target]],TestReproDataSource->[test->[swap_foo_with_bar]],TestReproChangedDirData->[test->[_run,_get_stage_target]],TestReproChangedDeepData->[test->[_get_stage_target,swap_foo_with_bar],setUp->[_run]],TestReproDepDirWithOutputsUnderIt->[test->[_run,_get_stage_target]],TestReproFrozenUnchanged->[test->[_get_stage_target]],TestReproExternalHTTP->[test->[get_remote,_run,write]],TestReproPhony->[test->[_get_stage_target,_run,swap_foo_with_bar]],TestReproNoDeps->[test->[_run,_get_stage_target]],TestReproExternalBase->[test->[_run,check_already_cached,should_test]],TestReproExternalGS->[write->[bucket]],test_recursive_repro_single->[_read_out,_rewrite_file]] | Returns True if the test should be performed. | `pylint` understands use of `Mixin`, so, it does not throw any error if any member is not found. eg: `self.bucket`. |
@@ -251,7 +251,12 @@ namespace DSCore
if (obj.GetType() != this.GetType()) return false;
return Equals((Color)obj);
}
-
+ /// <summary>
+ /// Returns a new color based on the combination of ARGB values from two input colors.
+ /// </summary>
+ /// <param name="c1"></param>
+ /// <param name="c2"></param>
+ /// <returns></returns>
public static Color Add(Color c1, Color c2)
{
return ByARGB(
| [ColorRange1D->[ToString->[ToString,Color],Color->[Equals->[],GetHashCode->[],IndexedColor1D->[CompareTo->[]],Color]],Color->[Equals->[Equals],GetHashCode->[GetHashCode],IndexedColor1D->[CompareTo->[Equals]]]] | Compares two colors and returns true if they are equal ; otherwise returns false. | Change to 'Construct a Color by combining two input Colors" |
@@ -249,6 +249,10 @@ public class SpringXmlConfigurationMuleArtifactFactory implements XmlConfigurati
}
}
+ protected ConfigurationBuilder wrapConfigurationBuilder(ConfigurationBuilder configBuilder) {
+ return configBuilder;
+ }
+
protected void addSchemaLocation(org.w3c.dom.Element element, XmlConfigurationCallback callback,
Map<String, String> schemaLocations) {
String key = element.getNamespaceURI();
| [SpringXmlConfigurationMuleArtifactFactory->[doGetArtifact->[getArtifactMuleConfig],dispose->[dispose],addReferencedGlobalElement->[processGlobalReferences]]] | Get an artifact from the Mule configuration. addSchemaLocation - add schema location for given element. | What is the purpose of this method? |
@@ -33,12 +33,18 @@ const SnippetPreviewSection = ( { baseUrl } ) => {
>
<SnippetEditor
baseUrl={ baseUrl }
+ date={ date }
/>
</Section>;
};
SnippetPreviewSection.propTypes = {
baseUrl: PropTypes.string.isRequired,
+ date: PropTypes.string,
+};
+
+SnippetPreviewSection.propTypes = {
+ date: "",
};
export default SnippetPreviewSection;
| [No CFG could be retrieved] | A section that displays a hidden . | I think you mean `defaultProps`? :) |
@@ -52,6 +52,8 @@ public class HiveAvroSerDeManager extends HiveSerDeManager {
public static final String DEFAULT_SCHEMA_FILE_NAME = "_schema.avsc";
public static final String SCHEMA_LITERAL_LENGTH_LIMIT = "schema.literal.length.limit";
public static final int DEFAULT_SCHEMA_LITERAL_LENGTH_LIMIT = 4000;
+ public static final String HIVE_SPEC_SCHEMA_READING_TIMER = "AvroReading";
+ public static final String HIVE_SPEC_SCHEMA_WRITING_TIMER = "AvroWriting";
protected final FileSystem fs;
protected final boolean useSchemaFile;
| [HiveAvroSerDeManager->[getDirectorySchema->[getDirectorySchema]]] | Creates an instance of HiveSerDeManager that can be used to register Avro tables and partitions Adds a schema to the given HiveRegistrationUnit. | Please make this name more precise. For example: `hiveAvroSerdeManager.schemaReadTimer` (same for next line). |
@@ -55,4 +55,15 @@ public final class NetworkUtils
return isServerReachable;
}
+
+ private static InetAddress localHost;
+
+ public static InetAddress getLocalHost() throws UnknownHostException
+ {
+ if (localHost == null)
+ {
+ localHost = InetAddress.getLocalHost();
+ }
+ return localHost;
+ }
}
| [NetworkUtils->[isServerReachable->[isServerReachable]]] | Checks if a server is reachable. | isn't it better to just initialize this inline and drop the if? |
@@ -436,6 +436,10 @@ class Config
return;
}
+ if ($common_dir_contents = @file_get_contents($git_folder . '/commondir')) {
+ $git_folder = $git_folder.DIRECTORY_SEPARATOR.trim($common_dir_contents);
+ }
+
$branch = false;
// are we on any branch?
if (strstr($ref_head, '/')) {
| [Config->[isHttps->[set,get],checkUpload->[set],getThemeUniqueValue->[get],load->[loadDefaults],loadUserPreferences->[_setConnectionCollation,load],getRootPath->[get],getUploadTempDir->[getTempDir],checkGitRevision->[isGitRevision],removeCookie->[getRootPath,isHttps],checkUploadSize->[set],setCookie->[getRootPath,isHttps,removeCookie],checkClient->[_setClientPlatform],enableBc->[get],checkPermissions->[checkWebServerOs],getTempDir->[get]]] | Checks if there is a potential potential branch or branch in a git repository. Checks if a node in the tree has a node in the tree that has a branch in This function is called from the base - implementation of the add_filter_filter_chain read a bunch of records from a pack file Checks if a node in the tree has a node in the branch or if it has a Sets the values of all version - specific variables. | Thanks for your contribution! Is the @ operator really necessary? |
@@ -150,6 +150,13 @@ class ReportsController < ApplicationController
template: 'reports/report.pdf.erb',
disable_javascript: true
end
+ format.docx do
+ @user = current_user
+ @team = current_team
+ @scinote_url = root_url
+ @data = params[:data]
+ headers["Content-Disposition"] = 'attachment; filename="scinote_report.docx"'
+ end
end
end
| [ReportsController->[save_pdf_to_inventory_item->[new],destroy->[destroy],create->[new],load_visible_projects->[new],save_modal->[new],load_available_repositories->[new],new]] | generates a single object. | Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. |
@@ -171,7 +171,6 @@ func TestPostgresLockingStrategy_WhenReacquiredOriginalNodeErrors(t *testing.T)
require.NoError(t, err)
defer lock.Unlock(delay)
- require.Panics(t, func() {
- _ = store.ORM.RawDB(func(db *gorm.DB) error { return nil })
- })
+ _ = store.ORM.RawDB(func(db *gorm.DB) error { return nil })
+ gomega.NewGomegaWithT(t).Eventually(gracefulpanic.Wait()).Should(gomega.BeClosed())
}
| [RemoveAll,NormalizedDatabaseURL,Unlock,RootDir,RawDB,ValueOf,Close,NewStore,NewConfig,NewFileLockingStrategy,Error,Save,NewPostgresLockingStrategy,Cause,Lock,NewLockingStrategy,Skip,DatabaseURL,Type,Join,Equal,NewORM,LockingStrategyHelperSimulateDisconnect,ToSlash,NoError,PrepareTestDB,MkdirAll,Panics,DatabaseTimeout,NewID,Run] | RequireNoError - require that err == nil. | What's gomega? It looks like we introducing a third testing dependency into our code base. It it already being used somewhere? |
@@ -20,11 +20,11 @@ namespace System.Xml.Serialization
public class SoapAttributes
{
private bool _soapIgnore;
- private SoapTypeAttribute _soapType;
- private SoapElementAttribute _soapElement;
- private SoapAttributeAttribute _soapAttribute;
- private SoapEnumAttribute _soapEnum;
- private object _soapDefaultValue;
+ private SoapTypeAttribute? _soapType;
+ private SoapElementAttribute? _soapElement;
+ private SoapAttributeAttribute? _soapAttribute;
+ private SoapEnumAttribute? _soapEnum;
+ private object? _soapDefaultValue;
public SoapAttributes()
{
| [SoapAttributes->[Value,Length,Type,Enum,GetCustomAttributes,Attribute,Element]] | Produces an instance of the class. region Implementation. | On line 34: NullReferenceException will be thrown when provider is `null`. |
@@ -35,7 +35,7 @@ namespace System.Windows.Forms
/// </summary>
public ToolStripControlHost(Control c)
{
- _control = c ?? throw new ArgumentNullException(nameof(c), SR.ControlCannotBeNull);
+ _control = c.OrThrowIfNull();
SyncControlParent();
c.Visible = true;
SetBounds(c.Bounds);
| [ToolStripControlHost->[OnBoundsChanged->[Size],OnHostedControlResize->[Size],ShouldSerializeBackColor->[ShouldSerializeBackColor],OnKeyboardToolTipHook->[OnKeyboardToolTipHook],SetVisibleCore->[SetVisibleCore],ShouldSerializeRightToLeft->[ShouldSerializeRightToLeft],Size->[Size],ProcessMnemonic->[ProcessMnemonic],ResetBackColor->[ResetBackColor],OnParentChanged->[OnParentChanged],Focus->[Focus],ShouldSerializeForeColor->[ShouldSerializeForeColor],ResetForeColor->[ResetForeColor],OnKeyboardToolTipUnhook->[OnKeyboardToolTipUnhook],Dispose->[Dispose],ShouldSerializeFont->[ShouldSerializeFont],ToolStripControlHost]] | ToolStripControlHost is a base class for all of the ToolStripItems that can be Demonstrates how to display an image. | We're losing the message here |
@@ -242,6 +242,7 @@ public interface TimerInternals {
}
ComparisonChain chain =
ComparisonChain.start()
+ .compare(this.getOutputTimestamp(), that.getOutputTimestamp())
.compare(this.getTimestamp(), that.getTimestamp())
.compare(this.getOutputTimestamp(), that.getOutputTimestamp())
.compare(this.getDomain(), that.getDomain())
| [TimerDataCoder->[decode->[of,decode],verifyDeterministic->[verifyDeterministic],of->[TimerDataCoder],encode->[getTimestamp,getTimerId,encode],of],TimerDataCoderV2->[decode->[of,decode],verifyDeterministic->[verifyDeterministic],of->[TimerDataCoderV2],encode->[getTimestamp,getTimerFamilyId,getTimerId,getOutputTimestamp,encode],of],TimerData->[of->[of],compareTo->[getTimerFamilyId,getNamespace]]] | Compares two timer data objects. | nit: this looks unrelated |
@@ -93,11 +93,7 @@ func resourceAwsCodePipelineWebhook() *schema.Resource {
ForceNew: true,
Required: true,
},
- "tags": {
- Type: schema.TypeMap,
- Optional: true,
- ForceNew: true,
- },
+ "tags": tagsSchema(),
},
}
}
| [Printf,DeleteWebhook,StringValue,PutWebhook,GetOk,CIDRNetwork,Sprintf,List,ListWebhooks,String,StringInSlice,Errorf,Int64,SetId,Get,Id,Set] | returns a codepipeline. WebhookFilterConfiguration and codepipeline. WebhookAuthConfiguration. The codePipelineWebhookCreate function is responsible for creating a new webhook with a secret token. | No need to recreate resource when `tags` change. |
@@ -137,9 +137,9 @@ final class TracingExecutionInterceptor implements ExecutionInterceptor {
String awsServiceName = attributes.getAttribute(SdkExecutionAttribute.SERVICE_NAME);
String awsOperation = attributes.getAttribute(SdkExecutionAttribute.OPERATION_NAME);
- span.setAttribute("aws.agent", COMPONENT_NAME);
- span.setAttribute("aws.service", awsServiceName);
- span.setAttribute("aws.operation", awsOperation);
+ span.setAttribute("aws-sdk.agent", COMPONENT_NAME);
+ span.setAttribute("aws-sdk.service", awsServiceName);
+ span.setAttribute("aws-sdk.operation", awsOperation);
}
@Override
| [TracingExecutionInterceptor->[afterExecution->[afterExecution],afterMarshalling->[decorator]]] | Decorate with the attributes data. | The aws changes will be very breaking for us in the collector. I need to get back to my spec PR for these... Do intend to change these, but need to change the collector handling in a backwards compatible way first. |
@@ -236,6 +236,15 @@ func (bc *BuildController) Run(workers int, stopCh <-chan struct{}) {
defer bc.buildQueue.ShutDown()
defer bc.buildConfigQueue.ShutDown()
+ // Read additionalCA data, if it exists
+ if len(bc.additionalTrustedCAPath) > 0 {
+ caData, err := bc.readBuildCAData()
+ if err != nil {
+ glog.Warningf("Failed to read additional CA bundle %s: %v", bc.additionalTrustedCAPath, err)
+ }
+ bc.additionalTrustedCAData = caData
+ }
+
// Wait for the controller stores to sync before starting any work in this controller.
if !cache.WaitForCacheSync(stopCh, bc.buildStoreSynced, bc.podStoreSynced, bc.secretStoreSynced, bc.imageStreamStoreSynced) {
utilruntime.HandleError(fmt.Errorf("timed out waiting for caches to sync"))
| [enqueueBuildForPod->[Add],createBuildPod->[resolveImageSecretAsReference,createPodSpec,resolveImageReferences],buildDeleted->[enqueueBuildConfig],enqueueBuild->[Add],imageStreamUpdated->[imageStreamAdded],enqueueBuildConfig->[Add],imageStreamAdded->[Add,Pop],resolveImageReferences->[Remove,Add,resolveOutputDockerImageReference]] | Run starts the build controller. | For now build controller doesn't fail if the additional CA can't be read. This could cause pain later on if image pulls/pushes fail (and would be a challenge to diagnose). Would we rather have all builds fail in this scenario? |
@@ -68,6 +68,7 @@ public class ProcessBundleHandler {
// TODO: What should the initial set of URNs be?
private static final String DATA_INPUT_URN = "urn:org.apache.beam:source:runner:0.1";
+ public static final String READ_URN = "urn:beam:transform:read:v1";
public static final String JAVA_SOURCE_URN = "urn:org.apache.beam:source:java:0.1";
private static final Logger LOG = LoggerFactory.getLogger(ProcessBundleHandler.class);
| [ProcessBundleHandler->[createRunnerAndConsumersForPTransformRecursively->[createRunnerAndConsumersForPTransformRecursively,createRunnerForPTransform],processBundle->[createRunnerAndConsumersForPTransformRecursively],BlockTillStateCallsFinish->[handle->[handle]]]] | Implementation of the ProcessBundleHandler class. The PipelineRunnerRegistrars are the PipelineRunnerRegistrars that are registered with PipelineRunner. | <!--new_thread; commit:5300be61ccac7a006ec7f2b8f3824cddb4dc75e8; resolved:0--> Can these URNs be imported from e.g. PTransformTranslation? We also do need to get them in a central place, I know, but anyhow in Java we have this available. |
@@ -116,10 +116,12 @@ public class ExpiryMonitor implements Runnable, Disposable {
@Override
public void run() {
if (!onPollingNodeOnly || muleContext == null || muleContext.isPrimaryPollingInstance()) {
- for (ExpirableHolder holder : monitors.values()) {
- if (holder.isExpired()) {
- removeExpirable(holder.getExpirable());
- holder.getExpirable().expired();
+ synchronized (monitors) {
+ for (ExpirableHolder holder : monitors.values()) {
+ if (holder.isExpired()) {
+ removeExpirable(holder.getExpirable());
+ holder.getExpirable().expired();
+ }
}
}
}
| [ExpiryMonitor->[dispose->[removeExpirable],ExpirableHolder->[toString->[toString]],run->[removeExpirable],toString->[toString]]] | This method is called when the thread is running. | Does this TODO come from mule 1.x? The jira number is prety old. If that is correct, remove it |
@@ -17,6 +17,14 @@ class PantsLoader(object):
ENTRYPOINT_ENV_VAR = 'PANTS_ENTRYPOINT'
DEFAULT_ENTRYPOINT = 'pants.bin.pants_exe:main'
+ ENCODING_IGNORE_ENV_VAR = 'PANTS_IGNORE_UNRECOGNIZED_ENCODING'
+ BLACKLISTED_ENCODINGS = (
+ # Many sources.
+ 'us-ascii',
+ # From an Ubuntu Trusty docker image: see #6295.
+ 'ansi_x3.4-1968',
+ )
+
class InvalidLocaleError(Exception):
"""Raised when a valid locale can't be found."""
| [main->[run],PantsLoader->[ensure_locale->[InvalidLocaleError],run->[setup_warnings,load_and_execute,determine_entrypoint,ensure_locale]],main] | Set up deprecation warnings. | I'd be in favor of being even stricter, and requiring UTF-8. Do we know that this might cause issues? |
@@ -75,3 +75,14 @@ func (mc *MeshCatalog) ListSMIPolicies() ([]*split.TrafficSplit, []service.Weigh
return trafficSplits, splitServices, serviceAccouns, trafficSpecs, trafficTargets, services
}
+
+// ListMonitoredNamespaces returns all namespaces that the mesh is monitoring.
+func (mc *MeshCatalog) ListMonitoredNamespaces() []string {
+ namespaces, err := mc.namespaceController.ListMonitoredNamespaces()
+
+ if err != nil {
+ return nil
+ }
+
+ return namespaces
+}
| [ListSMIPolicies->[ListServices,ListHTTPTrafficSpecs,ListTrafficSplits,ListServiceAccounts,ListTrafficTargets,ListTrafficSplitServices],ListExpectedProxies->[Lock,Unlock],ListDisconnectedProxies->[Lock,Unlock],ListConnectedProxies->[Lock,Unlock]] | ListSMIPolicies returns all the smIPolicies for this catalog. | `return nil` would be more readable. |
@@ -249,6 +249,9 @@ public class ListenHTTPServlet extends HttpServlet {
private Set<FlowFile> handleMultipartRequest(HttpServletRequest request, ProcessSession session, String foundSubject, String foundIssuer)
throws IOException, IllegalStateException, ServletException {
+ if (isRecordProcessing()) {
+ logger.debug("Record processing will not be utilized while processing multipart request. Request URI: {}", request.getRequestURI());
+ }
Set<FlowFile> flowFileSet = new HashSet<>();
String tempDir = System.getProperty("java.io.tmpdir");
request.setAttribute(Request.MULTIPART_CONFIG_ELEMENT, new MultipartConfigElement(tempDir, multipartRequestMaxSize, multipartRequestMaxSize, multipartReadBufferSize));
| [ListenHTTPServlet->[doPost->[doPost],putAttribute->[putAttribute],doHead->[doHead]]] | Handles a multipart request. | I think it would be better to provide a notice on this limitation in the `ListenHTTP` processor's `CapabilityDescription`. |
@@ -47,12 +47,13 @@ func newLoginCmd() *cobra.Command {
"and this command will prompt you for an access token, including a way to launch your web browser to\n" +
"easily obtain one. You can script by using `PULUMI_ACCESS_TOKEN` environment variable.\n" +
"\n" +
- "By default, this will log into `app.pulumi.com`. If you prefer to log into a separate instance\n" +
+ "By default, this will log into `api.pulumi.com`. If you prefer to log into a separate instance\n" +
"of the Pulumi service, such as Pulumi Enterprise, specify a URL. For example, run\n" +
"\n" +
- " $ pulumi login https://pulumi.acmecorp.com\n" +
+ " $ pulumi login https://api.pulumi.acmecorp.com\n" +
"\n" +
- "to log in to a Pulumi Enterprise server running at the pulumi.acmecorp.com domain.\n" +
+ "to log in to a Pulumi Enterprise server running at the\n" +
+ "api.pulumi.acmecorp.com and app.pulumi.acmecorp.com domains.\n" +
"\n" +
"For `https://` URLs, the CLI will speak REST to a service that manages state and concurrency control.\n" +
"[PREVIEW] If you prefer to operate Pulumi independently of a service, and entirely local to your computer,\n" +
| [Wrap,URL,HasPrefix,New,RunFunc,Diag,StringVarP,GetCurrentCloudURL,MaximumNArgs,Wrapf,GetGlobalColorization,CurrentUser,Name,ToSlash,Login,IsFileStateBackendURL,Printf,BoolVarP,PersistentFlags] | newLoginCmd - creates a new command that logs into the Pulumi service. This is a utility function that is used to manage the state of a Pulumi computer. | We may want to break this line manually so that it stays within the current line wrap lengths. |
@@ -259,9 +259,9 @@ class SampleDatatable < AjaxDatatablesRails::Base
.select('"samples"."id"')
.distinct
- # grabs the ids that are not the previous one but are still of the same organization
+ # grabs the ids that are not the previous one but are still of the same team
unassigned = Sample
- .where('"samples"."organization_id" = ?', @organization.id)
+ .where('"samples"."team_id" = ?', @team.id)
.where('"samples"."id" NOT IN (?)', assigned)
.select('"samples"."id"')
.distinct
| [SampleDatatable->[searchable_columns->[filter_search_array,push],assigned_cell->[include?],new_sort_column->[split,to_i,join],sample_group_cell->[nil?,escape_input,color,t,name],custom_fields_sort_by->[times,count],data->[assigned_cell,edit_sample_path,id,nil?,created_at,custom_field_id,sample_group_cell,html_safe,full_name,escape_input,sample_path,each,t,name,l,map],sortable_columns->[push],escape_special_chars->[present?,send],filter_search_array->[to_s,nil?,find,each,push],fetch_records->[present?,sort_records,paginate_records,filter_records],sort_null_direction->[sort_direction],inverse_sort_direction->[sort_direction],generate_sortable_displayed_columns->[first,to_s,shift,map!],sort_records->[where,join,order,find_by_sql,distinct,sort_null_direction,sort_direction,sort_column,values,to_s,to_i,to_sql,present?,length,id,send,build_conditions_for,gsub!,key,collect],new_search_condition->[split,gsub!,new,sql,include?,matches,in,invert,select,constantize,and,as,map],get_raw_records->[assigned_samples,id,to_s,references,my_modules_ids,where,blank?,select,each,samples],sorting_by_custom_column->[sort_column,values],freeze,include,times,url_helpers],require] | sort records based on the order of the missing records This method is a very elegant solution to sort assigned samples by the number of modules finds a in the records table This method is called by the record_finder when a record is found in the database. | Align .where with Sample on line 298. |
@@ -739,7 +739,7 @@ public abstract class SCM implements Describable<SCM>, ExtensionPoint {
* @since 1.568
*/
protected final void createEmptyChangeLog(@NonNull File changelogFile, @NonNull TaskListener listener, @NonNull String rootTag) throws IOException {
- try (FileWriter w = new FileWriter(changelogFile)) {
+ try (Writer w = Files.newBufferedWriter(Util.fileToPath(changelogFile), Charset.defaultCharset())) {
w.write("<"+rootTag +"/>");
}
}
| [SCM->[poll->[compareRemoteRevisionWith,pollChanges,calcRevisionsFromBuild],createEmptyChangeLog->[createEmptyChangeLog],compareRemoteRevisionWith->[compareRemoteRevisionWith],getKey->[getType],processWorkspaceBeforeDeletion->[processWorkspaceBeforeDeletion],postCheckout->[postCheckout],_for->[all,_for,getDescriptor],buildEnvVars->[buildEnvironment],_calcRevisionsFromBuild->[calcRevisionsFromBuild],calcRevisionsFromBuild->[calcRevisionsFromBuild],getEffectiveBrowser->[getBrowser],checkout->[checkout],getModuleRoots->[getModuleRoots,getModuleRoot],getModuleRoot->[getModuleRoot]]] | Create empty changelog. | Hmm, I guess we do need to use platform charset for compatibility here. (In most cases the file is _not_ XML despite appearances.) |
@@ -35,7 +35,7 @@ public final class UdfLoaderUtil {
public static UdfFactory createTestUdfFactory(final KsqlFunction udf) {
final UdfMetadata metadata = new UdfMetadata(
- udf.getFunctionName(),
+ udf.getFunctionName().name(),
udf.getDescription(),
"Test Author",
"",
| [UdfLoaderUtil->[createTestUdfFactory->[UdfFactory,getKudfClass,UdfMetadata,getDescription,getFunctionName],load->[load]]] | Create a test UDF factory. | `UdfMetadata` to take `FunctionName` rather than `String`? |
@@ -278,13 +278,13 @@ class User < ActiveRecord::Base
# Adds read and write permissions for each newly created Admin or Ta user
def grant_repository_permissions
# If we're not the repository admin, bail out
- return if(self.student? or !MarkusConfigurator.markus_config_repository_admin?)
+ return if(self.student? or !MarkusConfigurator.get_config_value('is_repository_admin'))
conf = User.repo_config
repo = Repository.get_class(MarkusConfigurator.markus_config_repository_type,
conf)
repo_names = Group.all.collect do |group|
- File.join(MarkusConfigurator.markus_config_repository_storage,
+ File.join(MarkusConfigurator.get_config_value('repository_storage'),
group.repository_name)
end
repo.set_bulk_permissions(repo_names, {self.user_name => Repository::Permission::READ_WRITE})
| [User->[generate_csv_list->[student?],revoke_repository_permissions->[student?,repo_config],maintain_repository_permissions->[student?,repo_config],grant_repository_permissions->[student?,repo_config]]] | Grants read and write permissions to all repositories in admin. | Use `||` instead of `or`.<br>Line is too long. [91/80]<br>Use space after control keywords.<br>Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping. |
@@ -42,6 +42,8 @@ public class KVMHostInfo {
private long overCommitMemory;
private List<String> capabilities = new ArrayList<>();
+ public static String cpuInfoMaxFreqFileName = "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq";
+
public KVMHostInfo(long reservedMemory, long overCommitMemory) {
this.reservedMemory = reservedMemory;
this.overCommitMemory = overCommitMemory;
| [KVMHostInfo->[getHostInfoFromLibvirt->[getCapabilities,getCpuSpeed]]] | Creates an instance of the object given the reserved memory and over - commit memory. Replies the total memory of the system. | It seems that this variable could be private. |
@@ -108,7 +108,8 @@ MultiHashes hashMultiFromFile(int mask, const std::string& path) {
hash.second->update(&buffer[0], size);
}
}
- }));
+ }),
+ true);
MultiHashes mh = {};
if (!s.ok()) {
| [hashFromBuffer->[digest,update],hashFromFile->[hashMultiFromFile],genHashForFile->[hashMultiFromFile],hashMultiFromFile->[update],genHash->[genHashForFile]] | Hash a file with a given mask. | How did you find this? |
@@ -116,16 +116,6 @@ def test_file_dependencies(rule_runner: RuleRunner) -> None:
)
# Mixed.
- rule_runner.add_to_build_file(
- "src/c",
- dedent(
- """\
- docker_image(name="img_C", dependencies=["src/a:files_A", "src/b:files_B"])
- """
- ),
- )
- rule_runner.create_files("src/c", ["Dockerfile"])
-
assert_build_context(
rule_runner,
Address("src/c", target_name="img_C"),
| [test_version_context_from_dockerfile->[assert_build_context],test_files_out_of_tree->[assert_build_context],test_synthetic_dockerfile->[assert_build_context],test_file_dependencies->[assert_build_context],test_packaged_pex_path->[assert_build_context]] | Test file dependencies. Checks that the specified node has a missing context. | Stale? Not a big deal either way |
@@ -12,6 +12,7 @@
* limitations under the License.
*/
+import 'angular-viewport-watch/angular-viewport-watch.js'
import './app/app.js'
import './app/app.controller.js'
import './app/home/home.controller.js'
| [No CFG could be retrieved] | Imports a single non - empty sequence number from the package. Imports all JS files that are required by the JobManager. | Thanks for update! It would be nicer to move import stmt into `app.js` where the library is actually used. |
@@ -52,6 +52,17 @@ async function replaceUrls(dir) {
await Promise.all(promises);
}
+function signalDistUploadComplete() {
+ const sha = gitCommitHash();
+ const travisBuild = travisBuildNumber();
+ const url =
+ 'https://amp-pr-deploy-bot.appspot.com/probot/v0/pr-deploy/' +
+ `travisbuilds/${travisBuild}/headshas/${sha}/0`;
+
+ request.post(url);
+}
+
module.exports = {
replaceUrls,
+ signalDistUploadComplete,
};
| [No CFG could be retrieved] | A function to generate all the promises and then export it to the module. | this is async correct? |
@@ -55,7 +55,7 @@
// {
// public Context Context { get; set; }
-// public void Handle(MessageToGetAudited message)
+// public Task Handle(MessageToGetAudited message)
// {
// Context.GotAuditMessage = true;
// }
| [No CFG could be retrieved] | Scenario configuration for the given message type. EndpointThatAudits creates an endpoint that audits a message. | These won't compile when re-enabled. But I consider this not part of this PR. |
@@ -60,7 +60,7 @@ public class TicketGrantingTicketResource {
* @return ResponseEntity representing RESTful response
*/
@PostMapping(value = "/v1/tickets", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
- public ResponseEntity<String> createTicketGrantingTicket(@RequestBody final MultiValueMap<String, String> requestBody,
+ public ResponseEntity<String> createTicketGrantingTicket(@RequestBody(required=false) final MultiValueMap<String, String> requestBody,
final HttpServletRequest request) {
try {
final TicketGrantingTicket tgtId = createTicketGrantingTicketForRequest(requestBody, request);
| [TicketGrantingTicketResource->[createTicketGrantingTicketForRequest->[createTicketGrantingTicket]]] | Create ticket granting ticket. | Why the change? |
@@ -700,7 +700,7 @@ def process_options(args: List[str],
# Set strict flags before parsing (if strict mode enabled), so other command
# line options can override.
- if getattr(dummy, 'special-opts:strict'):
+ if getattr(dummy, 'special-opts:strict'): # noqa
for dest, value in strict_flag_assignments:
setattr(options, dest, value)
| [process_options->[add_invertible_flag->[invert_flag_name],add_invertible_flag,SplitNamespace,infer_python_executable],infer_python_executable->[_python_executable_from_version],AugmentedHelpFormatter->[_fill_text->[_fill_text]],_python_executable_from_version->[PythonExecutableInferenceError]] | Parse command line arguments and return a tuple of build sources and options. dest is a list of strings that will be passed to the command line. Adds a group of arguments and arguments to the command line. | Curious that this requires a `# noqa` -- apparently flake8 doesn't realize that the literal string is not a valid identifier. :-) |
@@ -781,6 +781,11 @@ func (rm *resmon) RegisterResource(ctx context.Context,
return nil, err
}
+ goalProps := props
+ if !custom {
+ goalProps = resource.PropertyMap{}
+ }
+
propertyDependencies := make(map[resource.PropertyKey][]resource.URN)
if len(req.GetPropertyDependencies()) == 0 {
// If this request did not specify property dependencies, treat each property as depending on every resource
| [ReadResource->[getDefaultProviderRef],handleRequest->[newRegisterDefaultProviderEvent],StreamInvoke->[StreamInvoke],Invoke->[Invoke],serve->[handleRequest],RegisterResource->[getDefaultProviderRef],getDefaultProviderRef,serve] | RegisterResource registers a resource with the resource manager This function is used to build a list of dependencies and properties for a given resource. Register a resource with the resource monitor. | Left over from an earlier approach... |
@@ -141,7 +141,7 @@ class SchemaRegistryAvroSerializer(object):
cached_schema = parsed_schema
record_format_identifier = b"\0\0\0\0"
- schema_id = self._get_schema_id(cached_schema.fullname, cached_schema, **kwargs)
+ schema_id = self._get_schema_id(cached_schema.fullname, str(cached_schema), **kwargs)
data_bytes = self._avro_serializer.serialize(value, cached_schema)
stream = BytesIO()
| [SchemaRegistryAvroSerializer->[serialize->[serialize,_get_schema_id,close],deserialize->[_get_schema,deserialize],close->[close],__exit__->[__exit__],__enter__->[__enter__]]] | Serialize data with the given schema. | why cast `cached_schema` to be type of string here? ---- I'm thinking of the accepted type of input `schema` here based on the discussion we just had today -- hide apache avro from the surfaces areas. maybe we could start by just supporting "str" first, because accepting bytes brings the problem of decoding bytes into string. do we know what type fastavro is expecting for the schema, string, bytes or dict? |
@@ -169,7 +169,7 @@ limitations under the License.
<%_ if (cypressTests) { _%>
"cypress": "VERSION_MANAGED_BY_CLIENT_COMMON",
<%_ } _%>
- "typescript": "3.8.3",
+ "typescript": "4.0.2",
<%_ if (protractorTests || cypressTests) { _%>
"webdriver-manager": "12.1.7",
<%_ } _%>
| [No CFG could be retrieved] | Return a version of prettier that is compatible with the current version of the server. The version of the compiler that is required by the client. | @qmonmert Maybe we should start using the package.json file and define here VERSION_MANAGED_BY_CLIENT_REACT until we update it also to vue and put it on VERSION_MANAGED_BY_CLIENT_COMMON? |
@@ -1439,7 +1439,7 @@ describe PublicBody, " when loading CSV files" do
context 'an existing body with tags' do
before do
- @body = FactoryGirl.create(:public_body, :tag_string => 'imported first_tag second_tag')
+ @body = FactoryBot.create(:public_body, :tag_string => 'imported first_tag second_tag')
end
it 'created with tags, different tags in csv, add import tag' do
| [set_default_attributes->[last_edit_comment,short_name,last_edit_editor,request_email,name],import_csv_from_file,create,let,tag_string,with_tag,it,to,yield_with_args,change,last_edit_comment,get_request_percentages,each,match,length,context,get_request_totals,find_by_name,reload,with_locale,and_return,internal_admin_body,normalize_string_to_utf8,be,to_not,public_bodies,match_array,set_default_attributes,expire_requests,where,find_by_tag,lambda,find_by_url_name_with_historic,set_api_key,save!,set_locales,file_fixture_name,let!,destroy,strip_heredoc,created_at,include,latest,short_name,default_locale,request_email,id,api_key,load_file_fixture,url_name,home_page,not_to,valid?,save,expand_path,with_hidden_and_successful_requests,new,set_api_key!,update_counter_cache,translations_attributes,updated_at,before,destroy_all,add_tag_if_not_already_present,receive,index,build,with_default_locale,clone,eq,raise_error,update_column,size,describe,set_first_letter,update_attributes,subject,import_csv,name,require,count,squish,dirname,with_query,csv_import_fields] | imports a CSV file with the tags added and removed created with tags different tags in csv replace import tag. | Line is too long. [95/80] |
@@ -353,6 +353,16 @@ class SubmissionsController < ApplicationController
if delete_files.empty? && new_files.empty? && new_folders.empty? && delete_folders.empty?
flash_message(:warning, I18n.t('student.submission.no_action_detected'))
else
+ if unzip
+ zdirs, zfiles = new_files.map do |f|
+ next unless f.content_type == 'application/zip'
+ unzip_uploaded_file(f.path)
+ end.compact.transpose.map(&:flatten)
+ new_files.reject! { |f| f.content_type == 'application/zip' }
+ new_folders.push(*zdirs)
+ new_files.push(*zfiles)
+ end
+
messages = []
@grouping.group.access_repo do |repo|
# Create transaction, setting the author. Timestamp is implicit.
| [SubmissionsController->[downloads->[revision_identifier,find,group_name,accepted_grouping_for,flash_message,send_file,nil?,redirect_back,get_revision,t,count,send_tree_to_zip,access_repo,open,repository_folder,short_identifier,get_latest_revision,student?,files_at_path],update_submissions->[flash_now,set_pr_release_on_results,short_identifier,empty?,find,has_key?,message,log,where,set_release_on_results,update_results_stats,is_peer_review?,head,t,id,update_remark_request_count],download_repo_list->[get_repo_list,short_identifier,send_data,find],zipped_grouping_file_name->[short_identifier,new,user_name],run_tests->[find,has_key?,host_with_port,flash_message,join,map,flash_now,protocol,is_a?,message,t,empty?,blank?,job_id,id,short_identifier,perform_later,render,head,authorize!],set_filebrowser_vars->[get_latest_revision,access_repo,files_at_path,join,repository_folder,missing_assignment_files],server_time->[now,render,l],zip_groupings_files->[to_s,perform_later,find,render,zipped_grouping_file_name,where,job_id,ta?,ids,id,map],download_repo_checkout_commands->[short_identifier,send_data,find,get_repo_checkout_commands,join],uncollect_all_submissions->[perform_later,js,find,respond_to,render,job_id],file_manager->[find,can_collect_now?,allow_web_submits,accepted_grouping_for,flash_message,set_filebrowser_vars,nil?,vcs_submit,is_peer_review?,t,grouping_past_due_date?,human_attribute_name,blank?,id,redirect_to,is_valid?,render,section,assignment_path,scanned_exam?,overtime_message],download_zipped_file->[find,basename,redirect_back,zipped_grouping_file_name,flash_message,send_file,t],set_result_marking_state->[flash_now,empty?,key?,transaction,first,save,message,each,raise,where,select,head,t,marking_state],browse->[section_due_dates_type,flash_now,l,nil?,find,new,scanned_exam,calculate_collection_time,past_all_collection_dates?,each,layout,now,ta?,join,name,t,find_each,push],index->[render,find,respond_to,pluck,json,current_submission_data],get_all_file_data->[path_exists?,compact,sort,anonymize_groups,ta?,join,repository_folder,count],revisions->[server_timestamp,to_s,get_all_revisions,find,path_exists?,timestamp,render,changes_at_path?,access_repo,revision_identifier_ui,each,repository_folder,l,map],update_files->[only_required_files,find,allow_web_submits,accepted_grouping_for,flash_message,set_filebrowser_vars,join,redirect_back,message,concat,add_files,remove_folders,t,commit_transaction,flash_repository_messages,empty?,access_repo,remove_files,get_transaction,blank?,present?,gsub,add_folders,is_valid?,user_name,student?,pluck,raise,authorize!],get_feedback_file->[file_content,find,render,encode64,start_with?,authorize!],collect_submissions->[find,has_key?,current,flash_now,to_set,transform_keys,t,count,empty?,all_grouping_collection_dates,include?,each,present?,job_id,id,short_identifier,perform_later,render,is_collected?,head,scanned_exam?],download->[nil?,get_latest_revision,find,render,send_data_download,access_repo,download_as_string,find_appropriate_grouping,files_at_path,message,get_revision,join,t,repository_folder,id],get_file->[revision_identifier,find,flash_message,get_file_type,is_binary?,is_supported_image?,encode!,nil?,redirect_back,download_as_string,get_revision,t,is_a_reviewer?,access_repo,to_json,filename,grouping,id,is_pdf?,path,render,student?,files_at_path,pr_assignment],manually_collect_and_begin_grading->[redirect_to,nil?,find,edit_assignment_submission_result_path,perform_now,assessment_id,current_submission_used,id],repo_browser->[server_timestamp,nil?,get_all_revisions,find,path_exists?,revision_identifier,to_s,render,changes_at_path?,access_repo,in_time_zone,current_submission_used,each,repository_folder,assignment],populate_file_manager->[get_all_file_data,get_latest_revision,find,render,student?,access_repo,accepted_grouping_for,get_revision,blank?],before_action,include]] | Updates a single node in the group. add new_files delete_files commit_success flash_messages flash_messages. | Hmm I guess this is a Windows thing, when I tried this out I got a content type of `'application/x-zip-compressed'`. I did a bit of research, and it looks like there are a few others. We could switch this to using the extension? |
@@ -53,7 +53,7 @@ def get_typed_value_descriptor(obj):
~exceptions.TypeError: if the Python object has a type that is not
supported.
"""
- if isinstance(obj, (str, unicode)):
+ if isinstance(obj, (bytes, unicode)):
type_name = 'Text'
elif isinstance(obj, bool):
type_name = 'Boolean'
| [from_json_value->[from_json_value],to_json_value->[get_typed_value_descriptor,to_json_value]] | Converts a basic type into a type dictionary. | Thanks! Let's update docstrings for get_typed_value_descriptor and to_json_value. |
@@ -491,7 +491,7 @@ async def get_exporting_owner(owned_dependency: OwnedDependency) -> ExportedTarg
"""
hydrated_target = owned_dependency.hydrated_target
ancestor_addrs = AscendantAddresses(hydrated_target.address.spec_path)
- ancestor_tgts = await Get[HydratedTargets](Specs, Specs((ancestor_addrs,)))
+ ancestor_tgts = await Get[HydratedTargets](AddressSpecs((ancestor_addrs,)))
# Note that addresses sort by (spec_path, target_name), and all these targets are
# ancestors of the given target, i.e., their spec_paths are all prefixes. So sorting by
# address will effectively sort by closeness of ancestry to the given target.
| [get_sources->[SetupPySources],get_owned_dependencies->[OwnedDependency,OwnedDependencies],generate_chroot->[SetupPySourcesRequest,SetupPyChroot,InvalidEntryPoint,DependencyOwner,UnsupportedPythonVersion],run_setup_pys->[ExportedTarget,TargetNotExported,RunSetupPyRequest,SetupPyChrootRequest,SetupPy],get_ancestor_init_py->[AncestorInitPyFiles],get_requirements->[OwnedDependency,ExportedTargetRequirements],setup_setuptools->[SetuptoolsSetup],get_exporting_owner->[_is_exported,ExportedTarget,AmbiguousOwnerError,NoOwnerError],run_setup_py->[RunSetupPyResult]] | Find the exported target that owns the given dependency. Append a sibling to the end of the chain. | You lost one argument in that function call. Just making sure it was intentional? |
@@ -303,6 +303,14 @@ namespace ProtoCore.Utils
core.IsParsingCodeBlockNode = true;
core.ResetForPrecompilation();
+
+ // Read Namespace cache in ElementResolver to substitute
+ // partial classnames with their fully qualified names in ASTs
+ // before passing them for pre-compilation. If partial class is not found in cache,
+ // update namespace cache in ElementResolver with fully resolved name from compiler.
+ if(elementResolver != null)
+ elementResolver.ResolveClassNamespace(core.ClassTable, ref codeblock);
+
buildStatus = PreCompile(string.Empty, core, codeblock, out blockId);
core.IsParsingCodeBlockNode = parsingCbnFlag;
| [CompilerUtils->[PreCompileCodeBlock->[AppendErrors,AppendParsedNodes,AppendWarnings],TryLoadAssemblyIntoCore->[PreCompile],CompileCodeBlockAST->[AppendErrors,AppendUnboundIdentifier,PreCompile,AppendWarnings]],VariableLine->[Equals->[Equals],GetHashCode->[GetHashCode]]] | CompileCodeBlockAST - Compile a code block AST. | Why would the element resolver be null? I'd rather not use that as the control flag for whether the resolution happens |
@@ -31,6 +31,9 @@ class ContainerRegistryClient(ContainerRegistryBaseClient):
:param str endpoint: An ACR endpoint
:param credential: The credential with which to authenticate
:type credential: :class:`~azure.core.credentials.TokenCredential`
+ :keyword api_version: Api Version. The default value is "2021-07-01". Note that overriding this default value may
+ result in unsupported behavior.
+ :paramtype api_version: str
:keyword audience: URL to use for credential authentication with AAD. Its value could be
"https://management.azure.com", "https://management.chinacloudapi.cn", "https://management.microsoftazure.de" or
"https://management.usgovcloudapi.net"
| [ContainerRegistryClient->[update_manifest_properties->[update_manifest_properties,_get_digest_from_tag],delete_manifest->[delete_manifest,_get_digest_from_tag],delete_tag->[delete_tag],list_tag_properties->[get_next->[prepare_request]],get_tag_properties->[get_tag_properties],list_manifest_properties->[get_next->[prepare_request]],delete_repository->[delete_repository],list_repository_names->[get_next->[prepare_request]],get_manifest_properties->[_get_digest_from_tag,get_manifest_properties]]] | Create a ContainerRegistryClient from an ACR endpoint and a credential with which to authenticate the. | Nitpick: For capitalization I would use: "API version." |
@@ -126,6 +126,15 @@ public class DruidRexExecutor implements RexExecutor
// if exprResult evaluates to Nan or infinity, this will throw a NumberFormatException.
// If you find yourself in such a position, consider casting the literal to a BIGINT so that
// the query can execute.
+ double exprResultDouble = exprResult.asDouble();
+ if (Double.isNaN(exprResultDouble) || Double.isInfinite(exprResultDouble)) {
+ String expression = druidExpression.getExpression();
+ throw new IAE("'%s' evaluates to '%s' that is not supported. You can either cast the expression as bigint ('cast(%s as bigint)') or char ('cast(%s as char)') or change the expression itself",
+ expression,
+ Double.toString(exprResultDouble),
+ expression,
+ expression);
+ }
bigDecimal = BigDecimal.valueOf(exprResult.asDouble());
}
literal = rexBuilder.makeLiteral(bigDecimal, constExp.getType(), true);
| [DruidRexExecutor->[reduce->[jodaToCalciteTimestampString,IAE,getExpression,getType,eval,makeNullLiteral,getTimeZone,toDruidExpression,utc,asDouble,isArray,asArray,asLong,asList,valueOf,asBoolean,parse,type,makeDateLiteral,jodaToCalciteDateString,makeLiteral,isNumericNull,getExprMacroTable,UnsupportedOperationException,isNullable,value,makeTimestampLiteral,contains,add,getSqlTypeName],build]] | Reduce the given list of expressions to a list of values. Joda timestamp string. | i wonder if it is worth clarify that the not supported part is specific to SQL |
@@ -72,8 +72,15 @@
static int pubkey_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it,
void *exarg)
{
+ if (operation == ASN1_OP_NEW_POST) {
+ X509_PUBKEY *pubkey = (X509_PUBKEY *)*pval;
+ pubkey->lock = CRYPTO_THREAD_lock_new();
+ if (pubkey->lock == NULL)
+ return 0;
+ }
if (operation == ASN1_OP_FREE_POST) {
X509_PUBKEY *pubkey = (X509_PUBKEY *)*pval;
+ CRYPTO_THREAD_lock_free(pubkey->lock);
EVP_PKEY_free(pubkey->pkey);
}
return 1;
| [No CFG could be retrieved] | 4. 4. This is a wrapper around the standard library s methods that are used to - - - - - - - - - - - - - - - - - -. | I have no idea what this is all about. Care to enlighten me? |
@@ -50,7 +50,7 @@ namespace Dynamo.Graph.Nodes.CustomNodes
}
}
- protected override AssociativeNode GetFunctionApplication(NodeModel model, List<AssociativeNode> inputAstNodes)
+ protected override AssociativeNode GetFunctionApplicationWithContext(NodeModel model, List<AssociativeNode> inputAstNodes, CompilationContext context)
{
if (!model.IsPartiallyApplied)
{
| [CustomNodeController->[BuildOutputAst->[BuildOutputAst],BuildAstForPartialMultiOutput->[BuildAstForPartialMultiOutput],AssignIdentifiersForFunctionCall->[AssignIdentifiersForFunctionCall],SyncNodeWithDefinition->[SyncNodeWithDefinition]]] | Initialize outputs. | This may just be me, but I'm imagining that an addition of `CompilationContext` will be sufficient overload the method, do we have to add `WithContext` to the method name (esp. given that the `CompilationContext` has no default value)? |
@@ -669,6 +669,14 @@ class Jetpack {
return esc_url( sprintf( 'https://wordpress.com/%s/%s/%d', $path_prefix, $site_slug, $post_id ) );
}
+ function point_edit_comment_links_to_calypso( $url ) {
+ wp_parse_str( wp_parse_url( $url, PHP_URL_QUERY ), $query_args );
+ return esc_url( sprintf( 'https://wordpress.com/comments/all/%s/?commentId=%d&action=edit',
+ Jetpack::build_raw_urls( get_home_url() ),
+ $query_args['amp;c']
+ ) );
+ }
+
function jetpack_track_last_sync_callback( $params ) {
/**
* Filter to turn off jitm caching
| [Jetpack->[verify_json_api_authorization_request->[add_nonce],get_locale->[guess_locale_from_lang],admin_notices->[opt_in_jetpack_manage_notice,can_display_jetpack_manage_notice],authenticate_jetpack->[verify_xml_rpc_signature],admin_page_load->[disconnect,unlink_user,can_display_jetpack_manage_notice],wp_rest_authenticate->[verify_xml_rpc_signature],jumpstart_has_updated_module_option->[do_stats,stat],jetpack_getOptions->[get_connected_user_data],build_connect_url->[build_connect_url],opt_in_jetpack_manage_notice->[opt_in_jetpack_manage_url],display_activate_module_link->[opt_in_jetpack_manage_url],register->[do_stats,stat,validate_remote_register_response]]] | Link to the Calypso edit page. This function is not terribly important if the plugin is evicted. | Could you walk me through what's happening here? Does `wp_parse_url` not return an array of the url parts? |
@@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Laravel</title>
- <link href="/css/app.css" rel="stylesheet">
+ <link href="{{ URL::asset('css/app.css') }}" rel="stylesheet">
<!-- Fonts -->
<link href='//fonts.googleapis.com/css?family=Roboto:400,300' rel='stylesheet' type='text/css'>
| [No CFG could be retrieved] | Displays a single Displays a hidden menu with a hidden menu with a link to the user s name. | shouldn't this be: `{{ asset('css/app.css') }}`? |
@@ -380,14 +380,12 @@ class BaseEpochs(ProjMixin, ContainsMixin, UpdateChannelsMixin, ShiftTimeMixin,
def __init__(self, info, data, events, event_id=None, tmin=-0.2, tmax=0.5,
baseline=(None, 0), raw=None, picks=None, reject=None,
flat=None, decim=1, reject_tmin=None, reject_tmax=None,
- detrend=None, proj=True, on_missing='error',
+ detrend=None, proj=True, on_missing='raise',
preload_at_end=False, selection=None, drop_log=None,
filename=None, metadata=None, event_repeated='error',
verbose=None): # noqa: D102
self.verbose = verbose
- _check_option('on_missing', on_missing, ['error', 'warning', 'ignore'])
-
if events is not None: # RtEpochs can have events=None
events_type = type(events)
with warnings.catch_warnings(record=True):
| [_save_split->[_pack_reject_params],BaseEpochs->[equalize_event_counts->[drop,drop_bad],plot_drop_log->[plot_drop_log],_get_data->[_get_epoch_from_raw,_detrend_offset_decim,_is_good_epoch,_project_epoch],drop_bad->[_reject_setup],get_data->[_get_data],crop->[_set_times],to_data_frame->[copy,get_data],__init__->[_handle_event_repeated],save->[_save_split,drop_bad,_event_id_string,_pack_reject_params,_check_consistency]],EpochsArray->[__init__->[copy,_detrend_offset_decim,drop_bad]],combine_event_ids->[copy],equalize_epoch_counts->[drop,drop_bad],_concatenate_epochs->[_compare_epochs_infos,copy,get_data],_finish_concat->[BaseEpochs,drop_bad],concatenate_epochs->[_finish_concat,_concatenate_epochs],average_movements->[copy,_evoked_from_epoch_data],make_fixed_length_epochs->[Epochs],EpochsFIF->[__init__->[_read_one_epoch_file,BaseEpochs,_RawContainer,copy]],_compare_epochs_infos->[_check_consistency],add_channels_epochs->[_check_merge_epochs,get_data],bootstrap->[copy],_handle_event_repeated->[_merge_events]] | Initialize a new RtEvent object. This method is called to populate the object with a sequence of missing events. Initialize a new object with a single object. Initialize the object with a single object. | this is a silent API change. I would suggest to keep it as it is here but let the function interpret 'error' as 'raise' and same for warning or warn as I don't want to touch API of Epochs object. Here you are breaking backward compat. |
@@ -0,0 +1,9 @@
+<% if flash.any? %>
+ <% flash.to_hash.slice(*ApplicationController::FLASH_KEYS).each do |type, message| %>
+ <% if message.present? %>
+ <div class='alert <%= "alert-#{type}" %>' role='alert'>
+ <%= safe_join([message.html_safe]) %>
+ </div>
+ <% end %>
+ <% end %>
+<% end %>
| [No CFG could be retrieved] | No Summary Found. | I feel like the `.any?` is redundant with the `.to_hash.slice` below? Since an empty hash would just no-op? I see it's the same as before |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.