[REEF-689] Restructure handler for DriverRestart in .NET

This addressed the issue by

Propagate the expected Evaluator IDs on restart to .NET.
Modified bridge code to propagate the Evaluator IDs.

JIRA:
REEF-689

I've done a pass over the C# code. @beysims Can you please have a look at the bridge related code?
Regarding that: Is it possible to make an Avro schema for the DriverRestarted event and use that to funnel the information from one side to the other? Our bridge is growing in complexity each time we add a new API to be funneled through...

@markusweimer Addressed some comments. Do you think switching to Avro should be a separate code review? What are the advantages there? Thanks!

Do you think switching to Avro should be a separate code review? Should we do it for all the Events to be consistent?

My comment was more generally about the bridge. It shouldn't prevent this PR from going in. That said, yes, the idea would be to have two calls in C++ in the bridge: Send Avro from C# to Java and vice versa. That would simplify the bridge code and make these reviews a lot easier.

@afchung, @markusweimer  bridge looks fine.

OK, I will test and merge.


Add a notification option for when potions run out

Currently the only way I can get a notification of when my pots are running out is to use the chat notification with the potion text in it, I'd prefer if I could tick a checkbox in the timer menu for the client to send a windows notification when those potions were to expire

I'll work on it.

What potions in particular? I'm assuming ones that don't directly affect a player's stats? Otherwise the features in the Boosts Information plugin would suffice.

For timer based potions, the client sends a windows notification whenever the chatbox messages appear. For boost based potions, we could set a treshhold for the client to send a notificatoin warning such as +10 or +8

In the "Boosts Information" plugin you can set the "Boost Amount Threshold" which will notify you when a boost reaches X levels boosted remaining. Does that achieve what you're trying to do?

Yes it does! I have no idea why mine was disabled

Would it be possible to add a boost amount threshold per skill? Also, divine pots dont reduce the boost per minute, they just go directly back to 0, so the notification doesnt work.


useing first

This issue is not created by echarts-issue-helper and will be soon closed.

第一次在github发评论


Please create a better Debian repository

Hi,
while it is very nice and appreciated that you are providing a debian repository of your clickhouse builds, unfortunately it is impossible to mirror it with common tools like aptly or debmirror. This is mainly due to the directory layout. Your repository is used as
deb http://repo.yandex.ru/clickhouse/deb/stable/ main/
while a common Debian repository is
deb http://debian.foo/debian stretch main
so what your repository basically is missing is the debian release in the path/directory structure, which results in the common mirroring tools to fail. Right now I'm using wget -r ...., but thats not really optimal.
Also it would be nice to have builds done in the appropriate debian release instead of a common one supposed to work on all releases.
Thanks for your work,
Bernd

I will ask if it is possible to provide these repositories via symlinks or similar mechanics without actually duplicating files.

Also it would be nice to have builds done in the appropriate debian release instead of a common one supposed to work on all releases.

