text:
Extract Image From DICOM File

Create a method for the DICOMSet class that extracts an image from a DICOM file.

Resolved on the most recent commit

source: gharchive/issue

repo: wpeguero/pyblight

license: MIT

license_type: permissive

license_source: github-api


text:
fix(core): :bug: corelistitem validvalues are not in array

Description
the requirement to put the validvalues are in array
Ref: #328

please check if there is any changes required or not
@techoneel

source: gharchive/pull-request

repo: wrappid/core


text:
API Prototype

At this point, our API only needs a single endpoint, which will just return a list of every trail with all of its data. Most of the work for this task will therefore be in deciding exactly what data we need to be storing.

[ ] Make a planning document outlining what data needs to be included
[ ] Create a data.json file (in the api folder) with a list of ~3 trails with all the fields from the planning doc. The data doesn't need to be real, but it should be somewhat realistic.
[ ] Update the endpoint currently returning "hello world" to instead return the contents of data.json
[ ] Modify the Caddy configuration to allow CORS from the frontend

Don't worry about the last checkbox. I know exactly what needs to be done, its a single line. I just didn't want to forget.


text:
Feature Request: Sitemap

A website (or a part of it) should have a sitemap.
@themsaid Do you plan such a feature? Or do you prefer a PR for that? I can implement that, if you want to.

As @mallardduck mentions, it's outside the scope of the package, wink is just the dashboard for your content, it can include some helpers to help with the frontend but I don't see a sitemap or RSS feed are to be considered, there are tons of packages out there to help you with that.

authors: rokde themsaid

repo: writingink/wink


text:
Output problem

Thanks a lot for this application.I can get output video for some videos and i can't get output video for some videos please help me to find the reason.

Resolution difference(between counter.py and video) is causing this problem.Make them equal.


text:
Fix for JIRA issue IOTS-11

bug fix for "Not showing login failure messages in login page"

Smoke tested with IoT server pack from 2015/01/07, no issues found.

license_source: bigquery


text:
JSON Schema Validation Fails in Distributed Setup

Description
JSON Schema Validation Fails in Distributed Setup. This is working fine in the local setup.
Doc: https://apim.docs.wso2.com/en/latest/design/api-security/api-request-response-schema-validation/json-schema-validator/
Steps to Reproduce

Sign in to the API Publisher Portal.
Click on the API for which you need to enable JSON validation.
Click API Configurations.
Click Runtime.
Enable Schema Validation.
Try invoking the API with an invalid type in the payload, (Ex: for PizzaShackAPI invoke the POST /order API with a string for the quantity)

{
  "customerName": "Divya",
  "delivered": true,
  "address": "No 15, Colombo",
  "pizzaType": "Veg",
  "creditCardNumber": "12345",
  "quantity": "Test",
  "orderId": "12345"
}

Expected a schema validation failed response but the request sent a successful response

Affected Component
APIM
Version
4.4.0
Environment Details (with versions)
Distributed Setup
Relevant Log Output
No response
Related Issues
No response
Suggested Labels
No response

Hi @DivyaPremanantha,
The payload you provided correctly fails the schema validation and returns the following error in the distributed setup.
{
  "code": "400",
  "message": "Bad Request",
  "description": "Schema validation failed in the Request: [Path '/quantity'] Instance type (string) does not match any allowed primitive type (allowed: [\"integer\",\"number\"]), "
}

Will close the ticket. Please reopen if the issue persist for you.


text:
Adding Subscription and API key and API Invocation related Devportal tests

Purpose
Adding Subscription and API key and API Invocation related Devportal tests

Codecov Report
Patch coverage has no change and project coverage change: +29.81 :tada:

Comparison is base (a751709) 50.29% compared to head (83d3e36) 80.10%.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1179       +/-   ##
===========================================
+ Coverage   50.29%   80.10%   +29.81%
===========================================
  Files          11        9        -2
  Lines         853      548      -305
  Branches      551      246      -305
===========================================
+ Hits          429      439       +10
+ Misses        424      109      -315

Flag
Coverage Δ

backoffice-domain-service
?

idp-domain-service
80.10% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 20 files with indirect coverage changes

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

authors: CrowleyRajapakse codecov-commenter


text:
Refactoring APK DB tables

Purpose
Initial fix for: https://github.com/wso2/apk/issues/257
Impl

Removing unnecessary tables.
Fixing indentation issues.
Adding to init DB.


text:
Fixing issue of not having API name, context in error message

Purpose

Describe the problems, issues, or needs driving this feature/fix and include links to related issues in the following format: Resolves issue1, issue2, etc.

Goals

Describe the solutions that this feature/fix will introduce to resolve the problems described above

Approach

Describe how you are implementing the solutions. Include an animated GIF or screenshot if the change affects the UI (email documentation@wso2.com to review all UI text). Include a link to a Markdown file or Google doc if the feature write-up is too long to paste here.

User stories

Summary of user stories addressed by this change>

Release note

Brief description of the new feature or bug fix as it will appear in the release notes

Documentation

Link(s) to product documentation that addresses the changes of this PR. If no doc impact, enter “N/A” plus brief explanation of why there’s no doc impact

Training

Link to the PR for changes to the training content in https://github.com/wso2/WSO2-Training, if applicable

Certification

Type “Sent” when you have provided new/updated certification questions, plus four answers for each question (correct answer highlighted in bold), based on this change. Certification questions/answers should be sent to certification@wso2.com and NOT pasted in this PR. If there is no impact on certification exams, type “N/A” and explain why.

Marketing

Link to drafts of marketing content that will describe and promote this feature, including product page changes, technical articles, blog posts, videos, etc., if applicable

Automation tests

Unit tests

Code coverage information

Integration tests

Details about the test cases and coverage

Security checks

Followed secure coding standards in http://wso2.com/technical-reports/wso2-secure-engineering-guidelines? yes/no
Ran FindSecurityBugs plugin and verified report? yes/no
Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets? yes/no

Samples

Provide high-level details about the samples related to this feature

Related PRs

List any other related PRs

Migrations (if applicable)

Describe migration steps and platforms on which migration has been tested

Test environment

List all JDK versions, operating systems, databases, and browser/versions on which this feature/fix was tested

Learning

Describe the research phase and any blog posts, patterns, libraries, or add-ons you used to solve the problem.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.User seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

authors: CLAassistant sanjeewa-malalgoda


text:
[Syntax Highlighting] Variable name considered a keywrod when the variable type descriptor is a function

Description:
The variable name is highlighted in the same colors as the keywords in the following scenario.

Steps to reproduce:
Try above Code segment in VSCode

Consider following code snippet as well

Here  int is not highlighted

Variable highlighting in the first scenario is fixed with https://github.com/ballerina-platform/ballerina-lang/pull/31841

authors: malinthar prabushi


text:
Fix lightweight observability name

This change is done to comply with the same feature in https://docs.wso2.com/display/AM260/Working+with+Observability#WorkingwithObservability-Lightweightobservability.

@binodmx , isnt this fix applicable to 4.0.0 and 4.1.0 as well?

@binodmx , isnt this fix applicable to 4.0.0 and 4.1.0 as well?

no, this feature is available only in 2.6.0 and 3.2.0.

authors: Mariangela binodmx


text:
[EMM-1865] Problem when inserting "Last Name" with multiple words in EMM console.

Form validation error when inserting "Last Name" with multiple words in EMM console.                              The reason for the issue is,The regular expression contains for last name does not allow spaces in UI as below:                              <input type="text" id="lastname" data-regex="^               [\S]                        {3,30}            $" data-errormsg="Provided last name is invalid." class="form-control">         Reference: https://wso2.org/jira/browse/EMM-1865

This is no longer present in current releases.

authors: hasuniea inoshperera


text:
[IOTS-141] Policies: Device should have only one policy

When multiple policies are added to a device, it can be from the device, the group or device type. The last added policy should be taken as the policy to be applied for the device.  It would be more clear for the user if the selected policy for the device is highlighted and showed. Only policies related to the device should be shown. The user should have the option to select the policy the user wishes for the particular device.Reference: https://wso2.org/jira/browse/IOTS-141

This is not the intended behaviour of the policy. The user configures the policy and valid policy to the server is calculated using the device attributes and policy rules. Therefore above issue is not valid.

authors: geethkokila madhawap


text:
Switch role claim URI to groups claim

This issue is a subtask of #11327, thus continues the discussion from there.
Depends on the groups claim changes introduced with #11328.
Need to switch to the wso2.groups claim for the claim URI in both SP and IDP role mappings.
Tasks
SP role mapping

[x] Switch to SCIM2/groups endpoint listing local roles in console based on the b/c config.

If b/c required, the list should have both IR and USG
Or else, it lists only groups

[x] Fix SP APP validation in the identity framework

with b/c: validate against wso2.role claim
without b/c: validate against wso2.group claim

[ ] Test and verify adding a group mapping works

IDP role mapping

[x] Switch to SCIM2/groups endpoint listing local roles in console based on the b/c config.

If b/c required, the list should have both IR and USG
Or else, it lists only groups

[x] Fix SP APP validation in the identity framework

with b/c: validate against wso2.role claim
without b/c: validate against wso2.group claim

[x] Test and verify adding a group mapping works

Support role mapping for newly introduced Roles and Groups claims

[x] Check where the role mapping is done during inbound and outbound authentication, and outbound provisioning.

[x] Handle framework logic for role mapping : https://github.com/wso2/carbon-identity-framework/pull/3423

[x] Inbound authentication - OAuth : Fixed with https://github.com/wso2-extensions/identity-inbound-auth-oauth/pull/1562

[x] Inbound authentication - SAML: There is no role mapping logic.

[x] Checked codebase
[x] Confirmed

[x] Inbound authentication - STS:  There is no role mapping logic.

[x] Checked codebase
[x] Confirmed

[x] Inbound authentication - Passive STS:  There is no role mapping logic.

[x] Checked codebase
[x] Confirmed

[x] Inbound authentication - Kerberos KDC: There is no role mapping logic.

[x] Checked codebase
[x] Confirmed

[x] Outbound auth - SAML2 Web SSO: There is no role mapping logic.

[x] Checked codebase
[x] Confirmed

[x] Outbound auth - OAuth2/OIDC: There is no role mapping logic.

[x] Checked codebase
[x] Confirmed

[x] Outbound auth - WS-FED Passive: OAuth2/OIDC: There is no role mapping logic.

[x] Checked codebase
[x] Confirmed

[x] Outbound auth - Facebook: There is no role mapping logic.

[x] Checked codebase
[x] Confirmed

[x] Outbound auth - Microsoft: There is no role mapping logic.

[x] Checked codebase
[x] Confirmed

[x] Outbound auth - Google: There is no role mapping logic.

[x] Checked codebase
[x] Confirmed

[x] Outbound auth - SMS OTP: There is no role mapping logic.

[x] Checked codebase
[x] Confirmed

[x] Outbound auth - Twitter: There is no role mapping logic.

[x] Checked codebase
[x] Confirmed

[x] Outbound auth - Email OTP: There is no role mapping logic

[x] Checked codebase
[x] Confirmed

[x] Outbound auth - Yahoo: There is no role mapping logic

[x] Checked codebase
[x] Confirmed

[x] Outbound auth - Office 365: There is no role mapping logic

[x] Checked codebase
[x] Confirmed

[x] Outbound Provisioning Connector - Google: There is no role mapping logic

[x] Checked codebase
[x] Confirmed

[x] Outbound Provisioning Connector - Salesforce: There is no role mapping logic

[x] Checked codebase
[x] Confirmed

[x] Outbound Provisioning Connector - SCIM: There is no role mapping logic

[x] Checked codebase
[x] Confirmed

[ ] Integration tests to ensure role, roles, and groups claims are properly mapped when configured role mapping.

Migration Tasks: included in https://github.com/wso2/product-is/issues/11340

Review comments:

