latest main crash with heap-buffer-overflow (2023-08-16)

Hi @stephenberry
I had the same crash as before, the same place, why do you insist not checking the 0 index issue? It really crashes again and again, even though it was not easy to reproduce.
The crash point: glaze/util/dump.hpp:38:16
   ...

   template <char c>
   GLZ_ALWAYS_INLINE void dump(vector_like auto& b, auto&& ix) noexcept
   {
      if (ix == b.size()) [[unlikely]] {
         b.resize(b.size() * 2);
      }

      using V = std::decay_t<decltype(b[0])>;
      if constexpr (std::same_as<V, char>) {
         b[ix] = c; // <--------------------------------------  HERE, if ix or b.size() is zero????
      }
      else {
         b[ix] = static_cast<V>(c);
      }
      ++ix;
   }

  ...

The backtrace
==2967418==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x612004603641 at pc 0x560583260a6b bp 0x7f83638f3fd0 sp 0x7f83638f3fc8
WRITE of size 1 at 0x612004603641 thread T2
    #0 0x560583260a6a in void glz::detail::dump<(char)44, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, unsigned long&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long&) /home/swei/quant/trade/ctp/../core/include/glaze/util/dump.hpp:38:16
    #1 0x560583426a50 in void glz::detail::write_entry_separator<glz::opts{10u, false, true, true, true, false, (char)32, (unsigned char)3, false, true}, glz::context&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long&>(glz::context&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long&) /home/swei/quant/trade/core/include/glaze/json/write.hpp:326:10
    #2 0x5605839ac80b in auto void glz::detail::to_json<core::QuoteData>::op<glz::opts{10u, false, true, true, true, false, (char)32, (unsigned char)3, false, true}, core::QuoteData&, glz::context&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long&>(core::QuoteData&, glz::context&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long&)::'lambda'(auto)::operator()<std::integral_constant<unsigned long, 13ul>>(auto) const /home/swei/quant/trade/core/include/glaze/json/write.hpp:908:22
    #3 0x5605839a9d04 in auto auto glz::for_each<18ul, void glz::detail::to_json<core::QuoteData>::op<glz::opts{10u, false, true, true, true, false, (char)32, (unsigned char)3, false, true}, core::QuoteData&, glz::context&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long&>(core::QuoteData&, glz::context&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long&)::'lambda'(auto)>(core::QuoteData&)::'lambda'(auto&&...)::operator()<std::integral_constant<unsigned long, 0ul>, std::integral_constant<unsigned long, 1ul>, std::integral_constant<unsigned long, 2ul>, std::integral_constant<unsigned long, 3ul>, std::integral_constant<unsigned long, 4ul>, std::integral_constant<unsigned long, 5ul>, std::integral_constant<unsigned long, 6ul>, std::integral_constant<unsigned long, 7ul>, std::integral_constant<unsigned long, 8ul>, std::integral_constant<unsigned long, 9ul>, std::integral_constant<unsigned long, 10ul>, std::integral_constant<unsigned long, 11ul>, std::integral_constant<unsigned long, 12ul>, std::integral_constant<unsigned long, 13ul>, std::integral_constant<unsigned long, 14ul>, std::integral_constant<unsigned long, 15ul>, std::integral_constant<unsigned long, 16ul>, std::integral_constant<unsigned long, 17ul>>(auto&&...) const /home/swei/quant/trade/core/include/glaze/util/for_each.hpp:30:47
    #4 0x5605839a98ef in decltype(auto) auto glz::indexer<void, 0ul, 1ul, 2ul, 3ul, 4ul, 5ul, 6ul, 7ul, 8ul, 9ul, 10ul, 11ul, 12ul, 13ul, 14ul, 15ul, 16ul, 17ul>(std::integer_sequence<unsigned long, 0ul, 1ul, 2ul, 3ul, 4ul, 5ul, 6ul, 7ul, 8ul, 9ul, 10ul, 11ul, 12ul, 13ul, 14ul, 15ul, 16ul, 17ul>)::'lambda'(auto&&)::operator()<auto glz::for_each<18ul, void glz::detail::to_json<core::QuoteData>::op<glz::opts{10u, false, true, true, true, false, (char)32, (unsigned char)3, false, true}, core::QuoteData&, glz::context&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long&>(core::QuoteData&, glz::context&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long&)::'lambda'(auto)>(core::QuoteData&)::'lambda'(auto&&...)>(auto&&) const /home/swei/quant/trade/core/include/glaze/util/for_each.hpp:14:17
    #5 0x5605839a95b9 in auto glz::for_each<18ul, void glz::detail::to_json<core::QuoteData>::op<glz::opts{10u, false, true, true, true, false, (char)32, (unsigned char)3, false, true}, core::QuoteData&, glz::context&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long&>(core::QuoteData&, glz::context&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long&)::'lambda'(auto)>(core::QuoteData&) /home/swei/quant/trade/core/include/glaze/util/for_each.hpp:30:14
    #6 0x5605839a93f6 in void glz::detail::to_json<core::QuoteData>::op<glz::opts{10u, false, true, true, true, false, (char)32, (unsigned char)3, false, true}, core::QuoteData&, glz::context&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long&>(core::QuoteData&, glz::context&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long&) /home/swei/quant/trade/core/include/glaze/json/write.hpp:872:13
    #7 0x5605839a90dc in void glz::detail::write<10u>::op<glz::opts{10u, false, true, true, true, false, (char)32, (unsigned char)3, false, true}, core::QuoteData&, glz::context&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long&>(core::QuoteData&, glz::context&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long&) /home/swei/quant/trade/core/include/glaze/json/write.hpp:33:13
    #8 0x5605839a8123 in auto void glz::detail::to_json<core::rpc::request_t<core::QuoteData>>::op<glz::opts{10u, false, true, true, true, false, (char)32, (unsigned char)3, false, true}, core::rpc::request_t<core::QuoteData>&, glz::context&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long&>(core::rpc::request_t<core::QuoteData>&, glz::context&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long&)::'lambda'(auto)::operator()<std::integral_constant<unsigned long, 3ul>>(auto) const /home/swei/quant/trade/core/include/glaze/json/write.hpp:939:19
    #9 0x5605839a7287 in auto auto glz::for_each<4ul, void glz::detail::to_json<core::rpc::request_t<core::QuoteData>>::op<glz::opts{10u, false, true, true, true, false, (char)32, (unsigned char)3, false, true}, core::rpc::request_t<core::QuoteData>&, glz::context&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long&>(core::rpc::request_t<core::QuoteData>&, glz::context&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long&)::'lambda'(auto)>(core::rpc::request_t<core::QuoteData>&)::'lambda'(auto&&...)::operator()<std::integral_constant<unsigned long, 0ul>, std::integral_constant<unsigned long, 1ul>, std::integral_constant<unsigned long, 2ul>, std::integral_constant<unsigned long, 3ul>>(auto&&...) const /home/swei/quant/trade/core/include/glaze/util/for_each.hpp:30:47
    #10 0x5605839a7128 in decltype(auto) auto glz::indexer<void, 0ul, 1ul, 2ul, 3ul>(std::integer_sequence<unsigned long, 0ul, 1ul, 2ul, 3ul>)::'lambda'(auto&&)::operator()<auto glz::for_each<4ul, void glz::detail::to_json<core::rpc::request_t<core::QuoteData>>::op<glz::opts{10u, false, true, true, true, false, (char)32, (unsigned char)3, false, true}, core::rpc::request_t<core::QuoteData>&, glz::context&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long&>(core::rpc::request_t<core::QuoteData>&, glz::context&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long&)::'lambda'(auto)>(core::rpc::request_t<core::QuoteData>&)::'lambda'(auto&&...)>(auto&&) const /home/swei/quant/trade/core/include/glaze/util/for_each.hpp:14:17
    #11 0x5605839a6fa9 in auto glz::for_each<4ul, void glz::detail::to_json<core::rpc::request_t<core::QuoteData>>::op<glz::opts{10u, false, true, true, true, false, (char)32, (unsigned char)3, false, true}, core::rpc::request_t<core::QuoteData>&, glz::context&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long&>(core::rpc::request_t<core::QuoteData>&, glz::context&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long&)::'lambda'(auto)>(core::rpc::request_t<core::QuoteData>&) /home/swei/quant/trade/core/include/glaze/util/for_each.hpp:30:14
    #12 0x5605839a6de6 in void glz::detail::to_json<core::rpc::request_t<core::QuoteData>>::op<glz::opts{10u, false, true, true, true, false, (char)32, (unsigned char)3, false, true}, core::rpc::request_t<core::QuoteData>&, glz::context&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long&>(core::rpc::request_t<core::QuoteData>&, glz::context&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long&) /home/swei/quant/trade/core/include/glaze/json/write.hpp:872:13
    #13 0x5605839a6b3c in void glz::detail::write<10u>::op<glz::opts{10u, false, true, true, true, false, (char)32, (unsigned char)3, false, true}, core::rpc::request_t<core::QuoteData>&, glz::context&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long&>(core::rpc::request_t<core::QuoteData>&, glz::context&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long&) /home/swei/quant/trade/core/include/glaze/json/write.hpp:33:13
    #14 0x5605839a6a61 in void glz::write<glz::opts{10u, false, true, true, true, false, (char)32, (unsigned char)3, false, true}, core::rpc::request_t<core::QuoteData>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, glz::context&>(core::rpc::request_t<core::QuoteData>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, glz::context&) /home/swei/quant/trade/core/include/glaze/core/write.hpp:40:7
    #15 0x5605839a68ab in void glz::write<glz::opts{10u, false, true, true, true, false, (char)32, (unsigned char)3, false, true}, core::rpc::request_t<core::QuoteData>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(core::rpc::request_t<core::QuoteData>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) /home/swei/quant/trade/core/include/glaze/core/write.hpp:50:7
    #16 0x56058399f97c in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>& json::write<core::rpc::request_t<core::QuoteData>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(core::rpc::request_t<core::QuoteData>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) /home/swei/quant/trade/core/include/core/json.hpp:86:5
    #17 0x560583999116 in DataHub::send_quote(core::Pod&) /home/swei/quant/trade/core/src/datahub.cpp:222:5
    #18 0x560583998eac in DataHub::process(core::Pod&) /home/swei/quant/trade/core/src/datahub.cpp:185:9
    #19 0x560583998c29 in DataHub::main() /home/swei/quant/trade/core/src/datahub.cpp:167:13
