Anti-Aliasing Bug (Initialize pre-generated message, then modify it)

bug_for_flatcc.zip
Hi everyone! This is my first bug report contribution into the FlatCC project. Thanks for making such an awesome project! Here are the details:
Files attached

build.sh has the build command to repro (define $GCC_PATH)
version.txt has GCC version (latest none-eabi) -- I was very close to filing a GCC bug until I turned on -fno-strict-aliasing and realized the issue is with the aliasing in FlatCC, not with the compiler
tempfiles.c The source code, after the preprocessor pasted the generated FlatCC code. Note the suffix "v2" is added by me by hand before posting here, not generated
out.lst The dissasembly

Explanation of the source code provided in tempfiles.c
The code in question is in the function interface_encoding_populate_general_rsp(). writes a message determined at compile-time into an array in the stack, and then finishes the message and copies into a buffer given by the caller.
If one steps through the code, essentially the following happens:

Response_as_root_v2() reads the word at msg_array[0] which should be equal to 12 and returns &msg_array[12]
Response_data_v2() reads the word at msg_array[12] which should be equal to 8 and then finds &msg_array[12-8]=&msg_array[4]. Then reads half-word at msg_array[4] and checks whether it is >=8. If less, it asserts

From the initialization of msg_array we can see everything should be initialized correctly, then Response_as_root_v2() and Reponse_data_v2() will work exactly as described above.
Actual Issue
The compiler smartly determines that it needs to look at msg_array[4] and check if it is less than 8. However, it reads msg_array[4] into R5 which has garbage in the stack. Then it initializes msg_array in the stack, and then compares R5 with 7 (branches to assert if less-or-equal).
MyTable: MyTableResponse,
}
table Response {
data: ResponseData (required);
}
Background
I found this by Aardappel which seems to be an user on stackoverflow who is highly involved with the project:
https://stackoverflow.com/questions/24330925/does-flatbuffers-avoid-strict-aliasing-somehow

Then in theory, if you first construct a FlatBuffer and then immediately read it, it could optimize across the writing and reading code, and do "evil" optimisations of the kind Linus was referring to in your link above (pretend the writing never happened).

Workarounds

Add a compiler barrier
Make things volatile and cast them before passing them into flatcc API's
Use lower optimization levels
Use -fno-strict-aliasing
A bunch of other potential compiler tricks

Actually taking again a look at this, this line looks dangerous:
vt__tmp = (flatbuffers_voffset_v2_t*)((uint8_t*)(t__tmp)-__flatbuffers_soffset_read_from_pe_v2(
    t__tmp));

  The table is uint8_t* but we cast into a uint16_t* type, so perhaps this is where the compiler assumes it can't alias?

For reference below is the code that is being discussed.
I link to the "reflection" code which is generated code that is checked into the repo, and the file is same for all flatcc projects of the same version, so this is not related to the reflection schema in particular.
https://github.com/dvidelabs/flatcc/blob/master/include/flatcc/reflection/flatbuffers_common_reader.h
Early in the file we have the macro
#define __flatbuffers_read_vt(ID, offset, t)\
flatbuffers_voffset_t offset = 0;\
{   flatbuffers_voffset_t id__tmp, *vt__tmp;\
    FLATCC_ASSERT(t != 0 && "null pointer table access");\
    id__tmp = ID;\
    vt__tmp = (flatbuffers_voffset_t *)((uint8_t *)(t) -\
        __flatbuffers_soffset_read_from_pe(t));\
    if (__flatbuffers_voffset_read_from_pe(vt__tmp) >= sizeof(vt__tmp[0]) * (id__tmp + 3u)) {\
        offset = __flatbuffers_voffset_read_from_pe(vt__tmp + id__tmp + 2);\
    }\
}

What cannot see from this is arguments being use to call this macro. If there are aliasing issues, this could be relevant.
You could try to make the macro a static inline function which should optimize the same but perhaps better isolate contexts for the compiler.
However, the macro is already being used in such inline functions, it seems overkill to add yet another layer which is why it is not.
Here is an example from the same file:
#define __flatbuffers_define_scalar_field(ID, N, NK, TK, T, V)\
static inline T N ## _ ## NK ## _get(N ## _table_t t__tmp)\
{ __flatbuffers_read_vt(ID, offset__tmp, t__tmp)\
  return offset__tmp ? __flatbuffers_read_scalar_at_byteoffset(TK, t__tmp, offset__tmp) : V;\
}\

Here is a weekly build that shows all the GCC versions being tested and pass. But that is for whatever architecture Github Actions use:
https://github.com/dvidelabs/flatcc/actions/runs/8047226724

Thanks! You are right, I could've done a better job producing a seamless repro. Here it is https://github.com/RafaelLaya/flatcc/pull/1 I forked FlatCC and modified the Monster example to show this. You should be able to cd mymonster && scripts/build.sh && ./build/mymonster and it should work. Just make sure to have arm-none-eabi-gcc available in your system. It will run on your system, but it will also build for ARMv7 and produce out.lst which is the dissasembly. From the dissasembly, we can clearly see the compiler produces code where we will be reading garbage from the stack
Thanks! Please let me know if you come to any conclusions

I had a look at your PR but don't currently have a tool chain to test with. I will see what I can do. Meanwhile, please consider experimenting with replacing functions in the accessors and common files discussed above. This is where a possible FlatCC fix would happen.
That said, it really looks like a compiler bug but I will not rule out anything since these things are notoriously tricky.
I cannot see any scenerio where the compiler should think it is a good idea to dereference memory it is responsible for initializing before it has initialized that memory area, which is what it does when dereferencing the stack pointer after reserving space. Of course someone could argue that the optimizer need not check for that if the code it compiles is correct, but I find that a hard sell, and the code works on numerous other platforms, also with GCC compiler.
In the PR you have a correctly aligned memory buffer that is compiler initialized.
Aside from the unfortunately named builder_t type that should have been buffer_t or something it looks OK in source.
Just to explain what happens in the buffer content and what the C source is supposed to do:
offset 0: 4, 0, 0, 0 : find the root table at offset 4 by adding to the buffer start location (which must be aligned).
Now we have get_as_root.
offset 4: negative 4 byte vtable offset. Subtract from current offset 4: 4 - (230 - 256) = 30.
offset 30: 8, 0, 9, 0, 8, 0, 4, 0 : this is the vtable in 16-bit elements
the first two bytes 8, 0 is the vtable size. The second two bytes 9, 0 is the table size of the referencing table
Table field with ID 0 is then voffset 8, 0 relative to the table at offset 4, so field ID zero starts at buffer offset 4 + 8 = 12.
Table field with ID 1 is then voffset 4, 0 at buffer offset 4 + 4 = 8
The soffset read function discussed above fetches the offset from one field in the vtable, and the compiler is supposed to optimize that read to relative to the vtable start very efficiently. It seems too efficiently in this case.
#define TABLE_PREDETERMINED_MSG  {4, 0, 0, 0, 230, 255, 255, 255, 8, 0, 0, 0, 1, 0, 0, 0, 248, 255, 255, 255, 128, 255, 255, 255, 6, 0, 8, 0, 4, 0, 8, 0, 9, 0, 8, 0, 4, 0, 0, 0}

/* msg_buffer
typedef struct {
    uint8_t buffer[40] __attribute__ ((aligned (8)));
} builder_t;

int run_test(void) {
    builder_t msg = {TABLE_PREDETERMINED_MSG};
    ns(Message_table_t) msg_table_root = ns(Message_as_root(msg.buffer));
    ns(CodeTable_table_t) table_ptr = ns(Message_data(msg_table_root));
    (void)table_ptr;
    /* ... */
    return 0;
}

OK, I downloaded the eabi-none toolchain and tested, not the PR but the original zip project you provided as I had that at hand already, and it turns out to be rather useful for modifying the flatcc library code for testing.
I get the assembly you documented, i.e. I can reproduce.
I then modified the function that reads the soffset to find the vtable location to make it use memcpy:
static inline flatbuffers_soffset_v2_t __flatbuffers_soffset_read_from_pe_v2(const void* p) {
#if 1 /* modified version */
  flatbuffers_soffset_v2_t word;
  memcpy(&word, p, sizeof(word));
  return __flatbuffers_soffset_cast_from_pe_v2(word);
#else /* original flatcc library code */
  return __flatbuffers_soffset_cast_from_pe_v2(*(flatbuffers_soffset_v2_t*)p);
#endif
}