[ ] Need to change the UI label naming from role to groups in the sp and idp role mapping section


text:
Enterprise login flow gets failed if the adaptive.sh script is not executed

Describe the issue:
Please refer to this screencast.
https://user-images.githubusercontent.com/13362482/180718921-829b4d8e-9be6-4d49-9c19-9a2dc1a33f4d.mov
How to reproduce:

Up and running the wso2 identity server 6.0.0 without executing the adaptive.sh
Login to the console - https://localhost:9443/console
Create an organization under Super organization - E.g 'Star'
Create an organization IDP
Create a SPA application under the Super organization and make it a shared application with the 'Star' organization
In the sign-in method add the created organization IDP as one of the log in options.
Login to the SPA application with created organization IDP.
You will end up with the following error message

[2022-07-25 12:41:18,411] [21afbb53-d113-4b4b-a9f4-20e5becca9c7] ERROR {org.wso2.carbon.identity.application.authentication.framework.handler.request.impl.DefaultRequestCoordinator} - Exception in Authentication Framework java.lang.UnsupportedOperationException
	at java.base/java.util.AbstractMap.put(AbstractMap.java:209)
	at org.wso2.carbon.identity.organization.management.authn.OrganizationAuthenticator.process(OrganizationAuthenticator.java:232)
	at org.wso2.carbon.identity.application.authentication.framework.handler.step.impl.DefaultStepHandler.doAuthentication(DefaultStepHandler.java:579)
	at org.wso2.carbon.identity.application.authentication.framework.handler.step.impl.DefaultStepHandler.handleRequestFromLoginPage(DefaultStepHandler.java:516)
	at org.wso2.carbon.identity.application.authentication.framework.handler.step.impl.DefaultStepHandler.handle(DefaultStepHandler.java:211)
	at org.wso2.carbon.identity.application.authentication.framework.handler.sequence.impl.DefaultStepBasedSequenceHandler.handle(DefaultStepBasedSequenceHandler.java:187)
	at org.wso2.carbon.identity.application.authentication.framework.handler.sequence.impl.GraphBasedSequenceHandler.handle(GraphBasedSequenceHandler.java:116)
	at org.wso2.carbon.identity.application.authentication.framework.handler.request.impl.DefaultAuthenticationRequestHandler.handle(DefaultAuthenticationRequestHandler.java:189)
	at org.wso2.carbon.identity.application.authentication.framework.handler.request.impl.DefaultRequestCoordinator.handle(DefaultRequestCoordinator.java:281)
	at org.wso2.carbon.identity.application.authentication.framework.servlet.CommonAuthenticationServlet.doPost(CommonAuthenticationServlet.java:57)
	at org.wso2.carbon.identity.application.authentication.framework.servlet.CommonAuthenticationServlet.doGet(CommonAuthenticationServlet.java:47)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:655)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
	at org.eclipse.equinox.http.helper.ContextPathServletAdaptor.service(ContextPathServletAdaptor.java:37)
	at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
	at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
	at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:60)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
	at org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:68)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
	at org.owasp.csrfguard.CsrfGuardFilter.doFilter(CsrfGuardFilter.java:72)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
	at org.wso2.carbon.tomcat.ext.filter.CharacterSetFilter.doFilter(CharacterSetFilter.java:65)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
	at org.apache.catalina.filters.HttpHeaderSecurityFilter.doFilter(HttpHeaderSecurityFilter.java:126)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
	at org.wso2.carbon.identity.context.rewrite.valve.TenantContextRewriteValve.invoke(TenantContextRewriteValve.java:119)
	at org.wso2.carbon.identity.context.rewrite.valve.OrganizationContextRewriteValve.invoke(OrganizationContextRewriteValve.java:112)
	at org.wso2.carbon.tomcat.ext.valves.SameSiteCookieValve.invoke(SameSiteCookieValve.java:38)
	at org.wso2.carbon.identity.cors.valve.CORSValve.invoke(CORSValve.java:89)
	at org.wso2.carbon.identity.authz.valve.AuthorizationValve.invoke(AuthorizationValve.java:149)
	at org.wso2.carbon.identity.auth.valve.AuthenticationValve.invoke(AuthenticationValve.java:110)
	at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:106)
	at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:49)
	at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:67)
	at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:152)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687)
	at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:63)
	at org.wso2.carbon.tomcat.ext.valves.RequestEncodingValve.invoke(RequestEncodingValve.java:49)
	at org.wso2.carbon.tomcat.ext.valves.RequestCorrelationIdValve.invoke(RequestCorrelationIdValve.java:137)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
	at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.base/java.lang.Thread.run(Thread.java:834)

Expected behavior:
As per the current design if its not supported without the adaptive script, there should be a proper error message. Ideally the flow should work without executing the adaptive script.
Environment information (Please complete the following information; remove  any unnecessary fields) :

Product Version: wso2is-6.0.0-alpha4-SNAPSHOT
OS: Mac
Database: H2
Java Version: JDK 11

Optional Fields
Related issues:

Suggested labels:

@sadilchamishka is this fixed?

Addressed by - https://github.com/wso2/product-is/issues/14383

authors: Kanapriya dewniMW sadilchamishka


text:
[Migration] Account lock behavior when Initial account lock duration is set to 0

Describe the issue:

There is a behavior change of the account lock feature when Initial account lock duration is set to 0

Previous product versions we have allowed to set value 0 to the Initial account lock duration configuration from the UI and when it is set to 0, the account lock feature is behave as below previously.

The user will be locked after max failed attempts are reached.
The user will be locked until the admin unlock the user in basic authentication.
https://is.docs.wso2.com/en/6.1.0/guides/identity-lifecycles/lock-accounts-by-failed-login-attempts/

Currently, the console does not allow setting the Initial account lock duration to 0; it must be between 1 and 1440 minutes (1 day). As a result, the feature where the user remains locked after the maximum failed attempts, until the admin manually unlocks the account, is not functioning correctly because a value greater than 0 is always required.

This behavior in the UI poses an issue when migrating from a previous product version to the latest one, especially if the Initial account lock duration was already set to 0. If users attempt to update any other account lock configuration and click the update button, the update will fail because the Initial account lock duration is set to 0. They will be forced to change this value to something greater than 0, which disrupts the use case of indefinitely locking the user until the admin unlocks the account.

How to reproduce:

