Allow custom wrappers scripts via an install hook?

Thank you for creating this project. I did some tests and things work in a very clean way.
I'm trying to minimize the startup time of my cli tool. When I install it with bbin it adds around 40ms extra due to how the wrapper script works (invoking bb one more time). By writing my own wrapper script I could keep the total around 40ms, but this would limit the distribution options (only exact url or local file). Maybe it is possible to have bbin provide a hook that would be called during installation in order to create a custom wrapper script?
You might reason 40ms is not that much, but I'm working on a command line tool that I intend to use regularly and as a part of a chain of other binaries. Sometimes the binary is even executed multiple times in one invocation. This means that every addition in latency quickly adds up.
Maybe related to #18 and #40
I'll do some experimentation with my own wrapper script and report back later.

We used to generate Bash wrappers but we moved to Babashka wrappers for Windows support. We removed the original Bash wrappers so we only have to maintain one format for the time being.
It's possible this may change in the future once the code matures a bit more. Until then I suggest creating a Bash script manually to invoke bb -Sdeps:
#!/usr/bin/env bash
bb -Sdeps '
{:deps {com.github.rads/watch {:git/url "https://github.com/rads/watch.git"
                               :git/tag "v0.0.4"
                               :git/sha "d5f36aa54e685f42f9592a7f3dd28badc3588c08"}}}
' -m rads.watch -- "$@"

$ chmod +x watch
$ ./watch --help
Usage: watch [utility]

Run arbitrary commands when files change.

Examples:
  ls | watch

Thank you for the feedback. Removing the bash wrappers make sense.
I have found an alternative solution that I'll publish later. Basically I've played around with requiring-resolve and being lazy about loading deps and parsing code. I now have a babashka task that compiles my project into one file. Most namespaces are put in strings and are only eval-ed when required. This saves quite some time in most cases, and by putting it in one file I can use bbin install compiled-output.clj. I believe there are other options, e.g. with jar files, but I haven't tried this yet.
Maybe one of these strategies could be formalised as a part of the install process of bbin, maybe not. I'll post a link to my example later.

Small update, some first tests seem to suggest that creating an uberjar (instead of inlining the code), and running from that is as equivalent to the inlining option. I have the following bb.edn for the tree options:
{:deps {deps/local {:local/root "."}}

 :tasks
 {install (shell "bbin" "install" ".")

  generate-inline-script tasks/generate-inline-script

  install-inline (do (run 'generate-inline-script)
                     (shell "bbin" "install" "target/inline.clj" "--as" "aws.console"))

  install-jar (do
    (shell "bb" "uberjar" "target/uberjar.jar")

    (spit "target/uberjar-inline.clj" (clojure.string/join "\n" [

    '(require '[babashka.classpath :refer [add-classpath]])

    (list 'add-classpath (str (System/getenv "PWD") "/target/uberjar.jar"))
    '(require '[aws.console])
    '(apply aws.console/-main *command-line-args*)

    ]))
    (shell "bbin" "install" "target/uberjar-inline.clj" "--as" "aws.console")

  )
 }

 :bbin/bin {aws.console {:main-opts ["-f" "src/aws/console.clj"]}}
 }

To me the uberjar route sounds like an interesting optimisation option for bbin. It would require to put the uberjar somewhere, but I'm guessing this would work on all operating systems.

I'm closing this issue, it's a little too broad in hindsight and after some testing I found that the uberjar has the best boottime. I had a discussion about this in Slack. The jar wrapper script would need to be patched to not use exec, I'll create an issue for this later.


sub categories of cond-mat

Say, what if one want to extract information from cond-mat.quant-gas?
My way is add subject reader fields  'subject':     ('textList', 'oai_dc:dc/dc:subject/text()')
and add an if record[1].getField('subject')[0] == subsection before write into file, where subsection is an argument.

Yes exactly, I think that's how I would've done it. I assume that those are
the correct keywords, but should be easy to check otherwise :)
On Thu, Jul 5, 2018 at 3:42 PM Laser Roger<EMAIL_ADDRESS>wrote:

Say, what if one want to extract information from cond-mat.quant-gas?
My way is add subject reader fields 'subject': ('textList',
'oai_dc:dc/dc:subject/text()')
and add an if record[1].getField('subject')[0] == subsection before write
into file, where subsection is an argument.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/everthemore/physics2vec/issues/1, or mute the thread
https://github.com/notifications/unsubscribe-auth/AB1_cTU6xzBhm84re2G5lsVIwnOaBiViks5uDcN-gaJpZM4VDZOk
.

I checked and it works :) I will submit a pull request recently.
BTW, your talk today at machine learning & physics conference is great.


added biometrics toggle to biometrics screen

Added the biometrics toggle back to the onboarding screen.
Removed the error if biometrics isn't enabled on device
Depends on: https://github.com/hyperledger/aries-mobile-agent-react-native/pull/444
Resolves: #578
Signed-off-by: wadeking98<EMAIL_ADDRESS>

@wadeking98 I think to get this back to the toggle / switch screen we can just stop overriding the Bifold screen. For this edit app/src/index.ts and rather than import UseBiometry from our repo, import it from aries-bifold.

@jleach Removed biometrics screen override


refactor: make casting more explicit in expression functions, and fix asList

#116  👈 (View in Graphite)
main

This stack of pull requests is managed by Graphite. Learn more about stacking.


new DateTime throws NPE when year is larger than 275760

Example code on DartPad:
https://dartpad.dartlang.org/892f0b17c43c9b80bb5a974359eb544b

This is expected behavior.
The JavaScript Date class requires the date to be withing 100_000_000 days of the epoch, which puts the maximal day at 13th of September 275760.
print(DateTime.utc(275760, 9, 13, 0, 0, 0, 0)); // works
print(DateTime.utc(275760, 9, 13, 0, 0, 0, 1)); // throws

For local dates, the limit is the same since the UTC epoch, so the precise hour may differ, but it's roughly the same time.


Fixes bug

Fixes an issue where it was only allowing torrents in with a file size of "1".
This was my mistake I should have put "files.length" instead of "length"

Seems working just fine :) thanks mate


Selecting ROWID crashes in 4.7.3

Hello
I've hit an issue on MacOS, using ocilib in OCI_WIDE_CHAR mode.  I'm using Oracle Instant Client 19c.
Using this example as the base:-
ocilib_cpp_api_demo_list_application
Modify the query to just select the rowid from the table.  Comment out or modify the code in the loop to only output the first column.
Build & Run the app and I get an AV on this line in resultset.c:-
OCIRowidToChar(rowid, NULL, &rowid_length, def->rs->stmt->con->err);
Or, if you commented out the line in the loop, this line in memory.c:-
ret = OCIArrayDescriptorFree(descp, type);
Do you see the same issue?
I can work round the issue by selecting ROWIDTOCHAR(ROWID), but I thought I'd raise it as some of your other samples only select the ROWID so I figured that was how it was designed to work.
Thanks.

Hi,
thus, on your environment, the following crashes whatever the variable ORA_OCI_NO_OPTIMIZED_FETCH   is set  (I was not aware of this varialbe until Chris mentionned it) ?
OCIRowidToChar(rowid, NULL, &rowid_length, def->rs->stmt->con->err);
If so, there only 4 parameters passed to the function:

OCIRowid handle retrieved from Oracle Client
Buffer to receive the string buffer
Buffer size pointer
OCI error handle

OCIError handle is used on almost all Oracle client calls thus it is valid
OCIRowid handle is retrieved from Oracle client
Buffer size pointer is correctly initialized

either the OCIRowidToChar method is NULL (if dynamically loaded) - But when building OCILIB on non windows platforms uses by default static linking rather dynamic loading. Thus I discard this possibility
either the macOS implementation does not like having a NULL buffer to query the size. Can you try adding a valid local buffer instead of NULL, recompile/install OCILIB ?
either the macOS implementation is broken for this method.

And btw, do you have the issue when you install OCILIB using default charset (ansi) ?

Yep, here you go (this is still with OCI_CHARSET_ANSI defined) :-

One last test you can do, it is to provide a valid local buffer, let's say a unsigned char buffer[100], go the first call to the function instead of passing NULL.
I would be interested to see if it was the reason of the access violation.
Vincent

Vincent,
I had already tried passing a OraText[19] buffer and saw the same issue, but I did try your suggestion:-

Results are the same.
Full code is below:-
`//
//  main.cpp
// The Instant client libraries must be signed to prevent access errors when running.
// OCI_CHARSET_WIDE must be defined
//
// Expected Result: Resultset.c fails with a AV at line 1801 (OCIRowidToChar(rowid, NULL, &rowid_length, def->rs->stmt->con->err)
//
#include
#include "ocilib.h"
void err_handler(OCI_Error *err)
{
printf("%ls (%d:%d)\n", OCI_ErrorGetString(err), OCI_ErrorGetType(err), OCI_ErrorGetOCICode(err));
}
void vincent_test() {
OCI_Initialize(err_handler, NULL, OCI_ENV_DEFAULT);
    OCI_Connection* conn = OCI_ConnectionCreate(OTEXT("//xxx.xxx.xxx.xxx/nnnn"), OTEXT("user"), OTEXT("password"), OCI_SESSION_DEFAULT);
    OCI_Statement* stmt = OCI_StatementCreate(conn);

    OCI_ExecuteStmt(stmt, OTEXT("select rowid from table_test")); // can be any table that exists and the user has permission to
    OCI_Resultset *rs = OCI_GetResultset(stmt);
    while (OCI_FetchNext(rs))
    {
        printf("%ls\n", OCI_GetString(rs, 1));
    }

    printf("row fetched %d\n", OCI_GetRowCount(rs));

    OCI_Cleanup();

}
int main(int argc, const char * argv[]) {
vincent_test();
return 0;
}`

The memory access exception is at an address 16 bytes into the memory pointed to by the OCIRowid*.  I can't find a definition of the OCIRowid structure, but is it possible that the structure is using 'char' internally and therefore wide characters are causing an overflow?
Of course, doesn't explain why it works on Windows.

Ok, so I've created a stand alone OCI sample to test this.  I used cdemo81.c at the starting point an amended it to test this use case.  The sample uses the standard scott demo schema:-