And with the compile flags you provided, that is -O2 enabled, I get the following, which superficially seems to be better. But the memcpy is horribly ineffecient. The code does none of the memcpy is a cast optimizations, which is also one reason I did not make that change to accessors early - too many compilers that might do that slow.
00000000 <interface_encoding_populate_general_rsp>:
   0:	b570      	push	{r4, r5, r6, lr}
   2:	4c15      	ldr	r4, [pc, #84]	@ (58 <interface_encoding_populate_general_rsp+0x58>)
   4:	b08c      	sub	sp, #48	@ 0x30
   6:	4606      	mov	r6, r0
   8:	f10d 0c08 	add.w	ip, sp, #8
   c:	ad05      	add	r5, sp, #20
   e:	cc0f      	ldmia	r4!, {r0, r1, r2, r3}
  10:	e8ac 000f 	stmia.w	ip!, {r0, r1, r2, r3}
  14:	cc0f      	ldmia	r4!, {r0, r1, r2, r3}
  16:	e8ac 000f 	stmia.w	ip!, {r0, r1, r2, r3}
  1a:	e894 0003 	ldmia.w	r4, {r0, r1}
  1e:	2204      	movs	r2, #4
  20:	e88c 0003 	stmia.w	ip, {r0, r1}
  24:	4629      	mov	r1, r5
  26:	eb0d 0002 	add.w	r0, sp, r2
  2a:	f7ff fffe 	bl	0 <memcpy>
  2e:	9b01      	ldr	r3, [sp, #4]
  30:	1aed      	subs	r5, r5, r3
  32:	882b      	ldrh	r3, [r5, #0]
  34:	2b07      	cmp	r3, #7

I would say that this isn't really an acceptable solution.

If I do not modify the soffset reader, but change the build target:
# original flags
#FLAGS="-O2 -Wall -Wextra -ffreestanding -mcpu=cortex-m7 -mthumb -mabi=aapcs -std=c99"

FLAGS="-O2 -Wall -Wextra -ffreestanding -mthumb -mabi=aapcs -std=c99"

then I get the following which looks more sane superficially:
00000000 <interface_encoding_populate_general_rsp>:
   0:	b5f0      	push	{r4, r5, r6, r7, lr}
   2:	b08b      	sub	sp, #44	@ 0x2c
   4:	4669      	mov	r1, sp
   6:	4c0f      	ldr	r4, [pc, #60]	@ (44 <interface_encoding_populate_general_rsp+0x44>)
   8:	000b      	movs	r3, r1
   a:	0022      	movs	r2, r4
   c:	cae0      	ldmia	r2!, {r5, r6, r7}
   e:	c3e0      	stmia	r3!, {r5, r6, r7}
  10:	cae0      	ldmia	r2!, {r5, r6, r7}
  12:	c3e0      	stmia	r3!, {r5, r6, r7}
  14:	cae0      	ldmia	r2!, {r5, r6, r7}
  16:	c3e0      	stmia	r3!, {r5, r6, r7}
  18:	6812      	ldr	r2, [r2, #0]
  1a:	601a      	str	r2, [r3, #0]
  1c:	888b      	ldrh	r3, [r1, #4]
  1e:	2b07      	cmp	r3, #7

I also don't get early stack reference with the original build flags, but cortex-m0 or cortext-m1 instead:
FLAGS="-O2 -Wall -Wextra -ffreestanding -mcpu=cortex-m0 -mthumb -mabi=aapcs -std=c99"
#FLAGS="-O2 -Wall -Wextra -ffreestanding -mcpu=cortex-m1 -mthumb -mabi=aapcs -std=c99"
${GCC_PATH}/arm-none-eabi-gcc $FLAGS -o out.obj -c tempfiles.c

Regardless of who is to blame, I needed to warn about this issue in the cross compilation section.
https://github.com/dvidelabs/flatcc?tab=readme-ov-file#cross-compilation

I think technically this line violates strict aliasing, but adding attribute((may_alias)) does not seem to help regardless of where I put it.
return __flatbuffers_soffset_cast_from_pe_v2(*(flatbuffers_soffset_v2_t*)p);

As mentioned, memcpy seems to work but optimizes poorly.
I also tried const char *q = p; return q[0] | (int32_t)(q[1]) << 8 | ...; and this seems to optimize better, but that is a real pain to deal with every time you want to read from a memory buffer.
I also tried using a malloc buffer instead of a stack allocated array and this also seems to work better.
All of this from looking at assembly as I cannot test the target.
If there is no better way to support reading two bytes from memory without conflicting with the C compiler, I'm not sure it is worth supporting.

Just for the record: RafaelLaya commented direclty on the fix-accessors commits.
Also, I'm going to do some further updates to call mem_copy_read_nn and mem_copy_write_nn directly from flatcc_accessors, instead of calling mem_copy_word directly. This will make it possible to use pointer casts like *(T *)p as before, which is probably better on older MSVC compilers and possible other targets. On ARM / gcc the effect will be the same, calling mem_read_16 -> mem_copy_word -> builtin_copy, but I need to work on it a bit more to pass tests.
The behaviour can also be controlled by -DPORTABLE_MEM_PTR_ACCESS=0 (or 1), and also by defining mem_copy_word before header inclusion. This might be relevant on some targets, since this area of operation is extremely performance sensitive, and also code size sensitive.

I have now update the fix-accessors branch. I needed to add mem_read/write_float_32/64 as well. It passes std CI tests.
If you are happy with the design, can you please confirm that it solves the issue on actual -mcu=cortext-m7 -O2 compiled targets, if possible?
I still think this is a compiler issue, it is not practical to disallow C code with simple pointer memory access, but at least we appear to have a workable solution that is not too ugly.

Update: Tested on an M7 Target. The issue is gone now and didn't observe any regressions :) -- Thanks a lot!

Thanks for testing. I will merge this.

I like that you added customizability of mem_copy_word

It is a core feature of flatcc to isolate platform dependencies in the portable library, and to run well on many targets, so it is a natural extension of other similar code, like endian conversion and aligned allocation.

Something that I can't seem to ignore is that we are first initializing the buffer and then passing it into the as_Root() function and then as_Data(). So regardless of any aliasing issues inside as_Root() or as_Data(), it should at the very least finish initialization before doing the calls. Wouldn't you agree?

I agree. If you read earlier comment of mine I write that I cannot see any scenario where the compiler should dereference uninitialized stack content it is responsible for.
Having written some compiler backend logic, I can speculate that the compiler injects its own initializaition into the execution graph, then does liveness checking (dependency tracking), then culls any dependency links that violates strict aliasing, then finds two parallel root executation paths that are equally good: ready from stack, or initialize stack.
However, this has less to do with optimization that final output and more to do with how the compiler goes around achieving this.

Merged. I updated notes in CHANGELOG 0.6.2, README cross compilation section.

For the record, the following two commits on master implemented the fix:
pmemaccess.h:
c994c4974148cfa7e6b179216ad2da1b01004028
flatcc_accessors.h:
cc6e6e5663b65d11aedd54180255df241ba8fd6c
The old (by Intel) deprecated Intel ICC stopped working after these changes unless -O3 is dropped to -O2. We are not sure why, and might just deprecate it from FlatCC weekly builds, but for the record, the only other change between successful and broken weekly build is an update to pstdbool.h: 81d4ba67b66266dc6a4ce761a6091a613ed46a49

ICC build fixed in commit: 7625a37eccc7640afdbde951d579ca5834eadbdb
It just defaults to not using pointer casts for that compiler. It will use __builtin_memcpy.
It was same issue is this issue, but since we be default chooses non-strict pointer casts on x86/64, and ICC is sensitive to that on -O3, it triggered a segfault. This could just as well have happened earlier on, but was triggered by the very changes that were supposed to fix it, randomly.
A related commit just cleans up bocus ICC warnings: 56d2559caee08c52a7c6e097ea38a7f4b7d40c4a

Added documentation section: https://github.com/dvidelabs/flatcc?tab=readme-ov-file#strict-aliasing


Use custom modal instead of prompt() for node text

Use a custom modal for taking the node text input instead of the native prompt()

I can handle this one. Could you assign this issue to me?

Let me know if @milan090 drops this issue. If so, assign this to me.

sure @ThPadelis


Joining dataframes

Nice.   I've been doing similar things with SQL sources.  I'm  curious why you attach the ask to a specific dataframe.  Can multiple dataframes be considered in one request?  Thanks

Hey @dave-killough ,
I attached to a specific dataframe because it was the easiest to "gather" the local context. In a python kernel, just doing sketch.ask(...) and inspecting the locals() in the same parent as the call is possible but potentially leading to lots of mistaken variables and too many dataframes. Also, this is somewhat rough in jupyter kernel style sessions, where navigating the call stack and finding other variables seemed to be a bit difficult (though if you have a trick here, this might make this really easy).
In many jupyter notebooks, people often re-use the same dataframe as well (editing in place), so the clarity of the answer I felt should be contextualized to a single dataframe.
One option for multiple joining I considered was something like
df.sketch.howto("question", extra_contextual_dfs=[*dfs])

but that didn't feel "easy to type" / "native".
Do you have any ideas or preferences for what would make a good API?

Asking questions across multiple dataframes would be very interesting. I was hoping to do something like this:
import pandas as pd
import sketch
from sqlalchemy import create_engine

# Define a class to store views
class Views:
    def __init__(self, schema_name, db_url):
        self.views = {}
        self.history = []
        self.engine = create_engine(db_url)
        self.schema_name = schema_name

        # Get all views in the schema
        views = pd.read_sql_query(f"SELECT table_name FROM information_schema.views WHERE table_schema = '{schema_name}'", con=self.engine)

        # Loop through each view and read it into a Pandas dataframe
        for view in views['table_name']:
            df = pd.read_sql_query(f"SELECT * FROM {schema_name}.{view}", con=self.engine)
            self.add_view(view, df)

    def add_view(self, name, df):
        self.views[name] = df

    def ask(self, question):
        answer = sketch.ask(question, self.views.items())
        self.history.append((question, answer))

# Connect to Postgres
db_url = 'postgresql://user:password@localhost:5432/mydatabase'
schema_name = 'my_schema'

# Create an instance of Views
my_views = Views(schema_name, db_url)

# Ask questions of all views and store history
my_views.ask('What are the top problematic projects with respect to planned vs actual time tracked?')
my_views.ask('Which activities appear to require upskilling?')

# Interrogate my_views.history for example


python 3.10 compatible MutableSet

Making PR2 TAMP example work in python 3.10 as mentioned in https://github.com/caelan/pddlstream/pull/35#issuecomment-1154658107
Require commit f067901bfabd3cd1a21ae42ef2088733eb1da476 in PR https://github.com/caelan/pddlstream/pull/35  to work

would love to see this merged as it unblocks my usecase :) @caelan - does this look alright to you?

Closing in favor of: https://github.com/caelan/pybullet-planning/commit/d536384dca2c890bbbdb5c14f07a3b7580201d8a


[PIP-82] [pulsar-broker] Misc fixes:

- fix updateLocalQuota to not attempt Dispatch changes
- add checks for totalUsed of 0, and unconfigured RG in ResourceQuotaCalculatorImpl
- UT for above

Motivation
Bug fixes in RG rate limiting
Explain here the context, and why you're making that change. What is the problem you're trying to solve.
Modifications
Describe the modifications you've done.

don't clobber the publish rate limiter with (yet-unsupported) Dispatch side values
add checks against unconfigured RG rate-limiter component(s) and total-usage of zero

Verifying this change

[X] Make sure that the change passes the CI checks.

(Please pick either of the following options)
This change is already covered by existing tests, such as (please describe tests).
- mvn test -Dtest=org.apache.pulsar.broker.resourcegroup.ResourceGroupRateLimiterTest -pl pulsar-broker
- mvn test -Dtest=org.apache.pulsar.broker.resourcegroup.ResourceGroupServiceTest -pl pulsar-broker
- mvn test -Dtest=org.apache.pulsar.broker.resourcegroup.ResourceQuotaCalculatorImplTest -pl pulsar-broker
Does this pull request potentially affect one of the following parts: no
If yes was chosen, please highlight the changes

Dependencies (does it add or upgrade a dependency): (no)
The public API: (no)
The schema: (no)
The default values of configurations: (no)
The wire protocol: (no)
The rest endpoints: (no)
The admin cli options: (no)
Anything that affects deployment: (no)

Documentation
For contributor
For this PR, do we need to update docs? No.

If yes, please update docs or create a follow-up issue if you need help.

If no, please explain why.

For committer
For this PR, do we need to update docs?

If yes,

if you update docs in this PR, label this PR with the doc label.

if you plan to update docs later, label this PR with the doc-required label.

if you need help on updating docs, create a follow-up issue with the doc-required label.

If no, label this PR with the no-need-doc label and explain why.

/pulsarbot run-failure-checks

/pulsarbot run-failure-checks

/pulsarbot run-failure-checks

/pulsarbot run-failure-checks

/pulsarbot run-failure-checks


Inserting Examples in response schema

Problem statement
How can we insert examples in response schema?
Following is my response struct :
type Item struct {
	Status Status `json:"status,omitempty"`
	// Metadata
	Metadata Metadata `json:"metadata,omitempty"`
}

type Metadata struct {
	// Volume Name
	//example: OpenEBS Volume
	//Required: true
	VolumeName string `json:"name"`
	// The time the snapshot was successfully created.
	// example: null
	// Required: true
	CreationTimestamp string `json:"creationTimestamp"`
	Labels map[string] string `json:"labels"`
	Annotations map[string] string `json:"annotations"`

}

And following is in UI:

But I want example like :
"annotations": {
                         "com.example1.com": "SomeString",
                         "com.example2.com": "SomeString"
},

Environment
swagger version: dev
go version: 1.9.2
OS:   Ubuntu 16.04 LTS

You can use something like this
struct {
  // Name is the name of a thing
  //
  // in: query
  // example: Angel Zhang
  Name string
}

Yes, I have used that and it works if the variable is string.
As you can see in the above metdata struct . Volume name is coming prefect.
But how we do in case of map ( for example in metadata struct in above pic the Annotations map).

it uses these rules: https://github.com/go-swagger/go-swagger/blob/master/scan/validators.go#L301-L316
So i think you might be achieve what you want by just putting a json structure there

failing that you can create a json document that has all the properties that you can't generate and use that as --input extra.json then it will be merged in with the properties from your spec. Not ideal but it would work

Sure I will give a try on these...
Yes --input works... I had to use it for x-logo tag in spec that couldn't be generated using go swagger..
By the way thanks, and will also try to look on source code of go swagger wether some of these issues which I have raised can be solved by Raising a PR or not, just to extend go swagger support

that would be awesome


fix Make catalog recycle bin regression stable

Proposed changes
The case is unstable because data size is not reported to fe in time.
http://<IP_ADDRESS>:8111/buildConfiguration/Doris_DorisRegression_P0Regression/344841?hideProblemsFromDependencies=false&hideTestsFromDependencies=false&expandPull+Request+Details=true&expandBuildTestsSection=true&expandBuildChangesSection=true
Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall


Get Plan by its tag

I find it useful to get the Plan as well by its tag name

Done in #56 but changed getByTag to keep it similar to other methods like getFeatureByTag


Pass schema to function and it returns infer-ed type of schema

Hey, thank you so much for this library, it is awesome!!
I try to achieve validation function for http responses, that could:

accept  response schema as argument
validate response against schema
return validated response or throw an error

Below is my maximum I could create :sweat_smile:  and it works in simple cases.
async function requestWithValidate<T>(
	httpCall: () => Promise<unknown>,
	schema: z.ZodSchema<T>
): Promise<T> {
	try {
		const response = await httpCall();
		return schema.parse(response);
	} catch (e) {
		if (e instanceof ZodError) {
			e = e.format();
		}
		throw e;
	}
};

However, when I pass schema that contains ZodEffect(schema field with pre-processor for example) I have type incompatibility.
I have it for Date fields and for them I get Type 'unknown' is not assignable to type 'Date'
Pre-processor:
const stringToDateConvert = z.preprocess((arg) => {
    if (typeof arg === 'string' || arg instanceof Date) {
        return new Date(arg);
    }
}, z.date());

Example schema:
z.object({
    id: z.number(),
    date: stringToDateConvert.nullable(),
}).nullable();

Could you please help with setup of generics for this function that could work even with any Zod type?

I found workaround to infer type from _type like this:
export = async function requestWithValidate
        <T extends { parse(data: unknown, params?: Partial<ParseParams>): unknown; _type: unknown }>
         (httpCall: () => Promise<unknown>, schema: T): Promise<T['_type']> {
	try {
		const response = await httpCall();
		return schema.parse(response);
	} catch (e) {
		if (e instanceof ZodError) {
			e = e.format();
		}
		throw e;
	}
};

@colinhacks , mb we could add this into doc? I think my case faced quite often for others as well

Is this what you are looking for?
async function requestWithValidate<Schema extends z.ZodTypeAny> (
    httpCall: () => Promise<unknown>,
    schema: Schema
): Promise<z.infer<Schema>> {
    try {
        const response = await httpCall()
        return schema.parse( response )
    } catch ( e ) {
        if ( e instanceof z.ZodError ) {
            e = e.format()
        }
        throw e
    }
}


Mutation through let binding (and no &)?

Discussed in https://github.com/orgs/hylo-lang/discussions/1522

Originally posted by dholmin July 12, 2024
Hi all,
I just started out playing with the compiler (on MacOS), and one of the first things I typed that I didn't expect to compile, did. Here is the code:
type Thing : Deinitializable {
  public let position: Int
  public let speed: Int
  public memberwise init
}

fun update_physics(_ t: Thing)
{
  t.position += t.speed
}

public fun main()
{
  let t = Thing(position: 0, speed: 1)
  update_physics(t)
  update_physics(t)
  print(t.position)
}

This compiles and prints 2. I was expecting it to complain about mutation through a let binding and missing &s and maybe other things. What am I missing here?

If it helps, I built Hylo from this commit: f6ee33caaf9c96f8c03aa79d2e8381debdc6dd5a


Deprecate Google Cloud configuration JSONs

This PR addresses Issue https://github.com/broadinstitute/gatk-sv/issues/709.
Description
Deprecates all google_cloud.*.json files, as well as the CLOUD_ENV variable, as these are no longer used in building inputs for workflows. Also removes any code or documentation references to these.
Testing
Successfully ran the two commands listed below. The first command does not utilize the -c parameter, which was traditionally used to pass in the Google Cloud configuration details.
bash scripts/inputs/build_default_inputs.sh -d .

bash scripts/test/validate.sh -d . -j womtool-87.jar -t

@VJalili I believe that the PR already includes changes to relevant documentation files (which are listed below), but please let me know if I am missing anything else here.

README.md
website/docs/advanced/build_inputs.md
website/docs/gs/quick_start.md

You're right; thanks for pointing out the changes.

@kjaisingh, this is a long-wanted deprecation! Thank you!! :tada: :tada:


Suggestion of quickOpen

VSCode Version: Code 1.3.1 (e6b4afa53e9c0f54edef1673de9001e9f0f547ae, 2016-07-12T13:35:06.227Z)
OS Version: Windows_NT ia32 6.1.7601

Now quickOpen first item is current file
can it change to previous one.
not current file like Idea.
:smile:

That's great idea - both Atom and Sublime do it that way

@wallverb
thank you.
:smile:

Seems like duplicate of https://github.com/Microsoft/vscode/issues/6923


Simplify isInnerClass

Competing implementation for: https://github.com/dlang/phobos/pull/6757

std/traits.d(2537:113)[warn]: Line is longer than 120 characters
posix.mak:554: recipe for target 'dscanner' failed

I'll do an actual __trait tomorrow

@TurkeyMan please see the comments on the previous PR.
I can close the other one, and you can get this though, but could you please add the unittest I was talking about in the comment?
Thanks,
Edi

I don't understand how I could have affected that test fail?

Its green now.

It is. so...?

Just out of interest: how is this a simplification? It's more code now...

Nar, it's hundreds of lines less code, and a whole lot less imports.

Nar, it's hundreds of lines less code,

+13/-4 (!)

You've ignored the import stack.

std.meta is already imported at the top of std.traits

Instantiations are expensive, not imports. In particular, linear recursive instantiations.

isInnerClass
- staticIndexOf
  - genericIndexOf (***linear recursive expansion***)
    - OldAlias
    - isSame
      - expectType
      - expectBool

Sure, it's not max, but it's still a lot, and I don't wanna mirror all that in druntime.

For reference, this is used from emplace, and I think it's terrible that emplace (whose job is to call a constructor), should cause a linear recursive expansion for every member of every object, recursively(!), that you ever allocate.


opae-sdk: change version to 2.1.0

`
Signed-off-by: anandaravuri<EMAIL_ADDRESS>

Coverage decreased (-0.03%) to 65.489% when pulling 07a9c543b33ecfcefbd294ded86ca2289e035cbf on aravuri/ver_2_1_0 into 69f3d8d05d4c4b8cc1f8e641609c102cd6324df9 on master.


Fix gcd method

There is currently a method called gcd that lives in /lib/gcd.js.
It is incomplete and needs to be fixed!
Acceptance Criteria:

Running yarn test gcd results in tests passing.

Please include the skeleton of a new method + an accompanying test for someone else to work on at the time of creating a pull request!

Taking a look at this now

I get this error, when i run yarn test gcd
TypeError: gcd is not a function
at Object..test (test/gcd.test.js:4:10)
at process._tickCallback (internal/process/next_tick.js:103:7)
Only fifth test-case is passing

Add it as a require in the index file?

Made changes to index.js file. Please review my pull request.

@aimananees You are going to need to pull down the latest master, resolve the merge conflicts, and push it back up. I'm going to remove your other Pull Requests and keep this one #65  open until the conflicts are resolved. Thanks!

33a7eb8 Merged with latest master 👍

5372533 Merged with latest master

53b3545 Merged with latest master

This has been fixed.


docs: Add neavey.net to the showcase.

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.patrick seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.

Hello @patrickn,
thank you for adding your website to the showcase of Hugo. I've merged your contribution as  ec34ed0.
The website should be updated within the next minutes.
Cheers,
Digitalcraftsman


UIExplorer: Rotate transforms not working on macOS 10.14

Is this a bug report?
Yes
Have you read the Contributing Guidelines?
Yes
Environment
Environment:
OS:  macOS Sierra 10.14 Beta
Node:  8.11.1
Yarn:  1.7.0
npm:  6.1.0
Watchman:  4.90
Xcode:  Xcode 10
Android Studio:  3.1
Packages: (wanted => installed)
react-native: 0.56
react: 16.4
Target Platform: macOS (10.4)
Steps to Reproduce

Open UIExplorer
Open Transforms tab

Can't get this to work on 10.13.6 either.
Also the anchor points for libart are being reset to 0.0, so it's not possible to animate from the center point.
These two issues are related to High Sierra's stricter view layer policy.

Added a workaround for 0.18.0-alpha.7

in alpha.6 there are still a problems with scaleY: -1. It seems it uses zero anchor points instead of a center.

Could you combine that with translate? Anyway I think it could be fixed in the core, if it's default RN iOS behavior


DevHints-Engine vs Devhints.io

Haven't seen recent activity on this, so was just wondering if you were still working on migrating from jekyll to gatsby or sticking with jekyll? Love the project and wondering what was the best time investment in setting up/waiting on.

Found this issue recently posted that describes the migration. Thanks for this.
Closing as resolved:
https://github.com/rstacruz/cheatsheets/issues/996


Do a final release which turns this into a wrapper for chef_nginx?

This cookbook is being replaced by chef_nginx.
Would it be possible to get a final release, with a new major version number, which simply converts all or many of the 2.7.x recipes into wrappers for their chef_nginx equivalents?
This would simplify the transition from nginx to chef_nginx, and potentially resolve several outstanding issues.
I'm happy to do the PR if it makes it happen, but want confirmation that this is of interest.

We're actually going to be going to opposite direction now that the community cookbook engineering team is managing this cookbook. I'll be merging the changes from chef_nginx back into this cookbook and then we'll eventually deprecate the chef_nginx cookbook.

@tas50, since chef_nginx is supposedly a delta on top of this cookbook, do we have a guess as to how hard/easy that's going to be? I'm trying to decide whether to migrate existing stuff depending on this (old, I know!) cookbook to depend on chef_nginx, or just wait for the changes to come back here. (Happy to discuss helping out in #sous-chefs too, if you want more hands.)


Fix healtcheck fail when TELEGRAM_STAT is not set

This should close #30
plus this removes curl from the dependencies

I tested the necat command with that, and it works.
Tested on a Mac, but is linux-y enough, most of the time.
LGTM

I tested the necat command with that, and it works.
Tested on a Mac, but is linux-y enough, most of the time.
LGTM


Add JRE 15 alpine tag

There are alpine JRE tags for 8/11, but not for 15.
Can a 15 JRE image be added?
https://hub.docker.com/r/amazoncorretto/amazoncorretto/tags?page=1&name=jre

@mattnelson I hadn't come across this other set of docker images under /amazoncorretto/amazoncorretto:
https://hub.docker.com/r/amazoncorretto/amazoncorretto/tags?page=1&name=15
I guess these are community published images not official AWS ones?

The official images are under /amazoncorretto right?:
https://hub.docker.com/_/amazoncorretto
I raised another issue (#33) indicating that the documentation on the repository states that the official images support the 15 tags, but they are not actually published to DockerHub.
Let me know if I'm missing something and this new /amazoncorretto/amazoncorretto DockerHub will be where the official images are published for 15+.

I went off this comment for the new registry location.
https://github.com/corretto/corretto-docker/issues/15#issuecomment-672372087

@mattnelson Our apology for the confusion. We had used the amazoncorretto/amazoncorretto repository for temporarily housing docker images that are not merged into official repository (amazoncorretto). However, in reality, there're a number of images co-exist in both repositories. We are planning to clean up amazoncorretto/amazoncorretto after the image are merged into the official repository by 11/20/2020. Please consider migrating to amazoncorretto repo if you can.
Regarding JRE images, we recommend building your own JRE images from the Dockerfile 11/alpine/Dockerfile using jlink. Rather than providing a prebuild JRE image with fixed number of modules, we think it's more flexible for such you can choose only the modules you need.

Regarding JRE images, we recommend building your own JRE images from the Dockerfile 11/alpine/Dockerfile using jlink. Rather than providing a prebuild JRE image with fixed number of modules, we think it's more flexible for such you can choose only the modules you need.

The benefit of the existing JREs images is that they are already over half the size of the JDK images. I imagine for some consumers the size tradeoff is acceptable to get an Amazon Corretto image off the shelf and avoid having to roll their own base layer. I do agree that the jlink guidance is sound for those consumers who desire a different set of linked modules.

@jguo11 I agree with @mattnelson about existing Alpine JRE images. They are much lighter than their Alpine JDK counterpart (44MB vs 186 MB for corretto 11) and in most cases, it is more than enough to be used as base image. Using custom Dockerfile using jlink can reduce a bit more the final size but it's not always worth it.
The initial issue is about JRE 15 but are you planning to update Alpine JRE 11 images with the latest Corretto 11.0.9 release? They are really useful and JRE 15 alpine will be also useful for us when we will be able to migrate from JDK/JRE 11.
Many thanks.

@jguo11 @mattnelson quick question: JRE was discontinued in Java 11:
"In this release, the JRE or Server JRE is no longer offered. Only the JDK is offered. Users can use jlink to create smaller custom runtimes."
https://www.oracle.com/java/technologies/javase/jdk-11-relnote.html#Important_Changes
What did you have in mind for the JRE 15 build? A specific set of modules in a paired-down JDK using jlink and or / some scripts to remove files which are rarely useful?
It's a genuine question because when I look at the modules in the JDK 15 I'm not sure what would be the minimal base set that would supply most applications with their requirements.
➜  ~ docker run -it --entrypoint "/bin/sh" amazoncorretto:15-al2-jdk
sh-4.2# java --list-modules
java.base@15
java.compiler@15
java.datatransfer@15
java.desktop@15
java.instrument@15
java.logging@15
java.management@15
java.management.rmi@15
java.naming@15
java.net.http@15
java.prefs@15
java.rmi@15
java.scripting@15
java.se@15
java.security.jgss@15
java.security.sasl@15
java.smartcardio@15
java.sql@15
java.sql.rowset@15
java.transaction.xa@15
java.xml@15
java.xml.crypto@15
jdk.accessibility@15
jdk.aot@15
jdk.attach@15
jdk.charsets@15
jdk.compiler@15
jdk.crypto.cryptoki@15
jdk.crypto.ec@15
jdk.dynalink@15
jdk.editpad@15
jdk.hotspot.agent@15
jdk.httpserver@15
jdk.incubator.foreign@15
jdk.incubator.jpackage@15
jdk.internal.ed@15
jdk.internal.jvmstat@15
jdk.internal.le@15
jdk.internal.opt@15
jdk.internal.vm.ci@15
jdk.internal.vm.compiler@15
jdk.internal.vm.compiler.management@15
jdk.jartool@15
jdk.javadoc@15
jdk.jcmd@15
jdk.jconsole@15
jdk.jdeps@15
jdk.jdi@15
jdk.jdwp.agent@15
jdk.jfr@15
jdk.jlink@15
jdk.jshell@15
jdk.jsobject@15
jdk.jstatd@15
jdk.localedata@15
jdk.management@15
jdk.management.agent@15
jdk.management.jfr@15
jdk.naming.dns@15
jdk.naming.rmi@15
jdk.net@15
jdk.nio.mapmode@15
jdk.sctp@15
jdk.security.auth@15
jdk.security.jgss@15
jdk.unsupported@15
jdk.unsupported.desktop@15
jdk.xml.dom@15
jdk.zipfs@15

The compressed size of the AL2 15 docker image is 207.25 MB.
The actual JDK folder in the AL2 image is 279M.
sh-4.2# du -sh /usr/lib/jvm/java-15-amazon-corretto/
279M	/usr/lib/jvm/java-15-amazon-corretto/

When I look in the DockerHub repo I don't see any Corretto JRE 11 images:
https://hub.docker.com/_/amazoncorretto?tab=tags&page=1&name=11
Although in the GitHub repo there is a JRE build there which does a jlink to build a slimmer JDK:
jlink --endian little --release-info $JAVA_HOME/release \
        --add-modules "java.base,java.datatransfer,java.desktop,java.instrument,java.logging,java.management,java.management.rmi,java.naming,java.prefs,java.rmi,java.security.sasl,java.xml,jdk.internal.vm.ci,jdk.jfr,jdk.management,jdk.management.jfr,jdk.management.agent,jdk.net,jdk.sctp,jdk.unsupported,jdk.naming.rmi,java.compiler,jdk.aot,jdk.internal.vm.compiler,jdk.internal.vm.compiler.management,java.se,java.net.http,java.scripting,java.security.jgss,java.smartcardio,java.sql,java.sql.rowset,java.transaction.xa,java.xml.crypto,jdk.accessibility,jdk.charsets,jdk.crypto.cryptoki,jdk.crypto.ec,jdk.dynalink,jdk.httpserver,jdk.jsobject,jdk.localedata,jdk.naming.dns,jdk.scripting.nashorn,jdk.security.auth,jdk.security.jgss,jdk.xml.dom,jdk.zipfs,jdk.jdwp.agent,jdk.pack,jdk.scripting.nashorn.shell,jdk.jcmd,jdk.jfr" \
        --no-man-pages --no-header-files --strip-debug --output /temp/java-11-amazon-corretto

If you remove the modules which are no longer with us in 15 (jdk.scripting.nashorn, jdk.jdwp.agent, jdk.pack, jdk.scripting.nashorn.shell):
jlink --verbose \
      --add-modules "java.base,java.datatransfer,java.desktop,java.instrument,java.logging,java.management,java.management.rmi,java.naming,java.prefs,java.rmi,java.security.sasl,java.xml,jdk.internal.vm.ci,jdk.jfr,jdk.management,jdk.management.jfr,jdk.management.agent,jdk.net,jdk.sctp,jdk.unsupported,jdk.naming.rmi,java.compiler,jdk.aot,jdk.internal.vm.compiler,jdk.internal.vm.compiler.management,java.se,java.net.http,java.scripting,java.security.jgss,java.smartcardio,java.sql,java.sql.rowset,java.transaction.xa,java.xml.crypto,jdk.accessibility,jdk.charsets,jdk.crypto.cryptoki,jdk.crypto.ec,jdk.dynalink,jdk.httpserver,jdk.jsobject,jdk.localedata,jdk.naming.dns,jdk.security.auth,jdk.security.jgss,jdk.xml.dom,jdk.zipfs,jdk.jcmd,jdk.jfr" \
      --no-man-pages \
      --no-header-files \
      --strip-debug \
      --output ./java-minimal

The JDK comes down from 279MB to ~113MB.
I guess it might be difficult for AWS to manage the support burden of defining the 'JRE' as a specific subset of modules, or picking which modules to include?

Just linked a PR which could potentially address this issue?

This PR adds a 'slim' version of the JDK 15 docker files, which runs jlink to remove man-pages, header files and debug symbols whilst retaining all modules.
The alpine image was 183MB smaller.
The Amazon Linux 2 image was 113MB smaller.

I believe this can be closed based on #38 and #50

I believe this can be closed based on #38 and #50

I believe you're right

I believe you're right


add interceptor to gzip sync requests

Task/Issue URL: https://app.asana.com/0/488551667048375/1206919211758353/f
Description
Compress PATCH sync request and use conten-encoding: gzip
Steps to test this PR
Feature 1

[ ] fresh install
[ ] add some bookmarks
[ ] create a sync account
[ ] copy your recovery code
[ ] fresh install
[ ] recover your account
[ ] ensure bookmarks are present

UI changes

Before
After

!(Upload before screenshot)
(Upload after screenshot)

#4500  👈
develop

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

Join @cmonfortep and the rest of your teammates on  Graphite


Alberto rodriguez

WPT5 sprint challange

Nice work on passing the MVP. I think it was neat to select all of the boxes by ID.
The code looks good as well. Nothing much to add other than tidying up all of the other attributes on the .box1.. etc classes.
One thing to note, don't be afraid to use a little more margin/padding.


Allow custom config file

This PR adds the --config-file option to every command. It allows to store the deploy config in another location than deploy.json. Moreover, it allows to read the config from a .js file and, by extension, to take advantage of environment variables.

Nice! Thank you very much! Can you please also update the README to introduce users to this change? Especially an example of the improvement that shows how one would use a js file would be great.

merged in a separate pull request. thanks for your contribution :+1:


Support AdaScale for Adam-type optimizers

The current adaptive learning rate scheduler (AdaScale) only supports the SGD optimizer. Since Adam(W) is widely used in various deep learning tasks, including NLP, GANs, and RL, having the adaptive learning rate scheduler for Adam would be useful.

Resolved by https://github.com/petuum/adaptdl/pull/95


Word "do" is parsed as "tomorrow"

Command
from dateparser import search as se
print(dateparser.parse("today"))
print(se.search_dates("Do I have anything on the next month?", settings={"PREFER_DATES_FROM" : "future"}))

Current result
2019-09-14 20:09:17.088302
[('Do', datetime.datetime(2019, 9, 15, 0, 0))]

Expected result
2019-09-14 20:09:17.088302
None

To be honest, it would be nice if next month could be parsed by getting the current month and adding 1...buuuuut the main reason of the issue is that the word "Do" is being interpreted for some reason

"Do" is short for "Domingo" - Spanish for Sunday. Include argument add_detected_language to understand why it happens:
>>> search_dates('Do I have', settings={"PREFER_DATES_FROM" : "future"}, add_detected_language=True)
[('Do', datetime.datetime(2019, 10, 6, 0, 0), 'es')]

Restrict languages to remove these noises. Unfortunately, "next month" is not detected:
>>> search_dates('Do I have anything on the next month?', languages=['en'], settings={"PREFER_DATES_FROM" : "future"}, add_detected_language=True)
None

Oh that's good to know! I didn't know about the add_detected_language
But is that the intended behavior?
I mean... I get that it detected a word that might mean a date in spanish, but the sentence is not written in spanish at all and clearly the word "Do" does not mean "Sunday" at this sentence in particular

dateparser cannot detect the language of the whole text and act accordingly.
@ArthurSens  Do you want this ticket to remain open as a request to add language detection to dateparser?
Otherwise, since you can use languages as @augustomen suggested, I think we should close this.

Hmm… dateparser does have some kind of language detection functionality, so maybe this is not too far-fetched.

I don't have any needs, since I use this module only with some things that I do as a hobby and I don't have the necessary knowledge to help you guys with a PR
But if you think it's not troublesome, I guess it would be appreciated by the community (I'd be happy for sure :smile: )
(it's your call to close this or not)


Duplicate Features - Features arent being detected as duplicate

-Webmap

Widget Config:

Data:

MarylandHospitals.zip

Repro Steps:

Drag hospitals spreadsheet onto the widget

Location Settings -  Locate using an address

Select Multiple Fields use the settings reflected below

Note  All Seven Records are matched

Repeat the exact same workflow above

Note only 1 duplicate feature is detected

@NikkiGolding ready to be verified

verified.


Show DataEditor on single-click or onSelect

On each cell I am setting a custom valueViewer and dataEditor.  Is there a way to display the dataEditor with a single click, instead of having to double click. Maybe another way of saying it is to display the dataEditor when the cell is selected.

😢

Hi @gnudle,
You can have a button in your valueViewer to dispatch double click event on it self.
here I've had a valueViewer component and inside of that i've created a dropdown icon with css
on dropdown button click, you can dispatch the double click event with bubbles: true on the dropdown element itself.

function ValueViewer({ value }) {

  function onDropdownButtonClick(e) {
    e.target.dispatchEvent(new Event("dblclick", { bubbles: true }));
  }

  return (

      {value}

  );
}

.dropdown-element {
  position: relative;

  .value-viewer .dropdown-icon::after {
    content: "\f0d7";
    font-family: Dropdown;
    font-size: .75em;
    position: absolute;
    top: .7em;
    right: .6em;
    padding: 0 .5rem;
    color: #202833;
  }
}

Hi @gnudle, You can have a button in your valueViewer to dispatch double click event on it self. here I've had a valueViewer component and inside of that i've created a dropdown icon with css on dropdown button click, you can dispatch the double click event with bubbles: true on the dropdown element itself.

function ValueViewer({ value }) {

  function onDropdownButtonClick(e) {
    e.target.dispatchEvent(new Event("dblclick", { bubbles: true }));
  }

  return (

      {value}

  );
}

.dropdown-element {
  position: relative;

  .value-viewer .dropdown-icon::after {
    content: "\f0d7";
    font-family: Dropdown;
    font-size: .75rem;
    position: absolute;
    top: .7rem;
    right: .6rem;
    padding: 0 .5rem;
    color: #202833;
  }
}

Nice this worked perfectly!


runtime: TestTracebackArgs failure for testTracebackArgs9

greplogs --dashboard -md -l -e 'FAIL: TestTracebackArgs' --since=2021-10-28T15:08:00
2021-11-04T00:15:11-6049630/darwin-amd64-10_15
testTracebackArgs9 is one of the cases added for #45728 in Go 1.18 (CC @cherrymui @mknyszek).

Thanks. I have a guess. Will send a CL.


objfile not output in current directory

The command sdc ../test.d outputs files a.out and ../test.o.
I would have expected that test.o would be created in the current directory, instead of in the same path as the input D file. This is what dmd does.
The fix for this is easy, let me know if desired.
(also, looking at the code in main.d, I think the extension should be fully stripped from the input file before generating the objfilename, instead of just removing the last 2 characters, in case someone has files named test.dlang or whathaveyou)

It is not obvious as you can have several modules that share the same filename. What makes the most sense is to keep the folder that are packages, and drop the ones above this.

I think I do not agree... This is about the default place to put build artifacts, which for the compilers that I know is in the current folder. It'd be very strange to strip only part of the path, no?
Where should this command put the output?
sdc ../../phobos/std/array.d
(it's really just the default that is strange, I find. I think in practice one would specify the output location, which unfortunately cannot be done just yet with SDC (more PRs incoming))

Going back over the whole list of things, this one is interesting. I get where you are coming from and I think there is a legitimate point to it, but the solution didn't quite work. Should we rebase the path on top of the current directory? Mange the fully qualified module name in the filename?

I think #271 would be the right solution here. I tied not in my brain for no reason: . is not valid as a module name, so it can naturally be used as a separator and we can emit all the object files we want.
GCC, clang &al will chose a name by default if none is specified, however, we do have packages/module, so we shoudl take advantage of this.


Add ArrayDequeue

I picked the content of #49, fixed the remaining compilation errors, and rebased on master.

@pathikrit I’d be happy to get your feedback on my changes.

I’ve tried running the benchmarks but for some reason that I ignore appending and prepending elements ot an ArrayBuffer or an ArrayDeque raise a heap memory error (even for small number of elements). Does that sound familiar to someone? I guess the garbage collector is too under pressure?


Add no authentication options to access cinder without authentication.

Coverage increased (+0.06%) to 60.259% when pulling c797c063a10ec976d22830171789b2024e7c919f on wisererik:development into 2d1cc5041f5c9cc1158152f398e362722def9104 on opensds:development.

@wisererik  Hi, can you give a simple description about your patch? Thx!


Fuzzy search

Hi,
great package! I will for sure be using it in the future. I did a quick test and thought that I could share my feedback.
It will be nice to have a fuzzy search so the command palette behaves like one in the vscode / sublime / chrome dev tools and others.
Example:

I am willing to help. Thanks

I've just realized that there is an option to use a custom filter

However, JS package like: https://github.com/timc1/kbar has fuzzy search as a default way of filtering, which for me personally makes more sense. What do you think?

I think this is a good call, I had initially chosen a basic reg-ex search with an option to customize to give people more control, but after thinking about it over the weekend I think most people want a search/filter that'll work well right out of the box.
I'll take a look at some of the packages available on pub and see if any will get the job done.
Thanks for the issue!

Hey @karniv00l, I have a branch fuzzy_search that has a basic implementation working. Gonna work on it some more this week to find a score threshold that feels right, as well as get the sub-string highlighting all figured out.
Feel free to check it out!

That's awesome, thanks!

@karniv00l Thanks again for the suggestion, I'll have this released later today


backoffice: Add alternative titles to details page

Did you verify where the alternative titles were before the latest changes erased them? In the backoffice the type of the subtitle should be also displayed

Did you verify where the alternative titles were before the latest changes erased them? In the backoffice the type of the subtitle should be also displayed

Yes they were removed in this PR apparently there was an "others" tab. I displayed the information as it is done in the frontsite. Note that the alternative_abstract is also not displayed in the backoffice, should we also add it in the content tab?
In order to display the type of the alternative title I would propose to move it down, as it is done for the identifiers (see image below), WDYT?

in general I think we should think here what is the best for the librarians UX. We have the choice between having alternative titles next to the title (convenience) and not giving the secondary information (i.e alternative titles) so much meaning to move it up into the prominent place in the metadata display, additionally, the information takes space in the UI.
Personally I wouldn't give them a separate section as the identifiers have, for the simple reason that they are not as important. It it not as common to have this information either, so I would leave it next to the title as you did, but displayed as follows:
- alter title (ALTERNATIVE TITLE TYPE)
- ...


Colorise the inspector output based on S2C or C2S

Description

I've used the popular owo-colors library to colourise the output of the packet_inspector.
This makes it a lot easier to see who's sending what for debugging purposes.
In future, I'd like to be able to filter out common, low-information packets like SetPlayerPosition and KeepAlive as well, but that's not in this PR.

Test Plan
No tests - just eyeball :smile:.

Check out the packet inspector GUI if you haven't seen it (#238)

I saw that just as I was making the PR for this! 😆
I'll check it out tomorrow, thanks! 👍


Publish binaries

What
Publish binaries.
Why
For installs without building from source.
This doesn't have a huge use, given that most people can install soroban-cli using cargo, and most people who need to install it will probably already have cargo installed because it's required for developing contracts.
But this has use in some places where it is difficult to install from source. For example, when installing soroban-cli into a repl.it, the build consumes so much disk space that it often fails to install.
Known limitations
There's plenty of things we can improve about this. For example, we should publish binaries for Windows and Linux-aarch64. Also, we will probably subsume this into the shared publish.yml workflow that lives in the stellar/actions repo, but for now this will do.

Note that this was already used to retroactively publish binaries for v0.1.2 in https://github.com/stellar/soroban-cli/pull/227.

why tar if it's just a single file?

I thought we might want to add a CHANGELOG and a LICENSE file. I didn't want to have to change expectations around what was in the file in the future.
I also wasn't sure if we need to include all the license files for dependencies?
I don't feel strongly though. If we don't want to include sidecar files, a raw binary would be perfectly fine.

what's wrong with the aarch64 build?

ring is a dependency that gets pulled in because the platform team used rusttls. It seems that ring can't build on Linux aarch64.
I think we should probably revisit some of the dependencies that are being pulled in for http stuff in soroban-cli.

Removed the taring in 74dcf9b.


How do I close/disable the remove node event using the delete button?

i want to create confirmation popup before delete node (using delete button).
Just in case I use the delete button and use the onkeydown event but the node delete event first and confirmation popup follows after.

@BankkokBank you can simply hide the default delete button and implement your own in node html...

Hello @BankkokBank
The option that comments @MehbubRashid  is correct.
Another option is to overwrite the function:
editor.removeNodeId = function(id) {
      var r = confirm("Are you sure to delete?");
      if (r == true) {
        this.removeConnectionNodeId(id);
        var moduleName = this.getModuleFromNodeId(id.slice(5))
        if(this.module === moduleName) {
          document.getElementById(id).remove();
        }
        delete this.drawflow.drawflow[moduleName].data[id.slice(5)];
        this.dispatch('nodeRemoved', id.slice(5));
      }
    }

Thank you for suggest, It work for me


Updated grammar

Category

[x] Content fix

What's in this Pull Request?

Updating word "you" to "your".

Conflicting since long time.


Change /api/v1/items/aggregations filtering logic

added tests
facet now does not affect itself (but just other facets)
filtered (i.e. selected) value are always included in the aggregation results, so that they don't disappear

Type of change

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[x] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

[x] I have updated the CHANGELOG
[x] I have requested at least 1 reviewer for this PR
[ ] I have made corresponding changes to the documentation

@FrantisekMichalSebestyen I've added the exception for date_earliest/date_latest


Downloads hang

Sometimes the download will just get stuck at some point. I can leave it for hours and it hasn't moved on. It most often happens at the beginning, after 3-5 books. It especially happens if I try to do multiple downloads at the same time. It would be nice with some progress bar (can be a %) or a "verbose mode" where it outputs what's going on so I can see why it suddenly stops.
I usually run with the -d path and -f all, downloading all formats of books I buy and putting them in Dropbox. Doing a ctrl+c in the terminal and starting again usually helps.

I also get this bug but usually farther into the process. I have about 1000 books in my humble library and it hangs around 100 or so.  But it happens every time.


Test

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

/lgtm

/approve

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: suppathak
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

/approve

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: harshad16, suppathak
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: harshad16, suppathak
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [suppathak]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

/hold


performance question with numpy array

I'm training a convolutional network with data loaded into numpy array and NDArrayIter. When I tried to profile the script, I found that over 90% time is spent calling asnumpy() in metric.update function. Is this normal or am I am doing something wrong? Accuracy is the only metric I pass in as eval_metrics.
I compared this with same network implemented with Theano, but the other one is about twice as fast.
Thanks,

It is normal, because most mxnet operator are asynchronous, which means they do not block until the operation finishes. Instead, there dependency is tracked.
asnumpy introduce a synchronization, which need to wait all previous operations to finish

Thanks. So if I still want to report training accuracy without significant performance hit, like only report every x batches, is there an easy way to do that?

usually the speedup you observe was not really speedup, but the asynchronous executions that are pushed but not finished get counted as finished. It is usually fine to use the default evaluation metric provided.


[w6.2][F11-B2]An Jiasheng

Added menu bar and label to GUI.

Accepting this PR after minimal review because another of your PRs for this tutorial was reviewed in detail.


Fill

I need to be able to draw some complex figures with gofpdf. To enable to draw 'holes' in filled shapes, the current fillDrawOp is too limited. I wanted to support the full PDF specification on fill styles (both non zero winding and even odd rule). I took great care for backwards compatiblity, as "", "F", "D", "DF" and "FD" continue to work as before. Please look at tutorial 32 and its resulting pdf, as helps clarifying the concept.

Nice work, and awesome tutorial!
One quick question before I merge: if the enhanced fill style requires a reader of version greater than 1.3 (the default), there should be a version adjustment something like this:
if f.pdfVersion < "1.4" {
    f.pdfVersion = "1.4"
}

This would be done for a feature that requires a reader of version 1.4 or later. Adjust the version number accordingly, or skip the step if version 1.3 suffices.

Good question. All path painting operators (see DrawPath docstring) are already supported by pdf version 1.3. You can check it on page 152 of https://wwwimages2.adobe.com/content/dam/Adobe/en/devnet/pdf/pdfs/pdf_reference_archives/PDFReference13.pdf
So I suppose there is no reason to bump the pdf version.

Thanks for looking into that -- I'll proceed with merge.

Thanks!
On Mon, Jul 6, 2015 at 11:25 PM, Kurt Jung<EMAIL_ADDRESS>wrote:

Merged #14 https://github.com/jung-kurt/gofpdf/pull/14.
—
Reply to this email directly or view it on GitHub
https://github.com/jung-kurt/gofpdf/pull/14#event-349093628.


Embeded link to docs in readme is broken.

⚠ Please verify that this bug has NOT been reported before.

[X] I checked all existing issues and didn't find a similar issue

Description
The embed in documentation for the nvf manual is broken and doesn't link anywhere.
👟 Reproduction steps
Scroll down in readme
👀 Expected behavior
A link to the nvf manual to be present
😓 Actual Behavior
There's no link.
💻 Metadata
No.
📝 Relevant log output
https://www.youtube.com/watch?v=dQw4w9WgXcQ

https://github.com/NotAShelf/nvf/commit/7417c6e4f382f847f841db84c6cb26bcb82716de
Thanks for the report.


Allow enabling legacy ingress provider, but not by default

Signed-off-by: dduportal<EMAIL_ADDRESS>Fixes #7 .
WDYT?

I have tried you branch and enabling the ingress controller (which by the way should be enabled by default as looking and the root readme).
but none of my usual ingress are working.

Hi @sgandon , could you provide here:

the result of kubectl get pod --namespace=<namespace> <traefik-pod-name> -o yaml
The Helm command you used for the installation (with the values.yaml)

please?

Hi @dduportal
Thanks for looking into it.
In fact some things are working, the service that I used to deploy was expecting https call but it seems that by default traefik is not configured with ssl enabled.
I used to launch the traefik V1 chart with --set ssl.enabled=true to have the chart generate a certificate automatically.
When I adapted my service to no use ssl, this traefik V2 chart works fine.
So thank for taking the time to help me.
I have launched the chart using this command
helm install . -n traefik --set logs.loglevel=DEBUG --set providers.kubernetesingress=true --debug

I have looked at the dashboard and my ingress seems to have created the right routers

rule
entrypoint
name
service
provider

PathPrefix(/dashboard) || PathPrefix(/api)
web
default-traefik-dashboard-d012b7f875133eeab4e5@kubernetescrd
default-traefik-dashboard-d012b7f875133eeab4e5
k8s

Host(iam.k8s) && PathPrefix(/)
traefik                            web                            websecure
iam-k8s-@kubernetes
default-tpsvc-iam-idp-80
k8s

Host(portal.k8s) && PathPrefix(/)
traefik                            web                            websecure
portal-k8s-@kubernetes
default-tpsvc-portal-80
k8s

I used to launch the traefik V1 chart with --set ssl.enabled=true to have the chart generate a > certificate automatically.

It might be related to the fact that we dropped the support of annotations in Ingresses: we expect people to migrate to the new "CRD" IngressRoute instead, as explained in the intro of the page https://docs.traefik.io/v2.0/providers/kubernetes-crd/.
So any annotations of your previous ingresses cannot work: you have to migrate to IngressRoute. We provide a migration page in the documentation (https://docs.traefik.io/v2.0/migration/v1-to-v2/) and a migration tool: https://github.com/containous/traefik-migration-tool

not this is not related to that at all, we don't use any traefik specific annotation cause we want to be as agnostic as possible of the IngressControler.
side not : Using specific CRDs is a lock on Traefik that we try to avoid.
Here my issue was on the fact that ssl was not anabled and that there is not way yet to enable it with automatic certificates creation as it is done on the traefik V1 chart.

Cert-manager uses Ingress resource, so it's not possible to get it working with traefik 2.0
One more reason to have this option

Closed in favor of #34


Timex.parse returns badarg from ETS when tzdata application is not running.

I think this is more of a developer experience issue than a bug.
Elixir: 1.6.5
Erlang/OTP: 20.3
Timex: 3.3.0
Steps to reproduce

Run iex with iex -S mix run --no-start
Execute: Timex.parse("Mon, 28 May 2018 13:00:02 EDT", "{WDshort}, {D} {Mfull} {YYYY} {h24}:{m}:{s} {Zabbr}")

Description of issue
It might not even be worth looking at, but I felt like I should report it since the developer is probably not expected to be aware of how tzdata is used under the hood.
If you fire up iex with iex -S mix run --no-start and then attempt to parse a date with directives using Timex.parse, it returns {:error, :badarg} from an ETS lookup that fails since tzdata isn't running.
Expected result
Return an error tuple that is more revealing of the problem instead of returning the ETS lookup error tuple.
More context from iex
iex(19)> Timex.parse("Mon, 28 May 2018 13:00:02 EDT", "{WDshort}, {D} {Mfull} {YYYY} {h24}:{m}:{s} {Zabbr}")
{:error, :badarg}
iex(20)> Timex.parse!("Mon, 28 May 2018 13:00:02 EDT", "{WDshort}, {D} {Mfull} {YYYY} {h24}:{m}:{s} {Zabbr}")
** (ArgumentError) argument error
    (stdlib) :ets.lookup(:tzdata_current_release, :release_version)
    lib/tzdata/release_reader.ex:47: Tzdata.ReleaseReader.current_release_from_table/0
    lib/tzdata/release_reader.ex:14: Tzdata.ReleaseReader.simple_lookup/1
    lib/tzdata/release_reader.ex:7: Tzdata.ReleaseReader.zone_and_link_list/0
    lib/tzdata.ex:40: Tzdata.zone_exists?/1
    lib/timezone/timezone.ex:152: Timex.Timezone.name_of/1
    lib/parse/datetime/parser.ex:408: Timex.Parse.DateTime.Parser.update_date/4
    lib/parse/datetime/parser.ex:208: Timex.Parse.DateTime.Parser.apply_directives/3
iex(20)> Application.ensure_all_started(:timex)
{:ok,
 [:idna, :mimerl, :certifi, :ssl_verify_fun, :metrics, :hackney, :tzdata,
  :gettext, :combine, :timex]}
iex(21)> Timex.parse!("Mon, 28 May 2018 13:00:02 EDT", "{WDshort}, {D} {Mfull} {YYYY} {h24}:{m}:{s} {Zabbr}")
#DateTime<2018-05-28 13:00:02-04:00 EDT EST5EDT>

This is expected behaviour if you run with --no-start, as no applications are started, so you can't expect them to work (they may, but that is incidental). You need to ensure you have started :timex or :tzdata (preferably the former, as it allows me to change deps and application requirements without you having to change your code). Timex won't make any attempt to verify this, as the tzdata requirement on an ETS table could change at some point (say if tzdata is compiled in rather than stored in ETS), that's why Timex declares :tzdata in it's dependencies and application list - it relies on being started like any other OTP application.


[Errno 2] No such file or directory when running distributed Hadoop on YARN

Hi everybody,
I am esperiencing some problem with the tutorial about xgboost distributed mode on YARN.
I followed the instructions but there is some problem that I was not able to solve.
I am running 2 EC2 instances with Hadoop 2.6.0 (which seems properly configured).
When I run the demo with the following command:
cd xgboost/demo/distributed-training
# Use dmlc-submit to submit the job.
../../dmlc-core/tracker/dmlc-submit --cluster=yarn --num-workers=2 --worker-cores=2\
../../xgboost mushroom.aws.conf nthread=2\
data=s3://${BUCKET}/xgb-demo/train\
eval[test]=s3://${BUCKET}/xgb-demo/test\
model_dir=s3://${BUCKET}/xgb-demo/model

I get the following error from the Hadoop container:
Traceback (most recent call last):
 File "./launcher.py", line 82, in <module>
 main()
 File "./launcher.py", line 77, in main
 ret = subprocess.call(args=sys.argv[1:], env=env)
 File "/usr/lib/python2.7/subprocess.py", line 523, in call
 return Popen(*popenargs, **kwargs).wait()
 File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
  errread, errwrite)
 File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

Clearly it seems that the subprocess function is not able to find some of the files. So I tried to see what python is trying to call. The two parameters of subrpocess are:
['../../xgboost', './mushroom.aws.conf', 'nthread=1', 'data=s3://awstest.xgboost/xgb-demo/train', 'eval[test]=s3://awstest.xgboost/xgb-demo/test', 'model_dir=s3://awstest.xgboost/xgb-demo/model']

and the environment dictionary that should be correctly set.
Do you have any clue of what is going wrong?
Thank you.

Same question as http://stackoverflow.com/questions/40684808/problems-running-distributed-xgboost-with-yarn ?
I replied there, and it's probably a more suitable question for Stack Overflow. So, let's continue discussion there.


Prefer itertools.pairwise() over zip() for successive pairs (RUF007)

Fixes #3297.
We ensure that the two arguments to zip() match and that the lower bound of the slice is 1, if the second argument is a slice. Otherwise, we wouldn't be able to guarantee that the request being made is for successive pairs.

Should have time to merge this tonight if it's in good shape!

@charliermarsh just have to get the new changes re-reviewed - I changed the logic for determining successive pairs to simply be a difference of 1 between start of first/second slices. That'll allow us to pick up cases like zip(x[2:], x[3:]) which should still trigger the violation, e.g. pairwise(x[2:]).

Thanks @evanrittenhouse!


Some files are not uploading

Getting the following error:
CreateFile: \Howard Stern Radio Shows\2015\2015-04 April 24Ks final\2015-04-03 Scott Weiland & The Wildabouts.mp3
  Access:[ReadAttributes]
  Share:[ReadWrite, Delete]
  Mode:[Open]
  Options:[35651584]
  Attr:[0]

System.AggregateException: One or more errors occurred. ---> Azi.Tools.HttpWebException: The remote server returned an error: (400) Bad Request.
   at Azi.Tools.HttpClient.GeneralExceptionProcessor(Exception ex)
   at Azi.Tools.Retry.<Do>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Azi.Tools.HttpClient.<Send>d__19`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Azi.Tools.HttpClient.<Send>d__17`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Azi.Tools.HttpClient.<GetJsonAsync>d__8`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Azi.Amazon.CloudDrive.AmazonNodes.<GetChild>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Azi.ACDDokanNet.FSProvider.<FetchNode>d__53.MoveNext()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at System.Threading.Tasks.Task`1.get_Result()
   at Azi.ACDDokanNet.VirtualDrive._CreateFile(String fileName, FileAccess access, FileShare share, FileMode mode, FileOptions options, FileAttributes attributes, DokanFileInfo info)
   at Azi.ACDDokanNet.VirtualDrive.CreateFile(String fileName, FileAccess access, FileShare share, FileMode mode, FileOptions options, FileAttributes attributes, DokanFileInfo info)
---> (Inner Exception #0) Azi.Tools.HttpWebException: The remote server returned an error: (400) Bad Request.
   at Azi.Tools.HttpClient.GeneralExceptionProcessor(Exception ex)
   at Azi.Tools.Retry.<Do>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Azi.Tools.HttpClient.<Send>d__19`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Azi.Tools.HttpClient.<Send>d__17`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Azi.Tools.HttpClient.<GetJsonAsync>d__8`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Azi.Amazon.CloudDrive.AmazonNodes.<GetChild>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Azi.ACDDokanNet.FSProvider.<FetchNode>d__53.MoveNext()<---

D:\dev2\amazon-clouddrive-dokan\amazon-clouddrive-dokan\VirtualDrive.cs: 105

Is it still an issue?


Prevent multiple simultaneously remediation of same node

With multiple NHCs, selecting the same node, but with different
remediator, multiple remediation CRs were created, because they
shared the same lease.
Adding the NHC name to the lease holder identity prevents this.
ECOPROJECT-1189

/test 4.14-openshift-e2e

/test 4.14-openshift-e2e

/lgtm
/hold
couple of nits IMO, feel free to unhold/make changes/wait additional review

/hold cancel


Great generator tool

I really don't know if it may help but in all case it's really a great favicon generator worth to look at!
http://realfavicongenerator.net/

it's still in beta but works well :+1:

I've used this and realfavicon information to build this:
http://github.com/nofxx/yamg
Thanks!

this one also, free these days
http://appshopper.com/mac/developer-tools/cook-app-icon
Cook App Icon (Developer Tools) Generate icons for iOS, WatchOS, OS X, TVOS and Android apps


Remove unnecessary methods

Removing Alias Screen and Page methods at the request of Gainsight team.

linking to INT-614.
LGTM


TypingError raised with float32 arguments to np.interp

[x] I am using the latest released version of Numba (most recent is visible in
the change log (https://github.com/numba/numba/blob/master/CHANGE_LOG).
[x] I have included below a minimal working reproducer (if you are unsure how
to write one see http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports).

When using njit-compiled np.interp with float32 arguments, a TypingError is raised unless at least one of either xp or fp are float64:
from numba import njit
import numpy as np

@njit
def interp(x, xp, fp):
   return np.interp(x, xp, fp)

xp = np.arange(10, dtype=np.float64)
fp = (xp ** 2).astype(np.float64)
x = np.linspace(2, 3, 10, dtype=np.float32)
interp(x, xp, fp)  # WORKS

xp = np.arange(10, dtype=np.float32)
fp = (xp ** 2).astype(np.float64)
x = np.linspace(2, 3, 10, dtype=np.float32)
interp(x, xp, fp)  # WORKS

xp = np.arange(10, dtype=np.float64)
fp = (xp ** 2).astype(np.float32)
x = np.linspace(2, 3, 10, dtype=np.float32)
interp(x, xp, fp)  # WORKS

xp = np.arange(10, dtype=np.float32)
fp = (xp ** 2).astype(np.float32)
x = np.linspace(2, 3, 10, dtype=np.float32)
interp(x, xp, fp)  # ERROR

Error output:
In [17]: xp = np.arange(10, dtype=np.float32)
    ...: fp = (xp ** 2).astype(np.float32)
    ...: x = np.linspace(2, 3, 10, dtype=np.float32)
    ...: interp(x, xp, fp)  # ERROR
---------------------------------------------------------------------------
TypingError                               Traceback (most recent call last)
<ipython-input-17-431cf7dde0e1> in <module>
      2 fp = (xp ** 2).astype(np.float32)
      3 x = np.linspace(2, 3, 10, dtype=np.float32)
----> 4 interp(x, xp, fp)  # ERROR

~/opt/anaconda3/envs/cta/lib/python3.7/site-packages/numba-0.46.0-py3.7-macosx-10.9-x86_64.egg/numba/dispatcher.py in _compile_for_args(self, *args, **kws)
    399                 e.patch_message(msg)
    400
--> 401             error_rewrite(e, 'typing')
    402         except errors.UnsupportedError as e:
    403             # Something unsupported is present in the user code, add help info

~/opt/anaconda3/envs/cta/lib/python3.7/site-packages/numba-0.46.0-py3.7-macosx-10.9-x86_64.egg/numba/dispatcher.py in error_rewrite(e, issue_type)
    342                 raise e
    343             else:
--> 344                 reraise(type(e), e, None)
    345
    346         argtypes = []

~/opt/anaconda3/envs/cta/lib/python3.7/site-packages/numba-0.46.0-py3.7-macosx-10.9-x86_64.egg/numba/six.py in reraise(tp, value, tb)
    666             value = tp()
    667         if value.__traceback__ is not tb:
--> 668             raise value.with_traceback(tb)
    669         raise value
    670

TypingError: Failed in nopython mode pipeline (step: nopython frontend)
Invalid use of Function(<function interp at 0x1089840e0>) with argument(s) of type(s): (array(float32, 1d, C), array(float32, 1d, C), array(float32, 1d, C))
 * parameterized
In definition 0:
    TypingError: Failed in nopython mode pipeline (step: nopython frontend)
Invalid use of Function(<function np_interp_impl_inner_factory.<locals>.impl at 0x6235bab90>) with argument(s) of type(s): (array(float32, 1d, C), array(float32, 1d, C), array(float32, 1d, C), dtype(float64))
 * parameterized
In definition 0:
    TypingError: Failed in nopython mode pipeline (step: nopython frontend)
Cannot unify array(float32, 1d, C) and array(float64, 1d, C) for 'slopes', defined at /Users/Jason/opt/anaconda3/envs/cta/lib/python3.7/site-packages/numba-0.46.0-py3.7-macosx-10.9-x86_64.egg/numba/targets/arraymath.py (2248)

File "../../../../opt/anaconda3/envs/cta/lib/python3.7/site-packages/numba-0.46.0-py3.7-macosx-10.9-x86_64.egg/numba/targets/arraymath.py", line 2248:
    def impl(x, xp, fp, dtype):
        <source elided>
            if lenxp <= lenx:
                slopes = (dy[1:] - dy[:-1]) / (dx[1:] - dx[:-1])
                ^

[1] During: typing of assignment at /Users/Jason/opt/anaconda3/envs/cta/lib/python3.7/site-packages/numba-0.46.0-py3.7-macosx-10.9-x86_64.egg/numba/targets/arraymath.py (2250)

File "../../../../opt/anaconda3/envs/cta/lib/python3.7/site-packages/numba-0.46.0-py3.7-macosx-10.9-x86_64.egg/numba/targets/arraymath.py", line 2250:
    def impl(x, xp, fp, dtype):
        <source elided>
            else:
                slopes = np.empty(0, dtype=dtype)
                ^

    raised from /Users/Jason/opt/anaconda3/envs/cta/lib/python3.7/site-packages/numba-0.46.0-py3.7-macosx-10.9-x86_64.egg/numba/typeinfer.py:951
In definition 1:
    TypingError: Failed in nopython mode pipeline (step: nopython frontend)
Cannot unify array(float32, 1d, C) and array(float64, 1d, C) for 'slopes', defined at /Users/Jason/opt/anaconda3/envs/cta/lib/python3.7/site-packages/numba-0.46.0-py3.7-macosx-10.9-x86_64.egg/numba/targets/arraymath.py (2248)

File "../../../../opt/anaconda3/envs/cta/lib/python3.7/site-packages/numba-0.46.0-py3.7-macosx-10.9-x86_64.egg/numba/targets/arraymath.py", line 2248:
    def impl(x, xp, fp, dtype):
        <source elided>
            if lenxp <= lenx:
                slopes = (dy[1:] - dy[:-1]) / (dx[1:] - dx[:-1])
                ^

[1] During: typing of assignment at /Users/Jason/opt/anaconda3/envs/cta/lib/python3.7/site-packages/numba-0.46.0-py3.7-macosx-10.9-x86_64.egg/numba/targets/arraymath.py (2250)

File "../../../../opt/anaconda3/envs/cta/lib/python3.7/site-packages/numba-0.46.0-py3.7-macosx-10.9-x86_64.egg/numba/targets/arraymath.py", line 2250:
    def impl(x, xp, fp, dtype):
        <source elided>
            else:
                slopes = np.empty(0, dtype=dtype)
                ^

    raised from /Users/Jason/opt/anaconda3/envs/cta/lib/python3.7/site-packages/numba-0.46.0-py3.7-macosx-10.9-x86_64.egg/numba/typeinfer.py:951
This error is usually caused by passing an argument of a type that is unsupported by the named function.
[1] During: resolving callee type: Function(<function np_interp_impl_inner_factory.<locals>.impl at 0x6235bab90>)
[2] During: typing of call at /Users/Jason/opt/anaconda3/envs/cta/lib/python3.7/site-packages/numba-0.46.0-py3.7-macosx-10.9-x86_64.egg/numba/targets/arraymath.py (2365)

File "../../../../opt/anaconda3/envs/cta/lib/python3.7/site-packages/numba-0.46.0-py3.7-macosx-10.9-x86_64.egg/numba/targets/arraymath.py", line 2365:
        def np_interp_impl(x, xp, fp):
            return inner(x, xp, fp, dtype)
            ^

    raised from /Users/Jason/opt/anaconda3/envs/cta/lib/python3.7/site-packages/numba-0.46.0-py3.7-macosx-10.9-x86_64.egg/numba/typeinfer.py:951
In definition 1:
    TypingError: Failed in nopython mode pipeline (step: nopython frontend)
Invalid use of Function(<function np_interp_impl_inner_factory.<locals>.impl at 0x6235bab90>) with argument(s) of type(s): (array(float32, 1d, C), array(float32, 1d, C), array(float32, 1d, C), dtype(float64))
 * parameterized
In definition 0:
    TypingError: Failed in nopython mode pipeline (step: nopython frontend)
Cannot unify array(float32, 1d, C) and array(float64, 1d, C) for 'slopes', defined at /Users/Jason/opt/anaconda3/envs/cta/lib/python3.7/site-packages/numba-0.46.0-py3.7-macosx-10.9-x86_64.egg/numba/targets/arraymath.py (2248)

File "../../../../opt/anaconda3/envs/cta/lib/python3.7/site-packages/numba-0.46.0-py3.7-macosx-10.9-x86_64.egg/numba/targets/arraymath.py", line 2248:
    def impl(x, xp, fp, dtype):
        <source elided>
            if lenxp <= lenx:
                slopes = (dy[1:] - dy[:-1]) / (dx[1:] - dx[:-1])
                ^

[1] During: typing of assignment at /Users/Jason/opt/anaconda3/envs/cta/lib/python3.7/site-packages/numba-0.46.0-py3.7-macosx-10.9-x86_64.egg/numba/targets/arraymath.py (2250)

File "../../../../opt/anaconda3/envs/cta/lib/python3.7/site-packages/numba-0.46.0-py3.7-macosx-10.9-x86_64.egg/numba/targets/arraymath.py", line 2250:
    def impl(x, xp, fp, dtype):
        <source elided>
            else:
                slopes = np.empty(0, dtype=dtype)
                ^

    raised from /Users/Jason/opt/anaconda3/envs/cta/lib/python3.7/site-packages/numba-0.46.0-py3.7-macosx-10.9-x86_64.egg/numba/typeinfer.py:951
In definition 1:
    TypingError: Failed in nopython mode pipeline (step: nopython frontend)
Cannot unify array(float32, 1d, C) and array(float64, 1d, C) for 'slopes', defined at /Users/Jason/opt/anaconda3/envs/cta/lib/python3.7/site-packages/numba-0.46.0-py3.7-macosx-10.9-x86_64.egg/numba/targets/arraymath.py (2248)

File "../../../../opt/anaconda3/envs/cta/lib/python3.7/site-packages/numba-0.46.0-py3.7-macosx-10.9-x86_64.egg/numba/targets/arraymath.py", line 2248:
    def impl(x, xp, fp, dtype):
        <source elided>
            if lenxp <= lenx:
                slopes = (dy[1:] - dy[:-1]) / (dx[1:] - dx[:-1])
                ^

[1] During: typing of assignment at /Users/Jason/opt/anaconda3/envs/cta/lib/python3.7/site-packages/numba-0.46.0-py3.7-macosx-10.9-x86_64.egg/numba/targets/arraymath.py (2250)

File "../../../../opt/anaconda3/envs/cta/lib/python3.7/site-packages/numba-0.46.0-py3.7-macosx-10.9-x86_64.egg/numba/targets/arraymath.py", line 2250:
    def impl(x, xp, fp, dtype):
        <source elided>
            else:
                slopes = np.empty(0, dtype=dtype)
                ^

    raised from /Users/Jason/opt/anaconda3/envs/cta/lib/python3.7/site-packages/numba-0.46.0-py3.7-macosx-10.9-x86_64.egg/numba/typeinfer.py:951
This error is usually caused by passing an argument of a type that is unsupported by the named function.
[1] During: resolving callee type: Function(<function np_interp_impl_inner_factory.<locals>.impl at 0x6235bab90>)
[2] During: typing of call at /Users/Jason/opt/anaconda3/envs/cta/lib/python3.7/site-packages/numba-0.46.0-py3.7-macosx-10.9-x86_64.egg/numba/targets/arraymath.py (2365)

File "../../../../opt/anaconda3/envs/cta/lib/python3.7/site-packages/numba-0.46.0-py3.7-macosx-10.9-x86_64.egg/numba/targets/arraymath.py", line 2365:
        def np_interp_impl(x, xp, fp):
            return inner(x, xp, fp, dtype)
            ^

    raised from /Users/Jason/opt/anaconda3/envs/cta/lib/python3.7/site-packages/numba-0.46.0-py3.7-macosx-10.9-x86_64.egg/numba/typeinfer.py:951
This error is usually caused by passing an argument of a type that is unsupported by the named function.
[1] During: resolving callee type: Function(<function interp at 0x1089840e0>)
[2] During: typing of call at <ipython-input-8-52ff25153033> (6)

File "<ipython-input-8-52ff25153033>", line 6:
def interp(x, xp, fp):
   return np.interp(x, xp, fp)
   ^

This is not usually a problem with Numba itself but instead often caused by
the use of unsupported features or an issue in resolving types.

To see Python/NumPy features supported by the latest release of Numba visit:
http://numba.pydata.org/numba-doc/latest/reference/pysupported.html
and
http://numba.pydata.org/numba-doc/latest/reference/numpysupported.html

For more information about typing errors and how to debug them visit:
http://numba.pydata.org/numba-doc/latest/user/troubleshoot.html#my-code-doesn-t-compile

If you think your code should work with Numba, please report the error message
and traceback, along with a minimal reproducer at:
https://github.com/numba/numba/issues/new

This is not usually a problem with Numba itself but instead often caused by
the use of unsupported features or an issue in resolving types.

To see Python/NumPy features supported by the latest release of Numba visit:
http://numba.pydata.org/numba-doc/latest/reference/pysupported.html
and
http://numba.pydata.org/numba-doc/latest/reference/numpysupported.html

For more information about typing errors and how to debug them visit:
http://numba.pydata.org/numba-doc/latest/user/troubleshoot.html#my-code-doesn-t-compile

If you think your code should work with Numba, please report the error message
and traceback, along with a minimal reproducer at:
https://github.com/numba/numba/issues/new

This is not usually a problem with Numba itself but instead often caused by
the use of unsupported features or an issue in resolving types.

To see Python/NumPy features supported by the latest release of Numba visit:
http://numba.pydata.org/numba-doc/latest/reference/pysupported.html
and
http://numba.pydata.org/numba-doc/latest/reference/numpysupported.html

For more information about typing errors and how to debug them visit:
http://numba.pydata.org/numba-doc/latest/user/troubleshoot.html#my-code-doesn-t-compile

If you think your code should work with Numba, please report the error message
and traceback, along with a minimal reproducer at:
https://github.com/numba/numba/issues/new

This is not usually a problem with Numba itself but instead often caused by
the use of unsupported features or an issue in resolving types.

To see Python/NumPy features supported by the latest release of Numba visit:
http://numba.pydata.org/numba-doc/latest/reference/pysupported.html
and
http://numba.pydata.org/numba-doc/latest/reference/numpysupported.html

For more information about typing errors and how to debug them visit:
http://numba.pydata.org/numba-doc/latest/user/troubleshoot.html#my-code-doesn-t-compile

If you think your code should work with Numba, please report the error message
and traceback, along with a minimal reproducer at:
https://github.com/numba/numba/issues/new

It seems that this type combination was not included when interp was added.  That seems like a reasonable thing to add.

@seibert thanks for following up with this, I have labeled the issue accordingly as 'feature_request'.

Is this issue closed?

I just tried this on current master (0.50.0dev0-7-g917f582433). And it seems fine. Hence, closing this. @EPronovost thanks for the ping!


Added clipboard functionality to deployment topics

This change is

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/0b6b251ac3a82b199f8421cb60e3a53d32b35720/

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/18a631476e96161f8759b73f9ca663e55ba0e03a/

Thank you, @dianaprince! Just a few tweaks needed.

Review status: 0 of 4 files reviewed at latest revision, all discussions resolved, all commit checks successful.

v2.1/initialize-a-cluster.md, line 50 at r2 (raw file):

We have to change this and its closing
 to
...
.

v2.1/initialize-a-cluster.md, line 65 at r2 (raw file):

We have to change this and its closing
 to
...
.

v2.1/initialize-a-cluster.md, line 85 at r2 (raw file):

We have to change this and its closing
 to
...
.

v2.1/initialize-a-cluster.md, line 92 at r2 (raw file):

3. Run the `cockroach init` command with the `--certs-dir` flag set to the directory containing the `ca.crt` file and the files for the `root` user, and with the `--host` flag set to the address of any node:

    ~~~ shell

Let's ad copy-to-clipboard here, too.

v2.1/initialize-a-cluster.md, line 99 at r2 (raw file):

We have to change this and its closing
 to
...
.

v2.1/initialize-a-cluster.md, line 104 at r2 (raw file):

2. Run the `cockroach init` command with the `--host` flag set to the address of any node:

    ~~~ shell

Let's ad copy-to-clipboard here, too.

v2.1/recommended-production-settings.md, line 228 at r2 (raw file):

We have to change this and its closing
 to
...
.

v2.1/recommended-production-settings.md, line 328 at r2 (raw file):

We have to change this and its closing
 to
...
.

v2.1/recommended-production-settings.md, line 397 at r2 (raw file):

We have to change this and its closing
 to
...
.

Comments from Reviewable

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/4a53d5d8e612e34cbd34a6854fae2626b68e3247/

Review status: 0 of 4 files reviewed at latest revision, 9 unresolved discussions, all commit checks successful.

Comments from Reviewable

Review status: 0 of 4 files reviewed at latest revision, 9 unresolved discussions, all commit checks successful.

v2.1/initialize-a-cluster.md, line 50 at r2 (raw file):
Previously, jseldess (Jesse Seldess) wrote…
We have to change this and its closing
 to
...
.

Done.

v2.1/initialize-a-cluster.md, line 65 at r2 (raw file):
Previously, jseldess (Jesse Seldess) wrote…
We have to change this and its closing
 to
...
.

Done.

v2.1/initialize-a-cluster.md, line 85 at r2 (raw file):
Previously, jseldess (Jesse Seldess) wrote…
We have to change this and its closing
 to
...
.

Done.

v2.1/initialize-a-cluster.md, line 92 at r2 (raw file):
Previously, jseldess (Jesse Seldess) wrote…
Let's ad copy-to-clipboard here, too.

Done.

v2.1/initialize-a-cluster.md, line 99 at r2 (raw file):
Previously, jseldess (Jesse Seldess) wrote…
We have to change this and its closing
 to
...
.

Done.

v2.1/initialize-a-cluster.md, line 104 at r2 (raw file):
Previously, jseldess (Jesse Seldess) wrote…
Let's ad copy-to-clipboard here, too.

Done.

v2.1/recommended-production-settings.md, line 228 at r2 (raw file):
Previously, jseldess (Jesse Seldess) wrote…
We have to change this and its closing
 to
...
.

Done.

v2.1/recommended-production-settings.md, line 328 at r2 (raw file):
Previously, jseldess (Jesse Seldess) wrote…
We have to change this and its closing
 to
...
.

Done.

v2.1/recommended-production-settings.md, line 397 at r2 (raw file):
Previously, jseldess (Jesse Seldess) wrote…
We have to change this and its closing
 to
...
.

Done.

Comments from Reviewable


Publishing Bower component to separate repo

After the campaign of migration to monorepo bower components should be published to separate repo instead of a branch.
What steps should I perform to do this?
I've tried to set $GIT_REMOTE_URL like this:
"release": "GIT_REMOTE_URL=git@github.com:wix-private/cashier-settings-component-bower-component.git node_modules/wix-gruntfile/scripts/release.sh"

but then bumped version became incorrect (starts from 1.0.1 again).
I've tried to use wnpm-release + bower-auto-release directly, but seems that bower-auto-release uses different steps and ignore/include patterns, and also incorrectly calculates new version.
Any tips how to migrate? @shahata

Thanks to @roymiloh I've managed to use wnpm-release & bower-auto-release directly.
The problem with different files pattern was solved with bower-auto-release --dist . (the cause of the difference is that wix-gruntfile release script takes all the files from the source repo, while bower-auto-release looks for /source-repo/dist).
The problem with incorrect version calculation was solved by manually updating project's package.json version field to the latest bower release version. Afterwards version will be taken from NPM registry (thus you can nullify package.json version if you want).


changed QueryEscape to PathEscape

fixes #1296 but requires upgrading go to 1.8

I've merged that - thank you very much for fixing that..