Enable the account lock feature and try to set the value Initial account lock duration to 0. You will be not able to do it.
Try to set it to 0 from a previous product version and migrate to the latest product version. And try to edit another config from the UI of the Login attempts. You will not be able to update it because Initial account lock duration is set to 0 and you have to change it.
Try out the account lock feature with Initial account lock duration= 0` and after max failed attempts.

Setup the usecase in previous version and try to migrate to a new version. then test the use case again.
Try to edit another config from the UI of the Login attempts. You will not be able to update it because Initial account lock duration is set to 0 and you have to change it.

Expected behavior:

The behavior of the previous use case in a older product version should be remain after migrating to the new version.
Need to document this behavior change on the migration doc.

@sandushi is there any blockers to merge the PRs?

@sandushi any update regarding the PRs? Can we please get it merge? Is there any blockers?

Update

The back end change is merged.
Front end PR needs some more improvements to provide the UI with better UX  suggested by @brionmario .

authors: nilasini sandushi


text:
Cannot specifically identify session expiry event

With IS Analytics we had the capability of identifying session expiry events. Currently we don't have this capability. This is needed to cleanup tasks of sessions such as sending back-channel logout requests to service providers on session timeouts, etc.

This issue is being closed due to extended inactivity. Please feel free to reopen it if further attention is needed. Thank you for helping us keep the issue list relevant and focused!

authors: isharak johannnallathamby


text:
Error in read_nwp_transit_network on NWP exported by Emme 4.6.2

I got an the following error while running read_nwp_transit_network on an nwp exported by Emme 4.6.2
  ---------------------------------------------------------------------------
  IntCastingNaNError                        Traceback (most recent call last)
  Cell In[107], line 1
  ----> 1 tl, ts = balsa.read_nwp_transit_network(outputs_dir / 'AssignedNetwork' / 'AM_Transit.nwp')

  File ~\Miniconda3\envs\gtam-validation\lib\site-packages\balsa\routines\io\nwp.py:293, in read_nwp_transit_network(nwp_fp)
      291 transit_segments['jnode'] = transit_segments.groupby('line')['inode'].shift(-1)
      292 transit_segments['seg_seq'] = (transit_segments.groupby('line').cumcount() + 1).astype(int)
  --> 293 transit_segments['loop'] = (transit_segments.groupby(['line', 'inode', 'jnode'])['seg_seq'].cumcount() + 1).astype(int)
      294 transit_segments.dropna(inplace=True)  # remove rows without dwt, ttf, us1, us2, us3 data (i.e. the padded rows)
      295 transit_segments = transit_segments[['line', 'inode', 'jnode', 'seg_seq', 'loop', 'dwt', 'ttf', 'us1', 'us2', 'us3']].copy()

  File ~\Miniconda3\envs\gtam-validation\lib\site-packages\pandas\core\generic.py:6240, in NDFrame.astype(self, dtype, copy, errors)
     6233     results = [
     6234         self.iloc[:, i].astype(dtype, copy=copy)
     6235         for i in range(len(self.columns))
     6236     ]
     6238 else:
     6239     # else, only a single dtype is given
  -> 6240     new_data = self._mgr.astype(dtype=dtype, copy=copy, errors=errors)
     6241     return self._constructor(new_data).__finalize__(self, method="astype")
     6243 # GH 33113: handle empty frame or series

  File ~\Miniconda3\envs\gtam-validation\lib\site-packages\pandas\core\internals\managers.py:448, in BaseBlockManager.astype(self, dtype, copy, errors)
      447 def astype(self: T, dtype, copy: bool = False, errors: str = "raise") -> T:
  --> 448     return self.apply("astype", dtype=dtype, copy=copy, errors=errors)

  File ~\Miniconda3\envs\gtam-validation\lib\site-packages\pandas\core\internals\managers.py:352, in BaseBlockManager.apply(self, f, align_keys, ignore_failures, **kwargs)
      350         applied = b.apply(f, **kwargs)
      351     else:
  --> 352         applied = getattr(b, f)(**kwargs)
      353 except (TypeError, NotImplementedError):
      354     if not ignore_failures:

  File ~\Miniconda3\envs\gtam-validation\lib\site-packages\pandas\core\internals\blocks.py:526, in Block.astype(self, dtype, copy, errors)
      508 """
      509 Coerce to the new dtype.
      510
     (...)
      522 Block
      523 """
      524 values = self.values
  --> 526 new_values = astype_array_safe(values, dtype, copy=copy, errors=errors)
      528 new_values = maybe_coerce_values(new_values)
      529 newb = self.make_block(new_values)

  File ~\Miniconda3\envs\gtam-validation\lib\site-packages\pandas\core\dtypes\astype.py:299, in astype_array_safe(values, dtype, copy, errors)
      296     return values.copy()
      298 try:
  --> 299     new_values = astype_array(values, dtype, copy=copy)
      300 except (ValueError, TypeError):
      301     # e.g. astype_nansafe can fail on object-dtype of strings
      302     #  trying to convert to float
      303     if errors == "ignore":

  File ~\Miniconda3\envs\gtam-validation\lib\site-packages\pandas\core\dtypes\astype.py:230, in astype_array(values, dtype, copy)
      227     values = values.astype(dtype, copy=copy)
      229 else:
  --> 230     values = astype_nansafe(values, dtype, copy=copy)
      232 # in pandas we don't store numpy str dtypes, so convert to object
      233 if isinstance(dtype, np.dtype) and issubclass(values.dtype.type, str):

  File ~\Miniconda3\envs\gtam-validation\lib\site-packages\pandas\core\dtypes\astype.py:140, in astype_nansafe(arr, dtype, copy, skipna)
      137     raise TypeError(f"cannot astype a timedelta from [{arr.dtype}] to [{dtype}]")
      139 elif np.issubdtype(arr.dtype, np.floating) and is_integer_dtype(dtype):
  --> 140     return _astype_float_to_int_nansafe(arr, dtype, copy)
      142 elif is_object_dtype(arr.dtype):
      143
      144     # if we have a datetime/timedelta array of objects
      145     # then coerce to a proper dtype and recall astype_nansafe
      147     if is_datetime64_dtype(dtype):

  File ~\Miniconda3\envs\gtam-validation\lib\site-packages\pandas\core\dtypes\astype.py:182, in _astype_float_to_int_nansafe(values, dtype, copy)
      178 """
      179 astype with a check preventing converting NaN to an meaningless integer value.
      180 """
      181 if not np.isfinite(values).all():
  --> 182     raise IntCastingNaNError(
      183         "Cannot convert non-finite values (NA or inf) to integer"
      184     )
      185 if dtype.kind == "u":
      186     # GH#45151
      187     if not (values >= 0).all():

  IntCastingNaNError: Cannot convert non-finite values (NA or inf) to integer

I think it's a pretty easy fix, by replacing line 295 with the following:
transit_segments['jnode'] = transit_segments.groupby('line')['inode'].shift(-1).fillna(0)

Note the additional fillna. For some reason, this version of the TMG toolbox / Emme doesn't denote the final J-node by a 0 but instead leaves it blank.

@bryce-sharman can you please post a snippet of the Emme transaction file where the J-node is blank (please also include some adjacent rows)?

Hi Brian, I sent it to your email.

So the issue is not a problem with the Emme transaction file as the file only lists out the nodes that form the transit line path. The balsa code will use the list of nodes to determine transit segments IDs (i.e., [line ID]-[i node]-[j node]). The error you are seeing might have been caused by changes inside Pandas, as the offending line now produces NaN values. Code has been updated to mitigate this issue.

Makes sense. Thanks Brian!

authors: bccheung bryce-sharman

repo: wsp-sag/balsa


text:
Consider to use pydocstyle alongside with Black

More details you can find here: pydocstyle

Im down with this idea, but perhaps in the flake8 flavor (see #416 ) ? according to davidism the Black project already uses Flake8 which would be beneficial. I'll have to check it later.

Actually, Flake8 doesn't support checks of docstrings.

Black is good and you can use it as linter & fomatter, but it omits docstrings. You can use pydocstyle to lint errors and pyment to format them according to PEP 257.

I'm not super concerned with docstrings other than wrapping them at 72, which I'm in the process of doing right now. We already build the docs and fail on error in CI, so that's probably good enough. Let's focus on code for a while. ;-)

Got it, thanks for response guys :+1:

authors: davidism vald-phoenix whb07

repo: wtforms/wtforms


text:
[Update] Update telemetry feedback of az interactive

[Update] Optimize some variable names(rec-->recommendation)
[Add] add api_version to the feedback
[Add] Parsing api_version from api responses
[Update] Optimize feedback function by using dictionary data [Add] add new property "recommendation" under telemetry "Properties"

This checklist is used to make sure that common guidelines for a pull request are followed.
Related command

General Guidelines

[ ] Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
[ ] Have you run python scripts/ci/test_index.py -q locally?

For new extensions:

[ ] My extension description/summary conforms to the Extension Summary Guidelines.

About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update src/index.json automatically.
You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify src/index.json.

The modification of the telemetry and api function must be done first.


text:
Bothersome bug... I always get a piece of the KAP's recording window on my VIDEO...

Hi:
I enjoy your script very much... but every time I record something with it on my Macbook Air... I get part of the recording window, this is for about 3 seconds once recording has been initiated, and this portion of your interface appears inside my chrome browser's top content which I record, so it looks like this... See picture... Please let me know how to fix this so it DOES NOT appear anymore. Thanks!

You can click at the Kap menu icon to hide that window before recording, and then hit enter to start recording. But I think it's also very reasonable to automatically hide that window when recording starts.

Duplicate of #3

authors: hikerpig inglesuniversal skllcrn

repo: wulkano/kap

license: mit


text:
fix: avoid path.Join() for building filesystem paths

Otherwise we end up producing inconsistent paths. Use filepath.Join()
instead.

This needs to be tested on Windows before merging

Windows binary attached, in case anyone has a chance to test it before I do
wunderctl.exe.zip

@johnrazmus Thanks for the report. There were several more occurrences of incorrectly used path.Join() calls. I've gone through all the occurrences and changed the ones referring to the filesystem to use filepath.Join() instead.
Here's an updated Windows binary
wunderctl.exe.zip

Pathings seem good now, ty!

@johnrazmus Thanks for your help! The fix should be in the next release.

authors: fiam johnrazmus

repo: wundergraph/wundergraph


text:
Feature requests: keyboard shortcuts, search

Love this! Some suggestions:

The space-bar should also be a default shortcut for PAGE_DOWN, like it is in more and less.
The vim-like shortcuts for paging up and down should include Ctrl-U for PAGE_UP and Ctrl-D for PAGE_DOWN.
At the end of a chapter, PAGE_DOWN should take me to the next chapter, just like turning a page in a book.
Search would be great! Again, more and less offer a good model for keyboard shortcuts that will be familiar to most users.
(This is a reach but): vim-like counts would be cool: e.g., "5j" goes down 5 lines; 3l jumps three chapters forward...

Sorry: 2 is wrong. The vim bindings are 'ctrl-b' for PAGE_UP and 'ctrl-f' for PAGE_DOWN. But I think it would make more sense to use the "vim-like" bindings that less and more use: 'b' for PAGE_UP and 'f' for PAGE_DOWN.

Thanks for some suggestions, here my thoughts:

forgot about that, let me consider it first tho
Since I use two ctrl button, it kinda too much work for my finger, so i thought changing it to capital J/K will do for now, but might reconsider it if anyone else ask for this binding...
That's originated from my personal issue, so I always have this anxiety when flipping a page, did I miss one line? so i made it like that
Some things that I ditched when choosing this, idk know the term, algorithm or something, is reading percentage and search feature, and I want reading percentage more than search, so dent expect search anytime soon
need more thinking for this,

I've implemented everything but (4) on my fork: https://github.com/dsanson/epr. I won't open a pull request, since I'm sure that if you decide to implement any of these things, you will want to do it in your own way!

Sorry just read it, and I just followed your suggestions: 1 & 3 thanks... sorry, not implementing all, I still think to make it more sturdy like not depending on html2text, especially this is weekend, before adding features 4 & 5... It does independent from html2text now and support opening images if you might want to add them to your fork...

Hello there @dsanson , I just realize from issue #8 that actually people not only using this epr just to read fictions which my initial motivations, so I thought  that vim like counter movement is unnecessary to read fictions. But since now I understand, is it too much to ask for you to pull request regarding that counter like movement? I just read your fork, and it's actually so new to me about counter algorithm.
With image support I just finished, now I feel satisfied with my idea and hoping for other's people idea to improve thiss epr, especially htmll to text rendering...

I am super busy with other things right now, but I’d be happy to try to make a clean pull request in a week or two. The basic idea behind the algorithm I used (which may not be the best) is:

as part of the basic loop detecting key presses, check numeral key presses and combine successive numeral key presses into a count. (This is easiest to do by concatenating the numerals into a string, which can later be converted to an integer.)
when a motion command is detected, check to see the value of the count. If there is no count, then do it once. Otherwise, do it count times, and reset the count to the empty string.

Whenever you feel free @dsanson , not in hurry ofc, because having prefix arguments to adjust text width like 60= is probably so much better than holding = or -, it's lagging so much that sometimes I feel text wont come out...
I tried your fork and just like your tips in your last comment, that's neww to me... I almost made one with timeout to sepearate motion and counter... thanks for the tips...

[x] Added search function, though only capable of finding text that span across single line.

authors: dsanson wustho

repo: wustho/epr


text:
iojs support

Dont set buffer length explicitly to null. Setting it to null causes some versions of node & iojs to interpret it as 0, causing buffer to be truncated. This closes https://github.com/wvanbergen/node-vertica/issues/36

Awesome, thanks for fixing!

authors: sudhakar wvanbergen

repo: wvanbergen/node-vertica


text:
Additional interface data in NetBoxInventory plugin

Wondering if this could potentially be added to this repo.  This code handles conditionally pulling in interfaces and assigned IP addresses for each device in inventory.
Also, may see I noticed the logic to run both paginated and non-paginated wasn't set correctly and I fixed that I believe.
I can add tests as well but not super familiar with requests_mock so thought I would run this by you and made sure it would be accepted before adding tests.  Just let me know.  Thanks.

Oh and here is a basic test I did run using a docker instance.
In [1]: from nornir_netbox.plugins.inventory.netbox import NetBoxInventory2
In [2]: inv = NetBoxInventory2(nb_url='http://localhost:8000', nb_token='0123456789abcdef0123456789abcdef01234567', ssl_verify=Fals
...: e, interfaces=True)
In [3]: data = inv.load()
In [4]: data.hosts['test2'].data['interfaces']['ethernet1']
Out[4]:
{'id': 5,
'device': {'id': 6,
'url': 'http://localhost:8000/api/dcim/devices/6/',
'name': 'test2',
'display_name': 'test2'},
'name': 'ethernet1',
'type': {'value': '1000base-t', 'label': '1000BASE-T (1GE)', 'id': 1000},
'enabled': True,
'lag': None,
'mtu': None,
'mac_address': None,
'mgmt_only': False,
'description': '',
'connected_endpoint_type': None,
'connected_endpoint': None,
'connection_status': None,
'cable': None,
'mode': None,
'untagged_vlan': None,
'tagged_vlans': [],
'tags': [],
'count_ipaddresses': 1,
'ip_addresses': [{'id': 2,
'family': {'value': 4, 'label': 'IPv4'},
'address': '1.1.1.1/24',
'vrf': None,
'tenant': None,
'status': {'value': 'active', 'label': 'Active', 'id': 1},
'role': None,
'interface': {'id': 5,
'url': 'http://localhost:8000/api/dcim/interfaces/5/',
'device': {'id': 6,
'url': 'http://localhost:8000/api/dcim/devices/6/',
'name': 'test2',
'display_name': 'test2'},
'virtual_machine': None,
'name': 'ethernet1'},
'nat_inside': None,
'nat_outside': None,
'dns_name': '',
'description': '',
'tags': ['my_tag'],
'custom_fields': {},
'created': '2020-08-25',
'last_updated': '2020-08-25T22:44:13.784935Z'}]}

I'm adding more after thinking about it.  I'd like to add virtual-machines along with devices as well.  I will send another PR after I've got that done and created some tests.


text:
All tooltips are visible instead of current

Copied from https://github.com/wwayne/react-tooltip/issues/89 since it still occurs:
When several tooltips are instantiated on a single page, the data-event click doesn't act fully as a toggle to hide all active tooltips. Not sure if this is the desired behavior but it would make sense that only the current tooltip be activated at a time.

what with this issue?

Hey @wwayne, any chance we can get this fixed?
I created a simple React project that demonstrates this issue:
https://github.com/apandichi/demo-tooltip-hide-issue
Steps to reproduce the problem:

Click the first face.
Click the second face.
I expect that the first tooltip is hidden (as per globalEventOff='click'). Instead, both tooltips are displayed.

Is there a fix planned for this issue? I'm guessing not given its age. It can apparently be resolved by only having one tooltip component on a given page, but it'd be great to not have to refactor the way tooltips have been implemented across our application just to work around this. eventPropagationMode and globalEventOff don't solve it :disappointed:

Pinging @aronhelser as he seems to be more active lately

I won't be able to solve it, but a PR would be welcome. Seems like looking at what happens inside the globalEventOff handler is a place to start...

@aronhelser Please see the referenced PR and the my updated demo app. This seems to have solved the issue.
Please review, I'm not sure if I dealt with this correctly. I used the isCapture from props instead of the isCapture() decorator. I couldn't figure out what the target is supposed to be in that global scope where globalEventOff is handled.
Thanks!

authors: VanDavv apandichi aronhelser mikebabb monrus

repo: wwayne/react-tooltip


text:
Fix broken README Credits Links

Fix: scratchapixel, nvidia
To https: patapom

@miyu thanks :)

authors: miyu wwwtyro

repo: wwwtyro/glsl-atmosphere

license: unlicense


text:
在async函数中使用assert就会报错，不知道为什么视频中可以正常执行？

app.post('/admin/api/login', async (req, res) => {
    const { username, password } = req.body
    // 1.根据用户名找用户

    const user = await AdminUser.findOne({ username }).select('+password')
    assert(user, 422, '用户不存在')
    // 2.校验密码
    const isValid = require('bcrypt').compareSync(password, user.password)
    assert(isValid, 422, '密码错误')
    // 3.返回token
    const token = jwt.sign({ id: user._id }, app.get('secret'))
    res.send({ token })
  })

此段代码 加上async抛异常就报错，去掉可以正常，但是用户查询还需要异步，不知道视频主是通过什么操作实现的功能。

对比了下package.json中的express版本号，发现视频中使用了最新的版本，这个问题在新版本中已被修复，升级express版本问题解决。


text:
[vscode] Provide Function and Method Signatures Tooltips via Language Server

We would like to make AskScript developer-friendly, therefore we need developer tools in VS Code, such as providing function and method signatures tooltips, similar to what Typescript has:

Info on integration with VS Code can be found here: https://code.visualstudio.com/api/language-extensions/programmatic-language-features#help-with-function-and-method-signatures

Blocked on #45 (type semantics)

repo: xFAANG/askql


text:
Add support for events in transaction receipt

Add support for events added in StarkNet v0.7.0.

Closing in favor of #27.

repo: xJonathanLEI/starknet-rs


text:
GPR

added two gpr fit() functions, struct and dependencies

Can you add some test cases? Can you see how tests are done for the other functions?

Can you add some test cases? Can you see how tests are done for the other functions?

Sure - I will add some tests.

I will share some test in a day or two

All tests are failing @sourish-cmi, but they aren't related to this PR. We need to spend some time and fix the package.

Sorry guys I will try to put some test cases asap

@ayushpatnaikgit @MarlaJahari @ShouvikGhosh2048
Here are some tests - we should try:
Test 1:
container=fit(@formula(MPG ~0+ HP),df,GaussianProcessesRegression(),[:MPG, :HP],MeanZero(), SE(0.0,0.0),Euclidean())

Test 1a:
Kernel parameters should provide values:
5.464908573213355 and 3.3936838718120708
Test 1b:
Variance of observation noise = 9.667961411202336
Test 1c:
Marginal Log-Likelihood = -89.745

@sourish-cmi These (exact parameters) tests were run on the function before PR was made. We got the specified values (documented as a part of test cases before function definition).

@sourish-cmi These (exact parameters) tests were run on the function before PR was made. We got the specified values (documented as a part of test cases before function definition).

I think that should be fine. The test case should be developed based on the same.
@ShouvikGhosh2048 can you please add test case?

Should I add it to this branch, or add it after this PR is merged?

Should I add it to this branch, or add it after this PR is merged?

I think you can add this test to this branch. Once the PR is merged - give a KT to @MarlaJahari - then she can add other tests as separate PR later.

I don't have the required permissions.
Changes to be made:

Create a new file test/numerical/bayesian/GaussianProcessesRegression.jl and add the following:

mtcars = dataset("datasets", "mtcars")

CRRao.set_rng(StableRNG(123))
model = fit(@formula(MPG ~ 0 + HP), mtcars, GaussianProcessesRegression(), [:MPG, :HP], MeanZero(), SE(0.0, 0.0), Euclidean())

@test get_params(model.chain)[2:3] ≈ [5.464908573213355, 3.3936838718120708]
@test noise_variance(model.chain) ≈ 9.667961411202336
@test model.chain.target ≈ -89.74473360543863

Change test/Project.toml to:

[deps]
Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7"
GLM = "38e38edf-8417-5370-95a0-9cbb8c7f171a"
GaussianProcesses = "891a1506-143c-57d2-908e-e1f8e92e6de9"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
RDatasets = "ce6b1742-4840-55fa-b093-852dadbb1d8b"
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
StatsModels = "3eaba693-59b7-5ba5-a881-562e759f1c8d"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

Change test/runtests.jl to:

using CRRao, Test, StableRNGs, Logging, RDatasets, StatsModels, GLM, Statistics, Distances
using GaussianProcesses: MeanZero, SE, get_params, noise_variance

Logging.disable_logging(Logging.Warn)

CRRao.setprogress!(false)
CRRao.set_rng(StableRNG(123))

@testset "CRRao.jl" begin
    @testset "Basic Tests" begin
        @testset "Linear Regression" begin
            include("basic/LinearRegression.jl")
        end

        @testset "Logistic Regression" begin
            include("basic/LogisticRegression.jl")
        end

        @testset "Poisson Regression" begin
            include("basic/PoissonRegression.jl")
        end

        @testset "Negative Binomial Regression" begin
            include("basic/NegBinomialRegression.jl")
        end
    end

    @testset "Numerical Tests" begin
        @testset "Random Number Generator" begin
            include("numerical/RandomNumberGenerator.jl")
        end

        @testset "Frequentist" begin
            include("numerical/frequentist/tests.jl")
        end

        @testset "Bayesian" begin
            @testset "Gaussian Processes Regression" begin
                include("numerical/bayesian/GaussianProcessesRegression.jl")
            end

            @testset "Linear Regression" begin
                include("numerical/bayesian/LinearRegression.jl")
            end

            @testset "Logistic Regression" begin
                include("numerical/bayesian/LogisticRegression.jl")
            end

            @testset "Poisson Regression" begin
                include("numerical/bayesian/PoissonRegression.jl")
            end

            @testset "Negative Binomial Regression" begin
                include("numerical/bayesian/NegBinomialRegression.jl")
            end
        end
    end
end

@ShouvikGhosh2048 @ayushpatnaikgit  -- some checks are failing. Maybe some version issue. Not sure. What to do?

Similar issue occurs in https://github.com/xKDR/CRRao.jl/issues/123
The GPR tests pass in the CI.

Similar issue occurs in #123
The GPR tests pass in the CI.

Yes - this is a recurring issue. How do we solve it?

@sourish-cmi  I think it comes from ADgradient() function of the LogDensityProblemsAD.jl package. For every regression problem we're trying to specify "gradientconfig" as a parameter- but it returns that is an unsupported keyword argument. It might be possible they've made updates or changes in the version we're trying to call.

@sourish-cmi It might also be possible the Turing version (when supplying parameters in func) we're using doesn't support the keyword

@MarlaJahari  Strange - but possible. I think we should try to figure out exactly what changes in Turing.jl  or ADgradient() are causing the problem

authors: MarlaJahari ShouvikGhosh2048 ayushpatnaikgit sourish-cmi


text:
Automatic brightness for eingang is activated but no configuration is entered, the manual mode is activated.

Hallo,
wie bekomm ich den Fehler weg? Welche Configuration ist da gemeint?
Automatic brightness for eingang is activated but no configuration is entered, the manual mode is activated.

Damit ist die automatische Helligkeitssteuerung gemeint, kannst du mir mal deine config aus system.adapter.fully-tablet-control.0 hier reinposten

Installiere mal die neue Version, da sollte die Meldung nicht mehr kommen v0.3.7

Top Dankeschön
{   "mdmDisableVolumeButtons": false,   "playMedia": false,   "actionBarFgColor": -1,   "deleteHistoryOnReload": false,   "wifiSSID": "",   "actionBarBgUrl": "",   "mdmApkToInstall": "",   "mdmDisableADB": true,   "movementWhenUnplugged": false,   "tabsBgColor": -2236963,   "mqttDeviceInfoTopic": "$appId/deviceInfo/$deviceId",   "errorUrlOnDisconnection": "0",   "screensaverBrightness": "",   "showActionBar": false,   "mdmDisableScreenCapture": false,   "restartOnCrash": true,   "imageScaleType": "3",   "deleteWebstorageOnReload": false,   "forceDeviceAdmin": false,   "kioskMode": false,   "showStatusBar": false,   "kioskWifiPinAction": "0",   "knoxDisableAndroidBeam": false,   "mqttBrokerUrl": "",   "removeNavigationBar": false,   "kioskAppWhitelist": "",   "softKeyboard": true,   "knoxDisableSettingsChanges": false,   "kioskHomeStartURL": false,   "knoxDisableSDCardWrite": false,   "authPassword": "",   "launchOnBoot": true,   "movementStopsSleepOnPowerDisconnect": false,   "knoxDisableUsbHostStorage": false,   "inUseWhileAudioPlaying": false,   "mdmPasswordQuality": "0",   "resendFormData": false,   "clearCacheEach": false,   "sleepOnPowerConnect": false,   "knoxDisableWiFi": false,   "knoxDisableAirViewMode": false,   "pauseMotionInBackground": false,   "mqttBrokerPassword": "",   "rootEnable": false,   "resetZoomEach": false,   "showHomeButton": true,   "wifiMode": "0",   "motionCameraId": "",   "waitInternetOnReload": true,   "knoxDisableWifiTethering": false,   "knoxDisableBluetooth": false,   "inUseWhileAnotherAppInForeground": false,   "knoxDisableGoogleCrashReport": false,   "geoLocationAccess": false,   "mqttClientId": "",   "knoxDisableVideoRecord": false,   "barcodeScanTargetUrl": "",   "enableUrlOtherApps": false,   "showNavigationBar": false,   "timeToScreenOffV2": "0",   "loadCurrentPageOnReload": false,   "lastVersionInfo": "1.47.2-play",   "killOtherApps": false,   "loadOverview": false,   "remoteAdminScreenshot": true,   "screenOnOnMotion": true,   "useWideViewport": true,   "enableTapSound": false,   "clientCaPassword": "",   "forceScreenOrientation": "0",   "movementDetection": false,   "progressBarColor": -13611010,   "formAutoComplete": true,   "webHostFilter": false,   "screenOffOnPowerConnect": false,   "advancedKioskProtection": true,   "mdmLockTaskGlobalActions": true,   "swipeTabs": false,   "screensaverPlaylist": "",   "webcamAccess": false,   "screenBrightness": "0",   "urlWhitelist": "",   "enableQrScan": false,   "launcherInjectCode": "",   "timeToRegainFocus": "0",   "knoxDisableClipboard": false,   "cloudService": false,   "initialScale": "0",   "kioskExitGesture": "0",   "wssServiceUrl": "",   "barcodeScanIntent": "",   "motionDetection": false,   "resumeVideoAudio": true,   "inUseWhileKeyboardVisible": false,   "deviceName": "",   "wifiEnterprisePassword": "",   "remoteAdminCamshot": true,   "bluetoothMode": "0",   "reloadOnScreensaverStop": false,   "forceSleepIfUnplugged": false,   "actionBarInSettings": false,   "timeToGoBackground": "0",   "enablePopups": false,   "screensaverOtherApp": false,   "screensaverWallpaperURL": "fully://color#000000",   "recreateTabsOnReload": false,   "timeToClearSingleAppData": "0",   "mdmDisableKeyguard": false,   "forceScreenOrientationGlobal": false,   "knoxHideStatusBar": false,   "knoxDisableDeveloperMode": false,   "addressBarBgColor": -2236963,   "showAddressBar": false,   "remoteAdminLan": true,   "timeToShutdownOnPowerDisconnect": "0",   "knoxDisableTaskManager": false,   "knoxEnabled": false,   "knoxDisableBackup": false,   "reloadPageFailure": "0",   "mdmLockTaskOverviewButton": false,   "disableIncomingCalls": false,   "cacheMode": "-1",   "knoxDisableEdgeScreen": false,   "forceHideKeyboard": false,   "alarmSoundFileUrl": "",   "mqttEventTopic": "$appId/event/$event/$deviceId",   "disableNotifications": false,   "folderCleanupTime": "",   "disableOtherApps": true,   "mdmDisableSafeModeBoot": true,   "remoteAdminFileManagement": false,   "knoxDisableMtp": false,   "compassSensitivity": "50",   "textSelection": false,   "websiteIntegration": false,   "motionFps": "5",   "knoxDisableCellularData": false,   "proximityScreenOff": false,   "videoCaptureUploads": false,   "reloadOnInternet": false,   "enableLocalhost": false,   "statusBarColor": 0,   "usageStatistics": false,   "isRunning": true,   "resetWifiOnDisconnection": false,   "sleepOnPowerDisconnectDelay": "0",   "fileUploads": false,   "singleAppMode": false,   "launcherApps": "",   "appLauncherBackgroundColor": -1,   "reloadEachSeconds": "0",   "forceImmersive": false,   "mdmSystemAppsToEnable": "",   "knoxDisableScreenCapture": false,   "removeStatusBar": false,   "knoxDisableWifiDirect": false,   "knoxHideNavigationBar": false,   "mdmDisableStatusBar": false,   "folderCleanupList": "",   "kioskWifiPin": "",   "showShareButton": false,   "webviewDarkMode": "1",   "knoxDisableMultiUser": false,   "redirectBlocked": false,   "forceSwipeUnlock": false,   "jsAlerts": true,   "screensaverDaydream": false,   "mdmDisableUsbStorage": false,   "defaultWebviewBackgroundColor": -1,   "batteryWarning": "0",   "knoxDisableFactoryReset": false,   "lockSafeMode": false,   "kioskAppBlacklist": "",   "keepOnWhileFullscreen": true,   "graphicsAccelerationMode": "2",   "wifiKey": "",   "reloadOnScreenOn": false,   "safeBrowsing": false,   "barcodeScanBroadcastExtra": "",   "deleteCookiesOnReload": false,   "loadContentZipFileUrl": "",   "sleepOnPowerDisconnect": false,   "knoxDisableFirmwareRecovery": false,   "knoxDisableVpn": false,   "runInForeground": true,   "screenOnOnMovement": true,   "appLauncherScaling": "100",   "barcodeScanInsertInputField": false,   "motionSensitivity": "90",   "knoxDisableHomeButton": false,   "inactiveTabsBgColor": -4144960,   "knoxDisableStatusBar": false,   "knoxDisableHeadphoneState": false,   "protectedContent": false,   "accelerometerSensitivity": "80",   "mqttBrokerUsername": "",   "remoteFileMode": "0",   "enableZoom": true,   "playerCacheImages": true,   "detectIBeacons": false,   "navigationBarColor": 0,   "mdmDisableAppsFromUnknownSources": true,   "mainWebAutomation": "",   "mdmMinimumPasswordLength": "5",   "barcodeScanListenKeys": false,   "screensaverOtherAppIntent": "",   "clientCaUrl": "",   "deleteCacheOnReload": false,   "stopScreensaverOnMovement": true,   "mdmApkToInstallInterval": "0",   "knoxDisableOtaUpgrades": false,   "fontSize": "100",   "showQrScanButton": false,   "motionDetectionAcoustic": false,   "forceOpenByAppUrl": "",   "stopScreensaverOnMotion": true,   "audioRecordUploads": false,   "timeToClearLauncherAppData": "0",   "showAppLauncherOnStart": false,   "mdmLockTaskNotifications": false,   "disableScreenshots": false,   "mdmAppLockTaskWhitelist": "",   "actionBarSize": "100",   "knoxDisableSafeMode": false,   "ignoreMotionWhenScreensaverOnOff": false,   "knoxDisableGoogleAccountsAutoSync": false,   "knoxDisableAudioRecord": false,   "volumeLevels": "",   "showRefreshButton": false,   "knoxDisableVolumeButtons": false,   "autoImportSettings": true,   "showForwardButton": true,   "appToRunOnStart": "",   "mqttEnabled": false,   "motionSensitivityAcoustic": "90",   "knoxDisablePowerSavingMode": false,   "killAppsBeforeStartingList": "",   "keepSleepingIfUnplugged": false,   "userAgent": "0",   "knoxDisableUsbDebugging": false,   "injectJsCode": "",   "disableVolumeButtons": true,   "webviewMixedContent": "2",   "environmentSensorsEnabled": false,   "showNewTabButton": false,   "errorURL": "",   "authUsername": "",   "showBackButton": true,   "stopIdleReloadOnMotion": false,   "enableBackButton": true,   "ignoreSSLerrors": true,   "webviewDebugging": false,   "disableStatusBar": true,   "volumeLimits": "",   "confirmExit": true,   "showProgressBar": true,   "knoxDisableRecentTaskButton": false,   "remotePdfFileMode": "0",   "singleAppIntent": "",   "knoxDisableClipboardShare": false,   "knoxDisableBluetoothTethering": false,   "urlBlacklist": "",   "phoneSpeaker": false,   "setWifiWakelock": true,   "customUserAgent": "",   "disableOutgoingCalls": false,   "screenOffInDarkness": false,   "actionBarCustomButtonUrl": "",   "mdmSystemUpdatePolicy": "0",   "knoxDisableAirplaneMode": false,   "enablePullToRefresh": false,   "touchInteraction": true,   "enableFullscreenVideos": true,   "appBlockReturnIntent": "",   "localPdfFileMode": "0",   "showTabCloseButtons": true,   "showMenuHint": true,   "keepScreenOnAdvanced": false,   "disableHomeButton": true,   "appLauncherTextColor": -16777216,   "renderInCutoutArea": true,   "pauseWebviewOnPause": false,   "touchesOtherAppsBreakIdle": false,   "movementBeaconList": "",   "mdmApnConfig": "",   "mdmRuntimePermissionPolicy": "0",   "fadeInOutDuration": "200",   "thirdPartyCookies": true,   "showPrintButton": false,   "mdmLockTaskSystemInfo": false,   "keepScreenOn": false,   "mdmProxyConfig": "",   "knoxDisableMultiWindowMode": false,   "volumeLicenseKey": "",   "forceShowKeyboard": false,   "actionBarBgColor": -15906911,   "disableCamera": false,   "showCamPreview": false,   "addXffHeader": false,   "displayMode": "0",   "tabsFgColor": -16777216,   "barcodeScanBroadcastAction": "",   "remoteAdmin": true,   "mdmLockTaskHomeButton": false,   "webviewDragging": true,   "forceScreenUnlock": true,   "mdmAppsToDisable": "",   "enableVersionInfo": true,   "knoxDisableMicrophoneState": false,   "knoxDisableUsbTethering": false,   "appToRunInForegroundOnStart": "",   "knoxDisableAirCommandMode": false,   "reloadOnWifiOn": false,   "sleepSchedule": "",   "rebootTime": "",   "actionBarTitle": "Fully Kiosk Browser",   "webviewScrolling": true,   "tapsToPinDialogInSingleAppMode": "7",   "knoxDisableBackButton": false,   "actionBarIconUrl": "",   "wifiEnterpriseIdentity": "",   "knoxActiveByKiosk": false,   "timeToScreensaverV2": "0",   "kioskWifiPinCustomIntent": "",   "playAlarmSoundOnMovement": false,   "barcodeScanSubmitInputField": false,   "addRefererHeader": true,   "startURL": "http://192.168.178.200:8082/jarvis/index.html",   "remoteAdminSingleAppExit": false,   "movementBeaconDistance": "5",   "disablePowerButton": true,   "showTabs": false,   "microphoneAccess": false,   "sebExamKey": "",   "pageTransitions": false,   "restartAfterUpdate": true,   "swipeNavigation": false,   "skipReloadIfStartUrlShowing": false,   "launcherBgUrl": "",   "knoxDisablePowerOff": false,   "setRemoveSystemUI": false,   "ignoreMotionWhenMoving": false,   "searchProviderUrl": "https://www.google.com/search?q=",   "setCpuWakelock": true,   "playAlarmSoundUntilPin": false,   "knoxDisableCamera": false,   "desktopMode": false,   "sebConfigKey": "",   "cameraCaptureUploads": false,   "wakeupOnPowerConnect": false,   "autoplayAudio": false,   "autoplayVideos": true,   "knoxDisableNonMarketApps": false,   "wifiType": "WPA_PSK",   "darknessLevel": "10",   "preventSleepWhileScreenOff": false,   "mdmLockTask": false,   "knoxDisablePowerButton": false,   "readNfcTag": false,   "kioskPinEnc": "enc_YL9VlN7ZMbWQJ2/DGhW59m0WilvTRf51x4cKGaZsC0k=",   "remoteAdminPasswordEnc": "enc_ZLdXsbT+1RBjF7LFHSvc5bKs6hwQY/HnQwWrfEM6Jg8vDdgYlT6HZWDZ0A==" }

authors: duczz xXBJXx


text:
GetServiceAsync() does not return if BLE device is disconnected

Hi,
We are dealing with scenario where plugin.ble does not respond:
Scenario:

Get iOS system connected devices using
_adapter.GetSystemConnectedOrPairedDevices(serviceIds);

After getting the device, establish connection to the device using
_adapter.ConnectToDeviceAsync(device, false);

Wait for some time ex:50 seconds

MeanWhile device gets disconnected. DeviceDisconnected event gets fired.

Try to get a service using device.GetServiceAsync(serviceUuid);

Expected behavior
GetServiceAsync() should return null (or) throw an exception
Actual behavior
GetServiceAsync() does not return anything. It hangs there.
Configuration
Version of the Plugin: Plugin.BLE.1.2.0-beta3
Platform: e.g. iOS 10.1.1
Device: e.g. iPhone 6S

see #147

authors: leelatoo smstuebe

repo: xabre/xamarin-bluetooth-le


text:
Adding a new message to a topic from Dashboard

Hey, I like your project very much. Will it include the ability to track messages on a specific 'topic' and add a new message to the topic manually (from dashboard)? That would be a useful thing!
Thank you very much for your replay

if u are admin or topic owner, can view Topic>TopicList Mock function.

		try {
			Properties props = new Properties();
			props.put(CommonClientConfigs.BOOTSTRAP_SERVERS_CONFIG, brokerAddr);
		    admin = new KafkaAdmins(props);
			if(admin!=null) {
				flag = true;
			}
		} catch (Exception e) {
			LOGGER.warn("connect kafka error.",e);
		}finally {
			try {
				if(admin!=null) {
					admin.close();
                }
			} catch (IOException e) {}
		}

authors: TrumanDu lukasz-cpu

repo: xaecbd/KafkaCenter


text:
Fixed 2 typing errors

Xamarin.Auth Pull Request
Fixes 2 typing errors

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request.
Thanks,
.NET Foundation Pull Request Bot

Thanks a lot.
I'm a bit ashamed. The only excuse is that it is sooooo much to do and so little time.

authors: K232 dnfclas moljac


text:
Watch window showing null when variable isn't null!

Not sure if I am raising this in the correct place.
I am not sure this issue is to do with EF or something else.
I am debugging an app that targets monodroid80 using VS2017 version 15.4.4 and witnessing some strange behaviour with variables in the watch windows.
For example, when I do the following:
                var items = visit.Callfile.Survey.SurveyItems.ToList();
                var itemsWithWhere = visit.Callfile.Survey.SurveyItems.Where((a) => true).ToList();
                var orderedSurveyItems = visit.Callfile.Survey.SurveyItems.Where((x) => {
                    return true;
                }).ToList();

Result in watch window are:
items contains 1 result.
itemsWithWhere contains 1 result.
orderedSurveyItems (forgive the name as I know there is no "order by" there) shows as: (null).
I can witness as the prgram executes, that the variable is not really null - the watch windows just reports it as such.
Here is a picture at a breakpoint showing the state of these three variables:

If I rename the variable from orderedSurveyItems to fooVariable - and then re-run the program, it then fixes it - fooVariable shows in the watch window with 1 result as expected. Renaming the variable back to orderedSurveyItems - and the watch window shows it as null again.
My code is executing within an async task - and it appears to be the same problem as described here:
https://stackoverflow.com/questions/37411105/visual-studio-2015-debugger-showing-null-when-object-is-not-null
The only thing special about the variable name orderedSurveyItems that I can see is that the same variable name is also used for a private method which is called later:
 private void PerformCalculations(CallfileVisit visit
            , int surveyItemGroupId
            , IEnumerable<SurveyItem> orderedSurveyItems
            , IList<SurveyItemResponse> surveyItemResponses
            , out int totalNumberOfSurveyItemHaveResponse
            , out int totalNumberOfSurveyItemSkipped)
        {

It's almost as if the watch window is showing the wrong one. When execution enters the above private method, suddenly the watch windows shows orderedSurveyItems as having 1 item. When execution returns to the calling method, orderedSurveyItems shows as null again.
The signature of the method containing this code is as follows:
public async Task<Tuple<IEnumerable<ISurveyItemGroupModel>, bool>> GetSurveyItemGroupsAsync(int visitId)

Not a nice signature in terms of readability, I know.
Operating system: Windows 10
IDE: Visual Studio 2017 15.4.4
Is there somewhere else I should be raising this issue?

Closing. This is just for VS extensibility authors.

Ok. Is the xamarin mono debugger not a VS extension point? Apologies. I'll try and rause this through vs report an issue instead!

Sorry about the confusion of repositories. If you are consuming the Xamarin
toold for Visual Studio, the "Send Feedback" inside VS is the most
appropriate way to reach us, yes. We actively monitor it.
Thanks!
--
/kzu from mobile

authors: dazinator kzu


text:
[Bug] TouchEffect.NativeAnimation prevents tap to be passed to child elements

Description
TouchEffect.NativeAnimation prevents tap to be passed to child elements (see gifs bellow)
Stack Trace
N/A
Link to Reproduction Sample

Steps to Reproduce

Add NativeAnimation to StackLayout and add a button inside it
Press a button

Expected Behavior
ButtonPressed command is executed
Actual Behavior
Nothing happens
Basic Information

Version with issue: 1.3.1
Last known good version: -
IDE:
Platform Target Frameworks:

Android: 11

Android Support Library Version:
Nuget Packages:
Affected Devices:

Workaround
None
Reproduction imagery

@AndreiMisiukevich, found another one 😅
Trying to use CollectionView instead of ListView, and this bug really prevents me from doing that

@maxkoshevoi feel free to fix that ;)

but actually you can try to set ShouldMakeChildrenInputTransparent equal False

but actually you can try to set ShouldMakeChildrenInputTransparent equal False

Thanks Andrei, in my opinion, ShouldMakeChildrenInputTransparent would be by default at False 🙂

repo: xamarin/XamarinCommunityToolkit


text:
Xamarin.Android.Crashlytics disable crash resporting for debug builds

Is it possible to disable crash reporting for debug builds using Xamarin.Android.Crashlytics or Xamarin.Android.Crashlytics.Core ? I've not been able to find the correct classes using the Xamarin nuget package (2.9.4.1)
This is how it can be done in Java
// Set up Crashlytics, disabled for debug builds
Crashlytics crashlyticsKit = new Crashlytics.Builder()
    .core(new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build())
    .build();

// Initialize Fabric with the debug-disabled crashlytics.
Fabric.with(this, crashlyticsKit);

VS bug #739492

using Xamarin.Android.Crashlytics:
            var crashlytics = new Crashlytics.Crashlytics.Builder()
                .Disabled(true)
                .Build();

@drungrin

using Xamarin.Android.Crashlytics:
            var crashlytics = new Crashlytics.Crashlytics.Builder()
                .Disabled(true)
                .Build();

That's deprecated.

What about :
#if RELEASE
            Fabric.Fabric.With(this, new Crashlytics.Crashlytics());
#endif

authors: PauchardThomas drungrin rodsjo

repo: xamarin/XamarinComponents


text:
when send a request with array params, which can not be parsed correctly

For example the struct like "ListMilestonesOptions", there is a key 'iids' in this struct, when I send a request, and the params will be encoded like this "iids=xxx&iids=xxx". which will not be parsed  correctly by Gitlab.
I have some tests in postman, when I change the URL like "iids[]=xxx&iids[]=xxx", it will be parsed  correctly.
my Gitlab version is 14.14.29, hope fix it quickly

It turned out we missed a couple of these, but should fixed by PR #1166  👍🏻

repo: xanzy/go-gitlab


text:
Add: Appearance API

API: https://docs.gitlab.com/ee/api/appearance.html
Introduced in GitLab 12.7.
The appearance API allows you to maintain the appearance of GitLab as if you’re using the GitLab UI at /admin/appearance. The API requires administrator privileges.

Already fixed by #1820

authors: svanharmelen xuxiaowei-com-cn


text:
Update all "length" functions to use void parameters.

This is pedantic, but function declarations for functions that take no parameters should be (void), not just () (as in C++).

Codecov Report

Merging #26 into master will not change coverage.
The diff coverage is 0%.

@@           Coverage Diff           @@
##           master      #26   +/-   ##
=======================================
  Coverage   76.96%   76.96%
=======================================
  Files          21       21
  Lines         990      990
  Branches       59       59
=======================================
  Hits          762      762
  Misses        208      208
  Partials       20       20

Impacted Files
Coverage Δ

src/signature_BN254.c
45.33% <0%> (ø)
:arrow_up:

src/amcl-extensions/ecp2_BN254.c
34.48% <0%> (ø)
:arrow_up:

src/member_keypair_BN254.c
15.38% <0%> (ø)
:arrow_up:

src/issuer_keypair_BN254.c
20% <0%> (ø)
:arrow_up:

src/amcl-extensions/ecp_BN254.c
41.66% <0%> (ø)
:arrow_up:

src/credential_BN254.c
45.78% <0%> (ø)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b5459d4...fd25f5d. Read the comment docs.

authors: codecov-io zanebeckwith

repo: xaptum/ecdaa


text:
Support clang-format setting executablefile path

On Windows, maybe user not add clang-format.exe directory add to PATH, this commit support user is able to setting clang-format's full Path.
Thank your ext

If I change the executable path when this extension already running, it will not accepted unless extension be reactived.(It will be cached in binPathCache ).
I create another PR #4  to solve this problem and also provide style and fallback style options. Just like clang-format extension in atom.
Consider merge it?

Good, I'm closing this PR.

repo: xaverh/vscode-clang-format-provider


text:
Add Haddock sounds as noise example

Need to add several haddock sounds from both US and UK waters. Need to label as "haddock" rather than "noise", so it can be use for a multi-label classifier if needed later on.

bump up to high priority

repo: xaviermouy/minke-whale-dataset


text:
Deep clone by default

Send deep clones of the events to the Subscriptions by default so to ensure that changes made in one don't reflect on the others.
Reflect on the potential performance issues that this might cause.

Won't do. Too bad for performance. Consumers can do the deep clone themselves. Misbehaving listeners shouldn't be used anyway.

repo: xaviervia/sydney

license: isc


text:
EIP-712 Stuff

add stuff

add stuff

More like add freaking awesome stuff.
https://blog.fireacademy.io/p/a-path-to-chia-hardware-wallet-support

authors: Rigidity Yakuhito

repo: xch-dev/chia-wallet-sdk


text:
Approve with WalletConnect session?

I'm connecting to metamask app via wallet_connect_dart and want to swap DAI to ETH, so i want metamask to  approve the smart contract to have some DAI but i dont know how ?

Hi,
You need to create an ERC20 object with DAI smart contract as the address.
final dai = ERC20(
    address: EthereumAddress.fromHex(
        '0x6b175474e89094c44da98b954eedeac495271d0f'),
    client: client,
);

Then call dai.balanceOf.
Please look at the example usage in the README.md file.
Does this solve your problem?

The client is from infuria node right? but i'm connecting to Metamask mobile app with this package https://pub.dev/packages/walletconnect_dart. So how can i use your package with metamask connection? I'm trying to swap erc20 tokens with Uniswap smart contract

`
Future transferTokensToSmartContract(List args) async {
DeployedContract contract =
await getContract(erc20ContractAddress, erc20ContractAbi);
print(contract.address);
ContractFunction transferFunc = contract.function('transferFrom');
// ContractFunction symbol = contract.function('symbol');
return transferFunc.encodeCall(args);
}
var xx = await uniSc.transferTokensToSmartContract([
EthereumAddress.fromHex(session.accounts.first),
EthereumAddress.fromHex('0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D'),
BigInt.from(0.00001 * pow(10, 18)),
]);
    var a = await EthereumWalletConnectProvider(connector).sendTransaction(
        from: session.accounts[0],
        to: '0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D',
        data: xx,
        value: BigInt.from(0.00001 * pow(10, 18)),
        gas: 1000000,
        gasPrice: BigInt.from(900000));