In short, it works.  No access viloation.  Can you spot a difference with the code here and what OCILib is doing?
The full sample is copied below:-
`#ifdef RCSID
static char RCSid =
"$Header: rdbms/demo/cdemo81.c /main/11 2017/09/12 21:21:47 aliu Exp $ ";
#endif / RCSID */
/* Copyright (c) 1996, 2017, Oracle and/or its affiliates.
All rights reserved.*/
/*
NAME
cdemo81.c - Basic OCI V8 functionality
DESCRIPTION

An example program which adds new employee
records to the personnel data base.  Checking
is done to insure the integrity of the data base.
The employee numbers are automatically selected using
the current maximum employee number as the start.

The program queries the user for data as follows:

Enter employee name:
Enter employee job:
Enter employee salary:
Enter employee dept:

The program terminates if return key (CR) is entered
when the employee name is requested.

If the record is successfully inserted, the following
is printed:

"ename" added to department "dname" as employee # "empno"

Demonstrates creating a connection, a session and executing some SQL.
Also shows the usage of allocating memory for application use which has the
life time of the handle.
MODIFIED   (MM/DD/YY)
aliu        09/11/17 - fix bug 21574212
gak         02/16/15 - Bug 20364067
aliu        02/04/14 - fix bug 18181823
aliu        09/03/13 - XbranchMerge aliu_bug-16007835 from st_rdbms_<IP_ADDRESS>
aliu        01/04/13 - fix bug 16007835 - add an variable for connect string
in OCIServerAttach
lburgess    04/14/06 - lowercase passwords
aliu        04/21/06 - use OCIEnvCreate and exit if it fails
mjaeger     07/14/99 - bug 808870: OCCS: convert tabs, no long lines
dchatter    10/14/98 - add the usage of xtrmemsz and usrmempp
azhao       06/23/97 - Use OCIBindByPos, OCIBindByName; clean up
echen       12/17/96 - OCI beautification
dchatter    07/18/96 - delete spurious header files
dchatter    07/15/96 - hda is a ub4 array to prevent bus error
mgianata    06/17/96 - change ociisc() to OCISessionBegin()
aroy        04/26/96 - change OCITransCommitt -> OCITransCommit
slari       04/24/96 - use OCITransCommitt
aroy        02/21/96 - fix bug in get descriptor handle call
lchidamb    02/20/96 - cdemo81.c converted for v8 OCI
lchidamb    02/20/96 - Creation
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <oci.h>
static text *username = (text *) "SCOTT";
static text *password = (text ) "tiger";
/ this dbname can be changed to point to a remote DB for demo to run with */
static text *dbname   = (text *) "";
/* Define SQL statements to be used in program. */
static text *seldept = (text *)"SELECT rowid FROM dept";
static OCIEnv *envhp = NULL;
static OCIError *errhp = NULL;
static void checkerr(/*_ OCIError errhp, sword status _/);
static void free_handles(/svchp, srvhp, authp, stmthp, stmthp1, stmthp2/);
static void logout_detach_server(/svchp, srvhp, authp/);
static sword finish_demo(/*svchp, srvhp, authp, stmthp, stmthp1, stmthp2 /);
int main(/_ int argc, char argv[] _/);
static sword status;
static boolean logged_on = FALSE;
int main(argc, argv)
int argc;
char *argv[];
{
OCISession *authp = (OCISession *) 0;
OCIServer *srvhp = NULL;
OCISvcCtx *svchp = NULL;
OCIStmt   *stmthp1= NULL;
OCIDefine *defnp = (OCIDefine *) 0;
OCIRowid *rowid = NULL;
sword errcode = 0;
ub2 rowid_length = 0;
OraText    rowidBuffer[19];
memset(rowidBuffer, 0, 19*sizeof(OraText));

errcode = OCIEnvCreate((OCIEnv **) &envhp, (ub4) OCI_DEFAULT,
              (dvoid *) 0, (dvoid * (*)(dvoid *,size_t)) 0,
              (dvoid * (*)(dvoid *, dvoid *, size_t)) 0,
              (void (*)(dvoid *, dvoid *)) 0, (size_t) 0, (dvoid **) 0);

if (errcode != 0) {
(void) printf("OCIEnvCreate failed with errcode = %d.\n", errcode);
exit(1);
}

(void) OCIHandleAlloc( (dvoid *) envhp, (dvoid **) &errhp, OCI_HTYPE_ERROR,
               (size_t) 0, (dvoid **) 0);

/* server contexts */
(void) OCIHandleAlloc( (dvoid *) envhp, (dvoid **) &srvhp, OCI_HTYPE_SERVER,
               (size_t) 0, (dvoid **) 0);

(void) OCIHandleAlloc( (dvoid *) envhp, (dvoid **) &svchp, OCI_HTYPE_SVCCTX,
               (size_t) 0, (dvoid **) 0);

checkerr(errhp, OCIServerAttach ( srvhp, errhp, (text *)dbname,
                                (sb4) strlen((char *)dbname), 0));

/* set attribute server context in the service context */
(void) OCIAttrSet( (dvoid *) svchp, OCI_HTYPE_SVCCTX, (dvoid *)srvhp,
                 (ub4) 0, OCI_ATTR_SERVER, (OCIError *) errhp);

(void) OCIHandleAlloc((dvoid *) envhp, (dvoid **)&authp,
                    (ub4) OCI_HTYPE_SESSION, (size_t) 0, (dvoid **) 0);

(void) OCIAttrSet((dvoid *) authp, (ub4) OCI_HTYPE_SESSION,
             (dvoid *) username, (ub4) strlen((char *)username),
             (ub4) OCI_ATTR_USERNAME, errhp);

checkerr(errhp, OCIDescriptorAlloc(envhp,(void**)&rowid, OCI_DTYPE_ROWID , (size_t) 0, (dvoid **) 0));

(void) OCIAttrSet((dvoid *) authp, (ub4) OCI_HTYPE_SESSION,
             (dvoid *) password, (ub4) strlen((char *)password),
             (ub4) OCI_ATTR_PASSWORD, errhp);

checkerr(errhp, OCISessionBegin ( svchp,  errhp, authp, OCI_CRED_RDBMS, (ub4) OCI_DEFAULT));

(void) OCIAttrSet((dvoid *) svchp, (ub4) OCI_HTYPE_SVCCTX,
               (dvoid *) authp, (ub4) 0,
               (ub4) OCI_ATTR_SESSION, errhp);

logged_on = TRUE;

checkerr(errhp, OCIHandleAlloc( (dvoid *) envhp, (dvoid **) &stmthp1,
       OCI_HTYPE_STMT, (size_t) 0, (dvoid **) 0));

checkerr(errhp, OCIStmtPrepare(stmthp1, errhp, seldept,
   (ub4) strlen((char *) seldept),
   (ub4) OCI_NTV_SYNTAX, (ub4) OCI_DEFAULT));

checkerr(errhp, OCIDefineByPos(stmthp1, &defnp, errhp, 1, (dvoid *) &rowid,
                 (sword) sizeof(sword), SQLT_RDD, (dvoid *) 0, (ub2 *)0,
                 (ub2 *)0, OCI_DEFAULT));

status = OCIStmtExecute(svchp, stmthp1, errhp, (ub4) 1, (ub4) 0,
                             (CONST OCISnapshot *) NULL, (OCISnapshot *) NULL, OCI_DEFAULT);

checkerr(errhp, status);
OCIRowidToChar(rowid, NULL, &rowid_length, errhp);

OCIRowidToChar(rowid, rowidBuffer, &rowid_length, errhp);

printf("Rowid Length = %d\n", rowid_length);
printf("Rowid = %s\n", rowidBuffer);

OCIDescriptorFree((void*)rowid, OCI_DTYPE_ROWID);

finish_demo(svchp, srvhp, authp,0, stmthp1,0);

}
void checkerr(errhp, status)
OCIError *errhp;
sword status;
{
text errbuf[512];
sb4 errcode = 0;
switch (status)
{
case OCI_SUCCESS:
break;
case OCI_SUCCESS_WITH_INFO:
(void) printf("Error - OCI_SUCCESS_WITH_INFO\n");
break;
case OCI_NEED_DATA:
(void) printf("Error - OCI_NEED_DATA\n");
break;
case OCI_NO_DATA:
(void) printf("Error - OCI_NODATA\n");
break;
case OCI_ERROR:
(void) OCIErrorGet((dvoid *)errhp, (ub4) 1, (text *) NULL, &errcode,
errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR);
(void) printf("Error - %.*s\n", 512, errbuf);
break;
case OCI_INVALID_HANDLE:
(void) printf("Error - OCI_INVALID_HANDLE\n");
break;
case OCI_STILL_EXECUTING:
(void) printf("Error - OCI_STILL_EXECUTE\n");
break;
case OCI_CONTINUE:
(void) printf("Error - OCI_CONTINUE\n");
break;
default:
break;
}
}
/* ----------------------------------------------------------------- /
/  Free the specified handles                                       /
/ ----------------------------------------------------------------- */
void free_handles(svchp, srvhp, authp, stmthp, stmthp1, stmthp2)
OCISvcCtx *svchp;
OCIServer *srvhp;
OCISession *authp;
OCIStmt *stmthp;
OCIStmt *stmthp1;
OCIStmt *stmthp2;
{
if (srvhp)
(void) OCIHandleFree((dvoid *) srvhp, (ub4) OCI_HTYPE_SERVER);
if (svchp)
(void) OCIHandleFree((dvoid *) svchp, (ub4) OCI_HTYPE_SVCCTX);
if (errhp)
(void) OCIHandleFree((dvoid *) errhp, (ub4) OCI_HTYPE_ERROR);
if (authp)
(void) OCIHandleFree((dvoid *) authp, (ub4) OCI_HTYPE_SESSION);
if (stmthp)
(void) OCIHandleFree((dvoid *) stmthp, (ub4) OCI_HTYPE_STMT);
if (stmthp1)
(void) OCIHandleFree((dvoid *) stmthp1, (ub4) OCI_HTYPE_STMT);
if (stmthp2)
(void) OCIHandleFree((dvoid *) stmthp2, (ub4) OCI_HTYPE_STMT);
if (envhp)
(void) OCIHandleFree((dvoid *) envhp, (ub4) OCI_HTYPE_ENV);
return;
}
/-------------------------------------------------------------------/
/* Logout and detach from the server                                 /
/-------------------------------------------------------------------*/
void logout_detach_server(svchp, srvhp, authp)
OCISvcCtx *svchp;
OCIServer *srvhp;
OCISession *authp;
{
if ((status = OCISessionEnd(svchp, errhp, authp, (ub4) 0)))
{
printf("FAILED: OCISessionEnd()\n");
checkerr(errhp, status);
}
if ((status = OCIServerDetach(srvhp, errhp, (ub4) OCI_DEFAULT)))
{
printf("FAILED: OCIServerDetach()\n");
checkerr(errhp, status);
}
return;
}
/---------------------------------------------------------------------/
/* Finish demo and clean up                                            /
/---------------------------------------------------------------------*/
sword finish_demo(svchp, srvhp, authp, stmthp, stmthp1, stmthp2)
OCISvcCtx *svchp;
OCIServer *srvhp;
OCISession *authp;
OCIStmt *stmthp;
OCIStmt *stmthp1;
OCIStmt *stmthp2;
{
if (logged_on)
logout_detach_server(svchp, srvhp, authp);
free_handles(svchp, srvhp, authp, stmthp, stmthp1, stmthp2);
OCITerminate(OCI_DEFAULT);
return OCI_SUCCESS;
}
/* end of file cdemo81.c */
`

Hi,
Thanks. It is normal that it works as you're not initializing OCI in UTF16 mode.
When using OCI_CHARSET_WIDE, ocilib passes the flag OCI_UTF16  to OCIEnvCreate() 2nd parameter 'mode'.
Vincent

Ok, thanks.
I'll give that a go.

On 21 October 2021 at 08:34 Vincent Rogier @.***> wrote:
Hi,

@AidyCC https://github.com/AidyCC there several issues in the raw oci code you've attempted to provide.
Mismatch between char/wchar_t, string lenght computing, row id that are always char* even in UTF16 mode.

@AidyCC https://github.com/AidyCC @cjbj https://github.com/cjbj here is the corrected and simplified and more concise version of the raw OCI code :)

still using the following DDL/DML:

create table table_test (value int);
insert into table_test select n from ( select rownum n from dual connect by level <= 100);

to test in UTF16 mode, keep #define UTF16
to test in ansi mode, comment #define UTF16

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <oci.h>

#define BUFFER_SIZE 512
#define UTF16

#ifdef UTF16
    #define ENV_MODE OCI_UTF16
    #define char_type wchar_t
    #define format "%ls\n"
    #define to_char_type(x) L ## x
    #define char_lenght(x) (wcslen(x) * sizeof(char_type))
#else
    #define ENV_MODE OCI_DEFAULT
    #define char_type char
    #define format "%s\n"
    #define to_char_type(x)  x
    #define char_lenght(x)  (strlen(x) * sizeof(char_type))
#endif

