patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -36,8 +36,10 @@ import <%=packageName%>.service.dto.<%= entityClass %>DTO;
import <%=packageName%>.service.mapper.<%= entityClass %>Mapper;<% } %>
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+<%_ if (pagination !== 'no') { _%>
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
+<%_ } _%>
import org.springframework.stereotype.Service;
<%_ if (databaseType === 'sql') { _%>
import org.springframework.transaction.annotation.Transactional;
| [No CFG could be retrieved] | Creates an instance of the entity class. % > List of objects that are not owned by the owner of this object. | I need to revert this, as this makes the tests fail, when there is a relationship (hava a look at the `findAllWithEagerRelationships` method) |
@@ -1223,6 +1223,7 @@ class ResultsControllerTest < AuthenticatedControllerTest
result = Result.make
get_as @ta,
:update_marking_state,
+ format: :js,
:assignment_id => 1,
:submission_id => 1,
:id => result.id,
| [ResultsControllerTest->[marking_scheme_type,find_by_submission_id,all,new,find_entry,group_name,unit,update_attributes,post_as,refresh_grade_distribution,join,first,raises,released_to_students,should,assert_select,map,update_total_mark,assert,assert_equal,body,save!,respond_with,returns,add,repo_name,total_mark,result,revision_number,assigns,overall_comment,t,assert_not_nil,header,remark_result_id,assert_nil,commit,count,empty?,to_i,get_latest_result,user,save,access_repo,assert_not_equal,times,submission,read,get_transaction,get_as,each,repository_folder,make,id,marking_state,open,extra_mark,annotation_text,short_identifier,context,get_latest_revision,assert_response,has_submission?,grade_distribution_percentage,get,generate_new_submission,retrieve_file,assert_match,render_template,setup,reload,assert_recognizes],join,require,expand_path,dirname] | This is a basic example of how to get a specific object from a group. A simple simple interface to retrieve a single nagon object. | Align the parameters of a method call if they span more than one line. |
@@ -226,9 +226,9 @@ public class HoodieParquetRealtimeInputFormat extends HoodieParquetInputFormat i
// actual heavy lifting of reading the parquet files happen.
if (job.get(HOODIE_READ_COLUMNS_PROP) == null) {
synchronized (job) {
- LOG.info(
- "Before adding Hoodie columns, Projections :" + job.get(ColumnProjectionUtils.READ_COLUMN_NAMES_CONF_STR)
- + ", Ids :" + job.get(ColumnProjectionUtils.READ_COLUMN_IDS_CONF_STR));
+ LOG.info("Before adding Hoodie columns, Projections : {}, Ids : {}",
+ job.get(ColumnProjectionUtils.READ_COLUMN_NAMES_CONF_STR),
+ job.get(ColumnProjectionUtils.READ_COLUMN_IDS_CONF_STR));
if (job.get(HOODIE_READ_COLUMNS_PROP) == null) {
// Hive (across all versions) fails for queries like select count(`_hoodie_commit_time`) from table;
// In this case, the projection fields gets removed. Looking at HiveInputFormat implementation, in some cases
| [HoodieParquetRealtimeInputFormat->[listStatus->[listStatus],addRequiredProjectionFields->[addProjectionField],getRecordReader->[addRequiredProjectionFields,cleanProjectionColumnIds,getRecordReader]]] | Get a record reader that reads records from the Hoodie partition. Returns a record reader that reads a sequence of bytes from the file specified by the given split. | I think the auto indent was brought by `idea`. drop it. |
@@ -456,8 +456,8 @@ class AmpBrightcove extends AMP.BaseElement {
}
/** @override */
- play(unusedIsAutoplay) {
- this.sendCommand_('play');
+ play(isAutoplay) {
+ this.sendCommand_('play', isAutoplay);
}
/** @override */
| [No CFG could be retrieved] | Encodes a Brightcove - assigned id or a customer - generated id. Replies if the element is on the page or not. | Just for my own understanding: what's the downstream effect of passing `isAutoplay`? |
@@ -35,8 +35,8 @@ class UtilTest(unittest.TestCase):
def test_default_job_name(self):
job_name = apiclient.Job.default_job_name(None)
- regexp = 'beamapp-[a-z]*-[0-9]{10}-[0-9]{6}'
- self.assertTrue(re.match(regexp, job_name))
+ regexp = 'beamapp-.*-[0-9]{10}-[0-9]{6}'
+ self.assertRegexpMatches(job_name, regexp)
if __name__ == '__main__':
| [UtilTest->[test_default_job_name->[assertTrue,default_job_name,match],test_create_application_client->[PipelineOptions,DataflowApplicationClient],skip],main] | Test if default job name is valid. | is it really any character or is it letters+other stuff? Is `&` legal, and `>` ? |
@@ -200,7 +200,7 @@ double& ThermalLinearElastic3DLawNodal::CalculateNodalReferenceTemperature (con
for ( unsigned int j = 0; j < number_of_nodes; j++ )
{
- rNodalReferenceTemperature += ShapeFunctionsValues[j] * DomainGeometry[j].GetSolutionStepValue(NODAL_REFERENCE_TEMPERATURE);
+ rNodalReferenceTemperature += ShapeFunctionsValues[j] * DomainGeometry[j].GetSolutionStepValue(REFERENCE_TEMPERATURE);
}
return rNodalReferenceTemperature;
| [No CFG could be retrieved] | This function calculates the thermal strain of a node and the reference temperature. A function to calculate the thermal strain vector and the thermal strain vector. | we should check somewhere node.HasSoltuionStepValue(REFERENCE_TEMPERATURE) and otherwise avoid this loop |
@@ -411,7 +411,8 @@ class Errors:
if file is not None:
if self.show_column_numbers and line is not None and line >= 0 \
and column is not None and column >= 0:
- srcloc = '{}:{}:{}'.format(file, line, column)
+ col = 1 + column
+ srcloc = '{}:{}:{}'.format(file, line, col)
elif line is not None and line >= 0:
srcloc = '{}:{}'.format(file, line)
else:
| [Errors->[render_messages->[simplify_path],copy->[Errors],report->[import_context,current_module,ErrorInfo,current_target],reset->[initialize],enter_function->[push_function,pop_function],generate_unused_ignore_notes->[import_context,current_module,ErrorInfo,_add_error_info],raise_error->[blocker_module],new_messages->[file_messages],enter_type->[push_type,pop_type],file_messages->[format_messages],add_error_info->[_add_error_info]],report_internal_error->[new_messages]] | Return a string list that represents the error messages. | Any reason why you're not just inlining `column + 1` here? |
@@ -114,10 +114,14 @@ public class LiteralUtils {
}
public static boolean hasValue(Tree tree, String expectedValue) {
- if (!tree.is(Tree.Kind.STRING_LITERAL)) {
+ if (!tree.is(Kind.STRING_LITERAL)) {
return false;
}
- String mechanismName = trimQuotes(((LiteralTree) tree).value());
- return expectedValue.equals(mechanismName);
+ String actualValue = trimQuotes(((LiteralTree) tree).value());
+ return expectedValue.equals(actualValue);
+ }
+
+ public static boolean hasValue(Tree tree, boolean expectedValue) {
+ return tree.is(Kind.BOOLEAN_LITERAL) && expectedValue == (Boolean.parseBoolean(((LiteralTree) tree).value()));
}
}
| [LiteralUtils->[intLiteralValue->[intLiteralValue],hasValue->[trimQuotes]]] | Checks if the given tree has the given value. | I would prefer to name this method "hasBooleanValue". |
@@ -240,7 +240,9 @@ class NginxConfigurator(common.Installer):
matches = self._get_ranked_matches(target_name)
vhost = self._select_best_name_match(matches)
if not vhost:
- if raise_if_no_match:
+ if create_if_no_match:
+ vhost = self._vhost_from_duplicated_default(target_name)
+ else:
# No matches. Raise a misconfiguration error.
raise errors.MisconfigurationError(
("Cannot find a VirtualHost matching domain %s. "
| [NginxConfigurator->[_make_server_ssl->[_get_snakeoil_paths],perform->[restart,perform],_enable_redirect->[_add_redirect_block,_has_certbot_redirect,_has_certbot_redirect_comment,choose_redirect_vhost],cleanup->[revert_challenge_config,restart],choose_redirect_vhost->[_select_best_name_match],_enable_ocsp_stapling->[choose_vhost],_get_redirect_ranked_matches->[_vhost_matches->[_port_matches],_rank_matches_by_name_and_ssl,_vhost_matches]]] | Chooses a virtual host based on the given target name. | It doesn't seem ideal to me to always be creating a new server block here. If we hit this line, the original server block was only listening "plaintextishly". If the user doesn't later ask for a redirect, they have two server blocks that are identical except for the listen statements and our SSL directives. This could (and I think should) be the same block because now any changes they make to one they'll have to remember to copy to the other. While this isn't technically our problem, we're setting things up in a way that allows for easier misconfiguration by the sysadmin which I think we should avoid. Instead, I don't think we should copy the vhost during cert installation and instead create a copy and/or bare bones server block if necessary when the user asks for a redirect, removing any listen statements as necessary. What do you think? |
@@ -121,6 +121,7 @@ namespace Content.Client.CharacterInterface
private void _setOpenValue(SS14Window menu, bool value)
{
_gameHud.CharacterButtonDown = value;
+ menu.SetSize = (545, 400);
if (value)
menu.OpenCentered();
else
| [CharacterInterfaceSystem->[Shutdown->[Shutdown],Initialize->[Initialize]]] | Private method to set the open value of the menu. | This should actually be set wherever the SS14Window is created. The MinSize somewhere. |
@@ -460,10 +460,14 @@ export class AmpA4A extends AMP.BaseElement {
/** @return {?Promise<?{bytes: !ArrayBuffer, headers: !Headers}>} */
.then(fetchResponse => {
checkStillCurrent(promiseId);
- if (!fetchResponse || !fetchResponse.arrayBuffer) {
- return null;
- }
this.protectedEmitLifecycleEvent_('adRequestEnd');
+ // If the response has response code 204, or is null, collapse it.
+ if (!fetchResponse
+ || !fetchResponse.arrayBuffer
+ || fetchResponse.status == 204) {
+ this.forceCollapse();
+ return Promise.reject(NO_CONTENT_RESPONSE);
+ }
// TODO(tdrl): Temporary, while we're verifying whether SafeFrame is
// an acceptable solution to the 'Safari on iOS doesn't fetch
// iframe src from cache' issue. See
| [AmpA4A->[constructor->[AmpAdUIHandler,AmpAdXOriginIframeHandler,dev,platformFor,protectFunctionWrapper,now,SAFEFRAME],renderViaNameAttrOfXOriginIframe_->[NAMEFRAME,utf8Decode,dev,user,getDefaultBootstrapBaseUrl,stringify,assign,SAFEFRAME,reject,length,createElementWithAttributes],verifyCreativeSignature_->[cryptoKey,then,some,resolve,round,keys,user,verifyHashVersion,getMode,serviceName,reject,verifySignature,map],onLayoutMeasure->[size,dev,isAdPositionAllowed,getMode,isEnumValue,headers,creative,CLIENT_CACHE,arrayBuffer,utf8Decode,user,extensionsFor,cancellation,loadExtension,customElementExtensions,resolve,checkStillCurrent,isCryptoAvailable,rethrowAsync,bytes,signature,viewerForDoc],preconnectCallback->[forEach,getDefaultBootstrapBaseUrl],maybeExpandUrlParams_->[getAttribute,pageY,setAttribute,urlReplacementsForDoc,href,dev,pageX,closestByTag,target],renderNonAmpCreative_->[NAMEFRAME,resolve,incrementLoadingAds,user,SAFEFRAME],viewportCallback->[setFriendlyIframeEmbedVisible],handleResize->[user],buildCallback->[AmpAdUIHandler],renderAmpCreative_->[installFriendlyIframeEmbed,customElementExtensions,setFriendlyIframeEmbedVisible,setStyle,round,dev,customStylesheets,iframe,body,protectFunctionWrapper,win,createElementWithAttributes,minifiedCreative,getTimingDataAsync,push,installUrlReplacementsForEmbed],getKeyInfoSets_->[resolve,isArray,keys,dev,xhrFor,user,importPublicKey,endsWith,isCryptoAvailable,getMode,serviceName,isObject],getAmpAdMetadata_->[customElementExtensions,isArray,dev,parse,customStylesheets,lastIndexOf,minifiedCreative,slice,length,isObject],onCrossDomainIframeCreated->[dev],layoutCallback->[user,round,resolve,rethrowAsync],renderOutsideViewport->[is3pThrottled,getAmpAdRenderOutsideViewport],isLayoutSupported->[isLayoutSizeDefined],registerExpandUrlParams_->[document],renderViaCachedContentIframe_->[xhrFor,assign,createElementWithAttributes],registerAlpHandler_->[viewerForDoc,document,handleClick,isExperimentOn],iframeRenderHelper_->[AmpAdXOriginIframeHandler],getSigningServiceNames->[getMode],unlayoutCallback->[removeChildren,platformFor,NOT_LAID_OUT,SAFEFRAME],promiseErrorHandler_->[stringify,stack,cancellation,message],sendXhrRequest_->[xhrFor],BaseElement],apply,unshift] | called when the layout is executed. Returns a non - null non - null non - null non - null non - null non Determines if a response contains a non - AMP response and if so returns it. Checks if a given AMP creative has been verified and if so checks if it has been Check if there is a neccessary meta data in the chain and report it if. | @tdrl should we send a CSI beacon here to help how often we do not execute any render flow due to this? |
@@ -458,7 +458,7 @@ class PostAlerter
def expand_group_mentions(groups, post)
return unless post.user && groups
- Group.mentionable(post.user).where(id: groups.map(&:id)).each do |group|
+ Group.mentionable(post.user, include_public: false).where(id: groups.map(&:id)).each do |group|
next if group.user_count >= SiteSetting.max_users_notified_per_group_mention
yield group, group.users
end
| [PostAlerter->[notify_group_summary->[group_stats],notify_post_users->[create_notification],allowed_users->[not_allowed?],notify_users->[create_notification],allowed_group_users->[not_allowed?],directly_targeted_users->[allowed_group_users,allowed_users],notify_pm_users->[notify_group_summary,create_notification],indirectly_targeted_users->[allowed_group_users],all_allowed_users->[not_allowed?],after_save_post->[only_allowed_users,notify_about_reply?],should_notify_previous?->[should_notify_edit?,should_notify_like?],create_notification->[unread_count,should_notify_previous?,first_unread_post,destroy_notifications]]] | Yields group and users if it is able to find the next group that is able. | That API feels a little weird. I think the UI should instead use something like `Group.visible` and on the backend, we rely on `Group.mentionnable` to generate the notifications. |
@@ -119,6 +119,7 @@ class Job(models.Model):
status = models.CharField(
max_length=50, choices=JobStatus.CHOICES, default=JobStatus.PENDING
)
+ pending_target = models.CharField(max_length=50, choices=PendingTarget.CHOICES)
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
| [SortableModel->[delete->[get_ordering_queryset],save->[get_max_sort_order,get_ordering_queryset]],PublishedQuerySet->[visible_to_user->[user_has_access_to_all,published]]] | Create a model for a job. | If we change something in any of the core functionality, we should do it in separate PR merged to master instead of the feature branch. If anybody wants to use this field, they'll have to wait for your feature branch to be merged. |
@@ -22,10 +22,12 @@ NATS Flags:
--uniq-client-id Generate a unique client-id to connect to server
--infinite-stream Publish message every second intinitely
--internal-nats Connect to the Automate Internal NATS Server
+ --disable-tls Disables TLS when connecting to the server (only applies for event-gateway/external NATS)
NATS Options:
- --auth-token <token> Automate auth token (must have ingest permissions)
- --port <port> NATS port to connect (default:4222)
+ --auth-token <token> Automate auth token (must have ingest permissions)
+ --port <port> NATS port to connect (default:4222)
+ --raw-message <message> Sends a raw message to the NATS Server instead of the Habitat Event message
Options to build a Habitat Event message:
--sup-id <id> The Supervisor ID
| [StringVar,PublishHabService,Now,ServiceStatus,Exit,NewExternalClient,IntVar,Error,Format,New,Connect,HealthStatus,UnixNano,SetFlags,Printf,Println,Sprintf,FormatInt,ConnectAndPublish,Parse,Sleep,BoolVar] | Imports a neccesary object from the neccesary library. Entry point for the nats - hab command. | @danielsdeleo I moved this parameter to the flags section. |
@@ -58,9 +58,9 @@ function render_amp( $attr ) {
$img_after = $attr['imageAfter'];
return sprintf(
- '<amp-image-slider layout="responsive" width="%1$d" height="%2$d"> <amp-img id="%3$d" src="%4$s" alt="%5$s" layout="fill"></amp-img> <amp-img id="%6$d" src="%7$s" alt="%8$s" layout="fill"></amp-img></amp-image-slider>',
- absint( $img_before['width'] ),
- absint( $img_before['height'] ),
+ '<amp-image-slider layout="responsive"%1$s%2$s> <amp-img id="%3$d" src="%4$s" alt="%5$s" layout="fill"></amp-img> <amp-img id="%6$d" src="%7$s" alt="%8$s" layout="fill"></amp-img></amp-image-slider>',
+ ! empty( $img_before['width'] ) ? ' width="' . absint( $img_before['width'] ) . '"' : '',
+ ! empty( $img_before['height'] ) ? ' height="' . absint( $img_before['height'] ) . '"' : '',
absint( $img_before['id'] ),
esc_url( $img_before['url'] ),
esc_attr( $img_before['alt'] ),
| [No CFG could be retrieved] | render_amp - render the amp - image. | This caused a regression: #16093. Note: In AMP if the `width`/`height` are not available, instead of omitting the attributes (since they are required in AMP), the solution is to provide fallback `width` and `height`. See proposed fix in #17253. |
@@ -377,7 +377,7 @@ func storeLimitCommandFunc(cmd *cobra.Command, args []string) {
case 2, 3:
rate, err := strconv.ParseFloat(args[1], 64)
if err != nil || rate < 0 {
- cmd.Println("rate should be a number that >= 0.")
+ cmd.Println("rate should be a number that > 0.")
return
}
// if the storeid is "all", set limits for all stores
| [Printf,Flag,Join,Println,Sprintf,GetBool,Usage,Unmarshal,String,AddCommand,BoolP,Atoi,Flags,ParseFloat] | setStoreWeightCommandFunc sets store weight and limit for a given store showStoresCommandFunc - displays all stores with a specific type. | do we need to change `if rate < 0` to `if rate <= 0`? |
@@ -113,6 +113,14 @@ def test_handle_git(empty_pyproject_toml: PyProjectToml) -> None:
assert_git({"branch": "main"}, "@main")
assert_git({"tag": "v1.1.1"}, "@v1.1.1")
assert_git({"rev": "1a2b3c4d"}, "#1a2b3c4d")
+ assert_git(
+ {
+ "branch": "main",
+ "markers": "platform_python_implementation == 'CPython'",
+ "python": "3.6",
+ },
+ "@main;platform_python_implementation == 'CPython' and python_version == '3.6'",
+ )
def test_handle_path_arg(tmp_path: Path) -> None:
| [test_py_constraints->[assert_py_constraints],empty_pyproject_toml->[create_pyproject_toml],test_relpath_override->[assert_poetry_requirements],test_bad_req_type->[assert_poetry_requirements],test_no_tool_poetry->[assert_poetry_requirements],test_non_pep440_error->[assert_poetry_requirements],test_handle_path_arg->[create_pyproject_toml],test_parse_multi_reqs->[create_pyproject_toml],test_handle_git->[assert_git],test_pyproject_toml->[assert_poetry_requirements],test_bad_dict_format->[assert_poetry_requirements],test_extended_form->[create_pyproject_toml],test_no_req_defined_warning->[assert_poetry_requirements]] | Test that the passed in PyProjectToml is a valid Git repository. missing - file - attr - dir_attr - file_attr - one_pyproject. | This tests markers, which is great. Should it also test extras? |
@@ -55,6 +55,9 @@ public class CustomConfigurationViaBeansTest {
assertThat(hibernateValidatorFactory.getScriptEvaluatorFactory()).isInstanceOf(MyScriptEvaluatorFactory.class);
assertThat(hibernateValidatorFactory.getGetterPropertySelectionStrategy())
.isInstanceOf(MyGetterPropertySelectionStrategy.class);
+ // Waiting for https://hibernate.atlassian.net/browse/HV-1841 to be released
+ //assertThat(hibernateValidatorFactory.getPropertyNodeNameProvider())
+ // .isInstanceOf(MyPropertyNodeNameProvider.class);
}
@ApplicationScoped
| [CustomConfigurationViaBeansTest->[testCustomConfigurationViaBeans->[unwrap,isInstanceOf],MyConstraintValidatorFactory->[getInstance->[newInstance,ValidationException]],create,setArchiveProducer]] | Test custom configuration via beans. | If you want this enabled now, you can use AssertJ's `extracting` method to assert on the field |
@@ -196,6 +196,17 @@ class PostDestroyer
Post.with_deleted.where(id: @post.id).update_all(Hash[*f.flatten])
end
+ def recover_public_post_actions(post_deleted_at)
+ PostAction.publics
+ .where(post_id: @post.id)
+ .with_deleted
+ .where(deleted_at: post_deleted_at..(post_deleted_at + 5.seconds))
+ .find_each do |post_action|
+ post_action.recover!
+ post_action.save
+ end
+ end
+
def agree_with_flags
if @post.has_active_flag? && @user.id > 0 && @user.staff?
Jobs.enqueue(
| [PostDestroyer->[remove_associated_notifications->[delete_all],recover->[topic_id,trigger,deleted_at,update_statistics,find,staff?,log_topic_delete_recover,recover!,is_first_post?,user_id,slice,id],make_previous_post_the_last_one->[highest_post_number,created_at,last_post_user_id,topic,save!,user_id,first,present?,last_posted_at,post_number],initialize->[topic],destroy_stubs->[t,find_each,destroy],user_recovered->[skip_unique_check,transaction,revise,update_flagged_posts_count,modifications,update_column],trash_user_actions->[remove_action!,acting_user_id,target_topic_id,user_id,each,action_type,target_post_id],recover_user_actions->[log_post],destroy->[trigger,topic,staff?,delete_removed_posts_after,is_first_post?,user_id,mark_for_deletion,id],update_user_counts->[topic,update_attributes,first,nil?,save!,count,types,created_at,user,post_type,private_message?,each,post_count,id,try,update_topic_reply_count,first_post_created_at,is_first_post?,user_id,last_posted_at,create_user_stat,topic_count],clear_user_posted_flag->[topic_id,exists?,user_id,update_all,id],update_associated_category_latest_topic->[topic_id,topic,latest_topic_id,update_latest,is_first_post?,latest_post_id,id,category],trash_public_post_actions->[where,flatten,each,update_all,id,trash!,map],remove_associated_replies->[present?,pluck,delete_all,each,update_column,count],mark_for_deletion->[transaction,update_column,revise,each,default_locale,update_flagged_posts_count,with_locale,t,delete_removed_posts_after],destroy_old_hidden_posts->[find_each,destroy],agree_with_flags->[has_active_flag?,name_key,staff?,url,default_locale,t,id,agree_flags!,enqueue],perform_delete->[topic_id,publish_delete,publish_change_to_clients!,transaction,topic,log_topic_delete_recover,log_post_deletion,update_post_action_cache,post_number,reset_highest,update_flagged_posts_count,is_first_post?,trash!,slice,user_id,id],staff_recovered->[publish_change_to_clients!,user,topic,count,save!,update_attributes,publish_recover,recover!,private_message?,is_first_post?,first,each,post_count,topic_count],feature_users_in_the_topic->[topic_id,enqueue]]] | agree_with_flagsagreed_and_post_deleted agree_with. | This is going to generate N+1 queries. Why not do `.update_all(deleted_at: nil, deleted_by_id: nil)` instead of the `.find_each` loop? |
@@ -731,7 +731,7 @@ class Transpiler {
let python3 = []
let php = []
- let methodNames = []
+ let methodNames = [ 'limitOrderBook' ]
// run through all methods
for (let i = 0; i < methods.length; i++) {
| [Transpiler->[transpileJavaScriptToPython3->[replace,exec],createPHPClass->[unCamelCase,concat,replace,join,match,push],transpileCryptoTests->[readFileSync,magenta,yellow,overwriteFile],transpileJavaScriptToPHP->[trim,concat,exec,forEach,push,map],getPHPRegexes->[keys,Array],transpilePrecisionTests->[readFileSync,magenta,yellow,overwriteFile],transpileEverything->[argv,createFolderRecursively,bright],transpileDerivedExchangeFile->[overwriteFile,cyan,replace,readFileSync,yellow,red],exportTypeScriptDeclarations->[replaceInFile,keys],transpileDerivedExchangeFiles->[unlinkSync,basename,lstatSync,match,deleteOldTranspiledFiles,replace,yellow,require,forEach,red,length,readdirSync,includes],createPythonClass->[indexOf,unCamelCase,concat,replace,safeString,join,match,push],transpileDerivedExchangeClass->[split,trim,match,unCamelCase,replace,yellow,exec,join,red,slice,length,push,map],transpileErrorHierarchy->[replaceInFile,from,filename,bright,readFileSync,intellisense,require,values],transpileDateTimeTests->[readFileSync,magenta,yellow,overwriteFile],createPythonClassHeader->[match],regexAll->[replace],transpilePythonAsyncToSync->[magenta,split,writeFileSync,replace,readFileSync,yellow,filter,truncateSync,join,deleteFunction]],exports,require,transpileEverything,main] | transpileDerivedExchangeClass - Transpiles a derived exchange class into a standardized Creates a new object with the contents of a method signature that can be found in the current. | Hey! Wait a minute ) This line does not belong here )) |
@@ -272,7 +272,12 @@ export class GlobalVariableSource extends VariableSource {
// TODO: replace with "filter" when it's in place. #2198
const cookieName = opt_cookieName || scope;
if (cid && cookieName == '_ga') {
- cid = extractClientIdFromGaCookie(cid);
+ if (typeof cid === 'string') {
+ cid = extractClientIdFromGaCookie(cid);
+ } else {
+ // Do not log the CID directly, that's PII.
+ dev().error(TAG, 'non-string cid, what is it?', Object.keys(cid));
+ }
}
clientIds[scope] = cid;
| [GlobalVariableSource->[getVairiantsValue_->[getter,user,variantForOrNull],setTimingResolver_->[getTimingDataAsync,getTimingDataSync],constructor->[accessServiceForDocOrNull],getShareTrackingValue_->[shareTrackingForOrNull,user,getter],getAccessValue_->[getter,user],getQueryParamData_->[user,search,parseQueryString,parseUrl],getDocInfoValue_->[getter,documentInfoForDoc],initialize->[create,userNotificationManagerForDoc,outgoingFragment,language,dev,sourceUrl,getTotalEngagedTime,browserLanguage,join,charset,hostname,getSize,pageViewId,getAccessReaderId,getElementById,videoManagerForDoc,host,characterSet,activityForDoc,viewportForDoc,canonicalUrl,getAuthdataField,extractClientIdFromGaCookie,user,pathname,getHostname,getTrackImpressionPromise,getScrollLeft,getNavigationData,getScrollTop,userLanguage,now,getScrollHeight,userAgent,incomingFragment,push,resolve,getSourceUrl,get,random,removeFragment,cidForDoc,getScrollWidth,getTimingDataSync,parseUrl,viewerForDoc,getTimingDataAsync]],UrlReplacements->[isAllowedOrigin_->[getAttribute,hasAttribute,origin,documentInfoForDoc,sourceUrl,parseUrl,length,canonicalUrl],getWhitelistForElement_->[getAttribute,user,trim,hasOwnProperty],expandInputValue_->[getAttribute,then,resolve,value,dev,tagName],expand_->[then,split,resolve,user,encodeValue,apply,replace,async,rethrowAsync,catch,sync],collectVars->[create],maybeExpandLink->[getAttribute,addParamsToUrl,tagName,dev,user,href,parseQueryString,parseUrl],ensureProtocolMatches_->[user,isProtocolValid,parseUrl]],encodeURIComponent,installServiceInEmbedScope,registerServiceBuilderForDoc,replace] | Initializes the object with the default values. Returns the referrer URL of the AMP document. Returns a random string that will be used for the duration of a single page view. Returns the reserved keyword for the given experiment. | can we add TODO to remove? |
@@ -74,6 +74,7 @@ class OverflowMenu extends Component<Props> {
<RecordButton { ...buttonProps } />
<LiveStreamButton { ...buttonProps } />
<PictureInPictureButton { ...buttonProps } />
+ <TileViewButton { ...buttonProps } />
</BottomSheet>
);
}
| [No CFG could be retrieved] | Renders the menu item with the given name. | Can you please put this as the previous to last? We have kept the PiP button as the last option for a while and IMHO it's nice to have it that way. |
@@ -1230,4 +1230,17 @@ function function_check($function) {
function get_last_commit() {
return `git log -n 1|head -n1`;
-}//end get_last_commit
+}//end get_last_commit
+
+function snmpTransportToAddressFamily($transport) {
+ if (!isset($transport)) {
+ $transport = 'udp';
+ }
+
+ if ($transport == 'udp6' || $transport == 'tcp6') {
+ return AF_INET6;
+ }
+ else {
+ return AF_INET;
+ }
+}
| [send_mail->[send,isSMTP,addAddress,isHTML,setFrom]] | Get last commit. | DocBlock here too please :) Happy to merge it after this :) |
@@ -57,6 +57,7 @@ public class BaseDataPublisher extends DataPublisher {
private static final Logger LOG = LoggerFactory.getLogger(BaseDataPublisher.class);
protected final List<FileSystem> fss = Lists.newArrayList();
+ protected final List<Optional<String>> groups = Lists.newArrayList();
protected final Closer closer;
protected final int numBranches;
protected final int parallelRunnerThreads;
| [BaseDataPublisher->[close->[close],publishData->[publishData]]] | Creates a base data publisher that publishes the data from the writer output directory to the final output Branch - Local FS - FileSystem - FileSystem - Path. | You can use `Lists.newArrayListWithCapacity(this.numBranches)` |
@@ -346,7 +346,7 @@ namespace Microsoft.VisualBasic.ApplicationServices.Tests
}
finally
{
- if (pipeClient != null)
+ if (pipeClient is not null)
{
pipeClient.Dispose();
}
| [SingleInstanceTests->[TryCreatePipeServer->[TryCreatePipeServer],ClientConnectBeforeWaitForClientConnection->[SendSecondInstanceArgs,TryCreatePipeServer,Add,Freeze,GetUniqueName],MultipleClients_Sequential->[SendSecondInstanceArgs,TryCreatePipeServer,Add,Freeze,GetUniqueName],CloseClientAfterClientConnect->[SendSecondInstanceArgs,TryCreatePipeServer,Add,Freeze,GetUniqueName],MultipleClients_Overlapping->[TryCreatePipeServer,GetUniqueName,Add],MultipleServers_Overlapping->[GetUniqueName],InvalidClientData->[Freeze,TryCreatePipeServer,GetUniqueName,Add],ReceivedArgs->[Add->[Add]],CloseServerAfterClientConnect->[Freeze,TryCreatePipeServer,GetUniqueName,Add],ClientConnectionTimeout->[SendSecondInstanceArgs,TryCreatePipeServer,GetUniqueName],MultipleDistinctServers->[TryCreatePipeServer,GetUniqueName,Add],ManyArgs->[SendSecondInstanceArgs,TryCreatePipeServer,GetUniqueName,Add]]] | CloseServerAfterClientConnect - Close server after client connect. | This is C#9 feature, which hasn't been released yet. I don't think this will work prior to VS 16.7. So let's concentrate on `== null` -> `is null` only, until C#9 is shipped. |
@@ -59,10 +59,6 @@ public class TechResults implements Serializable {
return m_remainder;
}
- public PlayerID getPlayer() {
- return m_playerID;
- }
-
public int[] getRolls() {
return m_rolls;
}
| [No CFG could be retrieved] | get the remainder of this group. | This field is now unused. Could you please annotate it with `@SuppressWarnings("unused")` since we can't remove it? |
@@ -1652,8 +1652,18 @@ define([
this._loadTimestamp = JulianDate.clone(frameState.time);
}
+ // Update clipping planes and set them as clean to avoid re-updating the same information from each tile
+ var clippingPlanes = this._clippingPlanes;
+ if (defined(clippingPlanes)) {
+ clippingPlanes._planeTextureDirty = true;
+ clippingPlanes.update(frameState);
+ clippingPlanes._planeTextureDirty = false;
+ }
+
this._timeSinceLoad = Math.max(JulianDate.secondsDifference(frameState.time, this._loadTimestamp) * 1000, 0.0);
+ this._skipLevelOfDetail = this.skipLevelOfDetail && !defined(this._classificationType) && !this._disableSkipLevelOfDetail;
+
// Do not do out-of-core operations (new content requests, cache removal,
// process new tiles) during the pick pass.
var passes = frameState.passes;
| [No CFG could be retrieved] | Private functions - These functions are called by the UI thread and can be called by the UI Load timestamp is the time at which the content was loaded. | Maybe it would be cleaner if `Model` checks if it owns the clipping plane, and if so call `update`. |
@@ -35,12 +35,10 @@ func create(name string, cfg *common.Config) (p plugin.Plugin, err error) {
logp.Info("Synthetic browser monitor detected! Please note synthetic monitors are a beta feature!")
})
- curUser, err := user.Current()
- if err != nil {
- return plugin.Plugin{}, fmt.Errorf("could not determine current user for script monitor %w: ", err)
- }
- if curUser.Uid == "0" {
- return plugin.Plugin{}, fmt.Errorf("script monitors cannot be run as root! Current UID is %s", curUser.Uid)
+ // We do not use user.Current() which does not reflect setuid changes!
+ if syscall.Geteuid() == 0 {
+ euid := syscall.Geteuid()
+ return plugin.Plugin{}, fmt.Errorf("script monitors cannot be run as root! Current EUID is %d", euid)
}
s, err := NewSuite(cfg)
| [plugin,Current,Do,Errorf,Register,Info,Getenv] | This is a helper function that checks if a synthetic browser monitor is available and if so removes. | isn't this basically a dead code as its 0? |
@@ -192,7 +192,7 @@ public class NarThreadContextClassLoader extends URLClassLoader {
public static <T> T createInstance(final ExtensionManager extensionManager, final String implementationClassName, final Class<T> typeDefinition, final NiFiProperties nifiProperties)
throws InstantiationException, IllegalAccessException, ClassNotFoundException {
final ClassLoader originalClassLoader = Thread.currentThread().getContextClassLoader();
- Thread.currentThread().setContextClassLoader(NarThreadContextClassLoader.getInstance());
+ //Thread.currentThread().setContextClassLoader(NarThreadContextClassLoader.getInstance());
try {
final List<Bundle> bundles = extensionManager.getBundles(implementationClassName);
if (bundles.size() == 0) {
| [NarThreadContextClassLoader->[setClassAssertionStatus->[setClassAssertionStatus],setPackageAssertionStatus->[setPackageAssertionStatus],SingletonHolder->[NarThreadContextClassLoader],getResources->[getResources],clearAssertionStatus->[clearAssertionStatus],loadClass->[loadClass],getResourceAsStream->[getResourceAsStream],findNarClass->[findNarClass],createInstance->[getInstance],setDefaultAssertionStatus->[setDefaultAssertionStatus],getResource->[getResource]]] | Creates an instance of the specified type definition using the specified nifi properties. | Is this on purpose? Or a left over from debugging? |
@@ -57,15 +57,8 @@ func NewBackoffConfig() *BackoffConfig {
// Do retries the given function until defaultMaxInterval time passes, while sleeping some time between unsuccessful attempts
// if retryOnError returns true, continue retry, otherwise, return error
func Do(operation func() error, retryOnError func(err error) bool) error {
- bConf := &BackoffConfig{
- InitialInterval: defaultInitialInterval,
- RandomizationFactor: defaultRandomizationFactor,
- Multiplier: defaultMultiplier,
- MaxInterval: defaultMaxInterval,
- MaxElapsedTime: defaultMaxElapsedTime,
- }
-
- return DoWithConfig(operation, retryOnError, bConf)
+ conf := NewBackoffConfig()
+ return DoWithConfig(operation, retryOnError, conf)
}
// DoWithConfig will attempt an operation while retrying using an exponential back off based on the config supplied by the caller. The retry decider is the supplied function retryOnError
| [Reset,Begin,Warnf,End,Errorf,Sleep,NextBackOff] | DoWithConfig creates a new BackoffConfig object that retries the given function until defaultMax Stop the operation. | Thanks for this change :) I should have made that long ago. |
@@ -406,6 +406,7 @@ def fetch_repodata(url, schannel, priority,
cache_dir=None, use_cache=False, session=None):
cache_path = join(cache_dir or create_cache_dir(), cache_fn_url(url))
+ url = unquote_plus(url) if url else url
try:
mtime = getmtime(cache_path)
except (IOError, OSError):
| [read_local_repodata->[read_pickled_repodata,write_pickled_repodata],fetch_repodata->[get_cache_control_max_age,process_repodata,read_local_repodata,read_mod_and_etag,fetch_repodata_remote_request,write_pickled_repodata],fetch_repodata_remote_request->[maybe_decompress,Response304ContentUnchanged],_collect_repodatas_serial->[fetch_repodata],read_pickled_repodata->[_check_pickled_valid],dotlog_on_return] | Fetch repodata from remote or local cache. Get the last n - tuple from the repodata. | I'm guessing this is ok, but not sure why it's needed here. Feels better to move this to later. |
@@ -404,7 +404,7 @@ namespace System.Net.Http
string? value = GetNextValue(challenge, parsedIndex, MustValueBeQuoted(key), out parsedIndex);
// Ensure value is valid.
if (string.IsNullOrEmpty(value)
- && (value == null || !key.Equals(Opaque, StringComparison.OrdinalIgnoreCase)))
+ && (value == null || (!key.Equals(Opaque, StringComparison.OrdinalIgnoreCase) && !key.Equals(Domain, StringComparison.OrdinalIgnoreCase))))
break;
// Add the key-value pair to Parameters.
| [AuthenticationHelper->[DigestResponse->[GetNextValue->[CharIsSpaceOrTab],GetNextKey->[CharIsSpaceOrTab],Parse->[GetNextValue,GetNextKey,MustValueBeQuoted]]]] | Parse method which parses the challenge string into a key - value pair. | Seems like the logic here would be clearer if the null and empty check were separated. I.e.: if (value is null) break; if (string.IsEmpty(value) && ...) break; |
@@ -143,6 +143,13 @@ public interface HoodieTimeline extends Serializable {
*/
Optional<HoodieInstant> lastInstant();
+
+ /**
+ * Get hash of timeline
+ * @return
+ */
+ String getTimelineHash();
+
/**
* @return nth completed instant going back from the last completed instant
*/
| [makeInflightSavePointFileName->[join],getCommitFromCommitFile->[split],getCompactionRequestedInstant->[HoodieInstant],makeCommitFileName->[join],getCompletedInstant->[getTimestamp,getAction,HoodieInstant],makeInflightDeltaFileName->[join],makeRestoreFileName->[join],compareTimestamps->[test],makeRollbackFileName->[join],makeInflightCleanerFileName->[join],makeSavePointFileName->[join],makeInflightCompactionFileName->[join],makeInflightRollbackFileName->[join],makeFileNameAsComplete->[replace],makeRequestedCompactionFileName->[join],makeInflightRestoreFileName->[join],makeFileNameAsInflight->[join],makeInflightCommitFileName->[join],makeCleanerFileName->[join],getInflightInstant->[getTimestamp,getAction,HoodieInstant],getCompactionInflightInstant->[HoodieInstant],compareTo,join] | Get nth Hoodie instant from last instant. | what is the use of this ? dont see this being used anywhere |
@@ -19,6 +19,7 @@ const {verifySelectorsVisible} = require('../../../build-system/tasks/visual-dif
module.exports = {
'click menu item one': async (page, name) => {
+ await page.waitFor('amp-mega-menu .i-amphtml-mega-menu-item:first-child .i-amphtml-mega-menu-heading');
await page.tap('amp-mega-menu .i-amphtml-mega-menu-item:first-child .i-amphtml-mega-menu-heading');
await page.waitFor(400);
await verifySelectorsVisible(page, name, [
| [No CFG could be retrieved] | Requires the AMPHTML Mega License. | Not required for now, but can we reduce the specificity of these? I don't think we need to specify `amp-mega-menu` as a parent if we're checking an internal classname. |
@@ -274,6 +274,8 @@ def sigmoid(x):
>>> a = tf.constant([-20, -1.0, 0.0, 1.0, 20], dtype = tf.float32)
>>> b = tf.keras.activations.sigmoid(a)
+ >>> b.numpy()
+ [2.0611537e-09, 2.6894143e-01, 5.0000000e-01, 7.3105860e-01, 1.0000000e+00]
>>> b.numpy() >= 0.0
array([ True, True, True, True, True])
| [softplus->[softplus],elu->[elu],softsign->[softsign],softmax->[softmax],tanh->[tanh],get->[deserialize],hard_sigmoid->[hard_sigmoid],relu->[relu],swish->[swish],sigmoid->[sigmoid],selu->[selu]] | Sigmoid activation function. | No need for the `.numpy()` line, also, let's remove the `>= 0.0` part of the docstring while we're here |
@@ -302,6 +302,14 @@ export class AmpStoryPage extends AMP.BaseElement {
/** @private @const {!../../../src/service/timer-impl.Timer} */
this.timer_ = Services.timerFor(this.win);
+ const audioDeferred = new Deferred();
+
+ /** @private @const {!Promise} */
+ this.backgroundAudioUpgradePromise_ = audioDeferred.promise;
+
+ /** @private @const {!function()} */
+ this.backgroundAudioUpgradeResolveFn_ = audioDeferred.resolve;
+
/**
* Whether the user agent matches a bot. This is used to prevent resource
* optimizations that make the document less useful at crawl time, e.g.
| [AmpStoryPage->[setState->[NOT_ACTIVE,BOOKEND_STATE,dev,PAUSED,PLAYING],isAutoplaySupported_->[resetIsAutoplaySupported,getMode,isAutoplaySupported],constructor->[resolve,timerFor,getAmpdoc,NOT_ACTIVE,getStoreService,mutatorForDoc,platformFor,promise,getMediaPerformanceMetricsService,debounce,reject],emitProgress_->[dict,PAGE_PROGRESS,NOT_ACTIVE,dispatch],setPageDescription_->[renderPageDescription,ALL_AMP_VIDEO],getPreviousPageId->[id,lastIndexOf,NAVIGATION_PATH,tagName],renderOpenAttachmentUI_->[getAttribute,trim,getLocalizationService,textContent,buildOpenAttachmentElement,AMP_STORY_PAGE_ATTACHMENT_OPEN_LABEL],firstAttachedCallback->[matches],onLayoutMeasure->[DESKTOP_PANELS,round,height,vmin,vmax,vw,max,min,vh,SET_PAGE_SIZE,fiftyVw,createElement,px,head,UI_STATE,width],rewindAllMedia_->[rewindToBeginning,resolve,currentTime],playMedia_->[play,resolve,now,tagName],registerMedia_->[register,resolve],checkPageHasElementWithPlayback_->[TOGGLE_PAGE_HAS_ELEMENT_WITH_PLAYBACK],onUIStateUpdate_->[VERTICAL],buildAndAppendPlayMessage_->[getLocalizationService,AMP_STORY_PAGE_PLAY_VIDEO,blessAll,textContent,buildPlayMessageElement],addClickShieldToEmbeddedComponents_->[toArray,scopedQuerySelectorAll,classList,forEach,length],maybeFinishAnimations_->[LOAD_END],maybeApplyFirstAnimationFrame->[resolve],setDistance->[then,min],hasVideoWithAudio_->[prototype,hasAttribute],initializeImgAltTags_->[getAttribute,setAttribute,propagateAttributes,toArray,querySelector,getImpl],buildCallback->[UI_STATE,forElement],waitForMediaLayout_->[addEventListener,resolve,all,toArray,tagName,whenUpgradedToCustomElement,ALL_AMP_MEDIA,signals,LOAD_END,readyState,map],startMeasuringAllVideoPerformance_->[length],maybeCreateAnimationManager_->[create,hasAnimations],layoutCallback->[all,dev,upgradeBackgroundAudio,debounce,preload],switchTo_->[dict,SWITCH_PAGE,dispatch],buildAndAppendErrorMessage_->[getLocalizationService,buildErrorMessageElement,AMP_STORY_PAGE_ERROR_VIDEO,textContent],getMediaBySelector_->[ALL_IFRAMED_MEDIA,scopedQuerySelectorAll,iterateCursor,getFriendlyIframeEmbedOptional,push,win],resizeInteractiveEmbeddedComponents_->[debounceEmbedResize,hasAttribute,listen,toArray,SIZE_CHANGED,scopedQuerySelectorAll,debouncePrepareForAnimation],getAdjacentPageIds->[push,isExperimentOn],waitForPlaybackMediaLayout_->[getAttribute,resolve,BUILT,all,toArray,tagName,ALL_PLAYBACK_AMP_MEDIA,whenUpgradedToCustomElement,LOAD_END,signals,NODISPLAY,map],isLayoutSupported->[CONTAINER],pause_->[DESKTOP_PANELS,then,pause,MUTED_STATE,rewind,UI_STATE],markPageAsLoaded_->[PAGE_LOADED,dispatch],openAttachment->[open,getImpl],delegateVideoAutoplay->[iterateCursor],toggleErrorMessage_->[dev,toggle],story360components_->[toArray,scopedQuerySelectorAll,whenUpgradedToCustomElement,getImpl,ALL_STORY_360],buildAffiliateLinks_->[build,scopedQuerySelectorAll,toArray],checkPageHasAudio_->[TOGGLE_PAGE_HAS_AUDIO],getDistance->[parseInt],setDescendantCssTextStyles_->[setTextBackgroundColor],getAllMedia_->[ALL_PLAYBACK_MEDIA],muteMedia_->[setAttribute,resolve,mute,muted],unmuteMedia_->[play,hasAttribute,resolve,all,paused,muted,removeAttribute,tagName,duration,setCurrentTime,now,unmute,push],next->[NEXT,TOGGLE_PAUSED,dispatch,NO_NEXT_PAGE],whenAllMediaElements_->[all,toArray,dev,callbackFn,map],maybeSetPreviewDuration_->[dict,length,PREVIEW_STATE,addAttributesToElement],stopListeningToVideoEvents_->[unlisten],togglePlayMessage_->[dev,toggle],preloadMedia_->[resolve,preload],previous->[TOGGLE_PAUSED,NO_PREVIOUS_PAGE,PREVIOUS,dispatch],getAllVideos_->[ALL_VIDEO],markMediaElementsWithPreload_->[setAttribute,prototype],initializeMediaPool_->[dev,closestAncestorElementBySelector,getImpl,for],actions_->[getAttribute,split,search,indexOf,reduce,prototype,forEach,slice,push,map],pauseMedia_->[pause,resolve],getNextPageId->[tagName,id,isExperimentOn],reportDevModeErrors_->[getMode,getLogEntries,dispatch,DEV_LOG_ENTRIES_AVAILABLE],startListeningToVideoEvents_->[some,listen,prototype,currentTime,length],resume_->[then,canAnimate,play,MUTED_STATE,LOAD_END,PLAYING],BaseElement],keys,dev,htmlFor,expandableElementsSelectors,prepareForAnimation,debounce,values,unlisten] | private private static final int MAX_LENGTH = 100 ; Private methods for handling missing resource node. | Nit: we could only have one property that's the deferred and then call .promise/.resolve()? |
@@ -79,6 +79,12 @@ def is_builtin_len(func):
return False
+def is_builtin_zip(func):
+ if is_builtin(func) and func.__name__ == 'zip':
+ return True
+ return False
+
+
def is_unsupported(func):
"""
Checks whether the func is supported by dygraph to static graph.
| [convert_call->[is_builtin,is_builtin_len,is_unsupported]] | Checks whether the function is unsupported by dygraph to static graph. | `return is_builtin(func) and func.__name__ == 'zip'` |
@@ -420,6 +420,9 @@ public class NexmarkConfiguration implements Serializable {
if (sinkType != DEFAULT.sinkType) {
sb.append(String.format("; sinkType:%s", sinkType));
}
+ if (exportSummaryToBigQuery != DEFAULT.exportSummaryToBigQuery) {
+ sb.append(String.format("; exportSummaryToBigQuery:%s", exportSummaryToBigQuery));
+ }
if (pubSubMode != DEFAULT.pubSubMode) {
sb.append(String.format("; pubSubMode:%s", pubSubMode));
}
| [NexmarkConfiguration->[copy->[NexmarkConfiguration],NexmarkConfiguration]] | This method returns a String representation of the object with all properties set to their default values. Method to append the String representation of a configuration object to the String builder. region Public API Methods. | Why are we comparing with default values ? |
@@ -12,6 +12,7 @@ class PyPythonDateutil(PythonPackage):
homepage = "https://dateutil.readthedocs.io/"
pypi = "python-dateutil/python-dateutil-2.8.0.tar.gz"
+ version('2.8.2', sha256='0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86')
version('2.8.1', sha256='73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c')
version('2.8.0', sha256='c89805f6f4d64db21ed966fda138f8a5ed7a4fdbc1a8ee329ce1b74e3c74da9e')
version('2.7.5', sha256='88f9287c0174266bb0d8cedd395cfba9c58e87e5ad86b2ce58859bc11be3cf02')
| [PyPythonDateutil->[depends_on,version]] | Create a new object of type tuple with the name of the object and the version of the requires all build - related packages. | It looks like Python 3.3 is actually supported, can you update the `python` dep? |
@@ -74,8 +74,8 @@ public class JoinNode extends PlanNode {
@JsonProperty("type") final JoinType joinType,
@JsonProperty("left") final PlanNode left,
@JsonProperty("right") final PlanNode right,
- @JsonProperty("leftKeyFieldName") final String leftKeyFieldName,
- @JsonProperty("rightKeyFieldName") final String rightKeyFieldName,
+ @JsonProperty("leftJoinFieldName") final String leftJoinFieldName,
+ @JsonProperty("rightJoinFieldName") final String rightJoinFieldName,
@JsonProperty("leftAlias") final String leftAlias,
@JsonProperty("rightAlias") final String rightAlias,
@JsonProperty("within") final WithinExpression withinExpression,
| [JoinNode->[StreamToTableJoiner->[join->[getRight,getKeyField,getSerDeForNode,getLeftKeyFieldName,getJoinedKeyField,join,getRightAlias,buildStream,getRightKeyFieldName,buildTable,getLeft]],TableToTableJoiner->[join->[getRight,getOuterJoinedKeyField,getKeyField,getLeftKeyFieldName,getJoinedKeyField,join,getRightAlias,getLeftAlias,getRightKeyFieldName,buildTable,getLeft]],ensureMatchingPartitionCounts->[getPartitions],StreamToStreamJoiner->[join->[getRight,getOuterJoinedKeyField,getKeyField,getSerDeForNode,getLeftKeyFieldName,join,buildStream,getRightKeyFieldName,getJoinedKeyField,getLeft]],getPartitions->[getPartitions],Joiner->[buildTable->[getSchema,buildStream],getSerDeForNode->[getSchema],maybeRePartitionByKey->[getSchema],buildStream->[buildStream]]]] | Creates a new JoinNode object. Sets the leftKeyField and rightKeyField of the tuple. | I don't think we should change the names here - wouldn't that be backwards incompatible? (same for getters/setters) |
@@ -214,8 +214,9 @@ class EntityGenerator extends BaseBlueprintGenerator {
context.clientRootFolder = context.microserviceName;
}
}
+ // TODO 7.0 context.filename = this.destinationPath(context.filename);
context.filename = `${context.jhipsterConfigDirectory}/${context.entityNameCapitalized}.json`;
- if (shelljs.test('-f', context.filename)) {
+ if (this.fs.exists(context.filename)) {
this.log(chalk.green(`\nFound the ${context.filename} configuration file, entity can be automatically generated!\n`));
context.useConfigurationFile = true;
}
| [No CFG could be retrieved] | Creates a context object for the given entity name. Entity generator methods. | Why not setDestinationPath ? |
@@ -646,11 +646,10 @@ func (sc *SigChain) verifySigsAndComputeKeysCurrent(ctx context.Context, eldest
return cached, 0, err
}
- if sc.allKeys || sc.loadedFromLinkOne {
- if first := sc.getFirstSeqno(); first > keybase1.Seqno(1) {
- err = ChainLinkWrongSeqnoError{fmt.Sprintf("Wanted a chain from seqno=1, but got seqno=%d", first)}
- return cached, 0, err
- }
+ // AllKeys mode is now the default.
+ if first := sc.getFirstSeqno(); first > keybase1.Seqno(1) {
+ err = ChainLinkWrongSeqnoError{fmt.Sprintf("Wanted a chain from seqno=1, but got seqno=%d", first)}
+ return cached, 0, err
}
// There are 3 cases that we have to think about here for recording the
| [GetMerkleTriple->[GetMerkleTriple],Dump->[GetLastKnownID,GetLastKnownSeqno],LoadFromServer->[selfUID,GetMerkleTriple,LoadFromServer,Len],verifySigsAndComputeKeysHistorical->[omittingNRightmostLinks,verifySubchain],merkleTreeEldestMatchesLastLinkEldest->[GetLastLink],GetLastKnownID->[GetLastLoadedID],GetKeyFamily->[GetKeyFamily],Store->[StoreTail,Store],VerifySigsAndComputeKeys->[omittingNRightmostLinks,verifySigsAndComputeKeysCurrent,VerifySigsAndComputeKeys],Load->[LoadFromServer,merkleTreeEldestMatchesLastLinkEldest,GetKeyFamily,VerifyChain,Store,VerifySigsAndComputeKeys,MakeSigChain,AccessPreload,CheckFreshness,LoadLinksFromStorage,GetComputedKeyInfos],CheckFreshness->[CheckFreshness,GetCurrentTailTriple,GetMerkleTriple,GetFutureChainTail],StoreTail->[dbKey],LoadLinksFromStorage->[LoadLastLinkIDFromStorage],verifySigsAndComputeKeysCurrent->[getFirstSeqno,VerifyChain,verifySubchain]] | Verify the current chain and compute the keys for the current user. crops the chain to the rightmost subchain and verifies that the user is a self. | will this fail for previously cached users? |
@@ -204,7 +204,7 @@ class _BoundedMongoSource(iobase.BoundedSource):
res['collection'] = self.coll
res['filter'] = self.filter
res['project'] = self.projection
- res['mongo_client_spec'] = self.spec
+ res['mongo_client_spec'] = json.dumps(self.spec)
return res
def _get_split_keys(self, desired_chunk_size_in_mb, start_pos, end_pos):
| [_BoundedMongoSource->[_replace_none_positions->[_get_head_document_id]],_ObjectIdHelper->[increment_id->[id_to_int,int_to_id]],_ObjectIdRangeTracker->[position_to_fraction->[id_to_int],fraction_to_position->[increment_id,id_to_int,int_to_id]]] | Return a dictionary with the data for the . | Do you need to convert the projection as well? |
@@ -38,7 +38,7 @@ class WorkerInfo:
@dataclass
class DistributedInfo:
"""
- Contains information about the node rank and world size when the reader is being
+ Contains information about the process rank and world size when the reader is being
used within distributed training.
From a `DatasetReader` this can be accessed with the [`get_distributed_info()`](#get_distributed_info) method.
| [DatasetReader->[_multi_worker_islice->[islice,iter,warn],read->[apply_token_indexers,_multi_worker_islice,str,isinstance,_read],shard_iterable->[get_world_size,get_rank,islice,is_distributed,ValueError,iter],__init__->[get_world_size,get_rank,is_distributed,DistributedInfo,ValueError]],getLogger,TypeVar] | A function to return a sequence of objects representing a single non - empty non - empty non This method is used to provide a way to read a single N - th instance of a. | You call it "process rank" here, but `global_rank` in the code. Would `process_rank` be better? |
@@ -460,11 +460,9 @@ class InstallRequirement(object):
# FIXME: This is a lame hack, entirely for PasteScript which has
# a self-provided entry point that causes this awkwardness
_run_setup_py = """
-__file__ = __SETUP_PY__
from setuptools.command import egg_info
import pkg_resources
import os
-import tokenize
def replacement_run(self):
self.mkpath(self.egg_info)
installer = self.distribution.fetch_build_egg
| [parse_editable->[_build_req_from_url,_strip_postfix,_build_editable_options],InstallRequirement->[from_path->[from_path],from_line->[_strip_extras],get_dist->[egg_info_path],install->[prepend_root],_correct_build_location->[build_location],move_wheel_files->[move_wheel_files],run_egg_info->[_correct_build_location],archive->[pkg_info],pkg_info->[egg_info_data,egg_info_path],assert_source_matches_version->[pkg_info],ensure_has_source_dir->[build_location]]] | This is the main entry point for the egg_info command. It is called by the Provides access to the data and metadata of the given node. | I think this "lame hack" present since c2000d7de68ef (7 years now) could now be removed ? |
@@ -1209,14 +1209,6 @@ zfsvfs_setup(zfsvfs_t *zfsvfs, boolean_t mounting)
int error;
boolean_t readonly = zfs_is_readonly(zfsvfs);
- /*
- * Check for a bad on-disk format version now since we
- * lied about owning the dataset readonly before.
- */
- if (!readonly &&
- dmu_objset_incompatible_encryption_version(zfsvfs->z_os))
- return (SET_ERROR(EROFS));
-
error = zfs_register_callbacks(zfsvfs->z_vfs);
if (error)
return (error);
| [No CFG could be retrieved] | Initialize a zfsvfs object. ZFS VFS functions. | To be clear, this check is no longer needed since it's now handled properly in `dmu_objset_own_impl()` since we're now tell the truth about the dataset being r/w. |
@@ -11,6 +11,10 @@ import site
from scripttest import TestFileEnvironment, FoundDir
from tests.path import Path, curdir, u
from pip.util import rmtree
+from pip.backwardcompat import ssl
+
+#allow py25 unit tests to work
+os.environ['PIP_ALLOW_NO_SSL'] = '1'
pyversion = sys.version[:3]
| [FastTestPipEnvironment->[__init__->[_create_empty_sitecustomize,_add_to_sitecustomize,_use_cached_pypi_server,demand_dirs,run,__init__,relpath,install_setuptools,create_virtualenv,clear_environ]],mkdir->[mkdir],TestPipEnvironment->[run->[TestPipResult],__init__->[demand_dirs,relpath,install_setuptools,create_virtualenv,clear_environ]],_change_test_package_version->[run,write_file],TestPipResult->[assert_installed->[TestFailure]],get_env->[reset_env],run_pip->[run],assert_all_changes->[TestFailure,diff_states],diff_states->[prefix_match,any],_create_test_package->[mkdir,write_file,run]] | Creates a base directory containing all the tests and returns the path to the file containing the test returns Path object with path of other. | Should all tests skip ssl by default? I see there is the condition to include that if no ssl module found at `run_pip`, it should not be here (at top), right? |
@@ -167,7 +167,10 @@ namespace ProtoCore.Lang
{
new KeyValuePair<string, ProtoCore.Type>("array", TypeSystem.BuildPrimitiveTypeObject(PrimitiveType.kTypeVar, Constants.kArbitraryRank))
},
- ID = BuiltInMethods.MethodID.kCount
+ ID = BuiltInMethods.MethodID.kCount,
+ MethodAttributes = new MethodAttributes(){Description = Resources.ReturnsNumberOfItems}
+
+
},
new BuiltInMethod
| [BuiltInMethods->[kNormalizeDepth,kContainsKey,kRangeExpression,kSort,kAverage,kIndexOf,kRemove,kSortPointer,ToList,kRemoveKey,kIntersection,kSleep,kTranspose,kSum,kToStringFromArray,kNormalizeDepthWithRank,kUnion,kDifference,kTypeVoid,kBreak,kCount,kReverse,kIsUniformDepth,kLoadCSVWithMode,kTypeString,kSortIndexByValue,kMapTo,kImportData,kToStringFromObject,kGetKeys,kPrint,Assert,kDot,kTypeArray,kCountFalse,kRemoveIfNot,kGetElapsedTime,kCountTrue,kSomeNulls,kConcat,kIsHomogeneous,kSomeFalse,kMap,kPrintIndexable,kNodeAstFailed,kTryGetValueFromNestedDictionaries,kTypeFunctionPointer,kRemoveDuplicates,kEquals,kContains,kAllTrue,kGetTypeMethodName,kLoadCSV,kInlineConditionalMethodName,kGetValues,kFlatten,kTypeVar,kArbitraryRank,kAllFalse,kIsRectangular,kToString,kEvaluate,kRank,kTypeBool,BuildPrimitiveTypeObject,kRemoveNulls,kTypeDouble,kSortIndexByValueWithMode,kReorder,kGetType,kSortWithMode,kInsert,kFunctionRangeExpression,kTypeInt,kSomeTrue,kInlineConditional]] | Construct a list of BuiltInMethods from a given MethodID. This method is used to create a new BuiltInMethod for the given object. | Rename the parameter name "array" to "list" at all the places. |
@@ -45,7 +45,14 @@ public class FeedInboundChannelAdapterParser extends AbstractPollingInboundChann
sourceBuilder.addConstructorArgReference(feedFetcherRef);
}
IntegrationNamespaceUtils.setReferenceIfAttributeDefined(sourceBuilder, element, "metadata-store");
- return sourceBuilder.getBeanDefinition();
+
+ final String channelAdapterId = this.resolveId(element, sourceBuilder.getRawBeanDefinition(), parserContext);
+ final String sourceBeanName = channelAdapterId + ".source";
+
+ parserContext.getRegistry().registerBeanDefinition(sourceBeanName, sourceBuilder.getBeanDefinition());
+
+ return new RuntimeBeanReference(sourceBeanName);
+
}
}
| [FeedInboundChannelAdapterParser->[parseSource->[getAttribute,hasText,getBeanDefinition,genericBeanDefinition,addConstructorArgReference,addConstructorArgValue,setReferenceIfAttributeDefined]]] | Parse the source. | Looks like should be a **common** case for all `MessageSource`s with all `inbound-channel-adapter`s. |
@@ -327,6 +327,9 @@ class PantsRunIntegrationTest(unittest.TestCase):
ini.write(fp)
args.append('--pants-config-files=' + ini_file_name)
+ if not Path(get_buildroot()).samefile(Path(".")):
+ shutil.copy(str(Path(get_buildroot(), "pyproject.toml")), str(Path(".")))
+
pants_script = [sys.executable, '-m', 'pants']
# Permit usage of shell=True and string-based commands to allow e.g. `./pants | head`.
| [PantsJoinHandle->[join->[PantsResult]],PantsRunIntegrationTest->[temporary_workdir->[join],assert_result->[indent->[join],join,indent],do_command_yielding_workdir->[assert_success,pants_results,assert_failure],source_clone->[temporary_sourcedir,join],run_pants_with_workdir->[join,run_pants_with_workdir_without_waiting],bundle_and_run->[join,pants_results],mock_buildroot->[write_file->[join],temporary_workdir,join,Manager],run_pants->[run_pants_with_workdir,temporary_workdir],file_renamed->[join],pants_results->[run_pants_with_workdir,temporary_workdir],do_command->[assert_success,run_pants,assert_failure],get_cache_subdir->[join],run_pants_with_workdir_without_waiting->[join,use_pantsd_env_var,hermetic,PantsJoinHandle,hermetic_env_whitelist,_get_profile_disambiguator],normalize->[join]],render_logs->[join]] | Run a command in a given workdir without waiting. Returns a PantsJoinHandle object with a pants_join_handle object. | Hm this is surprising and concerning to me. Are you sure it's necessary? We don't have to do this for any other tooling config files, and the change you made means that the pants.pex will already have the config in its chrooted folder. |
@@ -4,15 +4,9 @@
using System;
using System.Threading.Tasks;
-public class Test
-{
- public static async Task<int> Main(string[] args)
- {
await Task.Delay(1);
Console.WriteLine("Hello World!");
for (int i = 0; i < args.Length; i++) {
Console.WriteLine($"args[{i}] = {args[i]}");
}
- return args.Length;
- }
-}
\ No newline at end of file
+ return args.Length;
\ No newline at end of file
| [Test->[Main->[Length,Delay,WriteLine]]] | This method is a utility method that prints out the number of arguments passed to the command. | Was it intended to switch this to a top level program? If so, we should get rid of the indentation. |
@@ -1061,7 +1061,7 @@ func TestTeamSignedByRevokedDevice(t *testing.T) {
t.Logf("bob should see alice's key is revoked")
{
- _, _, pubKey, err := bob.tc.G.GetUPAKLoader().LoadKeyV2(context.TODO(), alice.uid, revokedKID)
+ _, _, pubKey, err := bob.tc.G.GetUPAKLoader().LoadKey(context.TODO(), alice.uid, revokedKID, true)
require.NoError(t, err)
t.Logf("%v", spew.Sdump(pubKey))
require.NotNil(t, pubKey.Base.Revocation, "key should be revoked: %v", revokedKID)
| [createTeam2->[createTeam],paperKeyID->[devices],reset->[userVersion],addPuklessUser,cleanup,addUser,loginAfterReset,removeTeamMember,reset,provisionNewDevice,loadTeamByID,leave,track,logUserNames,changeTeamMember,createTeam,delayMerkleTeam,addTeamMember,newSecretUI,lookupImplicitTeam,proveRooter,addUserWithPaper,createTeam2,teamList,waitForTeamChangeRenamed,userVersion] | revokeAttemptsMax is the number of times to attempt to revoke a device. TestTeamSignedByRevokedDevice2 tests if a team signed by a device is a. | Does this mean this test now goes down the UPAKLite path, so therefore, this isn't really testing what we do in production? |
@@ -751,7 +751,8 @@ int ModApiEnvMod::l_set_timeofday(lua_State *L)
// Do it
float timeofday_f = readParam<float>(L, 1);
- sanity_check(timeofday_f >= 0.0 && timeofday_f <= 1.0);
+ luaL_argcheck(L, timeofday_f >= 0.0 && timeofday_f <= 1.0, 1,
+ "value must be between 0 and 1");
int timeofday_mh = (int)(timeofday_f * 24000.0);
// This should be set directly in the environment but currently
// such changes aren't immediately sent to the clients, so call
| [No CFG could be retrieved] | Get a specific object reference by name. - - - - - - - - - - - - - - - - - -. | Although many areas of code do not do this yet, float literals should be stated with an 'f'. So: 0.0f 1.0f |
@@ -343,6 +343,7 @@ WasmBinaryReader::ASTNode()
BlockNode();
break;
case wbCall:
+ case wbCallImport:
CallNode();
break;
case wbBr:
| [No CFG could be retrieved] | region Private functions Catches any node of type coffeescript. | I added this as tmp measure, but will need some convergence with import table change |
@@ -102,7 +102,7 @@ type decodeResponse struct {
func NewChunkFetcher(cacher cache.Cache, cacheStubs bool, storage Client) (*Fetcher, error) {
c := &Fetcher{
storage: storage,
- cache: cacher,
+ cache: cache.NewSnappy(cacher),
cacheStubs: cacheStubs,
decodeRequests: make(chan decodeRequest),
}
| [Stop->[Wait,Stop],worker->[Inc,Decode,Done],writeBackCache->[Encoded,Store,ExternalKey],processCacheResponse->[Warn,Finish,New,Log,ExternalKey,Debug],FetchChunks->[GetChunks,Finish,Warn,New,writeBackCache,processCacheResponse,Log,Fetch],Strings,Add,worker,Matches,Get,ExternalKey] | filterChunksByMatchers filters a list of chunks by a list of matchers. FetchChunks fetches a set of chunks from cache and store. | This likely doesn't require compression. |
@@ -69,7 +69,7 @@ class Petsc(Package):
depends_on('mpi', when='+mpi')
# Build dependencies
- depends_on('python @2.6:2.7')
+ depends_on('python @2.6.0:2.999')
# Other dependencies
depends_on('boost', when='+boost')
| [Petsc->[install->[join_path,append,working_dir,Executable,mpi_dependent_options,extend,format,run,configure,make,cc],mpi_dependent_options->[join,format,RuntimeError],setup_dependent_environment->[set],variant,depends_on,version]] | Create a basic configuration that can be used to build a single residue. Add options that depend on the mpi. | ~~i think one needs to check that you can compile PETSc with `python@2.8`. In Spack there is only `2.7.12`, and then `@3.:`.~~ scratch that, was not aware which versions are out. Anyway, doing `@2.6` and `@2.6.0` should be equivalent. Did you have any issues with the former? |
@@ -37,14 +37,14 @@
if (is_null($uid)) {
$uid = get_theme_uid();
}
- $schema = get_pconfig($uid, 'frio', 'schema');
+ $schema = Friendica\Core\PConfig::get($uid, 'frio', 'schema');
if (($schema) && ($schema != '---')) {
if (file_exists('view/theme/frio/schema/'.$schema.'.php')) {
$schemefile = 'view/theme/frio/schema/'.$schema.'.php';
require_once($schemefile);
}
} else {
- $nav_bg = get_pconfig($uid, 'frio', 'nav_bg');
+ $nav_bg = Friendica\Core\PConfig::get($uid, 'frio', 'nav_bg');
}
if (!$nav_bg) {
$nav_bg = "#708fa0";
| [No CFG could be retrieved] | Generate the meta tag that can be used to display a theme color. Generate the header of the nagios. | What was your motivation not to use `use` at the to of this file? |
@@ -134,8 +134,9 @@ public class FlowStatusGeneratorTest {
Arrays.asList(f0jsmDep2)));
}
- private FlowStatus createFlowStatus(String flowGroup, String flowName, long flowExecutionId, List<JobStatus> jobStatuses) {
- return new FlowStatus(flowName, flowGroup, flowExecutionId, jobStatuses.iterator());
+ private FlowStatus createFlowStatus(String flowGroup, String flowName, long flowExecutionId, List<JobStatus> jobStatuses, JobStatusRetriever jobStatusRetriever) {
+ return new FlowStatus(flowName, flowGroup, flowExecutionId, jobStatuses.iterator(),
+ jobStatusRetriever.getFlowStatusFromJobStatuses(jobStatusRetriever.dagManagerEnabled, jobStatuses.iterator()));
}
private JobStatus createFlowJobStatus(String flowGroup, String flowName, long flowExecutionId, ExecutionStatus status) {
| [FlowStatusGeneratorTest->[testGetFlowStatusesAcrossGroup->[createFlowJobStatus,withDependentJobStatuses,createJobStatus,size,thenReturn,getFlowStatusesAcrossGroup,mock,assertThat,get,ofTagged,FlowStatusGenerator,createFlowStatus,asList,assertEquals,name],createFlowJobStatus->[name,createJobStatus],createJobStatus->[build],createFlowStatus->[iterator,FlowStatus],testIsFlowRunning->[assertTrue,newArrayList,thenReturn,build,mock,FlowStatusGenerator,iterator,assertFalse,isFlowRunning]]] | This test creates a JobStatus for all flows in a group. This method returns a sequence of all jobs in the group. private for F0JSM. | probably better to call through the class, `JobStatusRetriever.getFlowStatusFromJobStatuses`, and drop the final param |
@@ -5,7 +5,6 @@
namespace Friendica\Protocol;
require_once 'include/html2plain.php';
-require_once 'include/msgclean.php';
require_once 'include/quoteconvert.php';
/**
| [No CFG could be retrieved] | Creates an email object from a mailbox and a username and password. Construct a mailbox name from a mailbox and user id. | Didn't you remove the quotconvert.php file? |
@@ -49,6 +49,10 @@ function prBuildWorkflow() {
timedExecOrDie('amp validator');
}
+ if (buildTargetsInclude(Targets.VALIDATOR)) {
+ timedExecOrDie('amp validator-cpp');
+ }
+
if (buildTargetsInclude(Targets.VALIDATOR_WEBUI)) {
timedExecOrDie('amp validator-webui');
}
| [No CFG could be retrieved] | This is the entry point for the AMP job that runs if the build targets are not. | The cpp tests now only runs when the PR changes validator files |
@@ -119,6 +119,7 @@ func TestDeleteLabel(t *testing.T) {
}
func TestUpdateIssueLabel_Clear(t *testing.T) {
+ setting.Service.EnableIssues = true
models.PrepareTestEnv(t)
ctx := test.MockContext(t, "user2/repo1/issues/labels")
test.LoadUser(t, ctx, 2)
| [Status,False,Set,Itoa,AssertExistsAndLoadBean,AssertNotExistsBean,LoadUser,Len,RedirectURL,Tr,EqualValues,Equal,Written,PrepareTestEnv,CheckConsistencyFor,MockContext,AssertExistsIf,LoadRepo,True] | TestLoadUser - test loading of labels TestUpdateIssueLabel_Toggle tests if an issue label is not found in the issue label. | Since default value is true, this is unnecessary. |
@@ -625,9 +625,8 @@ class QuantizationFreezePass(object):
self._activation_bits = activation_bits
self._weight_quantize_type = weight_quantize_type
self._quantizable_ops = quantizable_op_type
- supported_quantizable_ops = ['conv2d', 'depthwise_conv2d', 'mul']
for op in self._quantizable_ops:
- assert op in supported_quantizable_ops, \
+ assert op in QuantizationTransformPass.supported_quantizable_op_type, \
op + " is not supported for quantization."
self._conv_ops = ['conv2d', 'depthwise_conv2d']
self._fake_quant_op_names = _fake_quant_op_list
| [ScaleForTrainingPass->[apply->[_init_var_node]],AddQuantDequantPass->[_inser_quant_dequant_moving_average_abs_max_op->[_init_var_node]],ConvertToInt8Pass->[apply->[_remove_unused_var_nodes],_convert_to_int8->[_load_var]],QuantizationTransformPass->[_insert_quant_range_abs_max_op->[_init_var_node],apply->[_transform_backward,_quant_preprocess,_transform_forward],_create_global_step->[_init_var_node],_insert_quant_moving_average_abs_max_op->[_init_var_node]],ScaleForInferencePass->[apply->[_scale_name]],QuantizationFreezePass->[_insert_post_channel_dequant_op->[_dequantized_var_name,_init_var_node],_insert_post_dequant_op->[_dequantized_var_name]]] | Initializes the object properties from a given base - node. | `assert op in QuantizationFreezePass.supported_quantizable_op_type, \` |
@@ -262,13 +262,13 @@ class NexmarkLauncher(object):
query_duration = self.pipeline_options.view_as(TestOptions).wait_until_finish_duration # pylint: disable=line-too-long
if launch_from_direct_runner:
command = Command(
- self.run_query, args=[queries[i], query_args.get(i), query_errors])
+ self.run_query, args=[queries[i], query_args, query_errors])
command.run(timeout=query_duration // 1000)
else:
try:
- self.run_query(queries[i], query_args.get(i), query_errors=None)
+ self.run_query(queries[i], query_args, query_errors=query_errors)
except Exception as exc:
- query_errors.append(exc)
+ query_errors.append(str(exc))
if query_errors:
logging.error('Query failed with %s', ', '.join(query_errors))
| [NexmarkLauncher->[run->[run,run_query,parse_args],run_query->[generate_events,parse_args]],NexmarkLauncher,cleanup,run] | Runs the query and returns a object. | how come we don't have per-query query-args anymore? |
@@ -204,7 +204,7 @@ public class KsqlConfig extends AbstractConfig {
+ " which are secured with ACLs. Please enable only after careful consideration."
+ " If \"false\", KSQL pull queries will fail against a secure Kafka cluster";
- public static final String KSQL_PULL_QUERIES_ENABLE_CONFIG = "ksql.pull.queries.enable";
+ public static final String KSQL_PULL_QUERIES_ENABLE_CONFIG = "ksql.query.pull.enable";
public static final String KSQL_PULL_QUERIES_ENABLE_DOC =
"Config to enable or disable transient pull queries on a specific KSQL server.";
public static final boolean KSQL_PULL_QUERIES_ENABLE_DEFAULT = true;
| [KsqlConfig->[buildConfigDef->[defineLegacy,defineCurrent],ConfigValue->[isResolved->[isResolved]],buildStreamingConfig->[applyStreamsConfig],getAllConfigPropsWithSecretsObfuscated->[getKsqlConfigPropsWithSecretsObfuscated],overrideBreakingConfigsWithOriginalValues->[KsqlConfig],cloneWithPropertyOverwrite->[KsqlConfig,getKsqlStreamConfigProps,buildStreamingConfig],getKsqlStreamConfigPropsWithSecretsObfuscated->[convertToObfuscatedString],resolveStreamsConfig->[ConfigValue],CompatibilityBreakingConfigDef->[defineCurrent->[define],defineLegacy->[define],define->[define]],configDef,buildStreamingConfig]] | Config to enable or disable the topic access validator and documentation. Second part of the prefix for persistent queries. For instance if the prefix is query_ the. | Does it matter that the variable names are non consistent with the config name? ("KSQL_PULL_QUERIES_ENABLE_CONFIG"). I assume not, since we don't publish these branches, do we? |
@@ -323,9 +323,14 @@ class WPSEO_Metabox extends WPSEO_Meta {
$content_sections[] = $this->get_advanced_meta_section();
}
+ if ( ! file_exists( WPSEO_PATH . 'premium/' ) ) {
+ $content_sections[] = $this->get_buy_premium_section();
+ }
+
if ( has_action( 'wpseo_tab_header' ) || has_action( 'wpseo_tab_content' ) ) {
$content_sections[] = $this->get_addons_meta_section();
}
+
return $content_sections;
}
| [WPSEO_Metabox->[seo_score_posts_where->[seo_score_posts_where],add_meta_box->[is_metabox_hidden],add_custom_box->[add_meta_box],column_sort_orderby->[column_sort_orderby],get_replace_vars->[get_metabox_post],posts_filter_dropdown->[posts_filter_dropdown],column_content->[column_content],column_heading->[column_heading],publish_box->[is_metabox_hidden],column_sort->[column_sort],enqueue->[localize_replace_vars_script,localize_post_scraper_script,localize_shortcode_plugin_script,is_metabox_hidden],column_hidden->[column_hidden]]] | Get the content sections. | Please do this based on whether premium is activated, not on whether the path exists. |
@@ -544,7 +544,10 @@ namespace Dynamo.PackageManager
var discoveredVersion = CheckAndGetPackageVersion(discoveredPackage.VersionName, discoveredPackage.Name, discoveredPackage.RootDirectory);
- var existingPackage = LocalPackages.FirstOrDefault(package => package.Name == discoveredPackage.Name);
+ var existingPackage = LocalPackages.FirstOrDefault(package => (package.Name == discoveredPackage.Name) && (package.LoadState.State != PackageLoadState.StateTypes.Unloaded));
+
+ // Do we want to notify the user when we encounter unloaded packages ?
+ //
// Is this a new package?
if (existingPackage == null)
| [PackageLoader->[TryLoadPackageIntoLibrary->[OnRequestLoadNodeLibrary,OnRequestLoadCustomNodeDirectory,Add],DoCachedPackageUninstalls->[Add],Load->[TryLoadPackageIntoLibrary,OnPackagesLoaded],Add->[OnPackageAdded,Add],LoadNewPackages->[LoadPackages],IsUnderPackageControl->[IsUnderPackageControl],LoadCustomNodesAndPackages->[LoadNewPackages,TransformPath],Remove->[OnPackageRemoved,Remove],LoadPackages->[TryLoadPackageIntoLibrary,OnPackagesLoaded],Package->[Add]]] | ScanPackageDirectory scans a directory for a package. if null return null ;. | could you make this span multiple lines? |
@@ -523,6 +523,10 @@ class Installer
foreach ($operations as $operation) {
// collect suggestions
if ('install' === $operation->getJobType()) {
+ if (!$this->installExtensions && $operation->getPackage()->getType() == 'extension') {
+ $this->io->writeError('<warning>This package has extensions dependencies, run composer install --install-extensons</warning>');
+ continue;
+ }
foreach ($operation->getPackage()->getSuggests() as $target => $reason) {
$this->suggestedPackages[] = array(
'source' => $operation->getPackage()->getPrettyName(),
| [Installer->[whitelistUpdateDependencies->[packageNameToRegexp],disablePlugins->[disablePlugins]]] | Installs the package. Checks if packages that are not installed or installed are not fixed to a version in lock. Checks if the current package is not installed in the lock file and if so installs it. Finds a node - level package that can be installed and install it if it can. | Should maybe support 'update' operations too |
@@ -77,6 +77,10 @@ public class HiveSyncTool extends AbstractSyncTool {
super(configuration.getAllProperties(), fs);
try {
+ if (cfg.useKerberos) {
+ configuration.set("hive.metastore.sasl.enabled", "true");
+ configuration.set("hive.metastore.kerberos.principal", cfg.kerberosPrincipal);
+ }
this.hoodieHiveClient = new HoodieHiveClient(cfg, configuration, fs);
} catch (RuntimeException e) {
if (cfg.ignoreExceptions) {
| [HiveSyncTool->[doSync->[syncHoodieTable],main->[syncHoodieTable]]] | Tool to sync a hoodie HDFS table with a hive metastore table. This method is used to set the snapshot table and the ro table. | Does this work for both `hms` and `jdbc` sync mode ? |
@@ -146,7 +146,7 @@ public class FSSpecStore implements SpecStore {
String specName = getSpecName(flowPath);
FileStatus[] fileStatuses;
try {
- fileStatuses = listSpecs(this.fsSpecStoreDirPath, specGroup);
+ fileStatuses = listSpecs(specGroup);
} catch (FileNotFoundException e) {
return false;
}
| [FSSpecStore->[getAllVersionsOfSpec->[getSpecName,getSpecGroup,getAllVersionsOfSpec],getSpec->[exists,getAllVersionsOfSpec],getSpecs->[getSpecs],exists->[getSpecGroup,getSpecName],writeSpecToFile->[exists],deleteSpec->[exists,deleteSpec]]] | Checks if a spec exists in the flow. | Change this to do a directly listing of a specific path. |
@@ -1467,6 +1467,11 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces
throw new FormException(Messages.ComputerSet_SlaveAlreadyExists(proposedName), "name");
}
+ String nExecutors = req.getSubmittedForm().getString("numExecutors");
+ if (Integer.parseInt(nExecutors)<=0) {
+ throw new FormException(Messages.Slave_InvalidConfig_Executors(nodeName), "numExecutors");
+ }
+
Node result = node.reconfigure(req, req.getSubmittedForm());
Jenkins.getInstance().getNodesObject().replaceNode(this.getNode(), result);
| [Computer->[getDescription->[getNode],getActions->[getActions],getACL->[getACL],isOnline->[isOffline],relocateOldLogs->[getName,relocateOldLogs],getMonitorData->[getName],setNode->[getNumExecutors],_doScript->[getChannel,getACL,_doScript],updateByXml->[getNode],remove->[remove],waitUntilOnline->[isOnline],waitUntilOffline->[isOffline],getHeapDump->[getChannel],getHostName->[getChannel],rss->[getUrl,getDisplayName],doDumpExportTable->[getChannel,call],getLog->[getLogFile],getNode->[getNode],doRssAll->[getBuilds],getEnvironment->[getChannel],isOffline->[getChannel],removeExecutor->[run->[addNewExecutorIfNecessary]],getSearchUrl->[getUrl],getThreadDump->[getChannel,getThreadDump],getIconAltText->[isOffline],getIcon->[isOffline],doConfigDotXml->[getNode],getIdleStartMilliseconds->[getIdleStartMilliseconds],ListPossibleNames->[call->[getDisplayName],getName],disconnect->[recordTermination,disconnect],doDoDelete->[getNode],setTemporarilyOffline->[getNode,setTemporarilyOffline],getSystemProperties->[getChannel,getSystemProperties],getTiedJobs->[getNode,getTiedJobs],doChangeOfflineCause->[setTemporarilyOffline],isAcceptingTasks->[getNode,isAcceptingTasks],DisplayExecutor->[hashCode->[hashCode],toString->[toString],equals->[equals]],getLogText->[getLogFile],isIdle->[isIdle],doConfigSubmit->[getNode],getIconClassName->[isOffline],isManualLaunchAllowed->[isManualLaunchAllowed],doToggleOffline->[setTemporarilyOffline],getUrl->[getName],getBuilds->[getNode],countBusy->[countIdle],buildEnvironment->[getNode],isPartiallyIdle->[isIdle],getName]] | Reconfigure a node. | As below, this would more naturally live in `Slave.setNumExecutors` but that would be a source-incompatible change. |
@@ -64,7 +64,7 @@ let AdNetworkConfigDef;
* @const {!Object<string, !AdNetworkConfigDef>}}
*/
export const adConfig = {
- _ping_: {
+ '_ping_': {
renderStartImplemented: true,
clientIdScope: '_PING_',
consentHandlingOverride: true,
| [No CFG could be retrieved] | The config of the CID. Provides a list of urls to fetch the nagios and adblade associations. | were these getting obfuscated ? |
@@ -267,6 +267,15 @@ public interface IndexerMetadataStorageCoordinator
*/
boolean insertDataSourceMetadata(String dataSource, DataSourceMetadata dataSourceMetadata);
+ /**
+ * Remove datasource metadata created before the given timestamp and not in given excludeDatasources set.
+ *
+ * @param timestamp timestamp in milliseconds
+ * @param excludeDatasources set of datasource names to exclude from removal
+ * @return number of datasource metadata removed
+ */
+ int removeDataSourceMetadataOlderThan(long timestamp, @Nullable Set<String> excludeDatasources);
+
/**
* Similar to {@link #announceHistoricalSegments(Set)}, but meant for streaming ingestion tasks for handling
* the case where the task ingested no records and created no segments, but still needs to update the metadata
| [retrieveUsedSegmentsForInterval->[singletonList,retrieveUsedSegmentsForIntervals]] | Insert data source metadata into the table. | What does a null `excludeDatasources` mean? |
@@ -24,8 +24,10 @@ import (
"strings"
"github.com/golang/glog"
+ "k8s.io/kubernetes/pkg/api/meta"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/apimachinery"
+ "k8s.io/kubernetes/pkg/util/sets"
)
var (
| [Strings,ParseGroupVersion,Join,Sprintf,Getenv,String,Errorf,Fatalf,Split] | Creates a new object that represents the given API version and registers it with the scheme. KUBE_API_VERSIONS is a helper function to check if the given api. | Can I drop this in 1.4? |
@@ -9,9 +9,11 @@ namespace Dynamo.Wpf
{
public class CodeBlockNodeViewCustomization : INodeViewCustomization<CodeBlockNodeModel>
{
+ private CodeBlockEditor cbe;
+
public void CustomizeView(CodeBlockNodeModel model, NodeView nodeView)
{
- var cbe = new CodeBlockEditor(nodeView);
+ cbe = new CodeBlockEditor(nodeView);
nodeView.inputGrid.Children.Add(cbe);
Grid.SetColumn(cbe, 0);
| [CodeBlockNodeViewCustomization->[CustomizeView->[LostFocus,TogglePreviewControlAllowance,SetColumn,SetBinding,OneWay,GotFocus,Focus,CodeProperty,SetRow,Add,ShouldFocus]]] | CustomizeView - Customize the view. | Why make this a member field when it is used as a local var in the method? |
@@ -298,6 +298,14 @@ int EVP_CIPHER_CTX_nid(const EVP_CIPHER_CTX *ctx)
int EVP_MD_block_size(const EVP_MD *md)
{
+ if (md == NULL) {
+ EVPerr(EVP_F_EVP_MD_BLOCK_SIZE, EVP_R_MESSAGE_DIGEST_IS_NULL);
+ return -1;
+ }
+
+ if (md->prov != NULL && md->dblock_size != NULL)
+ return (int)md->dblock_size();
+
return md->block_size;
}
| [EVP_CIPHER_type->[OBJ_nid2obj,ASN1_OBJECT_free,EVP_CIPHER_nid,OBJ_get0_data],EVP_CIPHER_asn1_to_param->[get_asn1_parameters,EVP_CIPHER_CTX_mode,EVPerr,EVP_CIPHER_get_asn1_iv],EVP_MD_meth_new->[OPENSSL_free,OPENSSL_zalloc,CRYPTO_THREAD_lock_new],EVP_MD_upref->[CRYPTO_UP_REF],EVP_MD_CTX_set_pkey_ctx->[EVP_PKEY_CTX_free,EVP_MD_CTX_test_flags,EVP_MD_CTX_clear_flags,EVP_MD_CTX_set_flags],EVP_Cipher->[do_cipher],EVP_CIPHER_get_asn1_iv->[memcpy,ASN1_TYPE_get_octetstring,OPENSSL_assert,EVP_CIPHER_CTX_iv_length],EVP_hex2ctrl->[OPENSSL_free,cb,OPENSSL_hexstr2buf],EVP_CIPHER_set_asn1_iv->[ASN1_TYPE_set_octetstring,OPENSSL_assert,EVP_CIPHER_CTX_iv_length],EVP_MD_meth_free->[OPENSSL_free,ossl_provider_free,CRYPTO_THREAD_lock_free,CRYPTO_DOWN_REF],EVP_str2ctrl->[cb,strlen],EVP_MD_meth_dup->[memcpy,EVP_MD_meth_new],EVP_MD_size->[EVPerr,size],EVP_CIPHER_param_to_asn1->[EVPerr,ASN1_TYPE_set,EVP_CIPHER_CTX_nid,EVP_CIPHER_set_asn1_iv,EVP_CIPHER_CTX_mode,set_asn1_parameters]] | return 0 if the given block has a missing block_size or 0 if the given block. | We really need to make up our minds on if we should check for NULL input or not. |
@@ -161,3 +161,16 @@ bool isBlockInSight(v3s16 blockpos_b, v3f camera_pos, v3f camera_dir,
return true;
}
+
+s16 adjustDist(s16 dist, float zoomFov)
+{
+ // 1.775 ~= 72 * PI / 180 * 1.4, the default on the client
+ float defaultFov = 1.775f;
+ // heuristic cut-off for zooming
+ if (zoomFov > defaultFov / 2.0f)
+ return dist;
+
+ // new_dist = dist * ((1 - cos(FOV / 2)) / (1-cos(zoomFOV /2))) ^ (1/3)
+ return round(dist * cbrt((1.0f - cos(defaultFov / 2.0f)) /
+ (1.0f - cos(zoomFov / 2.0f))));
+}
| [mysrand->[seed],murmur_hash_64_ua->[memcpy],myrand->[next],myrand_range->[range],isBlockInSight->[cos,dotProduct,MYMAX,getLength],myrand_bytes->[bytes]] | Checks if a block is in sight. Check if a block is in the field of view. | Arguments should be lower case with underscore for consistency? `zoom_fov` |
@@ -49,6 +49,13 @@ class Repo(Model):
the values may change as the contents of the repo change,
either set by the user or by an importer or distributor
@type metadata: dict
+
+ @ivar last_unit_added: UTC timestamp of the last time a unit was added to the repository
+ @type last_unit_added: str
+
+ @ivar last_unit_removed: UTC timestamp of the last time a unit was removed from the repository
+ @type last_unit_removed: str
+
"""
collection_name = 'repos'
| [RepoSyncResult->[error_result->[RepoSyncResult],expected_result->[RepoSyncResult]]] | A class that represents a single unique - valued object in a repository. This is effectively an instance of an importer. Each RepoImporter is uniquely identifiable. | as before, I find it unexpected that this is a `str`, so I'm confused about what this really is. |
@@ -719,6 +719,16 @@ common_op_parse_hdlr(int argc, char *argv[], struct cmd_args_s *ap)
if (ap->dst == NULL)
D_GOTO(out_free, rc = RC_NO_HELP);
break;
+ case 'I':
+ D_STRNDUP(ap->dfs_prefix, optarg, strlen(optarg));
+ if (ap->dfs_prefix == NULL)
+ D_GOTO(out_free, rc = RC_NO_HELP);
+ break;
+ case 'H':
+ D_STRNDUP(ap->dfs_path, optarg, strlen(optarg));
+ if (ap->dfs_path == NULL)
+ D_GOTO(out_free, rc = RC_NO_HELP);
+ break;
case 't':
daos_parse_ctype(optarg, &ap->type);
if (ap->type == DAOS_PROP_CO_LAYOUT_UNKOWN) {
| [int->[cont_set_attr_hdlr,cont_get_acl_hdlr,args_free,uuid_generate,cont_del_attr_hdlr,ARGS_VERIFY_PATH_NON_CREATE,cont_clone_hdlr,d_errdesc,daos_str2csumcontprop,cont_op_parse,strcpy,pool_del_attr_hdlr,cont_create_uns_hdlr,cont_destroy_snap_hdlr,free,uuid_parse,daos_obj_id_parse,fs_copy_hdlr,pool_list_containers_hdlr,strnlen,assert,ARGS_VERIFY_OID,cont_delete_acl_hdlr,strdup,ARGS_VERIFY_PUUID,cont_list_attrs_hdlr,pool_query_hdlr,print_oclass_names_list,DAOS_PROP_CO_STATUS_VAL,duns_resolve_path,DP_UUID,strchr,uuid_copy,ALL_BUT_CONT_CREATE_OPTS_HELP,shell_op_parse,close,pool_op_parse,FS_COPY_CMDS_HELP,cont_create_snap_hdlr,daos_cont_open,D_GOTO,tobytes,cont_create_hdlr,daos_str2compresscontprop,cont_get_prop_hdlr,fprintf,cont_get_attr_hdlr,pool_get_attr_hdlr,strlen,cont_overwrite_acl_hdlr,D_FREE,daos_parse_ctype,cont_list_snaps_hdlr,ioctl,epoch_range_parse,D_STRNDUP,pool_autotest_hdlr,obj_query_hdlr,daos_parse_properties,cont_query_hdlr,obj_op_parse,uuid_is_null,cmd_args_print,strerror,FIRST_LEVEL_HELP,cont_update_acl_hdlr,obj_ctl_shell,getopt_long,daos_pool_connect,daos_cont_close,daos_str2encryptcontprop,cont_list_objs_hdlr,call_dfuse_ioctl,ARGS_VERIFY_CUUID,cont_rollback_hdlr,cont_check_hdlr,strtoull,daos_oclass_name2id,daos_prop_alloc,pool_list_attrs_hdlr,sscanf,pool_get_prop_hdlr,cont_destroy_hdlr,strcmp,daos_parse_property,open,cont_set_owner_hdlr,cont_set_prop_hdlr,daos_pool_disconnect,pool_set_attr_hdlr,ALL_CONT_CMDS_HELP,filesystem_op_parse],cont_op->[strcmp],fs_op->[strcmp],main->[daos_init,args_free,common_op_parse_hdlr,daos_fini,d_errdesc,strcmp,hdlr,printf,fprintf,help_hdlr],daos_size_t->[fprintf,strtoull],obj_op->[strcmp],pool_op->[strcmp],void->[daos_oclass_id2name,free,D_FREE,DP_OID,daos_oclass_names_list,malloc,DP_UUID,daos_prop_free,daos_unparse_ctype,D_INFO,fprintf],sh_op->[strcmp]] | Parse the arguments of a command - line option - set and return the values of the option - - - - - - - - - - - - - - - - - - Parse command - line options and parse remaining options. option - uuid - uuid - uuid - uuid - uuid - uuid - uuid - uuid - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - parses options for missing arguments check for any unimplemented commands print help. | We should probably add corresponding FREE's to the args_free function in this file, which will free these arguments in case of any error |
@@ -11,8 +11,10 @@
* This is necessary when developing things like Google Chrome Extensions.
*
* CSP forbids apps to use `eval` or `Function(string)` generated functions (among other things).
- * For us to be compatible, we just need to implement the "getterFn" in $parse without violating
- * any of these restrictions.
+ * For Angular to be CSP compatible there are only two things that we need to do differently:
+ *
+ * - don't use `Function` constructor to generate optimized value getters
+ * - don't inject custom stylesheet into the document
*
* AngularJS uses `Function(string)` generated functions as a speed optimization. Applying the `ngCsp`
* directive will cause Angular to use CSP compatibility mode. When this mode is on AngularJS will
| [No CFG could be retrieved] | A directive that can be used to parse a tag s n - u id. | the trouble with this is that we're making an assumption that `eval` is disabled --- which it isn't necessarily (`unsafe-eval`). I expect this will be fine for most users, but it's not entirely accurate. I guess we need to wait until there is a better way to get this information (before changing that) |
@@ -77,6 +77,10 @@ case $subcommand in
typecheck "$@"
;;
+ "--version")
+ typecheck --version
+ ;;
+
*)
echo "Unknown subcommand \`$subcommand\`"
help_and_exit
| [exec] | | typecheck | tc | t. | I think we actually want to show the version of the `'sorbet'` gem, not of the `sorbet` executable in the sorbet-static gem, as that's the version that people will write in their gemfile. Is that guaranteed to be the same? Do we want to show both the `sorbet --version` information and also the gem version information? |
@@ -67,8 +67,8 @@ class ThreadFactoryConfiguration implements ConfigurationInfo {
return name;
}
- public Attribute<ThreadGroup> groupName() {
- return group;
+ public Attribute<String> groupName() {
+ return groupName;
}
public Attribute<String> threadPattern() {
| [ThreadFactoryConfiguration->[attributeDefinitionSet->[AttributeSet],getThreadFactory->[DefaultNonBlockingThreadFactory,DefaultThreadFactory,get],getLocalName,checkProtection,build,DefaultElementDefinition,attribute]] | name group and threadNamePattern. | Non-backwards-compatible change, same in the builder |
@@ -87,9 +87,16 @@ namespace Internal.Cryptography.Pal
if (loadFromFile)
rawData = File.ReadAllBytes(fileName!);
pCertContext = FilterPFXStore(rawData!, password, pfxCertStoreFlags);
+
+ // If PersistKeySet is set we don't delete the key, so it persists.
+ // If EphemeralKeySet is set we don't delete the key, because there's no file, so it's a wasteful call.
+ const X509KeyStorageFlags DeleteUnless =
+ X509KeyStorageFlags.PersistKeySet | X509KeyStorageFlags.EphemeralKeySet;
+
+ deleteKeySet = (0 == (keyStorageFlags & DeleteUnless));
}
- CertificatePal pal = new CertificatePal(pCertContext, deleteKeyContainer: !persistKeySet);
+ CertificatePal pal = new CertificatePal(pCertContext, deleteKeySet);
pCertContext = null;
return pal;
}
| [CertificatePal->[PfxCertStoreFlags->[CRYPT_USER_KEYSET,nameof,Argument_InvalidFlag,MachineKeySet,Exportable,UserProtected,PKCS12_ALWAYS_CNG_KSP,KeyStorageFlagsAll,CRYPT_USER_PROTECTED,UserKeySet,CRYPT_MACHINE_KEYSET,EphemeralKeySet,CRYPT_EXPORTABLE,PKCS12_NO_PERSIST_KEY],ICertificatePal->[CryptQueryObject,CERT_QUERY_OBJECT_BLOB,CERT_QUERY_CONTENT_PKCS7_SIGNED,CERT_QUERY_OBJECT_FILE,GetHRForLastWin32Error,ToCryptographicException,GetSignerInPKCS7Store,MapKeyStorageFlags,ReadAllBytes,FilterPFXStore,FromBlobOrFile,Dispose,PersistKeySet,Assert,Length,CERT_QUERY_CONTENT_PFX,CERT_QUERY_CONTENT_PKCS7_SIGNED_EMBED],SafeCertContextHandle->[IsInvalid,PFXImportCertStore,HasPersistedPrivateKey,CMSG_SIGNER_COUNT_PARAM,Duplicate,ToCryptographicException,CryptMsgGetParam,Cryptography_Pfx_NoCertificates,pbData,CMSG_SIGNER_INFO_PARAM,ContainsPrivateKey,Dispose,CertFindCertificateInStore,DeleteKeyContainer,cbData,CertEnumCertificatesInStore,CERT_FIND_SUBJECT_CERT,InvalidHandle,Length],CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED_EMBED,CERT_QUERY_FORMAT_FLAG_ALL,CERT_QUERY_CONTENT_FLAG_SERIALIZED_CERT,CERT_QUERY_CONTENT_FLAG_PFX,CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED,CERT_QUERY_CONTENT_FLAG_CERT]] | This method is used to create a certificate from a blob or a file. create a certificate pal if it is not in store. | Nit, Yoda conditional? |
@@ -188,7 +188,12 @@ const createYeomanEnv = () => {
Object.keys(SUB_GENERATORS)
.filter(command => !SUB_GENERATORS[command].cliOnly)
.forEach(generator => {
- env.register(require.resolve(`../generators/${generator}`), `${CLI_NAME}:${generator}`);
+ if (SUB_GENERATORS[generator].blueprint) {
+ /* eslint-disable prettier/prettier */
+ env.register(require.resolve(`../node_modules/${SUB_GENERATORS[generator].blueprint}/generators/${generator}`), `${CLI_NAME}:${generator}`);
+ } else {
+ env.register(require.resolve(`../generators/${generator}`), `${CLI_NAME}:${generator}`);
+ }
});
return env;
};
| [No CFG could be retrieved] | Create a new environment object that can be used to run the command - line tool. | this expects the package to be installed on the node_modules of the generator? Shouldn't you rely on npms resolution mechanism here |
@@ -83,7 +83,8 @@ class BuoyancyTest(UnitTest.TestCase):
thermal_settings.SetVelocityVariable(VELOCITY)
thermal_settings.SetMeshVelocityVariable(MESH_VELOCITY)
if self.convection_diffusion_solver == 'bfecc':
- thermal_settings.SetProjectionVariable(PROJECTED_SCALAR1)
+ import KratosMultiphysics.ConvectionDiffusionApplication as ConvDiff
+ thermal_settings.SetProjectionVariable(ConvDiff.PROJECTED_SCALAR1)
self.fluid_model_part.ProcessInfo.SetValue(CONVECTION_DIFFUSION_SETTINGS,thermal_settings)
| [BuoyancyTest->[setUpSolvers->[SolverSettings]],validationEulerian,BuoyancyTest,tearDown,setUp] | Sets up the model part and the network structures. Adds DOFs to the model. Initialize the n - node node. | Why don't we import it in the top of the file? |
@@ -73,6 +73,7 @@ final class TarArchiver extends Archiver {
tar.putArchiveEntry(e);
tar.closeArchiveEntry();
+ consumer.accept(relativePath);
entriesWritten++;
}
| [TarArchiver->[visit->[setModTime,write,mode,closeArchiveEntry,TarArchiveEntry,newInputStream,isDirectory,isWindows,replace,setMode,lastModified,putArchiveEntry,BoundedInputStream,read,setSize,IOException,length,toPath],visitSymlink->[mode,closeArchiveEntry,TarArchiveEntry,setMode,putArchiveEntry,setLinkName],close->[close],setBigNumberMode,TarArchiveOutputStream,setLongFileMode]] | Visit a symlink in the archive. | shouldn't we enforce nothing wrong happens on the consumer? like try-catching it to avoid bad clients making the archiver to fail. |
@@ -0,0 +1,17 @@
+namespace NServiceBus.Sagas
+{
+ using System;
+
+ /// <summary>
+ /// Saga id generator.
+ /// </summary>
+ public interface ISagaIdGenerator
+ {
+ /// <summary>
+ /// Generates a saga id based on property name and property value.
+ /// </summary>
+ /// <param name="context">Context for the id generation.</param>
+ /// <returns>The saga id to use.</returns>
+ Guid Generate(SagaIdGeneratorContext context);
+ }
+}
\ No newline at end of file
| [No CFG could be retrieved] | No Summary Found. | Should this be "based on the correlation property name and value" instead? |
@@ -273,11 +273,10 @@ public class LogicalPlanner {
final BiFunction<Expression, String, Boolean> matcher
) {
for (int i = 0; i < analysis.getSelectExpressions().size(); i++) {
- final Expression expression = analysis.getSelectExpressions().get(i);
- final String alias = analysis.getSelectExpressionAlias().get(i);
+ final SelectExpression select = analysis.getSelectExpressions().get(i);
- if (matcher.apply(expression, alias)) {
- return Optional.of(alias);
+ if (matcher.apply(select.getExpression(), select.getName())) {
+ return Optional.of(select.getName());
}
}
| [LogicalPlanner->[buildNonJoinNode->[getAlias,size,IllegalStateException,get,DataSourceNode,getDataSource,PlanNodeId],buildOutputKeyField->[getPartitionBy,isMetaColumn,isPresent,getSchema,get,isKeyColumn,withName,empty,getKeyField],buildPlan->[buildAggregateNode,getWhereExpression,buildSourceNode,buildProjectNode,buildOutputNode,isEmpty,buildFilterNode],buildAggregateNode->[getGroupByExpressions,getRequiredColumns,size,equals,getWindowExpression,AggregateNode,getAggregateFunctionArguments,get,getHavingExpression,getAggregateFunctions,PlanNodeId,getFinalSelectExpressions,getSelectAliasMatching,buildProjectionSchema,isFieldName],getTimestampExtractionPolicy->[create,getTimestampColumnName,getTimestampFormat],buildSourceNode->[getWithinExpression,getFromDataSources,buildNonJoinNode,size,getAlias,getLeftJoinField,isPresent,IllegalStateException,getRightJoinField,get,JoinNode,getType,DataSourceNode,getDataSource,PlanNodeId,getJoin],buildProjectNode->[ProjectNode,getSelectExpressions,equals,orElse,PlanNodeId,getSelectAliasMatching,buildProjectionSchema],buildOutputNode->[KsqlBareOutputNode,getPartitionBy,getSerdeOptions,orElseThrow,getName,isPresent,getSchema,buildOutputKeyField,get,KsqlStructuredDataOutputNode,getTimestampExtractionPolicy,getKsqlTopic,PlanNodeId,isCreate,KsqlException,getLimitClause,ifPresent],getSelectAliasMatching->[of,size,get,apply,empty],buildProjectionSchema->[isAliased,size,build,getSchema,valueColumn,keyColumns,get,getExpressionSqlType,key,ExpressionTypeManager,builder],buildFilterNode->[getWhereExpression,FilterNode,PlanNodeId]]] | Get the select alias matching if any. | The `name` of `SelectExpression` cannot be null right? It's not defined as `Optional` in the class. Why does this return `Optional` here? |
@@ -3524,4 +3524,9 @@ public class Project extends Processor {
public boolean isStandalone() {
return getWorkspace().getLayout() == WorkspaceLayout.STANDALONE;
}
+
+ public boolean isRun() {
+ return false;
+ }
+
}
| [Project->[export->[getWorkspace,toString,export],prepare->[isValid,toString],getOutputFile->[getTarget,getOutputFile],getName->[getName],getUnparented->[Project],getSpecification->[getRunProperties,getProjectLauncher,getRunbundles,getRunpath,add,getRunFw,toString],getValidJar->[toString,build,getValidJar],verifyDependencies->[getTestpath,getBuildpath,getRunbundles,getTestOutput,getOutput,getRunpath,add,verifyDependencies],doEclipseClasspath->[getBootclasspath,getOutput,getDependents],getProjectLauncher->[getRunpath],addClasspath->[add],before->[before],getDependents->[prepare],parseRepoFilter->[RepoFilter],pack->[getSubBuilders,getName,getProjectLauncher,add,toString,getBuilder],isInteractive->[isInteractive],clean->[clean,getSrcOutput,getTargetDir,getTestOutput],getBuildFiles->[add,getTarget,getBuildFiles],build->[build],getRunFw->[justInTime,parseRunFw,prepare],saveBuild->[getTarget],getTestpath->[prepare],getHandler->[getBundles,list],getDeliverables->[add,getBuilder,getOutputFile],_p_allsourcepath->[getAllsourcepath],justInTime->[doPath],after->[after],copy->[copy,list],buildLocal->[getBuildFiles,add,toString,getTarget,getBuilder],_p_dependson->[getDependson],getBundleFromProject->[isValid],getOutput->[prepare],isStale->[isStale,getDependson,add],_p_buildpath->[getBuildpath],getDependson->[prepare],getSubBuilders->[getBuilder,getSubBuilders],exportRunbundles->[getWorkspace,export],getVersion->[getName],addToPackageList->[flatten,mergeNames],list->[toString],deploy->[deploy],getBundleByHash->[toString,toContainer],reportNewer->[toString],report->[getActions,getTestpath,getDeliverables,getRunProgramArgs,getOutput,getDependson,getBootclasspath,getRunVM,getClasspath,getBuildpath,getAllsourcepath,getTarget,getSrc,getSourcePath,report,getBuildFiles,getRunbundles,getRunpath,getRunFw],action->[getActions,action],getRunStorage->[prepare],_p_output->[getOutput],bump->[bump,getBuilder],refresh->[refresh,RefreshData],getBundles->[getBundles],_p_sourcepath->[getSourcePath],flatten->[toString],_repo->[getBundle],getSubBuilder->[getBuilder],script->[script],compile->[getSourcePath,flatten,getTestpath,getFiles,getBuildpath,getTestOutput,getOutput,add,compile,getTestSrc,toString,getSrc],replace->[replace],getBundle->[toString,getBundle],test->[test,prepare],release->[releaseRepo,release,releaseURI,getReleaseRepos,getBuilder],traverse->[traverse],getBuildpath->[prepare],getAllsourcepath->[prepare],getTarget->[prepare],getSrc->[prepare],_p_bootclasspath->[getBootclasspath],getSourcePath->[prepare],getRunbundles->[justInTime,parseRunbundles,prepare],getRunpath->[justInTime,prepare,parseRunpath],add->[add],refreshAll->[refresh],install->[install,getBuilder],_p_testpath->[getRunpath],getVersions->[getBuilder,getSubBuilders],runLocal->[isRunTrace],getPackageInfo->[getPackageInfo],getDeliverable->[getBuilder,getOutputFile],getProjectTester->[getTestpath],_repos->[getName,add],fillActions->[getName],getBootclasspath->[prepare],getCommonJavac->[toString,flatten,getBootclasspath,add],propertiesChanged->[propertiesChanged,setChanged,RefreshData],setPackageInfo->[setPackageInfo],getBuildDependencies->[prepare],getTestDependencies->[prepare],releaseURI->[releaseURI,getBuilder],baseline->[build,getBuilder,getSubBuilders],RefreshData]] | Returns true if the workspace is standalone. | Not sure the purpose of this API. No one calls it. Also, wouldn't `instanceof Run` do the same thing if necessary? |
@@ -63,3 +63,13 @@ class CosmosResourceExistsError(ResourceExistsError, CosmosHttpResponseError):
class CosmosAccessConditionFailedError(CosmosHttpResponseError):
"""An error response with status code 412."""
+
+
+class ClientTimeoutError(AzureError):
+ """An operation failed to complete within the specified timeout."""
+
+ def __init__(self, **kwargs):
+ message = "Client operation failed to complete within specified timeout."
+ self.response = None
+ self.history = None
+ super(ClientTimeoutError, self).__init__(message, **kwargs)
| [CosmosHttpResponseError->[__init__->[str,super,int]]] | An error response with status code 412. | Every other class in this module has `Cosmos` in the name. Is this timeout error really specific to cosmos? If so, suggest a similar name for consistency |
@@ -318,6 +318,11 @@ def main():
global _CONF
args = build_arg_parser().parse_args()
+ # Check if subcommand has been selected
+ if hasattr(args, 'func'):
+ args.func(args)
+ exit(0)
+
# Initialize logger
logging.basicConfig(
level=args.loglevel,
| [cleanup->[cleanup],init->[init],main->[init],_process->[refresh_whitelist],handle_trade->[execute_sell,min_roi_reached],create_trade->[get_target_bid],main] | Main function for freqtrade. | maybe we should push all the args stuff to separate method for unit testing etc |
@@ -688,7 +688,7 @@ func (op StepOp) Prefix() string {
func (op StepOp) RawPrefix() string {
switch op {
case OpSame:
- return " "
+ return "= "
case OpCreate:
return "+ "
case OpDelete:
| [Apply->[URN],Prefix->[Color],Plan,Type,Provider,URN] | RawPrefix returns the raw prefix of the step op. | We made a particular decision to not have any glyph for 'sameness' so as to not clutter the display too much. @joeduffy |
@@ -132,9 +132,9 @@ class StepCommentsController < ApplicationController
@last_comment_id = params[:from].to_i
@per_page = Constants::COMMENTS_SEARCH_LIMIT
@step = Step.find_by_id(params[:step_id])
- @protocol = @step.protocol
+ @protocol = @step&.protocol
- unless @step
+ unless @step && @protocol
render_404
end
end
| [StepCommentsController->[create->[to_hash,created_at,status,new,respond_to,render,render_to_string,json,log_activity,save,l],comment_params->[permit],load_vars->[protocol,to_i,find_by_id],edit->[render,render_to_string,respond_to,json,step_step_comment_path],check_manage_permissions->[present?,can_manage_comment_in_module?,becomes,find_by_id],update->[to_hash,render,respond_to,message,json,custom_auto_link,log_activity,step_comment_annotation_notification,save],log_activity->[call,project,id],step_comment_annotation_notification->[smart_annotation_notification,protocols_my_module_url,experiment,project_url,project,canvas_experiment_url,my_module,full_name,link_to,t,name],destroy->[render,respond_to,json,log_activity,destroy,t],check_add_permissions->[my_module,can_create_comments_in_module?],check_view_permissions->[can_read_protocol_in_module?],index->[last_comments,render,respond_to,size,render_to_string,step_step_comments_path,url_for,positive?,json,id],before_action,include,url_helpers]] | This function loads the next node in the tree. | Style/IfUnlessModifier: Favor modifier unless usage when having a single-line body. Another good alternative is the usage of control flow &&/||. |
@@ -1382,10 +1382,14 @@ namespace System.Diagnostics
}
else
{
- PropertyInfo? propertyInfo = typeInfo.GetDeclaredProperty(propertyName);
+ [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2070:RequiresUnreferencedCode",
+ Justification = "If the property is trimmed, a message gets logged to inform the user.")]
+ static PropertyInfo? GetProperty(TypeInfo type, string name) => type.GetDeclaredProperty(name);
+
+ PropertyInfo? propertyInfo = GetProperty(typeInfo, propertyName);
if (propertyInfo == null)
{
- Logger.Message($"Property {propertyName} not found on {type}");
+ Logger.Message($"Property {propertyName} not found on {type}. Ensure the name is spelled correctly. If you published the application with PublishTrimmed=true, ensure the property was not trimmed away.");
return new PropertyFetch(type);
}
// Delegate creation below is incompatible with static properties.
| [DiagnosticSourceEventSource->[TransformSpec->[PropertySpec->[PropertyFetch->[],Fetch->[Message,Fetch]]],FilterAndTransform->[Dispose->[Dispose],CreateActivityListener->[ActivityStart,ActivityStop],AddNewActivitySourceTransform->[ActivityStart,ActivityStop,IsActivitySourceEntry],Morph->[Morph],ToJson,Activity2Start,Message,RecursiveActivity1Start,NewDiagnosticListener,Activity1Start,Event,EventJson,Activity2Stop,RecursiveActivity1Stop,Activity1Stop]]] | Returns a PropertyFetch object that can be used to fetch a property of the given type. Private method to create a new PropertyFetch object. | I do not think that depending on the runtime message is the right approach. This should keep generating warning at build time instead. |
@@ -194,12 +194,12 @@ func (manager *Manager) sendFaildEvent(msg string, projectUpdateID string) {
},
Data: &_struct.Struct{
Fields: map[string]*_struct.Value{
- project_update_tags.ProjectUpdateIDTag: &_struct.Value{
+ project_update_tags.ProjectUpdateIDTag: {
Kind: &_struct.Value_StringValue{
StringValue: projectUpdateID,
},
},
- "message": &_struct.Value{
+ "message": {
Kind: &_struct.Value_StringValue{
StringValue: msg,
},
| [startProjectTagUpdater->[Background,Debugf,Wrap,ListProjectRules,UpdateReportProjectsTags,Debug],Start->[Sprintf,startProjectTagUpdater,Errorf,sendFaildEvent,waitingForJobToComplete],EstimatedTimeCompelete->[Unix],sendFaildEvent->[TimestampNow,Background,Publish,Warnf],waitingForJobToComplete->[Sprintf,Background,Errorf,Debugf,sendFaildEvent,JobStatus,Sleep,sendStatusEvent],sendStatusEvent->[TimestampNow,Background,Publish,Warnf],NewV4,String,Errorf] | sendFaildEvent sends a Faild event to the service. | I did not know you could remove the type. Nice! |
@@ -62,6 +62,7 @@ const AmpVideoIframeLike = ({unloadOnPause, ...rest}) => {
allow="autoplay" // this is not safe for a generic frame
onMessage={onMessage}
makeMethodMessage={makeMethodMessage}
+ data-loading="lazy"
/>
);
};
| [No CFG could be retrieved] | Create an AmpVideoIframe object. This is an example of an AMP video iframe that displays a single - frame . | Is this necessary? Should we set the default at the `<VideoIframe />` level instead? |
@@ -166,7 +166,16 @@ getIdentityMatrixWithMap (Teuchos::FancyOStream& out,
return identityMatrix;
}
-
+template<class Matrix_t>
+RCP<Matrix_t>
+copyMatrix(RCP<Matrix_t> &A) {
+ typedef typename Matrix_t::local_matrix_type::values_type values_type;
+ values_type vals = A->getLocalValuesView();
+ values_type newvals;
+ Kokkos::resize(newvals,vals.extent(0));
+ Kokkos::deep_copy(newvals,vals);
+ return rcp(new Matrix_t(A->getCrsGraph(),newvals));
+}
typedef struct add_test_results_struct{
double correctNorm;
| [No CFG could be retrieved] | region Private functions - > Creates a template for adding a node to a matrix. | If you don't intend on the RCP being an output argument, then pass it either by value `RCP<Matrix_t>` or by const reference `const RCP<Matrix_t>&`. |
@@ -0,0 +1,8 @@
+<% content_for :title, ExamTemplate.model_name.human.pluralize %>
+
+<% content_for :content do %>
+ <%= render partial: 'form',
+ formats: [:html],
+ handlers: [:erb],
+ locals: { exam_template: ExamTemplate.find_by(assignment: @assignment) }%>
+<% end %>
| [No CFG could be retrieved] | No Summary Found. | You shouldn't need to specify the `formats` or `handlers` |
@@ -1106,6 +1106,11 @@ const adConfig = jsonConfiguration({
],
},
+ 'whopainfeed': {
+ prefetch: 'https://widget.infeed.com.ar/widget/widget-amp.js',
+ renderStartImplemented: true,
+ },
+
'widespace': {},
'wisteria': {
| [No CFG could be retrieved] | Provides a list of urls that should be served by the AMP. List of all possible links to a page. | I see you have this flag marked as true, but when I run your example ad I do not see this method being called. Can you confirm you are calling this API in your 3p code? |
@@ -212,6 +212,10 @@ class SubmissionCollector < ActiveRecord::Base
grouping.save
new_submission = Submission.create_by_revision_number(grouping, rev_num)
+ if apply_late_penalty
+ new_submission = grouping.assignment.submission_rule.apply_submission_rule(
+ new_submission)
+ end
#This is to help determine the progress of the method.
self.safely_stop_child_exited = true
| [SubmissionCollector->[collect_next_submission->[instance,remove_grouping_from_queue],start_collection_process->[instance],manually_collect_submission->[start_collection_process,remove_grouping_from_queue]]] | This method is called by the child process when it is able to collect a specific from. | Useless assignment to variable - `new_submission`.<br>Line is too long. [81/80] |
@@ -67,14 +67,14 @@ public class ClassSummaryHelper {
numberOfClasses, totalSize, totalSize / 1024));
// Print the sections
- out.println(String.format("%-40s%-8s %-8s %-6s", "Section", "Byte",
- "kB", "%"));
+ out.println(String.format("%-39s %-8s %-8s %-6s",
+ "Section", "Byte", "kB", "%"));
for (Map.Entry<String, Long> entry : data.entrySet()) {
out.println(printSize(entry.getKey(), entry.getValue(), totalSize));
}
}
- private void appendSizeStat(Map<String, Long> sizeStat,
+ private static void appendSizeStat(Map<String, Long> sizeStat,
J9ClassRegionNode regionNode, String parentName) {
String section = parentName;
final J9ClassRegion nodeValue = regionNode.getNodeValue();
| [ClassSummaryHelper->[StringCompare->[compare->[find]],appendSizeStat->[appendSizeStat]]] | Print the statistics of the given node. for each class region node in the hierarchy append size stat. | Seems unnecessary to create a new Long instead of using the existing one. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.