`
This is what is do

If you want to check if the wallet has some DIAs, it doesn't matter where you are querying the account balance. Infura in the example can be replaced with anything.

i want to swap dai for eth through uniswap v2 smart contract. and i can't access the amount of dai in my metamask wallet


text:
Cannot run PyCSP3 model with exec

Hi,
I have a cp model in PyCSP3 that works fine when executed individually, but when running the code through exec, I receive a TypeError: 'NoneType' object is not subscriptable error.
Here’s a minimal example that reproduces the error:
python=3.9.19
pycsp3=2.3.1
c1 = """
from pycsp3 import *
def model_func(data_dict):

    n = data_dict['n']

    # s is the series we are trying to find, it's a permutation of 0, 1, ..., n-1
    s = VarArray(size=n, dom=range(n))

    # v represents the intervals between consecutive elements in s
    v = VarArray(size=n-1, dom=range(1, n))

    # Constraint 1: s is a permutation of the set {0, 1, ..., n-1}
    satisfy(
        AllDifferent(s)
    )

    # Constraint 2: v is the absolute difference between consecutive elements in s
    satisfy(
        v[i] == abs(s[i+1] - s[i]) for i in range(n-1)
    )

    # Constraint 3: v is a permutation of the set {1, 2, ..., n-1}
    satisfy(
        AllDifferent(v)
    )

    return {'s': s, 'v': v}

data_dict={"n":12}
model_func(data_dict)

"""
exec(c1)

Expected output:
python:{'s': [s[0],
  s[1],
  s[2],
  s[3],
  s[4],
  s[5],
  s[6],
  s[7],
  s[8],
  s[9],
  s[10],
  s[11]],
 'v': [v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7], v[8], v[9], v[10]]}

Can you please check if this is an compatibility issue with exec?
Thanks

Because of the way we use inspect it seems that we got a similar problem as the one described here:
stackoverflow
"The only way that the inspect module can display source code is if the code came from a file that it can access. Source typed at an interactive prompt is discarded as soon as it is parsed, there's simply no way for inspect to access it. – @jasonharper"
However, I am not 100% sure.
I will ask Nicolas.
Best.

Hello @Yuliang795,
In PyCSP3, we use the “inspect” library (https://docs.python.org/3/library/inspect.html) to provide certain additional functions, such as retrieving the variable names of the Var() and VarArray() functions.
For example, in s = VarArray(size=n, dom=range(n)), the name "s" was found thanks to the inspector.
Unfortunately, the latter needs a file with the code written in it.  What is more, certain language enhancements with the forbiddenfruit library require this file with the code.
It seems that the exec function does not load the python context required by these two librairies.
A solution is to use two files and the "subprocess" module:
import subprocess
subprocess.run(['python', 'c1.py'])

This way, you can put or modify anything you like in "c1.py".
Best regards

Hello @Yuliang795,
In PyCSP3, we use the “inspect” library (https://docs.python.org/3/library/inspect.html) to provide certain additional functions, such as retrieving the variable names of the Var() and VarArray() functions.
For example, in s = VarArray(size=n, dom=range(n)), the name "s" was found thanks to the inspector.
Unfortunately, the latter needs a file with the code written in it. What is more, certain language enhancements with the forbiddenfruit library require this file with the code.
It seems that the exec function does not load the python context required by these two librairies.
A solution is to use two files and the "subprocess" module:
import subprocess
subprocess.run(['python', 'c1.py'])

This way, you can put or modify anything you like in "c1.py".
Best regards

Thank you for confirming this and the detailed explanation.


text:
Display brightness of intervals in the matrix

Abnormality | positivity arc — Today at 12:46 AM

an option to see brightness for intervals within their scale degree would be nice. color would probably be a good way to do it. you could go blue->red, or maybe blue->yellow(so you can still see cs violations), dividing the colors between into whatever the variety that degree has. here are some concepts i did in google sheets. i did diasem(mv3, and always 3) and blackdye(mv4, sometimes 2, 3 or 4) as examples for light and dark mode. honestly this helps me a lot to analyze stuff. and maybe for colorblindness accessibility you could just have an option for a grayscale version.

https://jiffyclub.github.io/palettable/cubehelix/
0.5deg recommended these color schemes, which ascend in brightness (or perceptual brightness) while using many colors and roughly consistent saturation
I could probably tackle this.

repo: xenharmonic-devs/scale-workshop


text:
The http default client should be configurable

I'm currently using lego as a library in a service that is running in an execution environment that does not ship with a default ca-certificate bundle. This causes the following errors and prevents me from using the default http client used in the acme package:
2016/07/19 16:20:22 Request LetsEncrypt certificate failed: get directory at 'https://acme-staging.api.letsencrypt.org/directory': failed to get "https://acme-staging.api.letsencrypt.org/directory": Get https://acme-staging.api.letsencrypt.org/directory: x509: failed to load system roots and no roots provided

I'm using https://github.com/certifi/gocertifi to supply a ca-certificate bundle, but I need the ability to use my own http.Client in place of the default client defined here.
https://github.com/xenolf/lego/blob/master/acme/http.go#L21
One possible fix would be to add a SetHTTPClient function or export the defaultClient variable so I can override this.

I renamed the acme.defaultClient to acme.HTTPClient and thus exported it to fix #246. Should be fine now for your use case. :)

authors: kelseyhightower xenolf

repo: xenolf/lego


text:
[Question] Custom stopping criteria for text generation models

Is it possible to pass a custom stopping_criteria to generate() method? Is there a way to interrupt generation mid-flight?

Hi there 👋 This functionality is not yet added to Transformers.js, but I think it will be great to add! Do you have any specific example code, which will help ensure my implementation matches exactly? Thanks!

I do not have a specific code, and I am not sure if the approach of StoppingCriteriaList  used in Python should be translated 1-1 but the idea is to have a callback with meaningful return value allowing to short-circuit either based on input or other metric.
Thinking more about this callback_function, already gets us half way there. The difference between stopping_criteria and callback_function is that the former should return true/false to indicate if the generation loop should continue and while callback_function is called with an array of beams, stopping_criteria should probably be called for each beam separately.

It would definitely be useful, if only at the very least to allow a force abort of the processing. Many models offer partial results anyway. Just a suggestion?

Thanks for the additional info 👍 I do think this would be useful to add, since others have asked about adding a "cancellation" button for some of my demos. Do you have any example code which I (or someone else) can use as a baseline so that the JS implementation matches?

authors: krassowski msj121 xenova


text:
Add vgpu-migration branch

Signed-off-by: Rob Hoes rob.hoes@citrix.com

Merging - we can easily change the branch name tomorrow if we want to.

authors: gaborigloi robhoes

repo: xenserver/xenserver-build-env


text:
list index out of range - when using dist# and kicost:dist:pricing

KiCost version 1.1.1 (installed using pip)
I get error
File "/usr/lib/python3.7/site-packages/kicost/distributors/api_partinfo_kitspace.py", line 300, in query_part_info
part_code_dist = list({k for k, v in dist_xlate.items() if v == part_catalogue_code_dist})[0]
IndexError: list index out of range
I found that this is because I have kicost:dist:pricing for one component and dist# for another component.
I enclose an example which fails and two variants of the example that pass.
The executed commands are in "tests.sh", the log is in tests.log.

Hi Hildago
I was convinced that I attached this example:
testcase.zip
Hopefully it is ok for you.

It was due the "tme#". The new API Kitspace doesn't support it and it was trying to use.
Now the code check if the code is supported before use.

authors: hildogjr mdeweerd

repo: xesscorp/KiCost


text:
xet_fs.cp does not handle local files.

I would expect this to work:
    xet_fs = pyxet.XetFS()

    with xet_fs.transaction:
        print("In transaction:")
        print(f"copying: {local_filename} to {xet_path}.")
        xet_fs.cp(local_filename, xet_path)

But it just fails with
ValueError: Invalid Xet URL format: Expecting xet://user/repo/[branch]/[path]

And no additional information.

cp is only for remote to remote. local to remote is put. This is an fsspec method.

authors: hoytak ylow

repo: xetdata/pyxet


text:
is there any way to set timeZoneOffsetInMinutes?

is there any way to set timeZoneOffsetInMinutes

Just pass it to the react-native-datepicker with timeZoneOffsetInMinutes prop. But only iOS supported，same as the offical native component.

repo: xgfe/react-native-datepicker


text:
rename challenge to evaluation

I used the challenge section of the docs to brainstorm. Since there are actually challenges, it is not important right now to write them down. Thinking about the difference and keeping in mind that it is all about getting to somewhere, I don't care about challenge documentation. I care about problem solving and for this I need to evaluate ideas.

Fixed by #47


text:
Bugfix: prevent creation of multiple search fields after cancel opera…

Fixes https://github.com/xi-editor/xi-mac/issues/349
Review Checklist

[ ] I have responded to reviews and made changes where appropriate.
[x] I have tested the code
[x] I have updated comments / documentation related to the changes I made.
[x] I have rebased my PR branch onto xi-mac/master.

Codecov Report

Merging #361 into master will decrease coverage by 0.2%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master     #361      +/-   ##
==========================================
- Coverage   44.11%   43.91%   -0.21%
==========================================
  Files          31       31
  Lines        3883     3892       +9
==========================================
- Hits         1713     1709       -4
- Misses       2170     2183      +13

Impacted Files
Coverage Δ

Sources/XiEditor/EditViewController.swift
27.36% <0%> (-0.06%)
:arrow_down:

Sources/XiEditor/Search.swift
25.31% <0%> (-0.52%)
:arrow_down:

Sources/XiEditor/AppDelegate.swift
35.29% <0%> (-1.48%)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c0d666a...abc871f. Read the comment docs.

Okay, I think I came up with a proper fix for this. Now, based on the find status all finds that have previously been deleted in the core will also get removed in the frontend.
For this to work https://github.com/xi-editor/xi-editor/pull/1013 is required (after unset_find needs to send the new find status).

Okay, sounds good. I think that my main issue is a secondary bug; cmdD with the find view not visible is still changing focus to the find view, maybe? I think this is why esc isn't working as I expect.

authors: cmyr codecov-io scholtzan

repo: xi-editor/xi-mac


text:
建议：build/plugins.ts  更名为 plugin/index.ts

理由：
➜  supermario-ui git:(develop) npm run build

> supermario-system@1.0.2 build
> vue-tsc --noEmit && vite build

vite.config.mts:28:35 - error TS2307: Cannot find module './build/plugins' or its corresponding type declarations.

28 import { createVitePlugins } from './build/plugins'

我本地打包可以，但上服务器提示找不到模块。
我以为没加 ts 声明 declare  加了也没效果。以为找不到 ./ 路径，改 @/ 也没效果。
结果 ls 查看，当场歇逼了。检查 .gitignore 也没过滤 build 目录呀。但是 vscode 看到 build 和 dist  图标一样。
所以，某种神秘力量导致这个目录被过滤了。建议更名。

很抱歉回复晚了，你的建议不错，日常开发中build和dist目录容易混淆，确实想改个名字来着。
至于你说的服务器上提示找不到模块我自己倒是没有遇到过。下次提交将修改build目录的名字


text:
Correct Inline Assembly name mismatches (ZArch)

Solve compilation issue: "asum is not known" (Tested with GCC9.0 on s390x)

Thanks but it seems aarnez beat you by about an hour (#2317) :)

authors: aubindetrez martin-frbg

repo: xianyi/OpenBLAS


text:
Protocol on the rpc interface

I'm interested in communicating with the rpc server, but I'm not familiar with java, could you please offer a simple guide on how the protocol is?

I'm interested in communicating with the rpc server, but I'm not familiar with python, could u pls offer a simple api design specification? I am interested in make a java version client, have you been working around something related? pls tell me. thx.

the rpc interface is actually lying in the codes, you just have to have a little understanding of Java. It's not that hard.
After that, I have rewritten a server and a client in Java, but I can't share too much with you, cause it's a proprietary software

@yifeikong thanks for your reply, it seems i would rewrite this project by myself, if u can share some experiences and prone mistakes during rewriting the server and client that will be much helpful.

@yifeikong BTW, did u notice that when current page contain webview, using uiautomator will not get element hierarchy inside webview for the first time, but the 2nd time will be ok.
i don't know if it's a uiautomator bug or i misconfigure something.

@Scisaga My architecture goes like this:
simulate steps script(local) --> http Server <-- Client(Android apk) <--rpc--> Server(Android apk)
which means, I write a simulate touch script on my local computer, and pushes it to the http server. then the client on android pulls data from the http server, it interprets the script and instruct the ui automator server to run it.
the tricky part is that you never call android server on your local computer, let your phone invoke a http api to pull data.
and the most elegant part I found is that in my implementation, the script is actually yaml file.

authors: Scisaga yifeikong

repo: xiaocong/android-uiautomator-server


text:
方法 & 事件 - wxCharts使用说明

方法

updateData(data) 更新图表数据，data: object，data.categories(可选，具体见参数说明)，data.series(可选，具体见参数说明)，data.title(可选，具体见参数说明)，data.subtitle(可选，具体见参数说明)

stopAnimation() 停止当前正在进行的动画效果，直接展示渲染的最终结果

addEventListener(type, listener) 添加事件监听，type: String事件类型，listener: function 处理方法

getCurrentDataIndex(e) 获取图表中点击时的数据序列编号(-1表示未找到对应的数据区域), e: Object微信小程序标准事件，需要手动的去绑定touch事件，具体可参考wx-charts-demo中column图示例

showToolTip(e, options?) 图表中展示数据详细内容(目前仅支持line和area图表类型)，e: Object微信小程序标准事件，options: Object可选，tooltip的自定义配置，支持option.background，默认为#000000;  option.format, function类型，接受两个传入的参数，seriesItem(Object, 包括seriesItem.name以及seriesItem.data)和category，可自定义tooltip显示内容。具体可参考wx-charts-demo中line图示例

scrollStart(e), scroll(e), scrollEnd(e)设置支持图表拖拽系列事件(支持line, area, column)，具体参考wx-charts-demo中ScrollLine图示例

事件

renderComplete 图表渲染完成（如果有动画效果，则动画效果完成时触发）

如何使用事件
let chart = new wxCharts(...);
chart.addEventListener('renderComplete', () => {
    // your code here
});

updateData这个方法参数怎么传，我想更新categories和series.data

具体可参考wx-charts-demo中怎么对updateData 进行调用的

area 图表中， touchHandler 的showToolTip 事件中如何实现手指放上去显示两条线的差值？

怎么显示饼状图

请问updateData函数参数对象data只能是categories 、series 、title 、subtitle 这四个吗？
我想更新设置一下y轴最大值怎么办... @xiaolin3303

请问 为什么用真机测试的时候 ，getCurrentDataIndex 只有第一次点击能返回正确数据，然后每次点击都是返回的-1？

我建议建立QQ群，这样就可以在群里提问，在线解答问题。帮助大家，更快的掌握用法。

get

showToolTip可以脱离e参数单独调用吗？有个场景，在微信端，用户进来看到报表，会自动定位到当天的位置，而不是每次从第一天开始，然后滚动到当天，但现在我想自行定位到当天后也能显示tooltip。可以做到吗？

ring类型的 不想显示百分比，可以显示data的值么

showToolTip的功能，bindtouchstart的行为返回的ID，在开发者工具里是e.target.id，在手机上是e.target.target

做showToolTip功能的时候，发现bindtouchstart的行为返回的ID，在开发者工具里是e.target.id，在手机上是e.target.target

showToolTip可以脱离e参数单独调用吗？有个场景，在微信端，用户进来看到报表，会自动定位到当天的位置，而不是每次从第一天开始，然后滚动到当天，但现在我想自行定位到当天后也能显示tooltip。可以做到吗？

老铁 我也有同样的需求  你实现了吗?

toolTip显示不出来，是怎么回事呢 @xiaolin3303

具体可参考wx-charts-demo中怎么对updateData 进行调用的

雷达图写在swiper，雷达图不会滑动是怎么回事 ，需要调用updatedata()吗

怎么在渲染完成后将图表转存为图片？

请问可以实现双y轴吗

请问 为什么用真机测试的时候 ，getCurrentDataIndex 只有第一次点击能返回正确数据，然后每次点击都是返回的-1？

修改getCurrentDataIndex源码中的var _touches$ = touches[0],改成var _touches$ = touches[touches.length-1],

怎么在渲染完成后将图表转存为图片？
兄嘚你好，我也有这样的需求，你实现了么

微信小程序中，绘制的wxchart的ring图表，在页面滚动的时候总是浮动在顶层。
页面自定义navegation时出现显示样式bug

如何获取图表中点击 “标识” 时的数据序列编号，就是图表或饼状图下的小标识

showToolTip里面的内容如何换行

绑定touch时间后，会导致拖动在canvas向上滑动时，页面滚动不了。是不是可以用tap时间呢？当我改为tap并无效啊

环形图series.data能动态赋值或者我能直接赋给series一个动态数组吗？


text:
squid:S1488 - Local Variables should not be declared and then immedia…

This pull request is focused on resolving occurrences of Sonar rule squid:S1488 - Local Variables should not be declared and then immediately returned or thrown
You can find more information about the issue here: https://dev.eclipse.org/sonar/coding_rules#q=squid:S1488
Please let me know if you have any questions.
M-Ezzat

Thanks,M-Ezzat.

authors: m-ezzat xiaolongzuo

repo: xiaolongzuo/niubi-job


text:
在token达到上限后再输入退出词退出时应该直接退出而不是询问是否删除最早消息

如图，其实可以考虑不要提示删除这个功能，只要警告，等openai返回400错误后再提示也不迟

有 但不是全部都显示不出来 并且这个问题只在原生powershell上出现 原生cmd上没有
估计是老win终端的颜色适配问题吧 像dim之类的一样显示不出来

可以可以，正好在1.1.3修复了这个问题


text:
MacBook Pro15款，分辨率(2560 × 1600)，版本2.0.8，调试接口发送按钮适配问题

MacBook Pro15款，分辨率(2560 × 1600)，版本2.0.8，调试接口发送按钮适配问题

没法测试，在v4.0快照版本里面，我调整了地址输入框的长度(80% -> 70%)，可以试试看，这个issue我就先关了,有问题再新开一个，感谢

authors: heliangtmac xiaoymin

repo: xiaoymin/swagger-bootstrap-ui


text:
jemalloc not work in spec06 tests

when I use
# result-24 -> /nix/store/32vzkyzfncidv4754d6cpnsk15zk34cn-spec2006exe
cd result-24/483.xalancbmk/run
riscv64-unknown-linux-gnu-nm 483.xalancbmk| grep -i jemalloc
# return null
riscv64-unknown-linux-gnu-nm 483.xalancbmk| grep -i malloc
return
0000000000235c2e T __malloc
0000000000235c2e T malloc
...

It shows binary use malloc instead of jemalloc which have lower performance in spec06 checkpoints.
Especially for omnetpp (4% performance lower) and xalancbmk(9% performance lower)!

https://github.com/jemalloc/jemalloc/wiki/Getting-Started
It seems the current build script just includes jemalloc path, but not use it.

That is helpful for me, thanks.
But I still do not find a suitable way to fix this.
When I use
  shellHook = ''
    # ...
    export LDFLAGS_SUFFIX="${customJemalloc}/lib/libjemalloc.a -lm -pthread"
    export LIBS="$LIBS $LDFLAGS_SUFFIX"
"

in shell.nix, it linked jemalloc successfully.
But for omnetpp, it will define operator new and operator delete in it's cpp file,
+ LD -> build/471.omnetpp
/nix/store/djy0jdfvdqgn4wl5ys71r1fxki3c1mw4-riscv64-unknown-linux-gnu-binutils-2.43.1/bin/riscv64-unknown-linux-gnu-ld: /nix/store/09x1j6m3w9lnl6znh9hsaw8d8x143nqf-jemalloc-riscv64-unknown-linux-gnu-5.3.0/lib/libjemalloc.a(jemalloc_cpp.o): in function `operator new(unsigned long)':
(.text+0x12c): multiple definition of `operator new(unsigned long)'; /nfs/home/yanyue/tools/CPU2006LiteWrapper/471.omnetpp/build/src/libs/cmdenv/heap.o (symbol from plugin):(.text+0x0): first defined here
/nix/store/djy0jdfvdqgn4wl5ys71r1fxki3c1mw4-riscv64-unknown-linux-gnu-binutils-2.43.1/bin/riscv64-unknown-linux-gnu-ld: /nix/store/09x1j6m3w9lnl6znh9hsaw8d8x143nqf-jemalloc-riscv64-unknown-linux-gnu-5.3.0/lib/libjemalloc.a(jemalloc_cpp.o): in function `operator delete(void*)':
(.text+0x504): multiple definition of `operator delete(void*)'; /nfs/home/yanyue/tools/CPU2006LiteWrapper/471.omnetpp/build/src/libs/cmdenv/heap.o (symbol from plugin):(.text+0x0): first defined here

resulted linked error, I used weak attributes for jemalloc operator, but it's not sufficient.
    preBuild = ''
      # Add weak attribute to C++ operators, same as jemalloc_cpp.patch
      sed -i 's/void \*operator new/void __attribute__((weak)) *operator new/g' src/jemalloc_cpp.cpp
      sed -i 's/void operator delete/void __attribute__((weak)) operator delete/g' src/jemalloc_cpp.cpp
    '';

only operator delete[] is weak.
➜  CPU2006LiteWrapper git:(main) ✗ riscv64-unknown-linux-gnu-nm -C /nix/store/09x1j6m3w9lnl6znh9hsaw8d8x143nqf-jemalloc-riscv64-unknown-linux-gnu-5.3.0/lib/libjemalloc.a| grep -i "operator"
000000000000050c T operator delete[](void*)
000000000000051c W operator delete[](void*, std::nothrow_t const&)
0000000000000568 T operator delete[](void*, std::align_val_t)
0000000000000578 T operator delete[](void*, std::align_val_t, std::nothrow_t const&)
0000000000000542 T operator delete[](void*, unsigned long)
00000000000005ec T operator delete[](void*, unsigned long, std::align_val_t)
0000000000000504 T operator delete(void*)
0000000000000514 T operator delete(void*, std::nothrow_t const&)
0000000000000560 T operator delete(void*, std::align_val_t)
0000000000000570 T operator delete(void*, std::align_val_t, std::nothrow_t const&)
0000000000000524 T operator delete(void*, unsigned long)
0000000000000580 T operator delete(void*, unsigned long, std::align_val_t)
00000000000001ee T operator new[](unsigned long)
0000000000000372 T operator new[](unsigned long, std::nothrow_t const&)
0000000000000466 T operator new[](unsigned long, std::align_val_t)
00000000000004ce T operator new[](unsigned long, std::align_val_t, std::nothrow_t const&)
000000000000012c T operator new(unsigned long)
00000000000002b0 T operator new(unsigned long, std::nothrow_t const&)
0000000000000434 T operator new(unsigned long, std::align_val_t)
0000000000000498 T operator new(unsigned long, std::align_val_t, std::nothrow_t const&)

I should use jemalloc_cpp.patch like
https://github.com/OpenXiangShan/CPU2006LiteWrapper/blob/main/jemalloc_cpp.patch
, but it's only useful for specific jemalloc version(da66aa391f853ccf2300845b3873cc8f1cf48f2d or older), not elegant
export RISCV=/riscv_toolchain/top
git clone https://github.com/jemalloc/jemalloc.git
cd jemalloc
cp /path/to/jemalloc_cpp.patch ./
git checkout -b apply-patch da66aa391f853ccf2300845b3873cc8f1cf48f2d
git apply jemalloc_cpp.patch
CC=$RISCV/bin/riscv64-unknown-linux-gnu-gcc CXX=$RISCV/bin/riscv64-unknown-linux-gnu-c++ LD=$RISCV/bin/riscv64-unknown-linux-gnu-ld ./autogen.sh --prefix=$RISCV --host=x86_64-linux-gnu

make && make install

Is there other way to fix it ?

I fix it using jemalloc patch(only support jemalloc v3.5), still running , when I finish performance testing, I will push.

I believe these two lines should work
sed -i '/void/N;s/void[[:space:]]*\*[[:space:]]*operator new/void __attribute__((weak)) *operator new/g' src/jemalloc_cpp.cpp
sed -i '/void/N;s/void[[:space:]]*operator delete/void __attribute__((weak)) operator delete/g' src/jemalloc_cpp.cpp

It looks great for me, I try it locally, it works great.
Checkpoint-generating is still running, when I get the performance results, I will push use your ways, thanks.

添加jemalloc 之后分数差异更大了，都是和原始gcc12切片对比性能，
大机房地址/nfs/share/zyy/spec06_rv64gcb_O3_20m_gcc12.2.0-intFpcOff-jeMalloc/zstd-checkpoint-0-0-0
左边是原始切片，右边是nix 切片

上图是没有加jemalloc之前分数差异，基于89ec13 commit
下图是加上jemalloc 之后分数差异， 基于ed8e7a6321d2580169ac0ccf7ebe337a6ca37913 commit加上jemalloc之后测试

不确定是我nix 切片跑错了，还是jemalloc 影响，亦或者是重构代码导致，我会继续查询性能原因，暂时不推jemalloc patch.

Did the nix-run even finish yet? coverage=1 does not mean it has finished. According to my previous experience, coverage is calculated based on m5out or something. So after warmup, the weight of that checkpoint has already been taken into account. This leads to problems like using stats from the warmup period to calculate scores.

authors: eastonman jensen-yan


text:
🛑 www.9958.xyz is down

In 78739e0, www.9958.xyz (https://www.9958.xyz) was down:

HTTP code: 0
Response time: 0 ms

Resolved: www.9958.xyz is back up in 7bc489e.

repo: xiexianbin/upptime


text:
锁屏几分钟,服务被杀死,屏幕解锁没有拉活service

测试手机 :魅族4Pro
系统:5.1.1
版本号:Flyme 5.1.11.1A

Sorry, 目前只能做到这样...