ARM64, Nougat and NXP compatibility

This pull request adds the following features:

supports arm64 in addition to arm and thumb
supports android 7
supports newer NDK and build tools versions
supports NXP chips

Fixes #95
/cc @kleest

Hi,
so what I currently observe on BCM as well as on NXP is the following:

go to clone mode
Enabable clone mode
=> Scanning a card works
Disable clone mode
Enable clone mode
=> Scanning a card does not work anymore
Disable clone mode
Enable clone mode
=> Scanning works again!

I'm using the current dev branch from https://github.com/roussosalex/nfcgate, this already includes the aformentioned workaround AFAIK.
Here are the logs for the important steps (enabling clone mode alone does nothing)

after scanning a card

05-06 18:38:25.180 32392 32508 D ADBI    : HOOKNFC senddata() offset: 4, len: 5
05-06 18:38:25.180 32392 32508 I NATIVENFC: HOOKNFC data: 90 60 00 00 00 00 14 00 d0 07 32 00 00 00 00 00
05-06 18:38:25.201 32392 32508 D ADBI    : HOOKNFC deactivate(), we got 1
05-06 18:38:25.224 32392 32508 D ADBI    : HOOKNFC senddata() offset: 4, len: 13
05-06 18:38:25.224 32392 32508 I NATIVENFC: HOOKNFC data: 00 a4 04 00 07 d2 76 00 00 85 01 01 00 00 00 00
05-06 18:38:25.232 32392 32508 D ADBI    : HOOKNFC senddata() offset: 4, len: 12
05-06 18:38:25.232 32392 32508 I NATIVENFC: HOOKNFC data: 00 a4 04 00 07 d2 76 00 00 85 01 00 01 00 1a 05
05-06 18:38:25.239 32392 32508 D ADBI    : HOOKNFC senddata() offset: 4, len: 7
05-06 18:38:25.239 32392 32508 I NATIVENFC: HOOKNFC data: 00 a4 00 00 02 e1 03 06 03 01 00 01 00 00 00 00
05-06 18:38:25.245 32392 32508 D ADBI    : HOOKNFC deactivate(), we got 1
05-06 18:38:25.266 32392 32508 D ADBI    : HOOKNFC deactivate(), we got 1
05-06 18:38:25.298 32392 32511 D HOOKNFC : Command: UPLOAD
05-06 18:38:25.301 32392 32511 D HOOKNFC : Command: ENABLE
05-06 18:38:25.301 32392 32511 D ADBI    : HOOKNFC deactivate(), we got 0
05-06 18:38:25.301 32392 32511 D ADBI    : HOOKNFC: nci_NfcSetConfig() ENTER
05-06 18:38:25.301 32392 32511 D ADBI    : HOOKNFC: nci_NfcSetConfig() LEAVE
05-06 18:38:25.301 32392 32511 D ADBI    : HOOKNFC deactivate(), we got 3
05-06 18:38:25.303 32392 32511 D HOOKNFC : Command: DISABLE_POLLING
05-06 18:38:25.303 32392 32511 D ADBI    : HOOKNFC disable polling
05-06 18:38:25.303 32392 32511 D ADBI    : HOOKNFC hook_NfaStopRfDiscovery()
05-06 18:38:25.303 32392 32508 D ADBI    : HOOKNFC deactivate(), we got 0
05-06 18:38:25.313 32392 32511 D ADBI    : HOOKNFC hook_nfa_disable_polling()
05-06 18:38:25.323 32392 32511 D ADBI    : HOOKNFC hook_NfaStartRfDiscovery()

05-06 18:38:55.493 32392 32511 D HOOKNFC : Command: ENABLE_POLLING
05-06 18:38:55.493 32392 32511 D ADBI    : HOOKNFC enablePolling()
05-06 18:38:55.493 32392 32511 D ADBI    : HOOKNFC hook_NfaStopRfDiscovery()
05-06 18:38:55.493 32392 32508 D ADBI    : HOOKNFC deactivate(), we got 0
05-06 18:38:55.503 32392 32511 D ADBI    : HOOKNFC hook_NfaEnablePolling() 0xff
05-06 18:38:55.513 32392 32511 D ADBI    : HOOKNFC hook_NfaStartRfDiscovery()

=> no output

05-06 18:39:32.921 32392 32511 D HOOKNFC : Command: ENABLE_POLLING
05-06 18:39:32.921 32392 32511 D ADBI    : HOOKNFC enablePolling()
05-06 18:39:32.921 32392 32511 D ADBI    : HOOKNFC hook_NfaStopRfDiscovery()
05-06 18:39:32.931 32392 32511 D ADBI    : HOOKNFC hook_NfaEnablePolling() 0xff
05-06 18:39:32.942 32392 32511 D ADBI    : HOOKNFC hook_NfaStartRfDiscovery()

after scanning:

05-06 18:40:17.319 32392 32508 D ADBI    : HOOKNFC senddata() offset: 4, len: 5
05-06 18:40:17.319 32392 32508 I NATIVENFC: HOOKNFC data: 90 60 00 00 00 00 00 00 00 00 00 00 00 00 00 00
05-06 18:40:17.340 32392 32508 D ADBI    : HOOKNFC deactivate(), we got 1
05-06 18:40:17.368 32392 32508 D ADBI    : HOOKNFC senddata() offset: 4, len: 13
05-06 18:40:17.368 32392 32508 I NATIVENFC: HOOKNFC data: 00 a4 04 00 07 d2 76 00 00 85 01 01 00 00 00 00
05-06 18:40:17.376 32392 32508 D ADBI    : HOOKNFC senddata() offset: 4, len: 12
05-06 18:40:17.376 32392 32508 I NATIVENFC: HOOKNFC data: 00 a4 04 00 07 d2 76 00 00 85 01 00 01 00 1a 05
05-06 18:40:17.383 32392 32508 D ADBI    : HOOKNFC senddata() offset: 4, len: 7
05-06 18:40:17.383 32392 32508 I NATIVENFC: HOOKNFC data: 00 a4 00 00 02 e1 03 06 03 01 00 01 00 ff 01 0c
05-06 18:40:17.389 32392 32508 D ADBI    : HOOKNFC deactivate(), we got 1
05-06 18:40:17.409 32392 32508 D ADBI    : HOOKNFC deactivate(), we got 1
05-06 18:40:17.437 32392 32511 D HOOKNFC : Command: UPLOAD
05-06 18:40:17.440 32392 32511 D HOOKNFC : Command: ENABLE
05-06 18:40:17.440 32392 32511 D ADBI    : HOOKNFC deactivate(), we got 0
05-06 18:40:17.440 32392 32511 D ADBI    : HOOKNFC: nci_NfcSetConfig() ENTER
05-06 18:40:17.440 32392 32511 D ADBI    : HOOKNFC: nci_NfcSetConfig() LEAVE
05-06 18:40:17.440 32392 32511 D ADBI    : HOOKNFC deactivate(), we got 3
05-06 18:40:17.441 32392 32511 D HOOKNFC : Command: DISABLE_POLLING
05-06 18:40:17.441 32392 32511 D ADBI    : HOOKNFC disable polling
05-06 18:40:17.441 32392 32511 D ADBI    : HOOKNFC hook_NfaStopRfDiscovery()
05-06 18:40:17.441 32392 32508 D ADBI    : HOOKNFC deactivate(), we got 0
05-06 18:40:17.452 32392 32511 D ADBI    : HOOKNFC hook_nfa_disable_polling()
05-06 18:40:17.462 32392 32511 D ADBI    : HOOKNFC hook_NfaStartRfDiscovery()

The only thing I noticed is that something (not our code) calls the deactivate() function every time I disable the clone mode and it does not work after reenabling it:
HOOKNFC deactivate(), we got 0

It would be really cool if we can solve this problem ;-)

We were able to reproduce and fix the issue on the Nexus 5 running Android 6.0.1, but could not reproduce it on any Nexus 5X, neither on Android 7.1.2 nor on Android 8.0.0.
It was caused by polling being enabled multiple times in a row without it ever being disabled. This was due to the "Clone Mode" slider incorrectly enabling polling every time clone mode was switched off.
Btw, deactivate was called by nfa_dm_act_stop_rf_discovery, only if the polling was already enabled (e.g. due to ENABLE_POLLING being sent multiple times).

After building this source code and install in those pn544 chip phone, they never crash any more. But appear another problem: those HCE-Phone can no longer be read by the reader, it means they cann't be detected NFC signal by reader. However, when I use https://github.com/roussosalex/nfcgate (last update) building apk as HCE-Phone and building https://github.com/roussosalex/nfcgate (Before the last update) as the other phone, HCE-Phone still going to flash back(crash) when I put the traffic card reader near the card. It means the bug maybe present to read card mode. I hope I can understand the whole project. But it was a little hard for me due to my major isn't Software Engineering rather than Electronic Information Engineering. But I'm really interested in this project, and I'll keep watching.

I just realized, we forgot to push server and protocol updates to GitHub. Without these, relay mode cannot work.
The referenced pull requests contain the missing updates.

Actually, I don't know much about it. It looks like another server.py. I'm so sorry didn't follow your meaning,

The MitM script proposed by @UweM will not work with the new server.py unfortunately.

As my practice, new server.py still appear bug went transfer message between two nfcgate phone. This week, I hope I can find the error code and fix it.

This is logcat about com.android.nfc after restarting system to activate nfcgate when successfully install nfcgate:
06-04 20:56:16.421 7687-7687/? A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x30 in tid 7687 (com.android.nfc)
06-04 20:56:16.485 7707-7707/?  A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x30
        r0 bec44540  r1 00000000  r2 00000000  r3 9dd54c1a
        r4 bec44540  r5 9b568848  r6 00000002  r7 b6564008
        r8 00000000  r9 00000000  sl bec44540  fp bec44628
        ip 9b58fcac  sp bec44530  lr b6526ba3  pc b652652a  cpsr 400f0030
06-04 20:56:16.498 7707-7707/? A/DEBUG: backtrace:
        #00 pc 0004952a  /system/lib/libc.so (_ZN14ScopedFileLockC2EP7__sFILE+5)
        #01 pc 00049b9f  /system/lib/libc.so (_Z10__fseeko64P7__sFILExii+30)
        #02 pc 00049c71  /system/lib/libc.so (fseeko+12)
        #03 pc 0000adb8  /data/app/tud.seemuh.nfcgate-1/lib/arm/libnfcgate.so (_ZN11SymbolTableC2EPKc+364)
        #04 pc 0000a904  /data/app/tud.seemuh.nfcgate-1/lib/arm/libnfcgate.so (_ZN11SymbolTable6createEPKc+48)
        #05 pc 0000a8ac  /data/app/tud.seemuh.nfcgate-1/lib/arm/libnfcgate.so
        #06 pc 00006c81  /system/bin/linker (__dl__ZN6soinfo13call_functionEPKcPFvvE+84)
        #07 pc 00006ba1  /system/bin/linker (__dl__ZN6soinfo10call_arrayEPKcPPFvvEjb+184)
        #08 pc 0000588b  /system/bin/linker (__dl__ZN6soinfo17call_constructorsEv+218)
        #09 pc 000055d7  /system/bin/linker (__dl__Z9do_dlopenPKciPK17android_dlextinfoPv+1326)
        #10 pc 000033c9  /system/bin/linker (__dl__ZL10dlopen_extPKciPK17android_dlextinfoPv+28)
        #11 pc 0000328f  /system/lib/libnativeloader.so (_ZN7android17OpenNativeLibraryEP7_JNIEnviPKcP8_jobjectP8_jstring+94)
        #12 pc 0023bd1b  /system/lib/libart.so (_ZN3art9JavaVMExt17LoadNativeLibraryEP7_JNIEnvRKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEP8_jobjectP8_jstringPS9_+818)
        #13 pc 0000315f  /system/lib/libopenjdkjvm.so (JVM_NativeLoad+178)
        #14 pc 73440c45  /data/dalvik-cache/arm/system<EMAIL_ADDRESS>(offset 0x2801000)

