You can only add apps that are in standard or premium mode to an Azure Traffic Manager profile.

Actually, the UI doesn't stop you from adding other (e.g. Dev/Test based service plans) Service Plan types.  But it does fail to update the web apps URL - so it fails with an HTTP 404.

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

ID: 0f164c8d-6445-b688-48c0-cb9344008e4d
Version Independent ID: 5da2d711-edf2-5bab-66bd-8b1548f2d11c
Content: Controlling Azure App Service traffic with Azure Traffic Manager
Content Source: articles/app-service/web-sites-traffic-manager.md
Service: app-service-web
GitHub Login: @cephalin
Microsoft Alias: cephalin

@CraigHumphrey Thanks for bringing this to our attention. We are investigating and will get back to you soon.

@CraigHumphrey I can verify the same in my repro. Free/shared/basic tier apps are not considered production tier. Since ATM is about increasing the availability of your production tier apps, I agree with what the documentation says.
With that being said, I think there should be some degree of validation that checks the tier of the web app endpoint that you're trying to add. I can try to share this feedback with the ATM product group but I ask you to move the discussion over to the MSDN forum since the doc appears to be correct. We can then drive the discussion from there.
Please tag me in a reply to this post and share the URL of your MSDN post so I can claim ownership of your post from our end and continuing working with you. We look forward to your reply.


Version bump to v3.1.0

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 83.362%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
6749

Relevant Lines:
8096

💛  - Coveralls


Consider splitting ComponentTicks

What problem does this solve or what need does it fill?
ComponentTicks is a lopsided datatype. The added ticks are immutable over the lifetime of the component and the changed ticks may be updated every frame. When using them in Changed<T> or Added<T> filters, half the memory fetched goes unused. When writing to it via Mut, cache lines are written out twice as often as they could.
What solution would you like?
Split Vec<UnsafeCell<ComponentTicks>> into two Vec<UnsafeCell<u32>> for added and changed ticks. Update related structs (i.e. Added<T>, Changed<T>, ChangeTrackers<T>, Mut<T>) to fetch only the ones needed.
Ideally, this should also enable autovectorization in query code for these filters, which should further speed up change detection filters.
What alternative(s) have you considered?
Leaving change detection as is.

I'm fully on board with this plan. Before we merge a PR for this, I'd like a benchmark for change detection so we can see the impact.


Checking if a predicate exists within a specific module

Trealla's predicate lookup will scan all loaded modules as fallback, but is it possible to do a stricter check?
% foo.pl
:- module(foo, []).

is_foo.

% bar.pl
:- module(bar, []).

not_foo.

$ tpl foo bar
?- foo:current_predicate(not_foo/0).
   true. % is there some check that makes this false?

I played around with hacking search_predicate to only do the global search when q->st.m == q->pl->user_m for current_predicate/1 and it seems to work, but I have a feeling it might break something :-)
My use case is that I have a bunch of modules that may or may not define the same unexported predicates (something like entity definitions for a CRUD app), and I'd like to check if a particular module defines one, basically a crappy version of Logtalk protocols.

I'll  have a look, obviously too lax.
On Mon, 13 Nov 2023, 20:09 guregu, @.***> wrote:

Trealla's predicate lookup will scan all loaded modules as fallback, but
is it possible to do a stricter check?
% foo.pl
:- module(foo, []).
is_foo.
% bar.pl
:- module(bar, []).
not_foo.
$ tpl foo bar?- foo:current_predicate(not_foo/0).   true. % is there some check that makes this false?
I played around with hacking search_predicate to only do the global
search when q->st.m == q->pl->user_m for current_predicate/1 and it seems
to work, but I have a feeling it might break something :-)
My use case is that I have a bunch of modules that may or may not define
the same unexported predicates (something like entity definitions for a
CRUD app), and I'd like to check if a particular module defines one,
basically a crappy version of Logtalk protocols.
—
Reply to this email directly, view it on GitHub
https://github.com/trealla-prolog/trealla/issues/389, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFNKSEUK42LG2NAHQKWDEXLYEHWUFAVCNFSM6AAAAAA7I4PSD2VHI2DSMVQWIX3LMV43ASLTON2WKOZRHE4TAMZRHA2TQOA
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

There's still work to do but as it currently stands...
~/trealla (devel) $ cat foo.pl
:- module(foo, [is_foo/0]).
private_foo.
~/trealla (devel) $ tpl foo
Trealla Prolog (c) Infradig 2020-2023, v2.30.2-dirty
?- current_predicate(is_foo/0).
false.
?- current_predicate(foo:is_foo/0).
true.
?- foo:current_predicate(is_foo/0).
true.
?- bar:current_predicate(is_foo/0).
false.
?- current_predicate(bar:is_foo/0).
false.
?-

Tried it out a bit and it looks good, thanks!

My use case is that I have a bunch of modules that may or may not define the same unexported predicates (something like entity definitions for a CRUD app), and I'd like to check if a particular module defines one, basically a crappy version of Logtalk protocols.

I'm curious. Prolog modules are an evolutionary dead-end. Why try hacks around modules and spend time on crappy versions of Logtalk features when Logtalk fully supports Trealla Prolog?

My use case is that I have a bunch of modules that may or may not define the same unexported predicates (something like entity definitions for a CRUD app), and I'd like to check if a particular module defines one, basically a crappy version of Logtalk protocols.

I'm curious. Prolog modules are an evolutionary dead-end. Why try hacks around modules and spend time on crappy versions of Logtalk features when Logtalk fully supports Trealla Prolog?

No good reason, really. Part of it is trying to understand (and improve) quirks in Trealla. Part of it is because I don't have a good way of distributing Logtalk-based programs for browsers yet (this is no fault of Logtalk). I made an issue in trealla-js, let me know if you have any ideas: https://github.com/guregu/trealla-js/issues/26

I'm closing this.

Thanks @infradig!


How can I change fonts in Bash permanently?

From @Yaosen on August 31, 2017 5:8
I followed this instruction to change my font in Bash. But it goes back every time I reopen it. How can I change fonts in Bash permanently?
Copied from original issue: Microsoft/WSL#2463

From @zadjii-msft on August 31, 2017 15:53
Could you post a screenshot of your font property sheet? Like this?

From @shevegen on September 2, 2017 9:13
Nice screenshot - helps explain much faster than words alone. :)

