add debug logs; remove custom handler api

fix #53

remove custom logging handler api
added debug logs

Regarding naming: what about renaming tryOpen+destructor to constructor+destructor or construct+destroy or tryConstruct+destroy?


Adding UID field parsing logic.

According to wikipedia page, the parameter UID is supported from vcard v2.0 - Specifies a value that represents a persistent, globally unique identifier associated with the object.
index.js was rebuilt using coffee v1.9.3

Thanks.
Should I update the version under package.json to make the npm package to update?

Hi @mizrachiran, I just released it.


Add code splitting

Is there a way to implement Code Splitting like in this example?

It's certainly possible to do, but not built in yet. In our experience, most marketing sites tend to have 5-7 page templates, in comparison to a full app that likely has hundreds. It's something that we plan to tackle at some point, but for the time being, it feels like a premature optimization.

I'll look into this over the next few days. This could be very possible to implement :)

Duplicate of #66, which I'm more than happy to discuss, but we're going to close the issue for now and continue the discussion in #66 and on Slack. Thanks.


Predictors with Ollama return input prompt in answer

DSPy versions I checked: 2.4.0 and 2.4.12
Ollama version: 0.1.9
I use model served with ollama (I tried it with both "chat" and "text")
import dspy

model = dspy.OllamaLocal(model='aya', model_type="chat")

When I use it explicitly it just returns the generated text
model("what is two plus two?")
> ['The answer is four.']

But when I try to use Predict it adds the prompt to the answer:
generator = dspy.Predict("question -> answer")
generator(question="What is two plus two?").answer
>'Question: What is two plus two?\nAnswer: Four.'

Is this a bug or is there some kind of option that can be tweaked for this not to happen? I used Ollama models a month ago and it wasn't an issue.

Use dspy.configure(experimental=True) for chat LMs

That didn't help. BTW I tried it with mistral and it's wrong but in a different way
Prediction(
    answer='Answer: Four.'
)

I also tried with both "text" and "chat", the results are the same.
That seems like an error with parsing outputs, which classes handle this?

Probably resolved now if you migrate to 2.5: https://github.com/stanfordnlp/dspy/blob/main/examples/migration.ipynb


[CPP Graph] AMX-BF16 MHA with KV update

Type of Change: Feature
API changed: --memory-f16 and --memory-auto added along with the old --memory-f32 flag
Description
AMX BF16 MHA with customized KV-cache update stage to maintain the customized memory format for best performance of MHA.

The kv-update operation can be optimized if necessary; currently reference implementations are used
S8 MHA are also added for future use, the corresponding update method will be adding in future changes
BF16 MHA with transposed K-tensor add; integration work will be in a future PR
FP16MHA add; integration work will be in a future PR

Expected Behavior & Potential Risk
N/A
How has this PR been tested?
Runing chat_llama & chat_gptj
Model Preparation

python scripts/convert_gptj.py  --outtype f32 --outfile gpt-j-6B.bin gpt-j-6B
./bin/quant_gptj --model_file gpt-j-6B.bin --out_file gptj-q4j-int8-fp32-b128.bin --bits 4 --nthread 20 --alg sym --block_size 128 --scale_dtype fp32 --compute_type int8
Similar commands for llama_7b

Inference result

GPTJ: AMX-BF16 MHA with KV update enabled - (yi) [dingyi@mlp-spr-03 build]$  ninja && numactl -m 1 -C 56-111 bin/chat_gptj -m /home_local/dingyi/data/gptj-pr165-q4j-int8-fp32-b128.bin --memory-auto --seed 1234 -t 56 -b 512 -c 512 -n 256 -p "Once upon a time, there existed a little girl, who liked to have adventures. She wanted to go to places and meet new people, and have fun."

 She wanted to go to places and meet new people, and have fun. Her mom had this really cool job at the local library, so they could afford all of these things for their girl. They also went on lots of trips together: Disneyland, SeaWorld, the Space Center, just about any city around them. The mother loved her work, and the daughter loved going places. It was a magical time in their lives, that made them both happy.
So then mom got promoted to become a librarian in a small town in California. This meant that she had to move from Sacramento to Bakersfield - quite a drive - and they couldn't afford moving trucks, so the mother walked! They were going into this new city, and their daughter was excited - this was going to be fun!
It turned out to be not much fun at all - the girl hated it. She didn't like her school or class mates. She didn't even like her teacher very much. And she missed her mom terribly, who was gone for weeks and weeks at a time, only coming home in between visits. Her parents were stressed about money, too, because their job moved them from Bakersfield to a bigger city, where they had to get jobs so they could afford rent and food and clothing.
Sometimes it seemed like they were just

GPTJ: AMX-BF16 MHA with KV update disabled - (yi) [dingyi@mlp-spr-03 build]$  ninja && numactl -m 1 -C 56-111 bin/chat_gptj -m /home_local/dingyi/data/gptj-pr165-q4j-int8-fp32-b128.bin --seed 1234 -t 56 -b 512 -c 512 -n 256 -p "Once upon a time, there existed a little girl, who liked to have adventures. She wanted to go to places and meet new people, and have fun."

 She wanted to go to places and meet new people, and have fun. Her friends would help her with this because they knew that she was curious about everything.
One day while talking to her mom on the phone, she asked her "Mommy, why do people cry?"  She told her daughter that sometimes people will have tears in their eyes or eyes filled with water because they're happy or sad. But, usually people do not go around crying all day, which is where the girl's question came from.
"Well," she was told on the other end of the phone, "you mustn't cry for too long either. Otherwise you'll get tired." Her mother explained further that sometimes it happens because we're so happy about something that we can't stop laughing or crying and it won't stop for quite a while.
So, her mom told her to ask some questions. She was sure she'd be able to think of a few good ones. "Can you give me an example?" was what she asked at the beginning. But, as soon as she said this, she found herself thinking about a bunch of different scenarios and trying to figure out which one would make sense for the little girl.
Her mom's advice stuck in her mind,

Note: this generation is the same as that on the main branch.

 She wanted to go to places and meet new people, and have fun."

First token
=== GRAPH Profiling ===
perf_total_per_op_us[                     ADD] =   2.682 ms
perf_total_per_op_us[                     MUL] =   0.862 ms
perf_total_per_op_us[                    NORM] =  27.649 ms
perf_total_per_op_us[                 MUL_MAT] =   3.987 ms
perf_total_per_op_us[       MUL_MAT_WITH_BIAS] =   1.856 ms
perf_total_per_op_us[                 RESHAPE] =   0.282 ms
perf_total_per_op_us[                    VIEW] =   0.753 ms
perf_total_per_op_us[                 PERMUTE] =   0.108 ms
perf_total_per_op_us[                GET_ROWS] =   0.146 ms
perf_total_per_op_us[                    ROPE] =   2.686 ms
perf_total_per_op_us[                 MUL_QKV] =  10.057 ms
perf_total_per_op_us[            FFN_ADD_GeLU] =  23.730 ms
perf_total_per_op_us[              FLASH_ATTN] =   1.582 ms
perf_total_per_op_us[    FLASH_ATTN_KV_UPDATE] =  22.085 ms
perf_total_per_op_us[           INNER PRODUCT] =   0.000 ms
========================================

Last token
=== GRAPH Profiling ===
perf_total_per_op_us[                     ADD] =   0.447 ms
perf_total_per_op_us[                     MUL] =   0.170 ms
perf_total_per_op_us[                    NORM] =   1.242 ms
perf_total_per_op_us[       MUL_MAT_WITH_BIAS] =   0.607 ms
perf_total_per_op_us[                 RESHAPE] =   0.271 ms
perf_total_per_op_us[                    VIEW] =   0.743 ms
perf_total_per_op_us[                 PERMUTE] =   0.089 ms
perf_total_per_op_us[                GET_ROWS] =   0.024 ms
perf_total_per_op_us[                    ROPE] =   1.667 ms
perf_total_per_op_us[                 MUL_QKV] =   5.173 ms
perf_total_per_op_us[            FFN_ADD_GeLU] =  12.485 ms
perf_total_per_op_us[              FLASH_ATTN] =   1.914 ms
perf_total_per_op_us[    FLASH_ATTN_KV_UPDATE] =   1.515 ms
perf_total_per_op_us[           INNER PRODUCT] =   2.610 ms
========================================

Prediction latency
========== eval time log of each prediction ==========
prediction   0, time: 101.73ms
prediction   1, time: 31.97ms
prediction   2, time: 30.34ms
prediction   3, time: 30.74ms
prediction   4, time: 30.88ms
prediction   5, time: 31.24ms
prediction   6, time: 31.09ms
prediction   7, time: 30.32ms
prediction   8, time: 30.91ms
prediction   9, time: 30.57ms
...
prediction 250, time: 31.51ms
prediction 251, time: 30.81ms
prediction 252, time: 31.53ms
prediction 253, time: 31.40ms
prediction 254, time: 31.04ms
prediction 255, time: 31.91ms

GPTJ: AMX-BF16 MHA with KV update disabled - (yi) [dingyi@mlp-spr-03 build]$  ninja && ENGINE_PROFILING=1 numactl -m 1 -C 56-111 bin/chat_gptj -m /home_local/dingyi/data/gptj-pr165-q4j-int8-fp32-b128.bin --memory-auto --seed 1234 -t 56 -b 512 -c 512 -n 256 -p "Once upon a time, there existed a little girl, who liked to have adventures. She wanted to go to places and meet new people, and have fun."

First token
=== GRAPH Profiling ===
perf_total_per_op_us[                     ADD] =   3.134 ms
perf_total_per_op_us[                     MUL] =   1.232 ms
perf_total_per_op_us[                    NORM] =  16.665 ms
perf_total_per_op_us[                 MUL_MAT] =  14.362 ms
perf_total_per_op_us[       MUL_MAT_WITH_BIAS] =   2.048 ms
perf_total_per_op_us[                   SCALE] =   0.517 ms
perf_total_per_op_us[                     CPY] =  35.790 ms
perf_total_per_op_us[                 RESHAPE] =   0.300 ms
perf_total_per_op_us[                    VIEW] =   0.834 ms
perf_total_per_op_us[                 PERMUTE] =   0.396 ms
perf_total_per_op_us[                GET_ROWS] =   0.299 ms
perf_total_per_op_us[           DIAG_MASK_INF] =   0.887 ms
perf_total_per_op_us[                SOFT_MAX] =   0.841 ms
perf_total_per_op_us[                    ROPE] =   2.215 ms
perf_total_per_op_us[                 MUL_QKV] =  11.187 ms
perf_total_per_op_us[            FFN_ADD_GeLU] =  29.980 ms
perf_total_per_op_us[           INNER PRODUCT] =   0.000 ms
========================================