void check(OCIError* err, sword res)
{
    if (res != OCI_SUCCESS)
    {
        if (err != NULL)
        {
            int code = 0;
            char_type buffer[BUFFER_SIZE];
            OCIErrorGet(err, 1, NULL, &code, (OraText*) buffer, BUFFER_SIZE, OCI_HTYPE_ERROR);
            printf(format, buffer);
        }
        else
        {
            printf("OCI call returned %d\n", res);

        }
    }
}

int main()
{
    char_type* username = to_char_type("usr");
    char_type* password = to_char_type("pwd");
    char_type* dbname = to_char_type("localhost:1521/db19c");
    char_type* sqlstmt = to_char_type("select rowid from table_test where rownum = 1");

    OCIEnv* envhp = NULL;
    OCIError* errhp = NULL;
    OCISession * seshp = NULL;
    OCIServer *srvhp = NULL;
    OCISvcCtx *svchp = NULL;
    OCIStmt *stmhp= NULL;
    OCIDefine *defnp = NULL;
    OCIRowid *rowid = NULL;

    sword status = 0;
    ub2 row_id_length = 0;
    char row_id[20] = "";

    check(errhp, OCIEnvCreate(&envhp, ENV_MODE, NULL, NULL, NULL, NULL, 0, NULL));

    check(errhp, OCIHandleAlloc(envhp, &errhp, OCI_HTYPE_ERROR, 0, NULL));
    check(errhp, OCIHandleAlloc(envhp, &srvhp, OCI_HTYPE_SERVER, 0, NULL));
    check(errhp, OCIHandleAlloc(envhp, &svchp, OCI_HTYPE_SVCCTX, 0, NULL));
    check(errhp, OCIHandleAlloc(envhp, &seshp, OCI_HTYPE_SESSION, 0, NULL));
    check(errhp, OCIHandleAlloc(envhp, &stmhp, OCI_HTYPE_STMT, 0, NULL));

    check(errhp, OCIDescriptorAlloc(envhp, (void**)&rowid, OCI_DTYPE_ROWID, 0, NULL));

    check(errhp, OCIAttrSet(seshp, OCI_HTYPE_SESSION, (dvoid*)username, (ub4)char_lenght(username), OCI_ATTR_USERNAME, errhp));
    check(errhp, OCIAttrSet(seshp, OCI_HTYPE_SESSION, (dvoid*)password, (ub4)char_lenght(password), OCI_ATTR_PASSWORD, errhp));

    check(errhp, OCIServerAttach(srvhp, errhp, (text*)dbname,  (sb4)char_lenght(dbname), 0));
    check(errhp, OCIAttrSet(svchp, OCI_HTYPE_SVCCTX, srvhp, 0, OCI_ATTR_SERVER, errhp));
    check(errhp, OCISessionBegin(svchp, errhp, seshp, OCI_CRED_RDBMS, OCI_DEFAULT));
    check(errhp, OCIAttrSet(svchp, OCI_HTYPE_SVCCTX, seshp, 0, OCI_ATTR_SESSION, errhp));

    check(errhp, OCIStmtPrepare(stmhp, errhp, (OraText*) sqlstmt, (ub4) char_lenght(sqlstmt),  OCI_NTV_SYNTAX, OCI_DEFAULT));
    check(errhp, OCIDefineByPos(stmhp, &defnp, errhp, 1, (dvoid*)&rowid, (sword)sizeof(sword), SQLT_RDD, (dvoid*)0, NULL, NULL, OCI_DEFAULT));

    check(errhp, OCIStmtExecute(svchp, stmhp, errhp, 1, 0, NULL,NULL, OCI_DEFAULT));

    check(errhp, OCIRowidToChar(rowid, NULL, &row_id_length, errhp));
    check(errhp, OCIRowidToChar(rowid, (OraText*) row_id, &row_id_length, errhp));

    printf("Rowid Length = %d\n", row_id_length);
    printf("Rowid value  = %s\n", row_id);

    check(errhp, OCISessionEnd(svchp, errhp, seshp, 0));
    check(errhp, OCIServerDetach(srvhp, errhp, OCI_DEFAULT));

    check(errhp, OCIDescriptorFree(rowid, OCI_DTYPE_ROWID));

    check(errhp, OCIHandleFree(stmhp, OCI_HTYPE_STMT));
    check(errhp, OCIHandleFree(seshp, OCI_HTYPE_SESSION));
    check(errhp, OCIHandleFree(svchp, OCI_HTYPE_SVCCTX));
    check(errhp, OCIHandleFree(srvhp, OCI_HTYPE_SERVER));
    check(errhp, OCIHandleFree(errhp, OCI_HTYPE_ERROR));
    check(NULL,  OCIHandleFree(envhp, OCI_HTYPE_ENV));
}

Regards,

Vincent

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/vrogier/ocilib/issues/285#issuecomment-948338329 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ARWSX722EVFYWFLFXL33PXTUH67BRANCNFSM5FMPR6RA .
Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

@AidyCC  With the code I have provided, do you encounter the issue, in your environment,  when the macro UTF16 is defined ?

Hi Vincent
I'm not in front of my Mac at the moment.  I will try it later on today.
Thanks,
-Adrian

On 21 October 2021 at 10:16 Vincent Rogier @.***> wrote:
@AidyCC https://github.com/AidyCC With the code I have provided, do you encounter the issue, in your environment, when the macro UTF16 is defined ?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/vrogier/ocilib/issues/285#issuecomment-948418387 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ARWSX75ISVU3YIU7PR6ZGZTUH7K7TANCNFSM5FMPR6RA .
Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .


Per-task retry_count doesn't seem to work

I was trying to set a retry_count for a specific task, the idea is to wait for external dependencies but for a limited period of time.
I tried default luigi configuration with this sample code:
import luigi

from luigi import Parameter

class InputDataTask(luigi.ExternalTask):
    retry_count = 2

    target = Parameter()
    def output(self):
        return [luigi.LocalTarget(self.target)]

class CleanTask(luigi.Task):
    retry_count = 2

    def output(self):
        return luigi.LocalTarget("cleaned/cleaned")

    def requires(self):
        reqs = []
        reqs.append(InputDataTask(target = "input/file1"))
        reqs.append(InputDataTask(target = "input/file2"))
        reqs.append(InputDataTask(target = "input/file3"))
        return reqs

    def run(self):
        with self.output().open("w") as output_file:
            output_file.write("pipeline")

if __name__ == '__main__':
    luigi.run()

I run this script with the following command:
python luigi-example-easy.py CleanTask --worker-retry-external-tasks --worker-keep-alive
Anithing seem to work fine except the fact that the process never ends in case the external dependencies are not satisfied.
The same settings works if I modify luigi.cfg adding:
[scheduler]
retry_count = 2

Furthermore, adding --scheduler-retry-count 2 to the command line args returns:
luigi-example-easy.py: error: unrecognized arguments: --scheduler-retry-count 5
even though:
$ luigi --help-all | grep retry-count
             [--scheduler-retry-count SCHEDULER_RETRY_COUNT]
  --scheduler-retry-count SCHEDULER_RETRY_COUNT

calling the function using directly luigi seems to work again:
luigi --module luigi-example-easy CleanTask --worker-retry-external-tasks --worker-keep-alive --scheduler-retry-count 2
it works also without --scheduler-retry-count 2 since the configuration is specified in the task

Can you find and ping the author of this feature?

sure, I think is @javrasya. I tried and it seems that all the parameters added  here are available only if the task is started using directly luigi.
"retry_count"
"disable_hard_timeout"
"disable_window"


how can I select index after setAdapter(),except next() or previous()?

no，it can not，but  you can use  setAdapter(PullToNextAdapter pullToNextAdapter,int  currentIndex) Instead of  setAdapter(), Alternatively wait for next version。

ok,thanks,I wait for the next version.when will the next version completed?

come soon.


Restyle My Dataset Requests (Submissions) page for users

Currently looks a bit dated.

Started work in commit d5bd92617891f11146e888bd9fd63d39797705ff

More updates in ccfed96b33f21377073cef131866c401a07017be


[FlightRPC][C++][Go][Java] Add URI scheme to reuse connection

Describe the enhancement requested
https://lists.apache.org/thread/pc9fs0hf8t5ylj9os00r9vg8d2xv2npz
Add a way that services can explicitly indicate to clients that they may reuse the connection used to get FlightInfo to also fetch data, instead of requiring the service to somehow know or figure out its public address (which may be difficult when proxies, etc. are involved).
Component(s)
C++, FlightRPC, Go, Java

Issue resolved by pull request 40084
https://github.com/apache/arrow/pull/40084


[LiveMetrics] implement document details

This PR implements the details of the RequestDocument and RemoteDependencyDocument.
This resolves several outstanding TODOs.
Changes

Add new class DocumentHelper.cs which creates RequestDocument, RemoteDependencyDocument, and ExceptionDocument.

removed code from LiveMetricsExtractionProcessor and moved to DocumentHelper
Add unit test for new class.

Add EventSource log to DocumentBuffer
Cleanup comments
Replace todos with clarifying comments

API change check
API changes are not detected in this pull request.

Sorry all, converting this to Draft.
Comments are coming in faster than I can respond.
I'm doing a major rewrite to address comments.


Enphase: revert API change

Fixes #9478
Reverts #9332

Der Rollback, scheint nicht ganz geklappt zu haben. In der v0.118.11 (latest) wurden mir die Verbrauchsdaten noch korrekt in kW angezeigt. Ebenso wurde der Batteriestand korrekt angezeigt, jedoch nicht die aktuellen (Ent-)Ladewerte der Batterie. In der v0.119 sehe ich nur noch W und einen Integer-Wert (also statt 3,7kW wird 3W ausgegeben) und die Batterie wird mit 100% fix dargestellt.
Eventuell bist Du in der Zeit zu weit zurückgereist ;-)
Die Timeoutprobleme traten erst in einem nightly nach der v0.118.11 auf.

Die Werte stimmen überein. Ich glaube eher, dass das Template nicht passt.
Wie soll das gehen ('zeitgleich')? Reicht Dir ein Screenshot?

Ahjo!

Fixed in https://github.com/evcc-io/evcc/commit/866da9f8a2c6c0dccc224086ec18b1190710d68c


Automated cherry pick of #2146: climc: add --output-format support

Cherry pick of #2146 on release/2.11.
#2146: climc: add --output-format support

Codecov Report

:exclamation: No coverage uploaded for pull request base (release/2.11@e48e446). Click here to learn what that means.
The diff coverage is n/a.

@@              Coverage Diff               @@
##             release/2.11   #2167   +/-   ##
==============================================
  Coverage                ?   7.07%
==============================================
  Files                   ?     451
  Lines                   ?   70854
  Branches                ?       0
==============================================
  Hits                    ?    5015
  Misses                  ?   65425
  Partials                ?     414

Flag
Coverage Δ

#aFlag
7.07% <ø> (?)

Continue to review full report at Codecov.

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

/lgtm

/approve


Conversation: Storing a default .connections.yaml file to be loaded where not specified

I would love to hear any thoughts on this.
When load_connections() is called at the start of a project, if the .connections.yaml file is not present in the root folder of the project, and not specified in the load_connections(), instead look in a default, os specific location for the file. This would make it easy to write scripts that use database connections without having to worry about copying the correct .connections.yaml file into the root directory of the script each time.
If the location of the database had to change for that particular script, it would simply be a process of copying a modified version of the file into the project location for the database connection changes to be updated with no changes to the script.
There has been some backlash recently about having too many projects relying on dotfiles in the home folder on linux specifically, so I'm not sure where the best place to have the default location would be.