We intentionally make portable packages that can be installed on a wide range of systems. It's not easy and I consider it as a significant achievement. Otherwise it's too cumbersome to build for every version of Ubuntu and Debian. And ClickHouse can be installed on very old systems that are no longer supported by maintainers, such as Ubuntu Lucid. (Many companies use these systems in production and don't care at all about the package repositories.)
Even more, recently we created rpm packages that contain exactly the same set of binaries. And they can be installed on CentOS 5 (we check it in our CI). There are many less known Linux distros such as russian AstraLinux, GosLinux, we don't build ClickHouse for them and ClickHouse can be successfully installed and work on such systems.
Portable binaries look like the right way. AFAIK, Go and Rust use this way by default. It's very good when you can build ClickHouse on your development machine, scp to server and run.
We build new testing package every night and we build development packages for every commit (and we already spent multiple TBs of storage for them). If these packages will be slightly different for every Debian, Ubuntu, RedHat, CentOS systems, we will burn 100x times more resources.

Hi bzed.
Sorry, but our repo has non standart Debian pull structure to save old versions of clickhouse software.
So "deb http://debian.foo/debian stretch main" will not work one of these fine days.
To mirror your can use debmirror (with many options to override standart behavior), but the best way to use rsync
rsync repo.yandex.ru::yandexrepo/clickhouse/

rsync -avHP --delete repo.yandex.ru::yandexrepo/clickhouse/ /some/path
Also we can create symlinks like stretch or bullseye, but it will only symlinks to stable.


Package import in npm

Currently, if I want to import isArray for instance, I have to either to:
const stdlib = require("@stdlib/stdlib"); // 1.3M (gzipped: 344.3K)
const isArray = stdlib.assert.isArray

or
const isArray = require("@stdlib/stdlib/lib/node_modules/@stdlib/assert/is-array"); // 9.5K (gzipped: 1K)

and in both cases, it is unpractical.
And if I want to import the package as written in the doc, it will fail:
const isArray = require("@stdlib/assert/is-array");
// I've also tried isArray, is-array/ and isArray/
> Error: Cannot find module '@stdlib/assert/is-array'

My suggestion is also to publish separately every package (@stdlib/assert for instance) on npm (but still keep the current @stdlib/stdlib).

(and every folder in lib/node_modules/@stdlib/ already has a package.json with the correct data)

@Ayc0 Thanks for taking the time to file an issue. Unfortunately, while the future plan is to publish individual packages (this is why we architected the library as we have done), we cannot do so at the moment.
The rationale for this inability is that, before we publish individual packages, we need to fix (i.e., solidify) all namespaces and package names. As publishing to npm is permanent, once we publish a package, we cannot simply change its name in the future should we decide to rename it or move it around. And atm, we have yet to craft a coherent deprecation and publishing strategy to accommodate such changes as they will inevitably happen in the future.
In short, we have already thought about this problem, but our hands are tied until the library is further developed and solidified. It should go without saying that the sooner we are able to build out feature functionality and map future feature development, the sooner we will be able to publish everything as individual packages as you suggest.
If you would like to get involved in such an effort, that would be appreciated. :)
In any event, if you want a quick workaround if you are using stdlib in an application and not a library you plan to publish to npm, you can use NODE_PATH to resolve the @stdlib/stdlib/lib/node_modules folder. From there, all @stdlib/assert/* and every other package will be resolved as shown in the documentation.
If you are using stdlib for a frontend use case, doing isArray = require( '@stdlib/stdlib' ).assert.isArray is fine. With symbol resolution and "tree-shaking", your bundle should only include the symbols used by your program and not the totality of stdlib.
Lastly, while not as simple as an npm install, if you know what functionality you want ahead of time, you can always create a bundle (which can be done via the stdlib CLI) and vendor, similar to how one might have done back when jQuery ruled the web.
Hope the above helps!

Being new to stdlib, I found the documentation on this to be quite unclear. Perhaps this could be elaborated further in the installation guide.

This seems to be the simplest solution currently:
const stdlib = '@stdlib/stdlib/lib/node_modules/@stdlib/'
const assert = require( stdlib + 'assert')

@joshhopkins Agreed. :( We have been actively exploring installation procedures to remove the need for this workaround when installing the entire project, but have yet to find a robust solution. Once we do find a solution, I'll be sure to update this thread.

Update: we updated the installation process for @stdlib/stdlib some time ago. You can now
$ npm install @stdlib/stdlib

and then in JavaScript
var isArray = require( '@stdlib/assert/is-array' );

We have yet to publish individual packages for individual consumption, but at least requiring individual packages now matches the documentation after installing all of @stdlib/stdlib.

@kgryte It would be wonderful to include this in the documentation right here:
https://github.com/stdlib-js/stdlib#installation
In the getting started section. Also, has there been any discussion of typescript typings? I can open a new issue for this if there's hasn't-

@chriszrc Are you specifically referring to how to consume individual packages?
Re: TypeScript. Probably best to open a new issue. The repository includes type declarations, but you may be looking for something more specific.

Yes, specifically this:
var isArray = require( '@stdlib/assert/is-array' );

or this for typescript
import ttest2 from '@stdlib/stats/ttest2';

And wait, where are the type declarations in the repo?

Re: individual packages. Noted. We'll make a TODO.
Re: TypeScript. The type declarations are present in each individual package /docs/types folder, which is also noted in the root tsconfig file.

@chriszrc And here are the TS docs.

Ah, I think I was thrown off by a couple of things.
1 - I was looking at the ttest package, and it has no types:
https://github.com/stdlib-js/stdlib/tree/7a431eb78d9ea0aed1ad5559c233e5100d18625f/lib/node_modules/%40stdlib/stats/ttest/docs
Apparently all of the stats packages have no types?
2 - I did at one point find this file:
https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/types
But the index.d.ts only contains typings for a few modules? I am understanding now that adding "typeRoots": [ "./path/to/@stdlib/types" ], is giving me some types, but I was initially thrown off, because it didn't add any types for all of the functions I was trying out at the time (stats packages)
I suspect that for people interested in using this library with typescript, that this info should also be on the front page, or at least linked from there-

@chriszrc We have TypeScript declarations for about 70% of the packages. @Planeshifter has been working on this and adding declarations to the stats packages is on his roadmap. He may also have more insight into how you may need to set up your project to leverage the existing declarations. But this discussion would be better placed in a separate issue focused on TypeScript declarations.

I think you've answered all my questions for the moment, that's really exciting that the rest of the typescript definitions are coming, that was one of my reservations about using this library in production, very exciting and thanks for all the hard work!

@chriszrc Updated the README to include individual package consumption instructions.


Alter Column Type compatibility checks

There is basic validation defined here https://github.com/cassandra-scala/troy/pull/79/commits/0a129ae3e482e85d12e9dcff82427553dfab7933
This needs to cover all cases.

The following datatype changes are not supported:
Changing the type of a clustering column
Changing the type of a column on which an index is defined

https://docs.datastax.com/en/cql/3.1/cql/cql_reference/alter_table_r.html#reference_ds_xqq_hpc_xj__changing-the-type-of-a-column


[SpeedDial] Actions container takes has full height when closed (and trigger hover event)

[x] This is a v1.x issue (v0.x is no longer maintained).
[x] I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

When the SpeedDial is closed (no actions being shown) the action container should be fully colapsed and have no height, not triggering events such as hover, for example (only the FAB itself should trigger the hover).
Current Behavior

When the SpeedDial is closed (no actions being shown) the action container still has the same height as when it is open and therefore trigger onHover on places it shouldn't (eventually preventing actions on elements "behind" it.
Steps to Reproduce (for bugs)

https://codesandbox.io/s/k00ymzjj5v

Hover a few pixels above the FAB
Observe that the actions show up since the "empty" container still had its full-height

Context

I'm using the component for a personal project and believe that triggering the hover effect on the "invisible" action elements is a bad UX and a unwanted behavior.
Your Environment

Tech
Version

Material-UI
^1.2.1

React
^16.4.0

browser
All, browser independent issue - Safari 11.1, Chrome 67, Firefox 61

triggering the hover effect on the "invisible" action elements is a bad UX

@araujoigor I had the same thought, but I left it because of: https://inbox.google.com/ (Not saying they are right of course!)
Do you want to work on it?

@mbrookes Interesting... Never realized Inbox had such behavior... I assume it is because they leave the entire "row" for the FAB and its actions... But still, I don't like much.
Sure, I can work on that. Any suggestions on the implementation? Since transitioning display is not an option, the only two solutions that come to my mind are either to transition max-height (which is a bit hacky and could possibly lead to undesired effects and because we limit the height) or add a callback with setTimeout to add a class  with display: none.

We could possibly unmount the actions when they're closed, although not sure what that would do for performance when you hover over the FAB. (Should be okay, given they animate in).
The only alternative I can think of would be to proxy mouse events from the FAB...


Invalid box-sizing property in .katex .angl css class

Describe the bug:
As seen here the .angl class contains a non-existent property value for border-box. Judging from the context it should be content-box. I'm happy to open a PR if anyone can confirm that it should indeed be content-box and not border-box.
.angl {
    // from package actuarialangle, which is always used in a subscript.
    box-sizing: border-content;       // NON-EXISTENT css property
    border-top: 0.049em solid;        // defaultRuleThickness in scriptstyle
    border-right: 0.049em solid;      // ditto
    margin-right: 0.03889em;          // 1 mu
}

To Reproduce:
NA
Expected behavior:
Stylesheets to include W3C valid properties: content-box | border-box.

@klittlepage You are correct. I meant that property to be border-box. Good catch.

@ronkok I opened a PR to fix this issue and updated the screenshot test for Chrome and Safari following the procedures here. I'm unable to get the build artifacts for Safari seeing as the build fails and there doesn't appear to be a means for running it locally sans a BrowserStack API key. Do you know a path forward?


Disk Cache can grow significantly larger than 'sizeLimit'

Check List
Thanks for considering to open an issue. Before you submit your issue, please confirm these boxes are checked.

[x ] I have read the wiki page and cheat sheet, but there is no information I need.
[x ] I have searched in existing issues, but did not find a same one.
[x ] I want to report a problem instead of asking a question. It'd better to use kingfisher tag in Stack Overflow to ask a question.

Issue Description
I was doing some stress testing on devices whose disks are almost full. I noticed that disk cache can grow significantly larger than what I specify via the ImageCache.default.diskStorage.config.sizeLimit until the app is backgrounded or terminated.
What
I took a look at the source code, but could not find anywhere that checks the disk space used by the KF cache against the sizeLimit to keep the cache from growing too large while the app is still in the foreground.
Am I missing some configuration flag or something?
Reproduce
This can be tricky as you need to have a device whose disk is almost full - from another app that is not using the OS cache sandbox since that would not work correctly.

The current behavior is intentionally designed to check and remove cache files that exceed the size limit only when the app enters the background.
This approach prevents performance issues that could arise from checking the file size every time a new image is cached, which could significantly impact performance.
If needed, you can manually invoke the removeSizeExceededValues method on the disk cache at any time to remove files that exceed the specified size limit.

Yes, I understand the current behavior was intentional and that it's not practical to check each time. I was thinking more around the idea of call removeSizeExceededValues when you did receive an error on attempting to write to the disk cache or something.
I was not able to find a central location where I could attempt to catch the error myself; or a closure I could register to be called only when that error got thrown. Perhaps I missed something in the code?
I work on several apps that can be heavy on images in long user sessions, so having the cache grow with limits during a single session can be an issue.

Or easier, maybe you can just set up a timer (say perform it every 5 or 10 minutes) to clean it regularly before an issue may happen
Yeah, this is what I was thinking as well. But wanted to make sure I was not missing a feature that already existed before going that route as it does feel a bit janky.


hello, is async http support?

hello. I am a first-time user of this library. My question may be immature, but I created an issue because I couldn't find the relevant code. When sending a request from hdfs to es, is the code that sends it asynchronously implemented?
https://github.com/elastic/elasticsearch-hadoop/issues/602

Hi. @KilJaeeun. The call is not asynchronous. The blocking call is made here: https://github.com/elastic/elasticsearch-hadoop/blob/main/mr/src/main/java/org/elasticsearch/hadoop/rest/commonshttp/CommonsHttpTransport.java#L717. That is called from NetworkClient::execute, which is called from RestClient::execute.
If you would like to discuss more about this, https://discuss.elastic.co/ is a better place for these kinds of conversations.


Impossible to install cargo-script

casie:~/Downloads  ⇢  cargo install --force cargo-script
    Updating crates.io index
  Downloaded cargo-script v0.2.8
  Downloaded 1 crate (50.4 KB) in 1.19s
  Installing cargo-script v0.2.8
error: failed to compile `cargo-script v0.2.8`, intermediate artifacts can be found at `/var/folders/7x/29hsrskd67bdbb0dqwwt4shc0000gp/T/cargo-installOpbo35`

Caused by:
  failed to select a version for the requirement `rustc_version = "^0.1.7"`
  candidate versions found which didn't match: 0.3.3, 0.3.2, 0.3.1, ...
  location searched: crates.io index
  required by package `cargo-script v0.2.8`

Working fine for me


Farming out eds interface methods out of mesh_discovery.go

Gradually moving to a pattern for Mesh XDS support.
No logic changes, it's mostly moving code to allow for parallel development.

@gnirodi: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/istio-presubmit.sh
645793cb8112604cf4a53dd1a171263bc3ee8e7c
link
/test istio-presubmit

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

fix the test please

can you also push changes to deployment YAMLs that expose this server/port?


Question

"Paths": "D:\\IISlogs;D:\\DatabaseLogs",
"Processes": "mssence.svc"

In regard to this JSON excerpt, are excluded files those who satisfy any or both of these conditions (paths, processes)? Would "C:\temp\mssence.svc" file be excluded?

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 08b1a2dc-7fa3-20d8-d6d9-990bf1cfe34d
Version Independent ID: 98c9a0f0-35bc-eacd-9aaf-acfd4b968fee
Content: Microsoft Antimalware Extension for Windows VMs on Azure - Azure Virtual Machines
Content Source: articles/virtual-machines/extensions/iaas-antimalware-windows.md
Service: virtual-machines-windows
GitHub Login: @TomShinder
Microsoft Alias: tomsh

@mcurko Thank you for reaching out , our team will review your query and get back to you at the earliest.

Thanks for the feedback! I have assigned the issue to the content author to investigate further and update the document as appropriate.
@TomShinder Can you please help confirm on customer's question:

"Paths": "D:\IISlogs;D:\DatabaseLogs",
"Processes": "mssence.svc"
In regard to this JSON excerpt, are excluded files those who satisfy any or both of these conditions (paths, processes)? Would "C:\temp\mssence.svc" file be excluded?

Investigating/working on this in AB#1958451
Thanks for your dedication to our documentation. Unfortunately, at this time we have been unable to review your issue in a timely manner and we sincerely apologize for the delayed response. The requested updates have not been made since the creation of this issue, and the timeline for resolution may vary based on resourcing. We are closing this issue for now, but feel free to comment here as necessary. #please-close


Temp workaround to longhorn mount in pid 1

Addressed eve reboots and pod updates, now checks if pod contains change


Displaced whitespaces for html/body.

I discovered that one because it made tyxml's tests fail:
# open Markup
# to_string @@ write_html @@ signals @@ parse_html @@ string
    "  <title>foo</title>  "  ;;
- : string = "<title>foo</title>  "

The whitespaces after html (which, according to the spec, are not relevant for parsing) are moved to inside the body (where, iirc, they are relevant).

Another similar one from the tyxml tests: "<title>foo</title> " used to be parsed "<title>foo</title>" but is now parsed "<title>foo</title>  ".

I believe Markup.ml is parsing correctly in the first example. The old, at first glance more reasonable behavior was fixed in #28 and #30.
For comparison, see the output of parse5: https://astexplorer.net/#/gist/a57dce947fc085c1c2a77f6f6190dd74/187cdfb9d84a6b227a9fa445c01c24e126665404
Assuming we are starting in between  and , the parser mode will be "in body." The  token will change it to "after body," without popping the  element, and the  token to "after after body." At this point, the parser sees the whitespace, and it is supposed to process it using the rules of "in body," which eventually means adding them to the current node, which is still the  element because it was never popped.
Markup.ml looks wrong about the second example, looking into it.

Yeah, this is pretty much crazy. It looks like the HTML5 authors eventually gave up and decided to pretty much ignore  and , i.e. the  continues until the end of document, and these "after body" modes exist only to tell people that their HTML is malformed before resuming processing the "body."
The only thing that actually pops  and  elements is the end of input, IIRC.

@Drup, I can't reproduce the other issue in master. I added it as a test (see above commit), but Markup.ml generates
<title>foo</title>

which is correct w.r.t. the spec AFAICT.

hmm, I might have screwed up something on the way. It seems these bugs are mostly feature, and tyxml should respect them, so let's close!


:padding and :resize don't play nicely together

#!/usr/bin/env ruby
# encoding: UTF-8

require "tty"

table = TTY::Table.new(header: [ "Column 1", "Column 2", "Column 3"]) do |t|
  t << [ "11", "12", "13" ]
  t << [ "21", "22", "23" ]
  t << [ "31", "32", "33" ]
end

puts table.render(:ascii, resize: true)

puts table.render(:ascii, padding: [1, 1, 1, 1])

puts table.render(:ascii, resize: true, padding: [1, 1, 1, 1])

+--------------------------+-------------------------+-------------------------+
|Column 1                  |Column 2                 |Column 3                 |
+--------------------------+-------------------------+-------------------------+
|11                        |12                       |13                       |
|21                        |22                       |23                       |
|31                        |32                       |33                       |
+--------------------------+-------------------------+-------------------------+

+----------+----------+----------+
|          |          |          |
| Column 1 | Column 2 | Column 3 |
|          |          |          |
+----------+----------+----------+
|          |          |          |
| 11       | 12       | 13       |
|          |          |          |
|          |          |          |
| 21       | 22       | 23       |
|          |          |          |
|          |          |          |
| 31       | 32       | 33       |
|          |          |          |
+----------+----------+----------+

+----------------------------+---------------------------+----------------------
-----+
|                            |                           |
     |
| Column 1                   | Column 2                  | Column 3
     |
|                            |                           |
     |
+----------------------------+---------------------------+----------------------
-----+
|                            |                           |
     |
| 11                         | 12                        | 13
     |
|                            |                           |
     |
|                            |                           |
     |
| 21                         | 22                        | 23
     |
|                            |                           |
     |
|                            |                           |
     |
| 31                         | 32                        | 33
     |
|                            |                           |
     |
+----------------------------+---------------------------+----------------------
-----+

I would guess, without examining the code, that :resize is being applied before :padding.

Hi Craig,
Thank you for reporting this. Do you think you would have time to submit PR reproducing this bug? On my side, I will try to fix it this week.


blank page after login with 0.5.x

Behaviour
Impossible to display website when logged.
Steps to reproduce this issue

install latest docker image (0.5.x)
register new account
verify email
try to login

Expected behaviour

You should see Anonaddy page

Actual behaviour

I can register and verify email. After that, after login, i got blank page, no error, javascript is successfully load but the app seems to not be initialized

Only the main page (aliases page) doesn't work. Others pages are OK.

Thanks, that bug has been fixed in v0.6.0.
It was caused by an empty value being passed to Vue for the total fowarded, replied, blocked figures on the aliases page.
The query in the ShowAliasController has been updated to ifnull(sum(emails_forwarded),0) to return 0 instead of null.

@djedje72 @willbrowningme New image available (0.6.0)

thank you, alias page is OK in 0.6.0 😄


Provide code examples for various features

There are no code examples on how to use various features on the library.

Create a package in src/test/java/examples
Add examples for ExecutableProvider

Doesn't look like explicit examples are desired by anyone. The readme already contains some code snippets. And I just included a little more for the ExecutableProvider. Closing this issue.


Unit tests are needed.

I think unit tests are needed for this library. I can start writing It.

Yes, I definitely agree but haven't had time to write them. If you write some I'd be very open to a PR.


Multi field

Replacing the generic PetscSection construction with a re-work of Dave's. This allows us to define a custom number of DOFs at each grid point. Currently, it reproduces the same results as if we had called the generic setup routines.

Mike - you should avoid assuming that "int" is the same as "PetscInt". If you ever need to define a PETSc Vec which has a length larger than 2^32 (likely if you want run largish scale 3D calculations), you will have to configure petsc with --with-64-bit-indices. At this point, PetscInt will get promoted to "long" and implicitly assuming that int = PetscInt will create a lot of hard to trace SEGVs

Yeah, that's my bad. We've spoken about this before as well, it just keeps slipping my mind. I'll change these in the next pull request (working on that now).
Something else I noticed. It may have been obvious, but the way the Hasse diagram is looped through actually goes vertex -> edge -> face. For some reason I thought it was face -> edge -> vertex, but this could have just come from the confusion with where the looping starts. I.e. see below.
for (int dep = 0; dep <= depth; dep++) {
    int num_dof = 0;
    if (dep == 0)      { num_dof = num_dof_vtx; }
    else if (dep == 1) { num_dof = num_dof_edg; }
    else if (dep == 2) { num_dof = num_dof_fac; }


Preserve functions when updating process

Bug: http://b/152854934

modules are refreshed but yes we would want to preserve loaded flag..


Composer: update version constraints

... for dev dependencies.
Refs:

https://github.com/php-parallel-lint/PHP-Parallel-Lint/releases/tag/v1.4.0
https://github.com/Yoast/YoastCS/releases/tag/3.1.0

coverage: 95.171%. remained the same
when pulling b5f48957bfbc3f1c95e91425cb8fc1923fb5f445 on feature/composer-update-dependencies
into 1fb6984e53b11df6c5d46c5d592ad8f11efb23b8 on 2.x.

Superseded by #163 (this was pulled to the wrong branch 🤦🏻♀ )


Github repo

Web preview not loads
I can't run my github repository in web preview.
Please help me to fix this issue I can't use both free and paid app.
Please reply to my email.

Please can you provide more details. You can also share repository if it's public. Note, your index.html file should in root.

Fixed in latest version.


Add toAddress method.

There is often a case when you have adress either as string or Address, but you have to pass exactly Address further.
To not do conditional parse in the client side code we could incapsulate the ogic in toAddress method.

I do not think this is a part of a standard library. I expect the developers should handle parse explicitly cause it can throw errors.


Documentation update: token permissions to include read/write settings

Description
Updating README.md to include read/write settings permissions for the API token as this is required for kubernetes-monitoring.
How can this be tested?
Not required, updating documentation only.

Submitting to address issue #675

Thanks for pointing this out.
The required scopes were updated recently and can be found here (API token): Prerequisites
If you want to adapt the scopes accordingly, we'd need to change more than add the 2 you added.

Thanks for pointing this out. The required scopes were updated recently and can be found here (API token): Prerequisites
If you want to adapt the scopes accordingly, we'd need to change more than add the 2 you added.

Would it make sense to update the README.md to mirror more or less what's written in the update scope under prerequisites? Or  just provide a reference to the official documentation to avoid having to update this regularly? Or both..

Readme has been adapted accordingly with https://github.com/Dynatrace/dynatrace-operator/pull/820 .Token scopes needed in order to run the operator are documented on the official help page as linked in the readme now.


cannot able to check or uncheck the row dynamically

Hi i have an case, where i need to uncheck or check the row without doing it by click event.
Means, there should be a function which can accept rowIndex and isSelected(boolean) as parameter and perform the above uncheck or check based on isSelected.
please provide some function.

I've commit a newest code to master and you can clone to your local and run qsample as this gist : https://gist.github.com/AllenFang/e6440666329ac5b27a60.
Just like what tell you on hangout. It's hard for me to provide a instance or static function for user to call for set the row select or unselect.
So I use componentWillReceiveProps in TableBody and in these component which render BootstrapTable can change the selected rows on table through re-render by selectRow prop.
A simple explain is if you want to select some rows, you just set the selectedattribute in selectRow prop and trigger render.

About the dynamic select or unselect feature, I've released on v0.9.5


Provision fails with error "Cannot complete login due to an incorrect user name or password" using secrets in configuring vsphere.conf

Is this a BUG REPORT or FEATURE REQUEST?:

Uncomment only one, leave it on its own line:
/kind bug

when secrets are used in vsphere.conf, pvc creation fails with error  Cannot complete login due to an incorrect user name or password:
user should be able to create volume using secret,plain text username/password works for same cred:
**
vsphere.conf
[Global]
insecure-flag = 1
secret-name = "vcconf"
secret-namespace = "default"
[VirtualCenter "<IP_ADDRESS>"]
port = "443"
datacenters = "Pune_Shared"
[Workspace]
server = "<IP_ADDRESS>"
datacenter = "*******"
default-datastore=""
resourcepool-path=""
folder = "*****"
[Disk]
scsicontrollertype = pvscsi
[Network]
public-network = "********"
vccredentials.yaml
apiVersion: v1
kind: Secret
metadata:
name: vcconf
type: Opaque
data:
<IP_ADDRESS>.username: ZmxleGt1YmVAdnNwaGVyZS5sb2NhbA==
<IP_ADDRESS>.password: QXZheWExMjM0NSM=
created secret kubectl create -f vccredentials.yaml --namespace=default
used
echo -n 'password' | base64   to encode the username and password
kubectl describe secret vcconf
Name:         vcconf
Namespace:    default
Labels:
Annotations:
Type:  Opaque
Data
<IP_ADDRESS>.password:  11 bytes
<IP_ADDRESS>.username:  22 bytes
verified decoding the username and password, it matches the username and password.
but while creating pvc provision fails with above error, If the same user name and password is used in plain text, things are working.
**:
Environment:

Kubernetes version
Server Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.3", GitCommit:"a4529464e4629c21224b3d52edfe0ea91b072862", GitTreeState:"clean", BuildDate:"2018-09-09T17:53:03Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"linux/amd64"}

Cloud provider or hardware configuration: vcenter

OS (e.g. from /etc/os-release):
NAME="Red Hat Enterprise Linux Server"
VERSION="7.4 (Maipo)"
ID="rhel"

Kernel Linux flexmaster191 3.10.0-693.el7.x86_64 #1 SMP Thu Jul 6 19:56:57 EDT 2017 x86_64 x86_64 x86_64 GNU/Linux

cc: @abrarshivani

@divyenpatel  @abrarshivani any update/input on this issue?


@page directive should show an error if it's not first in file

Or user would just get 404 trying to run it

This issue was moved to aspnet/Mvc#6633


Uniform Python and custom mutator API

This pull request provides uniform APIs for both Python module and the custom mutator, as described in #191.
Ready for review

Add an initialization function for the custom mutator
Add a pre-save function for Python module
Add trimming support for the custom mutator by reusing the trimming routines related to Python module
Add a new structure struct custom_mutator to save function pointers of external mutators
Allow the existence of old afl_custom_mutator API in the custom mutator
Remove AFL_PYTHON_ONLY (env) and python_only (variable)
Unify fuzz API of the custom mutator and Python module
Merge the custom mutator into the old python_stage, which is now renamed to custom_mutator_stage
Merge python_mutators.md into custom_mutator.md
Remove python_mutators.md
Merge examples/python_mutators into examples/custom_mutators
Remove examples/python_mutators
Update existing examples to demonstrate new APIs

Looks very good to me.
@andreafioraldi ?

Looks good also for me.
I want to add also afl_custom_queue_get that is called at the start of fuzz_one_oroginal() and afl_custom_queue_new_entry that is called at the end add_to_queue().
@h1994st if you want to implement also them, you can for me, otherwise I'll do it this weekend.
Regards the last, afl_custom_havoc_mutation, I'll do the job myself cause it needs to modify a bit havoc. With this last hook, we can reimplement the stacked smart mutations of AFLSmart as a custom mutator.

@h1994st if you want to add the other two hooks (both in C and python) comment on the issue #191.
I'll merge your work now, ty for the contribution.

If anybody gets bored, feel free to port this to #220 🙃


Please tag releases

Please tag releases via git tag so it's easier to follow changes on GitHub.
Thank you!

@mkurz Good point - thanks for the reminder!  We only have the one release right now, but we'll be sure to tag any future ones from now on too.

Thank you!


Cannot run symlink..

On windows i have some symlink (mklink) that target executable file
zpaq.exe -> zpaq64.exe
on cmd if i call zpaq i get right pgm executed
on nyagos if i call zpaq or zpaq.exe  i got : 'zpaq.exe' is not recognized as an internal or external command....

Ok. I see the problem.
CMD.EXE could find zpaq64.exe as zpaq.exe, but nyagos.exe could not find.

memo

os.exec.LookPath could not find the executable symbolic linked.

I fixed the problem. Since os.exec.LookPath which seek executables cound not understand relative path on symbolic link, create my own dos.LookPath.
Would you confirm this executable runs as your expect.

nyagos-issue-167-amd64.zip
nyagos-issue-167-386.zip

I confirm that it is fixed... many thanks !
-- I also built and tested from the repository.


Add optional parameter modifierFiltersResults for disabling count of $modify query results

Adds an optional parameter for allowing find() queries to opt-out of applying the result of  any modifiers to the returned total.
Works around the issue with the total of groupBy described in https://github.com/feathersjs-ecosystem/feathers-objection/issues/102
The parameter can be safely set to false for any query with a modifier which does not filter the result set but only enhances it with additional data, e.h. withGraphFetched.

Released with v7.1.0

Awesome, thank you! :)


Please invite me to the GitHub Community Organization

Please invite me to the GitHub Community Organisation.

Name: OkikiJesu

Discord Username(if exists):Kiki_J#0872

Additional Context:

I found him on youtube. The interview he had with Ruth Ikegah. It made me want to join this community.

what I like about this community is the encouragement you get from doing open source projects. The fact that you could do an open-source project no matter how long you've been in programming is really encouraging to me.
:nerd_face:

Welcome @okikijesutech


Conductor library support

Conductor is a popular library that used as a replacing of fragments. Support for it will be so useful thing.

Seems it has getActivity so that you can integrate easily.
https://github.com/bluelinelabs/Conductor/blob/131589670f485bdd85a606d3a125af0b0ae1a77d/conductor/src/main/java/com/bluelinelabs/conductor/Controller.java#L287
Reopen if needed~

@Sar777 I thought you should annotate activity and call method in activity as usual. Isn't it possible? 👀
If not we have to customize the library 🤔

it isn't good idea for Single Activity apps :(

Hello, I've added support for conductor. https://github.com/Sar777/PermissionsDispatcher/tree/feature/conductor

Oh, can you send us pull request? I'd like to take a look.

Prototype: https://github.com/permissions-dispatcher/PermissionsDispatcher/pull/546

@TemMax @Sar777 what do you think about https://github.com/permissions-dispatcher/PermissionsDispatcher/pull/574

PR is done


Added hasKnownLength public method

#196 #262

Coverage increased (+0.06%) to 97.917% when pulling 655b95988ef2ed3399f8796b29b2a8673c1df11c on alexindigo:has_known_length into 652b16ff5b9077bdf65eb66b67286c823c2a1040 on form-data:master.

lgtm

Looks like Bithound takes it's sweet time :) So I'll just merged it as is.

@bitinn Published v2.1.0


Adding support for more then just app.py

Adding support for more then just app.py.
The only way I could currently think to make this work was to have an explicit list of files that need to get updated other then the app.py, used to add them to the zip file. Since we're already relying on people having a requirements.txt for pip installation the new file is called internal_requirements.txt .
It is a \n separated list of files to include in the deploy. Supports both files in sub folders and files in the same directory as the app.py.
I didn't create a test for this use case since I wasn't exactly sure about the formatting for them given that this test relies on multiple files. also the current tests before I changed anything didnt succeed for me.
Pasted below is my example files for testing (not included so as to not pollute the project):
./app.py
from chalice import Chalice
from package import fibo
import fibo_2
app = Chalice(app_name='subfolders')
app.debug = True
@app.route('/')
def index():
fibList = fibo.fib2(10)
fibList2 = fibo_2.fib2(10)
return {'hello': 'world', 'fib' : fibList, 'fib2': fibList2 }
./fibo_2.py
Fibonacci numbers module
def fib2(n):   # return Fibonacci series up to n
result = []
a, b = 0, 1
while b < n:
result.append(b)
a, b = b, a+b
return result
./package/fibo.py
Fibonacci numbers module
def fib(n):    # write Fibonacci series up to n
a, b = 0, 1
while b < n:
print b,
a, b = b, a+b
def fib2(n):   # return Fibonacci series up to n
result = []
a, b = 0, 1
while b < n:
result.append(b)
a, b = b, a+b
return result
./package/init.py
./internal_requirements.txt
package
fibo_2.py
And that's it. Any feedback is appreciated and thanks for the easy tool, it was just missing this one feature to really be useful.

Confirmed that this works and was very helpful for a test project I'm building today :+1: I don't yet have an opinion on the structure of the solution, but the feature is definitely a requirement.

Great! It is a bit patchy, but hopefully something similar can be merged into the main branch! Thank you!

Yeah I was kind of on the fence about it. Since the tool already requires a requirements.txt to know what libraries to include, I figured the pattern had already been set to require explicitness.
The alternatives were to just uploading everything in the local directory or requiring everything to be in a subfolder, though both of those are easy alternatives. The negative with that plan is that it would probably require an exclusion file to prevent some stuff from getting uploaded that is undesirable like credentials and less obvious.

I actually wouldn't be opposed to just supporting a single local directory in which everything gets included.  The logic would roughly be:

Is there an app/ directory?  If so, include everything in app/.
Is there an app.py file?  If so, just include app.py.
Otherwise, error out.

The requirements.txt file is there really because we have to have some way to know what packages and what versions of those packages you want installed.  There's not really any "convention" we could follow to automatically get that information.
In terms of the app structure, we're already assuming an implicit app.py, so making that also include an app/ directory would also work.
The plus side would be that everything could still "just work".  If we required that app/ was a package with an __init__.py, that means that import app;  your_chalice_app = app.app could still work in terms of route generation and policy generation.
What do you all think?

I love this idea and can't wait to make use of it.

Just for some context, I implemented this feature before the suggestion of the app directory had been made in another feature request. So when I did implement it, I did it in the most pythonic way I could think of where its generally thought to be better to be explicit instead of implicit (https://www.python.org/dev/peps/pep-0020/), and people's applications wouldn't need to be restructured after merging the pull request.
Now that I've read this alternate proposal, I'm not really against it, but it is going to make two different ways to build apps (and 2 different control paths inside chalice). One which just required an app.py and a separate one where everything needs to be in an app directory and they cant co-exist.
It would mean as soon as you need to split your code into separate files or include non-pip libraries you need to re-structure your app so it was in a sub library.
If the feature is implemented in this more implicit manner, I think it will be clearer and cleaner to just always require an app folder with an app.py in it. And have the chalice new-project structure the application in that way.
One of the advantages of this being beta software is that its possible to require restructuring, without having to always stay backwards compatible.
What do you think?

You make good points.  I hadn't considered that growing an app from a single file to multiple files would unnecessarily require you to move code around.  Even in the simplest case of mkdir app; mv app.py app/__init__.py, it still requires you to shuffle code around.
I do like having the flexibility to structure code however you want, and in multiple directories, but I wonder if there's a way to get something more implicit that's based on what people would expect to be reasonable behavior.
As counter-examples I want to avoid, consider the packages kwarg in the setup.py files.  In boto, we call out every single package we want to include (https://github.com/boto/boto/blob/develop/setup.py#L62).  It's explicit, but at the same time, it seems reasonable that we want to include everything under boto/.  It's also something we've forgot to update occasionally, and in newer packages, we just use find_packages (https://github.com/aws/aws-cli/blob/develop/setup.py#L32).  Same thing with the MANIFEST.in files.  While it's nice to have control over what gets included, it's annoying to always have to call out you do in fact want the README.rst included in the sdist, given that it's common to use long_description=open('README.rst').read() in the setup.py.
Just throwing out other ideas:
a) Any python packages (any top level dir with an __init__.py) and top level modules (*.py) are automatically included.
b) Have a fixed, hard-coded directory that will be included if present.  This would be in addition to app.py.  So you start with app.py, and if you want to add multiple files, you can create a packages directory and add additional python files within that directory and they'll automatically be included.
Are either of those options any better?  Option (b) seems like the best of both worlds.

this +1:

a) Any python packages (any top level dir with an init.py) and top level modules (*.py) are automatically included.

also aws eb cli pays attention to .git ignore file, could be useful here for flexibility future-proofing

@jamesls Maybe a directory named app? I've seen that a lot in flask projects

I'm personally a fan of leveraging the behavior of find_packages to pull all .py files from folders that contain an init.py. It'd keep the packaging of chalice applications consistent with the broader python ecosystem.

Initial support for multi app files was added in https://github.com/awslabs/chalice/pull/146.  I know there was a good amount of discussion on this.  Thanks everyone for the input on this.  FWIW, I tried going down the find_packages route, but it didn't have a nice way to include non python files (more info here).
Please give the current version a try and share any feedback you might have.  Hopefully it's a reasonable compromise that accommodates most uses cases.


xpub import - invalid base58 character 0x3a

I get this error when attempting to use Xpub export on the Jade device, and import it using Blockstream Green.
Steps to reproduce:

Create standard wallet on Blockstream Jade
Go into Options > Wallet  > Xpub Export
Make sure singlesig and native segwit are selected
On the Android Green app select "Watch-only" during setup, select singlesig
Select Singlesig, scan QR code animation with phone camera
Click "Log In", get error message:

"Invalid base58 character 0x3a"
I'm trying to set this up using the instructions here:
https://help.blockstream.com/hc/en-us/articles/11243000549401

Hi,
When we added QR xpub export to Jade it was decided to use a format that was supported by the majority of 3rd party wallet apps, as the main goal here was to improve compatibility with existing QR-friendly wallets (eg Sparrow, Specter, Nunchuk, BlueWallet, etc).  (format: ur:crypto-account, from Blockchain Commons).
Unfortunately this format is not yet supported by the Green apps - although support is planned and is I believe in progress.  (The next GDK release should contain the underlying libraries needed to create and parse the BC UR formats.)
I will update this item as this work progresses, to keep you informed.

Thanks for the update, @JamieDriver .  I'll try it out with Nunchuk wallet today.
The Jade wallet is awesome, love the camera feature for air gap functionality.

Hi @samsam380,
Always happy to help!
So an not to obscure this item about the QR xpub export, I've replied on new issue #69 dedicated to this discussion.


python dependencies

We can't have the user installing this stuff.  That should all be handled automatically.
Additional Python Dependencies
This module depends on Python, Paramiko, PIP, and cm_client. These should be installed on the host you are using to deploy the Terraform module.

On EL7 hosts, installation can be performed using the following commands:

sudo yum install python python-pip python-paramiko.noarch -y
sudo pip install --upgrade pip
sudo pip install cm_client
On Mac, installation can be peformed using the following commands:

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
sudo python get-pip.py
sudo pip install --upgrade pip
sudo pip install cm_client paramiko

Closing this - it's now introduced in SIMPLE branch.


Out-of-bounds link in JS's template literal

VSCode Version: Code 1.18.1 (929bacba01ef658b873545e26034d1a8067445e9, 2017-11-16T18:23:26.125Z)
OS Version: Darwin x64 17.2.0
Extensions:

Extension
Author (truncated)
Version

vscode-docker
Pet
0.0.22

better-toml
bun
0.3.1

vscode-eslint
dba
1.4.3

tslint
eg2
1.0.24

Go
luk
0.6.69

vscode-elixir
mjm
1.1.0

python
ms-
0.8.0

debugger-for-chrome
msj
3.5.0

rust
rus
0.3.2

elm
sbr
0.15.1

Steps to Reproduce:

Open a new JavaScript file
Enter a string literal that has a URL, with a placeholder next to it, without a space in between:

`http://example.com/${5 + 1}`

Ctrl-click the link, and a part of the placeholder is sent to the browser, too.

Reproduces without extensions: Yes

@alexandrudima Not sure what we can do about this. Seems like a generic limitation of the link detector. Only checking within a token for a link would fix this case but I'm not sure that is practical. Any thoughts?

Not sure. Can the link detector have a context that tells if it is inside a template or so, and changes its limits depending on that? I am not fully aware of the internals of VS Code, but I believe if it was so much work for a little benefit, a WONTFIX is the way to go.

The built-in (language agnostic) link detector will look for http:, https: or file: links. By working in all languages, it is, by definition, programming language agnostic. The main purpose of the link detector is that you can paste in links to stack overflow or whatnot in comments and you can easily go there from the editor.
IMHO, the purpose of a link detector is not to evaluate expressions in the programming language, determining that 5 + 1 is 6 and then interpolate 6 to produce the link http://example.com/6. I would argue this issue is out-of-scope.

Yes, it should not do, because 1) it is not the expected behavior and 2) most of the time, the evaluation will require runtime variables to be evaluated which is mostly non-practical.
Maybe I have given a bad example. The problem is at that example, the part http://example.com/${5 is considered a link, while a saner option is to limit it to http://example.com/ or even disable link parsing there completely.

I think disabling link detection in template strings entirely may be a little heavy handed. The other option I see would be limiting link detection to the contents of a single token, but that may cause regression in other cases
Since the problem is relatively minor and seemingly not easy to fix, I'm going to closing this issue as out of scope


Google Analytics: Native linking failed

Hello,
Since I updated Xamarin.iOS, I get linking errors when compiling my project with the Google Analytics for iOS component:
	MTOUCH: error MT5214: Native linking failed, undefined symbol: _kGAIViewportSize. This symbol was referenced by the managed member Google.Analytics.GaiConstants.ViewportSize. Please verify that all the necessary frameworks have been referenced and native libraries linked.
	MTOUCH: error MT5214: Native linking failed, undefined symbol: _kGAIUseSecure. This symbol was referenced by the managed member Google.Analytics.GaiConstants.UseSecure. Please verify that all the necessary frameworks have been referenced and native libraries linked.
	MTOUCH: error MT5214: Native linking failed, undefined symbol: _kGAIUserId. This symbol was referenced by the managed member Google.Analytics.GaiConstants.UserId. Please verify that all the necessary frameworks have been referenced and native libraries linked.

(and many more)
My version of Xamarin.iOS is:
Version: <IP_ADDRESS> (Xamarin Studio Community)
Hash: a7f1dc3
Branch: master
Build date: 2017-01-08 14:16:01-0500
Any idea?
Thanks!
Benjamin

I have this issue also. Has anyone found a fix or workaround?

The latest version seems to have fixed the issue:
Xamarin Studio Community
Version 6.2 (build 1778)
Installation UUID: a6600c45-6a5a-41c2-9c6b-d8e12d27d4d0
Runtime:
Mono 4.8.0 (mono-4.8.0-branch/6f90ed1) (64-bit)
GTK+ 2.24.23 (Raleigh theme)
Package version: 408000472

NuGet
Version: <IP_ADDRESS>
Xamarin.Profiler
'/Applications/Xamarin Profiler.app' not found
Apple Developer Tools
Xcode 8.2.1 (11766.1)
Build 8C1002
Xamarin.iOS
Version: <IP_ADDRESS> (Xamarin Studio Community)
Hash: 4e31137
Branch: cycle9
Build date: 2017-01-20 13:08:53-0500
I'm closing it as it's not longer reproducible.


Add EditorConfig-Checker Plugin to docs

REPO: https://codeberg.org/woodpecker-plugins/editorconfig-checker
DOCS: https://woodpecker-ci-woodpecker-pr-4371.surge.sh/plugins/EditorConfig Checker

Why? Im still not a fan of this wrapping approach as it adds a lot of overhead

Ah this time its a real plugin, nevermind

While I also don't like the idea of shell wrappers as plugins without any additional beef behind it, I think the overall idea is to have a large suite of "plug and play" plugins that are perceived as "secure" compared to normal steps that would execute the same job.

Plungins are not only for security ... they are also for beginners to not write scripts.
In this case the main benefit is feedback on sucess and the option to only lint changed files (via simple bool option)
As told the target audience of such plugins (prettier, pm, editorconfig, ...) are beginners not advanced users.
And if it exist we cam dogfood ...
I think I need to make an actual survay about this to support my argument with hard numbers 🤔.


Twincat V3.1 4026.10.0 remove  convert old TC2 project capability

With TwinCAT Standard - Engineering V3.1 4026.10.0, the  option to open and convert  an old TwinCAT 2 project is no more visible in both shell :

TCXaeShell64 (64-bit base on visual studio 2022)
TCXaeShell ( 32-bit historical version base on visual studio 20217)

previous (TC3.1.4024.xxx)

Thanks for reporting!


TypeError: ClientSession._request() got an unexpected keyword argument 'https'

Describe the bug
Hello, when I ran the code snippet on the document, I encountered the following problem:
Python 3.10.9 (main, Mar  1 2023, 18:23:06) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from datasets import load_dataset
>>> base_url = "https://rajpurkar.github.io/SQuAD-explorer/dataset/"
>>> dataset = load_dataset("json", data_files={"train": base_url + "train-v1.1.json", "validation": base_url + "dev-v1.1.json"}, field="data")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/liushuai/anaconda3/lib/python3.10/site-packages/datasets/load.py", line 2112, in load_dataset
    builder_instance = load_dataset_builder(
  File "/home/liushuai/anaconda3/lib/python3.10/site-packages/datasets/load.py", line 1798, in load_dataset_builder
    dataset_module = dataset_module_factory(
  File "/home/liushuai/anaconda3/lib/python3.10/site-packages/datasets/load.py", line 1413, in dataset_module_factory
    ).get_module()
  File "/home/liushuai/anaconda3/lib/python3.10/site-packages/datasets/load.py", line 949, in get_module
    data_files = DataFilesDict.from_patterns(
  File "/home/liushuai/anaconda3/lib/python3.10/site-packages/datasets/data_files.py", line 672, in from_patterns
    DataFilesList.from_patterns(
  File "/home/liushuai/anaconda3/lib/python3.10/site-packages/datasets/data_files.py", line 578, in from_patterns
    resolve_pattern(
  File "/home/liushuai/anaconda3/lib/python3.10/site-packages/datasets/data_files.py", line 340, in resolve_pattern
    for filepath, info in fs.glob(pattern, detail=True).items()
  File "/home/liushuai/anaconda3/lib/python3.10/site-packages/fsspec/asyn.py", line 113, in wrapper
    return sync(self.loop, func, *args, **kwargs)
  File "/home/liushuai/anaconda3/lib/python3.10/site-packages/fsspec/asyn.py", line 98, in sync
    raise return_result
  File "/home/liushuai/anaconda3/lib/python3.10/site-packages/fsspec/asyn.py", line 53, in _runner
    result[0] = await coro
  File "/home/liushuai/anaconda3/lib/python3.10/site-packages/fsspec/implementations/http.py", line 449, in _glob
    elif await self._exists(path):
  File "/home/liushuai/anaconda3/lib/python3.10/site-packages/fsspec/implementations/http.py", line 306, in _exists
    r = await session.get(self.encode_url(path), **kw)
  File "/home/liushuai/anaconda3/lib/python3.10/site-packages/aiohttp/client.py", line 922, in get
    self._request(hdrs.METH_GET, url, allow_redirects=allow_redirects, **kwargs)
TypeError: ClientSession._request() got an unexpected keyword argument 'https'

Steps to reproduce the bug
from datasets import load_dataset
base_url = "https://rajpurkar.github.io/SQuAD-explorer/dataset/"
dataset = load_dataset("json", data_files={"train": base_url + "train-v1.1.json", "validation": base_url + "dev-v1.1.json"}, field="data")

Expected behavior
able to load normally
Environment info

datasets version: 2.14.4
Platform: Linux-5.4.54-2-x86_64-with-glibc2.27
Python version: 3.10.9
Huggingface_hub version: 0.16.4
PyArrow version: 12.0.1
Pandas version: 1.5.3

Hi! I cannot reproduce this error on my machine or in Colab. Which version of fsspec do you have installed?


fix zedrouter recursive function stack overflow crash

Signed-off-by: Naiming Shen<EMAIL_ADDRESS>this crash was observed when creating an AppNetwork, it hit an error of duplicate port map assignment, and bailed out; due to the device has another App failed also for some reason, the zedrouter recursively calling the handleAppNetworkCreate and scanError function in turn and finally the stack is overflow and crash. The code works for one App creation fail, but it will hit this when multiple App fail. The patch moves away from recursive calling, set a timer for 60 seconds and to revisit the AppNetworkCreate again.

Hey @nordmark -- I think @naiming-zededa took care of all feedback, but I'll leave it up to you to merge it during your daytime.

the build yetus failed, the link only showing 'artifacts not found'


Refactor BlockProcedure

[x] Remove API complexity with BlockProcedure and AsyncProcedure
[x] Support accessing self inside the block, to expose log etc
[x] Maintain existing APIs with deprecation warnings

Now, the following is possible:

Simple synchronous block (existing functionality):

let block = BlockProcedure {
    print("Hello World")
}

Synchonous block, accessing the procedure inside the block:

let block = BlockProcedure { procedure in
    procedure.log.debug.message("Hello World")
    procedure.finish()
}

Note that here, the block is responsible for finishing itself - i.e. call .finish() or .finish(with:) to finish the Procedure. Using this initializer, by default, BlockProcedure will add a TimeoutObserver to itself, using defaultTimeoutInterval which is set to 3 seconds. This can be modified if needed.
BlockProcedure.defaultTimeoutInterval = 5

AsyncBlockProcedure is now deprecated, but still works as before. For example:

let block = AsyncBlockProcedure { finishWithResult in
    DispatchQueue.default.async {
        print("Hello world")
        finishWithResult(success)
    }
}

but this will raise a deprecation warning. This can now be achieved with BlockProcedure, as:
let block = BlockProcedure { procedure in
    DispatchQueue.default.async {
        print("Hello world")
        procedure.finish()
    }
}

CancellableBlockProcedure is deprecated, just use BlockProcedure and check isCancelled directly, e.g.

let block = BlockProcedure { procedure in
    guard !procedure.isCancelled else { procedure.finish() }
    DispatchQueue.default.async {
        print("Hello world")
        procedure.finish()
    }
}

ResultProcedure as been re-written as a subclass of BlockProcedure (previously, it was the superclass). Existing functionality has been maintained:

let hello = ResultProcedure { "Hello World" }

For completeness sake, it also supports receiving itself as a first argument to the block:
let hello = ResultProcedure { procedure in
    procedure.log.debug.message("Making a string")
    return "Hello World"
}

AsyncResultProcedure as before - just re-written but is still a subclass of ResultProcedure.

CancellableResultProcedure has been deprecated - just use ResultProcedure


White space invades image on android phone for the first image taken in camera

Reason
I tried to compress jpeg image, but white space Intermittent occurs..
I think that it is reason of extra canvas. 🙄 how think about it?!

Code Example
export const compressImage = async (targetImage: File) => {
  const options = {
    fileType: 'image/jpeg',
    maxSizeMB: 0.5,
    maxIteration: 100,
  };
  try {
    const imageCompression = (await import('browser-image-compression')).default;
    const compressedFile = await imageCompression(targetImage, options);

    return compressedFile;
  } catch (error) {
    console.error(error);
  }
};

const compressedImage = await compressImage(targetImage);
return new File([compressedImage], targetImage.name, {
    type: targetImage.type,
    lastModified: targetImage.lastModified,
});

i find this seems to happen when I upload a photo that i took directly with camera (not a file upload) on my Huawei P20 Pro

@kyoung-jnn @sscholle
Can you upload the image file as a zip file here so I can reproduce this issue?

Can someone give detailed steps to reproduce this issue?

Had the same problem. My settings for image compression were:
{ maxSizeMB: 0.5,
maxWidthOrHeight: 1920,
useWebWorker: true }
I found that the combination of maxSize + maxWidthOrHeight caused the image to shrink down in the space, but cause the additional whitespace to appear. I only ever experienced this while using a mobile device camera - never from files from the system.
Hope this helps someone!

@dyscordia Thanks for the advice.

@kyoung-jnn @sscholle Can you upload the image file as a zip file here so I can reproduce this issue?
Also, can you try it here: https://donaldcwl.github.io/browser-image-compression/example/basic.html

Original

Compressed output

Maybe the MB size is the problem.
I tried with a 0.5MB limit, and this gives the bad result with large white border.

When I choose the bigger size, it seems to work better.

This error is so critical for us that we sadly have to migrate to another library: https://github.com/fengyuanchen/compressorjs


checkov: 2.0.549 -> 2.0.554

Motivation for this change
Update to latest upstream release 2.0.554
Change log: https://github.com/bridgecrewio/checkov/releases/tag/2.0.554
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
21.11 Release Notes (or backporting 21.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 145045 run on x86_64-linux 1

1 package built:

checkov


Saplings aren't planting themselves

I noticed, while testing stuff in my pack, that saplings, not matter the source mod, and even vanilla ones, weren't able to plant themselves.
I think the problem might be related to the presence of Nature Overhaul in the game environment but I'm not sure, I'll investigate about it (there's an autosapling feature in this mod too)

Thanks! Try turning the auto plant in on or the other mod off.


Fix toStringForLog for 'false'

It was being treated as unknown.
Rewrite toStringForLog and add tests for it.

r? @keybase/react-hackers


Poll: Supported Go versions

What versions of Go do we want to support?
I would be in favor of the last 2 minor releases, right now that is: go1.3.x and go1.4.x. When go1.5 is released, we will support go1.4.x and go1.5.x.
Go has a great compatibility promise. Upgrading to a newer version of go is never really an issue, so most projects using gorp won't have trouble staying up-to-date.
Please comment.
Notify top contributors and new maintainers: @coopernurse @robfig @sqs @nelsam @sqdk @begizi @benprew

Sounds good to me!

Some backstory: this issue originated from #224, where @sqdk noticed that the go1.1 build fails because go-sql-driver/mysql uses a function introduced in go1.2.

I agree with supporting the latest two versions.  Anything more than that is going to hit us with some pretty ugly limits in the future.

This poll has been open long enough. I suggest we go ahead with implementing these changes. I'll open a PR.

PR is #234 (which is a pretty nice number since it's introducing travis checks for go 1.2, 1.3 and 1.4 :smile: )


Error on ingesting samples that are too old or are too far into the future

Hi!
Faced strange situation with timestamps.
Briefly:

If timestamp is taken from datetime.datetime.now() - everything is ok.
If timestamp is parsed from the date which looks same - I got warning in Prometheus server log about bad datetime and metric is not shown.

Here is code example with comments about which metrics works and which don't:
import datetime
import sys
import time
import pytz

from prometheus_client import (
    start_http_server,
)
from prometheus_client.core import (
    GaugeMetricFamily,
    REGISTRY,
)

class BugDemoMetricsCollector:

    def collect(self):
        dt_format = '%Y-%m-%d_%H-%M-%S.%f %z'
        dt_now = datetime.datetime.now(tz=pytz.timezone('UTC'))
        print(dt_now)
        # Works
        gobj = GaugeMetricFamily('FooMetricGood', '')
        gobj.add_metric([], 123, timestamp=dt_now.timestamp())
        yield gobj
        # Works too
        dt_now_str = dt_now.strftime(dt_format)
        dt_parsed = datetime.datetime.strptime(dt_now_str, dt_format)
        gobj = GaugeMetricFamily('FooMetricGoodToo', '')
        gobj.add_metric([], 456, timestamp=dt_parsed.timestamp())
        yield gobj
        # Does not work, but same date
        dt_custom_str = '2021-11-11_18-12-59.000000 +0000'
        dt_parsed_from_custom = datetime.datetime.strptime(dt_custom_str, dt_format)
        gobj = GaugeMetricFamily('FooMetricNotWorking', '')
        gobj.add_metric([], 789987, timestamp=dt_parsed_from_custom.timestamp())
        yield gobj

def main():
    start_http_server(8080)
    REGISTRY.register(BugDemoMetricsCollector())
    while True:
        time.sleep(1)

if __name__ == '__main__':
    sys.exit(main())

Message from Prometheus log about trouble metric:
prometheus-prometheus-1  | ts=2021-11-11T13:41:01.895Z caller=scrape.go:1563 level=warn component="scrape manager" scrape_pool=services target=http://<IP_ADDRESS>:8080/metrics msg="Error on ingesting samples that are too old or are too far into the future" num_dropped=1

But date is correct, here is Python code for used date and format:
>>> datetime.datetime.strptime('2021-11-11_18-12-59.000000 +0000', '%Y-%m-%d_%H-%M-%S.%f %z')
datetime.datetime(2021, 11, 11, 18, 12, 59, tzinfo=datetime.timezone.utc)

I've spent more than one day trying to google, read docs and resolve it - no results.
Any help will be very appreciated.

I ran into this same error message when using Prometheus. This is an issue with promethus itself, not an error in client_python.
It turns out, it's not comparing the time of the incoming log to the current system time. It is comparing it to the latest time in the database. The log message is missing three key pieces of data: what the time of the entry is, whether the entry is too old or too far in the future, and boundry date/time that determines whether an entry is acceptable.
As best I can tell, the responsible code is here. I say this because the similar code in target.go did not change the error message when I commented it out and deployed my modified build, whereas when I commented out the checks in head_append.go, they got rejected because they were out of order instead of too old or too far in the future.
Thus, if you have an entry in the database in the future, all new data will be rejected because it's too old. It doesn't look like promtool tsdb ... has any way to delete future entries. I solved it on my system by stopping prometheus, removing the data directory and starting prometheus again.
This can be reproduced by setting the system clock to the future, adding some data to prometheus, and then correcting the system clock.
Apologies if replying to an old post is a faux pas here, but there's only one other place this issue seems to have been discussed and that thread was closed without resolving the issue. So my hope is that this comment will help people in the future when they run into this same error message.


get_transaction will now return a tx from backlog, even if there are some in invalid blocks

I made a slight change to how Bigchain.get_transaction() works.
Before, if there was a transaction with the specified txid in the backlog and in some invalid blocks (but nowhere else), Bigchain.get_transaction() would return None. I changed it so that in that case, it returns the transaction from the backlog (and if the user asked for the transaction's status, it will be 'backlog').
I updated and expanded the docstring for Bigchain.get_transaction().
I also changed the test which checked to see the response to Bigchain.get_transaction() when there's a copy of the transaction in an invalid block. Before, it didn't care about the backog: the response was always expected to be None. Now it does care about the backlog, so the original test was split into two tests:

one with a copy of the transaction in an invalid block, and nowhere else
one with a copy of the transaction in the backlog and in an invalid block

Current coverage is 96.41% (diff: 100%)

Merging #793 into master will decrease coverage by 0.11%

@@             master       #793   diff @@
==========================================
  Files            26         26
  Lines          1643       1646     +3
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
+ Hits           1586       1587     +1
- Misses           57         59     +2
  Partials          0          0

Powered by Codecov. Last update 381ffca...e81283f

Note: I originally didn't add the second test and code coverage went down slightly. Once I added the second test, it went up by 0.06%.

:+1:


Can't create container from elastic/apm-serverlatest

Expected behavior
Create container for elastic/apm-server:latest (currently 7.1.1)
If the latest container can't be created because the latest tag doesn't exist, do one of the following:
a) explain that there is no latest tag
b) assume the most recent release is latest and create that
c) prompt user to select which release to create
Actual behavior
"We're sorry. There seems to be an error:
(HTTP code 404) unexpected - manifest for elastic/apm-server:latest not found
If this error is invalid, please file a ticket on our Github repo.

Information about the Issue
There is no latest tag in elastic/apm-server releases. 7.1.1 is currently the most recent release. I can create the container if I select that tag.
Steps to reproduce the behavior

Click + New
Search apm-server
Click CREATE on elastic/apm-server.

Screenshot - apm-server-2 is the container that doesn't work when trying to create from latest


Group Chat Name Text Cut Off on Group Information Page

Group Chat Name Text Cut Off on Group Information Page
Description:
On the group information page for group chats, the Group Chat Name text is being cut off. This makes it difficult to read the full name of the group chat.
Steps to Reproduce:
Open the group chat.
Navigate to the group information page.
Observe the Group Chat Name text.
Expected Result:
The Group Chat Name should be fully visible and not cut off.
Actual Result:
The Group Chat Name text is cut off.
Android Pixel 7
Slack Message

Now we show ellipsis so it's not totally cut off
Going to close this out until we have updated designs for that screen


Proximal bundle method

Implemented proximal bundle method PBM-1 from DOI 10.1007/s10107-015-0873-6.

Added PBM-1 method to dev


Handle hyphens internally

With PR #77 a note about dashes in the crate name was added in the docs. The note was of course an essential addition.
I propose going a step further and handling the dashes internally, during the parsing (parse_spec() function).
I believe this addition will save people time trying to debug the reason that the logging does not work as expected.
I myself lost some time on this, even though I had read the docs, and I had read about the need to replace the dashes.
I would also have provided a PR too, but currently I am failing to build the library (see https://github.com/env-logger-rs/env_logger/issues/190#issuecomment-812988592).
Is there a valid reason for not handling the dashes internally?

I don't think so. It should be fine.


is there someone provides a densenet pre-trained model？and how to load it?

@sc1234qwer You may train by yourself:)


Set intersection

Note: Providing complete information in the most concise form is the best way to get help. This issue template serves as the checklist for essential information to most of the technical issues and bug reports. For non-technical issues and feature requests, feel free to present the information in what you believe is the best form.
For Q & A and discussion, please start a discussion thread at https://discuss.mxnet.io
Description
(Brief description of the problem in no more than 2 sentences.)
Environment info (Required)
What to do:
1. Download the diagnosis script from https://raw.githubusercontent.com/apache/incubator-mxnet/master/tools/diagnose.py
2. Run the script using `python diagnose.py` and paste its output here.

Package used (Python/R/Scala/Julia):
(I'm using ...)
For Scala user, please provide:

Java version: (java -version)
Maven version: (mvn -version)
Scala runtime if applicable: (scala -version)

For R user, please provide R sessionInfo():
Build info (Required if built from source)
Compiler (gcc/clang/mingw/visual studio):
MXNet commit hash:
(Paste the output of git rev-parse HEAD here.)
Build config:
(Paste the content of config.mk, or the build command.)
Error Message:
(Paste the complete error message, including stack trace.)
Minimum reproducible example
(If you are using your own code, please provide a short script that reproduces the error. Otherwise, please provide link to the existing example.)
Steps to reproduce
(Paste the commands you ran that produced the error.)

What have you tried to solve it?

@mxnet-label-bot update [bug]

@mxnet-label-bot add [SPARC]

@mxnet-label-bot update [duplicate]

@mxnet-label-bot update [fail]

@mxnet-label-bot add [Bug,  duplicate]

@mxnet-label-bot add [Bug]

@mxnet-label-bot add [bug]

@mxnet-label-bot add [bug]

@mxnet-label-bot remove [bug]

@mxnet-label-bot add [bug]

@mxnet-label-bot update []

@mxnet-label-bot update [bug]

@mxnet-label-bot update [bug]

@mxnet-label-bot remove [bug]

@mxnet-label-bot remove [bug]

@mxnet-label-bot add [bug]

@mxnet-label-bot remove [bug]

@mxnet-label-bot add [good first issue]

@mxnet-label-bot remove [Good First issue]

@mxnet-label-bot remove [Good First issue]

@mxnet-label-bot remove [Good First issue]

@mxnet-label-bot remove [Good First issue]

@mxnet-label-bot remove [Good First issue]

@mxnet-label-bot remove [Good First issue]

@mxnet-label-bot remove [Good First issue]

@mxnet-label-bot remove [Good First issue]

@mxnet-label-bot remove [Good First issue]

@mxnet-label-bot remove [Good First issue]

@mxnet-label-bot remove [Good First issue]


use local gradlew and push to repositories

uses local gradlew
made working example pushing to bintray and deb-s3

LGTM as far as the changes themselves. Before you merge can you just double check the README for this repo? I think the comment about build.sh running in Docker is now incorrect. And would be good to have the travis versions of the files described in the README the way the others are.

Ah good catch for travis files. That was a copy paste error.
Fixed readme and added some more comments.


Keepalive method for LiveTranscriptionClient

Proposed changes
Add a keepalive method to the livetranscriptionclient.
Context
Right now we need to do a SendData call with the keepalive message manually, which while not hard isn't obvious.
Possible Implementation
Add an async Task KeepAlive() to ILiveTranscriptionClient

Yeh we need this, and have been telling clients how to do it with a SendData call!


[txservice] Expose txservice config; parse and apply defaults internally

The Problem

txservice config unexposed, unable to access except by named property in router
parsing code for passing in the chain config for txs is redundant and in many places

The Solution

Expose config for txservice
Parse config internally in txservice
Specify config vars for txservice for all chains by passing in by using "all" or "default" under "chainConfig" in the config.json
Any config vars except for providers may be passed into "all"/"default": and they will be overwritten by config vars belonging to specific chains.
Simplified config passed to children objects in txservice
better naming for txservice config vars (mostly around "gasPrice", etc)

Checklist

[ ] Make sure backwards compat!
[ ] Test manually on test-ui using remote chains.
[ ] Run load tests.
[ ] Update documentation if needed.
[ ] Update CHANGELOG.md.

Unfortunately I don't think the "all" / "default" feature will work as-is. Some other peripherals may throw errors due to that string not being a chain id


CodeMobject to display code with color highlighted and updated Text_mobject

you can use it as follow.
format code from https://codebeautify.org/cpp-formatter-beautifier
with select intent = 2 means indentation_char="  " 2 spaces
save html file from https://tohtml.com/cpp/ select style = 'black'
from manimlib.mobject.code_mobject import *
code = CodeMobject("Helloword.html",
                           coordinates=[-5,3],
                           run_time=3,
                           scale_factor=0.3,
                           line_spacing=0.2,
                           tab_spacing=0.6,
                           font='Monospac821 BT',
                           indentation_char="  ")
        #self.draw_code_all_lines_at_a_time(code)
        code.scale(1)
        self.play(Write(code),run_time=1)

    def draw_code_all_lines_at_a_time(self, code):
        self.play(*[Write(code[i]) for i in range(code.__len__())],run_time=code.run_time)

coordinate point is LEFT+UP corner.
'code' is a 2d array of characters.
for example to access first 5 characters from line 2 use code[2][0:5]
code[2][0:5].set_color(RED)

Output will be looks like

It solves the following problems

display code with color highlighted
manage to print single LaTeX character '{' or '}' because of using Text() instead TextMobject() from https://github.com/3b1b/manim/issues/941#issuecomment-621615699
Solved Text( ) transform animation for " " space character from https://github.com/3b1b/manim/issues/1017

now Text( ) can be used as array for example text = Text("a","b","cd")

i created a character "" underscore and get width of character which is equal to the character space.
after that i just replace " " space characters with a path having width equal to the width of "" underscore and height equals to 0 so it don't have any area to fill so that it appears as a blank space with a path without area and set 'stroke_width': 0 so that outline don't show up

Now it works fine.

text = Text('a', ' ', 'b')
it shows only 'a' to the screen
any one can help ?

text = Text('a', ' ', 'b')
it shows only 'a' to the screen
any one can help ?

Solved !

now everything is working fine.

Only changes I would make is
1.)adding CodeMobject to imports.py
2.) changing some of the variable names to more meaningful things I've noticed you used letters alot which may be confusing to someone who may come about this file in the future
3.)also there seems to be an issue on line 125  i = lines.index("
") where sometimes there is white spaces before  which then results in an error saying that they couldn't find '' index because its looking for an exact match
otherwise it looks good maybe we can try implementing the conversion of the HTML for the user so they don't need to rewrite code and convert it to a readable version for Manim, instead I'm proposing that we allow the user to add any file type to assets/codes and then we convert for them

Only changes I would make is
1.)adding CodeMobject to imports.py
2.) changing some of the variable names to more meaningful things I've noticed you used letters alot which may be confusing to someone who may come about this file in the future
3.)also there seems to be an issue on line 125  i = lines.index("
") where sometimes there is white spaces before
 which then results in an error saying that they couldn't find
's index because its looking for an exact match
otherwise it looks good maybe we can try implementing the conversion of the HTML for the user so they don't need to rewrite code and convert it to a readable version for Manim, instead I'm proposing that we allow the user to add any file type to assets/codes and then we convert for them

updated !

implementing the conversion of the HTML
do you mean user input .cpp file or any other and it automatically converts it to html ?
i don't found any better way to do that, i tried pygments but it have only few coding languages options and sometimes don't highlight correctly.
do you have any other better option?

well i can implement that online highlighter in python then it send request to the server and get highlighted html

Dude awesome work, lets try and get a code converter working to make code_mobject even better!

I will try to achieve this by using markdown to html conversion.

implementing the conversion of the HTML
do you mean user input .cpp file or any other and it automatically converts it to html ?
i don't found any better way to do that, i tried pygments but it have only few coding languages options and sometimes don't highlight correctly.
do you have any other better option?

you might want to checkout http://hilite.me/ it seems they have an api available to use

implementing the conversion of the HTML
do you mean user input .cpp file or any other and it automatically converts it to html ?
i don't found any better way to do that, i tried pygments but it have only few coding languages options and sometimes don't highlight correctly.
do you have any other better option?

you might want to checkout http://hilite.me/ it seems they have an api available to use

thanku
implemented that !

Seems like delete empty path can't solve space problem correctly.
t2c failed to work.
from manimlib.imports import *

class Test(Scene):
    def construct(self):
        t = Text('hello, world!', t2c={'world':BLUE})
        self.add(t)

I think we should count space character, because it's more intuitive.

I find a way now, but how can I show you...

Seems like delete empty path can't solve space problem correctly.
t2c failed to work.
from manimlib.imports import *

class Test(Scene):
    def construct(self):
        t = Text('hello, world!', t2c={'world':BLUE})
        self.add(t)

I think we should count space character, because it's more intuitive.

Solved !
Check updated text_mobject.py
i just add self.text = text.replace(" ", "")

but,  like I said, not counting space character is a not good way for people who want to use t2c and index.
Here I think is a better way.
    def __init__(self, text, **config):
        self.text = text
        self.full2short(config)
        digest_config(self, config)
        self.lsh = self.size if self.lsh == -1 else self.lsh

        file_name = self.text2svg()
        SVGMobject.__init__(self, file_name, **config)

        # deal with space character
        self.apply_space_char()

        if self.t2c:
            self.set_color_by_t2c()
        if self.gradient:
            self.set_color_by_gradient(*self.gradient)
        if self.t2g:
            self.set_color_by_t2g()

        # anti-aliasing
        self.scale(0.1)

    def apply_space_char(self):
        for start, end in self.find_indexes(' '):
            space = Dot(fill_opacity=0, stroke_opacity=0)
            space.next_to(self.submobjects[start])
            self.submobjects.insert(start, space)

TextMobject() is also works like that without counting spaces even without editing svg_mobject.py

wait
space.next_to(self.submobjects[start]) should be space.next_to(self.submobjects[start-1])

But it's not intuitive, you need to calculate by yourself before using index, and we can avoid it simply by adding the above code.

TextMobject() is also works like that without counting spaces even without editing svg_mobject.py

I think this should not be the reason, the goal of making Text, is to replace TextMobject (in some way). There are lots of things of manim that we can improve and let users use them more easy and comfortable.

But it's not intuitive, you need to calculate by yourself before using index, and we can avoid it simply by adding the above code.

TextMobject() is also works like that without counting spaces even without editing svg_mobject.py

I think this should not be the reason, the goal of making Text, is to replace TextMobject (in some way). There are lots of things of manim that we can improve and let users use them more easy and comfortable.

Resolved !

I'm not sure that adding background_rect to CodeMobject is a good choice.
I actually made a Window sometime ago.
But I haven't finished yet and haven't thought it carefully yet...
from manimlib.imports import *

SCRIPT = """
from manimlib.imports import *

class Hello(Scene):
    def construct(self):
        greet = Text('Hello, world!')
        self.play(Write(greet))
"""

class Window(VGroup):
    def __init__(self, height=4, width=6, mobject=None):
        if mobject:
            height = mobject.get_height() + 0.1*2*2 + 0.1*3*2
            width = mobject.get_width() + 0.1*3*2
        rrect = RoundedRectangle(corner_radius=0.1, height=height, width=width,
                                 stroke_width=0,
                                 color='#263238', fill_opacity=1)
        red_button = Dot(radius=0.1, stroke_width=0, color='#ff5f56')
        red_button.shift(LEFT*0.1*3)
        yellow_button = Dot(radius=0.1, stroke_width=0, color='#ffbd2e')
        green_button = Dot(radius=0.1, stroke_width=0, color='#27c93f')
        green_button.shift(RIGHT*0.1*3)
        buttons = VGroup(red_button, yellow_button, green_button)
        buttons.shift(UP*(height/2-0.1*3) + LEFT*(width/2-0.1*6))

        VGroup.__init__(self, rrect, buttons)
        if mobject:
            x = (height - mobject.get_height())/2 - 0.1*3
            self.shift(mobject.get_center())
            self.shift(UP*x)
        self.submobjects.append(mobject)

class Demo(Scene):
    CONFIG = {
        'camera_config': {
            'background_color': WHITE,
        }
    }

    def construct(self):
        code = Text(SCRIPT, font='Microsoft YaHei Mono', size=0.3)
        window = Window(mobject=code)
        self.play(DrawBorderThenFill(window))
        self.wait()

the spaces(' ') in front or back will not be ignored.
For example Text("          a   b               ") will work fine.

I'm not sure that adding background_rect to CodeMobject is a good choice.
I actually made a Window sometime ago.
But I haven't finished yet and haven't thought it carefully yet...
from manimlib.imports import *

SCRIPT = """
from manimlib.imports import *

class Hello(Scene):
    def construct(self):
        greet = Text('Hello, world!')
        self.play(Write(greet))
"""

class Window(VGroup):
    def __init__(self, height=4, width=6, mobject=None):
        if mobject:
            height = mobject.get_height() + 0.1*2*2 + 0.1*3*2
            width = mobject.get_width() + 0.1*3*2
        rrect = RoundedRectangle(corner_radius=0.1, height=height, width=width,
                                 stroke_width=0,
                                 color='#263238', fill_opacity=1)
        red_button = Dot(radius=0.1, stroke_width=0, color='#ff5f56')
        red_button.shift(LEFT*0.1*3)
        yellow_button = Dot(radius=0.1, stroke_width=0, color='#ffbd2e')
        green_button = Dot(radius=0.1, stroke_width=0, color='#27c93f')
        green_button.shift(RIGHT*0.1*3)
        buttons = VGroup(red_button, yellow_button, green_button)
        buttons.shift(UP*(height/2-0.1*3) + LEFT*(width/2-0.1*6))

        VGroup.__init__(self, rrect, buttons)
        if mobject:
            x = (height - mobject.get_height())/2 - 0.1*3
            self.shift(mobject.get_center())
            self.shift(UP*x)
            self.submobjects.append(mobject)

class Demo(Scene):
    CONFIG = {
        'camera_config': {
            'background_color': WHITE,
        }
    }

    def construct(self):
        code = Text(SCRIPT, font='Microsoft YaHei Mono', size=0.3)
        window = Window(mobject=code)
        self.play(DrawBorderThenFill(window))
        self.wait()

implemented that !

You probably misunderstand my comment 😂
Honestly, I have planned to make a subclass of Text called Code,
but clearly you are faster than me 😂,
but it doesn't matter, I am happy to see someone want to improve manim's functionality ❤
And here are some thoughts I was planning to do with Code and I'd like to share with you.

I think Code is a enhanced Text, which can handle syntax highlighting (based on pygment).
Unlike the way of Text dealing with multi-line text (which is one dimension array to index), Code will separate each line (two dimension array e.g. code[row][column])
Add another Mobject called Window, which behaves pretty like SurroundingRectangle, but has those buttons on the top, and I'm also planning two styles of Window (macos-like and windows-like)

btw, the number in the front of each line is a good idea. And reading code-text directly from file is also a good idea too.
Most of them have been implemented by you. But not as same as I would expect.
The main difference is that I thought Window is an independent Mobject which is not related to Code (or your CodeMobject). I think it would be much better if you can delete background and let Window to handle it, because I think it's a more understandable way. (Text should only handle text's things)
You have done an excellent work. And I hope my advice can improve this a little.
If you like, you can change the name CodeMobject into Code.
Note: I'm not a native English speaker, so if you are not sure what I'm saying, please tell me.
Hope to discuss with you : )

also, one PR should only do one thing. So if you doesn't mind, I would make a new PR which solve the text spacing problem.

I'm also not a native English speaker.

also, one PR should only do one thing. So if you doesn't mind, I would make a new PR which solve the text spacing problem.

yes sure.

also, one PR should only do one thing. So if you doesn't mind, I would make a new PR which solve the text spacing problem.

change two files "svg_mobjet.py" and "text_mobject.py"

also, one PR should only do one thing. So if you doesn't mind, I would make a new PR which solve the text spacing problem.

i think its better if a single PR is solving two problems.
as you can see the 2nd one is very small problem.

as you said "delete background"
Code colors are visible only because of background
if we remove background then according to code's style it colors text according to background for example if background is white then it color text with dark colors so text is visible.

i think its better if a single PR is solving two problems.
as you can see the 2nd one is very small problem.
For this particular PR 1st one is depends upon 2nd one.
without correction in Text_mobject.py code_mobject.py won't work correctly.

Yeah, that's true. I understand.

This would take some time. And that's why I want to make another PR to solve the space character problem, which probably could be merged today.

You can create another one if your PR is merged then this PR will automatically updated and don't show up that text_mobject.py or svg_mobject.py changes in files changes.

@NavpreetDevpuri oops, I think you did a wrong thing, you merge my pull request which in the shaders branch but not master. The pull request of master branch is #1030 which is already merged but not 1031 which is waiting for merged.

You can create another one if your PR is merged then this PR will automatically updated and don't show up that text_mobject.py or svg_mobject.py changes in files changes.

See #1035

@eulertour check updates.

Please do not try to build a text layout engine by yourself.
This will cause many potential problems.
The space are decided by text layout engine, which means the space between the letters are not the same every time, especially when the text is mixed with different languages.
You can do this (overwrite) in your own code_mobject.py, but not in text_mobject.py.
Though the text layout engine that Text currently used (cairo) is not very good, it is enough for most cases.
And letting Text receive multiple texts is a good idea, but this change(feature) is already big enough that should be open a single PR specifically focus on this thing. Your PR have 48 commits, honestly I think it's too big to be a single PR.

Also, SingleStringTextMobject is not a good choice.
Adding SingleStringTextMobject would making the code hard to read.
I have a better idea dealing with multiple texts parameters and group them into 2 dimension array.

The space are decided by text layout engine, which means the space between the letters are not the same every time, especially when the text is mixed with different languages.

i just make each line as a separate text  i don't changing or doing anything with 'the space between the letters'
i just put those lines next to each other to make a paragraph, there is nothing wrong with this.

Sorry, I said wrong. I mean the space in the front and back of each line.
You need to add those space because you separate the text by line.
But you don't need to do so.

no problem
i just upgraded Text()

reopened with only 6 commits
https://github.com/3b1b/manim/pull/1036


[Question]: How can I turn off the CDN as the source for the standalone.js file and load it from an npm package instead?

I like this solution (https://github.com/elysiajs/elysia-swagger/pull/95), but I want to load the file from an npm package instead of from a CDN. How can I do that? Is it possible?

Hey 👋
Try to add a route that returns the file from the node_modules, and reference that path to the scalarCDN option ?


Notify on data/object property change

Would it be possible to get notifications when a object or data property is modified? Similar to how it's done right now when a new instance is created. So far I have implemented it as follows for my own personal use.
For object properties I simply added notify(object_property(...)) in the holds tell rule:
holds(S,P,O) +>
  { is_object_property(P), ! },
  % O1 should be the bare IRI atom
  { strip_operator_(O,O1,=), atom(O1) },
  triple(S,P,string(O1)),
  notify(object_property(S, P, O)).

For data properties I did something similar (note the notify(data_property(...)) at the end):
holds(S,P,DataTerm) +>
  { is_data_property(P), ! },
  { strip_operator_(DataTerm,DataTerm1,=) },
  % extract value and unit from given data term
  { data_term_unit_(DataTerm1,DataValue,DataUnit) },
  % infer the base type of this property (e.g. float, string, term, etc.)
  { data_base_type_(P,DataValue,BaseType) },
  %%
  { Term=..[BaseType,DataValue] },
  holds_data(S,P,unit(Term,DataUnit)),
  notify(data_property(S, P, DataTerm)).

From your comment in #289, it seems the notify predicate is gonna be replaced by the new watch module. Maybe we could get this merged in the meantime?
Thanks!

Yes this is possible with watch which is currently limited to watching triples.
You could watch a property, or subject/object. then react on the generated events.
Currently I think deletions are not reported yet by watch.

closing the ticket as the watch interface was merged into master