Last token
=== GRAPH Profiling ===
perf_total_per_op_us[                     ADD] =   0.435 ms
perf_total_per_op_us[                     MUL] =   0.146 ms
perf_total_per_op_us[                    NORM] =   1.125 ms
perf_total_per_op_us[                 MUL_MAT] =   4.550 ms
perf_total_per_op_us[       MUL_MAT_WITH_BIAS] =   0.576 ms
perf_total_per_op_us[                   SCALE] =   0.125 ms
perf_total_per_op_us[                     CPY] =   2.739 ms
perf_total_per_op_us[                 RESHAPE] =   0.276 ms
perf_total_per_op_us[                    VIEW] =   0.868 ms
perf_total_per_op_us[                 PERMUTE] =   0.367 ms
perf_total_per_op_us[                GET_ROWS] =   0.021 ms
perf_total_per_op_us[           DIAG_MASK_INF] =   0.096 ms
perf_total_per_op_us[                SOFT_MAX] =   0.810 ms
perf_total_per_op_us[                    ROPE] =   1.769 ms
perf_total_per_op_us[                 MUL_QKV] =   5.093 ms
perf_total_per_op_us[            FFN_ADD_GeLU] =  12.175 ms
perf_total_per_op_us[           INNER PRODUCT] =   2.579 ms
========================================

Prediction latency
========== eval time log of each prediction ==========
prediction   0, time: 124.78ms
prediction   1, time: 38.60ms
prediction   2, time: 37.16ms
prediction   3, time: 37.17ms
prediction   4, time: 36.43ms
prediction   5, time: 36.95ms
prediction   6, time: 36.68ms
prediction   7, time: 37.28ms
prediction   8, time: 37.00ms
prediction   9, time: 37.09ms
...
prediction 250, time: 37.76ms
prediction 251, time: 38.04ms
prediction 252, time: 37.00ms
prediction 253, time: 37.37ms
prediction 254, time: 37.10ms
prediction 255, time: 38.72ms

GPTJ: AMX-BF16 MHA with KV update disabled on the main branch - (yi) [dingyi@mlp-spr-03 build]$  ninja && ENGINE_PROFILING=1 numactl -m 1 -C 56-111 bin/chat_gptj -m /home_local/dingyi/data/gptj-pr165-q4j-int8-fp32-b128.bin --seed 1234 -t 56 -b 512 -c 512 -n 256 -p "Once upon a time, there existed a little girl, who liked to have adventures. She wanted to go to places and meet new people, and have fun."

First token
=== GRAPH Profiling ===
perf_total_per_op_us[             ADD] =   4.896 ms
perf_total_per_op_us[             MUL] =   1.325 ms
perf_total_per_op_us[            NORM] =   6.449 ms
perf_total_per_op_us[         MUL_MAT] =  16.289 ms
perf_total_per_op_us[MUL_MAT_WITH_BIAS] =   2.016 ms
perf_total_per_op_us[           SCALE] =   0.550 ms
perf_total_per_op_us[             CPY] =  36.580 ms
perf_total_per_op_us[         RESHAPE] =   0.291 ms
perf_total_per_op_us[            VIEW] =   0.823 ms
perf_total_per_op_us[         PERMUTE] =   0.359 ms
perf_total_per_op_us[        GET_ROWS] =   0.308 ms
perf_total_per_op_us[   DIAG_MASK_INF] =   1.248 ms
perf_total_per_op_us[        SOFT_MAX] =   1.279 ms
perf_total_per_op_us[            ROPE] =   3.728 ms
perf_total_per_op_us[         MUL_QKV] =  10.871 ms
perf_total_per_op_us[    FFN_ADD_GeLU] =  30.970 ms
perf_total_per_op_us[   INNER PRODUCT] =   0.000 ms
========================================

Last token
=== GRAPH Profiling ===
perf_total_per_op_us[             ADD] =   0.402 ms
perf_total_per_op_us[             MUL] =   0.150 ms
perf_total_per_op_us[            NORM] =   1.007 ms
perf_total_per_op_us[         MUL_MAT] =   4.015 ms
perf_total_per_op_us[MUL_MAT_WITH_BIAS] =   0.568 ms
perf_total_per_op_us[           SCALE] =   0.109 ms
perf_total_per_op_us[             CPY] =   2.534 ms
perf_total_per_op_us[         RESHAPE] =   0.264 ms
perf_total_per_op_us[            VIEW] =   0.827 ms
perf_total_per_op_us[         PERMUTE] =   0.357 ms
perf_total_per_op_us[        GET_ROWS] =   0.021 ms
perf_total_per_op_us[   DIAG_MASK_INF] =   0.096 ms
perf_total_per_op_us[        SOFT_MAX] =   0.766 ms
perf_total_per_op_us[            ROPE] =   1.571 ms
perf_total_per_op_us[         MUL_QKV] =   5.118 ms
perf_total_per_op_us[    FFN_ADD_GeLU] =  12.052 ms
perf_total_per_op_us[   INNER PRODUCT] =   2.519 ms
========================================

Prediction latency
========== eval time log of each prediction ==========
prediction   0, time: 122.03ms
prediction   1, time: 38.74ms
prediction   2, time: 36.87ms
prediction   3, time: 37.42ms
prediction   4, time: 36.89ms
prediction   5, time: 37.04ms
prediction   6, time: 37.34ms
prediction   7, time: 36.47ms
prediction   8, time: 37.42ms
prediction   9, time: 36.47ms
...
prediction 250, time: 37.69ms
prediction 251, time: 37.12ms
prediction 252, time: 35.75ms
prediction 253, time: 32.59ms
prediction 254, time: 33.11ms
prediction 255, time: 32.76ms

Dependency Change?
N/A

@zhentaoyu @zhenwei-intel @intellinjun @Zhenzhong1 hi maintainers of each model, please be aware of this new API
cc @a32543254 @kevinintel

Need to validate q4_0 model and run model on clx device

Successfully run with q4_0 and run on icx-1


Apply deployable package on tier 2?

Is the "Run the data upgrade deployable package" section correct? My experience is, that every time I want to apply the data upgrade deployable package to an Standard Acceptance Test environment I have to open a data upgrade request in the LCS.
Shouldn't that be mentioned in this section?

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

ID: babaa821-a53a-020c-4411-d2c39e371d05
Version Independent ID: afb66707-3384-278c-2827-cff7499c56ea
Content: Upgrade from AX 2012 - Data upgrade in sandbox environments - Finance & Operations | Dynamics 365 | #MSDyn365FO
Content Source: articles/dev-itpro/migration-upgrade/upgrade-data-sandbox.md
Service: dynamics-ax-platform
GitHub Login: @tariqbell
Microsoft Alias: tabell

Thanks for posting this.  We'll investigate and look into whether this content needs to be updated.

Ah I see I misread the instructions, we need to apply the deployable package manually for tier 2 environments. There is no need to update the documentation :-)

OK, thanks for letting me know!


Documentation of Events work in interfaces but Structs and Enums are not working

Hi, great work.  We started using solidity-docgen in documenting our code.  The Events are processed nicely in an interface file but for Structs and Enums docgen only generates the code block that shows the Struct or Enum but does not include @notice and @dev tags.  Also, we couldn't access structs and enums separately.  They are all lumped into types.
It would be great to have the following features, if at all possible.

Could you please expose structs, enums and user defined value types separately like it is done for events?  This would allow us to customize the rendered page better with better headers for each.
Could you please include the ability to have @notice and @dev tags for structs, enums and user defined value types?
Could you please add a config parameter to avoid ignoring of private functions or variables?  If it is done this way, would it be possible to create an if statement in a theme template for the visibility of a function or variable?  Again, this would allow us customize the rendered page much better with better section headings.

Many thanks for your consideration.

Hi @ngurmen, thanks for the kind words.
What version of Solidity is the codebase using?

Could you please expose structs, enums and user defined value types separately like it is done for events? This would allow us to customize the rendered page better with better headers for each.

