Missing goto and label in decompiled function. No loop present.

Describe the bug
Decompiling a function which uses a label and the dreaded goto keyword doesn't fully appear in the decompiler view.
Consider the following function:
void __attribute__((optimize(0))) atomic_incr(std::atomic_int *at) {
    uint32_t new_i = *at;
    uint32_t flag = 0;
    printf("Loading atomic i value: %ld\r\n", new_i);
    retry:
    asm volatile("ldrex %0,[%0]\n"
                 "add   %0, #1\n"
                 "strex %1, %0,[%0]\n" : "=r" (new_i), "=r" (flag) : "r" (at));
    if (flag) {
        printf("Memory access failed: 0x%lx\r\n", flag);
        goto retry;
    }
    else {
        new_i = *at;
        printf("Memory updated: 0x%lx new value: %ld\r\n", flag, new_i);
    }
}

It decompiles as follows:
/* WARNING: Removing unreachable block (ram,0x00008254) */
/* atomic_incr(std::atomic<int>*) */

void atomic_incr(atomic *param_1)

{
  int iVar1;
  int *in_r2;

  iVar1 = operator.cast.to.int((__atomic_base *)param_1);
  printf("Loading atomic i value: %ld\r\n",iVar1);
  *(int *)(*in_r2 + 1) = *in_r2 + 1;
  iVar1 = operator.cast.to.int((__atomic_base *)param_1);
  printf("Memory updated: 0x%lx new value: %ld\r\n",0,iVar1);
  return;
}

Expected behavior
I didn't actually expect to see the correct label or goto statement even though the binary had plenty of dwarf information. However, having a chunk of the function disappear was not something which was expected. Instead a while loop should have been generated.
Environment (please complete the following information):

OS: Microsoft Windows [Version 10.0.18363.720]
Java Version: 14
Ghidra Version: 9.2

Additional context
The decompiler does warn that it has removed an "unreachable" block. Funny enough, it removed where I'm stuck and kept the unreachable part. For some context as to why I would write such a function in the first place I'm having difficulty with deadlocking when incrementing an atomic and this was the simplest way I could think of to debug.

Can you post the assembly listing for this function as well?

Can you post the assembly listing for this function as well?

