text:
json Conversions to/from C++ objects

Does Boost.json support conversions from C++ objects to json, and from json to C++ objects? Use case is in the interface between C++ application and calls to the ArangoDB HTTP REST API. I'm using libcurl to generate REST calls (with json bodies) into ArangoDB, and I need to convert C++ object members and their values to json for those calls. Then, on the return route, I need to populate C++ object members with the json data returned from ArangoDB calls. I also need to know if such conversions can be done recursively, or only singly.
What of the case where my C++ objects exist in a vector or other std container? I'm looking for functionality akin to that noted here: https://stackoverflow.com/questions/17549906/c-json-serialization
Scroll down to the solution with 85 votes, posted by Guillaume Racicot.

The library supports conversions to and from user-defined types via value_to<T>(expr) and value_from(expr). Generic conversions for container types can be done by the library out of the box so long as they fit a certain "container-like" criteria, and such conversions are performed recursively. You can find some more details of what is supported here: http://vinniefalco.github.io/doc/json/json/usage/conversion.html
If the generic conversions that we provide aren't enough, you can implement the conversion yourself by providing overloads for tag_invoke. These will be found by ADL and value_to/from will use them for the conversion.

Short answer: Yes (http://vinniefalco.github.io/doc/json/json/usage/conversion.html)
Long answer:
Given a user defined type T:
    T t;
    ...
    // Convert from T to json::value
    json::value jv = json::value_from( t );

    // Convert json::value to T
    T t2 = json::value_to( jv );

This is accomplished by providing overloads of tag_invoke for T in the namespace of T:
    // Called to convert json::value to T
    T tag_invoke( json::value_to_tag<T>, json::value const& jv );

    // Called to convert T to json::value
    void tag_invoke( json::value_from_tag, json::value& jv, T const& );

Thanks so much for the quick and affirmative reply!
From: Krystian Stasiowski notifications@github.com
Sent: Friday, August 28, 2020 10:45 AM
To: CPPAlliance/json json@noreply.github.com
Cc: Joe Stroupe joes@altia.com; Author author@noreply.github.com
Subject: Re: [CPPAlliance/json] json Conversions to/from C++ objects (#223)
The library supports conversions to and from user-defined types via value_to(expr) and value_from(expr). Generic conversions for container types can be done by the library out of the box so long as they fit a certain "container-like" criteria, and such conversions are performed recursively. You can find some more details of what is supported here: http://vinniefalco.github.io/doc/json/json/usage/conversion.htmlhttps://urldefense.proofpoint.com/v2/url?u=http-3A__vinniefalco.github.io_doc_json_json_usage_conversion.html&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=5A_10QhbcVY9c2fmrueuRCkSqZbYmLXytgPNdq_aUZw&s=Q6fNKtLX4EuiPiudNm2uK5trJVV3KWZ1drJH6quNWyM&e=
If the generic conversions that we provide aren't enough, you can implement the conversion yourself by providing overloads for tag_invoke. These will be found by ADL and value_to/from will use them for the conversion.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_CPPAlliance_json_issues_223-23issuecomment-2D682866531&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=5A_10QhbcVY9c2fmrueuRCkSqZbYmLXytgPNdq_aUZw&s=IlfZ91Ykt5ca7jKFTsxb-dtNnaljs7mKopyb1UKb41c&e=, or unsubscribehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ACAKC23EUBUKEFFDWNHZWUDSC7NI7ANCNFSM4QOJ33JA&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=5A_10QhbcVY9c2fmrueuRCkSqZbYmLXytgPNdq_aUZw&s=ERVnBo57gj6NnQNXyKeBtk4uLtapmbMq3Q3TC34ELLs&e=.

Thanks so much for the quick and affirmative reply!
From: Vinnie Falco notifications@github.com
Sent: Friday, August 28, 2020 10:45 AM
To: CPPAlliance/json json@noreply.github.com
Cc: Joe Stroupe joes@altia.com; Author author@noreply.github.com
Subject: Re: [CPPAlliance/json] json Conversions to/from C++ objects (#223)
Short answer: Yes (http://vinniefalco.github.io/doc/json/json/usage/conversion.htmlhttps://urldefense.proofpoint.com/v2/url?u=http-3A__vinniefalco.github.io_doc_json_json_usage_conversion.html&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=jfMbSzBKILQ2c7DL8HBgAHYp1jEtMut2yrwIfEx2kHY&s=NP2iSgkjfpWlfEXlQxZv9b7Cov18w19YvhhpmNoL3Zw&e=)
Long answer:
Given a user defined type T:
T t;

...

// Convert from T to json::value

json::value jv = json::value_from( t );

// Convert json::value to T

T t2 = json::value_to( jv );

This is accomplished by providing overloads of tag_invoke for T in the namespace of T:
// Called to convert json::value to T

T tag_invoke( json::value_to_tag<T>, json::value const& jv );

// Called to convert T to json::value

void tag_invoke( json::value_from_tag, json::value& jv, T const& );

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_CPPAlliance_json_issues_223-23issuecomment-2D682867163&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=jfMbSzBKILQ2c7DL8HBgAHYp1jEtMut2yrwIfEx2kHY&s=wcwATpnR6_tCLm8ALqLOqFXW4NgejVGXjJxRgEzoQJg&e=, or unsubscribehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ACAKC27LEUUC5D3YV75YXRTSC7NKNANCNFSM4QOJ33JA&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=jfMbSzBKILQ2c7DL8HBgAHYp1jEtMut2yrwIfEx2kHY&s=S2oDtKenr80hHQVyFPVaiUWlUwXLulEIMLNqzUSZAMw&e=.

Hi Vinnie,
I want to build the json lib as MD/d, since that would match my C++ project I want to integrate your json lib into. In order to do this kind of build, do I need to actually edit the common.cmake file to turn off static build, or is there a higher-level define or flag I should set to achieve MD/d (Multi-user Dynamic Debug) build?
In common.cmake:
Static library linkage.
set(BUILD_SHARED_LIBS OFF CACHE STRING "")
add_definitions(-DBOOST_ALL_STATIC_LINK=1)
Thanks,
William
From: Vinnie Falco notifications@github.com
Sent: Friday, August 28, 2020 10:45 AM
To: CPPAlliance/json json@noreply.github.com
Cc: Joe Stroupe joes@altia.com; Author author@noreply.github.com
Subject: Re: [CPPAlliance/json] json Conversions to/from C++ objects (#223)
Short answer: Yes (http://vinniefalco.github.io/doc/json/json/usage/conversion.htmlhttps://urldefense.proofpoint.com/v2/url?u=http-3A__vinniefalco.github.io_doc_json_json_usage_conversion.html&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=jfMbSzBKILQ2c7DL8HBgAHYp1jEtMut2yrwIfEx2kHY&s=NP2iSgkjfpWlfEXlQxZv9b7Cov18w19YvhhpmNoL3Zw&e=)
Long answer:
Given a user defined type T:
T t;

...

// Convert from T to json::value

json::value jv = json::value_from( t );

// Convert json::value to T

T t2 = json::value_to( jv );

This is accomplished by providing overloads of tag_invoke for T in the namespace of T:
// Called to convert json::value to T

T tag_invoke( json::value_to_tag<T>, json::value const& jv );

// Called to convert T to json::value

void tag_invoke( json::value_from_tag, json::value& jv, T const& );

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_CPPAlliance_json_issues_223-23issuecomment-2D682867163&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=jfMbSzBKILQ2c7DL8HBgAHYp1jEtMut2yrwIfEx2kHY&s=wcwATpnR6_tCLm8ALqLOqFXW4NgejVGXjJxRgEzoQJg&e=, or unsubscribehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ACAKC27LEUUC5D3YV75YXRTSC7NKNANCNFSM4QOJ33JA&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=jfMbSzBKILQ2c7DL8HBgAHYp1jEtMut2yrwIfEx2kHY&s=S2oDtKenr80hHQVyFPVaiUWlUwXLulEIMLNqzUSZAMw&e=.

I want to build the json lib as MD/d

The easiest thing to do is ignore my CMakeLists.txt and just add src.cpp to your project:
https://github.com/CPPAlliance/json/blob/397a31f1667150a94c1b079de83bec85065729f6/src/src.cpp
Alternatively, just add the following line to any one of your translation units:
#include <boost/json/src.hpp>

Thanks Vinnie!
From: Vinnie Falco notifications@github.com
Sent: Friday, August 28, 2020 3:16 PM
To: CPPAlliance/json json@noreply.github.com
Cc: Joe Stroupe joes@altia.com; Author author@noreply.github.com
Subject: Re: [CPPAlliance/json] json Conversions to/from C++ objects (#223)
I want to build the json lib as MD/d
The easiest thing to do is ignore my CMakeLists.txt and just add src.cpp to your project:
https://github.com/CPPAlliance/json/blob/397a31f1667150a94c1b079de83bec85065729f6/src/src.cpphttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_CPPAlliance_json_blob_397a31f1667150a94c1b079de83bec85065729f6_src_src.cpp&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=IpPM2rzRFh2zYymEpeNok-bzqm4k2ntILN5mu-qO9HE&s=4_dUFOR_av33R6Or8cO3kbV1WAopy9yh3CRKFKfxWCM&e=
Alternatively, just add the following line to any one of your translation units:
#include <boost/json/src.hpp>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_CPPAlliance_json_issues_223-23issuecomment-2D683150217&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=IpPM2rzRFh2zYymEpeNok-bzqm4k2ntILN5mu-qO9HE&s=7ic8ebtWR1goSjEsdBhQvlwNoyYOqH8iF0OEiMTnZl4&e=, or unsubscribehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ACAKC232WX4BWG7FBMKMIA3SDANCNANCNFSM4QOJ33JA&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=IpPM2rzRFh2zYymEpeNok-bzqm4k2ntILN5mu-qO9HE&s=hujlsnsJsRIJqoVxMzu-yl_A4_Vo2ODerIBlZdH2ZqM&e=.

Looks like this is resolved, thanks!

Hi Vinnie,
In a few days I’ll have proof-of-concept code I’ve written as to how I’m implementing your Boost.json into my C++ code which uses libcurl to perform HTTP REST requests against the ArangoDB database.
Would it be possible for you to critique how I’m implementing your library? I suspect I’m going to hear some real criticism on my approach – that’s fine, I want to get this right.
If you would be willing to critique it, what is your preferred way for me to get you the code and explanation of what I’m trying to do?
Thanks so much for your consideration, and this very nice library!
William Stroupe
From: Vinnie Falco notifications@github.com
Sent: Friday, August 28, 2020 10:45 AM
To: CPPAlliance/json json@noreply.github.com
Cc: Joe Stroupe joes@altia.com; Author author@noreply.github.com
Subject: Re: [CPPAlliance/json] json Conversions to/from C++ objects (#223)
Short answer: Yes (http://vinniefalco.github.io/doc/json/json/usage/conversion.htmlhttps://urldefense.proofpoint.com/v2/url?u=http-3A__vinniefalco.github.io_doc_json_json_usage_conversion.html&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=jfMbSzBKILQ2c7DL8HBgAHYp1jEtMut2yrwIfEx2kHY&s=NP2iSgkjfpWlfEXlQxZv9b7Cov18w19YvhhpmNoL3Zw&e=)
Long answer:
Given a user defined type T:
T t;

...

// Convert from T to json::value

json::value jv = json::value_from( t );

// Convert json::value to T

T t2 = json::value_to( jv );

This is accomplished by providing overloads of tag_invoke for T in the namespace of T:
// Called to convert json::value to T

T tag_invoke( json::value_to_tag<T>, json::value const& jv );

// Called to convert T to json::value

void tag_invoke( json::value_from_tag, json::value& jv, T const& );

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_CPPAlliance_json_issues_223-23issuecomment-2D682867163&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=jfMbSzBKILQ2c7DL8HBgAHYp1jEtMut2yrwIfEx2kHY&s=wcwATpnR6_tCLm8ALqLOqFXW4NgejVGXjJxRgEzoQJg&e=, or unsubscribehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ACAKC27LEUUC5D3YV75YXRTSC7NKNANCNFSM4QOJ33JA&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=jfMbSzBKILQ2c7DL8HBgAHYp1jEtMut2yrwIfEx2kHY&s=S2oDtKenr80hHQVyFPVaiUWlUwXLulEIMLNqzUSZAMw&e=.

If you would be willing to critique it, what is your preferred way for me to get you the code and explanation of what I’m trying to do?

I am more than happy to comment on the usage of my libraries in other programs. The best way to do that is to open a pull request against your own GitHub repository, and add me as a reviewer so I can leave comments.

Hey Vinnie,
Thanks so much for your interest and help! At this point I don’t have the code in a repo since it’s really just my initial take on how to get familiar with your library, and the interactions between the libcurl Requirements for json bodies and the Boost.json tools.
But when I’m ready I could send you a zip file with the code and a good explanation of what I’m trying/needing to accomplish.
Thanks,
William
From: Vinnie Falco notifications@github.com
Sent: Tuesday, September 01, 2020 2:16 PM
To: CPPAlliance/json json@noreply.github.com
Cc: Joe Stroupe joes@altia.com; Author author@noreply.github.com
Subject: Re: [CPPAlliance/json] json Conversions to/from C++ objects (#223)
If you would be willing to critique it, what is your preferred way for me to get you the code and explanation of what I’m trying to do?
I am more than happy to comment on the usage of my libraries in other programs. The best way to do that is to open a pull request against your own GitHub repository, and add me as a reviewer so I can leave comments.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_CPPAlliance_json_issues_223-23issuecomment-2D685107086&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=m-cmCDi4dsGfJJqAIqp2W1kOsuO-_NKJLMfA5JXHPh8&s=Nl79Mg3lmoUZIJFItJE4CDM6Spg6AE92xV-OLll_12A&e=, or unsubscribehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ACAKC27HOEQNAODWTCK6IILSDVI7HANCNFSM4QOJ33JA&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=m-cmCDi4dsGfJJqAIqp2W1kOsuO-_NKJLMfA5JXHPh8&s=k4CsxOCDiKcFEZN8QTpQoq5H7SRv6j8i0Ex16Hq_xTQ&e=.

But when I’m ready I could send you a zip file with the code and a good explanation of what I’m trying/needing to accomplish.

I encourage you to create a repository. It is easy, and free. I can't really comment on a zip file. GitHub has wonderful tools for collaboration - we should use it!

Ok – will do – thx!
From: Vinnie Falco notifications@github.com
Sent: Tuesday, September 01, 2020 3:05 PM
To: CPPAlliance/json json@noreply.github.com
Cc: Joe Stroupe joes@altia.com; Author author@noreply.github.com
Subject: Re: [CPPAlliance/json] json Conversions to/from C++ objects (#223)
But when I’m ready I could send you a zip file with the code and a good explanation of what I’m trying/needing to accomplish.
I encourage you to create a repository. It is easy, and free. I can't really comment on a zip file. GitHub has wonderful tools for collaboration - we should use it!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_CPPAlliance_json_issues_223-23issuecomment-2D685131663&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=TafC5rD9P3U1Eq_PRL6OcpJCnLZND5lVfPl_JObVF1w&s=ESLqEdE5P60EmnSYeWFN71U9SuGyNLszhy1g_OKW8U4&e=, or unsubscribehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ACAKC2ZDQ7THPZXQIAUULETSDVOXPANCNFSM4QOJ33JA&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=TafC5rD9P3U1Eq_PRL6OcpJCnLZND5lVfPl_JObVF1w&s=a5EC9EQ5mdPtEFDP6u9tT9xhwha87Jp3ueB-VU8MmsY&e=.

Hi Vinnie,
The docs have examples of calling the serialize() function to output a std::string from a json value, and the examples give a nicely formatted json string as output, exactly as required for an HTTP request, but the only function I see is json::to_string(). There appears to be no such function or object named “serialize”.
When I use to_string() I get a string with ‘[‘ ‘]’ brkts and it’s not suitable for a json body in an HTTP request. What am I missing here?
Thanks,
William
From: Vinnie Falco notifications@github.com
Sent: Tuesday, September 01, 2020 3:05 PM
To: CPPAlliance/json json@noreply.github.com
Cc: Joe Stroupe joes@altia.com; Author author@noreply.github.com
Subject: Re: [CPPAlliance/json] json Conversions to/from C++ objects (#223)
But when I’m ready I could send you a zip file with the code and a good explanation of what I’m trying/needing to accomplish.
I encourage you to create a repository. It is easy, and free. I can't really comment on a zip file. GitHub has wonderful tools for collaboration - we should use it!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_CPPAlliance_json_issues_223-23issuecomment-2D685131663&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=TafC5rD9P3U1Eq_PRL6OcpJCnLZND5lVfPl_JObVF1w&s=ESLqEdE5P60EmnSYeWFN71U9SuGyNLszhy1g_OKW8U4&e=, or unsubscribehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ACAKC2ZDQ7THPZXQIAUULETSDVOXPANCNFSM4QOJ33JA&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=TafC5rD9P3U1Eq_PRL6OcpJCnLZND5lVfPl_JObVF1w&s=a5EC9EQ5mdPtEFDP6u9tT9xhwha87Jp3ueB-VU8MmsY&e=.

I just changed to_string to serialize. Have you picked up the latest develop branch?

When I use to_string() I get a string with ‘[‘ ‘]’ brkts and it’s not suitable for a json body in an HTTP request.

Yeah...that's the problem. The standard library and Boost already provide many overloads of to_string so even though I took out the function, another overload is still being found! So it is being converted incorrectly...

Hi Vinnie,
I just picked up the latest dev branch (says updated 2 days ago), changed my code to use boost::json::serialize(), and made sure all the new code is indeed being used in my VS 2019 project. I know it is now because the serialize() function is now seen by VS 2019.
However, after a clean and rebuild it did not change the output from what it was before, when I was using to_string().
My project does NOT use Boost anywhere, and I have no environment variables set for Boost.
I am using namespace boost::json after including <boost/json/src.hpp>
I have a pre-processor define BOOST_JSON_STANDALONE in my project.
Any suggestions on how to get the new serialize() to work correctly?
Thanks!
William
From: Vinnie Falco notifications@github.com
Sent: Tuesday, September 08, 2020 9:58 AM
To: CPPAlliance/json json@noreply.github.com
Cc: Joe Stroupe joes@altia.com; Author author@noreply.github.com
Subject: Re: [CPPAlliance/json] json Conversions to/from C++ objects (#223)
I just changed to_string to serialize. Have you picked up the latest develop branch?
When I use to_string() I get a string with ‘[‘ ‘]’ brkts and it’s not suitable for a json body in an HTTP request.
Yeah...that's the problem. The standard library and Boost already provide many overloads of to_string so even though I took out the function, another overload is still being found! So it is being converted incorrectly...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_CPPAlliance_json_issues_223-23issuecomment-2D688974043&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=UJnVWwSk9SUV8CCeV5E74GsbgNieT2REnNJlT0l15hM&s=C0CP6AurYkS0fwm_URPQxgoVVgA58jc_QPj3LebSNWY&e=, or unsubscribehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ACAKC2ZILJKIZH455PTQXYLSEZIARANCNFSM4QOJ33JA&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=UJnVWwSk9SUV8CCeV5E74GsbgNieT2REnNJlT0l15hM&s=VmaO0jbbZc16GBJvQOpA9ZUikwmZX59V8cB94kkboq8&e=.

Any suggestions on how to get the new serialize() to work correctly?

Can you please provide a small sample program that demonstrates the problem?

Sure – see attached zip file.
In the jsonBodyBuilder class you’ll see code I wrote to do the conversion the correct way – that code is #defined out, and I’m calling serialize() instead.
There’s other test code in the .cpp file that is also #defined out. The operative code is just a few lines, as you’ll see.
Thanks, William
From: Vinnie Falco notifications@github.com
Sent: Tuesday, September 08, 2020 10:44 AM
To: CPPAlliance/json json@noreply.github.com
Cc: Joe Stroupe joes@altia.com; Author author@noreply.github.com
Subject: Re: [CPPAlliance/json] json Conversions to/from C++ objects (#223)
Any suggestions on how to get the new serialize() to work correctly?
Can you please provide a small sample program that demonstrates the problem?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_CPPAlliance_json_issues_223-23issuecomment-2D689002477&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=HvI1wZFc9L1_gtr1-8asiiadQO827o-hGU34uOAk9YA&s=TiJtCpPNKKcmUAQqSDTfNVkPqCgDrm6z7NfzV2Vz2Jc&e=, or unsubscribehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ACAKC24BR3DPBOL2XOZQLELSEZNMLANCNFSM4QOJ33JA&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=HvI1wZFc9L1_gtr1-8asiiadQO827o-hGU34uOAk9YA&s=51gdk3VFXNELidim9URYkC2Mdi0klrc5dPbosivkSAs&e=.

I don't see any zip file, can you paste the minimal sample program here?

ArangodbBackend.h :
#pragma once
#include
#include <type_traits>
#include
#include
#include
#include
#include
#include <stdio.h>
#include <stdlib.h>
#include <tchar.h>
#include  // NULL
#include
#include
#include
#if 1
#undef DOMDocument
#ifndef MSXML_LIBRARY_DEFINED
#define MSXML_LIBRARY_DEFINED
#endif
// includes for curl
#include <curl/curl.h>
// includes for json
#include <boost/json/src.hpp>
using namespace boost::json;
#define CURL_PAIR_SEPARATOR               "":""
enum BUILD_STS
{
STARTED = 0,
FINISHED
};
// Pseudo-pair object
struct reqPair
{
std::string name;
std::string value;
};
// json body builder class
//
// singleton class.
//
// The user-facing API. Abstracts all the details away from the user.
//
class jsonBodyBuilder
{
public:
            jsonBodyBuilder(bool curl = true) : use_curl(curl), pairsAppended(0), Sts(FINISHED) {}                                      // Init options list here

            virtual ~jsonBodyBuilder() {}

            static jsonBodyBuilder& getInstance() { static jsonBodyBuilder theInstance; return theInstance; }

            // Supply a name-value pair to construct a reqPair object
            template <typename Left, typename Right>
            bool startBodyBuild(Left const l, Right const r)
            {
                            // Is this call valid at this time?
                            if (FINISHED != Sts)
                            {
                                            // Can't start when already started, and not yet finished
                                            return false;
                            }

                            // Remember to update our status
                            Sts = STARTED;

                            // Append it
                            bool result = appendBody(l, r);
                            return result;
            }

            template <typename Left, typename Right>
            bool appendBody(Left const l, Right const r)
            {
                            if (STARTED != Sts)
                            {
                                            // Can't APPEND when not yet started
                                            return false;
                            }

                            // Construct a pseudo pair object
                            reqPair *newPair = new reqPair;
                                            if (nullptr == newPair)
                                                            return false;

                            // Set up the first and second members of the Pair

                            // Is the left parameter a string-type?
                            if constexpr (!std::is_same_v<Left, const char*> // A string literal
                                            && !std::is_same_v<Left, std::string>)                                    // A std::string
                            // Nope - it's not a string-type - do std::to_string()
                            {
                                            newPair->name = std::to_string(l);
                            }
                            // It is a string-type - just copy it into the Pair.first
                            else
                            {
                                            newPair->name = l;
                            }

                            // Is the right parameter a string-type?
                            if constexpr (!std::is_same_v<Right, const char*>              // A string literal
                                            && !std::is_same_v<Right, std::string>)                                 // A std::string
                            // Nope - it's not a string-type - do std::to_string()
                            {
                                            newPair->value = std::to_string(r);
                            }
                            // It is a string-type - just copy it into the Pair.first
                            else
                            {
                                            newPair->value = r;
                            }

                            // Got a valid object - push it onto the vector
                            ReqV.push_back(newPair);

                            // Incr the # of pairs we've pushed onto the vector
                            pairsAppended++;
                            return true;
            }

            bool finishBody(std::string &s)
            {
                            if (STARTED != Sts)
                            {
                                            // Can't finish when not yet started
                                            return false;
                            }

                            // Do the convert of each object in the vector
                            value requestBodyjs = boost::json::value_from(ReqV);
                            s = boost::json::serialize(requestBodyjs);

#if 0
// If curl is being used, re-format the json body
if (use_curl)
{
//                                            boost::json::string str = to_string(requestBodyjs);
s = serialize(requestBodyjs);
                                            // Get rid of annoying '[' ']' sets
                                            s.erase(std::remove(s.begin(), s.end(), '['), s.end());
                                            s.erase(std::remove(s.begin(), s.end(), ']'), s.end());

                                            // Add missing \ in front of " where needed
                                            for (int it = 0; it != s.size(); it++)
                                            {
                                                            // The " char is the first char and needs a preceding '\'
                                                            if (s[it] == '"' && it == 0)
                                                            {
                                                                            s.insert(it, "\\");
                                                                            continue;
                                                            }
                                                            // The " char needs a preceding '\'
                                                            if (s[it] == '"' && s[it - 1] != '\\')
                                                            {
                                                                            s.insert(it, "\\");
                                                            }
                                            }

                                            // Insert "{ at start and append }" at end
                                            s.insert(0, "\"{");
                                            s.append("}\"");
                            }

#endif
                            // Reset members for next conversion
                            for (auto p : ReqV)
                                            delete p;
                            ReqV.clear();
                            pairsAppended = 0;
                            Sts = FINISHED;
                            return true;
            }

protected:
bool                                                                       use_curl;
BUILD_STS                                                          Sts;
unsigned int                                       pairsAppended;
std::vector<reqPair *>   ReqV;
};
template
void
tag_invoke(const value_from_tag&, value& jval, T const& t)
{
jval = { t->name + CURL_PAIR_SEPARATOR + t->value };
}
// Write callback function for HTTP response content
static size_t WriteCallback(void* contents, size_t size, size_t nmemb, void* userp)
{
((std::string*)userp)->append((char*)contents, size * nmemb);
return size * nmemb;
}
#endif
ArangoDB_Backend.cpp  :
// ArangoDB_Backend.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include "ArangodbBackend.h"
using namespace boost::json;
#if 0
class poo
{
public:
poo() {}
~poo() {}
int i;
};
template <typename Left, typename Right>
void test(Left const l, Right const r)
{
if constexpr (std::is_same_v<Right, const char*>)              // A string literal
{
std::cout << "Right param is string literal" << std::endl;
}
if constexpr (std::is_same_v<Right, int>)
{
std::cout << "Right param is int" << std::endl;
}
if constexpr (std::is_same_v<Right, std::string>)
{
std::cout << "Right param is std::string" << std::endl;
}
if constexpr (std::is_same_v<Right, long int>)
{
std::cout << "Right param is long int" << std::endl;
}
if constexpr (std::is_same_v<Right, long long int>)
{
std::cout << "Right param is long long int" << std::endl;
}
if constexpr (std::is_same_v<Right, float>)
{
std::cout << "Right param is float" << std::endl;
}
if constexpr (std::is_same_v<Right, double>)
{
std::cout << "Right param is double" << std::endl;
}
if constexpr (std::is_same_v<Right, unsigned int>)
{
std::cout << "Right param is unsigned int" << std::endl;
}
if constexpr (std::is_same_v<Right, unsigned long int>)
{
std::cout << "Right param is unsigned long int" << std::endl;
}
if constexpr (std::is_same_v<Right, unsigned long long int>)
{
std::cout << "Right param is unsigned long long int" << std::endl;
}
if constexpr (std::is_same_v<Right, poo>)
{
std::cout << "Right param is poo" << std::endl;
}
}
#endif
int main()
{
#if 0
poo p;
std::string s = "world";
test("const char*", "world");
test("int", 8);
test("std::string", s);
test("long int", 8L);
test("long long int", 9LL);
test("float", 3.0F);
test("double", 3.14151223456667);
test("unsigned int", 8u);
test("unsigned long int", 8ul);
test("unsigned long long int", 8ull);
test("poo", p);
#endif
#if 0
            CURL* curl;
            CURLcode res;
            std::string readBuffer;
            std::string requestURL;

            std::string requestBody;
            struct curl_slist* headers = NULL;
            long http_code;

            curl_global_init(CURL_GLOBAL_ALL);
            curl = curl_easy_init();
            if (!curl)
            {
                            std::cout << "curl init failed! << std::endl";
                            return 0;
            }

            // A PUT operation to change the name of a Collection

            curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
            curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
            curl_easy_setopt(curl, CURLOPT_USERPWD, "Joe:Siberian21");
            curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
            curl_easy_setopt(curl, CURLOPT_WRITEDATA, &readBuffer);
            readBuffer.clear();
            curl_easy_setopt(curl, CURLOPT_TCP_KEEPALIVE, 1L);
            headers = curl_slist_append(headers, "Accept: application/json");
            headers = curl_slist_append(headers, "Content-Type: application/json");
            headers = curl_slist_append(headers, "charset: utf-8");

            requestURL = "http://localhost:8529/_db/testdrive/_api/collection/testCollection11/rename";
            curl_easy_setopt(curl, CURLOPT_URL, requestURL.c_str());

            curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "PUT"); /* !!! */

            requestBody = "{\"name\":\"testCollection12\"}";
            curl_easy_setopt(curl, CURLOPT_POSTFIELDS, requestBody.c_str());
            curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, requestBody.size());

            res = curl_easy_perform(curl);
            if (CURLE_OK != res)
            {
                            std::cout << "Request failed with error code = " << curl_easy_strerror(res) << std::endl << std::endl;
            }

            curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &http_code);
            std::cout << "http code = " << http_code << std::endl << std::endl;

            std::cout << readBuffer << std::endl << std::endl;

            // Another PUT operation to change the name of a Collection again
            requestURL = "http://localhost:8529/_db/testdrive/_api/collection/testCollection12/rename";
            curl_easy_setopt(curl, CURLOPT_URL, requestURL.c_str());

            requestBody = "{\"name\":\"testCollection13\"}";
            curl_easy_setopt(curl, CURLOPT_POSTFIELDS, requestBody.c_str());
            curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, requestBody.size());
            readBuffer.clear();

            res = curl_easy_perform(curl);
            if (CURLE_OK != res)
            {
                            std::cout << "Request failed with error code = " << curl_easy_strerror(res) << std::endl << std::endl;
            }

            curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &http_code);
            std::cout << "http code = " << http_code << std::endl << std::endl;

            std::cout << readBuffer << std::endl << std::endl;

            // Create document (POST) operation without returnNew=true
            curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, NULL);         // Clear out the CUSTOMREQUEST stuff so Arangod won't think it's a PUT
            curl_easy_setopt(curl, CURLOPT_POST, 1L); /* !!! */
            curl_easy_setopt(curl, CURLOPT_TCP_KEEPALIVE, 1L);                    // Keep the connection alive
            requestURL = "http://localhost:8529/_db/testdrive/_api/document/testCollection13";
            curl_easy_setopt(curl, CURLOPT_URL, requestURL.c_str());
            requestBody.clear();
            requestBody = "{\"Hello\":\"World\"}";
            curl_easy_setopt(curl, CURLOPT_POSTFIELDS, requestBody.c_str());
            curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, requestBody.size());
            readBuffer.clear();
            res = curl_easy_perform(curl);
            if (CURLE_OK != res)
            {
                            std::cout << "Request failed with error code = " << curl_easy_strerror(res) << std::endl << std::endl;
            }

            curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &http_code);
            std::cout << "http code = " << http_code << std::endl << std::endl;

            std::cout << readBuffer << std::endl << std::endl;

            // Create document (POST) operation with returnNew=true
            curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, NULL);         // Clear out the CUSTOMREQUEST stuff so Arangod won't think it's a PUT
            curl_easy_setopt(curl, CURLOPT_POST, 1L); /* !!! */
            curl_easy_setopt(curl, CURLOPT_TCP_KEEPALIVE, 1L);                    // Keep the connection alive
            requestURL = "http://localhost:8529/_db/testdrive/_api/document/testCollection13?returnNew=true";
            curl_easy_setopt(curl, CURLOPT_URL, requestURL.c_str());
            requestBody.clear();
            requestBody = "{\"Hello\":\"World\"}";
            curl_easy_setopt(curl, CURLOPT_POSTFIELDS, requestBody.c_str());
            curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, requestBody.size());
            readBuffer.clear();
            res = curl_easy_perform(curl);
            if (CURLE_OK != res)
            {
                            std::cout << "Request failed with error code = " << curl_easy_strerror(res) << std::endl << std::endl;
            }

            curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &http_code);
            std::cout << "http code = " << http_code << std::endl << std::endl;

            std::cout << readBuffer << std::endl << std::endl;

            // Create document (POST) operation which we will subsequently update with a new revision

            // Create document (POST) operation without returnNew=true, _key = lock
            curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, NULL);         // Clear out the CUSTOMREQUEST stuff so Arangod won't think it's a PUT
            curl_easy_setopt(curl, CURLOPT_POST, 1L); /* !!! */
            curl_easy_setopt(curl, CURLOPT_TCP_KEEPALIVE, 1L);                    // Keep the connection alive
            requestURL = "http://localhost:8529/_db/testdrive/_api/document/testCollection13";
            curl_easy_setopt(curl, CURLOPT_URL, requestURL.c_str());
            requestBody.clear();
            requestBody = "{\"Hello\":\"World\", \"_key\":\"lock\"}";

            std::cout << std::endl << "Transmitting: " << requestBody << std::endl;

            curl_easy_setopt(curl, CURLOPT_POSTFIELDS, requestBody.c_str());
            curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, requestBody.size());
            readBuffer.clear();
            res = curl_easy_perform(curl);
            if (CURLE_OK != res)
            {
                            std::cout << "Request failed with error code = " << curl_easy_strerror(res) << std::endl << std::endl;
            }

            curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &http_code);
            std::cout << "http code = " << http_code << std::endl << std::endl;

            std::cout << readBuffer << std::endl << std::endl;

            // Update previously created document _key = lock (POST) operation
            curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, NULL);         // Clear out the CUSTOMREQUEST stuff so Arangod won't think it's a PUT
            curl_easy_setopt(curl, CURLOPT_POST, 1L); /* !!! */
            curl_easy_setopt(curl, CURLOPT_TCP_KEEPALIVE, 1L);                    // Keep the connection alive
            requestURL = "http://localhost:8529/_db/testdrive/_api/document/testCollection13?overwrite=true";
            curl_easy_setopt(curl, CURLOPT_URL, requestURL.c_str());
            requestBody.clear();
            requestBody = "{\"Hello\":\"Universe\", \"_key\":\"lock\"}";
            curl_easy_setopt(curl, CURLOPT_POSTFIELDS, requestBody.c_str());
            curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, requestBody.size());
            readBuffer.clear();
            res = curl_easy_perform(curl);
            if (CURLE_OK != res)
            {
                            std::cout << "Request failed with error code = " << curl_easy_strerror(res) << std::endl << std::endl;
            }

            curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &http_code);
            std::cout << "http code = " << http_code << std::endl << std::endl;

            std::cout << readBuffer << std::endl << std::endl;

            // Create a document which will subsequently be replaced by another document

            // Create the first document
            // Create document (POST) operation with returnNew=true
            curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, NULL);         // Clear out the CUSTOMREQUEST stuff so Arangod won't think it's a PUT
            curl_easy_setopt(curl, CURLOPT_POST, 1L); /* !!! */
            curl_easy_setopt(curl, CURLOPT_TCP_KEEPALIVE, 1L);                    // Keep the connection alive
            requestURL = "http://localhost:8529/_db/testdrive/_api/document/testCollection13?returnNew=true";
            curl_easy_setopt(curl, CURLOPT_URL, requestURL.c_str());
            requestBody.clear();
            requestBody = "{\"Hello\":\"World\"}";
            curl_easy_setopt(curl, CURLOPT_POSTFIELDS, requestBody.c_str());
            curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, requestBody.size());
            readBuffer.clear();
            res = curl_easy_perform(curl);
            if (CURLE_OK != res)
            {
                            std::cout << "Request failed with error code = " << curl_easy_strerror(res) << std::endl << std::endl;
            }

            curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &http_code);
            std::cout << "http code = " << http_code << std::endl << std::endl;

            std::cout << readBuffer << std::endl << std::endl;

            // Replace an existing document with this new one
            curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "PUT"); /* !!! */
            curl_easy_setopt(curl, CURLOPT_TCP_KEEPALIVE, 1L);                    // Keep the connection alive
            requestURL = "http://localhost:8529/_db/testdrive/_api/document/testCollection13/379923?returnNew=true";
            curl_easy_setopt(curl, CURLOPT_URL, requestURL.c_str());
            requestBody.clear();
            requestBody = "{\"Hello\":\"Dummy\"}";
            curl_easy_setopt(curl, CURLOPT_POSTFIELDS, requestBody.c_str());
            curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, requestBody.size());
            readBuffer.clear();
            res = curl_easy_perform(curl);
            if (CURLE_OK != res)
            {
                            std::cout << "Request failed with error code = " << curl_easy_strerror(res) << std::endl << std::endl;
            }

            curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &http_code);
            std::cout << "http code = " << http_code << std::endl << std::endl;

            std::cout << readBuffer << std::endl << std::endl;

            // Update an existing document using PATCH and the document _id and _key

            // Merge attributes of an object using document _id and _key and ?mergeObjects

            // Delete a document

            // Read multiple documents

            // Create multiple documents

            // Delete multiple documents

            // PATCH and PUT for respectively updating and replacing multiple documents works the same way

            curl_slist_free_all(headers);
            curl_easy_cleanup(curl);
            curl_global_cleanup();