Yes, but in the meantime you can simply filter the types array like this:
{{#each types}}
{{#if (eq nodeType "StructDefinition")}}
{{/if}}
{{#if (eq nodeType "EnumDefinition")}}
{{/if}}
{{/each}}

Could you please expose structs, enums and user defined value types separately like it is done for events? This would allow us to customize the rendered page better with better headers for each.

Yes, but you can also do this with configuration.
If you've configured a templates directory docgen: { templates: 'docs-templates' } you can create a file docs-templates/properties.js with this content:
module.exports.structs = function ({ item }) {
  return item.types.filter(t => t.nodeType === 'StructDefinition');
};

module.exports.enums = function ({ item }) {
  return item.types.filter(t => t.nodeType === 'EnumDefinition');
};

Please try this and let me know if it works.

@frangio hello.  Thanks you for your support.
For @notice and @dev tags of structs and enums, we will need to wait for them to be included by solc, I guess...
As for structs and enums' availability in theme templates, adding those functions to the properties.ts worked beautifully.  Instead of JS version I used the TS one as follows:
export function structs({ item }: DocItemContext): StructDefinition[] | undefined {
  return item.types.filter(t => t.nodeType === "StructDefinition");
}

Lint complains that types is not available on DocItemContext but everything works.
However, to differentiate among different visibilities for variables and functions I used an ugly hack.  I couldn't add a visibility parameter do the variables and functions.  Or, maybe I added on the TS side but did not properly invoke them in the template file.  They kept giving errors with fn...
Second, I tried to filter things by registration of an equality check helper called eq.  But adding to helpers.ts or properties.ts file in my theme directory did not make it available to my templates.
In the end I duplicated variables and functions in properties,ts with different visibility levels calling hem variablesPublic, variablesInternal, etc  It is ugly but it is working.
If you can point me to a more elegant way of doing it I will implement it.
Many thanks.

However, to differentiate among different visibilities for variables and functions I used an ugly hack. I couldn't add a visibility parameter to the variables and functions. Or, maybe I added on the TS side but did not properly invoke them in the template file. They kept giving errors with fn...

Can you share the template or code you're using for this? I'm sure there's a nicer way.

Second, I tried to filter things by registration of an equality check helper called eq. But adding to helpers.ts or properties.ts file in my theme directory did not make it available to my templates.

Hm, that sounds like it should work. If there's a repo you can share I can take a look.

I see what you mean now. In properties.ts you can't add parameters. Perhaps you could improve it by adding a helper in helpers.ts, since those do take parameters.
Odd that you weren't able to get eq working. I would expect that it would work by adding export const eq = (a, b) => a === b in helpers.ts.

@frangio, the way I implemented eliminated the need for eq for now.  When the need arises I will sure to try this again in helpers.ts with parentheses.  thanks.
By the way, not finding a simple doc tags helper plugin for solidity in VS Code.  I coded a very simple, no-frills extension for our internal usage.  If solidity-docgen users may find it useful here it is:
https://github.com/Dexalot/vscode-solidity-comments


aaz for servicebus namespace

Hi @schaudhari6254888, did you create a PR with generated code in azure-cli or azure-cli-extensions?


ImageMedium#derivatives now works with image filters

This is a follow up to #1035, I had to close that PR since I forgot to point it to a feature branch.
Original description:
My original motivation for writing this PR was the problem described in #1016, where using the derivatives method on an image in a Twig template wouldn't work well in combination with the other method of producing responsive images in Grav - appending a pixel density indicator to the image's filename (eg. "@2x").
The underlying problem here also meant that image filters would not work in combination with image derivatives. They would work with image alternatives, which is what was generated from appending "@2x" to the filename of the image, but it wouldn't work with derivatives.
This commit fixes both the first and the second problem by making it so that the ImageMedium#derivatives method doesn't add image variants to a separate array, but rather to the same array as it would have if the filename method was used.
I've made some line comments to highlight a few things in the code as well!

@rhukster the issue you described in https://github.com/getgrav/grav/pull/1035#issuecomment-253931880 seems to have related to 07c9591. I fixed that by always appending an @1x alternative when an image lacks a base medium.

Ok, definitely working better now.  However, I don't agree with one change you have made.
Before when using regular retina images, the default src= tag was set to use the smallest @1x variant.  This serves as only a placeholder for the image, and shows when the browser doesn't support srcset.
In your PR branch, this now uses the largest image, eg @3x in my test case:

All the examples I have ever seen on src/srcset usages shows the src containing the smallest image available.  That was our previous behavior, I think it should be the same going forward.

Oh one other thing I noticed.  Your PR does fix filters in derivatives which is great, but you MUST put the filter after the derivative.  It would be nice if derivatives are always handled first (like automatic @2x/@1x generated images) then removed from the list of actions.  This way you could put filters first if you wished, and it would still work.

One more potnetially useful feature, perhaps you can use the setImagePrettyName() method to append the px size to the image name stored in cache.. currently they are all 2x for example, but it would make it easier to see which image is which (even though the size is after, it's still nice to see some difference in the filename).

The reason that the biggest image is now the base medium (if one wasnt present to begin with) is to cover scenarios where the content provides just an alternative medium (eg an @2x), but the theme still calls the derivatives method. Misunderstanding a bit how the two different responsive image systems work in Grav, I ran into some confusion around this in my own project. But I guess a more logical way might be to maintain the smallest image as a base medium, and then if the theme calls derivatives, we could base the new image alternatives on the biggest existing image alternative. Might be a nice touch to only generate alternative sizes that don't already exist as well. What do you think?
I totally agree that it would be much more intuitive to be able to call derivatives and filters in any order, but that requires a bigger overhaul, where the most efficient solution might be to simply store all the methods called on the ImageMedium until url() is called. I'd be happy to look into that, but maybe it should be a separate PR.
Seems like the setImagePrettyName shouldn't be too big of a deal to implement either, I'll have a look at it.

I feel like derivatives is a much more advanced and less used feature than the simple @2x method.  That is used by 'most' people looking for quick retina support.
So with that said, a change to add filters and other improvements support to the much less used derivatives functionality, should not change how @2x style retina works.  It may not seem like a big change to you, but for older browsers without srcset support, a site could potentially be sending HUGE images to these clients.  Another example is with site testing tools that don't check srcset, now are going to spit out errors about huge, un-optimized images..
I really don't see a benefit for this anyway.  The whole point of the larger image is for retina support.  If you want retina support, then your device is pretty new, and will very likely support srcset.  If you browser supports srcset, then you will get the the appropriate image anyway.  Why put the biggest image in src? makes absolutely no sense to me.

Maybe you misunderstood my previous comment. What I proposed was to revert the behavior to use a scaled down image as the base medium when there's no base medium available on disk.
The reason for the current solution in here was to cover for situations where theme developers call derivatives on images that already have image alternatives. That wouldn't work previously, as the smallest image couldn't be scaled up, but the existing alternatives would still be removed.
So maybe a better solution (like I suggested above) would be to change the logic of the derivatives method, so that if an image already has registered alternatives, we generate new alternatives from the biggest existing one. And maybe, while we're at it, it would be convenient to change the derivatives method to only generate new alternatives that dont already exist, based on the images read from disk.
So basically - always make the smallest image the base medium, ie. the one rendered in src (the way things work currently), but also provide support for situations where image alternatives exist on disk, but derivatives is still called in the Twig template.

Ah ok, i misread (was early!), that sounds like a good solution. :)

Cool :) Will try to churn out those changes as soon as possible

@rhukster I pushed some more changes that should hopefully deal with the things we discussed yesterday.
Something to be aware of is that the ImageMedium#alternatives array now uses image widths for keys, instead of image ratios. I changed this to make it easier to look up existing image alternatives' widths when generating new ones with ImageMedium#derivatives. There aren't any public API's for getting at the image alternatives directly, so I don't think this should break anything for users.
ImageMedium#setImagePrettyName is now also called ImageMedium#derivatives, but in the interest of consistency, I'm basing prettyname on the image ratio rather than width. This makes prettynames a bit funky when the ratio is a floating point number rather than an integer, though. Gregwar/Image removes any dots from the filename before saving it to disk, so<EMAIL_ADDRESS>becomes example15x.jpg. This is maybe not that big of a deal, but to the end user, prettynames like example@1500w (which would result in example1500w) might make more sense.  I think that it might be a good idea to support the<EMAIL_ADDRESS>naming convention the same way that<EMAIL_ADDRESS>is supported currently, so if that's something we're interested in, then maybe the width based prettynames is the best alternative for derivatives

I see what you mean, without the period this makes it very tough to work out. I guess the smallest should be 1x and move on up to the largest size.. Alternatively, just use the 1500w idea (the @ gets removed too).

Good solution! I implemented and pushed it. Anything else we need to address before this is ready to merge?

It's close but it's not quite right...
<img src="/grav-retina/images/6/f/2/5/b/6f25b266e0f68034c15fdb9859c64351ae30481c-yosemite1x.jpeg" srcset="
/grav-retina/images/f/d/2/6/1/fd261094f0bd2ef4fb87e56f3503ceacd4b00d10-yosemite2x.jpeg 2500w,
/grav-retina/images/1/d/b/a/6/1dba6751d69378e1c0120c83531ea17b0aa5ec64-yosemite2x.jpeg 500w,
/grav-retina/images/5/0/2/d/8/502d80ae9ce4f3c3d73250c1deb16eb2eb2aadcf-yosemite3x.jpeg 1000w,
/grav-retina/images/c/b/c/9/d/cbc9dd0f6c991cf95433d62be15fbcf4bd7177ed-yosemite4x.jpeg 1500w,
/grav-retina/images/b/b/0/a/3/bb0a346014d0b1c1f0ae1d299450518cdbeb8564-yosemite6x.jpeg 2000w,
/grav-retina/images/6/f/2/5/b/6f25b266e0f68034c15fdb9859c64351ae30481c-yosemite1x.jpeg 1250w" sizes="100vw">

The x values don't quite line up with the widths? Does it work for you?

@rhukster were all of those alternatives generated using derivatives, or did some of them exist on disk? I ran into an issue with name collisions if I used both methods, but we might have to live with that, as we don't want to force images to be processed by Gregwar/Image just to be able to set a prettyname. What do you think?

@rhukster I tested again, and I think it actually does work as expected for me. I'm using this Twig markup
{{ page.media['world.jpg'].derivatives(500, 3500, 500).html() }}

Together with a 2500px wide picture called world.jpg (passing 3500 to derivatives to test that the max width caps properly). This is the resulting HTML for me (line breaks added for clarity):

It's strange that the primary source in your example directs to a cached image and contains 1x in the filename. Are we looking at a potential bug there, or is it possible you were looking at a cached page maybe?

Actually I did have it as<EMAIL_ADDRESS>I changed to yosmite.jpg which is 2500px wide
![](yosemite.jpg?derivatives=500,2500,500&grayscale)

and get:
<img src="/grav-retina/images/7/6/6/6/e/7666e0abc53f5e8d95be9607246e1fcd63f473e8-yosemite.jpeg" srcset="
/grav-retina/images/2/f/f/2/d/2ff2d1f503b207eea8d967cf321cf22c7420fddb-yosemite2x.jpeg 500w,
/grav-retina/images/e/5/6/f/e/e56fe33d6fd964aba5a272d37ea42b316eefc747-yosemite3x.jpeg 1000w,
/grav-retina/images/b/8/6/d/a/b86dae05240eb0f9eacfb110866bfe7c26fbea28-yosemite4x.jpeg 1500w,
/grav-retina/images/c/0/3/0/e/c030eea0a8d7b2a3996c7c66f851fc6ba241abaa-yosemite6x.jpeg 2000w,
/grav-retina/images/7/6/6/6/e/7666e0abc53f5e8d95be9607246e1fcd63f473e8-yosemite.jpeg 2500w" sizes="100vw">

it's still not right though, first it probably makes more sense to just use the width in the derivatives rather than the x values, or even just a numeric value (1,2,3,4 etc) because the (1x, 2x, 3x, etc) are not correct.  2x is double, 3x is triple, and 4x is quadrupled.. however, derivatives are not doubled each time, they are just X pixels larger each time.

the src attribute is using the 2500px wide -yosemite.jpeg file.
the 500px wide image is labeled -yosemite2x.jpeg and it should be 1x or 1 or 500w, but not 2x.
the 2000px wide image is labeled -yosemite6x.jpg, but really should be the 5th one, so 5or2000w`
last one that is 2500px is the original so that's fine having nothing appended.

If we're skipping the 2x syntax altogether (and I agree that it's a pretty logical choice), then we might as well go with the widths to at least get some meaning out of the numbers. I'll go ahead and make that change!
I realize that I probably was a bit unclear in my previous comment, but I didn't intend for the smallest alternative to be returned ImageMedium#url when using just the derivatives method of generating image alternatives. It makes for consistent behavior in one way, but the $reset argument to ImageMedium#url and ImageMedium#srcset makes things a bit trickier.
If we reset each alternative when calling ImageMedium#srcset, we lose the smallest alternative that we want to be able to use later. And if we counter the reset parameter by maintaining the smallest variant, we need to track a state where we've called derivatives first, then srcset, now waiting to call url with a faux base image, which we'll probably remove when ImageMedium#url is called, which in turn would make the original image on disk the base medium again, I suppose. Kinda confusing.
Maybe I'm missing a much simpler alternative solution to this, but I'm not sure it'll be intuitive or elegant to write special logic that returns the smallest derivative when calling ImageMedium#url.
Btw, what's the purpose of resetting the image and its alternatives when calling ImageMedium#url and ImageMedium#srcset?

It's been a long road but I think we have reached a good end result!  Thanks for your hard work.

Cool, thanks! :) Still a bit interested in the $reset argument, though - what's the reasoning behind having that there?


nvm use down not work while user home directory have space

My Environment

[ ] Windows 7 or below (not truly supported due to EOL)
[ ] Windows 8
[ ] Windows 8.1
[x] Windows 10
[ ] Windows 10 IoT Core
[ ] Windows Server 2012
[ ] Windows Server 2012 R2
[ ] Windows Server 2016
[ ] My Windows installation is non-English.

I have already...

[x] read the README to be aware of npm gotchas & antivirus issues.
[x] reviewed the wiki to make sure my issue hasn't already been resolved.
[x] verified I'm using an account with administrative privileges.
[x] searched the issues (open and closed) to make sure this isn't a duplicate.
[x] made sure this isn't a question about how to use NVM for Windows, since gitter is used for questions and comments.

My issue is related to (check only those which apply):

[ ] settings.txt
[ ] proxy support
[ ] 32 or 64 bit support

None of above
Expected Behavior
My home directory is something like C:\Users\xxx yyy\ which have a space between xxx and yyy
Step 1. Installing via installer.
Step 2. nvm install 4.4.2
Step 3. nvm use 4.4.2
Actual Behavior
in Step 3, I got error message like
exit status 1: 'C:\Users\xxx' is not recognized as an internal or external command, operable program or batch file.
Steps to reproduce the problem:
install and use nvm by a user which home directory have a space.

I watched the disk usage during an nvm install process. It seems the node executable is downloaded directly to the version folder under AppDate\Roaming\nvm, but the npm insallation downloads to AppData\Roaming\nvm\temp\npm which should then be moved to the version folder.
So I tried  nvm install 4.4.2 and watched it, and saw the move process write the npm folder to v4.4.2\node_modules - success!
I then tried uninstalling v4.3.0 and manually removed the version folder as instructed. Then proceeded to reinstall the version with nvm install 4.3.0 and this time the npm folder was moved successfully! Since then, each other version installation has worked properly. Perhaps it is just the very first version install that is failing?

I have the same problem :cry:

Here's the solution:

Uninstall nvm via the Control Panel
Install nvm via nvm-setup.exe
When prompted, change the install path from C:\Users<Username with space>\AppData\Roaming\nvm install to C:\Users\Public\nvm.

Running nvm root should now show C:\Users\Public\nvm and things should just work.

Hi there !
Same issue here but I could not fix it. I'm using the casual prompt, and installed cygwin mod.

I uninstalled nvm and node.
Install node (in 64bits with the .msi).
Install nvm for windows replacing my spaced name with Public in the install path.
After my test here what it prompt :

the same problem as Ugarz
and when i uninstall all the node before i install the nvm-windows .after that open cmd.ext . it tell me that "erroe open setting.txt :  the system canot find the file specified “

Duplicate of #41.

In cmd, go to your home directory and type dir/x to see the shortened name for this folder
Then replace your user name with this shortened name in the setting.txt
It works

This Works..Thanks

It works for me..! Thanks

In cmd, go to your home directory and type dir/x to see the shortened name for this folder
Then replace your user name with this shortened name in the setting.txt
It works

Work for me too, Thanks


Review the public website

I feel like a need to do a full review of the website about placement of things, text, and images use.

Not own by devrel anymore


Link to mnist in Lab PerceptronMultiClass.ipynb

Not sure if I'm missing something but it appears that the link to download the mnist data set isn't working and I also can't find the mentioned /data directory.
Here the relevant part of ai-for-beginners/lessons/3-NeuralNetworks/03-Perceptron/lab/PerceptronMultiClass.ipynb. I also tried to download it from elsewhere on the Internet but the next code block fails.
Reading the Dataset
This code download the dataset from the repository on the internet. You can also manually copy the dataset from /data directory of AI Curriculum repo.
!rm *.pkl
!wget https://raw.githubusercontent.com/microsoft/AI-For-Beginners/main/data/mnist.pkl.gz
!gzip -d mnist.pkl.gz

Link updated


paper_input_test fails 'a11y has aria-describedby for character counter'

expect(input.attributes.containsKey('aria-describedby'), isTrue);

Expected: true
    Actual: <false>

fixed by https://github.com/dart-lang/polymer_elements/commit/784974541911a465e81e28f1b2d5926e63e0a041


Step2 - run correctly  without activity extending from LifecycleActivity

Step 2 could be simplify as for proper implementation only ViewModel notion is required without LifecycleActivity.

To be clear: ChronoActivity2 can be an Activity instead of a LifecycleActivity.

No, it can't, in ChronoActivity2, a LifecycleOwner is required:
        ChronometerViewModel chronometerViewModel
                = ViewModelProviders.of(this).get(ChronometerViewModel.class);


Render method call twice

That may be linked to https://github.com/rackt/redux-simple-router/issues/193.
I have noticed, when migrating from redux-router to this repository (v2.0.2), that the render method is called twice.
This happens when I'm calling routeActions.push().

The first render is triggered on the component I'm transitioning from.
I think that it should be the component I'm transitioning to.
The second render is triggering on the component I'm transitioning to.
The trigger of this method seems asynchronous (out of the middleware chain). I think that it shouldn't be here.

Route rendering is always an asynchronous process because router has a lot of async handling baked in (route components can be retrieved asynchronously). So the second render you're seeing is expected.
The first, however, is not. Are you connecting your component to some part of state that's updated by the route actions?

Route rendering is always an asynchronous

Alright, so I will try to understand why this first render occurres. That could be an issue on my side.

I think this is an unavoidable consequence of how we integrate React Router into Redux.
It might be possible to do something very clever with unstable_batchedUpdates, but I'm not entirely sure here.

@taion I'm not so sure. Most people complain about router not re-rendering components when transitioning within the same branch of their route tree.
In any case, this sounds like something not related to redux-simple-router. If something does present itself as specifically our fault, I can reopen this.

@oliviertassinari Are you by any chance using hashHistory instead of browserHistory? I noticed this problem went away after changing to browserHistory.

@Elijen I was using it. I have upgraded to the latest release. The issue is gone on my side.

render function in Component was run twice. Let know me why? Help me? Please!

Any news on this ?

<Router history={history} key={Math.random()}>
        <Route path='/' component={AppContainer}>
            <Route path={routesList.login} getComponent={function (path, cb) {
                require.ensure([], (require) => {
                    cb(null, require('./login/Login').default);
                });
            }}/>
            <Route path={routesList.logout} getComponent={function (path, cb) {
                require.ensure([], (require) => {
                    cb(null, require('./login/Login').default);
                });
            }}/>
            <Route onEnter={requireAuth} getComponent={
                function (path, cb) {
                require.ensure([], (require) => {
                    cb(null, require('./dashboard/Dashboard').default);
                });
            }}>
                <Route path={routesList.dashboard} getComponent={function (path, cb) {
                    require.ensure([], (require) => {
                        cb(null, require('./dashboard/pages/Home').default);
                    });
                }}/>
                <Route path={routesList.materialComponent} component={Material}/>
            </Route>
        </Route>
        <Route path='/test' component={Test}>
        </Route>
    </Router>

Supposed I have a router like this. When I go to dashboard, it seems my API called twice. So the dashboard component render twice. I checked with two life cycle below
componentDidMount() {
        console.log('did mount');
    }

    componentDidUpdate() {

        console.log('updated');
    }

My Dashboard component output ('updated');. Hm, so maybe some thing change in next props, next states in life cycle. So I addded two console ouput in shouldComponentUpdate
 shouldComponentUpdate(nextProp, nextState) {
       // Use lodash is Equal
        console.log(_.isEqual(nextProp, this.props));
        console.log(_.isEqual(nextState, this.state));

        return true;

    }

Both state and props is equal to each next state and next props :(. So I change my lifecycle to

shouldComponentUpdate(nextProp, nextState) {
        return !(_.isEqual(nextProp, this.props) && _.isEqual(nextState, this.state));
    }

With this way, my dashboad component won't update if props and states don't change. So my dashboard won't render twice.
In my case it's the solution for me @GuillaumeMunsch

@Elijenv Thanks to your comment I fixed my bug. hashHistory was causing my render() method to render twice and it was returning a wrong this.props.params object with undefined values from a Route.
Do you know why is this by any chance?

Try to downgrade to<EMAIL_ADDRESS>

@Elijen  Thank you! It solved my problem as well. In my case the render() method rendered 2 extra times. It seems to be a weird bug with hash history.

Downgrade to<EMAIL_ADDRESS>it doesn't work。

Downgrade  to<EMAIL_ADDRESS>also doesn't work.
Config like this:
"react-redux": "^5.0.2",
 "react-router": "^3.0.0",
"react-router-redux": "^4.0.7",

Upgraded to the newest react router and react-router-redux, and still getting this problem of it re-rendering the previous state and then rendering the next state.

Hello,
I had the same issue with multiple route renders. This lead to potential errors with authentication redirections and analytics.
Latest release react-router-redux solved the issue:
"react-redux": "5.0.2",
"react-router": "3.0.2",
"react-router-redux": "4.0.7" ---> "4.0.8",

Thank you,

This doesn't work for us:
"react-redux": "5.0.2",
"react-router": "3.0.2",
"react-router-redux": "4.0.7" ---> "4.0.8",

We installed the same version and still get the render twice error

I had the same issue and fix it by upgrading react-router-redux to 4.0.8.
JSON looks like:
"react-redux": "5.0.2",
"react-router: "3.0.5",
"react-router-redux": "4.0.8"


Remove dead code

This change is

Coverage increased (+0.09%) to 46.585% when pulling 45c77a951dc18ee8ce98a70826c5d7e2442728d4 on aledbf:remove-named into 245e6b0b0e55f90729d1f4629584b8e1c15bddc4 on kubernetes:master.

Coverage increased (+0.04%) to 46.53% when pulling 45c77a951dc18ee8ce98a70826c5d7e2442728d4 on aledbf:remove-named into 245e6b0b0e55f90729d1f4629584b8e1c15bddc4 on kubernetes:master.


ERROR: Service 'cvat_ui' failed to build: The command '/bin/sh -c npm ci' returned a non-zero code: 1

My actions before raising this issue

[x] Read/searched the docs
[x] Searched past issues

Expected Behaviour

Current Behaviour

Step 20/34 : RUN npm ci
---> Running in e21f924842cd
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm WARN deprecated<EMAIL_ADDRESS>Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated<EMAIL_ADDRESS>this library is no longer supported
npm WARN deprecated<EMAIL_ADDRESS>Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated<EMAIL_ADDRESS>Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated<EMAIL_ADDRESS>Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated<EMAIL_ADDRESS>https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated<EMAIL_ADDRESS>Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated<EMAIL_ADDRESS>Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated<EMAIL_ADDRESS>Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated<EMAIL_ADDRESS>Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated<EMAIL_ADDRESS>Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated<EMAIL_ADDRESS>Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated<EMAIL_ADDRESS>Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated<EMAIL_ADDRESS>The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated<EMAIL_ADDRESS>Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated<EMAIL_ADDRESS>request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated<EMAIL_ADDRESS>Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated<EMAIL_ADDRESS>flatten is deprecated in favor of utility frameworks such as lodash.
npm WARN deprecated<EMAIL_ADDRESS>Use eslint-plugin-typescript version >= 1.0.0
npm WARN deprecated<EMAIL_ADDRESS>This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm ERR! code 1
npm ERR! path /tmp/cvat-canvas/node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c node scripts/build.js
npm ERR! Building: /usr/local/bin/node /tmp/cvat-canvas/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli   '/usr/local/bin/node',
npm ERR! gyp verb cli   '/tmp/cvat-canvas/node_modules/node-gyp/bin/node-gyp.js',
npm ERR! gyp verb cli   'rebuild',
npm ERR! gyp verb cli   '--verbose',
npm ERR! gyp verb cli   '--libsass_ext=',
npm ERR! gyp verb cli   '--libsass_cflags=',
npm ERR! gyp verb cli   '--libsass_ldflags=',
npm ERR! gyp verb cli   '--libsass_library='
npm ERR! gyp verb cli ]
npm ERR! gyp info using<EMAIL_ADDRESS>npm ERR! gyp info using<EMAIL_ADDRESS>| linux | x64
npm ERR! gyp verb command rebuild []
npm ERR! gyp verb command clean []
npm ERR! gyp verb clean removing "build" directory
npm ERR! gyp verb command configure []
npm ERR! gyp verb check python checking for Python executable "python2" in the PATH
npm ERR! gyp verb which failed Error: not found: python2
npm ERR! gyp verb which failed     at getNotFoundError (/tmp/cvat-canvas/node_modules/which/which.js:13:12)
npm ERR! gyp verb which failed     at F (/tmp/cvat-canvas/node_modules/which/which.js:68:19)
npm ERR! gyp verb which failed     at E (/tmp/cvat-canvas/node_modules/which/which.js:80:29)
npm ERR! gyp verb which failed     at /tmp/cvat-canvas/node_modules/which/which.js:89:16
npm ERR! gyp verb which failed     at /tmp/cvat-canvas/node_modules/isexe/index.js:42:5
npm ERR! gyp verb which failed     at /tmp/cvat-canvas/node_modules/isexe/mode.js:8:5
npm ERR! gyp verb which failed     at FSReqCallback.oncomplete (node:fs:198:21)
npm ERR! gyp verb which failed  python2 Error: not found: python2
npm ERR! gyp verb which failed     at getNotFoundError (/tmp/cvat-canvas/node_modules/which/which.js:13:12)
npm ERR! gyp verb which failed     at F (/tmp/cvat-canvas/node_modules/which/which.js:68:19)
npm ERR! gyp verb which failed     at E (/tmp/cvat-canvas/node_modules/which/which.js:80:29)
npm ERR! gyp verb which failed     at /tmp/cvat-canvas/node_modules/which/which.js:89:16
npm ERR! gyp verb which failed     at /tmp/cvat-canvas/node_modules/isexe/index.js:42:5
npm ERR! gyp verb which failed     at /tmp/cvat-canvas/node_modules/isexe/mode.js:8:5
npm ERR! gyp verb which failed     at FSReqCallback.oncomplete (node:fs:198:21) {
npm ERR! gyp verb which failed   code: 'ENOENT'
npm ERR! gyp verb which failed }
npm ERR! gyp verb check python checking for Python executable "python" in the PATH
npm ERR! gyp verb which failed Error: not found: python
npm ERR! gyp verb which failed     at getNotFoundError (/tmp/cvat-canvas/node_modules/which/which.js:13:12)
npm ERR! gyp verb which failed     at F (/tmp/cvat-canvas/node_modules/which/which.js:68:19)
npm ERR! gyp verb which failed     at E (/tmp/cvat-canvas/node_modules/which/which.js:80:29)
npm ERR! gyp verb which failed     at /tmp/cvat-canvas/node_modules/which/which.js:89:16
npm ERR! gyp verb which failed     at /tmp/cvat-canvas/node_modules/isexe/index.js:42:5
npm ERR! gyp verb which failed     at /tmp/cvat-canvas/node_modules/isexe/mode.js:8:5
npm ERR! gyp verb which failed     at FSReqCallback.oncomplete (node:fs:198:21)
npm ERR! gyp verb which failed  python Error: not found: python
npm ERR! gyp verb which failed     at getNotFoundError (/tmp/cvat-canvas/node_modules/which/which.js:13:12)
npm ERR! gyp verb which failed     at F (/tmp/cvat-canvas/node_modules/which/which.js:68:19)
npm ERR! gyp verb which failed     at E (/tmp/cvat-canvas/node_modules/which/which.js:80:29)
npm ERR! gyp verb which failed     at /tmp/cvat-canvas/node_modules/which/which.js:89:16
npm ERR! gyp verb which failed     at /tmp/cvat-canvas/node_modules/isexe/index.js:42:5
npm ERR! gyp verb which failed     at /tmp/cvat-canvas/node_modules/isexe/mode.js:8:5
npm ERR! gyp verb which failed     at FSReqCallback.oncomplete (node:fs:198:21) {
npm ERR! gyp verb which failed   code: 'ENOENT'
npm ERR! gyp verb which failed }
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
npm ERR! gyp ERR! stack     at PythonFinder.failNoPython (/tmp/cvat-canvas/node_modules/node-gyp/lib/configure.js:484:19)
npm ERR! gyp ERR! stack     at PythonFinder. (/tmp/cvat-canvas/node_modules/node-gyp/lib/configure.js:406:16)
npm ERR! gyp ERR! stack     at F (/tmp/cvat-canvas/node_modules/which/which.js:68:16)
npm ERR! gyp ERR! stack     at E (/tmp/cvat-canvas/node_modules/which/which.js:80:29)
npm ERR! gyp ERR! stack     at /tmp/cvat-canvas/node_modules/which/which.js:89:16
npm ERR! gyp ERR! stack     at /tmp/cvat-canvas/node_modules/isexe/index.js:42:5
npm ERR! gyp ERR! stack     at /tmp/cvat-canvas/node_modules/isexe/mode.js:8:5
npm ERR! gyp ERR! stack     at FSReqCallback.oncomplete (node:fs:198:21)
npm ERR! gyp ERR! System Linux 3.10.0-957.el7.x86_64
npm ERR! gyp ERR! command "/usr/local/bin/node" "/tmp/cvat-canvas/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd /tmp/cvat-canvas/node_modules/node-sass
npm ERR! gyp ERR! node -v v16.13.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1
npm ERR!
Operating System and version (e.g. Linux, Windows, MacOS):
Code example or link to GitHub repo or gist to reproduce problem:
Other diagnostic information / logs:
Logs from `cvat` container

Next steps
You may join our Gitter channel for community support.

Which CVAT release do you use? Please try the latest develop. It should be fixed.

v1.6.0

@azhavoro , @ActiveChooN ,
Could you please comment?

Duplicate of https://github.com/openvinotoolkit/cvat/issues/3853, @vikram1995 Please try to use develop branch


[vimeo] Player (embed): "Unable to extract info section"

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

[X] I understand that I will be blocked if I remove or skip any mandatory* field

Checklist

[X] I'm reporting a broken site
[X] I've verified that I'm running yt-dlp version 2022.10.04 (update instructions) or later (specify commit)
[X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
[X] I've checked that all URLs and arguments with special characters are properly quoted or escaped
[X] I've searched the bugtracker for similar issues including closed ones. DO NOT post duplicates
[X] I've read the guidelines for opening an issue
[X] I've read about sharing account credentials and I'm willing to share it if required

Region
Global
Provide a description that is worded well enough to be understood
The Vimeo "player" URL (the one using http://player.vimeo.com/video/) seems broken, at least for the few URLs I have tried. (I have a fix for the given exception, but don't know if it will always work.)
Provide verbose output that clearly demonstrates the problem

[X] Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
[X] Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output
[debug] Command-line config: ['-vU', 'http://player.vimeo.com/video/54469442']
[debug] User config "/home/barsnick/.config/yt-dlp/config": ['-o', '%(title)s [%(extractor)s %(id)s].%(ext)s']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2022.10.04 [4e0511f27] (source)
[debug] Lazy loading extractors is disabled
[debug] Plugins: ['SamplePluginIE', 'SamplePluginPP']
[debug] Git HEAD: e63faa101
[debug] Python 3.10.7 (CPython 64bit) - Linux-5.19.16-200.fc36.x86_64-x86_64-with-glibc2.35 (glibc 2.35)
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg 5.0.1 (setts), ffprobe 5.0.1
[debug] Optional libraries: Cryptodome-3.15.0, brotli-1.0.9, certifi-2021.10.08, mutagen-1.45.1, sqlite3-2.6.0, websockets-10.1
[debug] Proxy map: {}
[debug] Loaded 1702 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2022.10.04, Current version: 2022.10.04
yt-dlp is up to date (2022.10.04)
[debug] [vimeo] Extracting URL: http://player.vimeo.com/video/54469442
[vimeo] 54469442: Downloading webpage
ERROR: [vimeo] 54469442: Unable to extract info section; please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
  File "/home/barsnick/Development/yt-dlp/yt_dlp/extractor/common.py", line 674, in extract
    ie_result = self._real_extract(url)
  File "/home/barsnick/Development/yt-dlp/yt_dlp/extractor/vimeo.py", line 872, in _real_extract
    config = self._parse_json(self._search_regex(
  File "/home/barsnick/Development/yt-dlp/yt_dlp/extractor/common.py", line 1228, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)

This simple change fixes the given URLs for me:
diff --git a/yt_dlp/extractor/vimeo.py b/yt_dlp/extractor/vimeo.py
index 25d2f200f..1c4bb638e 100644
--- a/yt_dlp/extractor/vimeo.py
+++ b/yt_dlp/extractor/vimeo.py
@@ -870,7 +870,7 @@ def _real_extract(self, url):

         if '://player.vimeo.com/video/' in url:
             config = self._parse_json(self._search_regex(
-                r'\bconfig\s*=\s*({.+?})\s*;', webpage, 'info section'), video_id)
+                r'\bwindow\.playerConfig\s*=\s*({.+?})\s*;', webpage, 'info section'), video_id)
             if config.get('view') == 4:
                 config = self._verify_player_video_password(
                     redirect_url, video_id, headers)

duplicate of #5361

@barsnick  the sane issue on Win version:
.\yt-dlp.exe -vU https://player.vimeo.com/video/760628864
[debug] Command-line config: ['-vU', 'https://player.vimeo.com/video/760628864']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2022.10.04 [4e0511f] (win32_exe)
[debug] Python 3.7.9 (CPython 32bit) - Windows-10-10.0.19041-SP0
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg 2022-10-24-git-d79c240196-full_build-www.gyan.dev (setts), ffprobe 2022-10-24-git-d79c240196-full_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.15.0, brotli-1.0.9, certifi-2022.09.24, mutagen-1.45.1, sqlite3-2.6.0, websockets-10.3
[debug] Proxy map: {}
[debug] Loaded 1690 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2022.10.04, Current version: 2022.10.04
yt-dlp is up to date (2022.10.04)
[debug] [vimeo] Extracting URL: https://player.vimeo.com/video/760628864
[vimeo] 760628864: Downloading webpage
ERROR: [vimeo] 760628864: Unable to extract info section; please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
  File "yt_dlp\extractor\common.py", line 672, in extract
  File "yt_dlp\extractor\vimeo.py", line 873, in _real_extract
  File "yt_dlp\extractor\common.py", line 1224, in _search_regex

I hope in the next build it will be fixed...


Android Things Support

Hello,
Do you have any plan to write short tutorial to use Estimote Beacons with Android Things, is it officially tested ?
Thanks.

Hey @compyy !
This is a really interesting case! We didn't do any tests (nor tutorials) for this platform yet, but we silently keep an eye on it's evolution :) Because it's not related to our current SDK, I would recommend you to describe your desired use case at our forums.
Cheers!

We are working on a project where RPI3 is configured as Gateway, it detects beacon in range and uploads the status on the internet, we are using it with Rasbian plus node library, but if we can replace it with Android things on RPI3, then we get official sdk support from estimote.

I did the first test with Android things, and its working, so far no issue noticed, just performs as normal Android, you just need to add few permissions in advance in manifest, and reboot the RPI3 after installing apk (strange way to fix the permission) but it works :)

Hey @compyy !
Great to hear that :) I was playing with Android Things in my free time, and I came to the same conclusion. Good luck with your development and let me know about any problems you encounter :)

@compyy Hi! Can you tell me what permissions you add to the manifest? I'm currently getting a

E/EstimoteSDK: LollipopBluetoothAdapter$1.onScanFailed:244 Unable to start BLE scanning. Error code: 4

Hey @CrossPT!
I stumbled across this problem not so long time ago. Here is a solution:
BLE on Android Things is disabled by default. You need to either use bluetoothAdapter.enable() in your code first, or enable it just as a typical user on Android phone would do ( via clicking the Bluetooth button on a screen). If you are using display in your project, then you can use DefaultPermissionsChecker from our SDK to display a popup to enable bluetooth and click enable then. Without the display, you need to enable it manually using ADB shell. Try this:
am start -a android.bluetooth.adapter.action.REQUEST_ENABLE

Let me know if it works :)

Hi @pawelDylag! Long time no see :)
I don't have a display attached to it, since I don't need to show a UI. I turn the bluetooth on via bluetoothAdapter.enable(), checking if blueooth is enabled via a handler, then creating the beaconManager, but it keeps giving error code 4.
Logcat below:

D/BluetoothAdapter: enable(): BT already enabled!
I/EstimoteSDK: BeaconService.onCreate:79 Creating beacon service for android version 26
D/MainActivity: Sucessfully connected to EST Beacon Service...
D/MainActivity: Starting ranging...
I/vndksupport: sphal namespace is not configured for this process. Loading /vendor/lib/hw/gralloc.gbm.so from the current namespace instead.
V/EstimoteSDK: BeaconService.startRanging:172 Start iBeacon ranging:
V/StudioProfiler: StudioProfilers agent attached.
V/StudioProfiler: Acquiring Application for Events
V/StudioProfiler: Transformed class: java/net/URL
W/pt.streamline.rpi_batatas: Current dex file has more than one class in it. Calling RetransformClasses on this class might fail if no transformations are applied to it!
W/zygote: Verification of void java.net.URL.checkSpecifyHandler(java.lang.SecurityManager) took 198.865ms
V/StudioProfiler: Memory control stream started.
D/BluetoothAdapter: isLeEnabled(): ON
E/EstimoteSDK: LollipopBluetoothAdapter$1.onScanFailed:244 Unable to start BLE scanning. Error code: 4

Ok, I know what might be wrong. Our SDK uses some fancy settings using BluetoothLeScanner, and some of them are not supported on some hardwares. Although we prepared support for Android phones, we did not do proper tests for Android Things stuff. We will check that, but it's not on our priority list right now :)
You can try using Monitoring, or setting foreground scan period to 0 - this might help, but I'm not sure.


Feature Request/Idea - Cert-Manager saves TLS Secret to Azure KeyVault

As an Azure Kubernetes User i store my Kubernetes Secrets in Azure KeyVault and use the CSI Provider to Sync my Secretes into K8s. Cert-manager is saving my Secret (TLS, CA Cert) in an unsecure way as Base64 encoded Secret in K8s.
Cert-Manager is already able to connect to Azure for the DNS Challenge. During the Challenge, Cert-Manager can connect with a manage identity or Service Principal to a Azure KeyVault to save the Secret. With the Secret CSI Provider for Azure KeyVault, Cert-manger and the Ingress API Object can sync and read the secret.
Currently I'm stuck, by saving my TLS secrets as K8s Secret.
Best regards,
Mario
/kind feature

@Krebsmar Did you find any way to do this?

I would be interested on this feature as well.

/reopen

/reopen

one month later and it's closed again :(
no one interested in this?

I am still interested on this feature. Would be awesome, as we would be able to re-use the certificates on other Azure Services, which load certificates from key vault, not only within a Kubernetes Cluster.

See https://kubernetes.slack.com/archives/C4NV3DWUC/p1725634819535039

/reopen

See https://github.com/rdvansloten/cert-manager-key-vault-sync by @rdvansloten

See https://github.com/rdvansloten/cert-manager-key-vault-sync by @rdvansloten

Hey @wallrj, thanks for the mention! This indeed covers the use case. I am currently fixing the logic for duplicate certificates/Secrets in a cluster constantly fighting for the latest version of the Key Vault Secret. Any feature request or PRs are welcome!

See also https://external-secrets.io/latest/guides/pushsecrets/

PushSecret reads a local kind=Secret and pushes its content to a secret provider.


winbar with color

Hi,
a) I just need a normal winbar without symbols with fullpathname ,
b) I just need to change the color of the winbar.
set winbar=%f%M . It works. But I dont know how to change the color.
Could you help me?

Colours are set the same way as for the statusline, so you can read about it here :h statusline and search for highlight.

Consider using barbecue.nvim.
Here is a minimal config for what you want:
require("barbecue").setup({
  symbols = {
    separator = ">",
    default_context = false,
  },
  kinds = {
    File = false,
    Package = false,
    Module = false,
    Namespace = false,
    Macro = false,
    Class = false,
    Constructor = false,
    Field = false,
    Property = false,
    Method = false,
    Struct = false,
    Event = false,
    Interface = false,
    Enum = false,
    EnumMember = false,
    Constant = false,
    Function = false,
    TypeParameter = false,
    Variable = false,
    Operator = false,
    Null = false,
    Boolean = false,
    Number = false,
    String = false,
    Key = false,
    Array = false,
    Object = false,
  },
})


Windows capability

This app for windows?
App work perfectly on windows?
I am using windows 10 and visual studio 2015 community. I can not get success.

The dev environment is Node-based. If you can install the Go SDK,  run Gulp, bower, and the other tools listed https://github.com/GoogleChrome/ioweb2015#setup, you should be set.

#1530
in windows can't get succeed.

Unfortunately we haven't spent any time building the site on Windows.


[pigeon] support for multiple input files.

I'm experimenting with pigeon and have created my first interface.
I started structuring my code into three dart file.
hostapi
flutterapi
shared classes.
When trying to  generate the pigeon code I found the --input flag only takes one file.
So I tried to run pigeon once for each file.
This however didn't work as it appears that pigeon is using the name of the first class it visits (this isn't clear) despite placing a configPigeon declaration in each file.
So  I assume that pigeon currently only supports a single input file.
Whilst this is probably suitable from an minimum release it would be nice if it would support multiple input files to allow for better structuring of the code base.
For the record here are the input files I created
sounds_shared_api_classes.dart
/// classes that are shared between the 'to' and 'from' platform apis.abstract
///
///
///
import 'package:pigeon/pigeon.dart';

class SoundPlayer {}

class Track {}

class Request {
  String uuid;
}

class Response {
  bool success;
  int errorCode;
  String error;
}

void configurePigeon(PigeonOptions opts) {
  opts.dartOut =
      '../sounds_platform_interface/lib/sounds_shared_api_classes.dart';
  opts.objcHeaderOut = 'ios/Classes/sounds_shared_api_classes.h';
  opts.objcSourceOut = 'ios/Classes/sounds_shared_api_classes.m';
  opts.objcOptions.prefix = 'FLT';
  opts.javaOut =
      'android/src/main/java/com/bsutton/sounds/SoundsSharedApiClasses.java';
  opts.javaOptions.package = 'com.bsutton.sounds';
}

sounds_from_platform_api.dart
import 'package:pigeon/pigeon.dart';

import 'sounds_shared_api_classes.dart';

/// Defines the set of methods that the platform can used
/// to call into the dart code.
///

/// This enum reflects an enum of the same name
/// in BackgroundAudioServices.java
/// and the two enums MUST be kept in sync.
///
/// The order of these enums is CRITICAL!
enum SystemPlaybackState {
  /// The OS Media Player has started playing
  playing,

  /// The OS Media Player has been paused
  paused,

  /// The OS Media Player has been stopped
  stopped
}

/// The collection of method calls the platform can
/// use to call back into the dart code.
@FlutterApi()
abstract class SoundsFromPlatformApi {
  /// Called in response to an [initialisePlayer] call.
  ///
  /// If the player was already initialised then the platform MUST
  /// set [success] to false and [error] to 'Already initialised'.
  ///
  /// If the initialisation suceeded then [success] is
  /// set to true and [error] is ignored.
  ///
  /// If the initialisation failed [success] is set to false
  /// and [error] contains an appropriate message.
  void onInitialiseCompleted(
      SoundPlayer player, bool success, int errorCode, String error);

  /// Called by the platform to indicate
  /// that a call to [releasePlayer] has completed.
  ///
  /// If the player was already released (an unknown player is passed)
  /// then the platform MUST
  /// set [success] to false and [error] to 'Already released'.
  ///
  /// If the player was released successfully then [success] is set to true.
  ///
  /// If the player failed to start then [success] is set to false
  /// and [error] contains an appropriate error message.
  ///
  /// Even if the release failed the Dart system will assume
  /// that the release was successful and take no further action.
  /// i.e. it will make no attempts to do any further cleanup.
  /// It is the platforms responsibilty to clean up the resources
  /// as much as possible before calling this method.
  ///
  void onReleaseCompleted(
      SoundPlayer player, bool success, int errorCode, String error);

  /// Called by the platform to indicate
  /// that a call to [startPlayer] has completed.
  ///
  /// If the player was already started then the platform MUST
  /// set [success] to false and [error] to 'Already playing'.
  ///
  /// If the player started then [success] is set to true.
  ///
  /// If the player failed to start then [success] is set to false
  /// and [error] contains an appropriate error message.
  ///
  void onStartCompleted(
      SoundPlayer player, bool success, int errorCode, String error);

  /// Called by the platform to indicate
  /// that a call to [stopPlayer] has completed.
  ///
  /// If the player was already stopped then the platform MUST
  /// set [success] to false and [error] to 'Already stopped'.
  ///
  /// If the player stopped then [success] is set to true.
  ///
  /// If the player failed to stop then [success] is set to false
  /// and [error] contains an appropriate error message.
  ///
  void onStopCompleted(
      SoundPlayer player, bool success, int errorCode, String error);

  /// Called by the platform to indicate
  /// that a call to [pausePlayer] has completed.
  ///
  /// If the player was already paused then the platform MUST
  /// set success to false and set error to 'Already paused'.
  ///
  /// If the player paused then [success] is set to true.
  ///
  /// If the player failed to pause then [success] is set to false
  /// and [error] contains an appropriate error message.
  ///
  void onPauseCompleted(
      SoundPlayer player, bool success, int errorCode, String error);

  /// Called by the platform to indicate
  /// that a call to [resumelayer] has completed.
  ///
  /// If the player was already playing then the platform MUST
  /// set success to false and set error to 'Already playing'.
  ///
  /// If the player resumed then [success] is set to true.
  ///
  /// If the player failed to resume then [success] is set to false
  /// and [error] contains an appropriate error message.
  ///
  void onResumeCompleted(
      SoundPlayer player, bool success, int errorCode, String error);

  /// Called by the platform to indicate
  /// that a call to [getDuration] has completed.
  ///
  /// The [milliseconds] represents the duration of the recording
  /// in milliseconds.
  ///
  /// If the duration was calculated then [success] is set to true.
  ///
  /// If the passed coded could not be calculated
  /// If the player failed to resume then [success] is set to false
  /// and [error] contains an appropriate error message.
  ///
  void onGetDurationCompleted(SoundPlayer player, Track track, int milliseconds,
      bool success, int errorCode, String error);

  /// The platform must emmit calls to this method whenever
  /// audio is playing.
  ///
  /// The [duration] is the total duration of the track currently playing in
  /// milliseconds. This value may change if the audio is being streamed.
  ///
  /// The [position] is the current playback position measured as the no.
  /// of milliseconds from the start of the track. This value will change
  /// as playback occurs.
  ///
  /// The interval between calls to this method is set by a call to
  /// [setProgressInterval]. If not call to [setProgressInterval] has
  /// been set then the default interval MUST be 100ms.
  void onUpdateProgress(
      SoundPlayer player, Track track, int duration, int position);

  /// The platform MUST emit this method whenever audio finishes playing and
  /// is non resumable for any reason.
  ///
  /// e.g. a call to [pause] would not normally result in this method being
  /// called.
  ///
  /// The following circumstances are noted but may not be exhaustive.
  ///  - [onStopped] was called.
  ///  - the audio played to completion.
  ///  - the user skipped to another track.
  ///  - the sound player is released.
  ///  - an error occurs that causes the track to stop playing.
  ///  - playback was stopped due to the app being sent to the background.
  ///  - playback was stopped (as apposed to paused) via the shade
  void onAudioPlayerFinished(
      SoundPlayer player, Track track, int duration, int position);

  /// The platform MUST emit this method when the OS Media Player
  /// is used to skip forward to the next track.
  ///
  /// [track] represents the current track that was playing when the
  /// user initialied the skip.
  void onSystemSkipForward(SoundPlayer player, Track track);

  /// The platform MUST emit this method when the OS Media Player
  /// is used to skip backward to the next track.
  ///
  /// [track] represents the current track that was playing when the
  /// user initialied the skip.
  void onSystemSkipBackward(SoundPlayer player, Track track);

  /// I think we will deprecate this api as we should now have
  /// reliable state visiblity from the individual events that will
  /// be emitted as noted above.
  /// The platform MUST emit this method when the OS Media Player
  /// is used to skip backward to the next track.
  ///
  /// [track] represents the current track that was playing when the
  /// user initialied the skip.
//void onSystemUpdatePlaybackState

}

void configurePigeon(PigeonOptions opts) {
  opts.dartOut =
      '../sounds_platform_interface/lib/sounds_from_platform_api.dart';
  opts.objcHeaderOut = 'ios/Classes/sounds_from_platform_api.h';
  opts.objcSourceOut = 'ios/Classes/sounds_from_platform_api.m';
  opts.objcOptions.prefix = 'FLT';
  opts.javaOut =
      'android/src/main/java/com/bsutton/sounds/SoundsFromPlatformApi.java';
  opts.javaOptions.package = 'com.bsutton.sounds';
}

sounds_to_platform_api.dart
/// Defines the platform agnosistic interface for calls from flutter to the
///  underlaying platform code.
///
import 'package:pigeon/pigeon.dart';
import 'package:sounds/src/audio_focus.dart';

import 'sounds_shared_api_classes.dart';

/// The collection of methods we use to call into the platform code.
@HostApi()
abstract class SoundsToPlatformApi {
  /// The list of specific errors that can be passed from the platform to dart.
  static const errnoGeneral = 1;
  static const errnoUnsupportedCodec = 2;

  /// Each Player must be initialized and registered before
  /// any other calls can be made.
  ///
  /// This platform MUST return immediately and MUST
  /// the platform MUST call [onInitialiseCompleted] once
  /// the operation completes or an error occurs.
  @async
  Response initializePlayer(SoundPlayer player);

  /// Releases the slot used by the connector.
  /// To use a plugin you start by calling [register]
  /// and finish by calling [release].
  /// Instructs the platform to release the player and
  /// free any resources associated with the player.
  ///
  /// The platform MUST  return immediately and the platform must
  /// emmit a call to [onReleaseCompleted] once the player has actually been
  /// released.
  @async
  Response releasePlayer(SoundPlayer player);

  /// Call this method to start playing the given track.
  ///
  /// The platform MUST return immediately and
  /// MUST call [onStartCompleted] once the
  /// track starts playing or if an error occurs.
  ///
  /// Once the audio start playing the platform MUST
  @async
  Response startPlayer(SoundPlayer player, Track track);

  /// Instructs the player to stop playing.
  ///
  /// The call MUST return immediately and the platform must
  /// emmit a call to [onStopCompleted] once the player has actually stopped
  /// playing.
  @async
  Response stopPlayer(SoundPlayer player);

  /// Instructs the player to pause.
  ///
  /// The call should return immediately and the platform must
  /// emmit a call to [onPauseCompleted] once the player has actually stopped
  /// playing.
  ///
  @async
  Response pausePlayer(SoundPlayer player);

  /// Instructs the player to resume.
  ///
  /// The call MUST return immediately and the platform must
  /// emmit a call to [onResumeCompleted] once the player has actually stopped
  /// playing.
  @async
  Response resumePlayer(SoundPlayer player);

  /// seek the currently playing track to the position [milliseconds]
  /// from the start.
  ///
  /// It is not valid to attempt to seek if the player is not currently
  /// playing.
  ///
  /// It is expect that we may see race conditions (as pause/seek overlapping)
  /// in which case the platform will return an error if the player
  /// isn't playing. It is up to the dart code to manage these race conditions.
  ///
  /// The call MUST return immediately and the platform must
  /// emmit a call to [onSeekCompleted] once the player has actually stopped
  /// playing.
  @async
  Response seekToPlayer(SoundPlayer player, int milliseconds);

  /// Get the duration of an audio file located at [path].
  ///
  /// Depending on the size of the file and the codec this may be a lengthy
  /// operation.
  ///
  /// The platform MUST return immediately  and MUST call
  /// [getDurationCompleted] once the duration is calculated or an error occurs.
  ///
  /// If the Track's codec is not supported then [getDurationCompleted]
  /// must return with [success] = false and an error of the form:
  /// 'The codec $codec is not supported'.
  @async
  Response getDuration(SoundPlayer player, Track track);

  ///
  /// Sets the volume between 0 and 100.
  ///
  /// On android this will need to be scaled to a value between 0 and 1.
  @async
  Response setVolume(SoundPlayer player, double volume);

  /// Sets the interval between progress messages being generated from
  /// the platform code.
  @async
  Response setProgressInterval(SoundPlayer player, int milliseconds);

  /// Requests the audio focus setting the mode and gain.
  ///
  /// Was setActive(bool)
  /// - combines
  ///   ioSetCategory
  ///   androidAudioFocusRequest
  ///   setActive
  ///
  @async
  Response requestAudioFocus(SoundPlayer player, AudioFocus mode);

  /// Release the audio focus.
  /// The affect on other media players will a result of a prior
  /// call to [requestAudioFocus] and the [AudioFocus] mode that was passed.
  /// was setActive(false)
  @async
  Response releaseAudioFocus(SoundPlayer player);
}

void configurePigeon(PigeonOptions opts) {
  opts.dartOut = '../sounds_platform_interface/lib/sounds_to_platform_api.dart';
  opts.objcHeaderOut = 'ios/Classes/sounds_to_platform_api.h';
  opts.objcSourceOut = 'ios/Classes/sounds_to_platform_api.m';
  opts.objcOptions.prefix = 'FLT';
  opts.javaOut =
      'android/src/main/java/com/bsutton/sounds/SoundsToPlatformApi.java';
  opts.javaOptions.package = 'com.bsutton.sounds';
}

To be clear I'm using the branch created by @xsahil03x which provides async support however I don' t thank that branch does any work in this particular area.

Supporting multiple files wasn't something I explicitly supported or didn't support.  I think it happened to work in many situations by chance.  With the Dart analyzer migration it will explicitly not be supported https://github.com/flutter/packages/pull/381  (I'll go add an error if someone does that to that PR right now).
We can consider supporting it in the future if need be, in the meantime explicitly not supporting it is an improvement.

Is this feature request somehow related to the import error?
Error: lib/MyPigeons.dart:3: Unsupported import 'models.dart', only imports of 'package:pigeon/pigeon.dart' are supported.
Error: lib/MyPigeons.dart:219: Unknown type: MyType
pub finished with exit code 1
make: *** [pigeon] Error 1

I would like to move my models in separate dart files instead of having a single big file with everything in it.

I tried to workaround the limitation of having only one file with part and part of but that doesn't work neither.
Not sure if that's easier to implement, but it would help a bit.

A specific use case for this that I've been running into:

A federated plugin has enums in the platform interface (e.g., image_picker's SourceType and SourceCamera).
The host implementations need those same enums.

Currently the solution is to duplicate the enums in the Pigeon file, and then write code for each enum that translates one enum to the other, identical but for the name, enum.
Ideally I'd want to be able to just reference the actual enum in the Pigeon definition.

It turns out this would actually be dangerous; it would mean that if the platform interface added an enum value (which we don't generally consider to be a breaking change), the existing implementation packages would have cases where the native code would get enum values that don't exist in the native copies of the enums. So the translation, while slightly cumbersome, enforces that the cross-language values are consistent, with the handling of unknown values requiring explicit logic on the Dart side.

As a workaround to avoid one large text file with all definitions, I tried writing a script to go through all the files inside the pigeons folder and run pigeon file generation over each file. However, this also doesn't work. The loop ends after one file generation only. What can be the possible reason for this?
It would be helpful to have multi-input support for pigeons since Flutter is growing and more use cases are coming.

I tried writing a script to go through all the files inside the pigeons folder and run pigeon file generation over each file. However, this also doesn't work. The loop ends after one file generation only. What can be the possible reason for this?

That sounds like a bug in your script; Pigeon doesn't have any special ability to affect the behavior of calling processes.

That sounds like a bug in your script; Pigeon doesn't have any special ability to affect the behavior of calling processes.

If I am doing flutter pub get instead of running pigeons, it is working fine

Hi, any news regarding this feature?

You can write a shell script to handle this. For example, if you’re using a Unix-based system (like macOS or Linux), you can use a bash script. Here’s how you can do it:
#!/bin/bash

INPUT_DIR="./pigeons"  # Directory containing Pigeon Dart files

for file in "$INPUT_DIR"/*.dart; do
  echo "Generating pigeon file for $file"
  dart run pigeon --input "$file"
done

I think what @apalala-dev described will already help a lot, and should be fairly easy to implement.

I tried to workaround the limitation of having only one file with part and part of but that doesn't work neither. Not sure if that's easier to implement, but it would help a bit.

Was there a fundamental reason this was disallowed, or is it just something that needs to be implemented?

It turns out this would actually be dangerous; it would mean that if the platform interface added an enum value (which we don't generally consider to be a breaking change), the existing implementation packages would have cases where the native code would get enum values that don't exist in the native copies of the enums. So the translation, while slightly cumbersome, enforces that the cross-language values are consistent, with the handling of unknown values requiring explicit logic on the Dart side.

Would this apply to classes as well? In other words, if we define a class in a platform interface, is it unsafe to try to use that class in the native code because the platform interface can, at any time, add more fields? If so it would seem we should be duplicating classes as well as enums


Deploy on Vercel

Hello!
Thank you for creating this demonstration.
Could you please tell me the proper method for deploying it on Vercel? I attempted to do so but it did not work.

The current status is that the issue has been resolved. I accomplished this by deactivating Cloudflare for my domain.


Not working, no indicators/console messages

Version: 1.1.2
VSCode: 1.9.1
I've got this installed and opened up a wordpress php directory as my workspace and tried clicking/hovering/typing to reference variables but none of the features worked.
The directory is a remote linux directory mounted as a drive on windows 10 (So the  requires/includes use '/'s)
I don't see any indication of the extension indexing the workspace (as opposed to this one here https://marketplace.visualstudio.com/items?itemName=HvyIndustries.crane) or doing anything interesting for that matter.
In the debug console I see this
[Extension Host] PHP process connected               extensionHost.ts:282

I have php7.1 in my path and I can access it from an admin powershell, a user powershell and cygwin

Without any console messages I'm afraid it is impossible for me to help you. Did you check the output panel?

Yea there's nothing there. Trying a different approach to mirror remote directory.


Update ecosystem.rst

Added MiCV as a full pipeline in the external ecosystem docs. We recently built this tool and hope it will be useful to others trying to jump into this analysis space.
Please let me know if there are any questions or issues with including this in the docs. Thank you for all that you're doing with this project!
For extra information:
https://micv.works
https://github.com/Cai-Lab-at-University-of-Michigan/MiCV
https://www.biorxiv.org/content/10.1101/2<IP_ADDRESS>549v2

Sorry for taking so long to get back on this to you.
At the moment, we're not really comfortable with promoting a paid tool on the ecosystem page. Maybe we'll have a model for this at sometime in the future.

Isaac,
No need to apologize - thank you for considering it!
If you decide to put together a model for this or are open to
sponsorship in the future, please do reach out.
Best,
-Nigel Michki
On 3/3/21 06:16, Isaac Virshup wrote:

Sorry for taking so long to get back on this to you.
At the moment, we're not really comfortable with promoting a paid tool
on the ecosystem page. Maybe we'll have a model for this at sometime
in the future.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/theislab/scanpy/pull/1577#issuecomment-789640540,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABGOKBQI2ZR3NNIAPTVEAS3TBYLCXANCNFSM4V6QOATQ.


The android udev rules need to be updated

Describe the bug
I was reviewing the boot logs for my ublue latest image on 07/01 and I saw some errors in the logs:
/usr/lib/udev/rules.d/10-switch.rules:1 Unknown group 'nintendo_switch',>
/usr/lib/udev/rules.d/30-linksys-ae1200.rules:1 The line has no effect, >
/etc/udev/rules.d/51-android.rules:206 Invalid key/value pair, ignoring.
/etc/udev/rules.d/51-android.rules:207 Invalid key/value pair, ignoring.
/etc/udev/rules.d/51-android.rules:517 Invalid key/value pair, ignoring.
/etc/udev/rules.d/51-android.rules:518 Invalid key/value pair, ignoring.
/etc/udev/rules.d/51-android.rules:521 Invalid key/value pair, ignoring.
/etc/udev/rules.d/51-android.rules:157 GOTO="go_adb" has no matching lab>
/etc/udev/rules.d/51-android.rules:157 The line has no effect any more, >
/etc/udev/rules.d/51-android.rules:158 GOTO="go_adbrndis" has no matchin>
/etc/udev/rules.d/51-android.rules:158 The line has no effect any more, >
/etc/udev/rules.d/51-android.rules:159 GOTO="go_adbmtp" has no matching >
/etc/udev/rules.d/51-android.rules:159 The line has no effect any more, >
/etc/udev/rules.d/51-android.rules:160 GOTO="go_adbptp" has no matching >
/etc/udev/rules.d/51-android.rules:160 The line has no effect any more, >
/etc/udev/rules.d/51-android.rules:161 GOTO="go_adbmidi" has no matching>
/etc/udev/rules.d/51-android.rules:161 The line has no effect any more, >
/etc/udev/rules.d/51-android.rules:162 GOTO="go_adb" has no matching lab>

It seems the file 51-android.rules contains some errors. I inspected this file and all the lines with errors have "inline" comments. I don't think they are supported.
I tried to find the source file in the ublue-os repositories but I was unsuccessful. I did find an issue about this same problem that was fixed back on Nov 3, 2023.
https://github.com/M0Rf30/android-udev-rules/issues/287
Please help me find where we get the 51-android.rules file in this repo and I would be happy to remove the inline comments to fix this issue. If we are pulling it from somewhere else, the latest file here: https://github.com/M0Rf30/android-udev-rules/blob/main/51-android.rules does NOT have any inline comments.
I am happy to submit a fix to resolve this issue, but I can not determine where we get the 51-android.rules udev configuration from. Please point me in the right direction and I will do my best to resolve.
Thank you.
What did you expect to happen?
I expected the udev rules that we are using to not generate errors when getting parsed.
The latest 51-android.rules file here:  https://github.com/M0Rf30/android-udev-rules does not contain inline comments.
Output of rpm-ostree status
State: idle
AutomaticUpdates: stage; rpm-ostreed-automatic.timer: no runs since boot
Deployments:
  ostree-image-signed:docker://ghcr.io/ublue-os/bluefin:latest
                   Digest: sha256:cbae715dd100fff19b642a60e06d1c261fa7117223afafd53e7c45f35bd94cce
                  Version: 40.20240702.0 (2024-07-02T04:54:50Z)
                     Diff: 9 upgraded

● ostree-image-signed:docker://ghcr.io/ublue-os/bluefin:latest
                   Digest: sha256:d8d55f5f27490f47a9e4f1a6b8ada06d4d9dc7cbb497f4baf3f96c7a20fe378d
                  Version: 40.20240701.0 (2024-07-01T21:39:54Z)

  ostree-image-signed:docker://ghcr.io/ublue-os/bluefin:latest
                   Digest: sha256:e7d4f63d35c1cd1232d831dcba6be611180b50a1fc260471ef5655067c1619af
                  Version: 40.20240617.0 (2024-06-17T20:07:42Z)

Output of groups
mbruzek wheel incus-admin docker lxd libvirt

Extra information or context
No response

Hello, Android udev rules are located here:
https://github.com/ublue-os/android-udev-rules

It's just 3 commits behind, oppositely of what the version indicates, since maintainers didn't touched that.
But the build in COPR was built 9 months ago, so just a merge of those 3 new commits & build trigger should solve the issue.

Thank you @fiftydinar I will take a look at fixing these issues.

I created the pull request here: https://github.com/ublue-os/android-udev-rules/pull/5
But as you pointed out the version in the ublue repo was newer than what I see on the latest image. Please advise how I can initiate a build of COPR.
Thank you!

@mbruzek Unfortunately, only certain Universal Blue maintainers have access to ublue-os/staging COPR repo, where Android udev rules reside.
So build can be pushed by them only.

This looks good to go?

@castrojo just looking at the COPR, package is still not rebuilt

Now package rebuilt, so this issue is now officially solved

I shouldn't have reopened this as it was correctly closed back in July.
Since then there were more updates in the upstream android-udev-rules and a PR was opened: https://github.com/ublue-os/android-udev-rules/pull/8
I've merged that and will rebuild the COPR.

Reopening, because commit needs to be merged, which updates RPM version & then rebuild in COPR needs to be triggered.
When same RPM version is used for multiple builds, it can happen that you don't get the latest build.

We sorted this didn't we?

Now it's sorted


Router have problem with RAM leak

https://www.snbforums.com/threads/out-of-memory-errors-388-1-no-space-left-on-device-solutions.82406/post-819213
Used command service stop_conn_diag to execute at services-start in router.

fixed with newest release of router soft


Documentation lacks substance

All documentation on the different input commands are written with a verbose title without actually referencing the actuall yml format name for the input.
There is no auto-fill in Azure pipeline edit either, so there is issues actually converting the stated input commands into an actual pipeline yml

I will add this to our internal board

I came here to voice my agreement. The documentation for the TerraformTaskV4 task has an Example Task Usage
section with YAML examples; this would be great to introduce in the TerraformInstallerV1 task documentation.
Hopefully in the near future even this particular Microsoft guide could be updated so it's using these tasks instead of the tasks provided by Charles.


[5.9] Use technology icon for collections in Topics section

Explanation: Adds an icon for top-level collections curated in Topics section.
Scope: Minor JS change to add mapping for the icon
Issue: rdar://107729097
Risk: Low
Testing: Added unit test and verified manually
Reviewer: @dobromir-hristov
Original PR: #615

@swift-ci test

@swift-ci test


[Question]: Is it posible to give an agent an index as engine without using the query engine tool?

Question Validation

[X] I have searched both the documentation and discord for an answer.

Question
I chose an agent as retirver over a chat engine given the extended capabilities but one diference is that when using chat engine, you can ask questions about the index like if it would be part of its training dateset, while with an agent, in order to get the right answer, you must specify that it gotta use the query engine tool.
This isnt ideal when you want the agent to always consider the index before making an aswer.
Is there another way to give an agent access to an index other than as a tool?

Not sure If I understand the question fully, but here's a few comments.
Agents use query engine tools because the tool that is used is based on the description of that tool. So the agent looks at the chat history and the list of tools/descriptions, and decides if a tool should be invoked. In the latest version of llama-index, you can force at least one tool to always be called by using agent.chat("...", function_call=<tool_name>"
Using something like the context chat engine, which is based on a retriever, it will always retrieve text from your index, and use that text, along with the chat history, to answer the user message. This is best controlled by setting an appropriated system_prompt when creating the chat engine.

Perfect!


High number of calls to GetBlobProperties when running azcopy copy

Which version of the AzCopy was used?
Note: The version is visible when running AzCopy without any argument
AzCopy 10.22.1

Which platform are you using? (ex: Windows, Mac, Linux)
Linux
What command did you run?
Note: Please remove the SAS to avoid exposing your credentials. If you cannot remember the exact command, please retrieve it from the beginning of the log file.
azcopy copy "https://${SRC}.blob.core.windows.net?${SAS_TOKEN}" "https://${DST}.blob.core.windows.net?${SAS_TOKEN}"

What problem was encountered?
We are seeing a lot of GetBlobProperties call on our destination Storage Account whenever we run the command.

Two processes were started at midnight, with one finishing at 6:21AM and the other at 10:38AM.
We would like to understand what are these calls used for and if they could be removed, as they incur high costs (we have 15 storage accounts with the same patterns, costing us 100$ per day).
Have you found a mitigation/solution?
I feel like the --s2s-preserve-properties could be the culprit.
I am going to try disabling it and seeing what happens.

Setting --s2s-preserve-properties=false does not seem to change anything.

Hi this is a default behaviour of azcopy and there is no option to reduce the getBlobProperties calls.
By default AzCopy uses parallel hierarchical listing for the Blob endpoint in order to speed up the listing process.
To reduce the IOs/cost or optimize for a flat structure, you can choose to disable parallel hierarchical listing by setting the environment variable AZCOPY_DISABLE_HIERARCHICAL_SCAN to true.
You can refer this for more information.
Please know that doing this would impact performance and if you performance is one of your priorities then this is NOT desirable but if you prioritize saving on costs then this can be an an option.

Setting AZCOPY_DISABLE_HIERARCHICAL_SCAN does not seem to have made much of a difference unfortunately.
I have resorted to using azcopy sync for now, even though it uses a lot more memory.