Now, I have third bug. Nfcgate will crash when I open LOGGING in nfcgate.
6-05 01:48:56.363 2916-2916/tud.seemuh.nfcgate E/AndroidRuntime: FATAL EXCEPTION: main
    Process: tud.seemuh.nfcgate, PID: 2916
    java.lang.NullPointerException: Attempt to get length of null array
        at tud.seemuh.nfcgate.nfc.config.ConfigBuilder.parse(ConfigBuilder.java:35)
        at tud.seemuh.nfcgate.nfc.config.ConfigBuilder.<init>(ConfigBuilder.java:12)
        at tud.seemuh.nfcgate.gui.fragments.LoggingDetailFragment$AsyncDetailLoader.onPostExecute(LoggingDetailFragment.java:312)
        at tud.seemuh.nfcgate.gui.fragments.LoggingDetailFragment$AsyncDetailLoader.onPostExecute(LoggingDetailFragment.java:241)
        at android.os.AsyncTask.finish(AsyncTask.java:636)
        at android.os.AsyncTask.access$500(AsyncTask.java:177)
        at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:653)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:135)
        at android.app.ActivityThread.main(ActivityThread.java:5291)
        at java.lang.reflect.Method.invoke(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:372)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
        at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:107)

:)  It's funny.

Your first bug seems to be a lifetime issue and should be resolved by a soft reboot of the device.
The second bug is due to missing /system/lib/libnfc-nci.so. Is the path to libnfc-nci maybe different?
The third bug could be due to old logging data from previous NFCGate version. Could you try to clear the app data and see if it helps?

0x01 First Bug
It still appear when I activate NFCgate in XposedInstaller, even thogh I have soft reboot my phone. I think it maybe come from Second Bug.
06-05 04:28:11.831 5141-5141/tud.seemuh.nfcgate E/NFC: NFC service dead - attempting to recover
    android.os.DeadObjectException
        at android.os.BinderProxy.transactNative(Native Method)
        at android.os.BinderProxy.transact(Binder.java:496)
        at android.nfc.INfcAdapter$Stub$Proxy.getState(INfcAdapter.java:340)
        at android.nfc.NfcAdapter.isEnabled(NfcAdapter.java:627)
        at tud.seemuh.nfcgate.gui.MainActivity.onCreate(MainActivity.java:82)
        at android.app.Activity.performCreate(Activity.java:5990)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2310)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2419)
        at android.app.ActivityThread.access$900(ActivityThread.java:154)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:135)
        at android.app.ActivityThread.main(ActivityThread.java:5291)
        at java.lang.reflect.Method.invoke(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:372)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
        at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:107)
06-05 04:28:12.010 5141-5141/tud.seemuh.nfcgate E/NFC: could not retrieve NFC tag service during service recovery
06-05 04:28:12.108 5141-5141/tud.seemuh.nfcgate E/NFC: NFC service dead - attempting to recover
    android.os.DeadObjectException
        at android.os.BinderProxy.transactNative(Native Method)
        at android.os.BinderProxy.transact(Binder.java:496)
        at android.nfc.INfcAdapter$Stub$Proxy.getState(INfcAdapter.java:340)
        at android.nfc.NfcAdapter.isEnabled(NfcAdapter.java:627)
        at tud.seemuh.nfcgate.gui.MainActivity.onResume(MainActivity.java:131)
        at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1257)
        at android.app.Activity.performResume(Activity.java:6076)
        at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3007)
        at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3049)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2424)
        at android.app.ActivityThread.access$900(ActivityThread.java:154)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:135)
        at android.app.ActivityThread.main(ActivityThread.java:5291)
        at java.lang.reflect.Method.invoke(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:372)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
        at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:107)
    could not retrieve NFC service during service recovery
06-05 04:28:12.109 5141-5141/tud.seemuh.nfcgate E/NFC: NFC service dead - attempting to recover
    android.os.DeadObjectException
        at android.os.BinderProxy.transactNative(Native Method)
        at android.os.BinderProxy.transact(Binder.java:496)
        at android.nfc.INfcAdapter$Stub$Proxy.setReaderMode(INfcAdapter.java:575)
        at android.nfc.NfcActivityManager.setReaderMode(NfcActivityManager.java:243)
        at android.nfc.NfcActivityManager.disableReaderMode(NfcActivityManager.java:235)
        at android.nfc.NfcAdapter.disableReaderMode(NfcAdapter.java:1298)
        at tud.seemuh.nfcgate.gui.MainActivity.onResume(MainActivity.java:147)
        at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1257)
        at android.app.Activity.performResume(Activity.java:6076)
        at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3007)
        at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3049)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2424)
        at android.app.ActivityThread.access$900(ActivityThread.java:154)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:135)
        at android.app.ActivityThread.main(ActivityThread.java:5291)
        at java.lang.reflect.Method.invoke(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:372)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
        at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:107)
06-05 04:28:12.110 5141-5141/tud.seemuh.nfcgate E/NFC: could not retrieve NFC service during service recovery

0x02 Second Bug
I try ls /system/lib. As you say, there haven't libnfc-nci.so. There have three files about nfc -- libnfc_jni.so, libnfc_ndef.so, libnfc.so. I think libnfc.so maybe replace libnfc-nci.so. Therefore, I push libnfc-nci.so into /system/lib/ and reboot system. However, the error logcat the same as First bug. I couldn't open NFC. NFC button in setting is dead.

0x03 Third Bug
I'm sure I have clear the app data. It still appear this bug when I open LOGGING tag in nfcgate.

Regarding 0x01 and 0x02:
According to a reddit post, LineageOS 14.1 on the HTC One M8 does not support HCE. Only stock firmware supports HCE on that phone.
I have pushed a commit addressing this issue. Good news: It does not crash anymore. Bad news: It does not work either.
BUT NFCGate should work if you use the stock vendor firmware from HTC on the HTC One M8.

After fixing LOGGING bug, the software work well. Good job! Thanks for you uncomment the code in SessionLoggingSink.java~ For 0x01&0x02 System NFC Bug, it can use after activating nfcgate in Xposed installer and soft reboot. However, HCE Phone(HTC One M8, as you say, I use stock vendor firmware.) cann't detect reader anymore.

Have you guys fix it?
I'm working on Nexus 5x Android 6.0.1 with xposed89 and every time that i approach to the reader it's open Google Pay.
Also i built from yours repository and get crashed every time

If Google Pay is set as the primary payment provider, Android will always prefer it over NFCGate. You could try to either disable Google Pay or set NFCGate as the payment provider (if that is even possible).
Android 7 will only work with the NFCGate version in this pull request.
Which version did you build?

You should be able to select NFCGate as a payment provider now in Settings -> Tap & Pay. This should prevent Android from using Google Pay.

Or you can search my blog: https://www.killshadow.xyz/2018/09/09/NFC开发笔记/ . However, you should use google translate. I have add many function for nfcgate.

The v2 branch supersedes this pull request.


JavaScript heap out of memory using tsx with node v20.0.0

Bug description
Hi guys, I have noticed a strange issue where javascript runs out of memory. I noticed it started happening in my CLI script when I switched to TSX. I can confirm this is TSX as this happens if I just run tsx to get the REPL and wait about 10-15 seconds.
Stack trace if that helps at all:
<--- Last few GCs --->

[99980:0x7f23e43a11f0]       16 ms: Scavenge 4.8 (6.1) -> 4.4 (6.6) MB, 0.27 / 0.00 ms  (average mu = 1.000, current mu = 1.000) allocation failure;
[99980:0x7f23e43a11f0]       26 ms: Scavenge 5.9 (7.1) -> 5.6 (9.8) MB, 0.40 / 0.00 ms  (average mu = 1.000, current mu = 1.000) allocation failure;
[99980:0x7f23e43a11f0]       46 ms: Scavenge 9.3 (11.6) -> 8.4 (11.6) MB, 0.99 / 0.00 ms  (average mu = 1.000, current mu = 1.000) allocation failure;

<--- JS stacktrace --->

FATAL ERROR: NewSpace::EnsureCurrentCapacity Allocation failed - JavaScript heap out of memory

<--- Last few GCs --->

[99980:0x7f23e0527fe0]        9 ms: Scavenge 3.7 (5.1) -> 3.1 (5.3) MB, 0.22 / 0.00 ms  (average mu = 1.000, current mu = 1.000) allocation failure;
[99980:0x7f23e0527fe0]       14 ms: Scavenge 4.8 (6.1) -> 4.4 (6.6) MB, 0.31 / 0.00 ms  (average mu = 1.000, current mu = 1.000) allocation failure;

<--- JS stacktrace --->