...

I have to revert the fix
diff --git a/include/glaze/util/dump.hpp b/include/glaze/util/dump.hpp
index 3f01592..6f73634 100644
--- a/include/glaze/util/dump.hpp
+++ b/include/glaze/util/dump.hpp
@@ -12,8 +12,8 @@ namespace glz::detail
 {
    GLZ_ALWAYS_INLINE void dump(const char c, vector_like auto& b, auto&& ix) noexcept
    {
-      if (ix == b.size()) [[unlikely]] {
-         b.resize(b.size() * 2);
+      if (ix >= b.size()) [[unlikely]] {
+         b.resize((ix + 1) * 2);
       }

       b[ix] = c;
@@ -29,8 +29,8 @@ namespace glz::detail
    template <char c>
    GLZ_ALWAYS_INLINE void dump(vector_like auto& b, auto&& ix) noexcept
    {
-      if (ix == b.size()) [[unlikely]] {
-         b.resize(b.size() * 2);
+      if (ix >= b.size()) [[unlikely]] {
+         b.resize((ix + 1) * 2);
       }

       using V = std::decay_t<decltype(b[0])>;

@sweihub I'm sorry for this bug you're seeing. The reason I haven't made your fix is that this may be indicative of a deeper issue that I'd like to fix, and if I just throw on this change then it could hide a deeper problem.
Nevertheless, it's important to fix this issue. So, let's dive in. It seems like this is only an issue when b.size() is zero. The problem is that we resize to zero when b.size() is zero. If ix == b.size(), then the buffer will grow as long as it isn't zero, so we won't access out of bounds.
In your stack trace above, #14 calls line 40 of glaze/core/write.hpp. Just before this line is the following code:
if constexpr (detail::resizeable<Buffer>) {
   if (buffer.empty()) {
      buffer.resize(128);
   }
}

I verified static_assert(detail::resizeable<std::string&>) passes, so the buffer you are using should be getting resized.
So, as long as your Buffer is resizable, then it should never be zero. This is what is confusing me, because somewhere further along the stack trace the buffer must be getting cleared??? This would be a big issue for writing out JSON, because it would mean we are clearing what we've written to the buffer. Hence, why I say this could be indicative of a more serious problem. You don't have any custom writing that would be clearing the buffer, do you?
Because resizing is not too common, I'm thinking of making the following change that should fix your problem:
if (ix == b.size()) [[unlikely]] {
   b.resize((std::max)(b.size() * 2, 128));
}

I prefer multiples of 2 for buffer alignment. I'm pretty sure this will fix your issue, but as a warning, I think your issue is probably indicative of a deeper problem, which may not even be due to glaze.

Hi Mr. @stephenberry
I get your point, this is insane, we must dig it out. However, I did not do anything fancy as we discussed in previous thread:
https://github.com/stephenberry/glaze/issues/297,  the related code wasn't changed, I post again for convenience.
The possible crash conditons are two

if both ix and b.size() are zeroes?
if ix > b.size() already? If zero buffer is imposible, should be this?

I just called the wrapped json::write to serialize into JSON string.
The compiler I used
❯ clang++ --version
Ubuntu clang version 16.0.6 (++20230704084245+7cbf1a259152-1~exp1~20230704204333.104)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

The compile flags
/usr/bin/clang++  -I/home/swei/quant/trade/core/include -std=c++20 -Wall \
-DLLVM_USE_LINKER=lld \
-Wno-missing-braces \
-Wno-unused-local-typedef \
-fsanitize=address \
-fno-omit-frame-pointer -g -DDEBUG -g -DGTEST_HAS_PTHREAD=1

The wrapped code
#pragma once

#include <glaze/glaze.hpp>

namespace json {

template <class T>
inline int read_file(T &value, std::string const &filename)
{
    using namespace glz;

    std::string buffer;
    context ctx{.current_file = filename};
    std::filesystem::path path{filename};

    constexpr auto options = glz::opts{
        .error_on_unknown_keys = false,
        .error_on_missing_keys = false,
    };

    try {
        auto n = file_to_buffer(buffer, ctx.current_file);
        if (n != error_code::none) {
            return (int)n;
        }
        auto ret = glz::read<options>(value, buffer, ctx);
        return (int)ret.ec;
    } catch (...) {
    }

    return (-1);
}

template <class T>
inline int write_file(T &value, std::string const &filename)
{
    using namespace glz;

    std::string buffer;
    std::ofstream file(filename);
    context ctx{.current_file = filename};
    constexpr auto options = opts{.prettify = true, .indentation_width = 2};

    try {
        write<options>(value, buffer, ctx);
        if (file) {
            file << buffer;
        } else {
            return -1;
        }
    } catch (...) {
        return -2;
    }

    return 0;
}

// Deserialize from string
template <class T, class Buffer>
inline int read(T &value, Buffer &&buffer) noexcept
{
    constexpr auto options = glz::opts{
        .error_on_unknown_keys = false,
        .error_on_missing_keys = false,
    };

    try {
        auto ret = glz::read<options>(value, std::forward<Buffer>(buffer));
        return (int)ret.ec;
    } catch (...) {
    }

    return (-1);
}

// Serialize into string
template <class T>
inline auto write(T &&value)
{
    return glz::write_json(value);
}

template <class T, class Buffer>
inline Buffer &write(T &value, Buffer &buffer)
{
    glz::write<glz::opts{}>(value, buffer);
    return buffer;
}

template <class T>
inline auto prettify(T &&value)
{
    std::string buffer{};
    glz::write<glz::opts{.prettify = true, .indentation_width = 2}>(std::forward<T>(value), buffer);
    return buffer;
}

// Get a JSON value
template <class T, glz::string_literal Str>
inline T get(glz::detail::contiguous auto &&buffer, std::string *error = nullptr) noexcept
{
    try {
        auto ret = glz::get_as_json<T, Str>(buffer);
        if (ret.has_value()) {
            return ret.value();
        }
    } catch (std::runtime_error &e) {
        if (error)
            *error = e.what();
    } catch (...) {
        if (error)
            *error = "unkown error";
    }

    return T{};
}
} // namespace json

@sweihub, thanks for sharing the related code again. I just merged in #403, which does the safer resize check, so I think this should fix your problem. I'm continuing to dig and see if something else is going on.
The case ix > b.size() should be impossible, and is indicative of another problem if it happens. So, please let me know if this ever shows up. But, b.size() == 0 should not be an issue anymore.

Hi @stephenberry
I just checked your commit, why do you limit max size to 128? If the ix really exceeds 128?
b.resize((std::max)(b.size() * 2, size_t{128}));

@sweihub, Many thanks, that dumb mistake. I reverted.

@sweihub I just pushed a proper fix with #404, again thanks so much

Now it makes sense, however, any possibility that ix > b.size() again?  >= operator will  stop this issue.
    if (ix == b.size()) [[unlikely]] {
-        b.resize(b.size() * 2);
+        b.resize(b.size() == 0 ? 128 : b.size() * 2);
      }

BTW, the fix line can be this way for perfectionist
-    if (ix == b.size()) [[unlikely]] {
+    if (ix >= b.size()) [[unlikely]] {
-        b.resize(b.size() * 2);
+        b.resize(b.size() * 2 + 128*b.empty());
      }

Using >= vs == is a performance loss, but because it's on an unlikely branch it is likely immaterial. I will benchmark and get back to you on this.

OK, I like the way you pursue performance, I think the assemblies are single instructions: JE, JGE, JL, ...
https://en.wikibooks.org/wiki/X86_Disassembly/Branches
The modern compiler will handle that. Let's see your result, thanks!

@sweihub
I've been thinking about the case where ix > b.size() more and have a few thoughts. If this case happens, then we must have already written past the end of our buffer. This is a problem that should never happen, but it is definitely an error if it does. So, I don't want to add ix >= b.size() just to appease the address sanitizer, because the address sanitizer is pointing out a legitimate error. If we hide this error from the address sanitizer then we are in a worse place, because now we don't know that we are writing out of buffer bounds.
I would expect the address sanitizer to pop up the error sooner if we ever had ix > b.size(), so I don't think this is actually an issue. So, I think it's best to address these issues where they happen to prevent illegal writing rather than after they happen.
Hope all that makes sense. And, let me know if you have counter arguments. Thanks!

Hey Stephen
Your explanation makes sense, I’ll keep an eye on it.
Thank you very much!


Move pod template func to container renderer

What this PR does / why we need it:
This PR improves the virt-controller pod templating by:

moving helper functions to the render container file - when it is their only caller
rename function names to something more golang idiomatic, by removing the get prefix. That prefix is at best redundant
remove a slice initialization when computing the list of container ports from the VMI

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #
Special notes for your reviewer:
Release note:

NONE

/sig code-quality

/cc @xpivarc @EdDev @iholder-redhat
/uncc @marceloamaral @stu-gott

/cc


discovery,election(engine): remove unused code

What problem does this PR solve?

Issue Number: ref https://github.com/pingcap/tiflow/issues/6849
What is changed and how it works?
Check List
Tests

Unit test
Integration test
Manual test (add detailed scripts or steps below)
No code

Questions
Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?
Release note
None

/run-engine-integration-test

Codecov Report

Merging #7166 (32dfc1a) into master (b6afb5b) will increase coverage by 5.9193%.
The diff coverage is 73.8041%.

Additional details and impacted files

Flag
Coverage Δ

cdc
67.0754% <71.7647%> (-0.1151%)
:arrow_down:

dm
?

engine
60.8378% <74.2937%> (+0.2445%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.
@@               Coverage Diff                @@
##             master      #7166        +/-   ##
================================================
+ Coverage   59.5911%   65.5105%   +5.9193%
================================================
  Files           795        553       -242
  Lines         91532      51378     -40154
================================================
- Hits          54545      33658     -20887
+ Misses        32204      15092     -17112
+ Partials       4783       2628      -2155

/run-engine-integration-test

/merge

/run-engine-integration-test


Branch one

Signed-off-by: zhenghenghuo<EMAIL_ADDRESS>
- What I did
fix some typos
- How I did it
"however" usually means "no matter how" while "however," means "nevertheless".
and I fix those.
- How to verify it
- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

Please consider squashing this PR to your similar PR https://github.com/docker/docker/pull/29696

OK, I will close this pull request.


The __toString method from Uri has a side effect

Issue summary
When calling the (string) conversion or the __toString method on Uri the property $uri gets changed. This is most likely done for performance reasons. But this method is a pure getter method and should not cause any side effects.
Code snippet
$uri = Uri::createFromString('https://github.com/thephpleague/uri');
// The uri property is null
var_dump($uri);

$uriAsString = (string) $uri;
// The uri property is https://github.com/thephpleague/uri
var_dump($uri);

Solution
When calling the createFromString call getUriString inside the body of that factory method and store the created string uri it inside the uri property. Then the code on line https://github.com/thephpleague/uri-schemes/blob/master/src/AbstractUri.php#L682 would not trigger the uri initialisation and the side effect after construction.

Thanks for using the library. And yes indeed this side effect exists but I'm not aware of any issue regarding this behavior since the $uri property is internal to the value object. I'll gladly consider your solution if you could tell me where this side effect could be problematic ?

An alternative to your solution would be to re-introduce the __debugInfo method. I thought I had implemented it but seems I forgot it 😥

First of all thanks for taking the time to read up on this report.
We don't have a real breaking issue but it took us some time to figure out why comparing Uri's which were stored inside the database as a string column and created from the database from that same string column would no longer match.
We created a custom type for doctrine and noticed it inside or repository tests:
https://github.com/VSVverkeerskunde/gvq-api/blob/feature/VSVGVQ-7/src/Question/Repositories/Mappings/UriType.php#L40
Basically what happens in the unit tests is this:
$uri = Uri::createFromString('https://github.com/thephpleague/uri');
$sameUri = Uri::createFromString('https://github.com/thephpleague/uri');
if ($uri == $sameUri) {
    echo 'They have the same properties';
}

$sameUri->__toString();
if ($uri != $sameUri) {
    echo 'They don\'t the same properties';
}

Ok understood but you should not compare value object like normal objects. Value object should be compare against there value so two URI objects are considered equal only if their string representations are equals. The facts that 2 instances are not the same is irrelevant in case of immutable value objects whichever URI objects are. So again. I could add the debugInfo but in your case it will not solve your real issue which is your tests.

You can get more informations here https://codete.com/blog/value-objects/

@LucWollants did you fix your issue ?  If yes could you close this issue ?

I did indeed implement a work-around.


updated the issue #196 of changing the sidebar and updating it

Description

Related Issues

Changes Proposed

Checklist

[x] I have read and followed the Contribution Guidelines.
[x] All new and existing tests passed.
[x] I have updated the documentation to reflect the changes I've made.
[x] My code follows the code style of this project.
[x] The title of my pull request is a short description of the requested changes.

Screenshots
Note to reviewers


Broken links on main page

What happened?
links on main page Kodadot are broken
that includes link pointing to:

faq.page https://hello.kodadot.xyz/knowledgebase/general-1/faq
about : https://hello.kodadot.xyz/knowledgebase/general/faq
referal program: https://hello.kodadot.xyz/knowledgebase/technical/kodadots-programs/artist-referral-program
artist ambasadors: https://hello.kodadot.xyz/knowledgebase/technical/kodadots-programs/artist-ambassador-program
ambasador program: https://hello.kodadot.xyz/knowledgebase/technical/kodadots-programs/ambassador-program

Please reproduce in steps
Go to https://kodadot.xyz/ main page or https://beta.kodadot.xyz/
Links work in canary.koda
Expected Behavior
Change page links
What browsers are you seeing the problem on?
Desktop Chrome
At which address did you encounter bug?
beta.kodadot.xyz, kodadot.xyz
Are you logged in?
None
Which wallet you are using?
No response
At which chain did you encounter bug?
No response
Screenshots

Relevant log output
No response
Payment link for reward
https://kodadot.xyz/ksm/transfer/?target=<My_Kusama_Address_check_https://github.com/kodadot/nft-gallery/blob/main/CONTRIBUTING.md#creating-your-ksm-address>
Code of Conduct

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

Hello, this will be fixed in next release (check out https://canary.kodadot.xyz/ to see upcoming version)

Being fixed in

https://github.com/kodadot/nft-gallery/pull/6009


Failed compilation after new commits (October 29, 2018)

My ansible environment was compiling nginx and modsecurity ok this morning and then this afternoon it broke. It looks like the script was setup to pull from master branch of modsecurity-nginx
This is the error generated:
objs/addon/src/ngx_http_modsecurity_module.o: In function ngx_http_modsecurity_create_ctx': /usr/lib/modsecurity-nginx-connector/src/ngx_http_modsecurity_module.c:258: undefined reference to msc_new_transaction_with_id'
collect2: error: ld returned 1 exit status
make[1]: *** [objs/nginx] Error 1
make[1]: Leaving directory `/root/nginx-1.13.4'
This is the compilation command run, if done manually:
cd /root/nginx-1.13.4 && ./configure --user=www-data --group=www-data --prefix=/opt/nginx --with-debug --with-ipv6 --with-http_ssl_module --with-http_gzip_static_module --with-http_stub_status_module --with-cc-opt=-Wno-error --with-ld-opt= --add-module=/usr/lib/modsecurity-nginx-connector --add-module=/opt/ecolane/rails/.rvm/gems/ruby-2.3.1/gems/passenger-5.0.28/src/nginx_module && make && make install
Is there an older version I can pull against? As mentioned, currently it was setup to pull against Master.
git:
repo: 'https://github.com/SpiderLabs/ModSecurity-nginx.git'
dest: '/usr/lib/modsecurity-nginx-connector'
version: master
force: true

Thanks for the feedback.
I adjusted my ansible code to pull tagged v1.0.0 instead of master and it fixed the issue.
I will run your current code updates through change management for next version of ours.

Even i got this error:
nginx: [emerg] dlopen() "/usr/local/nginx/modules/ngx_http_modsecurity_module.so" failed (/usr/local/nginx/modules/ngx_http_modsecurity_module.so: undefined symbol: msc_new_transaction_with_id) in /usr/local/nginx/conf/dynamic-modules.conf:1
nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed
Kindly help me how can i resolve this issue

@tanjuu
Please read response just above your comment: https://github.com/SpiderLabs/ModSecurity-nginx/issues/128#issuecomment-434104371

The problem is probably due to the recently introduced msc_new_transaction_with_id() only being available on a newer version of libModSecurity (as of SpiderLabs/ModSecurity@4dd2812 to be more specific).
So I suggest that you upgrade your current libModSecurity codebase and you should be fine.

Follow the same steps and you should be fine.

Thanks for the feedback
issue is resolved now


Vue.JS and List Rendering

Hi,
After the fix for loading Vue with metro I still wonder how to list render and do other stuff with Metro and Vue. The list rendering will be done via vue since Vue makes the Ajax Call and then should update the List. I'm using a listview from metro

Create code example on codepen.io

@olton I hope you can find a solution to this that would be awesome. Since the components you made are amazing. https://codepen.io/xjoeyv/pen/MVRGJr

Use

and
      this.todos = [
      { icon: "", caption: "Images", date: "12/21/2017", name: "Test Name"},
      { icon: "", caption: "Something", date: "12/21/2018", name: "Home Sweet Home"}
      ];

Also, in the 4.1.14, I will correct table mode view for listview

https://codepen.io/olton/pen/ZxZoZm


Contract can mint vouchers

Like IBC vouchers we can have contracts interact with the sdk to mint new vouchers.
We can follow the IBC denum design here to identify them and avoid conflicts.
Adding the pure mint/burn functionality is not complicated in our design but the complexity comes for the client that has to interact with these new vouchers. We would need to provide additional information for any contract voucher id (denum) so that a user can make qualified decisions using it. For example:

source contract
displayable denum (symbol)
decimals

Not sure we do this, but definitely a v2 feature if so.
If anyone has a concrete use case and needs this for their chain integration, please comment.

This is available as module: token-factory


prefix with package name for foreign names

I was getting to know the code base but I found it quite difficult since I would look for a name and then found out it was defined in another package (like FEMBasis).
This PR adds prefixes to the names that are defined in other packages.
It also updates with the changes + fixes in https://github.com/JuliaFEM/FEMQuad.jl/pull/15 (fixing names of HEX81 & co, and returning a length 1 tuple for 1 dim quadrature rules).
PR will fail until we either checkout the FEMQuad branch or tag it or something (one of the drawbacks with splitting things into multiple packages heh).

I am ok with both options. There are unlimited version numbers available. Which ever is the most convenient way of working in this situation.

Good changes. Now we explicitly define where are the types defined.
Now it would be a good place to make things right, not just almost right. From a practical point of view, should we now increase a patch or a minor version in FEMQuad and what would be best practice to work with this kind of multi-package environment to avoid dependency issues? Newest FEMQuad is now 0.2.0. Add minimum version requirement for FEMQuad to 0.2.1 for FEMBase?

I think what we can do is to have the packages use the master version of the dependencies, (FEMBasis, FEMQuad, FemBase) for a while and when we are ready to do  release we tag all the packages.

I might missunderstand you, but if a tag needs to be done for every change in a dependency then it is hard to do any experimental work since every new tag will be pushed to users.
I believe a release should be done when there is some confidence that the new stuff should be released to users but there also need to be a way to develop without tagging.
So for CI, using the master branch of FEMQuad here, until we want to make a release is what I propose.

Yes, exactly. I liked what you proposed. Your proposal is perfect because it won't break anything. Afterward, when we will have new features, we will tag in the right order and fix the dependencies to be tagged versions again.
Yes please, change the REQUIRE file to depend on master (or any other way which works to depend on the master version).

I changed the .travis script so that we check out master of FEMQuad. Tests pass now.

Coverage decreased (-99.3%) to 0.0% when pulling 772a44a6da483d3f1f43fdc80909507a58b0c174 on kc/prefix into d96a0d39ac6978d61204b18fc8844c3e73901f84 on master.


refactor(sbb-teaser-hero): rework structure

Preflight Checklist

[x] I have read the Contributing Guidelines for this project.
[x] I agree to follow the Code of Conduct that this project adheres to.
[x] I have searched the pull request tracker for a Pull Request (PR) that matches the one I want to submit, without success.

Issue
This PR Closes #
Pull request checklist
Please check if your PR fulfills the following requirements:

[x] Tests for the changes have been added (for bug fixes / features)
[x] Docs have been reviewed and added / updated if needed (for bug fixes / features)
[x] Build (npm run build) was run locally and any changes were pushed
[x] Lint (npm run lint) has passed locally and any fixes were made for failures

Changes
Changes in this pull request:

Browsers
I tested the build on the following browsers:

[x] Firefox Desktop
[x] Chrome Desktop
[x] Safari Desktop
[ ] Firefox Mobile
[ ] Chrome Mobile
[ ] Safari Mobile
[ ] Opera
[ ] Brave

Pull request type

Please check the type of change your PR introduces:

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, renaming)
[x] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] Documentation content changes
[ ] Other (please describe):

Does this introduce a breaking change?

[ ] Yes
[x] No

Other information

Mentions

@lyne-design-system/core

Thanks for restructering it!
Should there be added some behavior for long text? Or do we consider that as a consumer problem?

there is an author restriction for that. The text should be no longer then 40 characters

Hi @osminaz
I think it's best to wait for the sbb-link to be finished where also the static property will be implemented.
After a lot of discussions we decided that the sbb-link itself should detect if he is nested inside another link or button. See https://github.com/lyne-design-system/lyne-components/blob/master/CODING_STANDARDS.md#context-detection on how to achieve that in the sbb-link. This should make the flags on the teaser hero and panel obsolete.
Other than that, an architecture decision was made, that properties of slotted components should not be overridden from outside but the slotted object (e.g. sbb-link in your case) should detect its context itself and use the appropriate properties.
Context object with all specific properties.
const panelContext: Partial<SbbLink> = {
  icon: 'sdfsdf',
  iconPlacement: 'end',
...
};

Detection of panel context
@Element() el!: HTMLElement;

connectedCallback() {
  // Check if the current element is nested in either an `<a>` or `<button>` element.
  this._isNestedInPanel = !!hostContext('panel', this.el);
}

Usage in render()
    const props = this._isNestedInPanel ? {...this, panelContext} : this; // After that, use `props` instead of `this`

    if (props.icon) {
      iconPositionClass = ` sbb-link--icon-placement-${props.iconPlacement}`;
    }
...

Thanks a lot for your patience and your work :-)


Process on-chain-received DApi batches

After a lot of rebasing, this PR:

Modifies recent work around the state to reflect  the chain-agnostic nature of signed data

and the fact that the contract can return multiple signed data URLs per single source data feed

Modifies the signed datastore to be datafeed ID indexed to better reflect how the data is used
Checks on-chain values against local values and produces a batch of update decisions

Please check now @Siegrift


Variation of exportallof and exportall that only exports "active" civics

e.g. don't export any civics which have been removed or are still in draft/proposal. This could be a new pair of commands or an argument to the existing ones

Addressed in #41


SelectItem React.createElement: type is invalid -- expected a string

When I try to use "SelectIment" react native give me an error that says:
"Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s%s, undefined,  You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."
I checked your index file and there is no "SelectItem" component being exported
import { Select, SelectItem } from "@ui-kitten/components";

export default class GetEventDetailsScreen extends Component {
  constructor(props) {
    super(props);
    this.state = {
      selectedIndex: 0,
    };
  }

 <Select
          placeholder="Active"
          selectedIndex={this.state.selectedIndex}
          onSelect={(index) =>
            this.setState({
              selectedIndex: index,
            })
          }
        >
          <SelectItem title="Option 1.1" />
          <SelectItem title="Option 1.2" />
        </Select>
}

UI Kitten and Eva version

Package
Version

@eva-design/eva
"^1.3.1"

@ui-kitten/components
"^4.4.1"

Environment information

The library version you use is v4, and the docs you run are valid for v5.
Consider upgrading the library or switching to the v4 docs (see the switcher at the top right corner).


Add node to known bash commands

node seems like a good command to syntax highlight.
npm was already there so I figure this is not very controversial.

Thank you for the PR @jamesgpearce!
Seems like the build is failing. Just run npm ci && npm run build and commit the changes to prism-bash.min.js to fix this.

ha; let me squash the commits together

(@RunDevelopment you presumbly need to kick off the CI again)

Thank you for contributing @jamesgpearce!


wip: Rwu/enh/calculators

related #16 #5
update araig_calculators:

all nodes only publish when the state changes
change the results calculated from **"diff_()_node" from float to float64stamped (so we can use header.seq)
add reset function
update tests, check msg seq, reset signal

Review code for what exactly is message sequence checking feature

This PR is superseded by https://github.com/ipa320/araig_test_stack/pull/35 and no longer required. Branch can be kept as archive.


add bias correction method validation to global validation

We also want to add some bias correction method validation to our global validation routine for a limited subset of gridcells. We need this to check two main things:

that we preserve model-projected relative changes in quantiles
that historical model bias corrected distributions match reference distributions

See p. 6942 of Cannon et al 2015 and esp. eqtn (6) for additional reference/context on this

@dgergel thanks !

@emileten can you link the method validation you did here? I think we can close this once you do

@dgergel yep. Eventually as you might have noticed we didn't do this systematically, but rather in a series of quick checks on notebooks shared on slack.
I will look for the output I shared related to this specific check and upload it here.


[DR] Loading a 5D distribution function from a 4D distribution

For the mirror simulations, we aim to initiate a 3x2v gyrokinetic simulation using initial conditions derived from a 2x2v simulation. In the 2x2v setup, there is no dependence on the cylindrical angle. However, we aim to introduce this angular dependence in the 3x2v simulation by replicating the 2x2v data in each angular slice. Additionally, we would like to apply a user-specified function to this angular component to introduce noise into the initial conditions to trigger instabilities. These simulations should maintain consistent resolution and domain in velocity and physical space coordinates and use the same basis functions as the original data. Similarly, it would be valuable to load a 2x2v simulation from a 1x2v simulation of a single field line and then introduce radial dependence. Developing this infrastructure to initialize higher-dimensional simulations from lower-dimensional ones is crucial for advancing our mirror simulation efforts.
When loading this data, the structure in the code could look like this.
struct gkyl_gyrokinetic_species ion = {
   .projection = {
      .proj_id = GKYL_PROJ_FROM_LOWER_DIM,
      .filename = "ion_2x2v.gkyl"
      .func_dependence = user_func,
      .func_ctx = &ctx,
   },
};

The user may need to specify the original dimensions of the simulation, but I think that can be read from the file. I'm not sure what the projection routine would look like under the hood.

I have gotten some initialization stuff working inside apps/gk_species_projection.c. I can load a lower-dimensional distribution function, read the grid, and construct lower-dimensional bases and ranges. I did not consider parallelism when creating these ranges and grids. The construction of these objects is identical to how gyrokinetic.c creates an app. It would re-use less code if we called gkyl_gyrokinetic_app_new() and created a new app with the appropriate dimensions instead. It would undoubtedly be less code, but this call has a lot of overhead, and it isn't a good idea.
The plan is to initialize inside the gk_proj object in gkyl_gyrokinetic_priv.h using the function gk_species_projection_init with the proj_id GKYL_PROJ_LOAD_LOWER_DIM. This structure will contain the lower dimensional grid, ranges, basis, and distribution function. I'm only interested in loading the 2x2v mirror distribution functions into a 3x2v simulation. Then, in gk_species_projection_calc, the code will call special kernels to map the 2x2v coefficients into the 3x2v spots and initialize the correct coefficients. I'm unsure how to create these kernels, but they should map one coefficient in each cell to another.

This work has been newly prototyped in the gk-g0-app_transdim branch.
The user can now specify another table (separate from .projection) like (e.g. for rt_gk_sheath_3x2v_p1):
ion = {
   ...
   .init_from_file = {
      .file_name = "gk_sheath_2x2v_p1-ion_1.gkyl",
    },
   ...
}

The code will then read the distribution from this file and proceed with the simulation. The infrastructure is intended to support:

Loading an f with the same grid as the current sim.
Loading an f with one dimensionality lower (e.g. 2x2v for a 3x2v sim).
Loading an f with the same dimensionality as the current sim, but a coarser grid (not yet implemented).
This is enabled by adding the function gk_species_file_import_init in apps/gk_species which does the file read, and translating the loaded f to the simulation IC, and by adding a new updater, translate_dim_gyrokinetic, which translates the DG coeffiients of a lower dim distribution to those of a higher dim distirbution.

There are a few different options for .type that are available at the moment.

GKYL_IC_IMPORT_NONE = 0,
GKYL_IC_IMPORT_F, // Import f only. Imports the distribution function f from a lower dimensional simulation
GKYL_IC_IMPORT_AF, // Import f and scale by alpha(x). Scales F by alpha. alpha is the same function as conf_scale
GKYL_IC_IMPORT_F_B, // Import f and add beta(x,v). Beta is the same as .phase_add
GKYL_IC_IMPORT_AF_B, // Import f, scale by alpha(x) and add beta(x,v). Requires both .conf_scale and .phase_add

Done in PR #479


Build and serialize parser spec during build process

Before this PR, parser grammar spec was being retrieved from our Python code where it was read from .pickle files (or rebuild in case of development environment).
This meant that:

we had to unpickle, serialize to JSON, pass to Rust edgeql-parser, deserialize,
Python did not free the memory used for spec or its JSON-serialized-form,
we were basically using 3x as much memory as required.

This PR builds the spec from setup.py and then serializes it into edb/grammar.bc. During runtime, this file is read, deserialized and caches. This process can also be triggered by calling cache_spec(), so the first call to parse() will not need to touch the disk.
Memory usage of the server process dedicated to the parser went from 86.9MB to 17.7MB.
I did not benchmark the performance as it would only optimize first run, but removing serialization of >4MB of JSON have probably helped.
For serialization format I've chosen BitCode, because it has very good serialized size and decent deserialization performance, based on https://github.com/djkoloski/rust_serialization_benchmark. I've made sure to pick something that goes trough serde, which means that this format is easily changeable.

I'm a bit scared of picking this into 4.x branch - I added changes to the build process, that I'm not confident in. It will probably be fine, but if we really don't want breakage, this could wait for 4.1

I'm a bit scared of picking this into 4.x branch - I added changes to the build process, that I'm not confident in. It will probably be fine, but if we really don't want breakage, this could wait for 4.1

That's what nightlies are for. To relieve the release manager anxiety.


Use PathTypeHandler's for function objects with non-default properties/attributes

Move from creating new non-shared SimpleTypeHandler's when a new property is added to a SimpleTypeHandler, or an attribute is changed, to creating PathTypeHandler's. Build a new root and evolve from the root to the current state of the SimpleTypeHandler, then replace the type's existing SimpleTypeHandler with the new PathTypeHandler. From there, we can evolve to the state required by the new property/attribute, and future instances of the same function that make the same type transition will get the same type. Also fix up some shared SimpleTypeHandler's in the library that didn't represent the desired state of their library objects and were forcing type transitions during initialization.

@dotnet-bot test Windows ci_disablejit_x64_debug


Checking roles for stored servers with the same hostname

Bug description
in my list of stored servers, I have two entries with the same hostname, for example myhost.example.com

first entry has server myhost.example.com and allows for SSH and SFTP roles
second entry has server myhost.example.com, allows only for SSH role, and execute a custom command
The first entry correctly shows in both the SSH and the SFTP server lists.
However, when I tap on the second entry, the app still prompts me to chose between SSH and SFTP, while only the SSH role is configured and SFTP should not be offered.

I have other servers configured with the SSH role only and tapping those the app does not offer an SFTP option, what makes the error case unique is the other server stored with the same hostname and both roles.
Screenshots
If applicable, add screenshots to help explain your problem
Steps to reproduce

Error is thrown

Thanks for reaching me out @casaschi 🙏
Does saving (top right button) the second connection again (without any change) fix the problem?

@isontheline no, saving the second connection again does not fix the problem.

On the bad behaviour connection, does only one role is showed on screen?

What's about the icon on the list?
When SSH only it should be this one :

If that matters, I assigned similar labels to the connections:

the SSH+SFTP connection is labeled with the hostname
the SSH only connection is labeled with hostname:command where command is the actual command being executed on SSH

I will check on my side why the icon shows as "SSH/SFTP" instead of SSH only :

It should explain the bug
I will come back to you tonight

I should have mentioned, I'm using webssh on iOS, both app and operating system at the latest version.

Could you make these steps please?

Edit the connection
Choose both roles
Save the connection
Edit the connection
Choose only SSH
Save the connection

It should fix the bug in database.
I'm pushing a fix to prevent it

Your fix worked!
Thanks.

Many thanks for your feedback and your support about WebSSH 🙏


Let's pick a better name!

option
notes

workmate or jobmate
to long?

slacker or slack
my favourite but portrays the opposite, ironic?

workaholic
accurate but maybe not the best, to long?

opus or operis
both mean work in Latin

Let me know what you guys think, and maybe propose your own suggestions :)

My favorite is slacker.
Here are some auto-generated ones.

option
notes

jobfunnel
I know Paul liked this one.

joboggan
I thought this one was just funny.

jobanion
I say this one like Joe Banion.

jobuntu
sounds like ubuntu ❤.

Apparently the name generator really likes compound words beginning in "job".
I'm not super serious about these I just laughed when I read them.

I really like slacker, although slack is definitely out the window, and I only realised that after making the issue lol. jobfunnel is a good one too :)

Job funnel works, I like it even though it’s kinda silly 💯
Slacker is cool, tho slack is suuuper closely named - kinda ruins it for me tbh.
Opus I like, very dignified, probably better than job funnel.
Both of those get my vote :)
Here are some of my additional suggestions:

Venatus (latin for hunt)
Job Stream
Career Invicta (latin for automatic)

We can name the project JobFunnel and, for short, we could use funnel for the executable :)

I vote on opus and jobfunnel I think those are the ones that idk just sound natural.
operis however is more lengthy than opus which I think may be a little too short to be a title.
operis also is singular meaning work of one individual which is kind of cool because this is very much software for one individual.

If we name it jobfunnel someone has to make a sweet cartoon graphic of someone funneling jobs 😆

Soooooo I hereby rename this project:
🥁🥁🥁
‘Jobfunnel’
🥳
Now someone make us an infographic


Import doesn't work

I cannot manage to import vue2vis component with a super basic setup :
<template>
  <div>
    <timeline ref="timeline" :items="items" :groups="groups" :options="options">
    </timeline>
  </div>
</template>
<script>
import Timeline from 'vue2vis'
export default {
  name: 'MyTimeline',
  components: {
    Timeline
  },
  data () {
    return {
      groups: [{
        id: 0,
        content: 'Group 1'
      }],
      items: [{
        id: 0,
        group: 0,
        start: new Date(),
        content: 'Item 1'
      }],
      options: {
        editable: true
      }
    }
  }
}
</script>
<style scoped></style>

The error thrown is :
[Vue warn]: Unknown custom element:  - did you register the component correctly? For recursive components, make sure to provide the "name" option.

Thanks, works with import { Timeline } from 'vue2vis'


Error on "twitter search"

When I execute "twitter search mykeyword" it returns this error,http://s15.postimg.org/3wwdegnkr/angel_beats_bg5.jpg seems that you're still using API v1 on that twitter search, please update it to the latest version

:+1: Just happened to me, too.  Weird…!

The whole Search action through the command line client is completely outdated (see https://github.com/sixohsix/twitter/blob/master/twitter/cmdline.py#L469-L486 ) and should be completely rewirtten using the classical api route, it should be quite easy to do.

So, I've pushed a hotfix on my fork of the repo here
I've got something working for my own purposes for the moment, but I was unable to track the source of the issue.  There are some trickle down formatting issues that will need to be resolved in the API update including date formats and key lookups.
The redefinition of twitter.domain is now unnecessary as the search api follows the same root domain as everything else.  The issue is that search is being added as a uriparts somewhere between the SearchAction and the TwitterCall.  I'm assuming this is in the search method itself, but I was unable to identify where this is actually defined, and ultimately I got tired of running down the rabbit hole.  I'd be happy to patch it if someone who knows the lib a bit more can point me in the direciton of the Twitter().search() method definition, or explain how/where it is that the search term is being added to uriparts
I tried overwriting it in SearchAction itself, but this is too early in the process.

Hi,
Cool you started fixing it. Although, there's no reason to do such a dirty hack, you can simply call the twitter search route by doing : twitter.search.tweets(args). @sixohsix built this lib so that calling any route remains generic whatever twitter decides to change :)

see here https://github.com/sixohsix/twitter/blob/master/twitter/api.py#L195-L208

Ah, that clarifies things a great deal. That is pretty straightforward.
I'll patch that and push something up soon. I still want to understand the
inputs as some of the search action options are non functional.
On Sun, Jul 24, 2016, 9:36 AM Benjamin Ooghe-Tabanou <
<EMAIL_ADDRESS>wrote:

see here
https://github.com/sixohsix/twitter/blob/master/twitter/api.py#L195-L208
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/sixohsix/twitter/issues/280#issuecomment-234780607,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIZ79cmXh8MzdZlIGfo3J-_-O1lOErMeks5qY3hVgaJpZM4Dkq4N
.


Proposal: Add a strictly typed spread operator

Search Terms

spread
strict spread

There are a few related issues closed with a link to https://github.com/Microsoft/TypeScript/issues/12632 (For example https://github.com/Microsoft/TypeScript/issues/17422) but it's a lot more generic, this proposal is very specific to the spread operator where I believe there is a relatively simple fix that would handle a lot of situations.
Suggestion

Add an operator similar to the spread operator that ensure that the type of the resulting object is the same as the type of the input one.
For example if the operator is ....:
interface State {
    readonly id: number,
    readonly validated: boolean
}

const state: State = { id: 0, validated: false };
const newState = { ....state, validated: true }; // newState: State
const newState2 = { ....state, failed: true }; // Compilation error, 'failed' isn't in the keys of State

The following limitations would apply:

The operator is only valid in the first position of an anonymous object build with spread
The target type can be created by an anonymous object (so an interface not a class)

It would be compiled to ... as the difference is only relative to typechecking
Use Cases

The central use case is to mutate objects that are used as immutable like React state or Redux state.
While it currently work most of the time as in the end the signature generated by the spread operator will be matched against the real type it produce problems:

Errors are often shown far away from where the problem really is, requiring to hunt what function actually generated a type that had an invalid property
Any function returning the result of a spread has a hard to read signature, often for nothing as an interface matching it exists
The solution is often to sprinkle manual type annotations everywhere that would be unnecessary if the type wasn't lost in the first place

Examples

interface State {
    readonly id: number,
    readonly validated: boolean
}

// State => State
const validate = (s: State) => {....s, validated: true};

const state: State = { id: 0, validated: false };
const newState = { ....state, id: 42 }; // : State
const validatedState = validate(newState); // : State

Would also work for anonymous types :
const state = { id: 0, validated: false };
const newState = { ....state, id: 42 }; // Ok
const newState2 = { ....state, isInvalid: true }; // Compilation error, 'isInvalid' isn't in the keys of '{ id: number, validated: boolean }'

Checklist
My suggestion meets these guidelines:

[x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
[x] This wouldn't change the runtime behavior of existing JavaScript code
[x] This could be implemented without emitting different JS based on the types of the expressions
[x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
[x] This feature would agree with the rest of TypeScript's Design Goals.

You can already achieve that using explicit type annotations :
const newState2: typeof state= { ....state, isInvalid: true }; // complains about excess property

Your original request is probably better implemented as a linter rule. IMO it's too specific to your workflow to be part of the compiler.

This doesn't seem enough better than the existing options to warrant adding new expression-level syntax.


Update the README.md file

From #11:

Revisit the readme.md in https://github.com/phetsims/brand
Maybe put a note that PhET is trademarked and can only be used with the expressed written consent.
Put a comment in the phet brand that this is “hands off” federal trademarked one.

We should also indicate that the PhET logo (AI/PNG/SVG) does not fall under the MIT license.  In fact, I'm not sure what the best license for this repo is.

README.md (and a bunch of other top-level files) appears to have disappeared.

Add documentation about how to create your own brand based on the adapted-from-phet one, from #18

I finished a rough draft here: https://github.com/phetsims/brand/blob/master/README.md
@pixelzoom can you take a look or delegate to someone else?

Numerous tweaks to README files. Based to @samreid to review.  If these look OK, go ahead and close.

@pixelzoom's changes look good, thanks.  Closing.


Add publish to up-streamer rust

Add support for tracking subscriptions and forwarding published messages in ustreamer.rs
Add usubscription-static-file to stub out subscriptions before usubscription is written
Add tests for mE (SOME/IP) subscribe/publish and uE (zenoh) subscribe/publish

NOTE: This PR also contains changes that @PLeVasseur has done for up-streamer-rust. His will be merged first and then I will rebase based on that merge.

#18

To the question about what "full" means... the "status", "config", and "attributes" aren't currently being used by us in the streamer, so they're just added to the cache for tracking. Maybe in the future they'll be needed for something, but for now, I'm leaving them as optional


FR - support older version of requests

Operating System version: python 2.7.15
Firebase SDK version: ??
Library version: ??
Firebase Product: messaging

Step 3: Unable to import firebase_admin.messaging
In [4]: from firebase_admin import messaging
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-4-0c6dddb1c046> in <module>()
----> 1 from firebase_admin import messaging

/postmates/virtualenv.d/postal-main/lib/python2.7/site-packages/firebase_admin/messaging.py in <module>()
     18 import six
     19
---> 20 from firebase_admin import _http_client
     21 from firebase_admin import _messaging_utils
     22 from firebase_admin import _utils

/postmates/virtualenv.d/postal-main/lib/python2.7/site-packages/firebase_admin/_http_client.py in <module>()
     20 from google.auth import transport
     21 import requests
---> 22 from requests.packages.urllib3.util import retry # pylint: disable=import-error
     23
     24

The version of requests we're using is requests==2.2.1

We get our requests dependency through google-api-core and other upstream dependencies. They require at least requests v2.18.0 at the moment:
https://github.com/googleapis/google-cloud-python/blob/1f15fe411ebd1f1cd664599920fc4962b01a8a06/api_core/setup.py#L35
requests v2.2.1 is over 5 years old. Please consider upgrading to something more recent.


need help regarding autofip mediapipe- python implementation

may i know how can i build a simple pipeline for python,can someone tell me the logic .
i want to detect object & crop the area based on aspect ration, I saw autoflip is doing it but I want to build it from scratch,
suggestions are really appreciated  thanks

Hi @akashAD98,
Currently, Auto-flip solution is not available in the python platform as described in the documentation here. We can mark this is feature request and based on internal discussion can prioritise the request.

okay , im tryting to build this feature from scratch, I'm not getting smooth frames & not able to save video, can you help me here?
@kuaashish

My approch: detect people in each frame of the video, then it will check the size and aspect ratio of the bounding box of the largest detected person, compare it with the desired size and aspect ratio, and resize the frame accordingly.
& I have implemented it, but need some suggestions, regarding how should I improve it, I'm waiting for someone who can help me , thanks a lot.
note:please suggest me if my approach is wrong, or should I need to add something, I don't know c ++,so trying to build it from scratch. thanks

Hi @akashAD98,
Use case which you are looking is not currently supported by auto-flip. As mentioned here in documentation "If the user would like to detect and preserve scenes of lions in a wildlife protection video, for example, they could implement and add a feature detection calculator for lions into the pipeline. Refer to AutoFlipFaceDetectionSubgraph and FaceToRegionCalculator".
This can be done by https://github.com/google/mediapipe/blob/master/mediapipe/examples/desktop/autoflip/autoflip_graph.pbtxt#L124 by adjusting the weight of the particular detection you need. In the use case mentioned you might be required to train a new Tflite model and change the tflite path here.

@kuaashish thanks but i want to build it from scratch like object detection+tracking + reframming. i want to know logic for this, I'm using crop method but getting weird results, so I need some suggestions regarding this

@akashAD98,
Would you please share complete use case and the different result observed to help more on the support you are looking from us.

I want to use  any detection model like yolov,v8 & tracker model ,&. Want to implement same logic of medipipe using python

@akashAD98 , Any real example or result set you are getting will be more helpful to understand the issue better from our end

@kuaashish where should i post my code , can you share your mail id, otherwise<EMAIL_ADDRESS>is my mail,
my logic is

detect person
2.track the person - find the largest bounding box, & reframe similar like autoflim

but I'm not getting frames correctly

from this video frame, I'm getting a person with the maximum bounding box, now I want to add an aspect ratio  & save the video similar like autoflip , how should I do it? & whats the aprroch

Hi @jiuqiant,
Could you please look into this issue.

Hello @akashAD98,
We are ending support for these MediaPipe Legacy Solutions, but upgrading the others. However, the libraries, documentation, and source code for all the MediapPipe Legacy Solutions will continue to be available in our GitHub repository and through library distribution services, such as Maven and NPM.
You can continue to use those legacy solutions in your applications if you choose. Though, we would request you to check new MediaPipe solutions which can help you more easily build and customize ML solutions for your applications. These new solutions will provide a superset of capabilities available in the legacy solutions.

@kuaashish i can see there is no autoflip in new repo.i have done the half part of code.still have few issues .


CTRL + Left Mouse Click => paragrah detection

Hello
I have 2 cases where the "CTRL + Left Mouse Click" doesn't work properly
1/ When the instruction PERFORM XXXX is follow by a dot
PERFORM XXXX.

It looks like it detects that it's a paragraph itself :

2/ When the paragraph XXXX has characters on first 6 columns of the line (we use them for "tags", i know it's useless now with Git for example ...), the detection doesn't work
For example, i add the tag "TGR01" here :

And so, the detection does'nt work :

Maybe the detection of paragraphs should only consider strings that begin at colum 8
Thanks for your work ! It's great !
And sorry for my english, i'm french :-)

I can't reproduce the first issue, here is what I am doing.
The second issue, I think I understand the issue.

Please don't apologize for your English, as it is way better than my French!
If you would like to try out v4.6.0, I've made some tweaks to the goto definition support, I think it should help.

Hello
v4.6.0 work well for the second issue ! Thanks !
For the first issue i took an example here :
http://people.sju.edu/~jhodgson/cobol/sample.html
And i reproduce the issue with this, i attach the file (with extension .txt) :
Issue59.cbl.txt
So when i try the CTRL+CLIC on PERFORM PRINT-SUMMARY.
It doesn't work (in fact it stays on the same spot) :

I dont't know if it has any influence but we have forced files.encoding to "windows1252" (i tried with UTF-8 and i still have the issue)
I disabled all other plugins for the test (Gitlens, Project Manager, vscode-icons, XML Tools)
Thanks

Please try 4.6.1
On Wed, 3 Apr 2019, 13:56 Tony-Gremillon<EMAIL_ADDRESS>wrote:

Hello
v4.6.0 work well for the second issue ! Thanks !
For the first issue i took an example here :
http://people.sju.edu/~jhodgson/cobol/sample.html
And i reproduce the issue with this, i attach the file (with extension
.txt) :
Issue59.cbl.txt
https://github.com/spgennard/vscode_cobol/files/3038612/Issue59.cbl.txt
So when i try the CTRL+CLIC on PERFORM PRINT-SUMMARY.
It doesn't work (in fact it stays on the same spot) :
[image: image]
https://user-images.githubusercontent.com/17426841/55479235-eeaf0a80-561d-11e9-9cc7-5729ff10b8b3.png
I dont't know if it has any influence but we have forced files.encoding to
"windows1252" (i tried with UTF-8 and i still have the issue)
I disabled all other plugins for the test (Gitlens, Project Manager,
vscode-icons, XML Tools)
Thanks
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/spgennard/vscode_cobol/issues/59#issuecomment-479476959,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFtrGG2aqVwd4l-y6jfbqTZKb9-gvHm0ks5vdKTpgaJpZM4cX_wl
.

Hello
the first issue is fixed ... but now the second issue is back !
2/ When the paragraph XXXX has characters on first 6 columns of the line (we use them for "tags", i know it's useless now with Git for example ...), the detection doesn't work
Example : i add a tag "TGR01" on the lines og the paragraphs PROCESS-RECORDS and PRINT-SUMMARY then they are not detected at their PERFORM
Here is the file :
Issue59v2.cbl.txt
Thanks

Everything is ok now !!
Thanks a lot !

Hello,
version 5.0.0 and there is a regression on the CTRL + Left Mouse Click
Thanks for your investigations

Yes, I know.

Sorry, for the problem..parsing COBOL feels like making a cake with a
blindfold.. one small change and it goes west.
On Wed, 17 Apr 2019 at 10:04, Tony-Gremillon<EMAIL_ADDRESS>wrote:

It seems ok now on version 5.0.4 !!!
Thanks !
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/spgennard/vscode_cobol/issues/59#issuecomment-484001093,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFtrGDSOyT4Q2qFOHuzpqoiQaiuGnRW2ks5vhuOMgaJpZM4cX_wl
.

--
Stephen Gennard
<EMAIL_ADDRESS>

Like a lot of applications ... :-)
No problem, we understand these regressions !
You're doing a good job !! Thx again


Fix test issues on PowerShell v3

Resolves #554

This change is

Previously, kapilmb (Kapil Borle) wrote…
> #### Fix test issues on PowerShell v3
>
> Resolves #554
>
>
>

Comments from Reviewable

Reviewed 4 of 4 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from Reviewable

@raghushantha Thanks!
Previously, raghushantha (Raghu Shantha [MSFT]) wrote…
> :lgtm:

Comments from Reviewable


Change parsing logic so we won't lose consecutive newlines, using tex…

…tparser lib
Resolving the following issue: https://github.com/argosopentech/argos-translate/issues/237

it was not working ?


Query from URL parameter

I couldn't find a way to issue a query using a URL parameter (eg. ?q=...)
This would be useful to add FSDN search to IDEs and browser shortcuts, for example by typing "f ..." in Chrome's address bar.

Please use query= parameter.
https://fsdn.azurewebsites.net/?query=string

Thank you.


Delete reference to old ISTIO_META_PROXY_XDS_VIA_AGENT

In discussion with @howardjohn - this flag has been renamed:  PROXY_XDS_VIA_AGENT.  Also no need to enable it in preview any more as it is enabled by default.
[ ] Configuration Infrastructure
[ ] Docs
[x ] Installation
[ ] Networking
[ ] Performance and Scalability
[ ] Policies and Telemetry
[ ] Security
[ ] Test and Release
[ ] User Experience
[ ] Developer Infrastructure
Pull Request Attributes
Please check any characteristics that apply to this pull request.
[ ] Does not have any changes that may affect Istio users.

@linsun: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

release-notes_istio
68ced208ab19eb1b28f3150ddf551085ff03f94c
link
/test release-notes_istio

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

/retest

@linsun: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

integ-pilot-k8s-tests_istio
68ced208ab19eb1b28f3150ddf551085ff03f94c
link
/test integ-pilot-k8s-tests_istio

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

| /test integ-pilot-k8s-tests_istio
-- | --

/test integ-pilot-k8s-tests_istio

@linsun: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

integ-pilot-k8s-tests_istio
68ced208ab19eb1b28f3150ddf551085ff03f94c
link
/test integ-pilot-k8s-tests_istio

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

/test integ-pilot-k8s-tests_istio

@linsun: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

integ-multicluster-k8s-tests_istio
68ced208ab19eb1b28f3150ddf551085ff03f94c
link
/test integ-multicluster-k8s-tests_istio

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

/test integ-multicluster-k8s-tests_istio

@linsun: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

integ-multicluster-k8s-tests_istio
68ced208ab19eb1b28f3150ddf551085ff03f94c
link
/test integ-multicluster-k8s-tests_istio

integ-telemetry-k8s-tests_istio
68ced208ab19eb1b28f3150ddf551085ff03f94c
link
/test integ-telemetry-k8s-tests_istio

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

/test integ-telemetry-k8s-tests_istio


[BUG] On "func start" - Python worker fails to import 'builder' from 'google.protobuf.internal' (even though it's there) while importing tensorflow

Investigative information
Please provide the following:

Timestamp: 20230420
Function App name: n/a
Function name(s) (as appropriate): myfn
Core Tools version: 4.0.5095

Repro steps
Provide the steps required to reproduce the problem:
Create new function and add import:
mkdir aztftest
cd aztftest
func init

# virtualenv
python -m venv .venv
. .venv/bin/activate
pip install - r requirements.txt #default requirements
pip install tensorflow==2.12.0

func new --name myfn --template "HTTP trigger"

#add import
sed '1 i\from tensorflow.keras.model import Model' myfn/__init__.py

Just as a sanity check, I run
>python3 --version
Python 3.9.16

>python3 -c 'from tensorflow.keras.models import Model;print("done")'

2023-04-20 20:17:47.040057: I tensorflow/core/util/port.cc:110] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2023-04-20 20:17:47.041210: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used.
2023-04-20 20:17:47.064363: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used.
2023-04-20 20:17:47.064678: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-04-20 20:17:47.568547: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
done

Expected behavior
Provide a description of the expected behavior.
I expect to run func start and not see any error.
Actual behavior
Provide a description of the actual behavior observed.
Running func start
> func start

Found Python version 3.9.16 (python3).
Core Tools Version:       4.0.5095 Commit hash: N/A  (64-bit)
Function Runtime Version: <IP_ADDRESS>96

....

[2023-04-20T18:11:50.035Z] Error in load_function. ...

[2023-04-20T18:11:50.038Z] Worker failed to load function: 'myfn' with functionId: 'a6354057-27c3-40d7-b532-68c65ca5e00b'.
[2023-04-20T18:11:50.038Z] Result: Failure
[2023-04-20T18:11:50.038Z] Exception: ImportError: cannot import name 'builder' from 'google.protobuf.internal' (/home/jry/apps/azure-function-cli-new/workers/python/3.9/LINUX/X64/google/protobuf/internal/__init__.py). Please check the requirements.txt file for the missing module. For more info, please refer the troubleshooting guide: https://aka.ms/functions-modulenotfound
[2023-04-20T18:11:50.038Z] Stack:   File "/home/jry/apps/azure-function-cli-new/workers/python/3.9/LINUX/X64/azure_functions_worker/dispatcher.py", line 357, in _handle__function_load_request
[2023-04-20T18:11:50.038Z]     func = loader.load_function(
[2023-04-20T18:11:50.038Z]   File "/home/jry/apps/azure-function-cli-new/workers/python/3.9/LINUX/X64/azure_functions_worker/utils/wrappers.py", line 48, in call
[2023-04-20T18:11:50.039Z]     raise extend_exception_message(e, message)
[2023-04-20T18:11:50.039Z]   File "/home/jry/apps/azure-function-cli-new/workers/python/3.9/LINUX/X64/azure_functions_worker/utils/wrappers.py", line 44, in call
[2023-04-20T18:11:50.039Z]     return func(*args, **kwargs)
[2023-04-20T18:11:50.039Z]   File "/home/jry/apps/azure-function-cli-new/workers/python/3.9/LINUX/X64/azure_functions_worker/loader.py", line 132, in load_function
[2023-04-20T18:11:50.039Z]     mod = importlib.import_module(fullmodname)
[2023-04-20T18:11:50.039Z]   File "/home/jry/.pyenv/versions/3.9.16/lib/python3.9/importlib/__init__.py", line 127, in import_module
[2023-04-20T18:11:50.039Z]     return _bootstrap._gcd_import(name[level:], package, level)
[2023-04-20T18:11:50.039Z]   File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
[2023-04-20T18:11:50.039Z]   File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
[2023-04-20T18:11:50.039Z]   File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
[2023-04-20T18:11:50.039Z]   File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
[2023-04-20T18:11:50.039Z]   File "<frozen importlib._bootstrap_external>", line 850, in exec_module
[2023-04-20T18:11:50.039Z]   File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
[2023-04-20T18:11:50.039Z]   File "/home/jry/source/jaroslavknotek/az-micro-precipitates/segment-precipiates/__init__.py", line 4, in <module>
[2023-04-20T18:11:50.039Z]     from tensorflow.keras.models import Model
[2023-04-20T18:11:50.039Z]   File "/home/jry/source/jaroslavknotek/az-micro-precipitates/.venv/lib/python3.9/site-packages/tensorflow/__init__.py", line 37, in <module>
[2023-04-20T18:11:50.039Z]     from tensorflow.python.tools import module_util as _module_util
[2023-04-20T18:11:50.040Z]   File "/home/jry/source/jaroslavknotek/az-micro-precipitates/.venv/lib/python3.9/site-packages/tensorflow/python/__init__.py", line 37, in <module>
[2023-04-20T18:11:50.040Z]     from tensorflow.python.eager import context
[2023-04-20T18:11:50.040Z]   File "/home/jry/source/jaroslavknotek/az-micro-precipitates/.venv/lib/python3.9/site-packages/tensorflow/python/eager/context.py", line 28, in <module>
[2023-04-20T18:11:50.040Z]     from tensorflow.core.framework import function_pb2
[2023-04-20T18:11:50.040Z]   File "/home/jry/source/jaroslavknotek/az-micro-precipitates/.venv/lib/python3.9/site-packages/tensorflow/core/framework/function_pb2.py", line 5, in <module>
[2023-04-20T18:11:50.040Z]     from google.protobuf.internal import builder as _builder

The func starts fails even though it's run from within the same virtual environment, with the same pytohon. For some reason, it looks for protobuf's builder in
/home/jry/apps/azure-function-cli-new/workers/python/3.9/LINUX/X64/google/protobuf/internal/__init__.py

and not
lib/python3.10/site-packages/...

I checked your guide and found protobuf wheels in
.venv/lib/python3.10/site-packages/keras/protobuf
.venv/lib/python3.10/site-packages/tensorflow/protobuf

even running
>python3 -c 'from google.protobuf.internal import builder as _builder'

works fine.
Contents of the requirements.txt file:
Provide the requirements.txt file to help us find out module related issues.
Just default:
azure-functions

Related information
Provide any related information
Summary:

python  3.9.16 (python3).
func Core Tools Version:       4.0.5095 Commit hash: N/A  (64-bit)
func Function Runtime Version: <IP_ADDRESS>96
tensorflow = 2.12.0
protobuf =4.22.3/4.22.1 both fail
System archlinux 6.2.1-arch1-1

What can I do to resolve this problem? Searching for solution leads nowhere as I went throght

guide
Similar problems at stack overflow here and here

EDIT:
There is a workaround that works for me - isolate dependencies with PYTHON_ISOLATE_WORKER_DEPENDENCIES=1
PYTHON_ISOLATE_WORKER_DEPENDENCIES=1 func start

Just ran into the same problem!
I am trying to use Python's protobuf.
As the Azure Functions Core Tools contains an older version from protobuf, my function fails because it tries to load it from there, not from the .venv with the proper requirements.txt
func host start sys path:
['C:\\Program Files\\Microsoft\\Azure Functions Core Tools\\workers\\python\\3.10/WINDOWS/X64',
'C:\\Program Files\\Microsoft\\Azure Functions Core Tools\\workers\\python\\3.10\\WINDOWS\\X64',
'C:\\Users\\user\\miniconda3\\python310.zip',
'C:\\Users\\user\\miniconda3\\DLLs',
'C:\\Users\\user\\miniconda3\\lib',
'C:\\Users\\user\\miniconda3',
'c:\\dev\\function\\.venv',
'c:\\dev\\function\\.venv\\lib\\site-packages',
'C:\\dev\\function']

Exception: ImportError: cannot import name 'builder' from 'google.protobuf.internal' (C:\Program Files\Microsoft\Azure Functions Core Tools\workers\python\3.10/WINDOWS/X64\google\protobuf\internal\__init__.py)

I found a workaround (and added to the issue's description). Set env var PYTHON_ISOLATE_WORKER_DEPENDENCIES=1 before running. It work's for the local runner. However, it doesn't solve the issue with protobuf.

use this protobuf~=3.19.3 in requirements.txt file as its working fine .We are investigating more on this.
Thanks


User name for email

Looks like the name used in the email is the user name (95% sure) and not the person name.
This makes sense as we may have emails from several teams and only the one greating.
So we need a way for someone, maybe the end user to be able to refresh from IAM. Similar to OPP

@laholstege (1) update name for team from myStuff page -> perhaps go to some profile page first?
(2) Check emails are using team name and not username


Completions break when user input is longer than a chosen suggestion

I'm trying a new fuzzy completer for prompt_toolkit and during an experiment I uncovered the following bug.
Try the following example script:
#!/usr/bin/env python
from __future__ import unicode_literals

from prompt_toolkit.completion import Completer, Completion
from prompt_toolkit.shortcuts import get_input

animals = [
    'alligator',
    'fish',
    'turtle',
    ]

class FuzzyCompleter(Completer):
    def get_completions(self, document, complete_event):
        word_before_cursor = document.get_word_before_cursor(WORD=True)
        yield Completion(animals[0], -len(word_before_cursor))

def main():
    text = get_input('Give some animals: ', completer=FuzzyCompleter())
    print('You said: %s' % text)

if __name__ == '__main__':
    main()

Save it as auto_fuzzy.py and run it. python auto_fuzzy.py.
In the user input type abcdefaalkjafoij (or something quite long) and then press . It will crash with the following error message:
Give some animals: ads;kljaoijasdlkjf;alkjTraceback (most recent call last):
  File "auto_fuzzy.py", line 24, in <module>
    main()
  File "auto_fuzzy.py", line 20, in main
    text = get_input('Give some animals: ', completer=FuzzyCompleter())
  File "/Users/amjith/Dropbox/code/python/python-prompt-toolkit/prompt_toolkit/shortcuts.py", line 286, in get_input
    document = cli.read_input()
  File "/Users/amjith/Dropbox/code/python/python-prompt-toolkit/prompt_toolkit/interface.py", line 321, in read_input
    self.eventloop.run(self.stdin, self.create_eventloop_callbacks())
  File "/Users/amjith/Dropbox/code/python/python-prompt-toolkit/prompt_toolkit/eventloop/posix.py", line 81, in run
    c()
  File "/Users/amjith/Dropbox/code/python/python-prompt-toolkit/prompt_toolkit/interface.py", line 570, in callback
    self._redraw()
  File "/Users/amjith/Dropbox/code/python/python-prompt-toolkit/prompt_toolkit/interface.py", line 293, in _redraw
    self.renderer.render(self, self.layout, self.style)
  File "/Users/amjith/Dropbox/code/python/python-prompt-toolkit/prompt_toolkit/renderer.py", line 307, in render
    extended_height=size.rows,
  File "/Users/amjith/Dropbox/code/python/python-prompt-toolkit/prompt_toolkit/layout/containers.py", line 81, in write_to_screen
    dimensions = [c.height(cli, write_position.width) for c in self.children]
  File "/Users/amjith/Dropbox/code/python/python-prompt-toolkit/prompt_toolkit/layout/containers.py", line 239, in height
    return self.content.height(cli, width)
  File "/Users/amjith/Dropbox/code/python/python-prompt-toolkit/prompt_toolkit/layout/containers.py", line 594, in height
    preferred_height = self.content.preferred_height(cli, width)
  File "/Users/amjith/Dropbox/code/python/python-prompt-toolkit/prompt_toolkit/layout/controls.py", line 237, in preferred_height
    screen = self.create_screen(cli, width, None)
  File "/Users/amjith/Dropbox/code/python/python-prompt-toolkit/prompt_toolkit/layout/controls.py", line 378, in create_screen
    x, y = cursor_position_to_xy(buffer.complete_state.original_document.cursor_position)
  File "/Users/amjith/Dropbox/code/python/python-prompt-toolkit/prompt_toolkit/layout/controls.py", line 336, in cursor_position_to_xy
    return indexes_to_pos[cursor_position]
KeyError: 42

The cause is the user input is longer than the completion that was recommended when the  key is pressed. This exception doesn't happen if the user input is shorter than the suggestion.

That's a serious bug. Thanks for reporting, @amjith. I'll fix it asap.

Fixed in: https://github.com/jonathanslenders/python-prompt-toolkit/commit/0b4a2424b1ed3cf4c4975492f34f37d53080ba0d


Fix "Start here" links

It looks like the "Start here" link the in specs lead to a 404 error. Same for https://github.com/jspecify/jspecify/blob/main/docs/src/pages/start-here.md which has also a broken link.

Oh, interesting, this is a downside that I hadn't considered to using a documentation system like Docusaurus: If you view the pages at https://jspecify.dev/docs/spec/ and https://jspecify.dev/start-here/, the links are correct. However, if you use the Markdown view of the source of those pages in the GitHub browser, then the links don't work.
Maybe we should see if we can make the pages display a banner in the GitHub view that directs users to jspecify.dev?
Another option would be to use absolute links ("https://jspecify.dev/docs/start-here/") in the site. However, I think that would prevent Docusaurus from checking for (ironically enough) broken links, which it does automatically if we use the "/docs/start-here" style of link. (It would probably also prevent Docusaurus from performing its magic navigation between pages, though I'm not sure how important that is.)

Oh, I see, thanks for providing additional context. I guess I had the habit to go to those Markdown pages as we were working on 1.0, but if those links are fine when deployed, I think that's ok-ish as it is and I can close this issue.


Feature/markdown filter wrap

Coverage remained the same at 68.622% when pulling d9951a313e185f5193b3f9c2a811791c6b9b4bda on feature/markdown-filter-wrap into 9d35d785f1824bc61c12220a551dcbb6ea005d50 on master.


Improve documentation around ONNX export

Document --for-ort and --task XXX-with-past.
Fixes https://github.com/huggingface/optimum/issues/640
Before submitting

[x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.


return to legacy behaviour https://github.com/pixijs/pixi.js/issues/2565

#2567 Sprites width/height must be in sync with getLocalBounds

And now by mistake, it fixes TilingSprite blendMode too.


add appdeployment control logic

This is part 2 of splitting https://github.com/oam-dev/kubevela/pull/1193 . part 1: #1272 . Ref issue: https://github.com/oam-dev/kubevela/issues/1144

This PR adds the appDeployment control logic, so it implements multi-revision and multi-cluster features.
Instead of relying on AppConfig and Component, the controller now renders k8s resources directly (see workloadRenderer).
It also adds an integration test to cover the main logic.
It relies on appRevision label which has a bug (https://github.com/oam-dev/kubevela/issues/1253). But this won't affect the main logic testing since we are generating AppRevisions there.

@wonderflow All tests passed


[BUG]  No photo in exported pdf

Describe the bug
No photo in exported pdf

Product Flavor

[x] Managed (https://rxresu.me)
[ ] Self Hosted

To Reproduce

When I export my resume with photo in pdf, the photo is always missing in the pdf file
Same problem if i try the share link then download the pdf
Expected behavior
The resume is exported in pdf, including the photo
Screenshots

Desktop (please complete the following information):

OS:
Browser
Version

Additional context

Works again, thank you


error Call to a member function tryMention()

hi
Call to a member function tryMention() on a non-object in /home///***/vendor/longman/telegram-bot/src/Commands/SystemCommands/NewchatmemberCommand.php on line 42
Call to a member function getQuery()
Call to a member function getId()

When does this error happen / what action you do triggers it?
Also, could you post the raw update string for us to see?

after in start bot this error happen
any type Actions do tiggers ..

Do you have the latest version 0.35?

yes

Could you please activate the raw update log and then post the raw update(s)?
That way we can see why the error is happening. At the moment, it seems like Telegram is sending an incomplete update.

closing here fell free to reopen


[Event Hubs] refactor receiver to share amqp link

This refactor allows the same amqp link to be shared between streaming and batching receivers.
Most of the changes are in the EventHubConsumer and EventHubReceiver classes.
The BatchingReceiver and StreamingReceiver classes have been removed. The EventHubConsumer (receiver.ts) instantiates a single EventHubReceiver class which manages the amqp link. This consolidates the checkpoint logic which previously existed across both classes.
When switching between streaming and batching modes (or using the event iterator) it's possible for the amqp link to have credits after the user stops reading events. Since drain isn't currently supported, EventHubReceiver has an internal queue that stores events that are received when there aren't any active listeners (e.g. receiveBatch, streaming). The internal queue will be exhausted before adding credits to the AMQP link.
See #3320 for more context.
Fixes #3938

/azp run js - eventhubs-client - tests

Lives tests all green, merging!


I use inline action to transfer users eos to my contract, but there is a permission error,please help

here is code:
action(permission_level{from, "active"_n}, "eosio.token"_n, "transfer"_n,
std::make_tuple(from, _self, quantity, memo)).send();
I add code permission as below:
cleos set account permission addressbook active --add-code
error:
error 2019-02-26T23:49:48.913 thread-0  http_plugin.cpp:580           handle_exception     ] FC Exception encountered while processing chain.push_transaction
debug 2019-02-26T23:49:48.914 thread-0  http_plugin.cpp:581           handle_exception     ] Exception Details: 3090003 unsatisfied_authorization: Provided keys, permissions, and delays do not satisfy declared authorizations
transaction declares authority '{"actor":"tester","permission":"active"}', but does not have signatures for it under a provided delay of 0 ms, provided permissions [{"actor":"addressbook","permission":"eosio.code"}], provided keys [], and a delay max limit of<PHONE_NUMBER> ms
{"auth":{"actor":"tester","permission":"active"},"provided_delay":0,"provided_permissions":[{"actor":"addressbook","permission":"eosio.code"}],"provided_keys":[],"delay_max_limit_ms":3888000000}
thread-0  authorization_manager.cpp:520 check_authorization
pending console output: inline action
{"console":"inline action"}
thread-0  apply_context.cpp:72 exec_one

You need to add permission of eosio.code to your contract just like this:
cleos set account permission yourcontract active '{"threshold": 1,"keys": [{"key": "yourcontract public active key","weight": 1}],"accounts": [{"permission":{"actor":"yourcontract","permission":"eosio.code"},"weight":1}]}' owner -p yourcontract@active

But my question here is that if some one other than contract owner wants to send EOS through your contract does he need the permission as well, So every time new user comes he needs new permissions to be granted. Or this thing is hangled by eosjs?

I resolve this problem.  I refer this project, the project site :https://github.com/InfiniverseAR/infiniverse-eos
eosjs can make a transcation as：opendeposit  ->   eos token transfer ->   action
the flow as:  opendeposit ->  eos token transfer -> depositeos -> action -> deduct_eos_deposit -> action end


Allow installation of Symfony 4.0

Q
A

Bug fix?
no

New feature?
yes

BC breaks?
no

Related tickets
N/A

License
MIT

Closing in favour of #102. Thanks Edi :)

Thank you for sf4 support ;)


feat: inject fetch POC

POC of how we could get rid of globally setting fetch on fetchival in a non-breaking way, defaulting to the previous behavior if fetch is not injected via options. Just a basis for discussion, if we want to go ahead with this, I'd propose we do the same thing for the experimental version.
Towards https://github.com/ExodusMovement/exodus-hydra/pull/3966#issuecomment-1714273515

I personally prefer the factory because it separates parameters that are use-case dependant from those that aren't. Initially I didn't go for that because I thought it would be breaking, but thinking about it again we can still export an instance created from that same factory defaulting to the fetch instance in the same way as we currently do. Will change