#endif
#if 1
std::string s;
std::string &str = s;
            jsonBodyBuilder *jb = new jsonBodyBuilder();
            jb->startBodyBuild("Hello", "world");
            jb->appendBody("key", 7);
            jb->appendBody("stat", 10L);
            jb->appendBody("source", 4.667);
            jb->appendBody(9L, 6.221);
            jb->finishBody(s);

            std::cout << s << std::endl;
            delete jb;

#endif
            return 0;

}
From: Vinnie Falco notifications@github.com
Sent: Tuesday, September 08, 2020 10:56 AM
To: CPPAlliance/json json@noreply.github.com
Cc: Joe Stroupe joes@altia.com; Author author@noreply.github.com
Subject: Re: [CPPAlliance/json] json Conversions to/from C++ objects (#223)
I don't see any zip file, can you paste the minimal sample program here?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_CPPAlliance_json_issues_223-23issuecomment-2D689009305&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=0JlOknucRpLSuzDPgwxVGH9X7wGBhNMqMSDMKWH-dsk&s=jlrINfgD-KKiQHiYOEYLp4NQpQRFRkopeMc36bvKDvU&e=, or unsubscribehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ACAKC22ORWMSNBP2XG46NCDSEZO2ZANCNFSM4QOJ33JA&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=0JlOknucRpLSuzDPgwxVGH9X7wGBhNMqMSDMKWH-dsk&s=c-RO40rUkA_iRGSz25P4AhdCSF8caMXutf-A5M3rXms&e=.

can you please reduce that down to a small program, with main, of just a few lines, that reproduces the problem? In other words a minimal reproducible example.

Hi,
Sure – give me a few minutes.
From: Vinnie Falco notifications@github.com
Sent: Tuesday, September 08, 2020 11:08 AM
To: CPPAlliance/json json@noreply.github.com
Cc: Joe Stroupe joes@altia.com; Author author@noreply.github.com
Subject: Re: [CPPAlliance/json] json Conversions to/from C++ objects (#223)
can you please reduce that down to a small program, with main, of just a few lines, that reproduces the problem? In other words a minimal reproducible example.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_CPPAlliance_json_issues_223-23issuecomment-2D689015707&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=bOBTc4SN3MHRELe0esKjI0HZVw3H4ha3MPxNG2p82iA&s=dNyJfeKV8y6NYzWfMhUynlvQNuwEj7cZ629kPsRLetU&e=, or unsubscribehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ACAKC26QXU62JDART5JUJ2TSEZQGJANCNFSM4QOJ33JA&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=bOBTc4SN3MHRELe0esKjI0HZVw3H4ha3MPxNG2p82iA&s=PORZTu3jxiefsAyXxlP_DPNhcf55VeB7nXHaDJpCs5c&e=.

#include
#include
#include <stdio.h>
#include <stdlib.h>
#include
#include
#include <boost/json/src.hpp>
// Pseudo-pair object
struct reqPair
{
std::string name;
std::string value;
};
using namespace boost::json;
#define CURL_PAIR_SEPARATOR               "":""
template
void
tag_invoke(const value_from_tag&, value& jval, T const& t)
{
jval = { t->name + CURL_PAIR_SEPARATOR + t->value };
}
int main()
{
// vector to hold reqPair structure pointers
std::vector<reqPair *>   ReqV;
            std::string str;

            // populate a reqPair structure, then push a pointer to it into the vector
            reqPair *newPair_1 = new reqPair;
            newPair_1->name = "Hello";
            newPair_1->value = "World";
            ReqV.push_back(newPair_1);

            // populate another reqPair structure, then push a pointer to it into the vector
            reqPair *newPair_2 = new reqPair;
            newPair_2->name = "Goodbye";
            newPair_2->value = "World";
            ReqV.push_back(newPair_2);

            // Do the recursive convert from reqPair structure to json
            value requestBodyjs = boost::json::value_from(ReqV);
            // Serialize it
            str = boost::json::serialize(requestBodyjs);

            // Let's see what the serialized string looks like
            std::cout << str << std::endl;

            // Clean up things
            for (auto p : ReqV)
                                            delete p;
                            ReqV.clear();

            return 0;

}
From: Vinnie Falco notifications@github.com
Sent: Tuesday, September 08, 2020 11:08 AM
To: CPPAlliance/json json@noreply.github.com
Cc: Joe Stroupe joes@altia.com; Author author@noreply.github.com
Subject: Re: [CPPAlliance/json] json Conversions to/from C++ objects (#223)
can you please reduce that down to a small program, with main, of just a few lines, that reproduces the problem? In other words a minimal reproducible example.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_CPPAlliance_json_issues_223-23issuecomment-2D689015707&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=bOBTc4SN3MHRELe0esKjI0HZVw3H4ha3MPxNG2p82iA&s=dNyJfeKV8y6NYzWfMhUynlvQNuwEj7cZ629kPsRLetU&e=, or unsubscribehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ACAKC26QXU62JDART5JUJ2TSEZQGJANCNFSM4QOJ33JA&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=bOBTc4SN3MHRELe0esKjI0HZVw3H4ha3MPxNG2p82iA&s=PORZTu3jxiefsAyXxlP_DPNhcf55VeB7nXHaDJpCs5c&e=.

Your program works fine for me, I get this output

Here’s the output I’m looking for, and that matches what an HTTP json body looks like:
"{"Hello":"World", "Goodbye":"World"}"
This format matches what’s on your conversion page in the docs.
I can get this format with my own custom code, but not with your json code. Those ‘[‘ ‘]’ brkts and the lack of ‘\’ C-style escape in some places preceding double quotes, and no enclosing ‘{‘  ‘}’ curly braces will make the format unusable in libcurl unless I do my custom reformat after the json serialize, as it now stands.
I’m wondering why this is so because your docs on the serialize page have the correct format I’m looking for – no square brkts and no missing ‘\’ escape chars preceding any of the double-quote “ chars, and entire body enclosed in ‘{‘  ‘}’ curly braces.
William
From: Vinnie Falco notifications@github.com
Sent: Tuesday, September 08, 2020 11:57 AM
To: CPPAlliance/json json@noreply.github.com
Cc: Joe Stroupe joes@altia.com; Author author@noreply.github.com
Subject: Re: [CPPAlliance/json] json Conversions to/from C++ objects (#223)
Your program works fine for me, I get this output
[image]https://urldefense.proofpoint.com/v2/url?u=https-3A__user-2Dimages.githubusercontent.com_1503976_92511288-2Df3d49980-2Df1c1-2D11ea-2D8faa-2D144f396d776d.png&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=OW-6JEMkjMdvzu_XWB8XxFcGTwVQa89uFKmPJLiuHd4&s=w3xxmsujPTaXHyiIk0LiTl-OzH-iMaOecr3IwEbFay0&e=
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_CPPAlliance_json_issues_223-23issuecomment-2D689041072&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=OW-6JEMkjMdvzu_XWB8XxFcGTwVQa89uFKmPJLiuHd4&s=2GUiL1DiVxgLBn6FzNqaE3mLNsA9ppa3cx-V9wZWD2E&e=, or unsubscribehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ACAKC2YQA2HVOJBFNI5KWDDSEZV6BANCNFSM4QOJ33JA&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=OW-6JEMkjMdvzu_XWB8XxFcGTwVQa89uFKmPJLiuHd4&s=KWM1w0haw-63LxByPOvwUE4-42ZKeqijV37GJj1j6N0&e=.

jval = { t->name + CURL_PAIR_SEPARATOR + t->value };

Well, what you are doing here is creating an array of one-element arrays each containing a string. If you want an object with key/value pairs then you need something resembling a map. This is one way to do it:
int main()
{
    std::map<std::string, std::string> ReqV;
    ReqV.emplace( "Hello", "World" );
    ReqV.emplace( "Goodbye", "World" );
    value requestBodyjs = boost::json::value_from(ReqV);
    std::string str = boost::json::serialize(requestBodyjs);
    std::cout << str << std::endl;
    return 0;
}

He Vinnie,
A map isn’t going to work for me – there’s a stinking bug in VS 2015 still until now where a std::map<std::string, std::string> doesn’t compile, because the 2nd parameter as a string isn’t working – it wants an int or other numeric field. I’ve Googled it and it’s a mess that shows up in json stuff. So I’m not going there!
What I have is working fine for my needs.
Next I need to move on to conversions from a json body that’s embedded in an HTTP response to a user object, like a simple struct such as I’m using in the user type to json conversion now. So that’s the convert_to() side of things.
Let me delve into this and see how far I can get w/o getting stuck.
William
From: Vinnie Falco notifications@github.com
Sent: Tuesday, September 08, 2020 12:32 PM
To: CPPAlliance/json json@noreply.github.com
Cc: Joe Stroupe joes@altia.com; Author author@noreply.github.com
Subject: Re: [CPPAlliance/json] json Conversions to/from C++ objects (#223)
jval = { t->name + CURL_PAIR_SEPARATOR + t->value };
Well, what you are doing here is creating an array of one-element arrays each containing a string. If you want an object with key/value pairs then you need something resembling a map. This is one way to do it:
int main()
{
std::map<std::string, std::string> ReqV;

ReqV.emplace( "Hello", "World" );

ReqV.emplace( "Goodbye", "World" );

value requestBodyjs = boost::json::value_from(ReqV);

std::string str = boost::json::serialize(requestBodyjs);

std::cout << str << std::endl;

return 0;

}
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_CPPAlliance_json_issues_223-23issuecomment-2D689058761&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=y-izojFN4fKdeA5A92UwE166OfWQU0-x_q5RgngES8U&s=FOyzPnKl2t_N_nJDmY9DdICHWvZH2Kn26hJToTW4iac&e=, or unsubscribehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ACAKC22SFKOHAP5UTPUAAHLSEZ2DDANCNFSM4QOJ33JA&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=y-izojFN4fKdeA5A92UwE166OfWQU0-x_q5RgngES8U&s=iSTX8YFYdvSgEIkMdjg2Aiu4OOVL0LZiWOVm7zpZlbs&e=.

there’s a stinking bug in VS 2015

Try boost::container::map

I’m having trouble getting any code to recognize the value_to() function – the VS project thinks that value_to is not a member of boost::json. Then also, value_to_tag in tag_invoke() is not recognized either – unknown identifier.
What am I missing here? The .h files do define value_to.
William
From: Vinnie Falco notifications@github.com
Sent: Tuesday, September 08, 2020 2:20 PM
To: CPPAlliance/json json@noreply.github.com
Cc: Joe Stroupe joes@altia.com; Author author@noreply.github.com
Subject: Re: [CPPAlliance/json] json Conversions to/from C++ objects (#223)
there’s a stinking bug in VS 2015
Try boost::container::map
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_CPPAlliance_json_issues_223-23issuecomment-2D689113593&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=jLNcfv3cBxRRb3l3DHaCXG0NUqxvJuu5TyKQxDLJIJ0&s=wMLiIP7EgnbzuYrZ29WLUll2c_0nVWR4lCuiTRAayLI&e=, or unsubscribehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ACAKC27OYZ6XWCLZWPB3BTTSE2GVXANCNFSM4QOJ33JA&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=jLNcfv3cBxRRb3l3DHaCXG0NUqxvJuu5TyKQxDLJIJ0&s=f76MS8H3ZaUJVdy8RFjbbA_zzakS7mc5tf5gLIEJQ7E&e=.

See: https://stackoverflow.com/help/minimal-reproducible-example

Here’s my attempt at trying to figure out how to use the value_to() function. This won’t compile because value_to and value_to_tag are not found in boost::json.
#include
#include
#include <stdio.h>
#include <stdlib.h>
#include <boost/json/src.hpp>
using namespace boost::json;
struct reqPair
{
std::string name;
std::string value;
};
template< class T >
T tag_invoke(value_to_tag&, value const& jv)
{
T vec = { jv.as_array().at(0), jv.as_array().at(1) };
return vec;
}
int main()
{
value js = { "Hello World", "Goodbye World" };
std::vector ReqV;
            value requestBodyjs = { "Hello World", "Goodbye World" };

            ReqV = boost::json::value_to<std::vector<reqPair>>(requestBodyjs);
            ;
            ;

}
From: Vinnie Falco notifications@github.com
Sent: Tuesday, September 08, 2020 7:06 PM
To: CPPAlliance/json json@noreply.github.com
Cc: Joe Stroupe joes@altia.com; Author author@noreply.github.com
Subject: Re: [CPPAlliance/json] json Conversions to/from C++ objects (#223)
See: https://stackoverflow.com/help/minimal-reproducible-examplehttps://urldefense.proofpoint.com/v2/url?u=https-3A__stackoverflow.com_help_minimal-2Dreproducible-2Dexample&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=pfvFUQfTuJ0m5v0DsUM7YmFHm3btBXsafrb9LjS28ew&s=Qj7uvn4bXhbqUEw0tKjYONYKXPJZ6XA5BmSipJVbALs&e=
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_CPPAlliance_json_issues_223-23issuecomment-2D689235222&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=pfvFUQfTuJ0m5v0DsUM7YmFHm3btBXsafrb9LjS28ew&s=gX94eJ39nkZitFt86QSkKyXQ4kPBvqI4YR8E6SIJs5I&e=, or unsubscribehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ACAKC23474XVTPNAV5XQJ7TSE3IF5ANCNFSM4QOJ33JA&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=pfvFUQfTuJ0m5v0DsUM7YmFHm3btBXsafrb9LjS28ew&s=KBORQF2aKXrib3R4QnsoXlxZM-JZUtfV_Rptjp_tfCE&e=.

You are including src.hpp which is required for linking, but you are not including the headers which give you all the declarations:
#Include <boost/json.hpp>

Alternatively you can include just what you need:
#Include <boost/json/value_to.hpp>
#Include <boost/json/value_from.hpp>

I see – made the assumption that src.hpp included all I needed – obviously a dumb assumption!
Thx for your help!
From: Vinnie Falco notifications@github.com
Sent: Tuesday, September 08, 2020 8:39 PM
To: CPPAlliance/json json@noreply.github.com
Cc: Joe Stroupe joes@altia.com; Author author@noreply.github.com
Subject: Re: [CPPAlliance/json] json Conversions to/from C++ objects (#223)
You are including src.hpp which is required for linking, but you are not including the headers which give you all the declarations:
#Include <boost/json.hpp>
Alternatively you can include just what you need:
#Include <boost/json/value_to.hpp>
#Include <boost/json/value_from.hpp>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_CPPAlliance_json_issues_223-23issuecomment-2D689262470&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=hBHOyZCpRCZKmkjGlYPWnLzmDMhwaKLjvuk-uY3Szak&s=JNEqKlxfeo9A8x4wd8s0GEgeYJnBDwf1e_yxS-1Pbes&e=, or unsubscribehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ACAKC253QDJMUIHB224WELDSE3TFHANCNFSM4QOJ33JA&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=xesY1ER9OAQvsJFpLd_0fw&m=hBHOyZCpRCZKmkjGlYPWnLzmDMhwaKLjvuk-uY3Szak&s=Ol6iK7RSlT4yGQZLjCPOLW7wi6QBqJjFUIqMOi2GUj8&e=.

authors: JoeStroupe sdkrystian vinniefalco

repo: CPPAlliance/json


text:
🛑 Veille server is down

In 8d6cf01, Veille server (https://veille.p2.csgroup.space/) was down:

HTTP code: 403
Response time: 692 ms

Resolved: Veille server is back up in 1abc60c after 4 hours, 47 minutes.

source: gharchive/issue

license: MIT

license_type: permissive

license_source: github-api


text:
Create parser for list command so that list command can do various things that each context requires to

For cross context, restoring default mode.
For ingredient context, sort by date.

Just added conditions to ListCommand class


text:
model: Priority should store an integer rather than a String, and be comparable

@nightism Why is Priority being stored as a string? Priority.java is filled with Integer.parseInt()s everywhere just because it is not stored in its more obvious format. You're introducing an unnecessary layer of indirection.
Also:

Should MESSAGE_PRIORITY_CONSTRAINTS be public?
Should PRIORITY_VALIDATION_REGEX be public?

@pyokagan

The reason why I chose to store Priority as a string is to prepare for the situation where we may want to use other expressions to represent the Priority, such as important, don't care, etc..
I think MESSAGE_PRIORITY_CONSTRAINTS should be public since this value has the potential to be used outside the class, such as in the parser.
As for PRIORITY_VALIDATION_REGEX, since we already have the isValidPriority method... Emm, I think it can be changed to private for now.

And what changes do you need me to make for the Priority class?

we may want to use other expressions

Isn't that a concern of the Parser, and not the Model?
Anyway, I'm not ruling out having a Priority(String priority) constructor, but I have a issue of how the internal value is stored as a private String (It's not even final!)
I mean, already the UPPER_BOUND and LOWER_BOUND are integers anyway, isn't that a sign that the internal priority field needs to be an integer as well? For consistency at least?

I think MESSAGE_PRIORITY_CONSTRAINTS should be public since this value has the potential to be used outside the class, such as in the parser.

Eh, can't the parser get the message from IllegalValueException.getMessage()?
The reason why I say so is because I don't want so much coupling between classes, especially for trivial things like messages. But I don't feel strongly about that, so I won't insist.

@nightism What's the status of this issue?

authors: nightism pyokagan

license: mit

license_source: bigquery


text:
Update UserGuide.md

Edit add and edit command

Coverage remained the same at 81.766% when pulling 074816091077b3b11c9299e3afa717a0873a28f6 on annabeleng-patch-1 into b99c8052571d392188d84c03c4109d2b315f69a1 on master.

source: gharchive/pull-request

authors: annabeleng coveralls


text:
Fix failed commands

Fixes #297
@jaivigneshvenugopal help me improve the behaviour of the first test in AddPictureCommandTest.java. Currently fails (as in does not throw exception) when AlicePauline.jpg is present.

Coverage decreased (-0.02%) to 90.56% when pulling 50ccdc96bc691c988f6e62e77a58afc791a36fb9 on khooroko:Fix_failed_commands into 9803354a3e93eacc854ca4a8da518f23a8d2b11f on CS2103AUG2017-T17-B1:master.

authors: coveralls khooroko


text:
User to have a smooth and good user experience (Good GUI)

GUI to be good and optimizes user experience with the application with a good interface.

Completed in PR  #137


text:
[Style] I want to add a hovering effect on navbar links

What's the style idea?

I want to add a hovering effect on navbar links.

I want to add hovering effect like this one.
https://github.com/user-attachments/assets/1f8354d4-391b-4086-a9b6-a69eefb29e5f
Checklist

[X] I have checked the existing issues.
[X] I follow Contributing Guidelines of this project.
[X] I am a GSSoC'24 contributor.

Code of Conduct

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

@Durgesh-Vaigandla Please assign this issue to me under GSSoC'24


text:
Django 1.9 Update

-50 is a number not a string
-URL patterns has been depricated and thus replaced
-Signals initialization has been moved to apps.py from init

@bbabbitt2003 @chuck211991 this is the pending merge for the changes to the backend.

repo: CSnap/SGIS-backend


text:
Automatic updater publisher

To match #3, a publisher system is needed. Consult with Lamassu to determine how they publish their updates, then design and document a similar system for use for publishing.
Obviously the deliverables for this task don't exactly fit the code in this repository. Instead of submitting a PR with the solution, please just link to a new repo or branch with the content.

This job will be handled by a git server. No special work is needed in the new architecture.

repo: CTMGuild/ctm-machine

license: Unlicense


text:
Refactor structure to separate into backend and frontend

Everything is really all over the place

https://github.com/CTrando/UCSD-Planner-Helper/commit/9dfc9fe2bcb9969f52b08dd865b628582cbc2124

authors: CTrando dmhacker

repo: CTrando/UCSD-Planner-Helper


text:
Prediction on Custom Dataset

@CVxTz
Hello Youness,
How can I run a prediction on raw .jpg custom datasets? Thanks in advance.

you can change the prediction .py files so it looks for jpg images here :
val_data = list(zip(sorted(glob('../input/DRIVE/test/images/*.**tif**')), => here change the extention
                      sorted(glob('../input/DRIVE/test/2nd_manual/*.**gif**')),
                    sorted(glob('../input/DRIVE/test/mask/*.**gif**'))))

If you dont have the ground truth you might have to change other parts of the code.

authors: CVxTz mfaramarzi


text:
docker-compose build fails @16/25 getting 404 when connecting to codeload.github.com

Running latest docker-ce on CentOS Linux release 7.5.1804 (Core)
docker-ce-18.03.1.ce-1.el7.centos.x86_64
Running docker-compose version 1.21.2, build a133471
$ docker-compose build
fails at step 16/25:
Step 16/25 : RUN wget https://github.com/cachethq/Cachet/archive/${cachet_ver}.tar.gz &&     tar xzvf ${cachet_ver}.tar.gz --strip-components=1 &&     chown -R www-data:root /var/www/html &&     rm -r ${cachet_ver}.tar.gz &&     php /bin/composer.phar global require "hirak/prestissimo:^0.3" &&     php /bin/composer.phar install --no-dev -o &&     rm -rf bootstrap/cache/*
---> Running in b57b6d4ab642
--2018-06-01 15:04:29--  https://github.com/cachethq/Cachet/archive/2.3.14.tar.gz
Resolving github.com... 192.30.253.113, 192.30.253.112
Connecting to github.com|192.30.253.113|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/CachetHQ/Cachet/tar.gz/2.3.14 [following]
--2018-06-01 15:04:29--  https://codeload.github.com/CachetHQ/Cachet/tar.gz/2.3.14
Resolving codeload.github.com... 192.30.253.120, 192.30.253.121
Connecting to codeload.github.com|192.30.253.120|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2018-06-01 15:04:29 ERROR 404: Not Found.

my bad, use version like "v2.3.14" instead of "2.3.14"... closing

Literally did the same thing.

repo: CachetHQ/Docker


text:
白姥爷tql

白姥爷tql

白姥爷tql


text:
Assignment grading queue view should list aggregate stats

Instead of just presenting all of the grading tasks left for an assignment, displaying queue statistics is a better idea.

admin/course/1/assignments/1/queues

Currently: Displays all grading tasks (grouped by staff & completeness)
Should: Display statistics per staff member (sorted by incomplete, ideally user sortable) with a link to jump into their queue. (This might have to be paginated)

admin/course/1/assignments/1/queues/hashid(user ID 123)

Currently: Doesn't exist
Should: Display queue for this user

admin/course/1/assignments/1/queues/all

Currently: Doesn't exist
Should: Do what assignments/1/queues does right now

Minor Enhancement:
Empty State for Grading Queue should be clearer about the tasks left.

Something like this would be nice (from the wordpress Empty State)

Reopening to track bug with PR
MySQL 5.7.5+ changed the behavior of group by
(1055, "Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'okV3.grading_task.created' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by"
A quick fix is to disable only_full_group_by, but the cloud sql console doesn't make it easy to do that due to a bug. Existing discussion


text:
[BugFix] Scroll in the stories thumbnails

I have a lot of Instagram friends, and I just did a fix, because for me it was showing a huge list with all my friends.
Now it looks like this.
Is it a bug just for me? Should I merge this?
This is how it looks after my fix with a side scroll, just like the app.

@pmarquees Thank you, it was an oversight on my end. I didn't have enough friends with Stories at the time and didn't foresee the issue. Your fix nicely mimics the behavior in the mobile app. 👍

authors: CaliAlec pmarquees

repo: CaliAlec/ChromeIGStory


text:
port over netrunner's HTTP cat command because it's way better

floppy made this not me

closing becasue floppy opened another one, 2 fast 4 u 😔

smh this PR was way better than the other one, and you were faster

i am speed


text:
Foto header de udashboard

Esto se fijo el cliente:
"el recuadro del logo es de fondo blanco mientras que el header tiene un degrade gris"
si le hacen zoom se nota el rectangulo blanco

Ok xD
El miércoles, 27 de mayo de 2015, alopezq notifications@github.com
escribió:

Esto se fijo el cliente:
"el recuadro del logo es de fondo blanco mientras que el header tiene un
degrade gris"
si le hacen zoom se nota el rectangulo blanco
[image: degrade]
https://cloud.githubusercontent.com/assets/5612408/7838097/70e9638c-0461-11e5-8a73-c251e9cfd5d4.PNG
—
Reply to this email directly or view it on GitHub
https://github.com/CamilaAlvarez/IndicadoresDCC/issues/14.

Si lo había notado. El punto es q el logo debería tener fondo transparente, no blanco. Alguien sabe arreglar eso?? (no sé de photoshop o cosas con imágenes).

listo

authors: CamilaAlvarez alopezq farodrig

repo: CamilaAlvarez/IndicadoresDCC


text:
UI won't be displayed when I call unless RPH is running

When I call an added contact, the player will put the phone in its pocket and no UI will be displayed ("DIALING...").
However, the contact.Call(); function works, the sound plays and the Answer event is triggered.
Your DisplayCallUI function looks good to me but maybe they've changed the way they handle the Call ui now?
What is really weird is that if you start the game with RagePluginHook (+SCHVDN oc), the UI will be displayed!! (but the contacts will be busy).
I don't understand at all what RPH does to mess up with your script.
I run only your iFruitAddon and my script that uses it. And sometimes I run RPH alone to access the console.
EDIT: Okay so it seems that RPH does some stuff about the phone by itself.
It displays the call UI even for non existent contact and removes the "The selected contact is no longer available" notification.
So we can put RPH apart atm, the call UI not displaying is really an iFruitAddon issue.
EDIT2: I think the problem is due to the fact that when you select an "out of bound" contact, the game closes the phone...
When I try your DisplayCallUI function alone with the phone open, it works perfectly.
EDIT3: Confirmed. Disabling Control.PhoneSelect allow me to call new contacts but of course I can't call native contacts. it must be fixable...

Lol totally forgot about this issue, I think I fixed it in iFruitAddon2 :)

repo: CamxxCore/iFruitAddon


text:
Issue in MacOS Big Sur

I recommend to use a wrapper over Io from std to at least avoid this situation where we don't have the name file.

lfs is described as "a linux utility" and I have no idea whether it can be adapted to MacOS. If somebody's willing to look at it, I have no objection and we can discuss it in the chat but I won't do it alone as I don't have a Mac.

@Stargateur Yes, I should also wrap the error with context

Hello, thank you all for responding. Unfortunately I don't have a very high level in programming yet and I don't know how to use the wrapper. A little help would be welcome.
On the other hand if the application has not been thought to be used also in macOS then we don't need to waste too much time with it. Thanks for your help.

Hello, thank you all for responding. Unfortunately I don't have a very high level in programming yet and I don't know how to use the wrapper. A little help would be welcome.

My comment was for Canop sorry, I was unclear

On the other hand if the application has not been thought to be used also in macOS then we don't need to waste too much time with it. Thanks for your help.

It's probable most of the data gathering core would have to be rewritten. And a Mac is needed for that...
So for now I'll close the issue and have a look at every place where it's not clear it's for linux.

(BTW, now the error is clearer)

authors: Canop Stargateur Wynztech

repo: Canop/lfs


text:
[feature request] get all toggles endpoint

Let's say

I don't really care about tracking which toggles are used (I can just do a code search for them), and
I don't want to have to create a toggle in both TM and ALSO my codebase, and
I want toggles to be resolved upfront and before any application code runs, so I want it to be a single request / response for speed's sake

Those three issues could be resolved for me if there was a single endpoint that I could hit to get all toggles for an environment.  As it stands, there are various workarounds but they all appear to have one or multiple of the above drawbacks.
Would there be any interest in allowing this API to exist?

From docs: https://github.com/CanopyTax/toggle-meister#list-of-all-current-endpoints
http :8445/api/envs/production/toggles

I think this will give you all of them? I know that canopy uses this API to populate the canopy-inspector's list of features.

I may be reading this wrong, but I believe that that endpoint falls under issue 2 in my list. It appears  that I have to send the list of toggles I think?
https://github.com/CanopyTax/toggle-meister/blob/master/tmeister/toggles.py

Ah you're right. I just checked in Canopy's app and they make two requests to populate the devtools:
GET /api/features
GET /api/toggles?feature=test_transcripts_extension&feature=tp_client_return_refactor&feature=tp_licenses&feature=irs_eservices_enabled&feature=sme_branching&feature=pastepocalypse&feature=new_transcripts&feature=canopy_letter_templates&feature=global_letter_generator&feature=lmgtfy&feature=client_transcripts&feature=zapier_integration&feature=task_on_time_entry&feature=self_serve_licenses&feature=access_levels_pm&feature=conversions&feature=efin&feature=notes_ui&feature=first_time_login&feature=source_form_search&feature=esign_pdf&feature=share_reminder&feature=mobile_upload_file&feature=custom_fields_multi_select_dropdown&feature=import_contacts_milestone_2&feature=import_contacts_milestone_3&feature=workspace_notes&feature=import_contacts_parcel&feature=credits_dashboard&feature=tasks_draggable&feature=redesign_efin_settings&feature=save_to_canopy_files&feature=php_to_python_endpoints&feature=payment_deposits&feature=amex_id&feature=tp_block_display&enrollment_id=584830&metrics=false
So yeah there is no API that does what you're asking for and the original issue stands.

authors: frehner joeldenning

repo: CanopyTax/toggle-meister


text:
UI Fixes in Footer

UI Fixes in Footer
Resolution: Mobile

@goliakshay357 I can take this issue if that's ok with you 🤟

@rebelchris sure! :+1:

repo: Canvasbird/canvasboard


text:
您好这个播放器怎么播rtmp流视频啊

需要设置些什么呢？还是根本不可以？

把rtmp的地址正常设置上，就好了

repo: CarGuo/GSYVideoPlayer


text:
播放网络m3u8视频视频旋转不正确

问题描述：
播放网络m3u8格式视频, 视频旋转角度不正确
播放网络m3u8视频,视频旋转角度不对,本来是竖着拍摄的视频,播放时出现横着播放的情况
(前提是我从相册中选中视频,上传到服务器,我上传的是mp4格式,接口给我返回来的是m3u8格式的,)
问题机型/系统：
所有机型
GSY依赖版本
例如 implementation 'com.shuyu:gsyVideoPlayer-java:7.1.1'
Demo中的复现步骤
我是直接在xml使用 StandardGSYVideoPlayer
问题代码：(如果有)
xxxxxxx

问题log
//下面的俩段log都一段视频,一个是上传后的m3u8格式的;一个是mp4格式没有上传之前的
//这个是播放m3u8格式的视频时显示的log
I/GSYVideoPlayer: onPrepared
2019-11-12 13:44:51.357 11341-11341/com.greedy.catmap I/GSYVideoPlayer: 3708753------------------------------ CURRENT_STATE_PLAYING
2019-11-12 13:44:51.357 11341-11341/com.greedy.catmap I/GSYVideoPlayer: changeUiToPlayingShow
2019-11-12 13:44:51.358 11341-11341/com.greedy.catmap I/GSYVideoPlayer: Sample changeUiToPlayingShow
2019-11-12 13:44:51.382 11341-11341/com.greedy.catmap I/GSYVideoPlayer: GSYTextureView not support onRenderResume now
2019-11-12 13:44:51.382 11341-11341/com.greedy.catmap I/GSYVideoPlayer: Sample startAfterPrepared
//主要是这个地方,这个角度应该是90,但是现在是0
2019-11-12 13:44:51.383 11341-11341/com.greedy.catmap I/GSYVideoPlayer: Video Rotate Info 0
2019-11-12 13:44:51.385 11341-11341/com.greedy.catmap I/GSYVideoPlayer: videoWidth: 480 videoHeight: 360
2019-11-12 13:44:51.385 11341-11341/com.greedy.catmap I/GSYVideoPlayer: videoWidth: 480 videoHeight: 360
2019-11-12 13:44:51.401 11341-11341/com.greedy.catmap I/GSYVideoPlayer: videoWidth: 480 videoHeight: 360
2019-11-12 13:44:51.402 11341-11341/com.greedy.catmap I/GSYVideoPlayer: videoWidth: 480 videoHeight: 360
2019-11-12 13:44:51.602 11341-11341/com.greedy.catmap I/GSYVideoPlayer: Net speed: 553 KB/s percent 84
-----------------------------------------------------------------------------------------------------//这个是播放MP4格式的视频
019-11-12 13:44:51.357 11341-11341/com.greedy.catmap I/GSYVideoPlayer: 3708753------------------------------ CURRENT_STATE_PLAYING
2019-11-12 13:44:51.357 11341-11341/com.greedy.catmap I/GSYVideoPlayer: changeUiToPlayingShow
2019-11-12 13:44:51.358 11341-11341/com.greedy.catmap I/GSYVideoPlayer: Sample changeUiToPlayingShow
2019-11-12 13:44:51.382 11341-11341/com.greedy.catmap I/GSYVideoPlayer: GSYTextureView not support onRenderResume now
2019-11-12 13:44:51.382 11341-11341/com.greedy.catmap I/GSYVideoPlayer: Sample startAfterPrepared
//主要是这个地方,这个角度应该是90,但是现在是90
2019-11-12 13:44:51.383 11341-11341/com.greedy.catmap I/GSYVideoPlayer: Video Rotate Info 90
2019-11-12 13:44:51.385 11341-11341/com.greedy.catmap I/GSYVideoPlayer: videoWidth: 480 videoHeight: 360
2019-11-12 13:44:51.385 11341-11341/com.greedy.catmap I/GSYVideoPlayer: videoWidth: 480 videoHeight: 360
2019-11-12 13:44:51.401 11341-11341/com.greedy.catmap I/GSYVideoPlayer: videoWidth: 480 videoHeight: 360
2019-11-12 13:44:51.402 11341-11341/com.greedy.catmap I/GSYVideoPlayer: videoWidth: 480 videoHeight: 360
2019-11-12 13:44:51.602 11341-11341/com.greedy.catmap I/GSYVideoPlayer: Net speed: 553 KB/s percent 84

确定你视频是不是自带了的选择角度。

视频自身不带角度
我从相册选着的竖向视频旋转角度为0,我上传之前通过StandardGSYVideoPlayer进行播放了,StandardGSYVideoPlayer把这个视频的角度修改成了90,播放时是正常的,并且是竖向的.
当前上传该视频,(服务器把mp4的格式给转码成m3u8的格式),我用这个m3u8 的视频转码成mp4格式,并且查看了他的旋转角度还是0,但是我用StandardGSYVideoPlayer直接播放m3u8格式和我转码成MP4格式的视频,旋转角度并没有被修改成90,
我想请教大佬,是我那个地方写错了吗?还有修改旋转角度的核心代码是那个地方?

StandardGSYVideoPlayer 是会根据视频播放信息中的旋转角度进行显示，如果方便提供测试视频？
或者你可以在 Demo 源码 GSYVideoView 的 onInfo 方法看到 mRotate 参数。
 else if (what == getGSYVideoManager().getRotateInfoFlag()) {
            mRotate = extra;
            Debuger.printfLog("Video Rotate Info " + extra);
            if (mTextureView != null)
                mTextureView.setRotation(mRotate);
        }

https://greedycat.oss-cn-hongkong.aliyuncs.com/m3u8/eac3ff3d-9d43-43d4-b967-02712e496a38.m3u8
这是我测试视频地址
核心代码的地方,当我播放相册中竖向播放的视频时,extra==90(mp4格式),当我上传到服务器,服务器转码成m3u8格式时,我播放extra == 0,并没有变成90,所以视频变成横向播放了,`
大佬,我现在不清楚的是我上传时要做什么处理,吗?比如设置固定的比例,还是我动态根据视频的宽高和屏幕的宽高去修改mRotate的值(如果需要修改这个值,能给个思路吗)麻烦了,大佬

这个不是我能解决的啊， 视频成了 m3u8 分片后没有旋转信息，我也没办法啊····


text:
avi格式视频，获取的视频总时长为0

GSYVdieoView源码中的，这里获取出来的为0，没有异常
/**
* 获取当前总时长
*/
public int getDuration() {
int duration = 0;
try {
duration = (int) GSYVideoManager.instance().getMediaPlayer().getDuration();
} catch (IllegalStateException e) {
e.printStackTrace();
return duration;
}
return duration;
}
总时长为0，导致进度条一进来就加载完了。

如果是未prepared的或者暂停中的，有可能获取出来为0

就是播放中的状态，打日志出来，总时长也返回的是0.播放进度时间是正常的。

有测试url？

http://av.hanfugou.com/video/android/2017/11/12/adcbbe0725b04f44820be43ae7e3ab4d.avi
这是测试的URL时长比较短只有11秒

I/IJKMEDIA: Input #0, m4v, from '/storage/emulated/0/GSYVideo/22222.avi':
I/IJKMEDIA:   Duration:
I/IJKMEDIA: N/A
I/IJKMEDIA: , start:
I/IJKMEDIA: 0.000000
I/IJKMEDIA: , bitrate:
I/IJKMEDIA: N/A
I/IJKMEDIA:     Stream #0:0
I/IJKMEDIA: : Video: mpeg4, 1 reference frame, yuv420p(left), 640x352 [SAR 1:1 DAR 20:11], 0/1
I/IJKMEDIA: ,
I/IJKMEDIA: 23 tbr,
I/IJKMEDIA: 1200k tbn,
I/IJKMEDIA: 23 tbc
I/IJKMEDIA: VideoCodec: avcodec, mpeg4
W/IJKMEDIA: fps: 23.000000 (normal)
I/IJKMEDIA: SDL_RunThread: [8593] ff_video_dec

从ffmpeg解码出来的信息看，确实如此，看起来是这个视频编码的问题

那我再找别的视频资源看下，有后续问题我再补充

测试了几个.avi格式的视频，都是获取不到视频总时长，可以考虑添加一个设置总时长的方法么？

我想起来了，avi的容器协议当前so没支持，之所以能播放是因为视频编码是mpeg4的，所以解析出来了，但是avi协议没正确解析，你可以看看根目录的两个.sh文件，应该是没有
--enable-demuxer=avi"

是没有，我现在直接用的源码引用了，加了个设置视频总时长的方法。因为我的是自己服务器有返回总时长，所以添加这个方法后就可以不用走下面了。
后续可以把avi格式的协议加上哈。

郭神，现在的SO库播放AVI格式的声音也没有，只有画面

主要还是如果你需要avi的容器协议，还是需要打包包含avi的so

包含avi格式的so，自己拿你开源的配置，添加了avi的配置，出来的包是只有声音，没有图像。
./configure --list-demuxers
export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-demuxers"
export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=aac"
export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=concat"
export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=data"
export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=flv"
export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=hls"
export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=latm"
export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=live_flv"
export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=loas"
export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=m4v"
export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=mov"
export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=mp3"
export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=mpegps"
export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=mpegts"
export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=mpegvideo"
export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=hevc"
export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=avi"
只在这下面添加了avi支持

https://github.com/CarGuo/GSYVideoPlayer/blob/master/module-lite-more.sh  这个配置上

好的，有时间再打包测试下了，现在用的是module-defalut的配置，打出来的包有点大了。

authors: CarGuo xuefengyuan


text:
🛑 jereconstructionroofing is down

In 4573b68, jereconstructionroofing (jereconstructionroofing.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: jereconstructionroofing is back up in 1f4998c after 12 minutes.

repo: Careas/vps-monitor


text:
🛑 Reporte Car-Info is down

In 5ea7580, Reporte Car-Info (https://reporte.car-info.com.mx) was down:

HTTP code: 503
Response time: 99 ms

Resolved: Reporte Car-Info is back up in 253cab9.

repo: CarfaxMX/status-page


text:
Add a Grid backwards compatibility test

This is the process that has been used to verify that
Grid and Splinter 0.4 and Splinter 0.6 are compatible.
This process is put up with all current hacks to be able
to do the test locally (instead of requiring docker).
In the future this hacks may not be required.
Signed-off-by: Andrea Gunderson agunde@bitwise.io

How about making the left sidebar read 'Testing' and then we have a page that includes this content and some very high-level content about running LR networks?

How about making the left sidebar read 'Testing' and then we have a page that includes this content and some very high-level content about running LR networks?

Sure I will work on that

repo: Cargill/splinter-docs


text:
Research Pagination Library

We should research what pagination library is standard in Django.

Dami utilised Django Rest framework pagination on the community project, we can use it here too.

repo: CarletonComputerScienceSociety/core


text:
Disabled dp and condition table and Allow payload edit

Issue: Decision point and condition table aren't disabled properly and save button in disabled so payload wasn't editable
This PR resolve this issue by disabling action button in decision point and conditions table and allowing payload to edit with enabling save button as well.

Thanks! I will check this out.

Sorry, I think I made a mistake. I will revert it back.

@Yagnik56 While your PR functions correctly, I have made a commit to grey out the Decision Points and Conditions/Factors table when the experiment is not editable. Please check if this has been done properly. Thank you!

repo: CarnegieLearningWeb/UpGrade


text:
🛑 monitorss.carnivore.kr is down

In 0862b45, monitorss.carnivore.kr (https://monitorss.carnivore.kr/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: monitorss.carnivore.kr is back up in d0bbf2e after 30 minutes.

repo: CarnivoreKR/status


text:
CI for ROS2 / Full ROS2 support

I'm pretty dang sure this library is ROS2 compatible / compliant because rosbridge looks basically identical, but I'd like to confirm that.
Build a 2nd CI docker image that has rosbridge (also checkout #41 and probably stick rosapi node in as well), and make a second github action to run CI for both ros1 and ros2.
While doing this, think about how maybe to support different versions of ros2 and what generating that CI docker image would look like for Rolling vs. other versions. Is there anyway to auto update the image / kick-off CI as rolling is updated? I think a problem we're going to run into here is finding the right base images to build off of? If there is a "good" ROS2_rolling:latest image we can use this might not be terrible, but we likely need to strip 95% of the contents out of that image.
Bonus: update the auto-badges in the readme to show CI status for ROS1 and ROS2 (or even better various ROS2 versions).

I made a major start on this and merged CI support for galactic.
However CI tests currently fail!
Main issue is in message generation. std_msgs/Header for ROS2 is different than ROS1's definition!
Will need more investigation. I think rolling / foxy support should be super easy and essentially copy paste of the galactic support. However, unclear how we will fix message generation for ros1 vs. ros2.


text:
Migrate 'ComparativeCategoryWidgetUI' component from makeStyles to styled-component + cleanup

Description
This PR includes a refactorization of ComparativeCategoryWidgetUI component, all classes from makestyles are been converted to styled components
Shortcut:  297037
Type of change

Refactor

Acceptance
The code resultant must return same styles component visualization as the same before changes

Overview a general visualization from v1.x to v2.x

Basic checklist

Good PR name
Shortcut link
Changelog entry
Just one issue per PR
GitHub labels
Proper status & reviewers
Tests
Documentation

Pull Request Test Coverage Report for Build 4688934543

25 of 26 (96.15%)  changed or added relevant lines in 3 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.2%) to 71.509%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

packages/react-ui/src/widgets/comparative/ComparativeCategoryWidgetUI/comparative.styled.js
22
23
95.65%

Totals

Change from base Build 4665309556:
0.2%

Covered Lines:
1966

Relevant Lines:
2530

💛  - Coveralls

authors: coveralls jantolg

repo: CartoDB/carto-react


text:
Update Multiuser mockups with the production version

Please, high priority as we need to start working on this next sprint. Let's do this on 0.4 version. Don't forget any page

@saleiva this file name is Multiuser-0.4.sketch could you please review it and tell me if there's something missing?
I removed a folder called 04-Configuration because all changes I made about user settings are under Multiuser folder.
I still having a local copy of that folder, JIC

Talked about this in slack and updated missing details, closing it

authors: josecruz saleiva

repo: CartoDB/cartodb


text:
share map component and share button in public page are not consistent

steps to reproduce

go to https://googledataorg.cartodb.com/u/googledata/viz/cf9d50ba-24fe-11e5-ae83-42010a14cb63/public_map

when sharing options are enabled, the share text for twitter icon is not the same than the share text when clicking in twitter button of dialog
also, most of the options are duplicated (but embed)

What could we do to offer iframe option directly in the options navbar?

This is gonna change with the new dashboard/editor thing, closing!.
But in any case this ticket were supposed to be in cartodb.js, for the records! :)

authors: matallo xavijam


text:
Change deprecated PostGIS ST_Force_2D function to ST_Force2D

Since PostGIS 2.1 the function ST_Force_2D is deprecated so since our PostGIS dependency is now 2.2 for all we have to change it to avoid warnings or future problems

@jgoizueta check this out


text:
Add video auto bitrate

Hi, thanks for your awesome plugin
I have xiaomi tv and can watch 1080p
But some movie have very high bit rate so the frame will Do you have any solution for this 🙏
Maybe auto bit rate or can select lower bit rate in video tab

the only solutions for devices with low end CPUs are specified on wiki:
https://github.com/CastagnaIT/plugin.video.netflix/wiki/FAQ-(Audio,-Video,-Subtitle,-Other)#video-playback-problems-like-frame-drops-slowdown-stuttering

authors: CastagnaIT godshades


text:
Lazy loading added

Related Issue(s)

Closes #100
Proposed Changes

When we first load the website then the whole website is loaded first then it is visible to the users which could take time to load all pages. To solve this problem we use lazy loading. This only loads the page that the user is interacting with which reduces the initial loading time of the website. I have implemented the Lazy loading to this website.
Also I have added a loading component which is displayed when the website is loading.

Type of Change

[ ] New Feature (Landing Page)
[x] New Feature (App)
[ ] Bug (Landing Page)
[ ] Bug (App)
[x] New Component (App)
[x] Enhancement
[ ] Documentation / ReadMe / Workflows
Other (If not in above options):

Your Idea for Level (GSSoC)

[ ] Level 1
[x] Level 2
[ ] Level 3

@praveenscience Could you please review this pr?

repo: CatsInTech/GitHub-ReadMe


text:
Coding Standards

I Think coding standards are very important and maybe should be built into the compiler like go does(a little bit). Also someone should write a tool like gofmt which will take pony code and format it. It makes formatting things a lot easier. When I was in the java world we always had our own custom formatting files for a project targeting different IDE's and it was a pain to manage. So it would be great if there was a single standard which we can all follow.
From @andymcn  naming conventions, layout, 80 character line limit, etc. https://github.com/CausalityLtd/ponyc/pull/385
What does everybody else think?

So it would be great if there was a single standard which we can all follow.

I can't disagree with this part enough.  We need to avoid discouraging a diversity of approaches.  There's no reason a language/compiler/runtime needs to impose a certain formatting style on all of its users.  If someone wants to write a third-party package, that's fine (I just won't use it), but I can already tell you that you and I will not agree on certain code formatting rules, so those rules have no place in this repo.
I believe @andymcn was talking about code style rules for this repository, which obviously does have a place in this repo.  But imposing onto other projects in the community your ideas about what code is another subject entirely.
Also, even when you can agree on standards within a single project (as you should be able to for the project to continue) there's no way a tool can maintain all the standards you need to think about.  For example, naming standards; it can enforce capitalization patterns, but not sane, conflict-aware naming.  Using a tool that can enforce some parts of your project's style rules but not others means you still have to review style, so what have you gained?
So let's let the maintainers agree about code style guidelines for this repository, but don't impose your rules on the rest of us, and keep your gofmt-like tools somewhere in a repo of your own.
Sorry if I come across as a bit agressive, but I am very passionate about this issue.  We need diversity, not uniformity, in projects across our community (we only need uniformity within projects).

I agree that a variety of styles is a good thing, and I was indeed talking about a coding style within this repo - sorry if that wasn't clear. Obviously the standard library needs to have sensible, consistent names, API styles, etc and I think it will make things easier for new comers to the language if the examples are all in the same style.
One of the good things about Pony is that it is much easier to parse than most languages, simply because we considered that an important goal from the start and always consider the affect on parsing when making any syntax changes. This means that it is much easier to write auto-formatting tools for Pony than for most languages.

After further thought I still agree with @jemc that the compiler shouldn't be forcing these things. Considering each point mentioned:

Naming conventions. The compiler does actually already force a few things such as types starting with a capital letter, methods, parameters, fields and locals starting with lower case, etc. I think anything much beyond this is too restrictive, especially when some people will want to use naming that fits in with other projects and C libraries. And getting into a Microsoft enforced Hungarian notation situation would definitely be bad.
Layout. This is one where there is a lot of variation, but I do think that's fine. People naturally want different layouts because of what they're used to, a C programmer and a Haskell programmer both coming to Pony will probably naturally lay things out differently, and that's fine.
Line length. This absolutely should not be limited by the compiler. We limit to 80 characters because some of the devs use old style editors or want 2 columns of code on small screeens. But if someone writes on a huge screen with a single column of code, why should we force them to only use the left 30% of their screen?

One thing to bare in mind particularly for points 2 and 3 is that such restrictions can make it very hard to produce autogenerated code, which tends to be hard to layout nicely and have very long lines.
So thanks for the suggestion, but I think we'll say no to this one.
Writing an auto-formatting tool is a very good plan however, as I said Pony was specifically designed with this kind of thing in mind. If any one wants to give this a try please do and feel free to ask stupid questions if you get stuck.

Yeah... I guess the naming convention itself solves most of the enforcing it like in Go. I agree that the line length should not be limited to 80 and a compiler should never do that. A tool with configuration options to auto format pony code  on save should prove to be useful so I'll try to make that one. pony-fmt. That should solve this my issue. Thanks! For your feedback!

authors: andymcn jemc pyros2097

repo: CausalityLtd/ponyc


text:
🛑 欧陆风云四百科（eu4cn） is down

In f11d1ec, 欧陆风云四百科（eu4cn） (https://www.eu4cn.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: 欧陆风云四百科（eu4cn） is back up in 4c77361 after 13 minutes.

repo: Cccc-owo/upptime


text:
1.18 improvement apiserver connection to etcd

Pick up community 1.18 changes for connecting to etcd & update etcd retry due to perf test had too many requests with unexpected delay.
First 4 changes were from cherry pick.
Last change is for Arktos copyright changes and make update

/approve

/approve

/lgtm

/lgtm

authors: Sindica XiaoningDing

repo: CentaurusInfra/arktos


text:
Promise initializer for global RSVP Promises

Purpose
Sometimes native promises don't work in ember h/t @aaxelb
Summary of Changes
Add initializer to set window.Promise to RSVP.Promise
Ref: https://github.com/emberjs/rfcs/issues/175#issuecomment-263896090
Side Effects / Testing Notes
Should reduce unwanted side effects.
Ticket
No ticket
Reviewer Checklist

[ ] meets requirements
[ ] easy to understand
[ ] DRY
[ ] testable and includes test(s)
[ ] changes described in CHANGELOG.md

Coverage remained the same at 30.0% when pulling e85a4ffd5271bdcaf3abaa2c3586471b5f3fc342 on binoculars:feature/promise-initializer into bd8b1be3d7a243dab3e60fe55beeda0f3423690e on CenterForOpenScience:develop.

authors: binoculars coveralls

repo: CenterForOpenScience/ember-osf-web


text:
[EOSF-498] Dockerfile adds ember-osf destination folder

Ticket
https://openscience.atlassian.net/browse/EOSF-498
Purpose
To create a destination for data volume containing local version of ember-osf, for ember-osf/ember-preprints development.
Changes
Adds /ember-osf folder to root of preprints container.
Side effects
If not using it for local ember-osf development, creates an empty folder

Can you merge hmoco/osf.io#11 for this PR?

We don't actually need to modify the Dockerfile here. That directory will get created when it's mounted in docker-compose. Closing.

authors: binoculars hmoco

repo: CenterForOpenScience/ember-preprints


text:
Dataverse: Send Registrations DOIs to Related Publication Field for a dataset

During a recent OSF talk, I saw DOIs are now being minted for Registrations. From what I can tell those aren't being sent over to Dataverse through the SWORD API when someone is pushing their dataset from OSF to Dataverse.
@posixeleni and myself discussed this as an issue in the Dataverse repo here: https://github.com/IQSS/dataverse/issues/2236 and think it would fit well into the Related Publications metadata field for a dataset in Dataverse.
This metadata map, https://github.com/IQSS/dataverse/blob/guides4.0/doc/sphinx-guides/source/api/sword.rst#dublin-core-terms-dc-terms-qualified-mapping-dataverse-db-element-crosswalk, also shows it can be mapped by using dcterms:relation if you don't want to use related publication.

As @posixeleni mentioned at https://github.com/IQSS/dataverse/issues/2236#issuecomment-108654390 the advantage of "Related Publication" is that it's structured rather than how "Related Material" is free form.

authors: eaquigley pdurbin


text:
[feature] Enable sentry logging for APIv2

Refs #3163
Purpose
Allow Sentry to track errors that happen in the Django app used by APIv2.
Summary of changes
Adds raven middleware to Django. Raven is already listed as a requirement for flask, so no new user installation is needed.
Applies a fix to ensure that Sentry catches problems when used with other error handling middleware, as suggested by the Sentry docs.
Blockers
Not sure how to test this locally, since I don't have the SENTRY_DSN keys needed to send actual data to the server.
Feedback on more granular reporting options would also be welcome. It would be nice if we could filter API/django errors out from the OSF/flask errors in a clear way. @brianjgeiger ?

First pass complete. Only one minor change requested, ready for merge now if you'd like. :last_quarter_moon:

Response to review pushed.
Then learned about [ci skip], which I should totally have used. :)

@sloria , any progress on reviewing this one?

Looks good. :octopus:

authors: abought lyndsysimon sloria