FATAL ERROR: NewSpace::EnsureCurrentCapacity Allocation failed - JavaScript heap out of memory
 1: 0xc7d530 node::Abort() [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
 2: 0xb638e8  [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
 1: 0xc7d530 node::Abort() [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
 3: 0xe8ee70 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
 2: 0xb638e8  [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
 4: 0xe8f157 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
 3: 0xe8ee70 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
 5: 0x10a07c5  [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
 4: 0xe8f157 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
 6: 0x10dfad9  [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
 5: 0x10a07c5  [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
 7: 0x10b2916 v8::internal::Heap::MarkCompact() [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
 6: 0x10dfad9  [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
 8: 0x10b7f6d v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::internal::GarbageCollectionReason, char const*) [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
 7: 0x10b2916 v8::internal::Heap::MarkCompact() [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
 9: 0x10b845c v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
 8: 0x10b7f6d v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::internal::GarbageCollectionReason, char const*) [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
10: 0x10b8ff7 v8::internal::Heap::CollectGarbageForBackground(v8::internal::LocalHeap*) [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
 9: 0x10b845c v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
11: 0x106c19c v8::internal::Factory::AllocateRaw(int, v8::internal::AllocationType, v8::internal::AllocationAlignment) [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
10: 0x108e761 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
12: 0x105da34 v8::internal::FactoryBase<v8::internal::Factory>::AllocateRawWithImmortalMap(int, v8::internal::AllocationType, v8::internal::Map, v8::internal::AllocationAlignment) [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
11: 0x108f8f5 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
13: 0x105fd35 v8::internal::FactoryBase<v8::internal::Factory>::AllocateRawOneByteInternalizedString(int, unsigned int) [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
12: 0x150159a v8::internal::Heap::AllocateRawOrFail(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
14: 0x105fde2 v8::internal::FactoryBase<v8::internal::Factory>::NewOneByteInternalizedString(v8::base::Vector<unsigned char const> const&, unsigned int) [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
13: 0x1502862 v8::internal::Deserializer<v8::internal::Isolate>::Allocate(v8::internal::AllocationType, int, v8::internal::AllocationAlignment) [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
15: 0x13a5b60 v8::internal::Handle<v8::internal::String> v8::internal::StringTable::LookupKey<v8::internal::SequentialStringKey<unsigned char>, v8::internal::Isolate>(v8::internal::Isolate*, v8::internal::SequentialStringKey<unsigned char>*) [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
14: 0x1505e39 v8::internal::Deserializer<v8::internal::Isolate>::ReadObject(v8::internal::SnapshotSpace) [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
16: 0xec18ec void v8::internal::AstRawString::Internalize<v8::internal::Isolate>(v8::internal::Isolate*) [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
15: 0x1504adb int v8::internal::Deserializer<v8::internal::Isolate>::ReadSingleBytecodeData<v8::internal::SlotAccessorForHeapObject>(unsigned char, v8::internal::SlotAccessorForHeapObject) [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
17: 0xec20de void v8::internal::AstValueFactory::Internalize<v8::internal::Isolate>(v8::internal::Isolate*) [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
16: 0x1505c11 v8::internal::Deserializer<v8::internal::Isolate>::ReadData(v8::internal::Handle<v8::internal::HeapObject>, int, int) [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
18: 0x13d1066 void v8::internal::Parser::PostProcessParseResult<v8::internal::Isolate>(v8::internal::Isolate*, v8::internal::ParseInfo*, v8::internal::FunctionLiteral*) [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
17: 0x1505ed8 v8::internal::Deserializer<v8::internal::Isolate>::ReadObject(v8::internal::SnapshotSpace) [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
19: 0x13fa19e v8::internal::Parser::ParseFunction(v8::internal::Isolate*, v8::internal::ParseInfo*, v8::internal::Handle<v8::internal::SharedFunctionInfo>) [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
18: 0x1504adb int v8::internal::Deserializer<v8::internal::Isolate>::ReadSingleBytecodeData<v8::internal::SlotAccessorForHeapObject>(unsigned char, v8::internal::SlotAccessorForHeapObject) [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
20: 0x14004d1 v8::internal::parsing::ParseFunction(v8::internal::ParseInfo*, v8::internal::Handle<v8::internal::SharedFunctionInfo>, v8::internal::Isolate*, v8::internal::parsing::ReportStatisticsMode) [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
19: 0x1505c11 v8::internal::Deserializer<v8::internal::Isolate>::ReadData(v8::internal::Handle<v8::internal::HeapObject>, int, int) [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
21: 0xf5aefc v8::internal::Compiler::Compile(v8::internal::Isolate*, v8::internal::Handle<v8::internal::SharedFunctionInfo>, v8::internal::Compiler::ClearExceptionFlag, v8::internal::IsCompiledScope*, v8::internal::CreateSourcePositions) [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
20: 0x1505ed8 v8::internal::Deserializer<v8::internal::Isolate>::ReadObject(v8::internal::SnapshotSpace) [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
22: 0xf5b70e v8::internal::Compiler::Compile(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Compiler::ClearExceptionFlag, v8::internal::IsCompiledScope*) [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
21: 0x1504adb int v8::internal::Deserializer<v8::internal::Isolate>::ReadSingleBytecodeData<v8::internal::SlotAccessorForHeapObject>(unsigned char, v8::internal::SlotAccessorForHeapObject) [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
23: 0x14bdb7a v8::internal::Runtime_CompileLazy(int, unsigned long*, v8::internal::Isolate*) [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
22: 0x1505c11 v8::internal::Deserializer<v8::internal::Isolate>::ReadData(v8::internal::Handle<v8::internal::HeapObject>, int, int) [/home/leon/.nvm/versions/node/v20.0.0/bin/node]
24: 0x18ffef6  [/home/leon/.nvm/versions/node/v20.0.0/bin/node]

Reproduction

Run tsx to get the REPL or on a file that stays open (e.g. with a timeout/promise)

Environment
- Node version 20.0.0
- Linux machine, for reference I am getting this on `Linux Mint 21 x86_64` with the `6.0.9-060009-generic` kernel.

  System:
    OS: Linux 6.0 Linux Mint 21 (Vanessa)
    CPU: (16) x64 AMD Ryzen 7 7700X 8-Core Processor
    Memory: 24.44 GB / 30.51 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 20.0.0 - ~/.nvm/versions/node/v20.0.0/bin/node
    npm: 9.6.5 - ~/.nvm/versions/node/v20.0.0/bin/npm

Can you work on a fix?

[ ] I’m interested in opening a pull request to address this issue.

maybe https://github.com/nodejs/node/issues/47566

maybe nodejs/node#47566

I think you may be right. I just tried 20.1.0 and I'm not getting this anymore at all!

Closing as a duplicate of https://github.com/esbuild-kit/tsx/issues/229


added theming options for resultDetails and searchBase

Add more theme props for resultDetails and searchBase.

Coverage increased (+0.09%) to 73.702% when pulling 4b1ba55c8beabd494eba0b4c249eafe87e5983d0 on feature/more-theme-props into 7ea72f844523785d7a3f6dcd258aa07333a020d8 on develop.


bump semver version

Thanks to @raphlinus , semver-parser no longer depends on regex. The code is (probably, I haven't technically tested it but it's hard to imagine it's not) faster, smaller, and has zero dependencies, as well as better errors.
This new version of semver only updates the dependencies involved, no interface changes, so it should be a drop-in replacement.

r? @alexcrichton
(rust_highfive has picked a reviewer for you, use r? to override)

:pushpin: Commit 090d48b has been approved by alexcrichton

@bors: r+
Nice!

:hourglass: Testing commit 090d48b with merge 8dd95e8...

:sunny: Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing 8dd95e8682fe833bac70362cd0eb82de70bd8e73 to master...


Mean between two values a and b

Is it possible to calculate the mean of a distribution in a given range [a,b]?
E.g., for a given distribution f(x):
\int_a^b f(x) * x

Unfortunately it's not possible at the moment. One needs to evaluate integral to do that and we don't have means to do so in this library


Update README.md

Make setup a little bit easier

The second line looks good. I'd like to keep the first line with the template, because the repo is not solely hosted on GitHub. Changing it to git clone <repo> would be better I think.
After you make the change it looks fine to merge.
Thanks!

Updated 👍

merged in 319b8c43ad895be6c3c47ce7f49f54b235fd9d6c


Initial stab at solving #181 - see notes in PR

Okay, this is my first attempt at solving #181 - there is some discussion to be had.
The good news is that it seems no modifications are necessary for the client! ip can be supplied in getAnnounceOpts and the client will send it. Phew!
This PR contains modifications to the server to support this field successfully. It adds a new cmd option, --trust-ip to correspond to the already existing --trust-proxy.
The first question is: when should we force IPv4? See here: https://github.com/feross/bittorrent-tracker/blob/master/lib/server/parse-http.js#L36
Should we only force IPv4 if trust proxy is turned off? I don't understand the original reasoning, so it's hard to update it accordingly.
The second question is: What should we do about the compact format? I think that this is currently non-BEP compliant: https://github.com/feross/bittorrent-tracker/blob/master/server.js#L635 because of BEP23, which (I think) says we can represent non-IP (hostname) IPs as encoded strings in compact format, which this regular expression will currently filter out so these peers are never returned. So, we'll need a regular expression that will return ipv4s-or-valid-hostnames, but I'd like to defer to the wizards on that one.
Still, I think that this PR will work for supplied IPs that return properly when compact=0, and updates both the server and client documentation accordingly. We just need to discuss when to force IPv4 and how to return hostname peers in the compact format.

Thank you for your contribution @Miserlou !
First of all, IPv4 is not forced but we are using IPv4 when we have an IPv4-Mapped address on IPv6. For example, if we have a peer with an IP ::ffff:<IP_ADDRESS>, we are registering it under <IP_ADDRESS> to make it compatible with the IPv4 only peers.
Let me rewrite it for you, I agree it is not really readable:
// Proxy case
if (opts.trustProxy && req.headers['x-forwarded-for'] ) {
  params.ip = req.headers['x-forwarded-for']
} else {
  params.ip = req.connection.remoteAddress
    // Remove IPv4-Mapped address prefix from IPv6 address if present
    .replace(common.REMOVE_IPV4_MAPPED_IPV6_RE, '')
}

I suggest you rewrite this along with your option to make it more readable.
Then your remark regarding the compact format. I believe we are not supporting hostnames at all and some of the code has to be updated to handle it. Maybe we can file an issue for this...
I will review your PR in details ASAP but if I can suggest one improvement, could you make a test case ensuring the custom ip is present in the swarm after announcing?

Okay, I refactored the code as you suggested (hopefully I wasn't too verbose in the commenting, but it's certainly much more grokkable now) and added a specific test function for confirming a custom ip value in and out. The compact formatting problem still isn't solved.

Is there anything that I can do to speed up having this merged?
I need this and #157 merged for a project I'm working on, and I'd really like to be able to use the officially maintained v8.1 rather than my own branches!

I would like to have some thoughts from the other collaborators regarding the compact format. I dont really know how we can handle this, maybe we should retrieves the domains for both ipv6 and ipv4 peers.
In my opinion, we should drop the regexps and we should add a ipfamily property to the data structure to be able to select the family for both ips and domains.
What do you think @Miserlou ? Any chance @feross and @DiegoRBaquero can have a look at this?

I suppose that's fine, I just don't want it to fall through the cracks since I'm using this for a project I'm actively developing! Similarly, #157 has been stalled since September, I think it'd just take Feross or Diego half an hour to look through this stuff so we can keep moving forward.

Bump.

Every peer needs to be announcing at least every 15 minutes, the seedbox must do it, one time announce from CI is not enough. If it's about using hostname, still, it must be announced every 15 minutes to not get removed. I like the overall PR. As it's optional LGTM.


Fix error message in topicUUID check for stagef3

This pull request fixes an error message in the topicUUID check for stagef3. Previously, the error message incorrectly stated that the expected topic UUID should be empty, but it should actually match the UUID from the request. This PR updates the error message to reflect the correct expectation.

Thanks @rahul1990gupta for highlighting the issue! [Forum #1866]


Add support for parsing object spread operator in SBG's jsparser

Currently, the jsparser in the SBG does not support parsing the object spread operator:
var options = {
  priority: 0,
  ...options
};

This issue may result in a runtime crash of a NS app as the SBG would not generate some or most of the needed Java mirror classes.
Bug is due to improper babel parser usage.

https://github.com/NativeScript/NativeScript/issues/7205


ci: no longer suppported v1.25 in GKE

K8S version 1.25 is no longer supported in the GKE Regular channel

/ci-gke

/test-backport-1.14

hmm, clustermesh downgrade failed because image building on v1.13 was cancelled, I've retriggered image build on v1.13:
https://github.com/cilium/cilium/actions/runs/8829043080


Cleanup of emocam & metadata entry

Cleanup of emocam & metadata entry
Removed some of the external dependencies. but not all (cause it would break)
added a channel for the communication to make sure it never interfer with other app
I don't have camera intsalled. so I have not retested it. Please do TEST  before merge this.

Works perfectly!


For testing on Internet Videos

Hi, can you share the setting used for running GridConv on Internet Videos? Also, did you used simple Matplotlib to visualize the final Output?

Demo for Internet videos is produced as follows:

Obtain 2D pose x_det by running HRNet frame by frame.

(Optional) Smooth pose sequence. We use One-Euro filter to alleviate temporal jitter.

Normalize 2D pixel coordinate by x_norm = (x_det - 0.5L) / 0.5L, where L = max(W, H)

Feed x_norm to D-GridConv model, learnable SGT ver.
GT-trained model is used in practice, but technically GT & HRNet model are both okay for inference.

visualize 3D results using Matplotlib as you guess. We modified existing visualization code https://github.com/facebookresearch/VideoPose3D/blob/1afb1ca0f1237776518469876342fc8669d3f6a9/common/visualization.py#L62
For better visual effect, we add viewpoint animation, and will post modifications below for reference.

Thank you so much! So outputs_pack will contain the 3D estimations generated from GridConv, i.e., after following Steps 1-3?

Not accurate, outputs_pack = {'Ours': np.ndarray([T, 17, 3]), 'PoseAug': np.ndarray([T, 17, 3]), ...}, where T is video length, and np.ndarray is what you describe.

Thanks, it resolved my doubt! Lastly, for running on internet videos, we first need to obtain 2D pose x_det by running HRNet frame by frame. Are you here referring to the standard HRNet model trained on MS-COCO (i.e., https://github.com/HRNet/HigherHRNet-Human-Pose-Estimation)? Thanks once again!

Exactly, it is the repository we use. And we choose pose_hrnet_w48_384x288 model trained on COCO.

Thank you so much!


How to add custom styles?

Hello. Could you please briefly explain how to add custom styles to ZenPen?
F.ex I want an  <s></s> tag. Where shall I add it?

Well, if you're creating your own version, you'd add the strikethrough to the css, and then include it also in the editor/ui js (copy how bold, and italic has been done)
There are no plans though, to add this to the editor as it stands though.

Thanks for the answer.
However, I'm looking through Style.css file and can't find anything about current bold, italic and blockquote..

Ahh, this is because they're natively bold/italic in the browser. I imagine s would be similar?
If not, you can add it into your version?

I'll try. But I don't know where to but this code :(
if ( hasNode( currentNodeList, 'I') ) {
			italicButton.className = "italic active"
		} else {
			italicButton.className = "italic"
		}

I think this code must be connected to CSS, right? (I'm quite noobish here, sorry)

Well, thats the classname for the button in the ui... not in the styles for the page. The currentNodeList containing an I means that its found an <i> tag in the selected area. That would map to the css (but doesn't appear there, because the browser natively adds italic to <i> tags.

And where this <i> tag is appended to selected text? I really don't see it anywhere.

Ahh, its done using the rich text editing api... here:
https://github.com/tholman/zenpen/blob/master/js/editor.js#L242-L244
You can read more about it here too, I believe it does support "strikethrough"
https://developer.mozilla.org/en-US/docs/Web/API/document.execCommand
:)

Well, sorry, I have no idea what to do. All my attemps end as fail, I don't see how to add element to options box, I did exactly the same you did with other buttons with newly created one:

added strokeButton;

added

strokeButton = textOptions.querySelector( '.italic' );
		strokeButton.onclick = onStrokeClick;

(italic, because '.stroke' returns an error "Can't set property of onclick as null")

edited updateBubbleStates()

if ( hasNode( currentNodeList, 'S') ) {
			strokeButton.className = "stroke active"
		} else {
			strokeButton.className = "stroke"
		}

added new funtion (thanks for Mozilla link, btw, it helped to choose the correct command):

function onStrokeClick() {
		document.execCommand( 'strikeThrough', false);
	}

and nothing! No buttons appear in editor. Maybe someone more clever manage to add new functions, not me.

Ahh, you were getting closer! But ok :)


no more data for mailcow_rspamd_classification{classification="ham",host="mail.example.com"}

Hi,
since updating to the latest mailcow I get no more data from those two fields
mailcow_rspamd_classification{classification="ham",host="mail.example.com"}
mailcow_rspamd_classification{classification="spam",host="mail.example.com"}

the others are working fine, can this be fixed?

Hi,
Sadly, I cannot reproduce this issue on my local instance. What version of mailcow are you running and could you post logs of your mailcow-exporter instance? If a provider is unable to produce data, then there should be errors in the log

Closing this issue due to lack of response


Check for blank? instead of empty? to also catch nil values.

Fixes errors on the event view page if knowledge level or organizer are nil.

Coverage remained the same at 100.0% when pulling e71dac0ed6e15328f23e382b893083384c607b28 on hotfix-nil-checks into 22a016d6e19b51a0b4de11b3f85e965097a4d491 on dev.


Add ICRPG - Warp Shell character sheet

This adds a fully functional ICRPG character sheet for the Warp Shell setting.

I noticed you had a file name for the preview image in your sheet.json but forgot to upload the file itself. I went ahead and added a screenshot, but if you prefer to use your own image you can submit that in another pull request.

Perfect, thanks! Sorry for forgetting that! The image you used should be just fine.

No problem!


Cell width quirks

There's easy ways to control column width uniformly but it'd be nice to have a feature on the Cell for it to preserve its width when in edit mode. Because of browser quirks with how inputs are treated vs spans (which can easily size to their content width) even setting the input to 100% doesn't quite get your cell to look the same in edit mode and in input mode.
Again, to be clear, I'd like to be able to easily avoid the width juking between going into edit mode and input mode, like when you have no-wrap mode on.
My idea would be to have the Cell check it's width just before going into edit mode and set it manually, via style, and then remove it when out of edit mode. That would let the input, which is 100%, size appropriately. (or some other solution).
nbd if it's too small potatoes, we can do our own cell renderer afterall, but it would be a nice to have.

This might help with maintaining the cell's width in edit mode.
.data-grid-container .data-grid .cell .value-viewer ,
.data-grid-container .data-grid .cell .data-editor{
   display: block;
   box-sizing: content-box;
   width: inherit;
 }

That didn't work for me, what did work was

removing the border from the input.
make parent  relative position.
set input to full width and height.
set input to absolute.

This is what I did using TailwindCSS.
`
.data-grid-container .data-grid .cell > input {
@apply w-full h-full top-0 text-center absolute border-none;
}
.data-grid-container .data-grid .cell.selected {
@apply relative
}
`


Specifying OUTPUT for compile has no effect

otk compile -t osbuild /data/omnifest.yaml yolo

still prints the resolved omnifest into STDOUT, I get no yolo file when running this command.

Fixed in #102.


"Not Implemented in Portable Class Library.  Use a platform specific assembly instead."

When using this code,
public override bool OpenUrl(UIApplication application, NSUrl url, string sourceApplication, NSObject annotation)
{
        if (url.Scheme.Contains("custom"))
        {
            var alUrl = new AppLinkUrl(url.ToString());
            var page = alUrl.TargetUrl.AbsolutePath;
            var id = alUrl.TargetQueryParameters["id"];

I am getting this exception:
https://github.com/xamarin/Rivets/blob/5e046d7fd5a24805a858bdfe0b76cb14fc31fa85/Rivets/AppLinkUrl.cs#L35
I've added the Rivets nuget package to my iOS project only, and tried adding it to my ios + core projects, and I get the same exception.
I've tried going down the component route, but the store keeps asking me to log in...
Additionally, I've checked that custom compilation symbol "Portable" is not on a project that it shouldn't be.
How should my packages be configured?

@markgibaud I'm currently seeing the same issue.  If you find a solution or workaround, please let me know.

Hi @epactscott - in the end I just old-style referenced the compiled DLL and everything worked fine after that!

I'm having the same issue. Why isn't the issue picked up after 1.5 year?

I'm seeing this as well after switching away from using Rivets from the Components store and using it directly through nuget.

Same issue here. Not sure why it's triggering.


Query stuck in Exectuing query ... state but doesn't execute

Type: Bug
Query stuck in Exectuing query ... state but doesn't execute. This has been an issue for years, but seems to be worse lately
Azure Data Studio version: azuredatastudio 1.48.1 (8825ec21e67a34ede00e4f02a4afc692eb6cab61, 2024-06-13T21:07:19.253Z)
OS version: Windows_NT x64 10.0.22631
Restricted Mode: No
Preview Features: Enabled
Modes:
Extensions (6)

Extension
Author (truncated)
Version

copilot
Git
1.128.504

query-history
Mic
0.5.3

schema-compare
Mic
1.21.0

sql-database-projects
Mic
1.4.2

azdata-sanddance
msr
4.0.1

sql-prompt
Red
0.2.14

I have the same issue with every release and end up going back to SSMS which is slow but executes immediately. This issue also happens with the MSSQL extension in VSCode.
Probably this is the only reason SSMS has not lost users.


[Plugin] TinyMCE

Please add TinyMCE as a plugin.

What kind of functionality are you missing from trumbowyg?


didReceiveAttrs does not trigger onChange

Fixes #115, #114.
Added a test too.
This implies that an external change to value shouldn't trigger onChange, which seems fair to me.

Thanks for the PR @staskij! Looking at the flatpickr docs, they seem to indicate that it won't trigger onChange unless you pass true in there. https://chmln.github.io/flatpickr/#api-setDate
If it doesn't work as advertised, we might want to have them fix it there.
My only concern with this is making sure all the locales and formats and everything work the same with this change. Does everything look the same generally or did you test that out?

flatpickr#setDate uses
if (triggerChange !== false)
			triggerEvent("Change");

to check if onChange should be triggered, so Change triggers always but when false is passed.
I'm afraid there is a difference in formatting if not using altFormat:
https://ember-twiddle.com/a14d945276da2982172c12caf1cb5364/b0ccb57b7fa6572ec045a65ab933a68f67d0c6dd?openFiles=templates.application.hbs%2C
The version with false ignores dateFormat for some reason, but only when displaying, flatpickr config uses the given dateFormat. (the awkward date formats used in the twiddle are only to ensure i'm setting something different from the default ones)

@staskij what if we switched didReceiveAttrs for didUpdateAttrs or maybe we shouldn't pass the value to the initial setup at all https://github.com/shipshapecode/ember-flatpickr/blob/master/addon/components/ember-flatpickr.js#L126. We could remove that and just allow the value to be set by didReceiveAttrs each time. We need to ensure formatting and everything works.
Perhaps we should think up all the possible cases of setting the value and ensure we have tests for each of them and they all behave as they should?

I'm wrong about dateFormat being ignored in displaying. Using setDate() without false causes the "you modified twice" error before glimmer rerenders, so the date is not updated.
My understanding of flatpickr formats is that:

altFormat is used (if apiInput == true) only for display purposes
dateFormat is used to parse the date in various functions if the date is a string. If date is a Date, it ignores dateFormat. (so, flatpickr#setDate(new Date()) ignores dateFormat, while flatpickr#setDate('2010-11-12') tries to parse '2010-11-12' into a DateObject using dateFormat). It is also used as the second parameter of flatpickr events API, so that onChange receives 3 arguments, the first is an array of DateObjects, the second one is the latest date formatted according to dateFormat and the third is the flatpickr instance.

So, we should check that:

[x] we can change the value externally and the input value changes
[x] if we open the picker and we click on a day onChange gets called with the correct parameters
[] onChange is called with dateStr in the correct format according to dateFormat

I'm not sure if we should check anything more about formats, this is mostly a wrapper around flatpickr, most of the data manipulation gets implemented by the user in onChange/onClose/other events.

Sorry if I'm being overly verbose in this PR, but i'm trying to understand what we should do.
onChange receives the three arguments from the flatpickr onChange event API, so if we destructure the first argument in a onChange action (like in the last test i added) we have no problem, but if we use onChange=(action (mut value)), value then becomes the first argument of the onChange flatpickr event, so value becomes an array of DateObjects.
I don't think this should be the standard use-case: mut is expected to be used in an onChange, with the same argument as the value property. But now, value receives either a DateObject, a string formatted accordingly to the dateFormat property or an Array of DateObject/string, but onChange=(action (mut value) sets value to an Array of DateObjects. So, here are my ideas:

document that value property accepts a string formatted with dateFormat, a DateObject or an Array of DateObject/string
document that onChange=(action (mut value) sets value to an Array of DateObjects, so if a user wants a dateobject he has to use a custom action setting onChange=(action "something") and something action has to destructure the first argument/use the second one
pass an additional first parameter to onChange which is the first/last selected date, so that onChange=(action (mut value)) sets value to a DateObject, while if we use onChange=(action "something"), something gets called with (lastDateObject: Date, selectedDates: Array, dateStr: string, instance: Flatpickr)

@staskij it should be expected to be an array at all times now, I believe. When flatpickr switched to supporting selecting multiple dates on one calendar, they defaulted to arrays everywhere. Definitely possible we have some tweaking to do on the ember-flatpickr side to support this. I agree that it should be consistent.

@staskij nice work and investigating!
Since onChange is passed an array of selectedDate(s) one way way I can think of that onChange=(action (mut value)) would still work is if the value had set function to handle the date objects in the array defined.
// Assume the value is a computed property with set:
value: Ember.computed({
    set(key, value) {
        const [date] = value;

        return moment(date).format('YYYY-MM-DD');
    }
});

@GCheung55 sounds logical to me, at least at first glance. Could you and @staskij work together on creating a solution that you both agree on and then I'll get it merged in? I won't have much time to look into this myself for a couple weeks, unfortunately, but if you both agree it's good to go, and formatting and everything still works, I'll happily merge 😃

@staskij @GCheung55 do you think you guys would have the time to collaborate on this and get this PR to a mutually accepted solution that handles all the things?

Well, I believe this PR should handle the problem of not updating the value twice each time a new date gets selected, and I believe the tests I've added show that setting setDate(*, false) solves the problem and leaves value and onChange properties to the same behaviours they had before (the date formats/type weren't tested before, so they only depended on what flatpickr accepts as setDate and flatpickr events).
As per "what should we expect as input and what should we return as output", it should be discussed more, but without the setDate(*, false) this component cannot be used anywhere atm, as the basic use-case is broken. So I'm open to new discussions related to input and output formats in another pr/issue, but I'm thinking this pr should be small, fast and fix only the warning ember throws. I'm only adding to this pr a little bit of documentation on how to handle input and output on this very moment.
Let me know if solving this issue alone and discussing value/onChange formats in another pr is ok.

@staskij can you check what version of flatpickr you are on? This issue does not occur on the demo site. I'm inclined not to push a fix through that breaks other parts of the addon, like formatting etc.

1.1.6 (twiddle: https://ember-twiddle.com/a14d945276da2982172c12caf1cb5364/ba84439ff5edbf4843c6f22ab95b5ba30b0f1236?openFiles=twiddle.json%2C)
The problem does not occur if in production mode, only in development mode:
https://github.com/emberjs/ember.js/issues/13948

As a compromise, we currently only perform the detection in development mode and turned the deprecation message into a development-mode assertion (hard error). In production mode, the detection code is stripped and backtracking will not work.

@staskij look at http://shipshapecode.github.io/ember-flatpickr/
If you look in the console, notice nothing is printed from an onChange until you change the value by interacting with the flatpickr.

@staskij looks like the behavior did indeed change in flatpickr. https://github.com/chmln/flatpickr/blob/v2.3.2/src/flatpickr.js#L1259 Thanks to @GCheung55 for finding that!
So we may want to just discuss getting this fixed in flatpickr itself. You could lock your flatpickr to 2.3.2 for now, for a quick fix. I just don't have the time to do a lot of digging into this right now.

@staskij @GCheung55 seems like @chmln is going to revert the behavior https://github.com/chmln/flatpickr/pull/666#issuecomment-285737823, thus potentially fixing this issue without need for this PR.
Might want to at least keep some of the tests introduced here though. Will follow up when the change has been made on the flatpickr side.

@staskij seems like the behavior has been reverted now. Can you please remove your changes here, but keep the relevant tests? Happy to merge the tests in to ensure this doesn't happen again 😄

I rebased the pr, leaving on the 4 tests and the change in the README. This fails on travis as travis pulls flatpickr without the reverted behaviour, but as a new flatpickr version gets released they'll succeed.
Shouldn't we also upgrade package.json to use the to-be released flatpickr? Any version of flatpickr from 2.4 to 2.4.4 have the "setDate triggers onChange by default" behaviour, and so they cause the error.

@staskij yeah, we will update the version when they release it

did they do it? https://github.com/chmln/flatpickr/commit/a0334868237d565415afadbb566dbb22da0fc979

@NullVoxPopuli yeah, they changed it back, but have not released a new version yet


Change the format of the date in the certificate

Which area(s) of Podkrepi.bg are affected? (leave empty if unsure)
Donations
Describe the feature you'd like to request
Currently the format is 11/5/2024 (MM/DD/YYYY).
This can be confusing, as one can read it as May 11th.
Describe the solution you'd like
I suggest we change it to: 5 Nov 2024 to make it more obvious.
Describe alternatives you've considered
No response

https://github.com/podkrepi-bg/frontend/commit/90d9973b795a802c1ba251678afa711fc3abac11


Feature Request: sort by time frame

Motivation
Ability to easily parse the alerts.
Feature
Ability to sort events based on a time by clicking a button.
e.g.
last 1 hour
last 6 hours
last 12 hours
last 24 hours
last 3 days
last 7 days
Alternatives
n/a
Additional context
Similar feature could be found in kibana for example.

Hello @jonny-wg2,
Thanks for your issue.
For now, the UI is really "simple", no database, last events are stored in pod memory and only the last 50s (you can change this with -r arg).
I understand your need, but for improved statistics, I encourage people to use a different output (elasticsearch works really well for).
My idea when I started this project was to propose a UI for an easy onboarding and have results in real time in any cluster, without setting up a real backend.
We'll see how things will evolve. If more and more people wants new features but I don't want to overlap with Sysdig Secure.
wdyt @fjogeleit ?

A basic filter is no big deal but you're right that the UI does not persist any event. You could only filter whats "in memory".

A basic filter is no big deal but you're right that the UI does not persist any event. You could only filter whats "in memory".

Ok with that, I'll do some test to check memory footprint of event and see how we could store without consuming too much


⚠ Auth Portal has degraded performance

In 69811f9, Auth Portal (https://auth.zyradyl.moe) experienced degraded performance:

HTTP code: 523
Response time: 24632 ms

Resolved: Auth Portal performance has improved in 3707699 after 5 minutes.


tag v4?

Currently, the latest version is v4? but it is not tag?
There are few breaking changes for upgrading from v3.5.4, which is highlighted at the changelog
https://github.com/Cylix/cpp_redis/blob/master/CHANGELOG.md#v400

Indeed you are right!
I was pretty sure I drafted a release but seems like I didn't.
I just published one!
Thanks for noticing me about that and let me know if you have any other concerns :)
Best


Migrate to gradle 2.x

karyon-pull-requests #130 FAILURE
Looks like there's a problem with this pull request

I will have to rename groupId back to com.netflix.karyon, and instead use karyon2 to prefix in artifact ids. This is due to restrictions imposed by the new release process.

Missing the gradle/wrapper/gradle-wrapper.jar file

karyon-pull-requests #131 FAILURE
Looks like there's a problem with this pull request

karyon-pull-requests #132 SUCCESS
This pull request looks good

karyon-pull-requests #133 FAILURE
Looks like there's a problem with this pull request

karyon-pull-requests #134 SUCCESS
This pull request looks good


[RadioGroup] By default unnamed groups are not correctly grouped for accessibility purposes

An unnamed RadioGroup will handle value changes as expected. However, the input elements of different groups will be on the same group in HTML.

[x] The issue is present in the latest release.
[x] I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

Two unnamed groups handle the React state correctly, but the HTML will be unnamed. It makes the keyboard arrow navigation to move across groups.
Expected Behavior 🤔

Keyboard arrows should navigate only inside the group, while Tab should move between groups: https://www.w3.org/TR/wai-aria-practices-1.1/#keyboard-interaction-14
I see three possible options to handle this:

Auto-generate a name for unnamed groups (e.g. Reach UI, Material Angular does this). The biggest challenge of this option is how to correctly generate the id with support for SSR.
Emit a warning when the user doesn't provide a name
Make the name a required prop (breaking compatibility)

This is a subtle issue, since the user will not see any warning and React will handle the state as expected (MUI sets the checked state based on the RadioGroup context value). However, the end result will not handle keyboard focus correctly.
Personally, I prefer (1) since emitting a warning will left the user with the task of id generation (which is not easy, for reference see: https://github.com/reach/reach-ui/blob/master/packages/auto-id/src/index.ts)
Steps to Reproduce 🕹

https://codesandbox.io/s/eager-davinci-1hg9w?fontsize=14&hidenavigation=1&theme=dark
Steps:

Add an unnamed RadioGroup
Add another unnamed RadioGroup
Set the focus in any of the groups
Press arrow up or arrow down to select another option in the group.
When you move to the last item in the group, the keyboard will jump to the next group

Context 🔦

Your Environment 🌎

Tech
Version

Material-UI
v4.9.4

React
v16.12

Browser
Chrome 79

@dfernandez-asapp Note that we are using (1) in

https://github.com/mui-org/material-ui/blob/4fba0dafd30f608937efa32883d151ba01fc9681/packages/material-ui-lab/src/Rating/Rating.js#L168
https://github.com/mui-org/material-ui/blob/4fba0dafd30f608937efa32883d151ba01fc9681/packages/material-ui-lab/src/useAutocomplete/useAutocomplete.js#L123
https://github.com/mui-org/material-ui/blob/4fba0dafd30f608937efa32883d151ba01fc9681/packages/material-ui/src/Tooltip/Tooltip.js#L257

This issue is relevant in our context: #18172.

Many thanks for the info, I'll create a PR for this.
But I have two questions, out of curiosity:

I see that other frameworks like ReachUI are using a more complex logic for the ID generation, mainly because of SSR. In this approach the setDefaultId is called in a useEffect, meaning that these ids are ignored for SSR. Is there any undesired behavior for not having the ids in SSR?
Why store the id in a state, instead of using a ref?

What would you use the id for prior to hydration?
To rerender

@dfernandez-asapp Do you want to work on a pull request with (1)? :)

Yes


html entities for UTF8 charcters in replace option

Hi,
I've just resolved an issue with option --replace for your wrapper.
when i passed some special character (example è) to the replace parameter, i got it passed uncorrectly to the footer, so when I converted it to uppercase with css directive text-transform: uppercase;, the character disappeared.
Since wkhtmltopdf is just a browser under the hood, when you pass parameters in the replace parameter you have to convert special UTF8 characters to html entities if you want them to be passed correctly as POST when it makes header and footer calls.
I have derived your pdf class and overridden the following function:
public function setOptions($options = array()){
	if (isset($options['replace'])) {
		foreach ($options['replace'] as $key => $val) {
			$options['replace'][$key] = htmlentities($val);
		}
	}
	parent::setOptions($options);
}

hope this helps
regards

I'm pretty sure, that with the right locale settings everything works.
Note to self: Add pdfbox to the test environment so we can extract texts from created PDF files and verify that UTF-8 works.

Ok, I couldn't make it work either. But this seems to be a bug with wkthmltopdf itself: https://github.com/wkhtmltopdf/wkhtmltopdf/issues/2427
Here's a simple test:
wkhtmltopdf --header-left 'äö [x]' --replace 'x' 'üüü' index.html out.pdf

While the äö work fine, the üüü in the replace argument don't.


When use hugo -D generate public fold. please do not generate fold for markdown files. So we can look image in vscode and hugo web without fix relative path

When I write markdown files(first.md) using editors such as typora and vscode, I usually use relative paths to reference local images. But when putting the markdown file into hugo, in order to display the image. I would set up the project directory structure like this:
content
│
├───posts
│   │   emoji-support.md
│   │   _index.md
│   │
│   └───first
│       │   first.md
│       │
│       └───imgs
│               1.jpg
│               2.jpg
│               3.jpg
│
└───series
└───themes-guide
_index.md
But when I using "hugo -D" to generate the public folder. I got directory structure like this:
public
│   404.html
├───posts
│   │   index.html
│   │   index.xml
│   │
│   ├───emoji-support
│   │       index.html
│   ├───first
│   │   ├───imgs
│   │   │       1.jpg
│   │   │       2.jpg
│   │   │       3.jpg
│   │   │
│   │   └───first
│   │           index.html
So  in order to display image（1.jpg） in hugo web, I need to modify the relative path:
" ./imgs/1.jpg"  -> "../imgs/1.jpg" to show .
I hope that the structure of the "public" folder generated by hugo is consistent with the file structure of "content", so that it can be compatible with editors such as typora and vscode.

First, your description is unreadable. Please learn to use fenced code blocks (or the < > button) when including code, directory structures, etc.
Second, the structure of the public directory is consistent with the structure of the content directory, and is required for pretty URLs.
Please search the forum, or raise a new question. This topic has been addressed several times in the past.


foomatic-db-engine missing database

Describe the bug
Error because the foomatic database is not installed.
Steps To Reproduce
Steps to reproduce the behavior:
$ nix-shell -p foomatic-db-engine
[nix-shell:~]$ foomatic-searchprinter Phaser
No Foomatic database present!

Expected behavior
Anything but "No Foomatic database present"
Additional context
Trying to get an old laser printer to work, and want to use foomatic-ppd-to-xml, to remake a new ppd from an old ppd.
But it don't work without a database.
Notify maintainers
@Yarny0
Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.
[shs@cynix:~]$  nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.31, NixOS, 23.11 (Tapir), 23.11pre491650.7409480d5c8`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.13.3`
 - channels(root): `"nixos"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Your printer's ppd file might already be contained in the package foomatic-db-ppds (or in the unfree alternative foomatic-db-ppds-withNonfreeDb).  You can build/fetch that package with nix-build '<nixpkgs>' -A foomatic-db-ppds -o ./foomatic-db-ppds (will create a symlink foomatic-db-ppds in the CWD), then look around in the directory foomatic-db-ppds/share/cups/model/foomatic-db-ppds/.  To use such a ppd file, you might want to use the NixOS option hardware.printers.ensurePrinters.*.model.
If this does not work for you, or you'd like to use the foomatic-db-engine package directly for other reasons, you have to obtain at least the foomatic-db package and provide its path to the engine via the environment variable FOOMATICDB:
nix-build '<nixpkgs>' -A foomatic-db -o ./foomatic-db  # will create a symlink `foomatic-db` in the CWD
nix-shell -p foomatic-db-engine
FOOMATICDB=$PWD/foomatic-db/share/foomatic foomatic-searchprinter Phaser

If you want the content of foomatic-db-nonfree included in the database, or if you need to use this environment very often, you can prepare a shell.nix file with this content:

shell.nix
{ pkgs ? import <nixpkgs> {} }:

let

 foomatic-db-combined = pkgs.buildEnv {
   name = "foomatic-db-combined";
   pathsToLink = [ "/share/foomatic" ];
   paths = [
     pkgs.foomatic-db
     #pkgs.foomatic-db-nonfree  # add for nonfree data
   ];
 };

in

pkgs.mkShell {
 packages = [ pkgs.foomatic-db-engine ];
 shellHook = "export FOOMATICDB=${foomatic-db-combined}/share/foomatic";
}

With this file in the CWD, you can just start nix-shell and have a working foomatic db engine available.
The database for the engine is in separate packages and not hardcoded into the engine package as there are multiple ways combine those database packages to a working database.  Also, it should be possible to use a modified/different database.

hmm there seems to be a xml file. /Xerox-Phaser_6125.xml
in /github.com/OpenPrinting/foomatic-db

Yes, I am aware this is a hard case. But I did use it under Linux some years ago.
Someone figured out that you could use the drivers from Fuji_Xerox-DocuPrint_C525_A_AP-1.0-1.i386.tar,
but the filters in this file is 32bit, so they don't work on 64bit architecture.
So I was wondering if I could use foomatic-ppd-to-xml on the ppd from this archive, and then use the xml to generate a new ppd file that hopefully use some modern filters.
I am also new to NixOs, and I have found that working on hard problems force you to dig deep, and then you usually end up
leaning a lot.

Hmm, still get an error.
[nix-shell:~/printer]$ echo $FOOMATICDB
/home/shs/printer/foomatic-db/share/foomatic/db/
[nix-shell:~/printer]$ foomatic-ppd-to-xml usr/share/cups/model/FujiXerox/en/FX_DocuPrint_C525_A_AP.ppd
PPD file usr/share/cups/model/FujiXerox/en/FX_DocuPrint_C525_A_AP.ppd
No Foomatic database present!

okey this worked.
FOOMATICDB=$PWD/foomatic-db/share/foomatic foomatic-ppd-to-xml usr/share/cups/model/FujiXerox/en/FX_DocuPrint_C525_A_AP.ppd

Now I have to figure out, how to generate a ppd from the xml.

Dear @Isomorph70, did you manage to generate your ppd file?  Can the issue at hand be closed?

The original problem is still there. As I see it, the dependencies for the packages are not set up correctly.

I'm not sure how these dependencies could be defined in a consistent but flexible way.  The problem is that foomatic-db-engine is just the engine.  There are at least two possible database "combinations" that might be added as database to be used by the package: foomatic-db and foomatic-db + foomatic-db-nonfree.  The packages foomaitc-db-ppds{,-withNonfreeDb} internally do exactly that: They sets up foomatic-db-engine with the proper combinations of database packages.  But someone working on the database might want to use a different (not packaged) version of the database.
Do you have a specific setup of dependencies in mind that we might implement?


Ephys rig behavior GUI frozen if changing baseline weight and then adding post weight

The python GUI on ephys rig gets frozen if I: 1. click 'start' to stop the behavior, 2. then adjust baseline weight (this is a new mouse), 3.  and then update post weight. The data has been lost for two days.
Xinxin and I reproduced this error and it is related to a recent update. @XX-Yin can provide more detail.

Closed because I opened it in a wrong place.

@ZhixiaoSu @XX-Yin Is this issue still happening?

This is fully fixed.


AVRO-2355 [java] Add level and checksum options to ZStandard compression

Adds compression level setting to zstandard codec.  It is very valuable to have this, as ZStandard is extremely flexible in its compression range -- at one end it is faster than snappy (and slightly better compression, around level -2) in the mid levels it is significantly faster than gzip while also being higher compression (levels 1 to 5 or so), and it can go up to near 'xz' compression ratios at the higher levels, but with significantly faster decompression speeds.
Missing out on the compression level flexibility would be a shame.

I've updated and force-pushed a variant that adds both compression level and checksum options, while making the class loading failure more lazy so that it happens the same time as it would prior to this commit -- when you call compress() or decompress().

We introduced automatic code formatting. For more info see the "How to contribute" page. This  probably affected this PR can you please rebase it.

rebased after the formatting changes.


what will happen if i update a key with ttl already set?

cache.SetWithTTL(key, value, 300 * time.Second)
// do something else
cache.SetWithTTL(key, updatedValue, 300 * time.Second)

if this key expires at second 300 * time.Second?
cache.SetWithTTL(key, value, 300 * time.Second)
// do sth else
cache.Set(key, value)

if this key expires at first 300 * time.Second?

I guess the oneliner would be 'last write wins'. Any SetWithTTL or Set will overwrite existing data and reset the TTL. Note that Set is identical to SetWithTTL but it uses the global TTL value.
It's easy to observe behaviour using the SetExpirationCallback which allows you to run custom code when an item expires.
So i made two tests that cover your case as far as i can see. You can make adjustments to check other scenario's as well.
The first test will show that the second item has it's own 100 millisecond life-span. The second test shows that the global TTL kicks in and the item is therefore not expiring during the test (not using the 100 millisecond TTL from the first item but will not expire since no global TTL was setup)
package ttl_test

import (
	"testing"
	"time"

	"github.com/ReneKroon/ttlcache"
)

func TestOverwriteTTL(t *testing.T) {

        // callback to observe item expiration
	callbacker := func(key string, value interface{}) {
		t.Logf("Got %s %v", key, value)
		t.Logf("expire@: %v ", time.Now())
	}

	cache := ttlcache.NewCache()
	cache.SetExpirationCallback(callbacker)

       // the first element
        t.Logf("time: %v ", time.Now())
	cache.SetWithTTL("test", 1, time.Millisecond*100)
	time.Sleep(time.Second)

        // after the first element expired (Sleep > TTL) add the element again.
        t.Logf("-- second element -- ")
	t.Logf("time: %v ", time.Now())
	cache.SetWithTTL("test", 2, time.Millisecond*100)
	time.Sleep(time.Second)

        // show me some output by failing
        t.FailNow()
}

func TestOverwriteNoTTL(t *testing.T) {

	callbacker := func(key string, value interface{}) {
		t.Logf("Got %s %v", key, value)
		t.Logf("expire@: %v ", time.Now())
	}

	cache := ttlcache.NewCache()
	cache.SetExpirationCallback(callbacker)

	t.Logf("time: %v ", time.Now())
	cache.SetWithTTL("test", 1, time.Millisecond*100)
	time.Sleep(time.Second)

	t.Logf("-- second element -- ")
	t.Logf("time: %v ", time.Now())
	cache.Set("test", 2, time.Millisecond*100)
	time.Sleep(time.Second)

	t.FailNow()
}

@csrgxtu Is this enough information to close the issue?


Install fails in mac M1, missing immutable

Computer: Mac M1
Python: 3.11.3
Env: conda
Description:
When installing with pip install shiny error ModuleNotFoundError: No module named immutables
Dump:
Collecting shinywidgets
Using cached shinywidgets-0.2.1-py3-none-any.whl (1.8 MB)
Requirement already satisfied: ipywidgets>=7.6.5 in /opt/homebrew/anaconda3/envs/sam/lib/python3.11/site-packages (from shinywidgets) (8.0.6)
Requirement already satisfied: jupyter-core in /opt/homebrew/anaconda3/envs/sam/lib/python3.11/site-packages (from shinywidgets) (5.3.1)
Collecting shiny>=0.3.0 (from shinywidgets)
Using cached shiny-0.4.0-py3-none-any.whl (2.2 MB)
Requirement already satisfied: python-dateutil>=2.8.2 in /opt/homebrew/anaconda3/envs/sam/lib/python3.11/site-packages (from shinywidgets) (2.8.2)
Requirement already satisfied: ipykernel>=4.5.1 in /opt/homebrew/anaconda3/envs/sam/lib/python3.11/site-packages (from ipywidgets>=7.6.5->shinywidgets) (6.23.3)
Requirement already satisfied: ipython>=6.1.0 in /opt/homebrew/anaconda3/envs/sam/lib/python3.11/site-packages (from ipywidgets>=7.6.5->shinywidgets) (8.14.0)
Requirement already satisfied: traitlets>=4.3.1 in /opt/homebrew/anaconda3/envs/sam/lib/python3.11/site-packages (from ipywidgets>=7.6.5->shinywidgets) (5.9.0)
Requirement already satisfied: widgetsnbextension~=4.0.7 in /opt/homebrew/anaconda3/envs/sam/lib/python3.11/site-packages (from ipywidgets>=7.6.5->shinywidgets) (4.0.7)
Requirement already satisfied: jupyterlab-widgets~=3.0.7 in /opt/homebrew/anaconda3/envs/sam/lib/python3.11/site-packages (from ipywidgets>=7.6.5->shinywidgets) (3.0.7)
Requirement already satisfied: six>=1.5 in /opt/homebrew/anaconda3/envs/sam/lib/python3.11/site-packages (from python-dateutil>=2.8.2->shinywidgets) (1.16.0)
Requirement already satisfied: typing-extensions>=4.0.1 in /opt/homebrew/anaconda3/envs/sam/lib/python3.11/site-packages (from shiny>=0.3.0->shinywidgets) (4.7.1)
Collecting uvicorn>=0.16.0 (from shiny>=0.3.0->shinywidgets)
Using cached uvicorn-0.22.0-py3-none-any.whl (58 kB)
Collecting starlette>=0.17.1 (from shiny>=0.3.0->shinywidgets)
Using cached starlette-0.28.0-py3-none-any.whl (68 kB)
Collecting contextvars>=2.4 (from shiny>=0.3.0->shinywidgets)
Using cached contextvars-2.4.tar.gz (9.6 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [52 lines of output]
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "/private/var/folders/mk/p6fn1z5s5p399vpdyhlnyzcm0000gn/T/pip-install-r5btqawr/contextvars_e52e4338fddf47c7ab4ea4f220b9d84a/setup.py", line 9, in
setuptools.setup(
File "/opt/homebrew/anaconda3/envs/sam/lib/python3.11/site-packages/setuptools/init.py", line 107, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/anaconda3/envs/sam/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 147, in setup
_setup_distribution = dist = klass(attrs)
^^^^^^^^^^^^
File "/opt/homebrew/anaconda3/envs/sam/lib/python3.11/site-packages/setuptools/dist.py", line 496, in init
_Distribution.init(
File "/opt/homebrew/anaconda3/envs/sam/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 283, in init
self.finalize_options()
File "/opt/homebrew/anaconda3/envs/sam/lib/python3.11/site-packages/setuptools/dist.py", line 934, in finalize_options
for ep in sorted(loaded, key=by_order):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/anaconda3/envs/sam/lib/python3.11/site-packages/setuptools/dist.py", line 933, in
loaded = map(lambda e: e.load(), filtered)
^^^^^^^^
File "/opt/homebrew/anaconda3/envs/sam/lib/python3.11/importlib/metadata/init.py", line 202, in load
module = import_module(match.group('module'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/anaconda3/envs/sam/lib/python3.11/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1206, in _gcd_import
File "", line 1178, in _find_and_load
File "", line 1128, in _find_and_load_unlocked
File "", line 241, in _call_with_frames_removed
File "", line 1206, in _gcd_import
File "", line 1178, in _find_and_load
File "", line 1149, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "/opt/homebrew/anaconda3/envs/sam/lib/python3.11/site-packages/npe2/init.py", line 10, in
from ._inspection._fetch import fetch_manifest, get_manifest_from_wheel
File "/opt/homebrew/anaconda3/envs/sam/lib/python3.11/site-packages/npe2/_inspection/_fetch.py", line 26, in
from unittest.mock import patch
File "/opt/homebrew/anaconda3/envs/sam/lib/python3.11/unittest/mock.py", line 26, in
import asyncio
File "/opt/homebrew/anaconda3/envs/sam/lib/python3.11/asyncio/init.py", line 8, in
from .base_events import *
File "/opt/homebrew/anaconda3/envs/sam/lib/python3.11/asyncio/base_events.py", line 40, in
from . import events
File "/opt/homebrew/anaconda3/envs/sam/lib/python3.11/asyncio/events.py", line 14, in
import contextvars
File "/private/var/folders/mk/p6fn1z5s5p399vpdyhlnyzcm0000gn/T/pip-install-r5btqawr/contextvars_e52e4338fddf47c7ab4ea4f220b9d84a/contextvars/init.py", line 4, in
import immutables
ModuleNotFoundError: No module named 'immutables'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Quick fix
Install immutables separately

Something is odd with your environment since it is pulling contextvars from outside the conda env. But you shouldn't need that package at all: https://pypi.org/project/contextvars/ (see here) is a backport of the standard library module, which was added in python 3.7.
Since we no longer support python < 3.8, I think we can drop the explicit contextvars reference here: https://github.com/rstudio/py-shiny/blob/main/setup.cfg#L38
Even with that fix, I still suspect you'll need to sort out (i.e delete and recreate) your environment.


Add iLISI function

Closes #174
This PR adds a function calculate_ilisi().

The iLISI function as I wrote it is not general to any LISI metric, but specific to iLISI (e.g., not cLISI). This might be something to circle back to if we want to use the other metric for cell typing, but then again we won't usually have cell type "ground truths" in non-simulated data, so I thought the chances of needing cLISI were probably low enough to not consider it for now. Do we agree with this choice?
(edit) I added lisi to the image.
Along the way, I updated the filter_pcs() function, as discussed in #174, to only relabel PC rownames to batches if specified.

When writing the iLISI function, I therefore assumed that the PC rownames going into the iLISI function at least contain barcodes, aka some kind of cell-specific ID. I did a little digging through our existing code to see how reasonable of an assumption this was, and I ended up discovered something else, as follows....
In the integrate_sce.R script, we actually have already enforced no NAs in batches:
https://github.com/AlexsLemonade/scpcaTools/blob/62ef2e9ab3893a5f1a1cd0e5f2ec4a53a0753cad/R/integrate_sces.R#L54-L58
So, if we are ever calculating a metric from an integrated SCE (as opposed to a merged SCE), we can be reasonably sure that there are no NAs in batches! This might mean we can actually revert the filter_pcs() changes that we discussed + I made here, and just not even call it at all from the iLISI function. It probably doesn't hurt to keep the function call, but it also won't really have an effect. Curious to hear thoughts on this!
This also has the same implication for the ASW function -
https://github.com/AlexsLemonade/scpcaTools/blob/62ef2e9ab3893a5f1a1cd0e5f2ec4a53a0753cad/R/calculate_silhouette_width.R#L55-L56

Note also I opened a subsequent issue #197 for adding associated tests for iLISI.

Noting that we'll want to update filter_pcs() tests, but I'm not going to do so until we chat a little first about whether we actually want to keep the filter_pcs() tests I made in this PR.
Note: https://github.com/AlexsLemonade/scpcaTools/issues/196#issuecomment-1655886248

@allyhawkins thanks for the review, this should be ready for another look! I swapped all integrated_sce -> merged_sce, and I added an additional test for the new filter_pcs() argument.

/style

/style

Not sure why this CI check is hanging. There's also nothing indicating "in progress" on the actions status page, so I'm going to just tweak a super minor thing just to have something to push and maybe trigger this action.


[Feature Request] Add / Remove Tables from Popper Playlists, including Favorites and Global Favorites

Today VPS doesnt allow add/remove, or even show Fav playlists... would be great to have this functionality!

Part of 2.17.0


Declare JSON’s type and error in a clearer and more concise way.

According to Swift's documentation, we can make a structure's property getter public, and its property setter private / fileprivate, by combining the public and private(set) / fileprivate(set) access-level modifiers.
public struct ExampleStruct {
	public fileprivate(set) vat type: Int = 0
}

Thus, what this commit does is that it changes the structure JSON's type and error property declaration in this way, which is a more concise and clearer way compared to the original one.

Thanks for this! @matthew-an


The node stops after running for a few minutes

Phala Scripts Version: v0.2.4

Looks DB corrupted

How to deal with it

if restart won't help, you have to delete KSM DB and resync rm -rf data/polkadot (data replace to your khala-node data folder)
This problem usually comes from disk nearly full or force shut down

Thanks, I'll try


(WIP)(GH-288) Add mod snippet

This commit adds a new snippet for adding Puppet modules to a Puppetfile. This fixes #288

This both needs a functional review as well as a UX review for naming the snippets

While I like the idea of the snippet, I think it's time to implement https://github.com/lingua-pupuli/puppet-vscode/issues/295
Where the snippet should exist in the Puppetfile language, not the Puppet language.

Closing in favor of #295


Invalid rendering or rendering error

expected result

actual effect

code

Can you give more information, like what the input (option.value) is? To my knowledge, it works. (Scroll down to "Try the live demo")

Can you give more information, like what the input (option.value) is? To my knowledge, it works. (Scroll down to "Try the live demo")

option.value: 一，$$e=mc^2$$

It still seems to work just fine. https://obedm503.github.io/showdown-katex/?source=一，%24%24e%3Dmc^2%24%24

It still seems to work just fine. https://obedm503.github.io/showdown-katex/?source=一，%24%24e%3Dmc^2%24%24

It seems that the style is not in effect

Are you including the necessary katex stylesheet? https://katex.org/docs/browser.html

Are you including the necessary katex stylesheet? https://katex.org/docs/browser.html

external reference to katex solved the problem, I will close the problem


ensure compatibility with Quasar Framework 0.15.x

yeah - this is really important - especially because the README is already outdated (references v14).


Shorten PR template checklist

This commit removes items from the checklist that were redundant in order to reduce the work required to submit a PR.
Related Issues
Resolves #13965
Check List

[x] Functionality includes testing.

[x] All tests pass

[x] New functionality has been documented.

[x] New functionality has javadoc added

[x] API changes companion pull request created.
[x] Failing checks are inspected and point to the corresponding known issue(s) (See: Troubleshooting Failing Builds)
[x] Commits are signed per the DCO using --signoff
[x] Commit changes are listed out in CHANGELOG.md file (See: Changelog)
[x] Public documentation issue/PR created

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@peternied are you OK with this checklist? thank you


Define a view by default, without having to define it for every state it could be. (Nearly like a Partial)

Ok, I know that I can have several views, and describe them for every state...

$stateProvider
  .state('report', {
    views: {
      'filters': { ... templates and/or controllers ... },
      'tabledata': {},
      'graph': {},
    }
  })

But what I would like to do, and I've been wondering if there's a way... that I can load a template and a controller ALWAYS, or by default, for a ui-view, for every state I define (Nearly like a Partial), without having to specify it every time..., is there a way? : )

https://gist.github.com/eddiemonge/f6a58169c2846731a1eb


is it possible to use multiple bounding box using Inceptionv3 model?

Yolo has grid method but InceptionV3 does not.
MLMultiArray
`
class TinyYOLOOutput : MLFeatureProvider {
let grid: MLMultiArray
var featureNames: Set<String> {
    get {
        return ["grid"]
    }
}

func featureValue(for featureName: String) -> MLFeatureValue? {
    if (featureName == "grid") {
        return MLFeatureValue(multiArray: grid)
    }
    return nil
}

init(grid: MLMultiArray) {
    self.grid = grid
}

}
`

You might be able to train Inception-v3 the same way as YOLO (see the YOLO paper).

Thanks. wil check it out. so it seems like, it is possible to do


Demangler: refactoring: use qualified declarations for some utility functions

NFC

@swift-ci Please smoke test and merge


Add project level dictionary for suppress typo

Kind (Required)

Other

Overview (Required)
Android Studio detects many typo in Dep.kt.
But I think, almost words are correct.
I want to add project level dictionary for suppress typo.
.idea/dictionaries/Project.xml
<component name="ProjectDictionaryState">
  <dictionary name="Project">
    <words>
      <w>emoji</w>
      <w>firestore</w>
      <w>jetifier</w>
       ... and more
    </words>
  </dictionary>
</component>

🙋

Thank you for creating and doing it 😄


Wait until bucket is available after creating one

Creating a new bucket (see #17) takes some time. We need to wait before using it. To make it easier for the user, the 'create bucket' operation should optionally wait until the bucket is available.

This is only relevant for our tests. Customers should not create buckets via this lib.


Add support for base HTML element

Add support in the Page's to_absolute method for the base HTML element.
This way it can correctly convert relative links for a given page
document.

Very nice, merged this into next.

Great ;) Thanks!
I also have to change the "http" class, because I have issues with the string encoding. So instead of using plain Net::HTTP I replaced it with OpenURI. The advantages of doing this is that it already has some logic inside to handle things like:

Proper redirection taking a lot of cases into account
Base URL stuff
Auto detect of content encoding and charset.
Out of the box http authentication and proxy (with authentication too) support

It also makes the code simpler I think...
Check it out, and if you think that it could make it I can make a pull request with it.
https://github.com/brutuscat/anemone/commit/7531d4ce3b731ed50ed59c3529482102a3ce8de8


Windows terminal sometimes does crash when vtop is running in one of the tabs.

Windows Terminal version
1.17.11461.0
Windows build number
10.0.22621.0
Other Software
vtop (https://www.npmjs.com/package/vtop) launched on remote linux servers
Steps to reproduce
Just connect to any linux server with opened vtop and minimize window or focus on another. Sometimes this causes the whole windows terminal to freeze and crash.
Expected Behavior
Windows terminal does not crash when vtop is running in one of the tabs.
Actual Behavior
Windows terminal sometimes does crash when vtop is running in one of the tabs.

/feedback

I have been using vtop much less frequently lately and have not been able to reproduce the problem. I will open a new ticket when I know the exact circumstances of my problem.


Rename symbol does not work in Python

Issue Type: Bug
In the beginning, it worked but now it does not, from both F2 and context menu. My only guess is that this bug appeared when I started using the "__" prefix for the private members of the class. This bug is only present in Python.
 Please paste.

I will close this issue since I accidentally created a second one.


support env options in translator_drone

Overview
This PR adds support for environment variable options in Popper-to-Drone translator.
env options
Popper has the env option to set environment variables in the workflow. You can place env under steps to define variables for a step, or you can place env under options to define variables throughout the steps.
Drone has a similar feature environment and has almost identical syntax for defining environment variables. However, it only supports per-pipeline variables (equivalent of options.env) in Docker pipelines.
Hence, I made a decision to inject global variables in each step.
GIT_ Variables
Popper injects multiple variables that represent the status of the git repository. The translator automatically generates definitions of such environment variables in Drone so that scripts written for Popper can continue to work.
The following is the list of variables supported by Popper and corresponding Drone template variables.

Popper
Drone

GIT_COMMIT
${DRONE_COMMIT_SHA}

GIT_BRANCH
${DRONE_COMMIT_BRANCH}

GIT_SHA_SHORT
${DRONE_COMMIT_SHA:0:7}

GIT_REMOTE_ORIGIN_URL
${DRONE_GIT_HTTP_URL}

GIT_TAG
${DRONE_TAG}

The translator automatically generates bindings and injects them into the output.

@shumbo Can you please open a issue for this PR ?

@JayjeetAtGithub Thanks for your comment.
${VARIABLE} (dollar sign followed by curly braces) is a Drone's syntax to substitute variables available in Drone before running workflows, whereas $VARIABLE is variable expansion handled by the shell.
In your example, - echo "The current branch is ${GIT_BRANCH}" should be - echo "The current branch is $GIT_BRANCH" because GIT_BRANCH is an environment variable.
kind: pipeline
name: default
type: docker
steps:
  - name: docker-tag-demo
    image: debian:stable-slim
    environment:
      GIT_BRANCH: ${DRONE_BRANCH}
    commands:
      - echo "The current branch is $GIT_BRANCH"

This should print the name of the branch correctly with drone exec --branch master.

Thanks a lot @shumbo . That works.

Everything seems to work great !


67 name file is not defined is shown in some checks

switchover to open() and supress pexpect futurewarning in py3.8 env (ACI 6.0(2))

6.0(2) tests passed
pytest on py2 ACI versions passed
admin@apic1:techsupport> python aci-preupgrade-validation-script.py
    ==== 2023-08-14T17-52-35+0000, Script Version v1.6.1  ====

!!!! Check https://github.com/datacenter/ACI-Pre-Upgrade-Validation-Script for Latest Release !!!!

To use a non-default Login Domain, enter apic#DOMAIN\\USERNAME
Enter username for APIC login          : admin
Enter password for corresponding User  :

Checking current APIC version (switch nodes are assumed to be on the same version)...6.0(2h)

Gathering APIC Versions from Firmware Repository...

[1]: aci-apic-dk<IP_ADDRESS>g.bin
[2]: aci-apic-dk<IP_ADDRESS>h.bin

What is the Target Version?     : 1

You have chosen version "aci-apic-dk<IP_ADDRESS>g.bin"

Collecting VPC Node IDs...

[Check  1/47] APIC Target version image and MD5 hash...
              Checking apic1......                                                                                DONE


Problem with socket hangup with upgrade to Node 20

We are getting these error after attemping to run the system with Node 20:
transition-www_1  | 2024-09-16T17:12:21.441422810Z FetchError: request to http://localhost:2000/node failed, reason: socket hang up
transition-www_1  | 2024-09-16T17:12:21.441489135Z     at ClientRequest. (/app/node_modules/node-fetch/lib/index.js:1491:11)
transition-www_1  | 2024-09-16T17:12:21.441507791Z     at ClientRequest.emit (node:events:519:28)
transition-www_1  | 2024-09-16T17:12:21.441523069Z     at Socket.socketOnEnd (node:_http_client:524:9)
transition-www_1  | 2024-09-16T17:12:21.441537958Z     at Socket.emit (node:events:531:35)
transition-www_1  | 2024-09-16T17:12:21.441552385Z     at endReadableNT (node:internal/streams/readable:1696:12)
transition-www_1  | 2024-09-16T17:12:21.441566892Z     at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
transition-www_1  | 2024-09-16T17:12:21.441617508Z   type: 'system',
transition-www_1  | 2024-09-16T17:12:21.441632897Z   errno: 'ECONNRESET',
transition-www_1  | 2024-09-16T17:12:21.441647244Z   code: 'ECONNRESET'
transition-www_1  | 2024-09-16T17:12:21.441661591Z }
transition-www_1  | 2024-09-16T17:12:21.801362057Z FetchError: request to http://localhost:2000/node failed, reason: socket hang up
transition-www_1  | 2024-09-16T17:12:21.801415418Z     at ClientRequest. (/app/node_modules/node-fetch/lib/index.js:1491:11)
transition-www_1  | 2024-09-16T17:12:21.801433903Z     at ClientRequest.emit (node:events:519:28)
transition-www_1  | 2024-09-16T17:12:21.801449052Z     at Socket.socketOnEnd (node:_http_client:524:9)
transition-www_1  | 2024-09-16T17:12:21.801464080Z     at Socket.emit (node:events:531:35)
transition-www_1  | 2024-09-16T17:12:21.801478587Z     at endReadableNT (node:internal/streams/readable:1696:12)
transition-www_1  | 2024-09-16T17:12:21.801493135Z     at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
transition-www_1  | 2024-09-16T17:12:21.801508083Z   type: 'system',
transition-www_1  | 2024-09-16T17:12:21.801522841Z   errno: 'ECONNRESET',
transition-www_1  | 2024-09-16T17:12:21.801537278Z   code: 'ECONNRESET'
transition-www_1  | 2024-09-16T17:12:21.801551565Z }

See if this is a variation of #1011 where we sometimes get fetch errors also in node 18 with trRouting.


dask delayed closure problems

here is the code that illustrates the problem i have
from dask import delayed, compute

def it():
    for i in range(10):
        yield lambda: i

print ([f() for f in it()]) #this is how i want it to work (expected behaviour)

delFs = [delayed(f)() for f in it()]

print (compute(*delFs)) #this is how it works

print ([f() for f in list(it())])   #it works like this

Output:
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
(9, 9, 9, 9, 9, 9, 9, 9, 9, 9)
[9, 9, 9, 9, 9, 9, 9, 9, 9, 9]

Do not know if it is supposed to be an issue.
Is there some way to achieve expected behaviour? Thanks.

This has to do with when python binds names for function. You could use partial to ensure your inner function gets the correct i.
In [48]: from functools import partial

In [49]: def it():
    ...:     for i in range(10):
    ...:         def f(i):
    ...:             return i
    ...:         yield partial(f, i)
    ...:
    ...:

In [50]: print ([f() for f in list(it())])
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

Tom is right - the reason your code runs differently is that in the delayed version i has iterated to 9 in its scope before any of the f's are actually called. It's an issue with how you're creating the functions, not how dask is using them.
The fix above is the one I would suggest, but can also be done using an extra scope (to illustrate the issue):
In [1]: def it():
   ...:     def make_f(i):
   ...:         return lambda: i
   ...:     for i in range(10):
   ...:         yield make_f(i)
   ...:

In [2]: print([f() for f in list(it())])
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

Given the choice between a partial or a closure, I'd suggest a partial as it will serialize better if you ever need to move to multiprocessing/distributed.

Closing for now, as this isn't an issue with dask - rather it's an issue with how you create your functions.