From @zadjii-msft on September 5, 2017 15:39
Hmm. That looks pretty normal to me. Maybe try chaging the font, then also changing one of the color values (eg make black (1, 1, 1) instead of (0, 0, 0) and then hit okay. Does opening a new bash window after that persist the font?

From @Yaosen on September 4, 2017 17:48

From @Yaosen on September 5, 2017 22:1
Thanks!! I don't understand what you mean. Which should I read to solve
this problem? Or there is no way to solve it in bash and I have to use
another app? And it does not make sense that the bug is only existing for
Chinese since I bought my laptop in US and my windows is running in English
as well.
Thanks
https://mailtrack.io/ Sent with Mailtrack
<EMAIL_ADDRESS>On Tue, Sep 5, 2017 at 11:40 AM, Po-wei<EMAIL_ADDRESS>wrote:

@Yaosen https://github.com/yaosen It has been a bug for Chinese people
for a long time....
If your code page is in US, then the changes won't go back.
However, if the codepage in 950 or 936, the changes will not persist.
You can check my post #1994
https://github.com/Microsoft/BashOnWindows/issues/1994 for some
information.
And there are some work around for this -- use some 3rd emulator terminal.
In #757 https://github.com/Microsoft/BashOnWindows/issues/757 also has
some information.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/BashOnWindows/issues/2463#issuecomment-327265603,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AUAQXVTKRjZSmtcfaYbLYBGflJGPOck2ks5sfZWEgaJpZM4PITpj
.

From @Po-wei on September 5, 2017 18:39
@Yaosen It has been a bug for Chinese people for a long time....
If your code page is in US, then the changes won't go back.
However, if the codepage in 950 or 936, the changes will not persist.
You can check my post #1994 for some information.
And there are some work around for this -- use some 3rd emulator terminal.
In #757 also has some information.

From @SwimmingTiger on October 6, 2017 8:31
I have been struggling with the issue for a long time but I solved it today. My code page is 936 and I know that to solve the issue simply, I just need a font that supports the charset CP936 like SimSun. I tried some of combined fonts in Chinese and Western characters, but all didn't work. They have CP936 characters but they may not declare support for CP936 in font meta. So I cannot find them in CMD and PowerShell property. Only find in Bash property but not permanently.
But just now, I found "Microsoft YaHei Mono". You don't need any extra action, just install it, and then select this font in the Bash property. Then the font will never change again.
Download: Microsoft YaHei Mono.zip or CSDN
The font = Microsoft YaHei + Consolas

Chinese Simplified Version （中文版）:
我被这个问题困扰很久了，不过今天终于解决了。我的系统代码页是936，我知道要简单的解决这个问题，我只需要找到一款像新宋体那样支持CP936字符集的字体就好。不过，我尝试过好几个中英文混合字体，但是都没有用。这些混合字体确实有CP936的字符，但是我怀疑它们没有在字体元信息里声明支持CP936。所以我在CMD和PowerShell属性里面都看不到这些字体，只有在Bash属性里能看到，但是无法持久保存字体设置。
直到刚才，我发现了“Microsoft YaHei Mono”。不需要进行任何额外的操作，只需要安装这款字体，然后在Bash的属性里面启用它就OK了。从此以后字体再也不会变成默认的了。
下载：Microsoft YaHei Mono.zip 或 CSDN
该字体 = 微软雅黑 + Consolas

From @choidamdam on October 24, 2017 0:54
@zadjii-msft
Exactly the same issue occurs on Korean version too. I think the font fallback need to be implemented locally (not for the whole text) and temporary.

From @Yaosen on October 8, 2017 22:16
It works!!!! Thanks so much!!

Is this on progress ?

I think I just figured out how it could be addressed without installing new font.

Go to Control Panel - Clock, Language & Region - Locales - Region - Administrative - Language for non-Unicode programs - Change system locale, there you click on the Beta checkbox, after a reboot my WSL terminal finally got my font settings right!
I tried tmux, vim, vim in tmux, etc., all functioned well.
My OS version is Windows 10 profesional, version 1809, 17763.529.

中文：前往 控制面板 - 时钟和区域 - 区域 - 管理 - 非Unicode程序的语言 - 更改系统区域设置，勾选“Beta版：使用Unicode UTF-8提供全球语言支持”，重启后WSL字体就不会再混乱了。测试过tmux，vim，tmux中使用vim，都没有出现字体回滚的问题。

https://github.com/Microsoft/WSL/issues/2463

I'm going to close this. It was originally a question on how to do something that was answered. And then it morphed into needing font fallback (which the DX renderer component is doing now).
As a result, I believe this is taken care of.


Additional Fix for Java Core 1585

To apply the feedbacks for PR.
https://github.com/couchbaselabs/couchbase-lite-java-forestdb/pull/93#pullrequestreview-20920122
Note: original PR is already merged.

PR: https://github.com/couchbaselabs/couchbase-lite-java-forestdb/pull/94/files


Add keyboardz to Qwik showcases

Just learned Qwik JS and want to share my result using Qwik+React, Partytown and Qwik Speak.
Thank you.

Sorry about that. I hope new commit is ok now.


Add declarative meta-templates to generate serialize and deserialize functions for DRY conformance

So, when to make a grammar in some tool, it gives you a means to deserialize to an AST.  Wouldn't it be nice if that also gave you a means to serialize your AST?  The grammar (typically) has enough information to do this.  Wouldn't it be better yet if there were adapters to and from an AST to the actual data structure that you use?  A plain grammar can't do that on its own, but given a few meta elements can be given enough information to do so.  For example, in a JSON AST, an array node will have surrounding '[', ']' and wanted data comma separated between those.  The actual nodes with valuable terminating parse rules should be able to be noted as wanted and their listing of them infer that they belong in some vector.
I'd like to implement this feature.  I know there are methods through the use of actions to get a similar effect, but I don't believe these to be as easy for a user, nor quite as 'pure' or as useful as an example for an implementation in another language.  I'd like to get some initial guidance on how I might implement this, as well as if there is any related literature that attempts the same goal in either theory or implementation.

I don't really understand what you are trying to do. A grammar does not generate an AST, an input applied with a grammar does. Can you give a concrete example of what you have in mind?

Input is implied.  Sorry, I've been out of the academic space for a bit.
An example would be with a suitably tagged version of a JSON grammar, and input, something like the following call would work as implied.
auto values = ast_to_data(parse_input_to_ast(ifstream("input.json"));

Where values is a std::variant, std::vector, std::map composite.  Representing the concise data in the file.  The effect here would be analogous to what you get in Python when ingesting a JSON file, but the underlying feature would be suitable for more than a one-off filetype with a custom library.

Here's something more concrete of what I'm thinking.  This is pseudo-code, it is not intended to be anything except illustrative.  Here are inserted meta-templates starting with "data" or "nondata", with some specialization of "data" templates in order to account for common transformations of the input string tokens.  At the bottom is what I think should be available as operations given a grammar and some data to either deserialize or serialize.
minimal_example_json.hpp
// Copyright (c) 2014-2021 Dr. Colin Hirsch and Daniel Frey
// Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/

#pragma once

#include "../ascii.hpp"
#include "../config.hpp"
#include "../rules.hpp"
#include "../utf8.hpp"

namespace TAO_PEGTL_NAMESPACE::json
{
   // JSON grammar according to RFC 8259

   // clang-format off
   struct ws : nondata< one< ' ', '\t', '\n', '\r' > > {};

   template< typename R, typename P = ws >
   struct padr : seq< R, star< P > > {};

   struct begin_array : nondata< padr< one< '[' > > > {};
   struct begin_object : nondata< padr< one< '{' > > > {};
   struct end_array : nondata< one< ']' > > {};
   struct end_object : nondata< one< '}' > > {};
   struct name_separator : nondata< pad< one< ':' >, ws > > {};
   struct value_separator : nondata< padr< one< ',' > > > {};

   struct false_ : data< string< 'f', 'a', 'l', 's', 'e' >, [](auto ignored){ return false; } > {};  // NOLINT(readability-identifier-naming)
   struct null : data< string< 'n', 'u', 'l', 'l' >, [](auto ignored){ return nullptr; } > {};
   struct true_ : data< string< 't', 'r', 'u', 'e' >, [](auto ignored){ return true; } > {};  // NOLINT(readability-identifier-naming)

   struct digits : plus< digit > {};
   struct exp : seq< one< 'e', 'E' >, opt< one< '-', '+'> >, digits > {};
   struct frac : seq< one< '.' >, digits > {};
   struct int_ : sor< one< '0' >, plus< digit > > {};  // NOLINT(readability-identifier-naming)
   struct number : data< seq< opt< one< '-' > >, int_, opt< frac >, opt< exp > >, [](std::tuple<std::optional<T>, U, std::optional<V>, std::optional<W>> json_number_rep){ return ...; } > {};

   struct xdigit : pegtl::xdigit {};
   struct unicode : list< seq< one< 'u' >, rep< 4, xdigit > >, one< '\\' > > {};
   struct escaped_char : one< '"', '\\', '/', 'b', 'f', 'n', 'r', 't' > {};
   struct escaped : sor< escaped_char, unicode > {};
   struct unescaped : utf8::range< 0x20, 0x10FFFF > {};
   struct char_ : if_then_else< one< '\\' >, escaped, unescaped > {};  // NOLINT(readability-identifier-naming)

   struct string_content : data<until< at< one< '"' > >, char_ >, [](std::vector<typeof(char_)> json_string_rep){ return /*vector<char> to std:string*/; } > {};
   struct string : seq< one< '"' >, string_content, any >;

   struct key_content : data<until< at< one< '"' > >, char_ >, [](std::vector<typeof(char_)> json_key_rep){ return /* vector<char> to std::string*/; } > {};
   struct key : seq< one< '"' >, key_content, any >;

   struct value;

   struct array_element;
   struct next_array_element : seq< array_element > {};
   struct array_content : data<opt< array_element, star< value_separator, next_array_element > >, [](std::optional<std::variant<...>> new_arr_elm, std::vector<std::variant<...>> arr_elms){ arr_elms.push_back(new_arr_elm.value()); return arr_elms; } > {};
   struct array : seq< begin_array, array_content, end_array >;

   struct member_value : data<padr< value >, [](std::variant<...> json_value){ return json_value; } > {};
   struct member : data<seq< key, name_separator, member_value >, [](std::string key, std::variant<...> value){ return std::map({{key, value}}); } > {};
   struct next_member : seq< member > {};
   struct object_content : data< opt< member, star< value_separator, next_member > >, [](std::map<std::string, std::variant<...>> single_key_value, std::vector<std::map<std::string, std::variant<...>>> key_values){ return /*merged std::map*/; } > {};
   struct object : seq< begin_object, object_content, end_object >;

   struct value : sor< string, number, object, array, false_, true_, null > {};
   struct array_element : padr< value > {};

   struct text : pad< value, ws > {};
   // clang-format on

}  // namespace TAO_PEGTL_NAMESPACE::json

expanded_example_json.hpp
// Copyright (c) 2014-2021 Dr. Colin Hirsch and Daniel Frey
// Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/

#pragma once

#include "../ascii.hpp"
#include "../config.hpp"
#include "../rules.hpp"
#include "../utf8.hpp"

namespace TAO_PEGTL_NAMESPACE::json
{
   // JSON grammar according to RFC 8259

   // clang-format off
   struct ws : nondata< one< ' ', '\t', '\n', '\r' > > {};

   template< typename R, typename P = ws >
   struct padr : seq< R, star< P > > {};

   struct begin_array : nondata< padr< one< '[' > > > {};
   struct begin_object : nondata< padr< one< '{' > > > {};
   struct end_array : nondata< one< ']' > > {};
   struct end_object : nondata< one< '}' > > {};
   struct name_separator : nondata< pad< one< ':' >, ws > > {};
   struct value_separator : nondata< padr< one< ',' > > > {};

   struct false_ : data_false< string< 'f', 'a', 'l', 's', 'e' > > {};  // NOLINT(readability-identifier-naming)
   struct null : data_null< string< 'n', 'u', 'l', 'l' > > {};
   struct true_ : data_true< string< 't', 'r', 'u', 'e' > > {};  // NOLINT(readability-identifier-naming)

   struct digits : plus< digit > {};
   struct exp : seq< one< 'e', 'E' >, opt< one< '-', '+'> >, digits > {};
   struct frac : seq< one< '.' >, digits > {};
   struct int_ : sor< one< '0' >, plus< digit > > {};  // NOLINT(readability-identifier-naming)
   struct number : data_3_component_number< seq< opt< one< '-' > >, int_, opt< frac >, opt< exp > > > {};

   struct xdigit : pegtl::xdigit {};
   struct unicode : list< seq< one< 'u' >, rep< 4, xdigit > >, one< '\\' > > {};
   struct escaped_char : one< '"', '\\', '/', 'b', 'f', 'n', 'r', 't' > {};
   struct escaped : sor< escaped_char, unicode > {};
   struct unescaped : utf8::range< 0x20, 0x10FFFF > {};
   struct char_ : if_then_else< one< '\\' >, escaped, unescaped > {};  // NOLINT(readability-identifier-naming)

   struct string_content : data_quoted_escaped_string<until< at< one< '"' > >, char_ > > {};
   struct string : seq< one< '"' >, string_content, any >;

   struct key_content : data_quoted_string<until< at< one< '"' > >, char_ > > {};
   struct key : seq< one< '"' >, key_content, any >;

   struct value;

   struct array_element;
   struct next_array_element : seq< array_element > {};
   struct array_content : data_list_of_misc<opt< array_element, star< value_separator, next_array_element > > > {};
   struct array : seq< begin_array, array_content, end_array >;

   struct member_value : data_misc<padr< value >, [](std::variant<...> json_value){ return json_value; } > {};
   struct member : data_map<seq< key, name_separator, member_value > > {};
   struct next_member : seq< member > {};
   struct object_content : data_map_from_maps< opt< member, star< value_separator, next_member > > > {};
   struct object : seq< begin_object, object_content, end_object >;

   struct value : sor< string, number, object, array, false_, true_, null > {};
   struct array_element : padr< value > {};

   struct text : pad< value, ws > {};
   // clang-format on

}  // namespace TAO_PEGTL_NAMESPACE::json

example_in.json
{
  "number": 1,
  "bool": False,
  "null": null,
  "list": [ "number", 1, False, null ],
  "object": {
    "number": 1,
    "bool": False,
    "null": null,
    "list": [ "number", 1, False, null ]
  },
  "string": "Hello world!"
}

example_out.json
{"number":1,"bool":False,"null":null,"list":["number",1,False,null],"object":{"number":1,"bool":False,"null": null,"list":["number",1,False,null]},"string":"Hello world!"}
example.cpp

//Should be auto generated, haven't figure out what this really should look
//like or how to cleanly integrate.
typedef json_types std::variant<std::map<std::string, ...>, std::vector<...>, std::string, bool, long int, double, typeof(nullptr)>;

/* Effective contents
std::map<std::string, json_types> example = {
  {"number", 1},
  {"bool", false},
  {"null", nullptr},
  {"list", vector<json_types> = {"number", 1, false, nullptr} },
  {
    "object", std::map<std::string, json_types> = {
      {"number", 1},
      {"bool", false},
      {"null", nullptr},
      {"list", vector<json_types> = {"number", 1, false, nullptr} },
    }
  },
  "string": "Hello world!"
}
*/

int main(){
  auto example = ast_to_native(parse_ast_from_file<json_grammar>("example_in.json"));

  serialize_ast_to_file<json_grammar>(native_to_ast(example), "example_out.json");

  return 0;
}

I'll have a look at it when I find some time.

@anadon Am I understanding correctly that you are trying to combine two things here? Namely:
The first is to annotate the grammar in a way that describes the target data structure, i.e. the data structure that a parsing run should parse in to (rather than using the generic parse tree or the "usual" way via actions like in taoJSON).
The second is to not just obtain parse() that converts an input into a data structure, but also a print() that does the reverse, i.e. an auto-generated function that prints out the data structure in a way that you can round-trip the data.

This subject is something that we might follow up at some point, however it is rather involved, we don't have a clear starting point, and there are a couple of other things that need to be worked on first. I'll close this for now, but contributions and suggestions are of course always welcome.


Bug report!

Greetings, homie!
Like heatmap = np.float32(heatmap) / 255, np.float32(img) should be devided by 255.0 as well!
https://github.com/jacobgil/pytorch-grad-cam/blob/87c1a7c9951a986fbcde89b9a7f946f6e04bf0f8/pytorch_grad_cam/utils/image.py#L45

Hello,
The result will be the same,
np.float32(heatmap)  converts heatmap to np.float32, the /255 division then works on np.float32 and returns np.float32.

Hello,
The result will be the same,
np.float32(heatmap)  converts heatmap to np.float32, the /255 division then works on np.float32 and returns np.float32.

I mean cam = heatmap + np.float32(img)  / 255.0 rather than cam = heatmap + np.float32(img)

Oh, got it!
In the usage example, img is already passed as a np.float img normalized to [0, 1].
I guess the np.float32(img) is confusing, since it's already float.
If we remove that, do you think it solves the issue?

Oh, got it!
In the usage example, img is already passed as a np.float img normalized to [0, 1].
I guess the np.float32(img) is confusing, since it's already float.
If we remove that, do you think it solves the issue?

Yes. By the way, how can I apply CAM to those networks who employed soft-attention mechanism? Currently, many models have employed this mechanism.

What network are you referring to?
Vision Transformers for example, or something else?

What network are you referring to?
Vision Transformers for example, or something else?

Yes, can you use Vision Transformers as an example?

Since vision transformers don't have spatial activation channels, it's more tricky to apply Grad-CAM.
(Will need to think about how exactly to do it).
However, there are other techniques, like attention rollout.
Take a look at this implementation: https://github.com/jacobgil/vit-explain
And a blog post about it: https://jacobgil.github.io/deeplearning/vision-transformer-explainability

I'm going to soon post examples of using grad-cam with VIT.

Done!
Check the latest master branch Readme, and also vit_example.py


[UX] Empty text = delete please :)

Hey guys, UX nerd here. Here's what I noticed about my actual behavior when using your product:
When I wanted to delete something, the first thing I did was delete all the text in a box/list. Then I hit enter and nothing happened. (No feedback. At the very least, if you guys have time for this nice-to-have feature, an info box with the error message would be helpful. Then when the person starts typing again it goes away). Then I tried hitting save and again, nothing happened. No error message either.
I say if people want to delete their boxes and lists by deleting all the text inside them, let them do it!
if ( $(#div).val.length === 0) {
$delete $(#div);
}
Something like that. Thanks guys!

I don't think this is a behavior we want to encourage. If you want to delete a card you have to explicitly click on a “delete” button somewhere in the UI. Do you think it would be a good idea if file systems implemented a “rename this file to blank to delete its content”. How do you retrieve the original name if you have done this by mistake?
What I plan to implement is a “drag here to archive” when you are dragging a card. I think that would solve this issue in a better way.


fix: allow expandable env vars to reference any non-expandable env vars

Description
This PR makes Vite to allow expandable env vars (the env vars that will be expanded by dotenv-expand) to reference any non-expandable env vars.
The downside and upside is the opposite of #18981.
Even with this PR,
# .env
VITE_APP_BASE_ROUTE=/
VITE_APP_BASE_URL=$VITE_APP_BASE_ROUTE
# .env.production
VITE_APP_BASE_ROUTE=/app/

still means
VITE_APP_BASE_URL=/app/
VITE_APP_BASE_ROUTE=/app/

fixes https://github.com/vitejs/vite/issues/18975
alternative to #18981

I'm leaning towards this approach because it's easier to compose multiple env files, even if it means that our env files will work differently than others.


I should be able to build the Cold Iron resource building....

I have the population and the one time cost-  I should be able to build it now? It seems like unless I have the consumable (cold iron) I can't build it, yet I have all the one off consumables

Indeed, it's because you don't have enough Ironwood, either we need to make it clearer that you can't build or we should let build but it doesn't produce anything. @credence0x @ponderingdemocritus what do you guys think?

if you let them build, they are worse off because other resources start getting consumed immediately

marked as closed because this is intended behavior


Include other concepts of c++

The repo serves a fantastic guide to introduce new comers with the standard library of c++. It would be even great if we could add other lesser known( or used ) features of c++ here.

Suggestions:

[ ] Object Oriented Programming (not only inheritance, but also interesting topics like method chaining and this pointer)
[ ] Templates and variadic templates ( quite interesting ) and discussion about issues ( dos and donts ) with using templates with Classes
[ ] Lambda functions

 And more such interesting and rarely features of c++

I don't think that this is the aim of the repo.

@harshraj22 meanwhile as @Delta456 said it not the aim of repo for "now".
But we will soon plan out to include things you said, you can join the discord server for suggesting anything new.
Meanwhile I will open an issue thread where everyone can suggest Advanced C++ topics :fire:


schedule task in a loop?

What is the recommended way to handle stuff in a loop with libq?
I am trying to do a webclient that repeatedly sends some records to a database backend online.
So I have a queue + a blocking execution context inside an std::thread in my webclient class, and also another "dispatcher" class which also has a different queue + blocking execution context + std::thread . The dispatcher class will periodically read from the database and send 5 records using the webclient.
So I have something like this in the dispatcher:
    auto observationsToSync = observationsDatabase->getNextUnsynchronisedObservations(5);
    std::vector<q::promise<bool>> syncCalls;
    for(const auto& observation : observationsToSync)
    {
        syncCalls.emplace_back(client->sendJson("/api/observations", observation));
    }
    if(!syncCalls.empty()) {
        q::all(syncCalls, qExecContext->queue()).then([this](auto&& results){
           //....indicate that these records are synced
        });
    }

But now I want to do this code periodically, and so I could of course just do this in a separate thread, but it would be nice to know what the best "libq"-way is to accomplish this?

So I came up with this solution. I first thought that it would result in some ever increasing stack, but it does not if I have it right from what I see in my debugger:
I call this function once at startup, then it keeps going, very nice:
q::promise<> BackendDispatcherImpl::sendSomeObservations()
{
    return q::with( qExecContext->queue() ).then([this](){
        std::cout << "Hello world:" << std::this_thread::get_id() << std::endl;
        std::this_thread::sleep_for(2s);
        std::cout << "Hello world after 2s:" << std::this_thread::get_id() << std::endl;
        return sendSomeObservations();
    });
}

So if you have an alternative approach, I would love to hear it.
Thanks,
Best regards

This problem is fundamentally about

Lifecycle management (your [this] closure)
Backpressure handling

None of which is trivial.
But let's assume your BackendDispatchedImpl should live throughout the lifecycle of the application, (1) is fine.
Regarding looping, you need to somehow assure/test that input doesn't arrive faster then you can handle+output. As long as that's ok, your loop is ok. You will however have a thread that's blocking (sleep_for) which is non-pretty. If this is all your program is doing, leave it like that, it's fine.
But if you want a cleaner solution, consider letting an execution context do the sleeping instead, it can handle "multiple sleeps", i.e you can schedule multiple things to eventually happen on the same execution context. It is its own event loop after all. On a promise, you can:
.delay( std::chrono::seconds( 2 ) )
Have a look at tests/q/src/promise/delay.cpp
You can also break the loop if you like. It would be something like this:
// This actually sends
q::promise<> BackendDispatcherImpl::actuallySendSomeObservations();

q::promise<> BackendDispatcherImpl::scheduleSendSomeObservations()
{
    return q::with( qExecContext->queue() )
    .delay(std::chrono::seconds((2))
    .then([this](){
        actuallySendSomeObservations();
        // recurse
        if (this->shouldStop)
            return q::with(qExecContext->queue());
        return scheduleSendSomeObservations();
    });
}

FYI, it seems this is not a good approach. After all these years, finally discovered that this construction causes infinite memory increments, because it's a huge chain of promises probably, and the library for some reason keeps a little bit of memory occupied per promise.


🐛 Fix Slider internal state if value changes

fixes #2118

I can not move several of the sliders in the stories on this branch, but on the online storybook i can move them all?

I can not move several of the sliders in the stories on this branch, but on the online storybook i can move them all?

yep. The check inside the useEffect was to sloppy 😅


Fix issue #4716

Purpose
Introduce the capability for I/O APIs to fill explicit byte [], this will fix issue #4716
Goals

Change existing I/O APIs to accept a input byte [] and fill it
Reflect the changes in the relevant samples
Modify the test cases

Related PRs
This PR depends on https://github.com/ballerina-lang/ballerina/pull/5240.

Based on revised design, byte [] will not be supported from Ballerinalang. Hence it will not be implied for I/O API design. Closing the PR since this will not be applicable.


Finished investigating @shopify/react-i18n- for handling translations

Imgur

This all looks like awesome work to me, but would you just be able to provide a bit of a write-up on the things changing / being done by this PR? This seems like a huge step but I just want to be sure there's clarity.
Also, would you mind just adding "fixes #" of whichever issue this references in the body of the PR?
Seriously, though - this looks like a major addition, super exciting stuff 🚀


SlideOut and Dropdown button do not work  in first time

When I click at SlideOut or Dropdown button, a # is added at the end of the URL. They just work when I refresh the page. What should I do do solve it?

More info

Please direct support questions to Stack Overflow. It will serve as a better reference for future users.


Content Security Policy "unsafe-inline" vs. progressbar style="width"

Hi there,
could you please seek out an alternative for the style-attribute in the template? Like applying it in JS? I'd like to use this on a site with CSP style-src 'self', so now I have to modify the default template before I can use it...
Thanks!
Robert

This is going to be a hard thing to answer. I really don't want to add this line to JavaScript since this does specificly seem like something the template is meant to fix and that the style="width: 0%" is apart of the core code using within Bootstrap.
However I am going to leave this issue open and if more people feel as though they would rather have this set in JavaScript rather then a inline-style then I'll make the change.


Regular increase of DC and problems reaching HM-IP BSM Actors in actual release

Hi,
Problem occured on a system with version <IP_ADDRESS>00131 on a RPI3b+
It turned out, that some of my HM-IP BSM Light switches were not responding after a firmware upgrade from <IP_ADDRESS>91225 to <IP_ADDRESS>00131 Sometimes they reacted but with a massive delay. Most of the times they were not responding at all anymore.
Every now and then there was a sudden 100% duty cycle increase for no sane reason. I had no programs with a loop or something. Also tried to deactivate my 2 programs i had without any improvement.
The dutycycle still increased to 100% every few hours, while i permanently got communication issues with various actors that were working on version <IP_ADDRESS>91225 absolutely fine.
I resoldered my antenna connection and checked my antenna cable and everything. I re-positioned my antenna and raspberry pi which did not help too.
Then i tried a downgrade to <IP_ADDRESS>91225 and tadaaa.. everything works like a charm again.
I have no clue why. I attach a log file of the time period when the problems occured in version <IP_ADDRESS>00131
homematic-raspi-2020-02-14.log
PS: Please tell me to remove the log in case it contains sensible information. I checked and couldnt see anything problematic in it.
KR
Daniel

Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:

Go to '...'
Click on '....'
Scroll down to '....'
See error

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
System information (please complete the following information):

Version [e.g. RaspberryMatic <IP_ADDRESS>80922]
Hardware [e.g. RaspberryPi3, TinkerboardS, etc.]

Additional context
Add any other context about the problem here.

I have exactly the same issue as described by GlowFishDE.

Das Problem mit den HM-IP devices in der Version <IP_ADDRESS>00131 nehmen soweit überhand, dass ich ständig 100% DC habe. Eine Rückkehr zu <IP_ADDRESS>91225 hat das Problem beseitigt. Gerne stelle ich Log Files oder AskSinAnalyser Files zur Verfügung. Es ist aber mein Produktivsystem somit muss ich genaue Anleitungen bekommen was ich liefern muss um das Problem zu analysieren.

Tut mir leid. Aber bzgl. <IP_ADDRESS>91225 und <IP_ADDRESS>00131 hat sich definitiv nichts in der DC Behandlung geändert. Auch werden HmIP Geräte komplett im ClosedSource Teil der CCU Firmware (HmIPServer) gemanaged. Auch sind DutyCycle Problem zu >90% auf Nutzerkonfigurationsprobleme bzw. andere Probleme zurückzuführen. Ich sehe also aktuell keinen Weg das in irgendeiner weise technisch lösen/behandeln zu können. Auch betriebe ich selbst mit der  <IP_ADDRESS>00131 eine größere Installation mit HmIP Geräten und sehe keine solche DC Probleme.


Update readme with tf docs

Added a pre-commit hook that will run on every PR.
terraform-docs run on every PR and if there is an uncommitted change the pipeline will fail.
Have added the steps to install pre-commit and install the hooks as well.

Let's run terraform-docs locally as well


Support browser build for CDN

It would be great, if the package can be adapted so that https://unpkg.com/ can handle it correctly.
I tried to read how this can be achieved but I have to admit that I'm a little bit lost  were to start.

CDN should now be properly supported


Store user tags on internal-apis

This is available on internal apis now. https://github.com/lbryio/internal-apis/pull/1125


Remove Reserved library

The Reserved library contains keywords For, While, Break, Continue, End, If, Else, Elif, Else If, and Return. Using them fails with a message telling that the keyword name is reserved and some keywords also instruct how to use the actual FOR, IF, etc. syntax.
We added the library ages ago to avoid problems if new syntax is added. Now all the syntax there (and more!) has been added so there's no need to reserve anything. When we added IF in RF 4.0, we also made a decision to require all this kind of syntax to be upper case. That makes it mostly unnecessary to reserve possible new syntax because even if we'd add something like CASE, there would be no problem using keyword Case.
When this library is removed, using a keyword like Continue will continue to fail, but the error message changes from 'Continue' is a reserved keyword. to No keyword with name 'Continue' found.. With keywords containing usage instructions, like If that currently fails like 'If' is a reserved keyword. It must be an upper case 'IF' when used as a marker., the new error isn't as informative as earlier. I would say we can nowadays expect users to know that this kind of syntax must be upper case so this isn't a big deal. If we were to report such errors to users, we should detect them already at parsing time anyway to make errors easily available for IDEs and other tools using Robot's parsing modules.
A benefit of removing the Reserved library is that in some contexts the current custom error message is pretty confusing. For a concrete example, see #4297.

Instead of removing, May be we  could  simply make all of the keywords to Uppercase and keep appending newly added.

What benefits would that bring?

so technically we can't use IF anymore ?

This issue doesn't affect using IF at all. It's recognized as a control structure already by the parser and never considered a keyword. If you use If (not all caps), the error message will change as explained above. If you happen to actually have your own keyword with name If, using it will work exactly as earlier.


Remove version: OpenJS.NodeJS.LTS version 12.18.4

Replaced by another Pull Request
Microsoft Reviewers: Open in CodeFlow

https://www.github.com/microsoft/winget-pkgs/pull/143386#issuecomment-1986949152 [Policy] Needs-Author-Feedback

Close with reason: See discussion in above linked issue;


Update: SlackTechnologies.Slack version 4.10.0

- [X] Have you signed the Contributor License Agreement?

[ ] Have you checked that there aren't other open pull requests for the same manifest update/change?

[ ] Have you tested your manifest locally with winget install --manifest <path>?
[ ] Does your manifest conform to the 1.0 schema?

Microsoft Reviewers: Open in CodeFlow

For https://github.com/microsoft/winget-pkgs/issues/43160


Alphabetically sort node names when they are added to the cluster.

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
When scaling out the VMSS and the nodes proceed to join the SFX, the area appended to the end of the "Nodes" tree view instead of retaining the alphabetic sorting of the view, requiring a full page refresh to restore the storing.
Describe the solution you'd like
A clear and concise description of what you want to happen.
Is there a chance the new nodes could be auto-alphabetically sorted when they are added to the cluster?
Additional context
Add any other context or screenshots about the feature request here.

@milope  what version are you seeing this on?

@jeffj6123 7.1.458.9590 at least in SFX.


Added param for spark throughput and verbose logging.

Correct, I was simply trying to add a message in the usage notes about how to provide the connector options. I'm open to other options.

No thats fine :)


Redesign metadata and Query Builder

The Trans.QueryBuilder module is one of the main selling points of Trans. It allows easy generation of queries with conditions on translated fields, avoiding the need for joining tables or writing SQL fragments.
The Trans.QueryBuilder module uses a very naive (you may even say flawed) approach for generating and refining queries. Basically it must receive an Ecto.Queryable which will then be refined with extra conditions. This has two main flaws:

Queries must be built before being passed to the Trans.QueryBuilder module. Ideally, we want to state the conditions directly when building the query. This way we can use the functions already provided by Ecto.Query for comparisons, etc.
Trans.QueryBuilder can only add conditions to the first schema selected in the Ecto.Queryable that it receives. If you want to add conditions to a joined schema, you are out of luck.

This PR fixes those mistakes by rewriting the Trans and Trans.QueryBuilder modules. The changes are:

Convenience functions don't exist anymore. When a schema module uses Trans it will only obtain a __trans__/1 function, which provides the metadata required for Trans modules. This avoids adding extra concerns and keeps the schema modules clean.
Fields declared as translatable are now validated during compilation time. If a field declared as translatable is not present in the module's struct or schema declaration, Trans will raise an error and abort the compilation.
All functions in the Trans.QueryBuilder have been replaced by the Trans.QueryBuilder.translated/2 macro. This macro can be used directly when building an Ecto.Query and generates an SQL fragment that interoperates seamlessly with the rest of functions provided by Ecto.Query.
There is not possible anymore for customizing the name of the translation container field. Trans will always look for a translations field. I plan to add this functionality back after this update has been released and tested properly.
Improves error messages.

To Do

[x] Fix tests. Keep in mind that operator precendce rules changed between Postgres 9.4 and 9.5 or higher. We need to add parentheses around JSONB accessed to avoid troubles.
[x] Validate translatable fields
[x] Update docs
[x] Validate provided fields during query generation. The schema module can be provided to the translated/2 macro and will be used for validating if the required field is among the translatable fields.

Ready to be merged 🚀


[Script]: Detecting lines in image

Aim
Given an image, this script detects straight lines in it using Hough Line Transformation.
Details
Using cv2 library, we can find straight lines in an image by means of hough line transformation.
Record

[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSoC'23 contributor
[X] I want to work on this issue

/assign


fix: cls reset bug

:tada: This PR is included in version 1.16.8 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


fix(app): Tweak webkit dep version for CI builds

Fix AppImage building by pinning webkit dep version.

Found this fix after reviewing how gitbutler had addressed things: https://github.com/gitbutlerapp/gitbutler/issues/5282
Was previously broken here on Fedora 41 but downloading the AppImage from the artifacts from this PR is works as expected.


Feature: Add Basic Random Input Generation to CW Testing Framework

Feature
Add basic functions for random input generation.
Rationale
On the one hand, random tests have become de facto standard for any new kata and missing random tests are often reported as an issues. On the other hand, CW doesn't offer any tooling for random input creation. Random input creation can be challenging for newbies (e. g. in Python it's still relatively simple but the documentation of the random module isn't the easiest thing to read) and annoying for experienced users (as it's about writing or copying the same random input generation functions over and over again). Adding a set of basic random generation function would improve both (e.g. myjinxin2015 has a nice miniframework for JS and in Python it would be simple too :))
Examples (in Python)
def random_string(length=10, character=ascii_lowercase):
      return "".join(random.choice(chars) for _ in range(length))

def random_number(lower_bound=0, upper_bound=10):
     return random.randint(lower_bound, upper_bound)

FYI there are some randomization features for JS.
Test.randomize(array) - great if you just want to randomized the order of tests
Test.randomNumber()
Test.randomToken() - generate a string
Test.sample() - useful for predefining an array and then randomly selecting a value from it.
Also these features would be added into the cli project. I doubt I'm ever going to get to adding them in myself but its open for contributions

@jhoffner, do you have contributing guidelines for codewars-runner-cli? I'm thinking of contributing to the test framework, but worried because I have no experience with Docker. How much Docker knowledge do I need?

Little docker knowledge is needed for the most part. The readme has a bunch of info on contributing.
What were you looking to add?

I read the readme, but wasn't sure if all that setup was necessary for fixing existing code (not adding new language support).
I also didn't know where to add tests. I didn't see tests for functions you listed above in /test/runners/javascript_spec.js. If local test is not a requirement, I can start contributing sooner.

What were you looking to add?

I'm thinking of contributing to /frameworks/javascript/cw-2.js as a start and anywhere help is wanted (including other languages). For example, Test.randomNumber() is not uniform:
// in kumite Node v6.6.0
const R = Array.from({length: 101}, _ => 0);
const F = Array.from({length: 101}, _ => 0);
for (let i = 0; i < 1e7; ++i) {
  ++R[Math.round(Math.random()*100)]; // Test.randomNumber()
  ++F[Math.floor(Math.random()*101)];
}
console.log(R.map((x, i) => [i, 100*x/1e7]));
//=> [0, 0.49823],[1, 0.99786],[2, 1.00047],...,[98, 1.00617],[99, 0.99226],[100, 0.49933]
console.log(F.map((x, i) => [i, 100*x/1e7]));
//=> [0, 0.98429],[1, 0.98672],[2, 0.98790],...,[98, 0.98940],[99, 0.99204],[100, 0.99483]

For the most part you just need to:

clone the repo
install docker
run make node
edit cw-2.js and javascript_spec.js
run docker-compose run javascript_test

Thanks! Looks much easier than I thought.
One more question. Is there a reason for not using lodash for above functions? I saw lodash used for deepEquals on line 5.

Test.randomize(array) is _.shuffle(array)
Test.randomNumber() is _.random(100)
Test.sample(array) is _.sample(array)

That part of the framework was written before lodash (or any other 3rd party require) was supported.

I see :)
I've been trying to set up Docker and I was able to build the base and node image. I could not get docker-compose run javascript_test to find the test file, so I went in with bash and ran tests:

docker run --rm -it --entrypoint bash codewars/node-runner
codewarrior@c4e6efe5208e:/runner$ mocha -t 5000 test/runners/javascript_spec
58 passing (29s)

Is this ok?

Yeah you can use docker run yourself but unless you also map the volumes, you will not pick up any updates that you make. As you continue to work on improvements, I would highly suggest figuring out what is wrong so that you can get docker-compose to work - it will make your dev flow 100x better.

I couldn't figure out so I did make node each time I changed files 😑

unless you also map the volumes

Do you mean with -v option? I tried the command from README.
codewas-runner-cli$ docker run -it --rm --entrypoint bash \
        -v $(pwd)/lib:/runner/lib \
        -v $(pwd)/examples:/runner/examples \
        -v $(pwd)/frameworks:/runner/frameworks \
        -v $(pwd)/test:/runner/test \
        codewars/node-runner

codewarrior@69f26bb00ca1:/runner$ mocha -t 5000 test/runners/javascript_spec

Warning: Could not find any test files matching pattern: test/runners/javascript_spec
No test files found

codewarrior@69f26bb00ca1:/runner$ ls test # empty
codewarrior@69f26bb00ca1:/runner$ ls lib # empty
codewarrior@69f26bb00ca1:/runner$ ls frameworks # empty
codewarrior@69f26bb00ca1:/runner$ exit

docker -v # Docker version 1.12.5, build 7392c3b

I think docker-compose showed the same warning.
It worked if I used relative path (name value? in Docker doc) for host-src:
codewas-runner-cli$ docker run -it --rm --entrypoint bash \
        -v lib:/runner/lib \
        -v examples:/runner/examples \
        -v frameworks:/runner/frameworks \
        -v test:/runner/test \
        codewars/node-runner
codewarrior@568695ff452a:/runner$ ls test
# runner.js  runners
codewarrior@568695ff452a:/runner$  mocha -t 5000 test/runners/javascript_spec
#  64 passing (38s)

The container-dest must always be an absolute path such as /src/docs. The host-src can either be an absolute path or a name value. If you supply an absolute path for the host-dir, Docker bind-mounts to the path you specify. If you supply a name, Docker creates a named volume by that name.
https://docs.docker.com/engine/reference/run/#/volume-shared-filesystems

I got docker-compose run javascript_test working by changing docker-compose.yml, but I don't know what I'm doing :neutral_face:
# changed
services:
  # ...
  javascript_test:
    image: codewars/node-runner
    volumes:
      - lib:/runner/lib
      - examples:/runner/examples
      - frameworks:/runner/frameworks
      - test:/runner/test
    entrypoint: 'mocha -t 5000 test/runners/javascript_spec.js'

# added
volumes:
  lib: #
  examples: #
  frameworks: #
  test: #

I still don't know what I'm doing, but I'm guessing my problem is running old OS X and not having $HOME under /Users, so Docker can't find the path. I didn't realize this multiple layering at first.
make node is the only way I've found so far to run the tests I added. I'm going to stop investigating and consider upgrading/cleaning my system which I've been procrastinating for few years 😓
I ended up learning Docker more than I intended, but it's really cool and I'm glad I tried 😄
Thanks again for your help.

I see a nice random stuff generation library, Chance, in package.json. It's been there for 5 months but not many people know about it.

We won't be extending the custom test frameworks, but there are packages available for some languages. New package requests can be opened in https://github.com/codewars/runner


Implement word filter on public API

Stop-gap solution until @ElonMusk can blast the trolls off to Mars 🚀👋
@apai4 can you knock this out?

:wink:


missed edge case

Coverage remained the same at 59.313% when pulling 0d983bd2b5f2e0ea7fec565b70bfa8f423358236 on hosseinsh:cert-sync-endpoint-find-by-hash into da1080e0411121a641b89086d87b67e8260bdc57 on Netflix:master.


[Optimization][Frontend] The CPU of the browser tab spikes, causing the front-end page to freeze

Search before asking

[X] I had searched in the issues and found no similar optimization requirement.

Description
When operating tasks, such as opening tasks and modifying tasks, I feel that the front-end page is stuck, and the CPU usage of the tab page soars

Are you willing to submit a PR?

[ ] Yes I am willing to submit a PR!

Code of Conduct

[X] I agree to follow this project's Code of Conduct

待 1.2.0 发版后,可再次观察! 在这之前,前端状态存储系统在打开过多内容是可能导致 CPU/内存 占用过高
1.2.0 更换了前端状态存储


The output of the planner is empty.

When I instruct the planner to use Chinese, after accepting the feedback from codeinterpreter, the output of the planner is empty.
╰──● sending message to Planner
╭───< Planner >
├─► [init_plan]
│   1.
│   2.
│   3.
├─► [plan]
│   1.
│   2.
├─► [current_plan_step] 2.
├──●
│   0 100002
│   1 900001
│   .. ...
│   3 900004
│   4 900005
│
│   [5 rows x 14 columns]
╰──● sending message to User

Human   ▶  请用中文回复

╭───< Planner >
├─► [init_plan]
│   1.
│   2.
│   3.
├─► [plan]
│   1.
│   2.
├─► [current_plan_step] 2.
├──●
│   0
│   1
│   .. ...
│   3
│   4
│
│   [5
│   14 ]
╰──● sending message to User
TaskWeaver ▶
0
1
.. ...
3
4
[5
14 ]

2024-01-29 11:01:52,992 - INFO - LLM output: {"response": [{"type": "init_plan", "content": "1. \n2. \n3. "}, {"type": "plan", "content": "1. \n2. "}, {"type": "current_plan_step", "content": "2. "}, {"type": "send_to", "content": "User"}, {"type": "message", "content": "\n0 \n1 \n.. ... \n3 \n4 \n\n[5 \n14 ]"}]}

Hi, @Youning97 ! Could you provide your example query and the LLM model name you used? Thanks.

我使用的是 openai 的gpt4-1106

HI @zhangxu0307 ,
I added the legend. In addition, I modified the prompt of the planner to instruct it to reply to the user in Chinese.

Would you mind sharing the revised prompt to us? Thanks.

version: 0.1
instruction_template: |-
You are the Planner who can coordinate CodeInterpreter to finish the user task.
The characters involved in the conversation
User Character

The User's input should be the request or additional information required to complete the user's task.
The User can only talk to the Planner.
The input of the User will prefix with "User:" in the chat history.

CodeInterpreter Character
{CI_introduction}
Planner Character

Planner's role is to plan the subtasks and to instruct CodeInterpreter to resolve the request from the User.
Planner can only talk to 2 characters: the User and the CodeInterpreter.
Planner MUST NOT talk to the Planner itself.

Interactions between different characters
Conversation between Planner and User
- planner and user communicate in Chinese.

Planner receives the request from the User and decompose the request into subtasks.
Planner should respond to the User when the task is finished.
If the Planner needs additional information from the User, Planner should ask the User to provide.

planner and user communicate in Chinese.
I just added this line @zhangxu0307

I have tried other writing methods, for example: planner should reply to User in Chinese. Similar results will still occur

Also when I asked the engineer what the attendance rate was, there was something wrong with the code generated by the CI:
Human   ▶  工程师的出勤率是多少
TaskWeaver ▶ [CodeInterpreter] [thought] ProgramApe will filter the DataFrame 'attendance_data_df' for rows where the '职能' column contains the term '工程师' to identify engineers. Then, it will calculate the attendance rate based on the '在岗时长' column, considering non-null entries as days attended.
├─► [python]
│   # Filter the data for engineers
│   engineers_data = attendance_data_df[attendance_data_df['
│   # Calculate the attendance rate for engineers
│   attendance_days = engineers_data['
│   # The total number of days is the number of rows in the engineers_data DataFrame
│   total_days = len(engineers_data)
│   # The attendance rate is the number of days attended divided by the total number of days
│   attendance_rate = attendance_days / total_days
│
│   # The result is the attendance rate for engineers
│   attendance_rate
”attendance_days = engineers_data['“
Only half of the code here is generated, and the Chinese part is not displayed properly.


[WFLY-10293] IllegalStateException when instantiating CDI bean that i…

…s injected into a MDB
Issue https://issues.jboss.org/browse/WFLY-10293
I would like to ask for confirmation if this fix is desired.
I'm allowing access from mdb to cdi with user transaction.
Methods without call of userTransaction will work, methods with call of userTransactions will fail - this seems to be the correct behavior.
I'm not sure whether moving exception throw from access validation to execution is correct and doesn't have other unwanted consequences.
Thanks for submitting your Pull Request!
Please make sure your PR meets the following requirements:

[ ] Pull Request title is properly formatted: [WFLY-XYZ] Subject or WFLY-XYZ Subject
[ ] Pull Request contains link to the JIRA issue(s)
[ ] Pull Request contains description of the issue(s)
[ ] Pull Request does not include fixes for issues other than the main ticket
[ ] Attached commits represent units of work and are properly formatted

For bigger changes, major and minor component upgrades make sure your PR also meets following requirements:

[ ] Pull Request requires a change to the documentation
[ ] Documentation have been updated accordingly
[ ] Tests were added to cover changes

For new features ensure as well:

[ ] Analysis was done
[ ] Test Plan has been done
[ ] Tests were verified in advance

If you are not an active contributor of the WildFly project you can request sponsorship by one of the members to help guide you through the process.

@manovotn Please approve

I am not sure it's supposed to work. From CDI PoV, the only bit about this is in this spec part (last paragraph) which basically just refers to EE umbrella spec, which it turn refers to EJB spec :)
So maybe someone with deeper insight into EJB (@dmlloyd) could confirm whether this scenario is valid? To me it seems like it allows you to use UserTransaction outside of an EJB bean with bean manager transaction demarcation but like I said, I am not sure.

@ochaloup could you please look into this and give us some JTA expertise on whether/how this should work?

@manovotn
Test is based on user scenario, but there is no specific information about configuration, so I've created "similar" configuration.
I know (and it can be verified with change in test) that using @Inject instead of @Resource works and there is no error.
As you mentioned @TransactionManagement(TransactionManagementType.BEAN) on CDI bean it is my fault. I was trying different configurations to be sure and I've forgotten it there, I'll remove it.

As I checked this it looks fine to me. It's important to ensure the container managed and bean managed transactions are not mixed. If that's guaranteed it's fine.
As I looked into the test the failure is invoked when the UserTransaction is being tried to be invoked. As this is the EJB code I expect that not just CDI but for SLSB/SFSB it works the same.
In general it seems fine to me.


cannot access api when test page is hosted on non-80 ports

I was testing the 3.0.0-rc1 SDK on a test page hosted on localhost:8190 on my machine.
The api server is set to https://platform.ringcentral.com, but the actually request went to 'https://platform.ringcentral.com:8190'. If I explicitly change the server address to 'https://platform.ringcentral.com:443' then it works.
Reverting back to v2.0.6 would call the api server correctly.
I'll investigate into this a bit more...
Even after I changed the address to use 443 port, or if I host test site on port 80, this occurs:
FetchError {name: "FetchError", message: "200 OK", type: "system", errno: "Z_DATA_ERROR", code: "Z_DATA_ERROR"…}
Server response looks perfectly normal, but the bundled Zlib would run into errors.

Ok... This seems to be because I did not alias node-fetch with whatwg-fetch in my webpack.config.


warn_dtype_mismatch -method fails sometimes

Not easy to reproduce, but the check in warn_dtype_mismatch-method
if not left.dtypes[lo] is right.dtypes[ro]

fails sometimes. Maybe one should not use 'is', but instead '=='?
https://github.com/dask/dask/blob/master/dask/dataframe/multi.py#L371-L374

When does this arise?  No objection from me on changing the is to ==, but
it would be nice to know when this is important.
On Fri, Sep 27, 2019 at 5:56 AM JukkaKeisala<EMAIL_ADDRESS>wrote:

Not easy to reproduce, but the check in warn_dtype_mismatch-method
if not left.dtypes[lo] is right.dtypes[ro]
fails sometimes. One should not use 'is', but instead '=='.
https://github.com/dask/dask/blob/master/dask/dataframe/multi.py#L371-374
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/dask/dask/issues/5437?email_source=notifications&email_token=AACKZTCB6VRITEHXQMIE22DQLXRE7A5CNFSM4I3E5JE2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HOD5HSQ,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AACKZTACBHX2LZCVQ7QGWBTQLXRE7ANCNFSM4I3E5JEQ
.

@JukkaKeisala any response to https://github.com/dask/dask/issues/5437#issuecomment-535923484?
One problem with using == is that pandas' extension dtypes can't be safely compared to NumPy dtypes
In [4]: np.dtype('int') == pd.CategoricalDtype()
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-4-ec85c3b44381> in <module>
----> 1 np.dtype('int') == pd.CategoricalDtype()

TypeError: data type not understood

@mrocklin @TomAugspurger
This happened when tried to merge two dask dataframes. Left and right dtypes were the same in asciitable (showed in log/output). Because dtypes were the same I deduced that the error shouldn't have been raised.
Of course it is possible that the printing of asciitable hides the problem...
On my local environment I went to code and changed is to == and the warning was gone.
The main thing is how to safely compare datatypes, as @TomAugspurger said.
And the main thing, I've tried to make easy reproducable example of this but I've failed. This goes back to that that sometimes is work's as ==. This usually happens in more complicated examples, not in short exampled as far as I know.

I saw somewhere (maybe in NumPy-related stuff) that the comparison was made by using try-except to add more choices. Of course, the datatype comparison is wider topic than this case.

We could try using pandas.api.types.is_dtype_equal instead, which should be robust.
@JukkaKeisala do you have an example where this comes up? Ideally we would have a test case for it.

The following JSON data lies in web (server through REST API in my case):
'{"microsecondtimestamp": {"0":<PHONE_NUMBER>099000, "1":<PHONE_NUMBER>149000, "2":<PHONE_NUMBER>126000, "3":<PHONE_NUMBER>929000, "4":<PHONE_NUMBER>422000, "5":<PHONE_NUMBER>443000, "6":<PHONE_NUMBER>835000, "7":<PHONE_NUMBER>109000, "8":<PHONE_NUMBER>157000, "9":<PHONE_NUMBER>183000}, "values": {"0": 59.0, "1": 59.0, "2": 59.0, "3": 59.0, "4": 61.2, "5": 61.4, "6": 61.4, "7": 61.4, "8": 69.1, "9": 74.1}}'

at endpoint myendpoint/data1
and
'{"microsecondtimestamp": {"0":<PHONE_NUMBER>024000, "1":<PHONE_NUMBER>890000, "2":<PHONE_NUMBER>425000, "3":<PHONE_NUMBER>104000, "4":<PHONE_NUMBER>216000, "5":<PHONE_NUMBER>211000, "6":<PHONE_NUMBER>491000, "7":<PHONE_NUMBER>105000, "8":<PHONE_NUMBER>558000, "9":<PHONE_NUMBER>823000}, "values": {"0": 54, "1": 54, "2": 55, "3": 56, "4": 56, "5": 99, "6": 99, "7": 99, "8": 99, "9": 99}}'

at endpoint myendpoint/data2
If I run the following script on TCPServer (using TCPServer.serve_forever + parameters)
df1 = dd.read_json('myendpoint/data1', orient='columns')
df2 = dd.read_json('myendpoint/data2', orient='columns')

id1 = id(df1.dtypes['timestamp'])
id2 = id(df1.dtypes['timestamp'])

the id's are not the same but the datatypes are (i.e., ==). This is the reason why I raised this issue.
I cannot reproduce this in iPython or Jupyter Notebook.

Thanks @JukkaKeisala, that and https://github.com/numpy/numpy/issues/6295 was enough to get a reproducer
In [102]: df1 = pd.DataFrame({"a": np.array([1, 2], dtype=np.dtype(np.int64))})

In [103]: df2 = pd.DataFrame({"a": np.array([1, 2], dtype=np.dtype(np.longlong))})

In [104]: dd.multi.warn_dtype_mismatch(df1, df2, 'a', 'a')
/Users/admin/miniconda3/envs/dask-dev/lib/python3.7/site-packages/dask/dataframe/multi.py:387: UserWarning: Merging dataframes with merge column data type mismatches:
+---------------+------------+-------------+
| Merge columns | left dtype | right dtype |
+---------------+------------+-------------+
| ('a', 'a')    | int64      | int64       |
+---------------+------------+-------------+
Cast dtypes explicitly to avoid unexpected results.
  ).format(col_tb)

I don't really know what np.longlong is, but the repr is dtype('int64') for me, and the np.iinfo() looks the same. I'll see if we can use is_dtype_equal instead there.

Nice reproducer you found @TomAugspurger, I think is_dtype_equal will work here. I cannot check it for a couple of days but will do that as soon as possible.

No need. I have an open PR and the tests all passed.

On Oct 12, 2019, at 12:39 PM, JukkaKeisala<EMAIL_ADDRESS>wrote:

Nice reproducer you found @TomAugspurger, I think is_dtype_equal will work here. I cannot check it for a couple of days but will do that as soon as possible.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.


[FSharp] Utilize frozen dictionary like in C# version, make getRelated function inline

https://github.com/jinyus/related_post_gen/pull/304
Like in this PR, and also try to mark embedded function as inline
On my machine results are better (most of the time), needs testing from your end @jinyus if possible

Faster:
F# (AOT):

        Benchmark 1: ./bin/release/net8.0/aot/fsharp
        Processing time (w/o IO): 36ms
        Processing time (w/o IO): 36ms
        Processing time (w/o IO): 35ms
        Processing time (w/o IO): 36ms
        Processing time (w/o IO): 35ms
        Processing time (w/o IO): 35ms
        Processing time (w/o IO): 35ms
        Processing time (w/o IO): 35ms
        Processing time (w/o IO): 36ms
        Processing time (w/o IO): 36ms
        Processing time (w/o IO): 35ms
        Processing time (w/o IO): 36ms
        Processing time (w/o IO): 35ms
          Time (mean ± σ):     767.4 ms ±   6.9 ms    [User: 745.4 ms, System: 79.8 ms]
          Range (min … max):   761.1 ms … 785.8 ms    10 runs

F# (AOT):

        Benchmark 1: ./bin/release/net8.0/aot/fsharp
        Processing time (w/o IO): 529ms
        Processing time (w/o IO): 528ms
        Processing time (w/o IO): 528ms
          Time (mean ± σ):      3.762 s ±  0.002 s    [User: 3.682 s, System: 0.259 s]
          Range (min … max):    3.761 s …  3.764 s    2 runs

F# (AOT):

        Benchmark 1: ./bin/release/net8.0/aot/fsharp
        Processing time (w/o IO): 4671ms
        Processing time (w/o IO): 4693ms
        Processing time (w/o IO): 4685ms
          Time (mean ± σ):     17.794 s ±  0.106 s    [User: 19.096 s, System: 0.637 s]
          Range (min … max):   17.719 s … 17.869 s    2 runs


Fix bugs that appeared on sonarqube

this two bugs https://sunfyre.wizeline.io/project/issues?id=project-lab&resolved=false&sinceLeakPeriod=false&types=BUG


Create DataFrame from list of rows where each row is Map

Hi guys,
it would be nice to add a method for creating a DataFrame from a list of rows represented as general Maps. Right now when I do:
val rows : List<Map<String, Any?>>

val df = rows.toDataFrame()

I get a wired result - DataFrame with columns obtained from the properties of Map class. But it is more intuitive to get a DataFrame with columns obtained from the keys of Maps. Does it make sense for you?

Does this map only have primitive values? I'm asking because in that case we can simply create an overload for List<Map<String, Any?>>. But if you need to convert objects inside this Map into dataframe structures, then Map class should be supported as a special case in existing Iterable<*>.toDataFrame()

I am not sure that I got your question. Map values can have arbitrary type (same for each Map of iterable). For example, suppose I have a list (or any other iterable) of maps with the following structure:
{
    "col1" -> String,
    "col2" -> Double,
    "col3" -> MyEnum
}

then from the rows.toDataFrame() I would expect to obtain AnyFrame with the columns col1 of type String, col2 of type Double etc. Does it sound meaningful?

Yes. Let me clarify the question. If you have col4 in your map with the type class Name(val firstName: String, val lastName: String), we can convert it in two ways:

To DataColumn<Name>
To ColumnGroup  with 2 columns, firstName and lastName (it's like Iterable<*>.toDataFrame(depth = 2) would work for classes)
Do you need 1 or 2?

Thank you for clarification, now I see! I need option 1, and generally I feel that it is more natural here.

@PoslavskySV
Till the team implements the proper solution you can use this extension function:
fun List<Map<String, Any>>.toDataFrame(): AnyFrame {
val columns: MutableMap<String, MutableList<Any?>> = mutableMapOf()
val notNullCols: MutableSet = mutableSetOf()
val columnSize=this.size
this.forEachIndexed{ ri,row ->
    run {

        row.keys.forEach { col ->
            run {
                if (columns[col] == null) {
                    columns[col] = mutableListOf()
                }

                val value=if (row[col].let { it is String && it.isEmpty() }) null else row[col]
                if(value!=null)  notNullCols.add(col)

                while(columns[col]!!.size<ri) columns[col]!!.add(null)

                columns[col]!!.add(value)

            }
        }
    }
}

return columns.filter { it.value.isNotEmpty() }.filter { notNullCols.contains(it.key) }.map{ while(it.value.size<columnSize) {it.value.add(null)};it }.map { DataColumn.create(it.key ,it.value,infer = Infer.Type)  }.toDataFrame()

}

@ian-k I took the liberty of refactoring your example a bit so it's clearer how it works :). Thanks for sharing!

What is the work required to close this issue?  Is it just to include the extension function above in the library somewhere?  Looking for a couple of 'good first issue' tickets to contribute to.


Add high-level interface for java sdk

Signed-off-by: nishuihan<EMAIL_ADDRESS>
What this PR does / why we need it:
Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #
Special notes for your reviewer:
Release note:

Code have been moved to branch libsdk-hl-dev.


Update to reflect new Public IP option for SQL Database Managed Instance

This text should be updated: “ 2 - Azure SQL Database Managed Instance is supported. Because a managed instance runs within Azure VNet with a private IP address, an On-premises Data Gateway is required.”

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

ID: ea45d88b-212b-51ae-b902-6efd5873f6c5
Version Independent ID: 6f86e171-7553-3d01-00fa-e0865d8d817b
Content: Data sources supported in Azure Analysis Services
Content Source: articles/analysis-services/analysis-services-datasource.md
Service: azure-analysis-services
GitHub Login: @Minewiskan
Microsoft Alias: owend

@algattik Thanks for the feedback! I have assigned the issue to the content author to review further and update the document as appropriate.

@algattik - Thanks for your suggestion. While this scenario is currently supported with Power BI, it is not yet supported with Analysis Services. I added another sentence to the footnote making this more clear. We will update once a solution is in place.
#please-close


could not launch process fork/exec ... is not a valid Win32 application

could not launch process fork/exec ... is not a valid Win32 application

Did you try to use python executable before your script?
 websocketd --port=8080 python path/to/script

您是否尝试在脚本之前使用 python 可执行文件？
 websocketd --port=8080 python path\to\script

牛呀


date-fns and react are included as dependencies for people only using the core package

I recently added a lightning time clock react hook as part of a sub-package @purduehackers/time, called @purduehackers/time/react. This package requires react, @types/react, and date-fns.
I didn't think before merging and I accidentally made it so that users only using the core package @purduehackers/time now have these three dependencies added to their bundle. It's baaaad that this package now forces people to install React when they just want to convert to lightning time 😭

#20 somehow introduced hard links, which prevented it from being published to npm :(


Fix error handling in scanner in case of OOM

This patch fixes #3786 and fixes #3788.
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik<EMAIL_ADDRESS>

The patch is updated. The related testcases in the issues cannot be added since there is no way to ensure that the OOM happens in the scanner not elsewhere in the engine.

@zherczeg Thanks for the review, the PR is updated.

I have been thinking about an alternative for this patch, which does not require a separate free function.
It would look like this:
PARSER_CATCH
{
  while (scanner_context.active_binding_list_p != NULL) ...

  if (JERRY_LIKELY (context_p->error != PARSER_ERR_OUT_OF_MEMORY))
  {
    context_p->error = PARSER_ERR_NO_ERROR;

    PARSER_TRY (context_p->try_buffer)
    {
      ...
    }
    PARSER_CATCH
    {
      JERRY_ASSERT (context_p->error == PARSER_ERR_OUT_OF_MEMORY);
    }
  }

  JERRY_ASSERT (context_p->error == PARSER_ERR_NO_ERROR || context_p->error == PARSER_ERR_OUT_OF_MEMORY);

  if (JERRY_UNLIKELY (context_p->error == PARSER_ERR_OUT_OF_MEMORY))
  {
      release...
      parser_stack_free (context_p);
      return;
  }
}

What do you think? I can do it in a separate patch if you wish.

+1 for the separate patch!

@zherczeg I've updated the PR with the suggested code above.


Azure SQL Data Warehouse Does Not Support Query Store

The following link shows that Azure SQLDW supports Query Store.  This is not accurate.
https://docs.microsoft.com/en-us/sql/relational-databases/performance/monitoring-performance-by-using-the-query-store?view=sql-server-2017

@pmasl can you review?

@JohnMiner3 - thank you for this submission - we're reviewing it.


Filter sourceTypes by enabled

Fix #150

Thanks. Now we could remove the filter function from the settings component's template as it is unneccessary.


Fix errors and warnings building swift/SIL on Windows using MSVC

Various control path warnings
Various deleted function errors
Various sign warnings
Various function argument missing warnings
Relies on apple/swift-llvm#33 but PRs can be merged in any order

@jckarter PTAL if you have time and are not on holiday. I don't think I should add llvm_unreachable to the deleted methods here, as I'm fairly sure MSVC would call them, resulting in assertions when the code is executed

@swift-ci Please smoke test

@jckarter Does this LGTM?

I need to add an enable_if to a generic copy constructor to fix an MSVC warning that I've silenced. I think considering this PR has been around for a while and is decently large, it would be good to get this merged in, and then I can deal with the MSVC warning in another PR. It also keeps getting merge conflicts, so would be good to stop having to deal with that!

I think we should avoid conditionals where possible by consolidating the repeated cases into compatibility macros. Other than that, LGTM.

@hughbe Do you mind making the cleanup suggested by @jckarter in a separate patch?

Fine by me thanks for getting this in


fix the bug that modify the diff order to reuse dom in patching  accurately

Meanwhile modify code to suit for JavaScript standard.


In the new version, the address already includes the port number

for _, s := range ss {
address := s.Service.Address
if s.Service.Address == "" {
address = s.Node.Address
}
ee = append(ee, fmt.Sprintf("%s:%d", address, s.Service.Port))
}

Updated. Please conside to update the library. If issue stay please reopen


Combine a requests cache example missing a ')'

IMPORTANT
Read and follow these instructions carefully. Help us help you.
Are you up-to-date?
Upgrade to the latest version and confirm the issue/bug is still there.
$ pip install yfinance --upgrade --no-cache-dir
Confirm by running:
import yfinance as yf ; print(yf.__version__)
and comparing against PIP.
Does Yahoo actually have the data?
Are you spelling symbol exactly same as Yahoo?
Then visit finance.yahoo.com and confirm they have the data you want. Maybe your symbol was delisted, or your expectations of yfinance are wrong.
Are you spamming Yahoo?
Yahoo Finance free service has rate-limiting depending on request type - roughly 60/minute for prices, 10/minute for info. Once limit hit, Yahoo can delay, block, or return bad data -> not a yfinance bug.
Still think it's a bug?
Delete these instructions and replace with your bug report, providing the following as best you can:

Simple code that reproduces your problem, that we can copy-paste-run.
Run code with debug logging enabled and post the full output.
If you think yfinance returning bad data, give us proof.
yfinance version and Python version.
Operating system type.

You are missing a ')' in your example. It should read
class CachedLimiterSession(CacheMixin, LimiterMixin, Session):
pass
session = CachedLimiterSession(
limiter=Limiter(RequestRate(2, Duration.SECOND*5)),  # max 2 requests per 5 seconds
bucket_class=MemoryQueueBucket,
backend=SQLiteCache("yfinance.cache"),
)
ticker = yf.Ticker("WMT", session=session)
#print(ticker.info)`
Also, the example seems a bit complicated. Couldn't you do it with:
from ratelimiter import RateLimiter
@RateLimiter(max_calls=10, period=1)
def do_something():
pass

Basically a duplicate of #1545 but that person has disappeared, so feel free to submit another pull request.

Fixed by #1545


Performance Issues with Html.DisplayFor()

Default project scaffolding for "List" views will result in a scaffolded display that will use your model with Html.DisplayFor() being used to output each of the individual values on the view.  An example of one of these is below.

    @foreach (var item in Model)
{

                @Html.DisplayFor(modelItem => item.RegionName)

                @Html.DisplayFor(modelItem => item.RegionDescription)

                @Html.DisplayFor(modelItem => item.BranchCount)

                <a asp-controller="Region" asp-action="Edit"<EMAIL_ADDRESS>class="btn btn-primary">Edit

}

This example was pulled from a simple ViewModel that contained 4 properties, an int RegionId and BranchCount, as well as two string fields, max length of 250 chars.
Removing all other factors, including EF queries, if this view was rendered using the scaffolded code with 150-200 records the UI render was taking between 2.3 and 4.5 seconds to complete.  Changing the view display process to simply have the following layout, resulted in near instant rendering of the UI.

    @foreach (var item in Model)
{

                @item.RegionName

                @item.RegionDescription

                @item.BranchCount

                <a asp-controller="Region" asp-action="Edit"<EMAIL_ADDRESS>class="btn btn-primary">Edit

}

Initial diagnostic validation appear to show that the lookup of the display template when using DisplayFor might not be cached.
Environment Information
Initially confirmed using a .NET Core 1.1 application, validated as still an issue with a test project using .NET Core 2.0.  VS 2017 15.3 was used for all development.
Issue was still apparent when published in release mode and deployed to a server as well.

@mitchelsellers thanks for the report. This definitely sounds quite slow.
@pranavkm - can you profile this at least in 2.0 and see where the slowdown is? I would have thought that just about everything is super-duper cached, so rendering a total of ~1000 fields w/ DisplayFor should not take 2 - 4 seconds...

I'm seeing pretty large performance changes from a similar change to my own project using .Net Core 2.0, though not as bad as 2-4 seconds for 100 fields.
Using DisplayFor with around 1400 fields has a ~1.4s response time from the server for the full render, and using Razer inline syntax is ~300ms.
Not sure if that could be caching or what, I tried running a profiler against it and it wasn't particularly helpful other than pointing out that 50% of the CPU time was being spent inside the Html.DisplayFor method. I would not have expected such a method to be a huge performance hit.

Just another update on this from my side as well.  I see similar results to what @Xeio reported, it is "better" but still very, very poor performance.
I also tried to profile but didn't get very far.

I see the same issue using DisplayFor in an MVC project under .Net Framework (4.5.2).  The EF query completes and I have my enumerated collection for the view in less than a ms, yet when using DisplayFor the view takes about 6 seconds to render (2000 records containing 7 fields).  Worse, subsequent reloads of the page can result in out of memory exceptions occurring.  I also tried an overload, specifying which display template to use but the result was the same.
Changing the view to simply display the values as @mitchelsellers did results in near instant page loads and no exceptions.

@pranavkm, can you please look into this? Thanks

I think @rynowak might have some investigating in to some of this already - see https://github.com/aspnet/Mvc/issues/6111. I'll sync up with next week to see if there's something actionable we could do for preview2

@pranavkm, please work with @rynowak to get costs for this one.

Pushed this out to 2.2.0.

This is concerning. Would be good to get this looked at sooner rather than later given the related report is a year old now.

I ran into this today -- not sure if it's helpful, but I thought I'd add that when dealing with child objects the penalty is a significant problem.
Default scaffolded code = 20 seconds to display 250 records.  Example:
@Html.DisplayFor(modelItem => item.Project.Id)
Eliminate access of child object = 1.5 seconds.  Example:
@Html.DisplayFor(modelItem => item.ProjectId)
Eliminate @Html.DisplayFor instead = 80 milliseconds.  Example:
@item.Project.Id
This is using .NET Core 2.0. VS 2017 15.3

I tried this scenario with a new ASP.NET Core 2.0 & 2.1 MVC template based project and wasn't seeing the slowness being described here. I tried with 500 - 1500 records. Just to be sure, could any of you give us a simple repro project? Even better, if you could share the Perf profile results of what you are seeing.

I would have to create a new sample for you given that this was a while back that I had this issue.  I can try to whip something up, but really it was nothing more than the initial example and comparing rendering times of both methods using the same data retrieval process.

After submitting my last post I played around a bit more, and I found the 20 second penalty was only associated with nullable properties.  So for example in my class I have int? ProjectId, and accessing item.Project.Id via @Html.DisplayFor is incredibly slow.  I also have a non-nullable int ActivityId, and accessing item.Activity.Id does not result in a 20 second delay via @Html.DisplayFor.
In my case ProjectId is null probably 80% of the time.  I didn't think to test to see what would happen if it was only null 10% of the time, and I'm not in a position where I can test that right now.
So if you try again and still can't replicate the results with nullable properties let me know and I can probably put a new demo project together later tonight.

Ah @rickparrish great observation, in my example one of the properties was a nullable int as well.

Sorry but I am still unable to see the kind of delay you guys are seeing. I have shared my repro project over here: https://github.com/kichalla/DisplayForSlow (Main files: CustomersController, View)
You can take a look at it and see if I am missing anything.
Could you give us more details about the kind of environment where you are seeing this? like OS, Debug/Release, Kestrel/IIS, if inside a container, like Docker etc.

Thanks for the starter project.  I don't have 2.1 installed so I downgraded to 2.0 and your project did not have the noticeable delay I experienced.  (The Address class was missing, so based on your code I added one with a nullable Zipcode.)
This wasn't quite the same setup as me though -- in your case a Customer always has an Address, but sometimes the Address does not have a Zipcode.  In my case it's more like my Customers only have an Address 20% of the time, so I modified your project by adding a new property that I only populate 20% of the time, and now I'm experiencing the slowness.
In the Index.cshtml file I've added a couple comments indicating how each of the options perform.
https://github.com/rickparrish/DisplayForSlow
Index.cshtml comments

The underlying issue seems to be https://github.com/aspnet/Mvc/issues/6928. Resolving the value for each of @Html.DisplayFor(modelItem => item.TestNullable.Name) results in a null ref (TestNullable is intended to be always null) and consequently, Mvc is try-catching 500 null refs (the sample is looping over a set of 500 items) which adds up. Using a bespoke @item.TestNullable?.Name doesn't have this issue. We've taken stabs at this in the past (https://github.com/aspnet/Mvc/pull/7181) without getting too far.
@rickparrish  to answer your code comment , DisplayFor and EditorFor do a lot more work than writing an object out, so it's expected to be slower. However, I agree, 10+ seconds makes it pretty unusable.
cc @rynowak \ @dougbu since you have more context.

I thought the decision before was to try and fix the common cases of #6928 even though we'd never be able to solve all of them.

@mkArtakMSFT  here's my suggestion for the issue:

Revive #6298 for 2.2.0
consider taking PR https://github.com/aspnet/Mvc/pull/7181 as is (assuming there's enough test coverage). There's also https://github.com/aspnet/Mvc/pull/7395 that we could consider in addition that touches some of these common areas.
File a separate issue to track additional scenarios listed in https://github.com/aspnet/Mvc/pull/7181#issuecomment-362754479

It's a fairly small amount of work to do to address some very common scenarios.

@pranavkm when we decided not to take #7181, it led to large numbers of test failures. IOW it wasn't ready. The following comment in https://github.com/aspnet/Mvc/pull/7181#issuecomment-362754479 also means #7181 undoes an existing optimization.

the existing captured local variable case doesn't work together with the new rewriter

#7395 appears to have significant correctness issues. It assumes the only property on a view is Model.
And, no, we don't have enough test coverage of this area.
That said, would likely be beneficial to spend some time to rewrite Linq expressions to use ?. / ?[-equivalent nodes or to skip evaluation when Model == null and the expression is m => m, m => Model.Property and similar. My main point is that work should start from scratch.

Tracking further work using https://github.com/aspnet/Mvc/issues/6928

@pranavkm we normally close a later issue as a duplicate of an earlier report. Your choice here reverses that. Suggest keeping this issue open instead. (It also contains more details about user scenarios where performance issues are visible.)


Issue #327: Make reader offline idempotent

Signed-off-by: Tom Kaitchuck<EMAIL_ADDRESS>Change log description
Make reader offline idempotent
Purpose of the change
Fixes #327
What the code does
If reader offline is called and the reader is already offline no update is performed.

Codecov Report

Merging #333 (ebc8842) into master (385ad86) will decrease coverage by 9.23%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #333      +/-   ##
==========================================
- Coverage   75.09%   65.86%   -9.24%
==========================================
  Files          47       46       -1
  Lines       11629    11034     -595
==========================================
- Hits         8733     7267    -1466
- Misses       2896     3767     +871

Impacted Files
Coverage Δ

src/event/reader_group_state.rs
86.81% <100.00%> (+0.17%)
:arrow_up:

wire_protocol/src/wire_commands.rs
40.86% <0.00%> (-49.60%)
:arrow_down:

wire_protocol/src/commands.rs
31.90% <0.00%> (-47.77%)
:arrow_down:

wire_protocol/src/error.rs
17.94% <0.00%> (-12.83%)
:arrow_down:

wire_protocol/src/connection_factory.rs
71.42% <0.00%> (-5.55%)
:arrow_down:

wire_protocol/src/mock_connection.rs
72.34% <0.00%> (-2.21%)
:arrow_down:

wire_protocol/src/client_connection.rs
89.74% <0.00%> (-1.66%)
:arrow_down:

src/segment/reader.rs
68.70% <0.00%> (-0.26%)
:arrow_down:

wire_protocol/src/tests.rs


Problem: Build error on Amiga / Amiga clones.

Solution: Add missing headers.

Codecov Report

Merging #4603 into master will increase coverage by <.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #4603      +/-   ##
==========================================
+ Coverage   80.85%   80.86%   +<.01%
==========================================
  Files         111      111
  Lines      144776   144776
==========================================
+ Hits       117065   117066       +1
+ Misses      27711    27710       -1

Impacted Files
Coverage Δ

src/if_xcmdsrv.c
83.48% <0%> (-0.72%)
:arrow_down:

src/ex_cmds.c
82.18% <0%> (-0.1%)
:arrow_down:

src/message.c
76.89% <0%> (+0.04%)
:arrow_up:

src/gui.c
57.9% <0%> (+0.05%)
:arrow_up:

src/channel.c
83.94% <0%> (+0.07%)
:arrow_up:

src/gui_gtk_x11.c
48.91% <0%> (+0.14%)
:arrow_up:

src/gui_beval.c
62.93% <0%> (+0.43%)
:arrow_up:

Continue to review full report at Codecov.

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


bug(md_in_html): “markdown="1"” isn’t removed in child elements of the “li” tag

1. Summary
If I use HTML tags with “markdown="1"” in child elements of the
 tag, Python Markdown successfully converts Markdown to HTML but doesn’t remove markdown="1" — the attribute, non-valid in production HTML.
It looks like a bug. I didn’t find in the documentation for the “Markdown in HTML” plugin why my syntax is incorrect.
2. MCVE
2.1. KiraDivInsideList.md

**This is a Markdown**

1. Kira first list item

**This is also Markdown**

1. Kira second list item

2.2. Command
python -m markdown -x markdown.extensions.md_in_html KiraDivInsideList.md

2.3. Behavior
2.3.1. Expected

This is a Markdown

Kira first list item

This is also Markdown

Kira second list item

2.3.2. Actual
For the first
 Python Markdown remove markdown="1", but for my
 inside
, markdown="1" still remains.

This is a Markdown

Kira first list item

-

This is also Markdown

+

This is also Markdown

Kira second list item

3. Validity

 can contain any element that is valid in . I haven’t found reasons why I can’t use
 with a custom class inside
 as in my example.
4. Environment

Microsoft Windows 11 [Version 10.0.22621.2861]
Python 3.12.0
Python Markdown 3.5.1

Thanks.

If I recall, @waylan  has specifically stated in the past that md_in_html is mainly meant for root level HTML. That means HTML nested in indented constructs, such as lists are not expected to work.
With that said, I do wish they did work. As an alternative, you can use the pymdownx.blocks.html extension:
import markdown

MD = """
/// html | div.KiraCustomClass
**This is a Markdown**
///

1. Kira first list item

    /// html | div.KiraCustomClass
    **This is also Markdown**
    ///

1. Kira second list item
"""

html = markdown.markdown(
    MD,
    extensions=['pymdownx.blocks.html']
)

print(html)

This is a Markdown

Kira first list item

This is also Markdown

Kira second list item

Status: RESOLVED :heavy_check_mark:
I get expected behavior for MCVE and real examples when I use pymdownx.blocks.html instead of md_in_html.
Thanks.

Type: Documentation changes 📜

has specifically stated in the past that md_in_html is mainly meant for root level HTML. That means HTML nested in indented constructs, such as lists are not expected to work.

If so, I think it would be a nice to add this to the md_in_html documentation to prevent users from trying to use md_in_html not for root level HTML. I also think it would be nice to add to the documentation why md_in_html meant for root level HTML. Users like me may not understand why this was intended.
Thanks.

The reason for this behavior is based on the original Markdown rules, which state in part (emphasis added):

The only restrictions are that block-level HTML elements — e.g.
,
,
,
, etc. — must be separated from surrounding content by blank lines, and the start and end tags of the block should not be indented with tabs or spaces.

The md-in-html extension relies on the standard rules for identifying what is considered a "block-level" element. If you want to diverge from the standard rules, then you need to look at third-party extensions.


Operate on currently checked out branch

Currently runs against master only.

Fixed, works on currently checked out branch.