Sure thing.
listing view
                             **************************************************************
                             * atomic_incr(std::atomic<int>*)                             *
                             **************************************************************
                             undefined atomic_incr(atomic * param_1)
             undefined         r0:1           <RETURN>
             atomic *          r0:4           param_1
             undefined4        Stack[-0xc]:4  local_c                                 XREF[5]:     000081f0(W),
                                                                                000081fc(R),
                                                                                00008218(W),
                                                                                0000824c(W),
                                                                                00008250(R)
             undefined4        Stack[-0x10]:4 local_10                                XREF[5]:     000081f8(W),
                                                                                0000821c(W),
                                                                                00008220(R),
                                                                                0000822c(R),
                                                                                00008254(R)
             undefined4        Stack[-0x14]:4 local_14                                XREF[4]:     000081dc(W),
                                                                                000081e0(R),
                                                                                00008208(R),
                                                                                0000823c(R)
                             _Z11atomic_incrPSt6atomicIiE                    XREF[1]:     main:0000a9d4(c)
                             atomic_incr
        000081d0 00 48 2d e9     stmdb      sp!,{r11 lr}
        000081d4 04 b0 8d e2     add        r11,sp,#0x4
        000081d8 10 d0 4d e2     sub        sp,sp,#0x10
        000081dc 10 00 0b e5     str        param_1,[r11,#local_14]
        000081e0 10 30 1b e5     ldr        r3,[r11,#local_14]
        000081e4 03 00 a0 e1     cpy        param_1,r3
        000081e8 21 00 00 eb     bl         std::__atomic_base::operator.cast.to.int         int operator.cast.to.int(__atomi
        000081ec 00 30 a0 e1     cpy        r3,param_1
        000081f0 08 30 0b e5     str        r3,[r11,#local_c]
        000081f4 00 30 a0 e3     mov        r3,#0x0
        000081f8 0c 30 0b e5     str        r3,[r11,#local_10]
        000081fc 08 10 1b e5     ldr        r1,[r11,#local_c]
        00008200 60 00 9f e5     ldr        param_1=>DAT_0013df30,[PTR_DAT_00008268]         = 0013df30
                                                                                = 4Ch
        00008204 d1 a4 03 eb     bl         printf                                           int printf(char * fmt, ...)
                             LAB_00008208                                    XREF[1]:     00008238(j)
        00008208 10 30 1b e5     ldr        r3,[r11,#local_14]
        0000820c 9f 2f 92 e1     ldrex      r2,[r2]
        00008210 01 20 82 e2     add        r2,r2,#0x1
        00008214 92 3f 82 e1     strex      r3,r2,[r2]
        00008218 08 20 0b e5     str        r2,[r11,#local_c]
        0000821c 0c 30 0b e5     str        r3,[r11,#local_10]
        00008220 0c 30 1b e5     ldr        r3,[r11,#local_10]
        00008224 00 00 53 e3     cmp        r3,#0x0
        00008228 03 00 00 0a     beq        LAB_0000823c
        0000822c 0c 10 1b e5     ldr        r1,[r11,#local_10]
        00008230 34 00 9f e5     ldr        param_1=>s_Memory_access_failed:_0x%lx_0013df5   = 0013df50
                                                                                = "Memory access failed: 0x%lx\r
        00008234 c5 a4 03 eb     bl         printf                                           int printf(char * fmt, ...)
        00008238 f2 ff ff ea     b          LAB_00008208
                             LAB_0000823c                                    XREF[1]:     00008228(j)
        0000823c 10 30 1b e5     ldr        r3,[r11,#local_14]
        00008240 03 00 a0 e1     cpy        param_1,r3
        00008244 0a 00 00 eb     bl         std::__atomic_base::operator.cast.to.int         int operator.cast.to.int(__atomi
        00008248 00 30 a0 e1     cpy        r3,param_1
        0000824c 08 30 0b e5     str        r3,[r11,#local_c]
        00008250 08 20 1b e5     ldr        r2,[r11,#local_c]
        00008254 0c 10 1b e5     ldr        r1,[r11,#local_10]
        00008258 10 00 9f e5     ldr        param_1=>s_Memory_updated:_0x%lx_new_value:_00   = 0013df70
                                                                                = "Memory updated: 0x%lx new val
        0000825c bb a4 03 eb     bl         printf                                           int printf(char * fmt, ...)
        00008260 04 d0 4b e2     sub        sp,r11,#0x4
        00008264 00 88 bd e8     ldmia      sp!,{r11 pc}
                             PTR_DAT_00008268                                XREF[1]:     atomic_incr:00008200(R)
        00008268 30 df 13 00     addr       DAT_0013df30                                     = 4Ch
                             PTR_s_Memory_access_failed:_0x%lx_0000826c      XREF[1]:     atomic_incr:00008230(R)
        0000826c 50 df 13 00     addr       s_Memory_access_failed:_0x%lx_0013df50           = "Memory access failed: 0x%lx\r
                             PTR_s_Memory_updated:_0x%lx_new_value:_00008270 XREF[1]:     atomic_incr:00008258(R)
        00008270 70 df 13 00     addr       s_Memory_updated:_0x%lx_new_value:_0013df70      = "Memory updated: 0x%lx new val

Also, there is a mistake somewhere in the C code as I've fixed the issue I was having with the processor and the code still fails. It appears that it should always end up going to the retry label.
It also appears that gcc disregards the result from the strex instruction would explains why my code fails.

I have some ARM code that exhibits this
                             **************************************************************
                             *                          FUNCTION                          *
                             **************************************************************
                             undefined FUN_1003afc0()
             undefined         r0:1           <RETURN>
                             FUN_1003afc0                                    XREF[8]:     FUN_10003244:10003264(c),
                                                                                FUN_1002516c:10025174(c),
        1003afc0 9f 1f 90 e1     ldrex      r1,[r0]
        1003afc4 01 20 81 e2     add        r2,r1,#0x1
        1003afc8 92 3f 80 e1     strex      r3,r2,[r0]
        1003afcc 00 00 33 e3     teq        r3,#0x0
        1003afd0 fa ff ff 1a     bne        FUN_1003afc0
        1003afd4 02 00 a0 e1     cpy        r0,r2
        1003afd8 1e ff 2f e1     bx         lr

which decompiles to:
int FUN_1003afc0(int *param_1)

{
  int iVar1;

  iVar1 = *param_1;
  *param_1 = iVar1 + 1;
  return iVar1 + 1;
}

looking up LDREX and STREX
they show they are atomic read/writes..
the PCODE for the STREX shows the r3 is always zero, where it seems it should probably have some pcodeop intrinsic
                             **************************************************************
                             *                          FUNCTION                          *
                             **************************************************************
                             undefined FUN_1003afc0()
             undefined         r0:1           <RETURN>
                             FUN_1003afc0                                    XREF[8]:     FUN_10003244:10003264(c),
                                                                                FUN_1002516c:10025174(c),
                                                                                FUN_10035b0c:10035b14(c),
                                                                                FUN_10035c78:10035c98(c),
                                                                                1003afd0(j),
                                                                                thunk_EXT_FUN_1003afc0:50228e98(
                                                                                50228e9c(*), 509902ac(*)
        1003afc0 9f 1f 90 e1     ldrex      r1,[r0]
                                                      r1 = LOAD ram(r0)
        1003afc4 01 20 81 e2     add        r2,r1,#0x1
                                                      tmpCY = INT_CARRY r1, 1:4
                                                      tmpOV = INT_SCARRY r1, 1:4
                                                      r2 = INT_ADD r1, 1:4
                                                      tmpNG = INT_SLESS r2, 0:4
                                                      tmpZR = INT_EQUAL r2, 0:4
        1003afc8 92 3f 80 e1     strex      r3,r2,[r0]
                                                      STORE ram(r0), r2
                                                      r3 = COPY 0:4
        1003afcc 00 00 33 e3     teq        r3,#0x0
                                                      $Ubcf0:4 = INT_XOR r3, 0:4
                                                      tmpCY = COPY shift_carry
                                                      tmpOV = COPY OV
                                                      tmpNG = INT_SLESS $Ubcf0, 0:4
                                                      tmpZR = INT_EQUAL $Ubcf0, 0:4
                                                      CY = COPY tmpCY
                                                      ZR = COPY tmpZR
                                                      NG = COPY tmpNG
                                                      OV = COPY tmpOV
        1003afd0 fa ff ff 1a     bne        FUN_1003afc0
                                                      $U340:1 = BOOL_NEGATE ZR
                                                      CBRANCH *[ram]0x1003afc0:4, $U340
        1003afd4 02 00 a0 e1     cpy        r0,r2
                                                      r0 = COPY r2
        1003afd8 1e ff 2f e1     bx         lr
                                                      $U0:4 = INT_AND lr, 1:4
                                                      ISAModeSwitch = INT_NOTEQUAL $U0, 0:4
                                                      TB = COPY ISAModeSwitch
                                                      pc = INT_AND lr, 0xfffffffe:4
                                                      RETURN pc

which makes sense:
:strex^COND  Rd,Rm,[Rn]    is $(AMODE) &  COND & c2027=0x18 & c0411=0xf9 & Rn & Rd & Rm
{
	build COND;
	*Rn = Rm;
	Rd = 0;
}

It's quite possible the original issues is "not actually an issues" if GCC is producing the wrong ASM..
this looks wrong to me
    asm volatile("ldrex %0,[%0]\n"
                 "add   %0, #1\n"
                 "strex %1, %0,[%0]\n" : "=r" (new_i), "=r" (flag) : "r" (at));

feels like your inc should on a different variable to the memory location you are reading from/to I suspect you input at is what you intended
    asm volatile("ldrex r0,[%2]\n"
                 "add   %0, #1\n"
                 "strex %1, %0,[%2]\n"
         : "=r" (new_i), "=r" (flag)
         : "r" (at)
         : /* No clobbers */
         );

now this reads and writes at at
anyways if the orginal issue is no longer a thing I can open a new issues for my STREX problem.

looking up LDREX and STREX
they show they are atomic read/writes..
the PCODE for the STREX shows the r3 is always zero, where it seems it should probably have some pcodeop intrinsic

This is the problem. That is not correct as r3 will not always be 0 and is the reason no loop or go goto is generated.

This is the problem. That is not correct as r3 will not always be 0 and is the reason no loop or go goto is generated.

thus why I put it there..
speaking of for armcc the intrinsic is __strex and __ldrex

Also, yes the c code I used as an example was incorrect but a loop of some form should still be generated.

Also you at variable is not declared volatile so, you CC was justified in not making non-looping code.

ah the VERSION_6K implementations of strexN use hasExclusiceAccess() so it seems that pattern should be followed for the VERSION_6 :strex^COND

Also you at variable is not declared volatile so, your CC was justified in not making non-looping code.

Yup. At the time I opened this I was actually using ghidra to debug a deadlock situation with a baremetal raspberrypi toolchain, everytime an exception was thrown (I hadn't initialized the mmu). The example I posted was a late night attempt to reproduce the issue I saw in ghidra in an easily reproducible manner. I think the correct code should have been:
void __attribute__((optimize(0))) atomic_incr(std::atomic_int *at) {
    uint32_t new_i = *at;
    volatile uint32_t flag = 0;
    printf("Loading atomic i value: %ld\r\n", new_i);
    retry:
     /*
        ldrex new_i, at
        add new_i, #1
        strex flag, new_i[at]
    */
    asm volatile("ldrex %0,[%0]\n"
                 "add   %0, #1\n"
                 "strex %1, %0,[%0]\n" : "=r" (new_i), "=r" (flag) : "r" (at));
    if (flag) {
        printf("Memory access failed: 0x%lx\r\n", flag);
        goto retry;
    }
    else {
        new_i = *at;
        printf("Memory updated: 0x%lx new value: %ld\r\n", flag, new_i);
    }
}


[NFR] Publish library as package

It would be great if the essential reusable files become part of a package (composer), allowing to build and api based on this project and have the possibility to upgrade the package when new fixes are done.

Great idea. I think that will require to split the project into 2 parts, one that will come with say composer and then the rest one where the actual implementation based on the application needs lives.

Compose would be perfect. Maybe we could even add this to the phalcon/phalcon-devtools as a project skeleton that sets up a basic api project using this lib.
I could help out with some work when the basic split is done.


helm deployment: Minnesota release updates

Update helm deployment for Minnesota release.  Stage changes on minnesota-dev branch in edgex-examples

Completed with  #187


import: rename Switch to Enter

What have you changed? (mandatory)
Switch is a reserved word in Java, we can't use it.
What are the type of the changes? (mandatory)

Bug fix

How has this PR been tested? (mandatory)
Just rename things.
Does this PR affect documentation (docs/docs-cn) update? (mandatory)
No.
Does this PR affect tidb-ansible update? (mandatory)
No.

Can you simply rename switch to switch_mode?

Maybe, but I have merged kvproto, can I just stick with this change?

I prefer switch_mode, which is more clear. Could you also change kvproto?

OK

PTAL


make concept display in trees with name

Right now it they all look the same.

_attr [34,44,34,44,9,17,node,fired,blt, ("is" "lawyer") ("con" concept:"<name>")]


OSCAL 1.3.0 Support

OSCAL Content 1.3.0 dropped a couple of days ago, and I wanted to know if this is on the roadmap for the near future.
https://github.com/usnistgov/oscal-content

Hey @beholdenkey, appreciate the issue.
Given my understanding of how oscal-content is versioned separately from oscal itself - We have a milestone defined for how to get this repository aligned to support new versions of OSCAL being released quickly. Currently this project is 1 patch version behind latest.
In as much, I believe that when this milestone completes that we will have support for OSCAL version 1.1.2.
Does that align-to/answer your question?

@brandtkeller  You answered my question, I did some additional reading and came to the same understanding the oscal-content is version separately from oscal. I appreciate your timely response I am still learning about in the inner workings of OSCAL and to integrate it into some processes. This does answer my question Thank you.


How can I install a specific omero version with Ansible?

Hello,
First of all, thank you so much for providing ansible role for installing OMERO.
Now, I'd like to install the OMERO.server version 5.4.7 by this role, and I tried it with omero_server_release: 5.4.7 instead of omero_server_release: present, but I still get the latest version -- 5.4.9.
How can I make that happen?
Thanks a lot,
Koji

Setting OMERO_VERSION as 5.4.7 made it work, and now I think that something on what I had here was wrong. Well, sorry, the problem has been solved:p


I want to get real cell data

I got an output like this
Cell A1 contains <numbers_parser.cell.TextCell object at 0x0000017093083B50>
This looks like the address to access the iwa file data
But I don't know what tool to use to extract the data of the iwa file
Can numbers-parser directly extract the value of the numbers cell?

I got an output like this
Cell A1 contains <numbers_parser.cell.TextCell object at 0x0000017093083B50> This looks like the address to access the iwa file data
But I don't know what tool to use to extract the data of the iwa file Can numbers-parser directly extract the value of the numbers cell?


Get earlgrey or snapshot working for generating screenshots

I'd like to be able to use earlgrey or snapshot (from Fastlane) for automatically generating screenshots.
In earlgrey, take a look at +[GREYScreenshotUtil takeScreenshotForAppStore]
The screenshots should be:

Map view with a selected stop (Capitol Hill Link Station)
A stop view that shows multiple routes
The bookmarks tab with a number of bookmarks and maybe a couple groups
The map view for a route
The arrival/departure view for a route

never mind. not important enough to spend time on this right now.


add pod e2e testing

What type of PR is this?
test: add test codes
What does this PR do?
add pod e2e testing code
Which issue(s) does this PR fix?
Fixes #76
Special notes for your reviewer:
Screenshots (if applicable):

Additional Comments:

/lgtm


Heyy!

Heyy, can u adapt the app 4 CashShow 2? And if u could, can u open a discord to share those
answers?

No, sorry.
On Mon, May 14, 2018 at 7:44 AM bjen1<EMAIL_ADDRESS>wrote:

Heyy, can u adapt the app 4 CashShow 2? And if u could, can u open a
discord to share those
answers?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/gjacobs314/HQTrivia/issues/49, or mute the thread
https://github.com/notifications/unsubscribe-auth/AhAkIlpzpFSRlTJ4rcCjJrxdDxaQpKd2ks5tyW4RgaJpZM4T9o4G
.

--
Gordon


Implemented async methods

Same code as before, just had problems to merge the code for some reason

Thank you for your pull request!

No problem .. When do you think you will release a new nuget version ?

I don't have access to nuget / build process (we should set up a free one on app veyor). @lukevenediger can you take a look into this. I haven't done any testing on this commit but it looks good.


Update Ukrainian translations

Added missing translations, corrected a few mistakes that I noticed, and changed "Дешборд" (Dashboard) to a more easy to understand word. Thank you for this amazing package!

Thanks!


refactor: remove & before $db

Description

$db is an object. We don't need to use reference.

see https://www.php.net/manual/en/language.oop5.references.php

Checklist:

[x] Securely signed commits
[] Component(s) with PHPDoc blocks, only if necessary or adds value
[] Unit testing, with >80% coverage
[] User guide updated
[x] Conforms to style guide

In my understanding, we only need to use the reference when we have to change the property outside.
https://3v4l.org/QN7F9
However, the usage destroys the encapsulation. Generally speaking, it is not good design.
In this $db case, I don't see any reason to use the reference.


Node inspector does not update properly when editing gradient

Godot version:
c5279432f
OS/device including version:
ubuntu 19 but probably irrelevant
Issue description:
When I add new points to gradient color picker in node inspector window list of offsets/colors does not update automaticly - one needs to open/close it to see new entries.
https://giphy.com/gifs/Ss5y0fdKy0DFqHUTZL
Steps to reproduce:

create texture rect with gradient texture
open list of gradient offsets
add new offsets in colorpicker (or whatever it's called)
opened list contains old data because it is not updated
close list to see that it gets finally updated

expected:
when i add new offset points list should update on spot
It seems that the reason for bug is that gradient_edit is not communicating it's changes to inspector but only to gradient class. Gradient classes are not aware of existance of list properties and inspector as far as I can tell so it is not as easy as connect some signal to force an update. Update only happens when list classes are updated because they are aware of existance of gradient and pull new data from it on change.

I am working on this

Still valid in 94e5f66

Fixed in 4.0


Add Go 1.16 to action workflow

Sneaking into the contributor's list with a simple CI change since the README instructions use golang:1.16-alpine as the Dockerfile builder. although go.mod specifies 1.15.

perfect, thanks!


Unable to build Static Library (.a file)

Building the objective-C target GoogleSignIn isn't creating static .a file.
Instead it is outputting .o files.

I tried changing Product type to static
products: [
    .library(
      name: "GoogleSignIn",
      type: .static,
      targets: [
        "GoogleSignIn",
      ]
    ),
    .library(
      name: "GoogleSignInSwift",
      type: .static,
      targets: [
        "GoogleSignInSwift",
      ]
    ),
  ],

Still it is creating .o files instead of .a file.

Building the objective-C target GoogleSignIn isn't creating static .a file.
Instead it is outputting .o files.

I tried changing Product type to static

products: [

    .library(

      name: "GoogleSignIn",

      type: .static,

      targets: [

        "GoogleSignIn",

      ]

    ),

    .library(

      name: "GoogleSignInSwift",

      type: .static,

      targets: [

        "GoogleSignInSwift",

      ]

    ),

  ],

Still it is creating .o files instead of .a file.


Add link to clearify

When you tell somebody to do something, also show them how to.

See https://github.com/hlissner/doom-emacs/pull/4709#issuecomment-788068213


unable to extract tablular data thats within an image

table_image_horizonal_corrected.pdf
ive added my file. llamaparse doesnt respond back with the correct data for this table.

table_image_horizonal_corrected.md
Do you expect such a result to return? It can also be returned using the markdown syntax。

table_image_horizonal_corrected.md
Do you expect such a result to return? It can also be returned using the markdown syntax。

markdown format.


Batching actions in ngrx

So I was looking to see if there was a way to do batch of actions in redux when I came upon this.
https://github.com/reactjs/redux/issues/911#issuecomment-149361073
where  Dan Abrimov suggested something like this as a "redux" way to batch actions.
export const BATCH = 'BATCHING_REDUCER.BATCH';

export function batchActions(actions) {
	return {type: BATCH, payload: actions}
}

export function enableBatching(reduce) {
	return function batchingReducer(state, action) {
		switch (action.type) {
			case BATCH:
				return action.payload.reduce(batchingReducer, state);
			default:
				return reduce(state, action);
		}
	}
}

https://github.com/tshelburne/redux-batched-actions/blob/master/src/index.js
Is there a way to do this in ngrx?
or maybe should a version of this be made available as part of the store?
Thought I'd broach this here first so forgive me if this is more suited for stackoverflow as a usage question.

To be honest i dont understand the code, but you should be able to do something like:
export function enableBatching<T>(reducer: ActionReducer<T>){
	const batchReducer: ActionReducer<T> = (state: T, action: Action) => {
		switch (action.type) {
			case BATCH_ACTION:
				let newState = state;
				for (let batchedAction of action.payload.actions)
					newState = reducer(newState, batchedAction);
				}
				return newState;
			default:
				return reducer(state);
		}
	};

	return batchReducer;
}

The pattern suggested by Dan Abramov is the pattern I would recommend as well. Should work just fine with ngrx/store.


Finish "Condition ROC Curve Comparison" Functions

The calculations have been completed for this function, however, the plotting function is not.

add option to replicate the ROC scatter plot as it is in "Motion/Direction Selectivity Cell grouping scatterplot" for the velocity.


Hyrogen Run not working correctly with if/else statements in python

Pictures say more than words...
When attempting to run the following scenarios (i.e. execute the selected lines by hitting shift + enter) we'l run into some issues:
 only runs the if part:
This is unfortunate but could be considered a beauty problem, as
 circumvents this issue:
However, within indented sections (where usually this is possible:
 -> )
This:  will now also fail:
  File "<tokenize>", line 3
    else:
    ^
IndentationError: unindent does not match any outer indentation level

Versions:
OS: Win 10 Enterprise
Atom    : 1.27.2
Electron: 1.7.15
Chrome  : 58.0.3029.110
Node    : 7.9.0

You may want to try this package, which takes care of the whitespace problem.
https://atom.io/packages/hydrogen-python
And then you may want to file the if/else behaviour as a feature request to that package, because it's a language specific issue?
#862 #1285

This specific issue should have been fixed from https://github.com/nteract/hydrogen/pull/1363 when selecting indented if/else blocks. For automatic if/else completion, see hydrogen-python.


Update dev/source-release.sh to add arrow, mr and spark-runtime

Update dev/source-release.sh to reflect the changes recently:

Add "arrow"
Add "mr"
Rename "runtime" to "spark-runtime"

@rdblue would you please help to review it at your most convenience, thanks!


Dark mode flashes in Next.js even with noflash.js

The dark mode on my Next.js app still flashes even with adding noflash.js. I have made a dark mode component  like so:
import useDarkMode from "use-dark-mode";

import { FiMoon } from "react-icons/fi";

const DarkModeToggle = () => {
  const darkMode = useDarkMode(false);

  return (

      <input
        type="checkbox"
        className="custom-control-input"
        id="darkmodeSwitch"
        onChange={darkMode.toggle}
        checked={darkMode.value}
        onClick={darkMode.disable}
      />

        <FiMoon />

  );
};

export default DarkModeToggle;

Added noflash.js to the public folder.
Then on _document.js
import Document, { Html, Head, Main, NextScript } from "next/document";

class MyDocument extends Document {
  static async getInitialProps(ctx) {
    const initialProps = await Document.getInitialProps(ctx);
    return { ...initialProps };
  }

  render() {
    return (


An error occurred during the execution of step “make -j4”

Hello, I am getting the following error while configuring this project on my MacBook Air(M2). How can I fix this error?
In file included from /github/matfp/extern/geogram/src/lib/geogram/basic/process_unix.cpp:75:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/14.0.0/include/xmmintrin.h:14:2: error: "This header is only meant to be used on x86 and x64 architecture"
#error "This header is only meant to be used on x86 and x64 architecture"

It seems like a compiling issue of geogram, you may want to check if geogram is compatible with M2 chip (https://github.com/BrunoLevy/geogram). This code is tested on M1 chip only.

I got the same error on my classmate's MacBook Pro (M1 Pro). So I guess it's not because of the chip, maybe the version of geogram is wrong?

After changing the geogram version and commenting the matfp/src/matfp/external/WindingNumber.h file, I successfully ran this project on my MacBook Air(M2). Thanks!

After changing the geogram version and commenting the matfp/src/matfp/external/WindingNumber.h file, I successfully ran this project on my MacBook Air(M2). Thanks!

Hey! Could you give more details on how you changed the version of Geogram in your project?


HLint suggests removing actually-used NamedFieldPuns extension

% stack exec hlint -- --version
Stack has not been tested with GHC versions above 8.6, and using 8.8.2, this may fail
Stack has not been tested with Cabal versions above 2.4, but version <IP_ADDRESS> was found, this may fail
HLint v2.2.11, (C) Neil Mitchell 2006-2020

.hlint.yaml
---
- ignore: {name: "Redundant do", within: spec}
- ignore: {name: "Eta reduce"}
- ignore: {name: "Use list comprehension"}
- ignore: {name: "Reduce duplication"}
- ignore: {name: "Use fmap"}  # we use classy prelude so this would be in error
- ignore: {name: "Avoid restricted function", within: Application}
- ignore: {name: "Use ."}  # commonly broken or less readable

# Custom Warnings
- warn: {lhs: mapM, rhs: traverse}
- warn: {lhs: mapM_, rhs: traverse_}
- warn: {lhs: forM, rhs: for}
- warn: {lhs: forM_, rhs: for_}
- warn: {lhs: return, rhs: pure}

# Specify additional command line arguments
- arguments:
  - -XBangPatterns
  - -XDataKinds
  - -XDeriveAnyClass
  - -XDeriveFoldable
  - -XDeriveFunctor
  - -XDeriveGeneric
  - -XDeriveLift
  - -XDeriveTraversable
  - -XDerivingStrategies
  - -XFlexibleContexts
  - -XFlexibleInstances
  - -XGADTs
  - -XGeneralizedNewtypeDeriving
  - -XLambdaCase
  - -XMultiParamTypeClasses
  - -XNoImplicitPrelude
  - -XNoMonomorphismRestriction
  - -XOverloadedStrings
  - -XRankNTypes
  - -XRecordWildCards
  - -XScopedTypeVariables
  - -XStandaloneDeriving
  - -XTypeApplications
  - -XTypeFamilies

- modules:
  - {name: [Data.Set], as: Set}
  - {name: [Data.Map], as: Map}
  - {name: [Data.HashSet], as: HashSet}
  - {name: [Data.HashMap.Strict], as: HashMap}
  - {name: [Data.Text], as: T}
  - {name: [Data.Text.Encoding], as: T}
  - {name: [Data.Text.IO], as: T}
  - {name: [Data.Text.Lazy], as: TL}
  - {name: [Data.Text.Lazy.Encoding], as: TL}
  - {name: [Data.Text.IO.Lazy], as: TL}
  - {name: [Data.ByteString], as: BS}
  - {name: [Data.ByteString.Lazy], as: BSL}
  - {name: [Data.ByteString.Char8], as: BS8}
  - {name: [Data.ByteString.Lazy.Char8], as: BSL8}
  - {name: [Data.List.NonEmpty], as: NE}
  - {name: [Data.Sequence], as: Seq}

Settings.hs
{-# LANGUAGE NamedFieldPuns #-}

module Settings where

envParseDogStatsSettings :: Env.Parser DogStatsSettings
envParseDogStatsSettings = do
  dogStatsSettingsHost <- undefined
  dogStatsSettingsPort <- undefined
  dogStatsSettingsMaxDelay <- undefined
  pure defaultSettings
    { dogStatsSettingsHost
    , dogStatsSettingsPort
    , dogStatsSettingsMaxDelay
    }

This is a real module from our project, but pared down to just enough to trigger this Issue. This file will of course not compile at all, but in our real project it compiles fine.
% stack exec hlint Punning.hs
Stack has not been tested with GHC versions above 8.6, and using 8.8.2, this may fail
Stack has not been tested with Cabal versions above 2.4, but version <IP_ADDRESS> was found, this may fail
/home/patrick/Settings.hs:1:1: Warning: Unused LANGUAGE pragma
Found:
  {-# LANGUAGE NamedFieldPuns #-}
Perhaps you should remove it.

1 hint

If removed, and in our real project module, I'll see:
/home/patrick/code/freckle/megarepo/backend/fancy-api/library/Settings.hs:201:8: error:
    Illegal use of punning for field ‘dogStatsSettingsMaxDelay’
    Use NamedFieldPuns to permit this
    |
201 |   pure defaultSettings
    |        ^

This seemed distinct from #767 -- apologies if it's a duplicate.

Thanks for the report. A completely fresh issue, and one that probably got released in the last few releases when we converted that code to use the GHC AST. Great test case, and I've just pushed a fix, so will be fixed in the next release.
Unfortunately the next release will be breaking a reasonable number of things in the API (see https://twitter.com/ndm_haskell/status/1237104655550816256?s=20), and we want to break everything at once. That means we can't really release now, and we can't release for probably another week. Sorry :(

Oh wow, thanks so much for the quick fix!
On Tue, Mar 10, 2020, 18:02 Neil Mitchell<EMAIL_ADDRESS>wrote:

Closed #898 https://github.com/ndmitchell/hlint/issues/898.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/ndmitchell/hlint/issues/898?email_source=notifications&email_token=AAAMM7HKHAZXYTYML6MLDJ3RG22I5A5CNFSM4LFHMPF2YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOXHB3OHY#event-3116611359,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAMM7EKVXJBGQM363U4VTLRG22I5ANCNFSM4LFHMPFQ
.


Use training data from a managed datasource

Have you tested this using a registered diabetes dataset in blob storage? We should use it as default for the CI pipeline - I don't see it setup there...

Yes, I have. With an ML WS in our subscription (EuUniqueML-AML-WS). I will setup that with the Eng subscription


Improve "how to get in touch" section

organize by severity,
mention content issues board

would be nice if the pictures (crown/shiled) were the exact same than the ones showing up on CW.
I'd like to make a change, but the "+" fro review isn't showing up so... Line 50:

Moderators need to stick to the Codewars Code of Conduct, they can use the site as every other user, and they are obliged to play the game fair. When they misbehave, violate rules, or abuse their privileges, their moderator status may be revoked.

Moderators use the site as every other user and have to stick to the [Codewars Code of Conduct](/community/rules/). Misbehaviour, violation of the rules, or abuses of their privileges, may lead to their moderator status being revoked.

'Sounds less harsh that way.

would be nice if the pictures (crown/shiled) were the exact same than the ones showing up on CW.
I'd like to make a change, but the "+" fro review isn't showing up so... Line 50:

Moderators need to stick to the Codewars Code of Conduct, they can use the site as every other user, and they are obliged to play the game fair. When they misbehave, violate rules, or abuse their privileges, their moderator status may be revoked.

Moderators use the site as every other user and have to stick to the [Codewars Code of Conduct](/community/rules/). Misbehaviour, violation of the rules, or abuses of their privileges, may lead to their moderator status being revoked.

'Sounds less harsh that way.

would be nice if the pictures (crown/shield) were the exact same than the ones showing up on CW.

I do not know how :(

I'd like to make a change, but the "+" fro review isn't showing up so... Line 50:

The [+] does not show up, because the line was not changed. I think that if you want to suggest a change for it, you need to create a PR with your modification. Or I can do this, since you wrote what you want to have changed.

'Sounds less harsh that way.

Choice of words was somewhat deliberate here. I think that such tone reminds everyone that moderators should behave too. I hope that such approach makes mods unwilling to abuse their privileges, and regular users won't feel "dominated" (word?) by them. But if you want to we can start a PR and see what others think about it.

would be nice if the pictures (crown/shield) were the exact same than the ones showing up on CW.

I do not know how :(

I'd like to make a change, but the "+" fro review isn't showing up so... Line 50:

The [+] does not show up, because the line was not changed. I think that if you want to suggest a change for it, you need to create a PR with your modification. Or I can do this, since you wrote what you want to have changed.

'Sounds less harsh that way.

Choice of words was somewhat deliberate here. I think that such tone reminds everyone that moderators should behave too. I hope that such approach makes mods unwilling to abuse their privileges, and regular users won't feel "dominated" (word?) by them. But if you want to we can start a PR and see what others think about it.

yes, I had bet that the tone was on purpose. But don't forget that regular users read this too, and that felt a bit too  much insistent to not "undermine" somehow the weight a moderator is supposed to "have" (it's not about domination, but about consideration, imo)

yes, I had bet that the tone was on purpose. But don't forget that regular users read this too, and that felt a bit too  much insistent to not "undermine" somehow the weight a moderator is supposed to "have" (it's not about domination, but about consideration, imo)

would be nice if the pictures (crown/shield) were the exact same than the ones showing up on CW.

It should be possible after #248.

would be nice if the pictures (crown/shield) were the exact same than the ones showing up on CW.

It should be possible after #248.


Create Threat Intelligence apps

Threat Intel gives us an important insight into how the world outside our organization works - what incidents occurred etc.
Basic use-cases:

Search for IP
Search for Domain
Search for URL
Search for hash (md5, sha256...)
Add IP / domain / url / hash to have been seen (sighted MISP)
Search for CVE
Search for Threat actor
Get incidents

TI systems:

[X] MISP
[X] Passivetotal
[X] Recorded Future
[X] Secureworks
[X] Shodan
[X] Virustotal
[X] IBM xforce
[ ] OpenCTI
[ ] ATP
[x] Fireeye
[ ] Have I been pwned
[ ] IPVoid
[X] IPInfo
[ ] IPstack
[ ] Malshare
[ ] Metadefender
[ ] MxToolbox
[ ] Pipl
[ ] Phishing Initiative
[ ] ThreatConnect
[ ] ThreatMiner
[ ] URLVoid
[ ] Urlscan

More sources (OpenCTI): https://luatix.notion.site/OpenCTI-Ecosystem-868329e9fb734fca89692b2ed6087e76
Extra: Create a simple workflow that merges threat lists daily into the shuffle K:V store.

It would be pretty useful to see an app for OpenCTI in Shuffle that can be used for enrichment of data within Shuffle as well using shuffle to push data into OpenCTI. Similar to Shuffle this platform has been fast maturing and is a very easily adoptable opensource threat intelligence platform.

@cvdsouza agreed! If you or someone else that uses OpenCTI would be willing to work with us to build it out, we can set it up and prepare everything for OpenCTI very easily :)

I might be able to help with putting something to together. Let me know!

Yes please Wes! We still got some work to do with Velociraptor, and doing some at the intersection of the two would be even better

awesome. thank you both , really appreciate it.
OpenCTI has a python client that is updated to stay compliant with the platform updates that are released : https://github.com/OpenCTI-Platform/client-python
There is a Demo instance of OpenCTI that is always open to the public to test against : https://demo.opencti.io/dashboard
I also have a research instance of OpenCTI that I recently built up a couple of weeks ago, so if the demo version doesn't work, I'd be happy to share access as well.
As for use-cases, the ones that I've used with XSOAR that I think would be beneficial for Shuffle would be :

Get/Search Indicator
Get/Search Observable
Create Indicator
Update Indicator
Organization create
Organization List
Label create
Label list
External Reference create

My OpenCTI Stack using docker swarm will be available soon also.

Update: Good initial testing. There's a couple issues with GraphQL and the use of dollar signs & same URL that screw up things, so we're trying to fix that for Shuffle itself. OpenAPI wasn't meant to do this sort of stuff, so we got to bend the rules~ :+1:

Aaand edit 2: We pushed the platform fixes, and it's been deployed with a base set of actions.
Have a look here:
https://shuffler.io/apps/24555182e0063c1800d0c8e320e0892a
It's all from reversing the UI's interactions and can probably be optimized quite a bit. @weslambert - I'd love if you could take over some of this work :)


Trace Quality Metrics

When deploying a distributed tracing solution like Jaeger in large organizations, especially those whose architectures are composed of many different technologies, there are always questions about how much of the architecture is actually integrated with tracing, what is the quality of the instrumentation, are there microservices that are using stale versions of instrumentation libraries, etc.
Trace Quality engine runs analysis on all traces collected in the backend, inspects then for known completeness and quality problems, and provides summary reports to service owners with suggestions on improving the quality metrics and links to sample traces that exhibit the issues.

Have open source code?

any idea if it's on the radar for 2018? Thanks

I think this might depend on the data pipeline feature (#414).

Is it available now ? in 1.18.1?

It has been open-sourced in https://github.com/jaegertracing/jaeger-analytics-flink. However the codebase is not OSS friendly nad it might be difficult to build and deploy.
There is also a new module https://github.com/jaegertracing/jaeger-analytics-java#trace-quality-metrics. It depends only on p8s and grafana. However it's not that advanced as the original app.

@yurishkuro You can close this out I believe.

@yurishkuro You can close this out I believe.

Well, the code is not in a usable state yet. Closing means we're not going to do it imo.

Well, the code is not in a usable state yet. Closing means we're not going to do it imo.


fix code sample in the Shader class

Fix variable names in the code samples so it can be compiled with no errors

Good catch!
Thanks for the contribution!


Do not return empty paths from RectClip for multiple paths

I'm using the new RectClip functionality to check if any of my paths overlap a certain rectangle. (Previously was using generic intersection clipping for this, and now trying this hopefully much faster method.)
bool isOverlap = !RectClip(rect, paths).empty();

Noticed that this doesn't work, because empty contours can be returned (so the result has paths that are just empty, but the result vector itself isn't empty).
First started to handle this on the call site (check if any of the returned paths is non-empty), but then realized that maybe it's better to handle this on the library side, so that the code on the call site can stay as simple as above?

Thanks Juha. I've copied and expanded on your PR.


How to add the schema to the URL?

With PostgreSQL 15, we must add the following to the DB setting in django: (see this for more info)
        'OPTIONS': {
                'options': '-c search_path=myschema'
            },

I see that dj-database-url already has a way to add it  but what is the syntax?
For example, if I have postgres://USER:PASSWORD@HOST:PORT/NAME, how do I add the schema definition?
It would be nice to add this to the doc.
Thank you

Nevermind, I think I found the answer by looking at the tests.
It seems to be the with ?currentSchema=otherschema.
It might still be worth adding it to the main doc now that more people will look for it with postgresql 15.


curl test get error code:429

Description of the bug:
excute the test below:
curl -H 'Content-Type: application/json' -d '{"contents":[{"parts":[{"text":"Write a story about a magic backpack"}]}]}' -X POST https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent?key={API key}
I get this code
{
"error": {
"code": 429,
"message": "Resource has been exhausted (e.g. check quota).",
"status": "RESOURCE_EXHAUSTED"
}
}
Actual vs expected behavior:
No response
Any other information you'd like to share?
No response

Hi there! Could you try again please? There seems to have been a resource issue earlier but should be fine now. Feel free to reopen if needed.

I encountered a strange situation.
When I use the v1beta version, there is no problem; however, when using the v1 version, an error occurs with error code 429:
{
  "error": {
    "code": 429,
    "message": "Quota exceeded for quota metric 'Generate Content API requests per minute' and limit 'GenerateContent request limit per minute for a region' of service 'generativelanguage.googleapis.com' for consumer 'project_number:696498078762'.",
    "status": "RESOURCE_EXHAUSTED",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.ErrorInfo",
        "reason": "RATE_LIMIT_EXCEEDED",
        "domain": "googleapis.com",
        "metadata": {
          "quota_limit": "GenerateContentRequestsPerMinutePerProjectPerRegion",
          "consumer": "projects/696498078762",
          "quota_limit_value": "0",
          "service": "generativelanguage.googleapis.com",
          "quota_location": "us-west4",
          "quota_metric": "generativelanguage.googleapis.com/generate_content_requests"
        }
      },
      {
        "@type": "type.googleapis.com/google.rpc.Help",
        "links": [
          {
            "description": "Request a higher quota limit.",
            "url": "https://cloud.google.com/docs/quota#requesting_higher_quota"
          }
        ]
      }
    ]
  }
}

I checked the Quotas & System Limits for project "Generative Language Client" page and found that my usage did not exceed the quota limit.  In fact, the usage percentage in every region is 0%.
I don't know what's wrong with my account.

To help others facing the same issue as me, I'm documenting my solution:
I tried regenerating the API KEY and even deleting it before creating a new one, but the issue persisted.
In the end, frustrated, I deleted the Generative Language Client project and then recreated it.
Afterward, I generated a new API KEY. Finally, the problem disappeared.

Same issue here.
After a diligent search effort, I have found that the issue is that Google detects my project violates the ToS.
Go to https://console.cloud.google.com/cloud-resource-manager and check whether any project is warned.


Feature: Temperature sensor

It would be great if this app could also record temperature (with a legal disclaimer to refrain from using your phone as an oven thermometer).

Agreed it would be fun.  Our initial research indicated that it wouldn't be very useful in the ways that people anticipate: most phones with a temperature sensor are actually measuring chip temperature, and secondarily the temperature of your pocket or hand, with little relationship to ambient temperature.
Do you know of devices where this is less of an issue?


also open detail view when clicking on a dat

WIP pull request in https://github.com/datproject/dat-desktop/pull/388


update reverse vcard data for set 19 & 20

something strange happening with this PR/branch, closing and will re-do


[Android] TakePhotoAsync returns null with MobileIron

Bug Information
Version Number of Plugin: 3.0.1
Device Tested On: Samsung Galaxy S3 (Android 4.4.4), Nexus 5 (Android 7.1.2)
Simulator Tested On: n/a
Version of VS: 15.2 (26430.16)
Version of Xamarin: 25.3.1
Versions of other things you are using:

MvvmCross 4.4.0
MobileIron 7.8.0 Gen2

Steps to reproduce the Behavior

Create APK in Release mode and wrap it with MobileIron wrapper
Call IMedia.TakePhotoAsync(new StoreCameraMediaOptions())
Camera App opens
Take picture in opened Camera App and confirm

Expected Behavior

TakePhotoAsync returns the MediaFile with the taken photo

Actual Behavior

TakePhotoAsync returns null

Code snippet
// Option 1 returns null
//var opt = new StoreCameraMediaOptions
//{
//	Directory = "temp",
//	Name = "temp_photo"
//};
//var photo = await _media.TakePhotoAsync(opt);

// Option 2 also returns null
var photo = await _media.TakePhotoAsync(new StoreCameraMediaOptions());

if (photo == null)
{
	Mvx.Trace("Couldn't take photo! Result is null"); // this is visible in the logfile
	return null;
}

Comment
The Expected Behavior is observed when I use the APK without wrapping it with the MobileIron wrapper. With the wrapper the Actual Behavior is observed.
Using the PickMediaAsync method works fine in both instances.
I don't know what the reason for the different behaviors is. Both PickMediaAsync and TakePhotoAsync use
private Task<MediaFile> TakeMediaAsync(string type, string action, StoreMediaOptions options)
internally and the only way I see to return null at that point is if the event was cancelled.
Do you have any idea what could be the cause of this?

You may have to try to debug the code. Perhaps they don't allow app to app communication. I don't work with MobileIron at all so I have no insight here.

Debugging is unfortunately not possible (at least I don't know how). The APK has to be wrapped with the MobileIron wrapper before the functionality can be used and then it can't be debugged any more.
By adding lots of log output to the relevant MediaPlugin classes I at least tracked the problem down to the OnActivityResult method in MediaPickerActivity, or rather the camera app's call after taking the picture. OnActivityResult receives Result.Canceled, even after confirming the taken photo.
The reason for that seems to be that the camera app can't access the provided file path for writing. But even without the MediaPlugin, and just vanilla Android calls in Xamarin (based on https://developer.android.com/training/camera/photobasics.html), Result.Canceled is returned. I think it's a general problem.
I will keep digging.

Assumption here is that Mobile Iron doesn't allow any app to app sharing of files. In this case it is out of my hands and is the reason you are wrapping it in MI.

I found out what the problem is: the FileProvider doesn't grant the permission to write the photo.
The FileProvider documentation (https://developer.android.com/reference/android/support/v4/content/FileProvider.html#Permissions)
mentions that the GrantReadUriPermission and/or GrantWriteUriPermission flags should be set to grant the permission when getUriForFile() is used.
I'm not sure why it works in regular apps and not when it's wrapped for MobileIron but I added the following lines to the MediaImplementation.CreateMediaIntent method and with this change it works :-)
pickerIntent.AddFlags(ActivityFlags.GrantReadUriPermission); pickerIntent.AddFlags(ActivityFlags.GrantWriteUriPermission);
https://github.com/jamesmontemagno/MediaPlugin/blob/4b747cdf545719da3a264c9415d061ce1f4eac9b/src/Media.Plugin.Android/MediaImplementation.cs#L399-L400
I assume it should be differentiated between Read and Write permission based on the Pick or Take media but I haven't handled this case yet.
I will try to prepare a pull request in the next few days but because of several weddings and a holiday I'm not sure how long it will take me. It will also be my first pull request, which may factor in the delay ;-).

It does that here: https://github.com/jamesmontemagno/MediaPlugin/blob/master/src/Media.Plugin.Android/MediaPickerActivity.cs#L236

will loook a bit into it though

try: 3.0.2-beta82

3.0.2-beta82 works! 👍👍
Thank you for the quick fix.


Configuration

Implement gem configuration and defaults.

I think this covers configuration. I also hard-coded the service endpoints as constants. Take a look; give feedback!

 Configuration


Migration of pages and lists

Hello, please clearly state that migration of SharePoint lists and pages is not supported. Customers often would like to migrate within the same tenant not only documents.
The best option is to add this to a migration tool :)
Thank you
[Enter feedback here]

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

ID: 0bb5783d-8e13-a082-66dc-86a3e87e2252
Version Independent ID: 10739dac-3f2e-5403-6f0e-3d3cb4868e13
Content: Mover Microsoft 365 Migration FAQ - Migrate to Microsoft 365
Content Source: migration/mover-microsoft-365-faq.md
Service: sharepoint-online
GitHub Login: @JoanneHendrickson
Microsoft Alias: jhendr

@Jakub-Urban Thank you for submitting feedback and contributing to the docs. We are currently investigating this.

Thanks for the feedback @Jakub-Urban


Create an endpoint that receives a family request and calculates inventory to be sent

N.B. This may need additional clarification.
Summary
Partner base is going to be sending requests by indicating: "number of children" and "which item". For example "I need enough 1T Diapers for 5 children". Each Diaperbank should be able to specify how many "enough" is of a given item for each individual child. Diaperbank A may dispense 10 1T diapers per child, and Diaperbank B might dispense 15 per child.
In the example case, that request ("enough 1T diapers for 5 children") would be interpreted by Diaperbank A as "100 1T diapers total" and by Diaperbank B as "150 1T Diapers".
In the absence of an "enough" quantity, assume "1".
Diaperbanks will need the means to specify, if they wish to use this, what the "enough" amount is for each Item in their Organization.
Request schema
The Partner app will send a request that is formatted per this format:
{ "families":
  [
    "children": [
       { " }  (To be completed)
    ]
  ]
 }

Response schema
The Diaper app should respond with an object formatted like this:
{ "items":
  [
    { "item_id": "...", "partner_key": "...", "item_name": "...", "quantity": "..." },
    { ... }
  ]
}

Criteria for Completion

[ ] In the Items#edit form, add a new field for typical quantity per child (field name TBD)
[ ] Write something to calculate the final quantity (probably in the model?)
[ ] Create an API endpoint that expects the request above and returns the response above
[ ] Write tests for this endpoint

Question about the Request schema - why does that need to include both families and children?  I mean, we'll have that info on the requesting (partner) side, but does the diaper bank side care about the separation (vs just sending a flattened list of children)?

I feel like @SCDB and I could chime in here, but I'm not completely certain about the context...  @kkuchta What does it ask about families? It will definitely be important for the request schema take into account that partner agencies will be requesting incontinence items for adults too... This is a circumstance I can think of where the separation/knowledge of families specifically would be helpful, as there aren't children in some circumstances. @armahillo

@willmurphyscode and @kkuchta are developing the request/response data schema -- the one in the Issue description above is a hastily-cobbled-together schema that I made in a hurry while being rushed towards dinner. :) We've all discussed what the schema needs to be and I trust them (and @joshleichtung / @adam-barton) to develop an appropriate schema, even if it differs from what was hurled above. :) :100:

Hi everyone,
The schema we are actually implementing differs pretty significantly from what's described above.
Request:
{
    "organization_id": 3,
    "partner_id": 6,
    "requested_items": [
        {
            "item_id": 7,
            "person_count": 3
        },
        {
            "item_id": 5,
            "person_count": 3
        }
    ]
}

The idea is that the partner app knows how many people need which product, and the diaper bank can then reply indicating how many diapers of each size will actually be available.

The response will be the same, but will indicate the count of actual items (diapers) that have been requested:
{
    "organization_id": 3,
    "partner_id": 6,
    "requested_items": [
        {
            "item_id": 7,
            "count": 3
        },
        {
            "item_id": 5,
            "count": 3
        }
    ]
}


fail to find MKL

Description
could not find MKL from #17751
Error Message
-- The C compiler identification is GNU 9.2.1
-- The CXX compiler identification is GNU 9.2.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMAKE_CROSSCOMPILING FALSE
-- CMAKE_HOST_SYSTEM_PROCESSOR x86_64
-- CMAKE_SYSTEM_PROCESSOR x86_64
-- CMAKE_SYSTEM_NAME Linux
-- CMake version '3.16.5' using generator 'Unix Makefiles'
-- Could not find CCache. Consider installing CCache to speed up compilation.
-- Performing Test SUPPORT_CXX11
-- Performing Test SUPPORT_CXX11 - Success
-- Performing Test SUPPORT_CXX0X
-- Performing Test SUPPORT_CXX0X - Success
-- CMAKE_BUILD_TYPE is unset, defaulting to Release
-- MKL-DNN compat: set DNNL_BUILD_EXAMPLES to MKLDNN_BUILD_EXAMPLES with value `OFF`
-- MKL-DNN compat: set DNNL_BUILD_TESTS to MKLDNN_BUILD_TESTS with value `OFF`
-- MKL-DNN compat: set DNNL_ENABLE_JIT_PROFILING to MKLDNN_ENABLE_JIT_PROFILING with value `OFF`
-- MKL-DNN compat: set DNNL_LIBRARY_TYPE to MKLDNN_LIBRARY_TYPE with value `STATIC`
-- MKL-DNN compat: set DNNL_ARCH_OPT_FLAGS to MKLDNN_ARCH_OPT_FLAGS with value ``
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- GPU support is disabled
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.17") found components: doxygen dot
-- Found Git: /usr/bin/git (found version "2.25.1")
-- Intel(R) VTune(TM) Amplifier JIT profiling disabled
CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
  Could NOT find MKL (missing: MKL_INTEL_LP64_LIBRARY
  MKL_INTEL_THREAD_LIBRARY MKL_CORE_LIBRARY IOMP_LIBRARY)
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
  cmake/Modules/FindMKL.cmake:156 (find_package_handle_standard_args)
  cmake/ChooseBlas.cmake:49 (find_package)
  CMakeLists.txt:310 (include)

-- Configuring incomplete, errors occurred!
See also "/home/USER/Projects/archlinuxcn-repo/archlinuxcn/mxnet-git/src-mk/build/CMakeFiles/CMakeOutput.log".
See also "/home/USER/Projects/archlinuxcn-repo/archlinuxcn/mxnet-git/src-mk/build/CMakeFiles/CMakeError.log".

To Reproduce
git clone https://github.com/apache/incubator-mxnet.git
git checkout 636897718f8468be0dd5c4077258eb14c7416717 -b pkg
git submodule update --init --recursive
cd incubator-mxnet
mkdir build
cd build
cmake .. -DUSE_CUDA=0 -DUSE_MKLDNN=1 -DUSE_MKL_IF_AVAILABLE=1 -DUSE_BLAS=MKL

What have you tried to solve it?

I try commit 5cffa744859658d8192041eafcdcfcf176d27482 with no errors.

Environment
I'm using ArchLinux with gcc 9, intel-mkl. intel-mkl is installed to /opt/intel.

@wuxun-zhang could you take a look?

Sure. I will look into this issue.

cc @leezu

Actually I cannot reproduce this issue with cmake 3.16/gcc 7.
 ~/softwares/cmake_3.16/bin/cmake .. -DUSE_CUDA=0 -DUSE_MKLDNN=1 -DUSE_MKL_IF_AVAILABLE=1 -DUSE_BLAS=MKL                                             [636897718]
-- The C compiler identification is GNU 7.2.1
-- The CXX compiler identification is GNU 7.2.1
-- Check for working C compiler: /opt/rh/devtoolset-7/root/usr/bin/cc
-- Check for working C compiler: /opt/rh/devtoolset-7/root/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /opt/rh/devtoolset-7/root/usr/bin/c++
-- Check for working CXX compiler: /opt/rh/devtoolset-7/root/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMAKE_CROSSCOMPILING FALSE
-- CMAKE_HOST_SYSTEM_PROCESSOR x86_64
-- CMAKE_SYSTEM_PROCESSOR x86_64
-- CMAKE_SYSTEM_NAME Linux
-- CMake version '3.16.5' using generator 'Unix Makefiles'
-- Could not find CCache. Consider installing CCache to speed up compilation.
-- Performing Test SUPPORT_CXX11
-- Performing Test SUPPORT_CXX11 - Success
-- Performing Test SUPPORT_CXX0X
-- Performing Test SUPPORT_CXX0X - Success
-- CMAKE_BUILD_TYPE is unset, defaulting to Release
-- MKL-DNN compat: set DNNL_BUILD_EXAMPLES to MKLDNN_BUILD_EXAMPLES with value `OFF`
-- MKL-DNN compat: set DNNL_BUILD_TESTS to MKLDNN_BUILD_TESTS with value `OFF`
-- MKL-DNN compat: set DNNL_ENABLE_JIT_PROFILING to MKLDNN_ENABLE_JIT_PROFILING with value `OFF`
-- MKL-DNN compat: set DNNL_LIBRARY_TYPE to MKLDNN_LIBRARY_TYPE with value `STATIC`
-- MKL-DNN compat: set DNNL_ARCH_OPT_FLAGS to MKLDNN_ARCH_OPT_FLAGS with value ``
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- GPU support is disabled
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.5") found components: doxygen dot
-- Found Git: /home/wuxunzha/anaconda3/bin/git (found version "2.23.0")
-- Intel(R) VTune(TM) Amplifier JIT profiling disabled
-- Found MKL: /opt/intel/mkl/include
-- Found MKL (include: /opt/intel/mkl/include, lib: -Wl,--start-group;/opt/intel/mkl/lib/intel64/libmkl_intel_lp64.a;/opt/intel/mkl/lib/intel64/libmkl_intel_thread.a;/opt/intel/mkl/lib/intel64/libmkl_core.a;/opt/intel/lib/intel64/libiomp5.so;-Wl,--end-group
-- OpenCV 3.1.0 found (/home/wuxunzha/anaconda3/share/OpenCV)
--  OpenCV_LIBS=opencv_core;opencv_highgui;opencv_imgproc;opencv_imgcodecs
-- Found OpenMP_C: -fopenmp
-- Found OpenMP_CXX: -fopenmp
-- Found OpenMP: TRUE

cmake 3.16.5, gcc 9.2.1, intel-mkl 2020.0.166 are available in ArchLinux, could you try in a docker container?

@hubutui  Could you please share the directory structure of MKL and what are installed in the mkl/lib/intel64 folder?

you can found it here https://www.archlinux.org/packages/community/x86_64/intel-mkl/files/

@sl1pkn07 Thanks! Seems static libraries are not released in the package. I don't see the files below which I think are needed for the changes in PR #17751.
libmkl_core.a
libmkl_gnu_thread.a
libmkl_intel_thread.a
libmkl_intel_lp64.a
libmkl_intel_ilp64.a
libmkl_sequential.a

@TaoLv the motivation of #17751 is to prevent the situation where MKLDNN dlopens intel omp after another omp has already been opened by the dynamic linker.  Static MKL is not needed for that, so let's disable MKL_USE_STATIC_LIBS by default again.

@hubutui @sl1pkn07 Who is releasing the package for ArchLinux?

official archlinux members

Hope the package on ArchLinux can include those missing files so we can still use static linking.

normally, archlinux always avoid ship static libs if exist a shared counterpart
this case is not a exception

Then one may need to turn MKL_USE_STATIC_LIBS off explicitly in the cmake command line.

I'll consider adding the static libs as some projects using mkl seem to
expect it but I'm 70% 'no' on this as the dynamic libs fulfill the same
purpose while being more space efficient.
Make a bug report on our tracker with a good case and I'll consider it. For
now I'm not convinced.
On Tue, Mar 10, 2020, 08:42 Tao Lv<EMAIL_ADDRESS>wrote:

Then one may need to turn MKL_USE_STATIC_LIBS off explicitly in the cmake
command line.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/apache/incubator-mxnet/issues/17791?email_source=notifications&email_token=AAAANAA22DEDOLQ4YSEXTBTRGWLHFA5CNFSM4LEBOGA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOJVN6Q#issuecomment-596858618,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAANACQII36NYBEWSZZHB3RGWLHFANCNFSM4LEBOGAQ
.

Just to follow up on this, our intel-mkl package now has static libs so consider retesting/closing this.

I'm closing this issue as the target platform changed to provide static libraries of MKL. @sl1pkn07 please feel free to re-open the issue if you have more questions. Please also note that there is an open PR (#17794 ) to disable the static linking.


Fix PREMIS generation.

The order of the elements in the PREMIS being generated needs to be corrected. Additionally, some of the elements are just wrong, such as the datetime and the eventOutcome. These need to be fixed.

Accidentally referenced this instead of #7 on the PR to remove unneeded tests.


Support for AirPressure via Occupancy Sensor?

Hi -
I've noticed that mqtt thing is using this library under the covers.  For AirPressure Sensors, people are overriding the name value which seems to work (but is not great). Would you be opposed to a patch to add this as a flag? I'd love to have something versus nothing.
Example: https://github.com/naofireblade/homebridge-weather-plus#readme

feel free to make PR, I'll renew and merge it

What do you mean by “the name value”?

The value of the Name characteristic (or any characteristic) is not part of the definitions and should be set by a plugin.  I wouldn’t call this “overriding”.
The values of services and accessories are maintained from HomeKit.  They’re initialised from the accessory (i.c. the plugin) on pairing, but are no longer accessible over HAP after that.
The characteristic names are set by Eve, based on the language settings.


codeunit 5856 "TransferOrder-Post Transfer" - make RunWithCheck public

Please make the function RunWithCheck not internal but public, as I need to post "Direct Transfer" in the middle of transaction and I cannot use Codeunit.Run, as it will occur Commit .

You can always run codeunit without commit, you only need commit before Page.Run or Report.Run


insert failed gorethink: Cannot convert STRING to SEQUENCE in

I am currently using gorethink and created a custom primarykey as such
r.TableCreate("accounts", r.TableCreateOpts{PrimaryKey:"Accountid})

but when i try to insert an object as such
r.Table("accounts").Insert(MyAccountStruct{Accountid:"asdf"})

it gives me an error insert failed gorethink: Cannot convert STRING to SEQUENCE in ...
Can i not set a custom string as a primary key in gorethink? It works in the web interface for rethinkdb

Hi @thinkong,
I tried reproducing the error with the queries in the issue but it worked fine for me. The error you have posted comes directly from the database and is not returned from GoRethink, also it usually is returned when there is "syntax" error in your query. Have you got any other queries that be causing this issue?
Also here is the code I ran to attempt to reproduce your issue:
package main

import (
	r "github.com/dancannon/gorethink"
)

type MyAccountStruct struct {
	Accountid string
}

func main() {
	r.SetVerbose(true)
	s, err := r.Connect(r.ConnectOpts{
		Address: "localhost:28015",
	})
	if err != nil {
		panic(err)
	}

	err = r.DB("test").TableCreate("accounts", r.TableCreateOpts{
		PrimaryKey: "Accountid",
	}).Exec(s)
	if err != nil {
		panic(err)
	}

	err = r.DB("test").Table("accounts").Insert(MyAccountStruct{
		Accountid: "asdf",
	}).Exec(s)
	if err != nil {
		panic(err)
	}
}

I'll check on this again.  Glad to hear you have fixed your issue.


Create a demo repository for showing off shipshape results

We already have a repo for this here:
https://github.com/supertriceratops/experiments

Yu Lin has a sample for his analyzer here: http://mir.cs.illinois.edu/~yulin2/CTADetector_sample.tar.gz

Added some Go code to supertri's repor here:

Copy and paste, GitHub, how does it work?
https://github.com/supertriceratops/experiments/pull/1

Moving over to this repo: https://github.com/emsod/experiments

We should have a repository owned by "shipshape". I tried to do that with
my experiments repo... Is Collin the only one that is a member of Shipshape?
Cheers,
Caitlin
On Tue, Oct 13, 2015 at 11:21 AM, emsod<EMAIL_ADDRESS>wrote:

Moving over to this repo: https://github.com/emsod/experiments
—
Reply to this email directly or view it on GitHub
https://github.com/google/shipshape/issues/92#issuecomment-147801891.

The new demo repo is now up. https://github.com/google/shipshape-demo


Update addprintprocessor.md

According to the following twitter thread, it is possible (and is being done in the wild) to install a print processor outside the dedicated system print-processor directory:
https://twitter.com/ESETresearch/status/1506904404225630210

@tahseenbt Sorry for the delayed response. I consulted with the feature team and they have asked me to reject your change because "we are doing an explicit check to make sure the path to the print processor being added is under the print processor directory of the Spooler." They plan do some investigation on the report in the linked tweet. Thanks for raising this issue.


Many warnings when running setup.py

I get these warnings when installing the tool. Not sure if this is a known issue (or maybe not a real issue at all?):
config.status: creating config.h
make: ./version.sh: Command not found
make: ./version.sh: Command not found
package init file 'samtools/__init__.py' not found (or not a regular file)
package init file 'bcftools/__init__.py' not found (or not a regular file)
package init file 'samtools/win32/__init__.py' not found (or not a regular file)
package init file 'htslib/__init__.py' not found (or not a regular file)
package init file 'htslib/htslib/__init__.py' not found (or not a regular file)
warning: no files found matching 'KNOWN_BUGS'
warning: no files found matching 'THANKS'
no previously-included directories found matching 'tests/'
warning: no files found matching 'samtools/configure'
warning: no files found matching 'samtools/config.mk.in'
warning: no files found matching 'samtools/config.h.in'
In function ‘full_path’,
    inlined from ‘cram_write_SAM_hdr’ at htslib/cram/cram_io.c:3823:17:
htslib/cram/cram_io.c:3748:13: warning: ‘strncpy’ specified bound 4096 equals destination size [-Wstringop-truncation]
             strncpy(out, in, PATH_MAX);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~
htslib/cram/cram_io.c:3740:9: warning: ‘strncpy’ specified bound 4096 equals destination size [-Wstringop-truncation]
         strncpy(out, in, PATH_MAX);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~
samtools/bam_sort.c.pysam.c: In function ‘bam_sort_core_ext’:
samtools/bam_sort.c.pysam.c:2144:9: warning: ‘strncpy’ specified bound 2 equals destination size [-Wstringop-truncation]
         strncpy(g_sort_tag, sort_by_tag, 2);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pysam/libcutils.c: In function ‘__pyx_pw_5pysam_9libcutils_9_pysam_dispatch’:
pysam/libcutils.c:511:40: warning: ‘__pyx_v_retval’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   #define PyInt_FromLong               PyLong_FromLong
                                        ^~~~~~~~~~~~~~~
pysam/libcutils.c:5877:7: note: ‘__pyx_v_retval’ was declared here
   int __pyx_v_retval;
       ^~~~~~~~~~~~~~
pysam/libcalignmentfile.c: In function ‘__pyx_f_5pysam_17libcalignmentfile_14IteratorColumn_cnext’:
pysam/libcalignmentfile.c:29358:127: warning: passing argument 5 of ‘bam_mplp_auto’ from incompatible pointer type [-Wincompatible-pointer-types]
   __pyx_v_ret = bam_mplp_auto(__pyx_v_self->pileup_iter, (&__pyx_v_self->tid), (&__pyx_v_self->pos), (&__pyx_v_self->n_plp), (&__pyx_v_self->plp));
                                                                                ~^~~~~~~~~~~~~~~~~~~
In file included from pysam/htslib_util.h:4,
                 from pysam/libcalignmentfile.c:604:
/tmp/easy_install-vxtp94dd/pysam-0.15.3/htslib/htslib/sam.h:686:96: note: expected ‘const bam_pileup1_t **’ {aka ‘const struct <anonymous> **’} but argument is of type ‘bam_pileup1_t **’ {aka ‘struct <anonymous> **’}
     int bam_mplp_auto(bam_mplp_t iter, int *_tid, int *_pos, int *n_plp, const bam_pileup1_t **plp);
                                                                          ~~~~~~~~~~~~~~~~~~~~~~^~~

pysam/libctabix.c: In function ‘__pyx_pf_5pysam_9libctabix_9TabixFile_7contigs___get__’:
pysam/libctabix.c:8643:27: warning: assignment to ‘char **’ from incompatible pointer type ‘const char **’ [-Wincompatible-pointer-types]
         __pyx_v_sequences = tbx_seqnames(__pyx_v_self->index, (&__pyx_v_nsequences));
                           ^
In file included from pysam/libctabix.c:611:
pysam/libctabix.c: In function ‘__pyx_pf_5pysam_9libctabix_4tabix_index’:
/tmp/easy_install-vxtp94dd/pysam-0.15.3/htslib/htslib/tbx.h:41:21: warning: overflow in conversion from ‘int’ to ‘int8_t’ {aka ‘signed char’} changes value from ‘65536’ to ‘0’ [-Woverflow]
 #define TBX_UCSC    0x10000
                     ^~~~~~~
pysam/libctabix.c:13709:39: note: in expansion of macro ‘TBX_UCSC’
   __pyx_t_1 = __Pyx_PyInt_From_int8_t(TBX_UCSC); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 975, __pyx_L1_error)
                                       ^~~~~~~~
/tmp/easy_install-vxtp94dd/pysam-0.15.3/htslib/htslib/tbx.h:41:21: warning: overflow in conversion from ‘int’ to ‘int8_t’ {aka ‘signed char’} changes value from ‘65536’ to ‘0’ [-Woverflow]
 #define TBX_UCSC    0x10000
                     ^~~~~~~
pysam/libctabix.c:13741:39: note: in expansion of macro ‘TBX_UCSC’
   __pyx_t_3 = __Pyx_PyInt_From_int8_t(TBX_UCSC); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 976, __pyx_L1_error)
                                       ^~~~~~~~
/tmp/easy_install-vxtp94dd/pysam-0.15.3/htslib/htslib/tbx.h:41:21: warning: overflow in conversion from ‘int’ to ‘int8_t’ {aka ‘signed char’} changes value from ‘65536’ to ‘0’ [-Woverflow]
 #define TBX_UCSC    0x10000
                     ^~~~~~~
pysam/libctabix.c:14111:43: note: in expansion of macro ‘TBX_UCSC’
       __pyx_t_3 = __Pyx_PyInt_From_int8_t(TBX_UCSC); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1005, __pyx_L1_error)
                                           ^~~~~~~~
pysam/libcbcf.c: In function ‘__pyx_pf_5pysam_7libcbcf_13VariantHeader_12__str__’:
pysam/libcbcf.c:32790:3: warning: ‘bcf_hdr_fmt_text’ is deprecated: use bcf_hdr_format() instead [-Wdeprecated-declarations]
   __pyx_v_hstr = bcf_hdr_fmt_text(__pyx_v_self->ptr, 0, (&__pyx_v_hlen));
   ^~~~~~~~~~~~
In file included from pysam/htslib_util.h:5,
                 from pysam/libcbcf.c:603:
/tmp/easy_install-vxtp94dd/pysam-0.15.3/htslib/htslib/vcf.h:439:11: note: declared here
     char *bcf_hdr_fmt_text(const bcf_hdr_t *hdr, int is_bcf, int *len)
           ^~~~~~~~~~~~~~~~

pysam/libcvcf.c: In function ‘__pyx_pf_5pysam_7libcvcf_3VCF_32parse_data.isra.81’:
pysam/libcvcf.c:24840:16: warning: ‘__pyx_v_qual’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   __pyx_t_12 = PyFloat_FromDouble(__pyx_v_qual); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 873, __pyx_L1_error)
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# pysam: htslib configure options: --enable-libcurl
# pysam: htslib_config LDFLAGS=

If they are just warning and the install was successful I don't think it is an issue.

why leave in warnings like:
warning: no files found matching 'KNOWN_BUGS'
warning: no files found matching 'THANKS'

? But perhaps this is not coming from your scripts but is part of pysam or some other library? Please let me know if this needs to be logged in some other repo. Thanks!

These warnings are definitely coming from another library.


DeepExplainer+softmax no correlation between input and output (with reproducible code)

TLDR: I couldn't make DeepExplainer show the correlation between input and output when using a softmax, the plots are below, the code is here.
Introduction
First of all, well done and thank you for shap. I have been using it extensively for my master thesis about feature explanation in AI for medicine.
I have come across an issue I would like to share with you, maybe you have some insight about what the problem is. You can find the code which generates all the plots below here.
The packages used are:

numpy==1.18.5
matplotlib==3.2.1
tensorflow==2.2.0
shap==0.37.0

Experiment
The goal in this toy example is to use the different explainers provided by shap to compute the shapley values for a model fitted to a very simple dataset. The model takes as input two real numbers (x0,x1) and outputs (y0,y1).

(x0,x1) are generated using a normal distribution (mean = 100, std = 50).
y0=1 if x0>=100, and 0 otherwise.
y1=1 if x0<100, and 0 otherwise. Hence y1=-y0.
x1 doesn't influence y0 and y1.
So y0(x0) is a step function centered at 100.

To fit this dataset I use two simple models with the same architecture:
_________________________________________________________________
Layer (type)                 Output Shape              Param #
=================================================================
dense (Dense)                (None, 32)                96
_________________________________________________________________
dense_1 (Dense)              (None, 16)                528
_________________________________________________________________
dense_2 (Dense)              (None, 2)                 34
=================================================================
Total params: 658
Trainable params: 658
Non-trainable params: 0
_________________________________________________________________

One of them has a sigmoid activation function at the dense_2 layer, and the other one a softmax. After training, both models have an accuracy of more than 0.9.
I then use DeepExplainer, GradientExplainer and KernelExplainer to compute the shap values, and use the summary_plot for the y0 output. Below are the 6 plots.
Discussion
What we can observe is for all combinations of explainer/activation function there is a clear correlation between x0 and y0, except for the DeepExplainer with the softmax. Even after reading the papers cited in the project, I couldn't explain why that was the case.
Question
Does anyone have an explanation for why DeepExplainer doesn't show a correlation between x0 and y0 when using a softmax ?

I also had a similar problem with the SHAP values not making sense for a dense feedforward neural network (couldn't match the model output by using expected value + sum of SHAP values, which is supposed to always be true), and had to modify my model to output logits instead of directly probability scores. Then it summed correctly. This did make the interpretation of the values themselves way more difficult though.
@slundberg did you ever encounter a similar problem?

Are there any equations/papers for how Shapley is computed for softmax? They surely don't use the combinatoric formula, as that is too expensive.

Are there any equations/papers for how Shapley is computed for softmax? They surely don't use the combinatoric formula, as that is too expensive.

I don't think whether softmax is the output of the model or not changes how the SHAP values are computed. The specific way the shap values are computed are different for each method.
The doc here specifies how DeepExplainer SHAP values are computed.

This is an enhanced version of the DeepLIFT algorithm (Deep SHAP) where, similar to Kernel SHAP, we approximate the conditional expectations of SHAP values using a selection of background samples. Lundberg and Lee, NIPS 2017 showed that the per node attribution rules in DeepLIFT (Shrikumar, Greenside, and Kundaje, arXiv 2017) can be chosen to approximate Shapley values. By integrating over many backgound samples Deep estimates approximate SHAP values such that they sum up to the difference between the expected model output on the passed background samples and the current model output (f(x) - E[f(x)]).

Paper is A Unified Approach to Interpreting Model
Predictions (2017)

@rabyj Thanks. Are there any papers about closed forms of the exact Shapley value, or at least its exact approximation (as opposed to a probabilistic approach that contrasts with "background" samples)? Softmax has only O(tokens) inputs, and an exact solution might be possible.

@NightMachinery  Sorry, I'm unsure what you mean, I don't know. The paper I shared gives the exact formula used for DeepExplainer as far as I know. (Deep SHAP (DeepLIFT + Shapley values) section).
Going to tag some active committers since no one from the more active team seems to have ever taken a look at this issue, which seems to be a bit of a major problem with DeepExplainer.
@CloseChoice @connortann. Sorry if you're super busy guys but this seems kind of important. Would appreciate if anyone could assess this issue, OP is pretty good.

Thanks for bringing this back up. I would agree that this is kind of important but not sure how much time I have to dig into this since a fix is still some 10-20 hours away.
So here is how shap currently handles softmax. I haven't looked into this thoroughly but have a rough understanding what should go on theoretically but would need to work out the exact formula.
I think if a fix is important to you then there is a lot we can do before actually going to the implementation. Here would be a rough plan:

[ ] rewrite the reproducible example in pytorch and use captum's DeepLiftShap method and verify that the result is different there
[ ] if the first point shows that something is off (which I believe given the information) we would need to figure out the concrete formula we need to apply in the softmax case
[ ] in parallel to case 2 we could write a test specifically for the softmax function referred above. So we would like to be able to test only this function and check it's return values to make this issue as easily reproducible as possible.

I can take over point 2 once the first is verified.

@ydib still alive and kicking? Want to take care of this? This wouldn't be my priority since I have a paper deadline breathing down my neck.

Thanks. I meant the original Shapley formula as given in Wikipedia, which is not probabilistic at all:


Fix avatar physics capsule size mismatch

Describe your changes

Updated character controller physx entity's height to cover full body
Updated physics collider rendering to match physx

What are the steps for a QA tester to test this pull request?

See collider of npc or avatar using tilde to check it's boundary compared to mesh.
Jump onto npc or avatar's top to see land height matches it's height

Issue ticket number and link
#3601
Screenshots and/or video
See below
Checklist before requesting a review

[x] I have performed a self-review of my code
[x] I am not adding any irrelevant code or assets
[x] I am only including the changes needed to implement the change
[x] I have playtested and intentionally tried to find error cases but couldn't

Physics collider size:

Physx collide:

Issues:
1/3-Height wise, seems fine. But what about side wise, The arms aren't being catered in the capsule that makes it possible for other vrms appear merged into on another.
https://user-images.githubusercontent.com/35926530/184654149-35dccce1-3cc6-43f4-9986-38e734b464f1.mp4

2/3-The other un-equipped vrms have different capsules. Like gear , miku etc.

3/3-Some of the other vrms don't respect the capsule:

Closing in favor of Lab's PR


Unable to stream camera entity or RTSP url to Google Nest Hub

The screen gets stuck on the DashCast logo with 'Loading:url' at the bottom.

Same here

So Hub can't connect to your server. Maybe you have wrong local IP address for your Hass. Maybe you using selfsigned certificate, maybe you have a misconfigured local network.
Only you can find the cause and fix it.

You are right,


sdk-connectivity - Bug with Cache-Handling results in 401 due to logic-error

Dear SAP SDK Team,
we've updated some applications to the newest version of the SAP Cloud SDK "3.4.0" and identified issues within the destination-handling. After some time, the connections result in a http-status 401 without any sense, as they did work fine before. The code basis on the apps wasn't touched on any relevant place.
Describe the bug
After some time (I guess, after 12 hours, because that's the expiresIn value of the JWT token, fetched before via destination-service), the connections to destinations do fail, if we're using the cache = true option.
Expected behavior
If the cache flag is set to true, we do expect the cache handling for destinations is working and not valid JWTs are getting invalid / deleted from the App-Cache.
Possible Root Causes
As I was pretty sure it's not about our own logic, I did check the Release Notes and I identified some changes by @marikaner and others on the related part. Destination and Destination-Cache-Handling. So I checked the changes and did debug the boilerplate code a bit.
Found the possible root cause for this issue on file destination-from-vcap.js at method getDestinationFromServiceBinding().
Here, the destination is fetched from the cache (in our case, it is):
   const destination = (await retrieveDestinationFromCache(retrievalOptions)) ||
        (await retrieveDestinationWithoutCache(retrievalOptions));

But unfortunately, the already cached destination is saved again to the cache some lines below:
    if (options.useCache) {
        // As the grant type is clientCredential, isolation strategy is 'tenant'.
        await destination_cache_1.destinationCache.cacheRetrievedDestination((0, jwt_1.decodeOrMakeJwt)(options.jwt), destWithProxy, 'tenant');
    }

This results in a new cache entry with a expiresIn-Timestamp (set by the SDK) based on the expiresIn values of the already cached JWT. So this expiresIn value is already withdrawn and can't be used to set the "expiresIn-Timestamp" for the new cache entry.
This fits exactly to the scenario we're having right now and results in 401 http status errors, as soon as the bearer / JWT token is invalid.
Screenshots
This screenshot shows the cached bearer-token / JWT, as part of the cached-destination. It got copied and decoded at 17.08.23 09:45h UTC +2. You can see, the exp value is already in the past and this bearer-token is invalid already.

The other screenshot shows the expiresIn value of the cached destination who is used to calculate the new "expiresIn-Timestamp" for the new cache entry:

Used Versions:

node version 18.15.0
npm version 9.5.0
SAP Cloud SDK version 3.4.0

Impact / Priority
No priority for us. We will roll back to 3.1.1 for the applications we did update to 3.4.0 - But I am really sure this is a big issue for all the SDK developers ;-)
Kind Regards,
Cedric

Hi @drvup ,
Good catch :)
This is indeed a bug in the caching implementation in getDestinationFromServiceBinding method. We will fix this soon and update you.

Hi @drvup ,
We fixed the issue in the latest v3.5.0 release. Please try it out.

I'll close this ticket as it's solved.


Please add an example with one Fragment to help beginners with mvvm

Please add an example with one Fragment to help beginners (including me :) ) with mvvm

Please add an example with one Fragment to help beginners (including me :) ) with mvvm

there is a loginActivity do you still need a fragment ?

Maybe we can add a fragment example, and how fragment can communicate with it's activity.


Support for heketi 4 Release changes

Closes: #171
Closes: #172
Signed-off-by: Mohamed Ashiq Liyazudeen<EMAIL_ADDRESS>

This change is

@jarrpa @obnoxxx @humblec I have tested all the bits with Openshift and It works as expected. Please give it a try in kubectl too. I do not have a setup. kubectl is tested by @lpabon in heketi and @jarrpa for reviews, Just the changes in yaml file to be tested.

@raghavendra-talur and @ramkrsna Please review.

Also found issue #172 while testing.

Fixed #172 in the same PR.

LGTM .


convertToHtmlString() : extra NewLine Char '\n' for text after image

convertToHtmlString() function produce extra '\n' for content following an image

this merge made no line for content after image in my project.
reverting made it work perfect.


I get signed out all the time

Type: Bug
I get signed out all. the. time. I did a fresh install - deleted all things hidden away in library folders and whatnot.. still the same.. and on top of that, the new C# Dev Kit somehow logs me in with a different account using the same email.. I have only one account at microsoft, yet i see two in the settings.
But this is unrelated to the log-outs because it happened before i had to migrate to the dev kit.. (had to, because unity)
VS Code version: Code 1.81.1 (Universal) (6c3e3dba23e8fadc360aed75ce363ba185c49794, 2023-08-09T22:20:33.924Z)
OS version: Darwin arm64 22.6.0
Modes:

System Info

Item
Value

CPUs
Apple M1 Max (10 x 24)

GPU Status
2d_canvas: enabledcanvas_oop_rasterization: disabled_offdirect_rendering_display_compositor: disabled_off_okgpu_compositing: enabledmetal: disabled_offmultiple_raster_threads: enabled_onopengl: enabled_onrasterization: enabledraw_draw: disabled_off_okvideo_decode: enabledvideo_encode: enabledvulkan: disabled_offwebgl: enabledwebgl2: enabledwebgpu: enabled

Load (avg)
3, 2, 2

Memory (System)
32.00GB (0.87GB free)

Process Argv
--crash-reporter-id 5f158cb4-4820-441c-a747-d7a9b79cd830

Screen Reader
no

VM
0%

Extensions (15)

Extension
Author (truncated)
Version

github-markdown-preview
bie
0.3.0

markdown-checkbox
bie
0.4.0

markdown-preview-github-styles
bie
2.0.2

phpserver
bra
3.0.2

shaderlabformatter
lit
0.4.3

processing-vscode
Luk
2.5.1

theme-monokai-pro-vscode
mon
1.2.1

csdevkit
ms-
0.4.10

csharp
ms-
2.0.436

vscode-dotnet-runtime
ms-
1.7.2

autopep8
ms-
2023.6.0

python
ms-
2023.14.0

vscode-pylance
ms-
2023.8.50

LiveServer
rit
5.7.9

vstuc
vis
0.9.0

A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30256859
vslsvsres303:30308271
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
vscorecescf:30445987
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
pythonvs932:30410667
py29gd2263cf:30792227
vscaat:30438848
vsclangdc:30486549
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30695312
azure-dev_surveyone:30548225
vscccc:30803845
2e4cg342:30602488
f6dab269:30613381
a9j8j154:30646983
showlangstatbar:30737416
0bi6i642:30823812
03d35959:30757346
57b77579:30736110
pythonfmttext:30731395
9b8hh234:30694863
fixshowwlkth:30771522
showindicator:30805244
pythongtdpath:30769146
i26e3531:30792625
pythonnosmt12:30797651
pythonidxpt:30805730
pythonnoceb:30805159
dsvsc013:30795093
dsvsc014:30804076
diffeditorv2:30821572

Thanks for the reply, but - i had this for months - daily 10x.. and suddenly its not happening anymore! I don't know if it was the latest update yesterday, or maybe even that i clicked 'Report Issue' and that did some redirect to github.. no Idea.
But i swear it was all the time, and now not once in the last 20 hours!

Glad to hear you're unblocked! If you see this again, don't hesitate to reach back out!


chore(SetTheory/Ordinal/*): o.out.α → o.toType

It's often desirable to get a concrete type in universe Type u that's order isomorphic to o : Ordinal.{u}. The way we've done this is by using the non-documented (Quotient.out o).α. We rename this to Ordinal.toType o for discoverability, and to hide what frankly should remain an implementation detail.
This also entails renaming a bunch of theorems that made reference to out in some form.

This change reveals a lot of typein ((· < ·) : o.toType → o.toType → Prop) in the code. A future refactor will replace this by the much more convenient enumIsoToType.

Why do we even have o.toType? Why don't we just use Iio o everywhere?

Why do we even have o.toType? Why don't we just use Iio o everywhere?

There are some definitions that outright don't work without it, like Ordinal.toPGame, PGame.nim, or the future Ordinal.toZFSet. They all require an indexing type that lives within the same universe u.
That said, o.toType is certainly overused in the current library, which is something I plan to address in a future refactor as I mention in my comment about typein.


feat: Add sf create compute collaborator add command

What does this PR do?
Adds a heroku user to the the functions via cli. This enables users to use any of their compute environments
with heroku addons.
How to verify?

Pull down the PR branch
Enable the feature flag heroku sudo labs:enable allow-functions-collab --user<EMAIL_ADDRESS>Make sure that you have your scratch org, dev hub, compute environments all setup
Attach the compute environment to one of your databases locally by running this command from within the branch directory sf env compute collaborator add --heroku-user:HEROKU_USER
Check to see if you received an email like this

Try and add yourself again and see if you get this error
Collaborator <heroku-user> has already been added.
Try and add a heroku user account that doesn't exist and see if you get this error
There is no Heroku User under the username <heroku-user>.
Try and add a heroku user without the -h flag and see if you get this error
Missing required flag: -c, --heroku-user heroku-user  <heroku-user> See more help with --help

IMPORTANT NOTE
See cla fixed PR here


Update the focus outline on buttons to increase the contrast to improve accessibility

As it is now, the focus outline on buttons has very low contrast, see attached screenshot. This makes it difficult for sighted keyboard navigating users. The contrast should be increased (or opacity decreased) to improve accessibility.

Both buttons are in the focus state.

Neither of the buttons are focused.

Closing as the project is being archived. https://github.com/caendesilva/mutual-aid-app/issues/48


Add feature to specify the version of synapse-worker

What would you like to be added:
Add feature to specify the version of synapse-worker
Why is this needed:
Currently, it is:
    image: ghcr.io/serverlessworkflow/synapse-worker:latest
    imagePullPolicy: IfNotPresent

By default, the version of synapse-worker will NOT update when updating the version of synapse itself.  It will possibly cause some inconsistency.
thanks.

@Andy-Wu-2022 Closing as you can now configure that in the following ways:

Updating the appsettings.json file like so:

{
   "kubernetes":{
      "workerPod":{
         #kubernetes pod config
      }
   }
}

Using the KUBERNETES__WORKERPOD__SPEC__CONTAINERS__0__IMAGE environment variable


union_all with Repo.aggregate doesn’t bind all selected fields

Elixir version
1.14.3
Database and Version
11.19
Ecto Versions
3.9.4
Database Adapter and Versions (postgrex, myxql, etc)
0.16.5
Current behavior
I experienced the following issue while trying to aggregate sum of union
outflows =
  PaymentLeg
  |> select([p], %{wallet_guid: p.wallet_guid, amount: p.amount})

inflows =
  ReceiptLeg
  |> select([r], %{wallet_guid: r.wallet_guid, amount: r.amount})

balance =
  union_all(inflows, ^outflows)
  |> where([w], w.wallet_guid == ^wallet_guid)
  |> Repo.aggregate(:sum, :amount)

second interpolated subquery has all selected attributes while the first has only an amount when using Repo.aggregate:
** (Postgrex.Error) ERROR 42601 (syntax_error) each UNION query must have the same number of columns

         query: SELECT sum(s0."amount") FROM (SELECT st0."amount" AS "amount" FROM "transaction_receipt_legs" AS st0 WHERE (st0."wallet_guid" = $1) UNION ALL (SELECT t0."wallet_guid", t0."amount" FROM "transaction_payment_legs" AS t0)) AS s0
     code: |> Repo.aggregate(:sum, :amount)

Expected behavior
It would be convenient to have Repo.aggregate working with it to have clean code etc, I do have many transaction legs I'd like to union and avoid keeping everything in one table with statuses

outflows =
  PaymentLeg
  |> select([p], p.amount)

inflows =
  ReceiptLeg
  |> select([r], r.amount)

balance =
  union_all(outflows, ^inflows)
  |> where([w], w.wallet_guid == ^wallet_guid)
  |> Repo.aggregate(:sum, :amount)

sorry that was my bad


Flex 2968 v2 device model management c88

Can one of the admins verify this patch?

retest this please

This pull request makes the build fail.