a .connections.yaml file in the root of the project was added to DEFAULT_FILE_LOCATIONS so the functionality to have default locations is ready - still need a conversation about the best default locations.
Also there should be some printed information when a default file is loaded so the user knows where it was loaded from

I'm going to take this out of the version 1 milestone for now - I don't think it's necessary and also it won't be much of an efficiency gain until this project has way more take up

closed in #69


Remove/Update the Condition for the same Azure Geo as this is not longer a limitation

The limitation for "The databases must be hosted in the same Azure geographic region." is not longer applicable, verified with FastTrack and also I executed and tested this

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

ID: 0c989148-fff9-5aa9-c903-31e88e6b8019
Version Independent ID: b669fca2-bf18-175b-14a2-371dbdb4ab25
Content: Point-in-time restore of the production database to a sandbox environment - Finance & Operations | Dynamics 365
Content Source: articles/fin-ops-core/dev-itpro/database/database-pitr-prod-sandbox.md
Service: dynamics-ax-applications
Product: ****
Technology: ****
GitHub Login: @laneswenka
Microsoft Alias: laneswenka

@Angelos102, thanks for the feedback.
@laneswenka, please review.

Bug #449011 has been logged to track this issue.


Some errors on an old version of typescript: 3.8.3

I get these errors on my project because I use an old version of typescript:
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
"typescript": "~3.8.3"
For some reasons, I  can't migrate to a new version of typescript (I see that this project is using "typescript": "^5.0.4")
Any idea how to solve this? The only solution I see is to fork the library and to fix it...
See the errors I get:
ERROR in node_modules/nostr-tools/lib/filter.d.ts:10:11 - error TS1110: Type expected.
10     [key: #${string}]: string[];
~~~~
node_modules/nostr-tools/lib/filter.d.ts:10:23 - error TS1005: ';' expected.
10     [key: #${string}]: string[];
~
node_modules/nostr-tools/lib/filter.d.ts:10:24 - error TS1128: Declaration or statement expected.
10     [key: #${string}]: string[];
~
node_modules/nostr-tools/lib/filter.d.ts:10:33 - error TS1011: An element access expression should take an argument.
10     [key: #${string}]: string[];
node_modules/nostr-tools/lib/filter.d.ts:11:1 - error TS1128: Declaration or statement expected.
11 };
~
node_modules/nostr-tools/lib/nip21.d.ts:10:56 - error TS1110: Type expected.
10 export declare function test(value: unknown): value is nostr:${string};
~~~~~~~~~
node_modules/nostr-tools/lib/nip21.d.ts:14:10 - error TS1110: Type expected.
14     uri: nostr:${string};
~~~~~~~~~
node_modules/nostr-tools/lib/nip21.d.ts:19:1 - error TS1128: Declaration or statement expected.
19 }
~

Template literal types were added in TypeScript 4.1: https://www.typescriptlang.org/docs/handbook/2/template-literal-types.html
There's nothing to do except upgrade TypeScript.

Why can't you upgrade TypeScript?

Ooh. Hi, Pater Nostr. I didn't know that you were active here.
I have a chain of old dependencies: ionic > angular -> typescript, and I don't have time now to fix the 'dependencies hell.'
For simplicity, I will fix these compilation problems on a fork of nostr-tools. I will migrate later...

OK.


Should().Be Infinite recursion {Maximum recursion depth was reached...}

This example causes the test to fail due to an infinite recursion issue in FluentAssertions.

using FluentAssertions;
using NUnit.Framework;

namespace Test
{
    class Foo
    {
        public Foo KillerProperty
        {
            get { return new Foo(); }
        }
    }

    [TestFixture]
    public class TestFailure
    {
        [Test]
        public void ThisTestCrashes()
        {
            var foo1 = new Foo();
            var foo2 = new Foo();

            foo1.Should().Be(foo2);
        }
    }
}

with an output of:
Expected object to be

Rsm.Test.Foo
{
   KillerProperty = Test.Foo
   {
      KillerProperty = Test.Foo
      {
         KillerProperty = Test.Foo
         {
            KillerProperty = Test.Foo
            {
               KillerProperty = Test.Foo
               {
                    KillerProperty = {Maximum recursion depth was reached...}
...

Thanks for reporting this. Looking at your example code, I clearly see a recursion issue. How would you expect FA to handle this situation?

I was using an older version of FluentAssertions which caused the vstest.execution engine to crash when this test was run. The latest FluentAssertions does not cause a crash but simply fails the test, so this is already an improvement.
I might be way off track here but it looks like the issue is in the code which generates the string output for the operation. One way to solve it would be to detect when a property creates such a recursive case and simply stop evaluating that property.

Yeah, but in this case the recursion is caused by you creating an undetectable infinite loop.

It's not such an unlikely scenario though, there are many cases where a property might create an instance of the class it belongs to.  You could create a heuristic to determine whether a property can potentially cause an infinite object graph by looking at the IL code of the property. Another way would be to track the max depth of a property which has a return type of it's parent, or something along those lines...

Sorry, but in this case I'm convinced FA is doing the right thing. You cannot expect the library to go that far.


Project table view closes #28

Coverage decreased (-0.2%) to 99.833% when pulling cdda830da0634f4e5538922d51c3b9fe6331390c on project-table-view-#28 into ce6c6a7dc833c518e30eff78551552a64636a792 on develop.

Coverage remained the same at 100.0% when pulling b2849574d649b3b463b0c86b07b60f8be4983b52 on project-table-view-#28 into ce6c6a7dc833c518e30eff78551552a64636a792 on develop.


[DUOS-2242][risk=no] Fix status check stream closed exceptions

Addresses
https://broadworkbench.atlassian.net/browse/DUOS-2242
Looks like https://github.com/DataBiosphere/consent/pull/1868 borked the status checks. Anything that was reading content using the timed threads was prematurely consuming the http response entity and throwing a closed exception when the status handler tried to read the response. This PR consumes the response inside the thread and returns a new construct with that content. Also adds a configurable thread pool.

Have you read CONTRIBUTING.md lately? If not, do that first.

Label PR with a Jira ticket number and include a link to the ticket
Label PR with a security risk modifier [no, low, medium, high]
PR describes scope of changes
Get a minimum of one thumbs worth of review, preferably two if enough team members are available
Get PO sign-off for all non-trivial UI or workflow changes
Verify all tests go green
Test this change deployed correctly and works on dev environment after deployment

These changes look good to me, updated tests are running successfully and all the status endpoints are working correctly when testing locally. I was trying to hit a stream closed exception against develop to double check the fix but was unable to reproduce the issue.

@quazi-broad - This is the kind of error we see in dev:
...
"ontology": {
  "healthy": false,
  "message": "Attempted read on closed stream.",
  "error": "java.io.IOException: Attempted read on closed stream.",
  "time":<PHONE_NUMBER>879,
  "duration": 33
},
...


util to convert geojson to osmosis polygon

It seemed like the approach with the existing geojson_to_osmosis script was to paste your geojson text into the python script, which is fine, but maybe this will be a little easier / fit into future automation.

If this is controversial, I'm happy to leave it out.


Closes: #1

Updated validations.py python script.
Fixed the behavior of validate_user function in validations.py.
Closes #1

It's a good idea to open an issue first for discussion.

[X] Tests pass
[X] Appropriate changes to README are included in PR

@googlebot I signed it!


Remove SM_75 architecture when compiling with CUDA 10.0

Description
Avoid compilation of code for SM_75 architecture when compiling with CUDA 10.0 to solve bug https://github.com/apache/incubator-mxnet/issues/17713
GPUs based on SM_75 architecture are able to run code generated for SM_70 architecture:
https://docs.nvidia.com/cuda/turing-compatibility-guide/index.html#turing-volta-compatibility
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.

[x] Changes are complete (i.e. I finished coding on this PR)
[x] Code is well-documented
[x] To the best of my knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

Changes

[x] Remove SM_75 as target architecture in linux_cu100 compilation

@mxnet-bot run ci [miscellaneous, unix-cpu]

@MoisesHer: @mseth10 ran into a size limitation problem while fixing the CD (and switching to cmake) and disabled SM_75 on all staticbuilds for now (https://github.com/apache/incubator-mxnet/pull/18205)


feat: Add AddressDisplayer for mobile, closes LEA-1638

Adds native version of AddressDisplayer, adds Fira Code and addresses some minor font/styling issues as a prerequisite:

Added Fira Code for mobile, new and correct weights for the web (had to compile woff2 and otf myself from source, as they weren't present in the official build 😬), updated references everywhere.
Update storybook for native, update the build to make sure all fonts are displayed correctly.
Add address textStyle to tokens, as code that's currently used for the web version of the AddressDisplayer doesn't match the new designs. I'm not extremely happy with the text style name this specific, brought this up with the design team to see if it's worth using something more generic.
Refactored the AddressDisplayer for web to match the current designs:

Used the new text style
Added a flexbox wrapper to correct line height (didn't work with inline context), replaced margin with 1ch wide gaps to avoid trailing spaces.
Had to merge into a single component, the layout pattern didn't make sense after doing the above, thankfully this is a fairly small component.

Added native version of the component

@edgarkhanzadian I would really appreciate your help double checking the config and all the artifacts expo generated after running prebuild to bundle fonts. I'm way out of my depth when it comes to this kind of thing.

@kyranjamie Missed an important part: extension will likely need a small PR to address the changes to the component here. Two questions:

Is there script that pulls the base.css and font files from the UI package automatically, or is it done manually?
How do we typically orchestrate releases when there's a potentially breaking change in the monorepo that affects the extension?

Is there script that pulls the base.css and font files from the UI package automatically, or is it done manually?

No, and I didn't realise they were copied. We shouldn't have duplicates of this file, ideally the base.css in the extension reads this one in the mono.

How do we typically orchestrate releases when there's a potentially breaking change in the monorepo that affects the extension?

This is a mostly manual process currently. Suggest linking the packages locally, making a PR in the extension (with a broken build because the package hasn't been released yet), then updating the PR when you've released the monorepo changes.

@kyranjamie Missed an important part: extension will likely need a small PR to address the changes to the component here. Two questions:

Is there script that pulls the base.css and font files from the UI package automatically, or is it done manually?
How do we typically orchestrate releases when there's a potentially breaking change in the monorepo that affects the extension?

When originally building the UI package we decided against hosting the font files and static assets in there and instead keeping them local to the extension. That's the reason for this base.css duplication.
It could be better to remove that duplication and keep everything in the UI library but we would need to do some work on bundling the font files for export with the UI package. We also have other static assets in extension/public anyway so I think it's OK to have small duplication here to avoid more complication.

Nice work here @tigranpetrossian , this is a really clean and valuable PR 🚀
If you run  pnpm syncpack:format it should fix your lint error

Thanks! Did this and it seems fine. I suspect the errors are either because I either modified the history of the branch too much or we need to add a pnpm install prior to running these scripts. Will investigate.

When originally building the UI package we decided against hosting the font files and static assets in there and instead keeping them local to the extension. That's the reason for this base.css duplication.
It could be better to remove that duplication and keep everything in the UI library but we would need to do some work on bundling the font files for export with the UI package. We also have other static assets in extension/public anyway so I think it's OK to have small duplication here to avoid more complication.

Agreed. I'm looking into this. If it turns out to be too complicated we'll tackle it separately or worst case scenario stick with duplication.

I saw this was sitting in the merge queue for ~6 hours. Not sure what is going on but tried removing/readding it.

Trying again.


EKF: Prevent long periods of flight without movement causing yaw drift

This PR modifies the logic that us used to automatically select whether the magnetometer heading or 3-axis measurement fusion method is used. The previous logic always used the 3-axis method once the vehicle had started flying, however this can cause problems for vehicle that enter into stable position hold for extended periods immediately after takeoff.
The revised logic uses horizontal acceleration to check if yaw is observable independent of the magnetometer and uses  about the vertical to check if mag bias states are observable.
If neither yaw of mag biases are observable, it saves the magnetic field variances, the learned declination and switch to magnetic yaw fusion. When yaw or biases become observable, the saved variances are reinstated and it and switches back to 3D mag fusion.
Here is a replay of a flight where the vehicle hovered for an extended periodi n 3-axis mag fusion mode which resulted in the mag bias states drifting, which led to eventual loss of heading and a flyaway with large velocity innovations and repeated resets back to GPS before the EKF eventually recovered.
XY mag bias estimates

NE velocity innovations

Here are the same plots after the changes:
XY mag bias estimates - estimates only update wen the vehicle has movement.

NE velocity innovations

Here are the mag field variances after the changes - variances are reinstated when movement checks indicate observability.

I have completed a flight test of a multi-rotor in still air conditions with 1000sec of static hover from takeoff, followed by 200 seconds of manoeuvring flight, followed by another 250 sec of static hover.
Mag bias estimation doesn't start until hover finishes at 1000 sec:

The mag heading and mag field innovations  show where it is switching between the heading and 3-axis fusion method:

Velocity innovations remained low throughout:

The XY IMU delta velocity bias estimates are unobservable during static hover and drift to incorrect values, however this does cause a problem because they recover immediately when the vehicle motion make them observable and have no adverse effect on the velocity innovations.

EKF data from another flight with alternating periods of hover and manoeuvring.
log001.ulg.pdf

I am happy for this to go in when someone has reviewed the code.

@tumbili Can you review?

@LorenzMeier Yes!

Awesome, thanks! I'd like to get this into the 1.6 release as we've seen this causing real-world issues.

So the review would be rather urgently needed 8).

@LorenzMeier I had to review carefully since the changes are not trivial. I didn't find anything worrying.


Search (Grep text under cursor) in current file

Problems summary
I want to be able quickfix only current file (or All Buffers) or search-jump in current-file (or All Buffers) by selected (visual mode) text
Is there any way to pass path (to file) to ProjectGrep or text to Lines (BufferLines)?
(imho Lines would be better)
Expected
I can do this functionality:

by using ProjectGrep and input path to file (but still it greps in all files from root folder, so in large projects it gets slower)

by using Lines and copy-paste selected text ( but still it loads all file lines, so in large files it gets slower)

I expect to pass selected text (via visual), press keybinding
vnoremap [fzf-p]/ "+y:CocCommand fzf-preview.Lines (BufferLines) <C-r>+<CR>
and see only those lines that contains selected text
Environment Information

fzf-preview version (package.json):

OS: Arch

Vim/Neovim version: Neovim

Provide a minimal init.vim
" call plug#begin('~/.vim/plugged')
" Plug 'junegunn/fzf'
" Plug 'neoclide/coc.nvim', {'branch': 'release'}
" Plug 'ryanoasis/vim-devicons'
" call plug#end()
"
" let g:coc_global_extensions = ['coc-fzf-preview']

Does this setup solve the problem?
xnoremap <silent> [fzf-p]/ "sy:<C-u>CocCommand fzf-preview.Lines --add-fzf-arg=--no-sort --add-fzf-arg=--query="'<C-r>=substitute(@s, '\(^\\v\)\\|\\\(<\\|>\)', '', 'g')<CR>"<CR>

yes, it does.
Thank you!


Adding one more worker machine

OpenPAI Environment:

OpenPAI version: v0.14.0
OS (e.g. from /etc/os-release): Ubuntu 18.04

The main problem:
I try to add one more worker machine to the cluster using python paictl.py machine add -p /path/to/cluster-configuration/dir -l machine-list.yaml, but this node gets only 3 pods - kube-proxy, job-exporter and node-exporter, and on the webportal I see only 2 of them:

Also, this node doesn't take pai-worker label and it's GPU doesn't connect properly.
In addition, I tried to refresh and stop + start hadoop-data-node service, but it didn't help.
machine-list.yaml contains:
machine-list:
- hostname: "hostname"
  hostip: "ip_worker_node"
  machine-type: "mt_worker_node"
  #sshport: PORT (Optional)
  username: "pai"
  password: "pass"
  k8s-role: "worker"
  pai-worker: "true"
  nodename: "ip_worker_node"

Moreover, I tried the template like this:
 - hostname: host2
   hostip: <IP_ADDRESS>
   machine-type: NC24R
   #sshport: PORT (Optional)
   username: username
   password: password
   k8s-role: worker
   pai-worker: "true"

How to add one more worker node correctly?

Upd. Following this issue: https://github.com/microsoft/pai/issues/4122 I've added a machine to the cluster, but I see the error of hadoop-data-node pod for this node:

docker logs hadoop-data-node shows the next error:
Failed to add storage directory [DISK]file:/var/lib/hdfs/data-1/ java.io.IOException: Incompatible clusterIDs in /var/lib/hdfs/data-1: namenode clusterID = CID-a54a4216-fd59-4d7a-b15d-0979104f38cb; datanode clusterID = CID-a1c3e880-f586-4abb-ac5f-10d30a17e436

Upd 2. Found that I should change VERSION of hadoop-data-node in /var/lib/hdfs/data-1 to VERSION of hadoop-name-node.
However, this this container falls every minute.

could you update machine list in /path/to/config/layout.yaml, then push config and restart all services?
python paictl.py config push -p /path/to/config
python paictl.py service stop
python paictl.py service start

@abuccts, I think I can clean the whole configuration and logs, but I don't do it. If I start python paictl.py service stop, I clean the history of all succeeded jobs, where I can have an important output.
Are there another solution how I can avoid a cleaning and add a new machine without any problems?

service stop won't clean your jobs or data, only service delete will.

@abuccts, okay, I got it.
However, there are the same problem, when I do steps which you wrote.
The hadoop-data-node for one certain machine is in a bad status. The error is the same:
Failed to add storage directory [DISK]file:/var/lib/hdfs/data-1/ java.io.IOException: Incompatible clusterIDs in /var/lib/hdfs/data-1: namenode clusterID = CID-a54a4216-fd59-4d7a-b15d-0979104f38cb; datanode clusterID = CID-a1c3e880-f586-4abb-ac5f-10d30a17e436

Upd. Only if I do python paictl.py service delete and python paictl.py service start I can solve this problem and the cluster works fine.
By the way, I want to add machines without any problems. Also, this problem appears every time when I try to add new worker machine.

However, there are the same problem, when I do steps which you wrote.
The hadoop-data-node for one certain machine is in a bad status. The error is the same:
Failed to add storage directory [DISK]file:/var/lib/hdfs/data-1/ java.io.IOException: Incompatible clusterIDs in /var/lib/hdfs/data-1: namenode clusterID = CID-a54a4216-fd59-4d7a-b15d-0979104f38cb; datanode clusterID = CID-a1c3e880-f586-4abb-ac5f-10d30a17e436

The Incompatible clusterIDs is caused after your change datanode's master, including changing a master node, or having deployed the worker node with another master before. Because the master node has initialized a cluster with a cluster id while the datanode is still using the old master's cluster id, which could make hdfs fails.
If you have deployed on worker node before, or failed to add worker node and want to retry new steps, please make sure to delete the datanode's data directory first, which locates /mnt/hdfs/data*/* on the worker host.

I check the path /mnt/hdfs/data*/*, but this worker node doesn't have anything even in /mnt path. I think something wrong in another configuration.

the default host path is /datastorage/hdfs/data if you didn't configure that, could you check it?
https://github.com/microsoft/pai/blob/2472b37792092e448b4050c776b35acb3e6ffafb/examples/cluster-configuration/services-configuration.yaml#L66-L69

The designated order should be
# stop previous services using previous config
python paictl.py service stop
# update config
python paictl.py config push -p /path/to/config
# start services using new config
python paictl.py service start

but I think the order won't affect if you add new nodes.

Only if I do python paictl.py service delete and python paictl.py service start I can solve this problem and the cluster works fine.

you mentioned only delete works in your cluster instead of stop, the difference is whether executing delete.sh script, which deletes datanode data in a pod (the path is different from host path)
https://github.com/microsoft/pai/blob/2472b37792092e448b4050c776b35acb3e6ffafb/src/hadoop-data-node/deploy/hadoop-data-node-delete/delete-data.sh#L21-L38
you can check whether it is the root cause in your environment

@abuccts, I solved this problem with your help. If I had a node which were in the cluster, but it hadn't deleted correctly, I deleted files in /datastorage/hdfs/data and if some node had a wrong Cluster ID, I changed it to the current Cluster ID from a master node in /datastorage/hdfs/data/current/VERSION.
Thank you so much!


fix: Update NumberBox formatting pattern for precision

fix #1079 .
By add NumberFormat pattern L632.

Great! Would you mind adding this to the CHANGELOG?

Sure, but I just realized that this PR is a bit too simple, and I would like to add some more content:

Create properties to store the pattern instead of concatenating them each time
Allow users to pass in patterns to customize the format
Allow a format method to customize the formatting, but this will affect the parser, and I haven't figured this out yet. I would like to hear your thoughts.

It seems that the PR has also failed to merge, so I will find some time later to complete this part and then modify the CHANGLOG.. Is that okay?

Sounds okay to me!

@FourLeafTec let me known when this is ready for review!

@bdlukaa Review please.


Provide custom cache key

I was reading through the code but didn't see an example, is it possible to provide a custom key value for the cache to Kamel? If not, can this be a feature request?
In my use case I'm looking to be able to feed it a http url for something that isn't an image and if that url key exists in cache, then load it, if not then I will provide a method that takes that url and returns a url to an actual image for it to go load - but then it needs to be cached under the other URL.
Is it possible to give Kamel a custom cache k/v pair class where I could implement this and get some kind of onNotInCache method where I can return the real img url?

I think your own mapper to do that, if I understand correctly.

I'm looking at https://github.com/Kamel-Media/Kamel/blob/main/kamel-core/src/commonJvmMain/kotlin/io/kamel/core/mapper/JvmMappers.kt as an example and that just looks like the translation of the URL, but no ability to do some background processing when the image does not yet exist in cache unless I'm misunderstanding how it works.
I'm building some website image previews, so I'm looking to be able to feed it a base url (eg; github.com) and if that key exists in cache already, then it will pull the cached image. If not, then I can get a callback of some sort where I can go parse that website to pull out the image I want such as og:image or something similar, and then download that image but cache it under the original base url so I only have to parse website html once.

https://zqtemp.oss-cn-beijing.aliyuncs.com/wangfou/阿凡达-打入敌人内部.png?Expires=1716017708&OSSAccessKeyId=TMP.3KhCE8dmmQEanAj2LaKPxR6Eb6QE6hAYThZgSTEyM5ATrbGMVgQx5Rc8c31Qp9theDKSoYPwyQ11EhzrV5qedbNx6AmQhR&Signature=utYM9r7kpGEEfR1qMTYJZYhoc%2B4%3D  这是阿里云的oss在设置私有读写之后，都会带着?Expires=1716017708&OSSAccessKeyId=TMP.3KhCE8dmmQEanAj2LaKPxR6Eb6QE6hAYThZgSTEyM5ATrbGMVgQx5Rc8c31Qp9theDKSoYPwyQ11EhzrV5qedbNx6AmQhR&Signature=utYM9r7kpGEEfR1qMTYJZYhoc%2B4%3D 后缀，为了保证我们能够获这个资源我们需要每次都带着后缀，后缀的时间是变化的，所以 kamelImage 每次都会拉取新的图片数据，但是 这张图片的https://zqtemp.oss-cn-beijing.aliyuncs.com/wangfou/%E9%98%BF%E5%87%A1%E8%BE%BE-%E6%89%93%E5%85%A5%E6%95%8C%E4%BA%BA%E5%86%85%E9%83%A8.png 这部分是不变的，这个不变的地址可以作为缓存的key,所以需要一个可以自定义设置缓存Key的功能，请问有这样的功能吗 ，如果没有可以考虑开发吗


npm audit vulnerability  : react-scripts > webpack-dev-server > yargs > yargs-parser

while running npm audit ,  I am getting the below error  for 'react-scripts' (1 low vulnerability ),
could you please help me ?

Below I have added my package.json.

Error is for  : "react-scripts > webpack-dev-server > yargs > yargs-parser"

npm audit
                   === npm audit security report ===

                             Manual Review
         Some vulnerabilities require your attention to resolve

      Visit https://go.npm.me/audit-guide for additional guidance

Low             Prototype Pollution
Package         yargs-parser
Patched in      >=13.1.2 <14.0.0 || >=15.0.1 <16.0.0 || >=18.1.2
Dependency of   react-scripts
Path            react-scripts > webpack-dev-server > yargs > yargs-parser
More info       https://npmjs.com/advisories/1500

package.json -> dependencies
"dependencies": {
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-router-dom": "^5.1.2",
"react-scripts": "3.4.0",
"reactstrap": "^8.4.1"
},

Any updates on how much time this will take?

Any updates on how much time this will take?

not yet ... any other alternative solution do you have, as build is getting failed ?

I have usually fixed this issue by deleting the package-lock.json or yarn.lock and then running npm install or yarn (depending on which one you use).

I have usually fixed this issue by deleting the package-lock.json or yarn.lock and then running npm install or yarn (depending on which one you use).

Thanks for your input. have tried deleting package.json but no luck.

It should be enough to update webpack-dev-server to the latest version 3.11.0 in react-scripts.
This is already done in master branch, so we just need a new release of react-scripts

It should be enough to update webpack-dev-server to the latest version 3.11.0 in react-scripts.
This is already done in master branch, so we just need a new release of react-scripts

Hope it is soon.

It should be enough to update webpack-dev-server to the latest version 3.11.0 in react-scripts.
This is already done in master branch, so we just need a new release of react-scripts

Hope it is soon.

any luck ?

See also: #8529, #8970, #8975.

This appears to be happening even when "react-scripts": "^3.4.0" or "react-scripts: "3.4.1" is used. On version 3.4.1, npm ls gives the following output:
└─┬<EMAIL_ADDRESS> [ snipped for brevity ]
  ├─┬<EMAIL_ADDRESS>
Looks like the npm version needs to be updated.

Anyone managed to solved this?

Any news about the update? Is a newer version of react-scripts > 3.4.1 fixing this warning going to be released soon? Thanks!

Also confirming I am seeing this issue. I ran into it when I had to do a npm install to read my created .env file. After the npm install, react-scripts": "3.3.1" wasn't loading with npm start. After reading here: https://stackoverflow.com/questions/60234640/typeerror-err-invalid-arg-type-the-path-argument-must-be-of-type-string-re
Upgrading the version made it work again, but this makes me and my team uneasy.
And now I'm seeing this same issue as the op... I love react, but please don't let it become unstable or it will be a hard sell to my team. I'm also hoping to get the next update to make the warning go away.

Almost month around when this was fixed in dependent webpack-dev-server package (https://github.com/webpack/webpack-dev-server/releases/tag/v3.11.0) and still no one has taken 5 minutes to bump the version of it in CRA? Looks like there is not enough pissed off dev-ops around the globe who are angry at failing pipelines because of npm audit or yarn audit. :D

Hi @iansu do you want to take credit for closing 4 issues in create-react-app?
You would have to release master for this. Or are there any blockers?
It would help us a lot. And if you will ever be in Berlin I invite you to a beer ;) Deal?

Hi there,
Wondering if anyone knows the plan around resolving this issue?

The commit is merged to master to fix this issue but there hasn't been a new release since March 20, 2020. Is anyone able to give a time frame for when a new release will be out?

This issue has a lot of complaints and is a problem for a lot of people who depend on this package. it blocks our application from being deployed to our production systems. The fix is known and has been made a long time ago. The day it was made it should have been released. Security-related item must be prioritized over any other fixes. Please make the release now and prove that you're good maintainers of your product.

This has been open for far too long now. I expect a release ASAP to fix this issue once and for all.

Hi,
the vulnerable code in yargs-parser is not actually used in CRA context. That said webpack-dev-server was already updated in https://github.com/facebook/create-react-app/pull/8975 and well be released in 4.0.0.

See and comment https://github.com/facebook/create-react-app/discussions/9131 on how to help with 4.0.0. crossing the finish line :)

I hope you are not expecting users to update to 4.0.0, which could break many other things, to fix a security warning. This should be a minor update.

I have also started seeing this warning, please help if you have any update or solution.

Thanks @andrewsteadcc , these steps have removed the warning.

Thanks ... this hack worked for me as well .. Thanku soo much ...
On Thu, 25 Jun 2020 at 4:39 PM, Mamta<EMAIL_ADDRESS>wrote:

Thanks @andrewsteadcc https://github.com/andrewsteadcc , these steps
have removed the warning.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/facebook/create-react-app/issues/9033#issuecomment-649472682,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACBK5CGQJXXR7T2WJEJDSNDRYMV5TANCNFSM4NFDKVZA
.

--
Sent from I phone

An absolute bunch of BALONEY that it's been 50 days and we can't get a minor update to fix a vulnerability.

Truee ....
On Thu, 9 Jul 2020 at 1:16 AM, shawn<EMAIL_ADDRESS>wrote:

An absolute bunch of BALONEY that it's been 50 days and we can't get a
minor update to fix a vulnerability.
https://camo.githubusercontent.com/ec64e8072bf6cfcd2a36527aef81df35b5b38e1e/68747470733a2f2f6d65646961322e67697068792e636f6d2f6d656469612f645838524344437a766230355963714e45622f67697068792e6769663f6369643d656366303565343730326564396538333239323463646438646637363963336161353735373935613961343135356164267269643d67697068792e676966
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/facebook/create-react-app/issues/9033#issuecomment-655719392,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACBK5CC5V7KQGTPCCX6MZ5LR2TEKJANCNFSM4NFDKVZA
.

--
Sent from I phone

You can resolve this by updating you package-lock.json file
Update yargs-parser 11.1 to 13.1.2 in all instances.
Also in that file, anywhere that you find yargs-parser been included with a version and a registry link, update it to the 13.1.2 using the details below
"version": "13.1.2",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz",
"integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==",

This is how I resolve this in our CI/CD pipeline

Note that if you re-generate the package-lock.json file this must be done. I'm sorry to say, but this has taken far too long. Including it in v4.0.0 is simply not enough. The completion status of v4.0 has been 75% for weeks now.

2 months for a vulnerability fix is ridiculous.

this seems to be fixed already but is not available on npm repos.
The web-dev-server is already implementing yargs": "^13.3.2"
https://github.com/webpack/webpack-dev-server/issues/2612
and react-script is already implementing last version of web-dev-server "3.11.0"
https://github.com/facebook/create-react-app/pull/8975
https://github.com/facebook/create-react-app/issues/8970
What i don't understand is the "not yet released". Anyone could give more information about this?
thanks

@calderaax That is the golden question, my friend. Only the CRA team can give us more information on why they are choosing not to create a minor release. Currently, their plan is to wait until 4.0.0 is ready.

I'm guessing there is little motivation to release a fix quickly, because I'm guessing this is yet another vuln that doesn't actually affect anyone's end runtime.
But have to pass corporate security checklists... rather than.. think.

We've updated webpack-dev-server to the latest version in preparation for the 4.0 release. This should be fixed in that release.

For any onlookers confused, here's the sequence of events as I'm able to trace it:

On February 14th, 2020,  create-react-app v3.4.0 was released.
A vulnerability with yargs-parser versions <=13.1.2, 14.0.0 - 15.0.0, 16.0.0 - 18.1.0 was disclosed on March 16th, 2020 by Snyk Security Team on their website.
This vulnerability propagated to create-react-app v3.4.0 as yargs-parser is a dependency of yargs, a dependency of webpack-dev-server, a dependency of react-scripts, which is a dependency of create-react-app.
On March 20th, 2020, create-react-app v3.4.1 was released.
On April 30th, 2020, the vulnerability from yargs-parser was disclosed publicly to create-react-app maintainers.
On May 8th, 2020, the vulnerability within webpack-dev-server was fixed by upgrading its yargs dependency to a later version 13.3.2.
Later that same day, the vulnerability within react-scripts was fixed by upgrading its webpack-dev-server dependency to the newly released version 3.11.0. The fix was merged into the master branch, but a new release for version 3.4.2 was not tagged to trigger the fix automatically for users.
As of July 22nd, 2020, create-react-app maintainers have indicated a preference for proceeding with including the fix in version 4 over of tagging a new minor release for version 3.

tl;dr A tagged release for 3.4.2 to include the fix for this issue was never made by maintainers.

I am a bit shocked that (1) this issue has been closed, (2) the create-react-app maintainers will expect people to do a major version upgrade to fix a security vulnerability that can be easily addressed with a simple npm dependency bump and a point release.
If if version 4.0 was already released and the issue fixed in that version, I would still expect a 3.4.x version bump for people on that version who aren't ready to upgrade.
It's what other packages do 🤷♂.

Why doesn't react-scripts depend on webpack-dev-server using the caret ^ in the dependency version, e.g. webpack-dev-server: "^3.10.3", this would be enough and when we run npm update things will fix themselves.

For those using yarn, a workaround might be to add a Selective dependency resolution. This can be done by adding the following to your package.json:
"resolutions": {
    "react-scripts/webpack-dev-server": "^3.10.3"
},

and then re-running yarn install.
When doing this locally I also needed to add SKIP_PREFLIGHT_CHECK=true to my .env. I consider this issue a major bug in create-react-app, and believe it should be re-opened.

To be clear, the vulnerability has no actual effect on CRA apps. The description says it’s for a DDOS attack which is completely irrelevant because CRA doesn’t use WDS for production environments. (It doesn’t even have a production web server.)
While I agree that ideally a release should be cut to satisfy people affected by enterprise requirements, we are looking at a case of an overzealous audit checker, not an actual vulnerability that affects your apps.

Hey all, I'd like to apologize for the delay here. We really dropped the ball on this, and I'm sorry for the frustration it caused. I've just cut<EMAIL_ADDRESS>which bumps us to<EMAIL_ADDRESS>with the fix.
Again, I need to be clear that there was no actual vulnerability here at any point in time. It is unfortunate that in the JavaScript ecosystem, "audits" have an extremely low signal-noise ratio, and especially with the build tooling, very rarely reveal actual issues. That said, I totally recognize that this is not an argument you can use in an enterprise deployment situation.
As @tkw1536 notes, Yarn has a feature called "resolutions" which lets you override transitive dependencies. I strongly recommend to use it whenever you have a problem like this which hasn't been addressed soon enough (for which, as I said earlier, I'm sorry).
To prevent this from happening again, I'm adding a dedicated reporting mechanism for security issues (https://github.com/facebook/create-react-app/commit/5e41ca016c1a650774b1e04d126a12ca93743c30) to this repo. We're not watching every thread and CRA is largely community-maintained, so please don't hesitate to escalate an issue if it is an urgent security matter. Thank you!

Thanks very much for addressing this @gaearon!

There appears to be another broken dependency.
serialize-javascript 2.1.2 is being used by react-scripts.

@mike-flores this is not a clear report. Please file a new issue and describe what you’re reporting in more detail (“broken” how?)

I’m locking because the discussion is starting to go offtopic and we risk losing important information in a closed issue.


Add support multiple files and folders

Handle multiple files and folders and process the files in the folders

Closed in https://github.com/Add00/DocBot/commit/83d85ae86d92136d86f3c5a05498af2a49042080


Fix typos on gRPC migration doc

https://twitter.com/J0rgeSerran0/status/1185941180888080384

That's why we prefer snippets :)


Network flow diagram

Description
As a TRE Developer
I want to understand what network flows are allowed/denied by default
So that I can troubleshoot connectivity issues
Acceptance criteria

[ ] Diagram of network components
[ ]  Show network flow from each core and workspace subnet to each other subnet and the internet.
[ ] For each flow show if the traffic is allowed or denied by default

Need diagram and description for TRE base setup and individual workspace templates / bundles.


How can we get rid of the "press any key to exit"

Can the command just exit when it's done?

use "--batch " option.

OK thanks.


Schedule not working after #519

After #519, we have changed the parsing of data and the schedule is now broken. Will have to update everything according to the new parser.

@mananwason We still don't have a schedule json from the orga-server right?

All info is already in the sample files for a long time. I really hope you guys can make this project happen until the end of GSoC. There are still issues in the sample files, but they are usable: https://github.com/fossasia/open-event/tree/master/sample/FOSSASIA16

@mariobehling Sure thanks.
But I believe, we need a separate json for event-dates, something like this
  "dates": [
    {
      "date": "2015-05-05"
    },
    {
      "date": "2015-05-07"
    },
    {
      "date": "2015-09-16"
    }
  ]
}``` <br>so that we can easily add corresponding tabs for the schedule.
Iterating through the sessions.json for this is a quite challenging task.
I'll create an issue for this in the orga-server repo.
Also, I'm sure we will be able to finish this us until GSoC, the app generator is done and integrated with orga-server.
Only issue remaining is parsing the newer json files, which I and @mananwason are working on in #519 .
Cheers.

@mariobehling @the-dagger There is no requirement of creating another issue. I have talked to @aviaryan in https://github.com/fossasia/open-event-orga-server/issues/1878. I'll fix this next. I was working on higher priority issues for now.

Ok, perfect. :+1:


Question: Rich Text Editor Features

I what to use code flask with simple rte features like bold, italic is that posibile?

Sadly no. CodeFlask is aimed to be a simple code editor. For RTE (WYSIWYG) you can take a look at any of those:
https://github.com/ianstormtaylor/slate
https://github.com/jaredreich/pell
https://github.com/summernote/summernote
https://github.com/bustle/mobiledoc-kit


Hooks support

Great work on Ferry! A quick feature request here :)
I come from React & Apollo background and like many others I'm using GraphQL Code Generator that fulfills similar purpose to Ferry. One really nice feature of it is generating hooks based on queries and mutation.
For example when I write a mutation like:
mutation Login($email: String!, $password: String!) {
  login(email: $email, password: $password) {
    ...UserInfo
  }
}

It generates a hook useLoginMutation that can be used as
// the function name is generated from mutation name
const [login, loginResult] = useLoginMutation({
  refetchQueries: ["Viewer"], // refetching queries by name would be great also!
  awaitRefetchQueries: true, // and awaiting these refetched queries
});

// execute the mutation (on button click / form submit etc)
const response = await login({
  variables: { email, password },
});

// loginResult has data, loading, error

Similar with queries:
query Viewer {
  viewer {
    ...UserInfo
  }
}

const { data, loading, error } = useViewerQuery();

Since flutter also supports hooks through flutter_hooks it would be really nice if generating such hooks could be enabled with some configuration option.
Using hooks (for graphql) results in much less code and less component nesting, once I tried it I don't want to do it any other way :)
I'm working on my own generic useQuery and useMutation hooks that can be used as
final viewerQuery = useQuery(context, GViewerReq());

// handle error
if (viewerQuery.hasError) {
  return ErrorScreen(
    title: 'Loading viewer info failed',
    message: viewerQuery.errorMessage,
  );
}

// get logged in user
final viewer = viewerQuery.response?.data?.viewer;
final isLoggedIn = viewer != null;

And mutations
final loginMutation = useMutation(
  context,
  GLoginReq(
    (b) => b
      ..vars.email = email.value
      ..vars.password = password.value,
  ),
  refetchQueries: [viewerQuery], // refetching by name would be nicer, this requires the other query to be in scope
);

// execute the mutation (on button click / form submit etc)
loginMutation.run();

// get logged in user
final loginViewer = loginMutation.response?.data?.login;

Which works but would be great if the hooks would be generated by Ferry :)

Hey!
I'm continuing work useQuery and useMutation hooks but I'm a bit stuck trying to provide variables to mutation when calling it.
Basically I've got this pattern working fine:
final loginMutation = useMutation(
  context,
  // request variables are set when creating GLoginReq
  GLoginReq(
    (mutation) => mutation
      ..vars.email = email.value
      ..vars.password = password.value,
  ),
  refetchQueries: ['Viewer'],
);

...

// run mutation on form submit etc
loginMutation.run();

But what I'm trying to also support is providing the variables to the mutation.run method so it would rebuild the query with updated variables. Something like:
final loginMutation = useMutation(
  context,
  // request variables are set to initial values but overridden in run()
  GLoginReq(
    (mutation) => mutation
      ..vars.email = ''
      ..vars.password = '',
  ),
  refetchQueries: ['Viewer'],
);

...

// run mutation on form submit etc, overriding variables
loginMutation.run(
  vars: GLoginVars((b) => b
    ..email = email.value
    ..password = password.value,
  ),
)

Right now the query argument to useQuery is OperationRequest<TData, TVars> but this does not have the rebuild method. How can I type it properly so I could use it in client.request(query) but also call query.rebuild((b) => b.vars = vars)?

I'd probably just cast to dynamic before calling rebuild. Not pretty, but it should work.

Yeah that's what I did. It does work but yeah not pretty. Oh well :)

Closing this issue, but @kallaspriit let me know if you do publish your hooks package, and we can link to it in the readme.

@smkhalsa Any update on hook support ?

For anyone interested in this, here is a dead simple hook that should mostly match the behavior of the Operation widget:
OperationResponse<TData, TVars> useGraphql<TData, TVars>(Client client, OperationRequest<TData, TVars> request) {
  var stream = useMemoized(() {
    return client.request(request).distinct();
  }, [request]);

  var snapshot = useStream(stream);

  if (snapshot.hasData) {
    return snapshot.data!;
  } else if (snapshot.hasError) {
    // Should never happen, GqlTypedLink should intercept stream errors
    throw "unreachable";
  } else {
    // Return a response in the loading state
    return OperationResponse(
        operationRequest: request
    );
  }
}

Usage is as follows (from your HookWidget):
var client = getGraphqlClient();
var startupData = useGraphql(client, GMyQuery());


Memory leaks question

Sorry for newby question, but can someone please explain to me if I'm wrong? Every time when we call action that has link to BackendFactory it's create new object of Hapi object with all functions inside it, and this object return some value that we are using after it like this:
BackendFactory().login({
      username: username,
      password: password
    })

So this way every time we are creating closure of Hapi object for every function that uses BackendFactory that uses it, and garbage collector can't clean this because we are saving information from this to redux... The same thing with AppAuthToken class... Am I wrong?

Good catch!  Would you mind converting the code into a "Singleton" pattern and create a PR?  I'd appreciate it.

Hi, I will try to do it on friday... if I will have time :) thanks...

Thanks, I look forward to it
On Sep 20, 2016 2:59 AM, "Simcha Shats"<EMAIL_ADDRESS>wrote:

Hi, I will try to do it on friday... if I will have time :) thanks...
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/bartonhammond/snowflake/issues/142#issuecomment-248231451,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABORPEsxqjqZQcGJnCSAEGBb0YHN-Sw2ks5qr5JugaJpZM4J_zqV
.

Done, now it in PR

Fixed w/ Release https://github.com/bartonhammond/snowflake/releases/tag/0.1.10b

Please note that extra care needs to be taken after "singleton" is applied to backend  - e.g. if backend instance is cached before authentication being made, the subsequent backend calls might not carry the token returned from authentication.


yubioath-desktop: fix dependencies on 22.11

yubioath-desktop has been removed on unstable in favor of yubioath-flutter, but 22.11 currently only has the former, and it's broken due to #202295. This change fixes it by depending on the previous, compatible version of the yubikey-manager library.
Description of changes

Things done

Built on platform(s)

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

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

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

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
23.05 Release Notes (or backporting 22.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

@Mic92 @rissson


feat(db): implement migration squashing

What kind of change does this PR introduce?
feature
closes #192
What is the new behavior?

squashes local migrations to the specified version using pg_dump
optionally updates migration history of the linked project

$ supabase migration squash<PHONE_NUMBER>4537 --linked
Applying migration<PHONE_NUMBER>4537_full.sql...
Squashed migration history to<PHONE_NUMBER>4537
Baselining migration history to<PHONE_NUMBER>4537

Additional context
Add any other context or screenshots.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

50 of 162 (30.86%)  changed or added relevant lines in 8 files are covered.
16 unchanged lines in 3 files lost coverage.
Overall coverage decreased (-0.7%) to 60.737%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

internal/migration/list/list.go
4
5
80.0%

internal/db/diff/diff.go
0
2
0.0%

internal/migration/repair/repair.go
2
4
50.0%

cmd/db.go
0
4
0.0%

cmd/migration.go
9
17
52.94%

internal/db/diff/migra.go
22
30
73.33%

internal/db/dump/dump.go
13
33
39.39%

internal/db/squash/squash.go
0
67
0.0%

Files with Coverage Reduction
New Missed Lines
%

internal/db/diff/diff.go
1
8.54%

internal/gen/keys/keys.go
7
7.94%

internal/db/dump/dump.go
8
61.84%

Totals

Change from base Build<PHONE_NUMBER>:
-0.7%

Covered Lines:
4650

Relevant Lines:
7656

💛  - Coveralls


Add test writing best practices and gotchas doc

[ ] Set up npm command for launching Playwright Inspector
[ ] Experiment with Test Generator
[ ] Maybe use annotations https://playwright.dev/docs/test-annotations
[ ] Conditionally skip a test, but use tags where possible? https://playwright.dev/docs/test-annotations#conditionally-skip-a-test

https://github.com/chanzuckerberg/single-cell-data-portal/pull/3589


request to add wedaly to azure team

Volunteering myself to help with anything Azure-related.

@cilium/azure


feat: display schema types and fields in a styled box for improved view

Thanks again @ademajagon for your first contribution in our codebase - let's make debugger a cool project together 🚀 🚀

Thank you, @kreshnnikgashi for your encouragement, Here's a screenshot of how it looks:

Thank you, @kreshnnikgashi for your encouragement, Here's a screenshot of how it looks:

What do you think about turning the first box top borders into rounded same as others ?

Thank you, @kreshnnikgashi for your encouragement, Here's a screenshot of how it looks:

And the JSON in the first box it's not rendered correctly. Can you check that aswell

I would add a little bit more padding inside the box:

I feel that we should remove the code rendering completely, and display a text box for each type and field. I think this would blend into the UI more.


country details in pretty view

solves #123

It seems like this feature produces strange artifact in my terminal (I'm still looking into how to fix this from terminal app end). Is there a way to turn this feature off by default or via command line arg? Thanks.

Tested with different term apps and this either shows oddly or doesn't show up at all based on chosen font. Some fonts do stretch this "emoji" so letters don't overlap, some don't. I really would appreciate this to be togglable. Thank you.

I filed https://github.com/ipinfo/cli/issues/144 to track this.


Add supplementary docs

Add docs to project:

Contributing
Authors
Code of conduct

Added links within README rather than creating new docs.


Placement sounds

It appears that entities place through the API doesn't generate the usual game sounds.
useful references:

https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.play_sound
https://lua-api.factorio.com/latest/events.html#on_built_entity

also
Oh yeah I also thought of that when I was watching some time ago. Also good would be having graphics show when putting/taking items, which should be possible with https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.create_local_flying_text

It could require a good amount of work unless the sounds aligns with the normal names of the buildings, in which case it could be done sole by changing the lua script.
Agreed that would be nice. It should be an option, which can toggled. It might get pretty absurd when doing 60 put/take actions in a second.

I am pretty sure the absurdity of fast controls is what people want to experience.
But i agree, i don't think it is as easy as it sounds. We will see

Now that I think about it, it might not be so bad. I guess the text will be spawned, at the entity where the action is made and not at the player.

This is probably related to put and take actions not showing the little white floating text, that usually appears when a player usually does those things.

I would guess so.

Turns out we need to use
https://lua-api.factorio.com/latest/events.html#script_raised_built
https://lua-api.factorio.com/latest/events.html#script_raised_set_tiles

Do we need to use these events in combination with something or instead of something - the description is pretty cryptic. 😅

I am sorry if was cryptic, i just added links for reading. Anyway i actually implemented the play sound in #31 so looking at the code might be more understandable.
I might look at handling tile placement sounds etc later.


Update to ratatui 0.28

I also replaced the deprecated frame.size() method with frame.area()
https://docs.rs/ratatui/latest/ratatui/struct.Frame.html#method.size
closes #2

Thank you! I will publish a new release, possibly tomorrow.


AWS SigV4 request against _plugins/_security

I'm using OpenSearch.Net nuget with the latest version. Is it possible to make a PUT request against _plugins/_security without having to use basic authentication? If possible, I'd like to use aws sigv4. I see there is RequestAsync exposed as a public method in AwsSigV4HttpConnection, but it requires a PostData which is an abstract class - not to mention that I don't know how to configure all other constructor parameters. Any code sample would be greatly appreciated.

Hi @petro2050,
It is possible to make arbitrary requests with the low-level client like so:
var connPool = new SingleNodeConnectionPool(new Uri("https://search-testing-3r5dexmg3lzz5nwnl57selbivi.us-east-1.es.amazonaws.com"));
var settings = new ConnectionConfiguration(connPool, new AwsSigV4HttpConnection());
var client = new OpenSearchLowLevelClient(settings);

var resp = await client.DoRequestAsync<DynamicResponse>(
    HttpMethod.PUT,
    "_plugins/_security/api/internalusers/kirk",
    CancellationToken.None,
    PostData.Serializable(new
    {
        password = "K1rkPass_",
        opendistro_security_roles = new[]
        {
            "opensearch_dashboards_user",
            "opensearch_dashboards_read_only",
            "readall_and_monitor"
        },
        backend_roles = Array.Empty<string>(),
    }));

Console.WriteLine(resp.DebugInformation);

Console.WriteLine(resp.Body.status == "CREATED");

await client.DoRequestAsync<VoidResponse>(
    HttpMethod.DELETE,
    "_plugins/_security/api/internalusers/kirk",
    CancellationToken.None);

You can find more information about configuring the AwsSigV4 connection here: https://github.com/opensearch-project/opensearch-net/blob/main/USER_GUIDE.md#opensearchnetauthawssigv4

Thanks @Xtansia. This is exactly what I was looking for. Could you please also tell me how to convert the following:
var connectionSettings = new ConnectionSettings(uri).BasicAuthentication(username, password).DefaultFieldNameInferrer(f => f).ThrowExceptions();
In particular, if I switch to ConnectionConfiguration like in your example, I'd like to know how to configure the default field name inferrer as well as throw exceptions.


[NEW]: '50% of transactions were fraudulent' when Steam accepted Bitcoin for payments

Date
2022-02-26
Description
Bitcoin was introduced as a payment method on Steam in April 2016 and removed in December 2017, reportedly due to the volatility of Bitcoin's price and "a significant increase in the fees to process transactions on the Bitcoin network."
Turns out that wasn't the only problem. In a recent interview, Valve president Gabe Newell said. "We had problems when we started accepting cryptocurrencies as a payment option. 50% of those transactions were fraudulent, which is a mind-boggling number. These were customers we didn't want to have."
Newell continued, "There's nothing inherently about distributed ledgers that makes them problematic. It's just so far that's almost always what our experience has been."
Links
https://www.pcgamer.com/uk/50-of-transactions-were-fraudulent-when-steam-accepted-bitcoin-for-payments-says-gabe-newell/
Agreement

[X] I irrevocably agree to release my contribution under the CC-BY 3.0 License

Attribution name
hmlongco
Personal link
No response

Although this statement was made recently, he's discussing an experiment from far before the timeline I'm trying to cover with this project.


error during install

Not sure if this project is still alive / monitored / maintained, but ill try.
During install I get an error:
pi@media-pi:~/git-clones/PIFanTuner $ sudo python setup.py install
running install
running bdist_egg
running egg_info
creating PIFanTuner.egg-info
writing requirements to PIFanTuner.egg-info/requires.txt
writing PIFanTuner.egg-info/PKG-INFO
writing top-level names to PIFanTuner.egg-info/top_level.txt
writing dependency_links to PIFanTuner.egg-info/dependency_links.txt
writing entry points to PIFanTuner.egg-info/entry_points.txt
writing manifest file 'PIFanTuner.egg-info/SOURCES.txt'
reading manifest file 'PIFanTuner.egg-info/SOURCES.txt'
writing manifest file 'PIFanTuner.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-armv7l/egg
running install_lib
running build_py
creating build
creating build/lib.linux-armv7l-2.7
copying pi_fan_tuner.py -> build/lib.linux-armv7l-2.7
creating build/bdist.linux-armv7l
creating build/bdist.linux-armv7l/egg
copying build/lib.linux-armv7l-2.7/pi_fan_tuner.py -> build/bdist.linux-armv7l/egg
byte-compiling build/bdist.linux-armv7l/egg/pi_fan_tuner.py to pi_fan_tuner.pyc
creating build/bdist.linux-armv7l/egg/EGG-INFO
copying PIFanTuner.egg-info/PKG-INFO -> build/bdist.linux-armv7l/egg/EGG-INFO
copying PIFanTuner.egg-info/SOURCES.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
copying PIFanTuner.egg-info/dependency_links.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
copying PIFanTuner.egg-info/entry_points.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
copying PIFanTuner.egg-info/requires.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
copying PIFanTuner.egg-info/top_level.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating dist
creating 'dist/PIFanTuner-0.0.1-py2.7.egg' and adding 'build/bdist.linux-armv7l/egg' to it
removing 'build/bdist.linux-armv7l/egg' (and everything under it)
Processing PIFanTuner-0.0.1-py2.7.egg
Copying PIFanTuner-0.0.1-py2.7.egg to /usr/local/lib/python2.7/dist-packages
Adding PIFanTuner 0.0.1 to easy-install.pth file
Installing pi-fan-tuner script to /usr/local/bin

Installed /usr/local/lib/python2.7/dist-packages/PIFanTuner-0.0.1-py2.7.eggProcessing dependencies for PIFanTuner==0.0.1
Searching for cmdtree>=0.0.3
Reading https://pypi.python.org/simple/cmdtree/
Best match: cmdtree 0.0.5.linux-x86-64
Downloading https://pypi.python.org/packages/a6/bd/275b7d73bf7e88682cebb3167761d77d3f5a5565e015e1aa72b3957be718/cmdtree-0.0.5.linux-x86_64.tar.gz#md5=ceb5052d412c2869d2945fa8e7184b85
Processing cmdtree-0.0.5.linux-x86_64.tar.gz
error: Couldn't find a setup script in /tmp/easy_install-zNOahi/cmdtree-0.0.5.linux-x86_64.tar.gz
pi@media-pi:~/git-clones/PIFanTuner $ pi-fan-tuner --help
Traceback (most recent call last):
  File "/usr/local/bin/pi-fan-tuner", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2876, in <module>
    working_set = WorkingSet._build_master()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 449, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 745, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 639, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: cmdtree>=0.0.3
pi@media-pi:~/git-clones/PIFanTuner $

ignore this and accept my apologies.
cmdtree was not installed on my Pi.


Feature: Mail

Content
Adds a new mailing system.
WIP, needs more information.

im sure this is gonna be used to send pipebombs


[Feature] README Updates

Is there an existing feature request for this?

[X] I have searched the existing issues

Describe the Feature
This packages README is not currently inline with our existing standards. It would be ideal for this repo to see README updates to be in line with our current documentation guidelines.
Describe alternatives you've considered
No response
Are you interested in contributing this feature?

[X] Yes.
[ ] Yes, but I will need assistance and will schedule time during your office hours for guidance.
[ ] No.

Anything else?
During these updates, we should also add the identifier variables and ensure the integration_tests/dbt_project.yml references the identifiers as well.

The README was updated in our 0.7.0 release, so closing this.


selectfieldset support

selectfieldset as used in JSON Form is not supported and would be a useful addition (https://github.com/joshfire/jsonform/wiki#fields-selectfieldset)

This would be even more useful together with oneOf-support :+1:


cleanup buckets from test deploys

Create a job to periodically cleanup buckets in test deploys.

In process by Ian already

This task is done, so I'm closing this issue. See the purgePrBuckets lambda function in our test account.


Fix spelling in verbose log output

Oops, forked this off of main instead of develop. Will try again.


🐛[BUG] Virtualized List, Some items not selected

🐛 Description
When selecting in a virtualized list, selecting items (not all) can cause some elements to be not selected
💻 Reproduction link
https://linxianxi.github.io/react-selectable-box/guides/virtual-list
📷 Steps to reproduce

Select up to 1000 elements
Scroll all the way up, notice first 2 rows are unselected

🏞 What is expected?
All 1000 elements to be selected
What is actually happening?
First 2 rows are unselected
© Version information

browser - Chrome 128.0.6613.138
system - MacOS Sequoia 15.0

Can you record a video?

@linxianxi here you go~!
https://github.com/user-attachments/assets/8f4bee28-510e-41c6-a7ff-28feb8021b4c

The virtual scrolling is too fast, causing no mount to be skipped for rendering, and it is impossible to determine the specific location. Currently, only elements that have been mounted will be selected.

The virtual scrolling is too fast, causing no mount to be skipped for rendering, and it is impossible to determine the specific location. Currently, only elements that have been mounted will be selected.

@linxianxi is this expected? scrolling at this speed to the bottom also causes only the top few rows to be not selected 😢

It seems to be a bug, because I usually use a trackpad and do not encounter this problem, I will check this bug

It seems to be a bug, because I usually use a trackpad and do not encounter this problem, I will check this bug

@linxianxi interesting bug 🤔 i tried trackpad and it is fine too
i'm using a Logitech Master MX3 mouse, not sure if it helps~

Fixed in 1.9.5, you can try again


Add ntext and image to max_length description

While deprecated, these types are still in use, and people ask from time to time what 16 means.

Thanks @AaronBertrand for submitting this PR. These changes look good. Your commit will be merged and this article update is in flight. After the updated article is published, GitHub will list you as an article contributor.  This document update will likely be published live later next week.
Thanks again for this feedback, your suggestions help improve our documentation.
#sign-off