Reduce subprocess verbosity on call, or invoke, error

Maybe reducing subprocess exception could be a first step until a better error reporting?
Related to #117.
Before the patch:
Got BadRequest while trying to access https://alpha4.starknet.io/feeder_gateway/call_contract?blockNumber=null. Status code: 500; text: {"code": "StarknetErrorCode.UNINITIALIZED_CONTRACT", "message": "Contract with address 0x123 is not deployed."}.
Traceback (most recent call last):
  File "./venv/lib/python3.9/site-packages/services/external_api/base_client.py", line 120, in _send_request
    raise BadRequest(status_code=response.status, text=text)
services.external_api.base_client.BadRequest: HTTP error ocurred. Status: 500. Text: {"code": "StarknetErrorCode.UNINITIALIZED_CONTRACT", "message": "Contract with address 0x123 is not deployed."}
Error: BadRequest: HTTP error ocurred. Status: 500. Text: {"code": "StarknetErrorCode.UNINITIALIZED_CONTRACT", "message": "Contract with address 0x123 is not deployed."}
Traceback (most recent call last):
  File "./venv/bin/nile", line 8, in <module>
    sys.exit(cli())
  File "./venv/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "./venv/lib/python3.9/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "./venv/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "./venv/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "./venv/lib/python3.9/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "./venv/lib/python3.9/site-packages/nile/cli.py", line 132, in call
    out = call_or_invoke_command(contract_name, "call", method, params, network)
  File "./venv/lib/python3.9/site-packages/nile/core/call_or_invoke.py", line 40, in call_or_invoke
    return subprocess.check_output(command).strip().decode("utf-8")
  File "/usr/lib/python3.9/subprocess.py", line 424, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['starknet', 'call', '--address', '0x123', '--abi', 'artifacts/abis/ERC721.json', '--function', 'get_animal_characteristics', '--inputs', '42', '0']' returned non-zero exit status 1.

With the patch:
Got BadRequest while trying to access https://alpha4.starknet.io/feeder_gateway/call_contract?blockNumber=null. Status code: 500; text: {"code": "StarknetErrorCode.UNINITIALIZED_CONTRACT", "message": "Contract with address 0x123 is not deployed."}.
Traceback (most recent call last):
  File "./venv/lib/python3.9/site-packages/services/external_api/base_client.py", line 120, in _send_request
    raise BadRequest(status_code=response.status, text=text)
services.external_api.base_client.BadRequest: HTTP error ocurred. Status: 500. Text: {"code": "StarknetErrorCode.UNINITIALIZED_CONTRACT", "message": "Contract with address 0x123 is not deployed."}
Error: BadRequest: HTTP error ocurred. Status: 500. Text: {"code": "StarknetErrorCode.UNINITIALIZED_CONTRACT", "message": "Contract with address 0x123 is not deployed."}

Hey @ca11ab1e! Thanks for creating these PRs! Right now, we're focusing on getting v0.2.0 of Contracts for Cairo out, but we'll check these out as soon as we can :)


ci: simplify spdk_tgt start and stop

Which issue(s) this PR fixes:

Issue #
What this PR does / why we need it:
Special notes for your reviewer:
Additional documentation or context

I prefer to launch a new tgt_target for each test case so that we can avoid some potential leftovers left by the previous tests.

Sounds good. Or before running each case, just cleaning up the potential leftover instances?

I prefer to launch a new tgt_target for each test case so that we can avoid some potential leftovers left by the previous tests.

Got it. The original method launching new tgt_target leads to random timeout error in both arm64 and amd64 platforms. I think it is due to something wrong in StartTarget function. We need to fix it first.

or we don't need to restart the target but rather use different resource names for each test so that they will be independent of each other. Although there would be a chance to have leftover instances from executed tests, the following tests will not be impacted.


Add experience summary

Added experience summary
Fixed broken education and employment tests.

This should be good now.


Rearrange canPutIntoPlay check

Checking whether a card by title is allowed to be put into play/marshalled, should happen before the unique check.

I’m sure this is correct, but what issue is it addressing?

The issue where you would return any non-unique with "The Iron Bank Will Have Its Due", and then would be allowed to marshal or put it into play again.

Action: If it is not the taxation phase, kneel your faction card and return a character to your hand to gain gold equal to that character's printed cost. Until the end of the round, you cannot marshal or put into play any card with the same title as that character.

Cool, thanks!


Fix custom operator new for clang with noexcept

clang ignores gcc's -fcheck-new flag, which means that the few custom
operator new implementations in AMDVLK did not handle OOM conditions
properly and invoked constructors with null this pointers. But
fortunately, all of theose operators are custom user operators, by
virtue of using a custom third argument. Consequently, they are allowed
to be noexcept, which will force the compiler to emit a null check. This
is a better fix than using -fcheck-new and will work with any standard
C++ compiler.

ok to test

test this please

@mgsegal , could you rebase your local branch onto latest dev branch then force-push it?
your branch is 7 commits behind GPUOpen-Drivers:dev

@mgsegal  PING?

Done; sorry for the delay.

Test summary for commit 297eb0e993913a1bc8624e7cda224776759e57b4
Driver commits used in build
CWPACK: amd-master 7387247eb9889ddcabbc1053b9c2052e253b088e
METROHASH: amd-master 3c566dd9cda44ca7fd97659e0b53ac953f9037d2
LLPC: dev d472369edecdf5d343500c3462ea80717fc9fa45
SPVGEN: dev e1f1881d84cd1c7a6c1d661cbac0e619b4e110c1
XGL: dev 63761ecfd2d3cfa61a756ce0a72e1ca1cdae333a
LLVM-PROJECT: amd-gfx-gpuopen-dev fde3d4e2bd90743606ca7b724bf62a53cacf4615

CTS tests (Failed: 0/144501)Built with version <IP_ADDRESS>
Ubuntu 20.04, Gfx10
Passed: 26321/48174 (54.6%)
Failed: 0/48174 (0.0%)
Skipped: 21853/48174 (45.4%)

Ubuntu 18.04, Gfx9
Passed: 26320/48174 (54.6%)
Failed: 0/48174 (0.0%)
Skipped: 21854/48174 (45.4%)

Rhel 8.2, Gfx8
Passed: 24852/48153 (51.6%)
Failed: 0/48153 (0.0%)
Skipped: 23301/48153 (48.4%)


No error code when file doesn't' exist or isn't a markdown file

I noticed the mdfile executable doesn't return any error code if the file passed in parameter doesn't exists or isn't a markdown file.

Huh you seem to be right, this isn't something I've ever really had an issue with but it's a sensible thing for us to do. I'd welcome any patches if someone wants to submit one which implements this 😄


Emmet: compact boolean attributes won't work

VSCode Version: Code 1.15.0 (8b95971d8cccd3afd86b35d4a0e098c189294ff2, 2017-08-09T20:16:18.034Z)
OS Version: Windows_NT x64 10.0.15063
Extensions:

Extension
Author (truncated)
Version

vscode-caniuse
aka
0.5.3

vscode-color
ans
0.4.5

vscode-simpler-icons
dav
1.3.0

githistory
don
0.2.3

pgsql
dou
0.0.8

vscode-babel-coloring
dza
0.0.4

vscode-great-icons
emm
2.1.14

prettier-vscode
esb
0.22.1

auto-close-tag
for
0.4.3

auto-rename-tag
for
0.0.14

RelativePath
jak
1.0.0

sublime-babel-vscode
jos
0.2.6

sublime-keybindings
ms-
2.9.1

material-icon-theme
PKi
2.1.0

vscode-css-peek
pra
1.3.1

seti-icons
qin
0.1.3

quokka-vscode
Wal
1.0.48

(3 theme extensions excluded)

Emmet has a profile.allowCompactBoolean preference shown here that defaults to true. For some reason it's not documented in the syntax profile options, but in the code the functionality seems to also rely on a compact_bool flag being set on the profile, which should be true by default for HTML, and false by default for other profiles.
I can't seem to find a way to make this work in VS Code, it will always use the attribute name as the value. I've tried in both HTML and JSX.
Steps to Reproduce:

In an HTML file or similar type div[contenteditable] or div[whatever.] and expand with Emmet
Observe that the output is

 or

Set emmet.syntaxProfiles to:

{
  "html": {
    "compact_bool": true
  }
}

Try again, no luck.

Reproduces without extensions: Yes

@sergeche Is this feature available in Emmet 2.0?

It’s called compactBooleanAttributes now: https://github.com/emmetio/output-profile/blob/master/defaults.js#L60

@sergeche That works, thanks!
Have all the profile options been renamed then? It's a bit confusing because the Emmet 2.0 blog post still references the documentation with the old names and gives an example using attr_quotes and self_closing_tag, which still seem to work (along with their new names).

@noinkling yes, almost everything was changed in Emmet 2.0. The purpose of these changes is to create a unified UI for tweaking Emmet per user/project basis, e.g. in future, somewhere on emmet.io you’ll have a UI for quick tuning your Emmet instance

Sounds great 👍
If the other old option names still work, maybe compact_bool should as well, just to be consistent?

A better solution is to provide import from v1 to v2 that will automatically update old configs to new format

Thanks @sergeche!
@noinkling Yes, to keep people's existing profile settings working, I internally mapped the old names to the new names, and any that I didn't have a mapping for, I pass it right along.
But looks like I have missed a few.
Will use this issue to add mapping for the rest of them.

Since I didn't find compact_bool in the documentation for syntax profiles, I was not aware that it exists!
Right now I map the below

tag_case
atrr_case
attr_quotes
tag_nl
inline_break
self_closing_tag

@sergeche Apart from compact_bool, is there anything else I am missing that users might have had before?

Added support to map compact_bool to compactBooleanAttributes with https://github.com/Microsoft/vscode-emmet-helper/commit/52e1d6f6568bdf532b5159fa3cf83c74cfaec0d7


RuntimeError: Input type (MPSHalfType) and weight type (torch.HalfTensor) should be the same for RVC with mps

Hi, I faced this issue when I tried to use RVC with mps (mac m2), and I got this issue.
没有发现支持的N卡, 使用MPS进行推理

logs...

RuntimeError: Input type (MPSHalfType) and weight type (torch.HalfTensor) should be the same

This is current GUI setting

Can you please check this issue?

I found out that RVC config is automatically set device="mps" if mps is available.
So that's why it shows logs as 没有发现支持的N卡, 使用MPS进行推理, then it caused mismatch of device setting.
I can make it work by adding this hard code here.
https://github.com/rsxdalv/tts-generation-webui/blob/main/src/rvc_tab/rvc_tab.py#L61
    if device == "cpu":  # Workaround for "slow_conv2d_cpu" not implemented for 'Half'
        config.is_half = is_half
        config.device = "cpu"

But I guess better solution is to enable mps for the device setting in UI, but I'm not sure if it is possible.

I can add mps as an option, but I can't test if it will work outright. For now, here's the code to add it to the dropdown
https://github.com/rsxdalv/tts-generation-webui/blob/e14c4ca29a3acd679e9b0e1b2966ef7275d7b969/src/rvc_tab/rvc_tab.py#L217
python
                        ["cuda:0", "cpu", "mps"], label="Device", value="cuda:0"

python
with gr.Group():
                gr.Markdown("### Hubert")
                with gr.Row():
                    device = gr.Dropdown(
                        ["cuda:0", "cpu", "mps"], label="Device", value="cuda:0"
                    )
                    is_half = gr.Checkbox(
                        label="Use half precision model (Depends on GPU support)",
                        value=False,
                    )
                    gr.Button(
                        value="Clear Hubert (to reload on next generation)",
                        variant="secondary",
                    ).click(
                        fn=lambda: inject_hubert(None)
                    )  # type: ignore

Thanks! I tried to add the mps option in RVC section, and I got this error
NotImplementedError: The operator 'aten::_weight_norm_interface' is not currently implemented for the MPS device. If you want this op to be added in priority during the prototype phase of this feature, please comment on https://github.com/pytorch/pytorch/issues/77764. As a temporary fix, you can set the environment variable `PYTORCH_ENABLE_MPS_FALLBACK=1` to use the CPU as a fallback for this op. WARNING: this will be slower than running natively on MPS.

It seems weight_norm_interface is not implemented yet in Pytorch, so looks like it is better to wait for the update.
I checked the thread here and found many votes for the implementation, so I hope it will be included soon.
https://github.com/pytorch/pytorch/issues/77764

Interesting, I thought that they would have this set up since they force
RVC. If you'd like to test the CPU fallback you can put the
PYTORCH_ENABLE_MPS_FALLBACK=1
Inside of tts-generation-webui/.env and restart the webui. This file
gets overwritten only when you edit bark or model location settings.
On Sat, Jul 22, 2023, 6:49 AM Ai Nagi @.***> wrote:

Thanks! I tried to add the mps option in RVC section, and I got this error
NotImplementedError: The operator 'aten::_weight_norm_interface' is not currently implemented for the MPS device. If you want this op to be added in priority during the prototype phase of this feature, please comment on https://github.com/pytorch/pytorch/issues/77764. As a temporary fix, you can set the environment variable PYTORCH_ENABLE_MPS_FALLBACK=1 to use the CPU as a fallback for this op. WARNING: this will be slower than running natively on MPS.
It seems weight_norm_interface is not implemented yet in Pytorch, so looks
like it is better to wait for the update.
I checked the thread here and found many votes for the implementation, so
I hope it will be included soon.
pytorch/pytorch#77764 https://github.com/pytorch/pytorch/issues/77764
—
Reply to this email directly, view it on GitHub
https://github.com/rsxdalv/tts-generation-webui/issues/89#issuecomment-1646446197,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABTRXI2ECVXVD4OLIQFPSJDXRNEVPANCNFSM6AAAAAA2S3KPSI
.
You are receiving this because you commented.Message ID:
@.***>


Drag and Drop feature

Description
Adding some drag & drop feature to the kanban boards. Successfully completing and merging this feature will also complete the following:

#82
#74

Additional cleanup items:

Ensuring that the task can only be edited when the slide-over is open
color themes
new tasks appear in a container and are rendered correctly

Resources:
https://www.robinwieruch.de/react-drag-and-drop/
https://rootstack.com/en/blog/how-do-i-use-drag-and-drop-react
https://codesandbox.io/s/react-beautiful-dnd-board-base-0dv9b?file=/src/dnd/reorder.js
Proposed Solution (for features)

Drag and drop solution from tutorial
Tasks are created and rendered within the associated column (based on user input and clicking action within the said column)
CRUD Column Management
CRUD Tasks
Tasks are edited within Slideover
Comments Rendering within Slideover

Tasks
Note: this feature incorporates many of the functionalities and issues outstanding. Completing this issue will complete the others.

[ ] Task 1
[ ] Task 2

Related Issues or PRs (optional)
[If there are any related issues or pull requests, link them here]

Updated with latest details


How to break from the iterable?

I'm wondering how you would break from the iterable provided by .by('days', momentDay => {...}). Is this possible and how?

Hey @nealoke, if you wrap the result of .by in Array.from, you can break out of it like you would with any other array.

@Rhysjc thanks :) would you be able to provide a small example? I don't really understand how I would do that.

@nealoke If you look at the docs for .by there's an example of Array.from in there 😁

@Rhysjc ooh waaw, did the documentation change or did I just missed that totally? :D
Thanks!


[SPARK-48510] Fix for UDAF toColumn API when running tests in Maven

What changes were proposed in this pull request?
This PR fixes an issue where the TypeTag look up during udaf.toColumn failed in Maven test env with the following error:

java.lang.IllegalArgumentException: Type tag defined in [JavaMirror with jdk.internal.loader.ClassLoaders$AppClassLoader@1dbd16a6 of type class jdk.internal.loader.ClassLoaders$AppClassLoader with classpath [] and parent being jdk.internal.loader.ClassLoaders$PlatformClassLoader@6bd61f98 of type class jdk.internal.loader.ClassLoaders$PlatformClassLoader with classpath [] and parent being primordial classloader with boot classpath []] cannot be migrated to another mirror [JavaMirror with java.net.URLClassLoader@5a4041cc of type class java.net.URLClassLoader with classpath [file:/<redacted>/spark/connector/connect/client/jvm/target/scala-2.13/classes/,file:/<redacted>/spark/connector/connect/client/jvm/target/scala-2.13/test-classes/] and parent being jdk.internal.loader.ClassLoaders$AppClassLoader@1dbd16a6 of type class jdk.internal.loader.ClassLoaders$AppClassLoader with classpath [] and parent being jdk.internal.loader.ClassLoaders$PlatformClassLoader@6bd61f98 of type class jdk.internal.loader.ClassLoaders$PlatformClassLoader with classpath [] and parent being primordial classloader with boot classpath []].

The problem is caused by Maven adding a URLClassLoader on top of the original AppClassLoader (see the underlined texts in the above error message).
This PR changes the mirror-matching logic from eq to hasCommonAncestors.
Why are the changes needed?
Previous logic fails in tests env.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Existing tests.
Was this patch authored or co-authored using generative AI tooling?
No.

@itholic wanna try merging this?

Merged to master

Oh, is this still failing with the different error, @xupefei ?
- UDAF custom Aggregator - toColumn *** FAILED ***
  java.lang.NullPointerException: Cannot invoke "java.lang.ClassLoader.getParent()" because "x$2" is null


update dependency to current

Dependencies on other libraries built within the same pipeline should be current.

@srnagar and @conniey I'll defer to you on this as Azure Core AMQP 1.0.1 hasn't been released.


feat: toggle theme icon at the same time

What do you think? I used this method on my website, doing well.

Interesting. How does this handle selecting system or cycling through modes?

https://github.com/pacocoursey/next-themes#avoid-hydration-mismatch
I just remembered. The problem is actually explained on the readme.

Sorry, I forgot to update the mode-toggle. But this will report a hydration error in development.
Couldn't solve it, for some reason this wasn't showing up in my project.

This worked for me:
"use client"

import { useEffect, useState } from "react"
import { useTheme } from "next-themes"

import { Laptop, Moon, Sun } from "@/components/icons"
import { Button } from "@/components/ui/Button"
import {
  DropdownMenu,
  DropdownMenuContent,
  DropdownMenuItem,
  DropdownMenuTrigger,
} from "@/components/ui/DropdownMenu"

export function ThemeToggle() {
  const [mounted, setMounted] = useState(false)
  const { setTheme, theme } = useTheme()

  // useEffect only runs on the client, so now we can safely show the UI
  useEffect(() => {
    setMounted(true)
  }, [])

  if (!mounted) {
    return null
  }

  const Icon = {
    system: Laptop,
    light: Sun,
    dark: Moon,
  }

  const ThemeIcon = Icon[theme]

  return (
    <DropdownMenu>
      <DropdownMenuTrigger asChild>
        <Button variant="ghost" size="sm">
          <ThemeIcon className="hover:text-slate-900 dark:text-slate-400 dark:hover:text-slate-100" />
          Toggle theme
        </Button>
      </DropdownMenuTrigger>
      <DropdownMenuContent align="end" forceMount>
        <DropdownMenuItem onClick={() => setTheme("light")}>
          <Sun className="mr-2 h-4 w-4" />
          Light
        </DropdownMenuItem>
        <DropdownMenuItem onClick={() => setTheme("dark")}>
          <Moon className="mr-2 h-4 w-4" />
          Dark
        </DropdownMenuItem>
        <DropdownMenuItem onClick={() => setTheme("system")}>
          <Laptop className="mr-2 h-4 w-4" />
          System
        </DropdownMenuItem>
      </DropdownMenuContent>
    </DropdownMenu>
  )
}

There is a small problem with this line:
const ThemeIcon = Icon[theme]

Type 'undefined' cannot be used as an index type.


Redefinition of module 'FFI'

Describe the bug
macOS 13.6.6
Xcode 15.2
Building Adwaita Swift Pkg give the following error:
Redefinition of module 'FFI'
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/ffi/module.modulemap:1:8 Redefinition of module 'FFI'
Homebrew and libffi on my M1 mac:
admin@mbam1 ~ % which pkg-config
/opt/homebrew/bin/pkg-config
admin@mbam1 ~ % pkg-config --cflags libffi
-I/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/ffi
I found this same issue previously reported in Homebrew and SwiftPM sites by user having same clash problem
when they try building swift-systemlib-demo.
Related links:
Strange clash between Xcode and command-line tools when building Swift system library package #4025
https://github.com/orgs/Homebrew/discussions/4025
Patch *.sdk paths from pkgConfig files to the current SDK #6772
https://github.com/apple/swift-package-manager/pull/6772
See details here: https://github.com/apple/swift-package-manager/issues/6439
I give a try to compile the Swift package swift-systemlib-demo and its fine without error.
As explained in This package that was used by the SwiftPM team to reproduce the error and test their fix.
It just strange the error re-appear when building Adwaita for Swift.
Any idea ?
To Reproduce
Download the Swift package and
swift build
Expected behavior
Build success
Additional context
Building for debugging...
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/ffi/module.modulemap:1:8: error: redefinition of module 'FFI'
module FFI [system] {
^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/ffi/module.modulemap:1:8: note: previously defined here
module FFI [system] [extern_c] {
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/ffi/module.modulemap:1:8: error: redefinition of module 'FFI'
module FFI [system] {
^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/ffi/module.modulemap:1:8: note: previously defined here
module FFI [system] [extern_c] {

Thanks for opening the issue, @litewrap! I experienced this as well when testing on macOS. Here is what works for me:

Clean the build folder (Xcode: Product > Clean Build Folder...).
Reset package caches (Xcode: File > Packages > Reset Package Caches)
Delete the DerivedData folder (~/Library/Developer/Xcode/DerivedData)
Run the following command in a terminal:

sed -i '' 's/-I..includedir.//g' $(brew --prefix)/Library/Homebrew/os/mac/pkgconfig/*/libffi.pc

Resolve package versions (Xcode: File > Packages > Resolve Package Versions)
Run the app. Now, it succeeds.

I'm not sure whether every step is strictly necessary. Does that help in your case?

Does that help in your case?
Yes package build success !

Thanks David and bravo for this great package !!

Thank you!


Error reading templates/**/*.html

Package Version
1.2.0
OS
Windows 11
Description
Hi Adam,
I don’t understand why templates/**/*.html isn’t working.

Thank you

That is shell-specific syntax, it seems it does not work on your shell, which is PowerShell I think. You need to find the specific syntax for your shell.

Yes, I found
pdm run djade.exe --target-version 5.1 (Get-ChildItem templates -Recurse -Filter *.html).FullName

Maybe it would be helpful to specify that in the README.

I went the other way and dropped the globbing from the examples in 1a9a8ee2e55216f9dba995cb027cc6d7515bad9b


Opening InputStream Helper info pane hangs Kodi

When you open the InputStream Helper add-on information pane (either by clicking the add-on in the "Add-ons / Recently updated" menu, or by following the dependency of a package), your Kodi completely freezes.
This happened to me on LibreELEC v9.0.2 (Raspberry Pi) as well as on Windows 10 Kodi v18.4.

This happens with all InputStream Helper versions on Kodi 18 and higher.
No problem on Kodi 17, the information pane just shows up.

I found out there is a required element missing in addon.xml, I don't know if this is related to the freezing but it's definitely a good idea to fix this.  https://github.com/emilsvennesson/script.module.inputstreamhelper/pull/148

Confirmed on LibreELEC.  An update was offered from 0.3.5 to 0.4.1 but I cannot install it because the Kodi UI freezes when the property panel is opened.  On the RPi platform, CPU load on one core sticks at 100%.  (This is also a bug in Kodi because it should be possible to cancel instead of freezing the user interface.)  Same issue exists in 0.4.1.

Kodi debug log
DEBUG: LIRC: - NEW 166 0 KEY_INFO devinput (KEY_INFO)
DEBUG: HandleKey: launch_media_center (0xc3) pressed, action is info
DEBUG: ------ Window Init (DialogAddonInfo.xml) ------
 INFO: Loading skin file: DialogAddonInfo.xml, load type: KEEP_IN_MEMORY
DEBUG: CAddonSettings[script.module.inputstreamhelper]: loading setting definitions
DEBUG: CAddonSettings[script.module.inputstreamhelper]: trying to load setting definitions from old format...
DEBUG: CAddonSettings[script.module.inputstreamhelper]: loading setting values

@kekukui Please try release v0.4.0, I am confident it works.
https://github.com/emilsvennesson/script.module.inputstreamhelper/releases/download/v0.4.0/script.module.inputstreamhelper-0.4.0.zip

Same problem with 0.4.0.

I did a couple of tests with a clean Windows 10 Kodi 18.4 install:

rename existing add-on script.module.tzlocal to script.module.inputstreamhelper ==> Kodi freezes
rename script.module.inputstreamhelper to script.module.ishelper ==> Kodi doesn't freeze, but information pane doesn't open

My conclusion is that Kodi gets no or corrupted info from the repo server. I think the following statements are true:

script.modules with unknown add-on id  to the repo server  ==> no information pane is showed
script.module.inputstreamhelper regardless of the version or package content ==> Kodi 18 and higher freezes

As a test I renamed script.module.inputstreamhelper to script.module.ishelper and getting the information pane from the context menu of the add-on item just works.

It only doesn't show up when trying to open it from the dependencies menu, probably because dependencies are checked against the Kodi repo.
I conclude this problem is related to the Kodi repo and the previous 0.4.1 release.

When testing v0.4.0 (granted the add-on ZIP was versioned 0.3.5 then) I have not experienced this either, but someone reported that he also sees this with the v0.4.0 release.

This was probably because at that time version 0.3.5 was the newest version in the Kodi repo.
I tested yesterday with version 0.3.4 and it also freezed. My conclusion is that this problem occurs for all versions since version 0.4.1 is available through the Kodi repo.

So we need to report this upstream? Don't forget your debug log! :wink:

I found the problem. Kodi stores the addon.xml data from the repo into Addons27.db.
When you load the information pane, it processes this data from the database and Kodi freezes when an add-on has itself as a dependency. Most likely Kodi is trying to read the inputstreamhelper database record that is already opened again for processing the add-ons dependencies.
Final conclusion: we cannot use <import addon="plugin.program.inputstreamhelper"/> in addon.xml

That was my assumption from the start. That's also why I said whether this is still needed when we use RunScript(). We can just do from lib import ....

I guess there's nothing stopping us now from release v0.4.2.

I think moving addon.py to the lib directory is a more simple solution. I'll create a pull request for this.

The only issue I see with moving it to the lib/ directory is that it is exposed to other modules. Which could be dangerous as it will live in the same namespace as other modules. (For that reason config.py is really misplaced there).
I'd rather leave addon.py outside of lib/ (for module plugins) and move inputstreamhelper to lib/inputstreamhelper/init.py (and split it up). But that was planned for v0.5.0.

And to finish that line of thought, we should get rid of config.py completely and not expect users to modify running code for changing behaviour. Every change of behaviour we want to allow should be going through settings. Config.py must die, die, DIE!.

If you can manage to create a pull request for this today, be my guest. I was thinking about releasing 0.4.2 today...

Ok, I have the PR ready, but I think we do hit a real bug in Kodi.
It is something I have seen earlier as well.
The dependencies of an add-on are never being cleaned up. So if an add-on removes a dependencies in addon.xml, it will not be cleaned up in Kodi.
When we removed requests from the VRT NU add-on, it carried the dependencies to requests, urllib3, chardet, idna and certifi forward, even when we had no dependency to them any longer.

Performing select * from addons where addonID == 'script.module.inputstreamhelper'; insqlite on the Addons database fixes everything.

When we removed requests from the VRT NU add-on, it carried the dependencies to requests, urllib3, chardet, idna and certifi forward, even when we had no dependency to them any longer.

When we removed requests, these dependencies were still needed by inputstreamhelper, so we still needed them to make inputstreamhelper work.

When we removed requests, these dependencies were still needed by inputstreamhelper, so we still needed them to make inputstreamhelper work.

That would be correct, but this was after we also removed requests from inputstreamhelper.

So, you're talking about v0.4.1, because v0.4.0 was never added to the Kodi repo and v0.3.5 still needed the requests library.

This was during testing, so they were called v0.3.5, but it was v0.4.0 in testing.

I think the current Kodi repo add-on version determines the dependencies.
We never had a VRT NU add-on in the Kodi repo with a InputStream Helper v0.4.1 dependency....

Ok, we'll see. Fact is that the problem remains with this future v0.4.2, and I guess we will find out when it hits the repository then. The problem remains until you clean up the Addons db, that is for sure.

And the Addons db gets its stuff from Kodi repo, that's also for sure. That why it kept freezing for all versions on all platforms.

That is not the case when you install from ZIP at least.


Memory Leak in CameraView

Hi afriscic
Many thanks for your work on this project lately.
Unfortunately, since version 1.4.0 the CameraView started to leak again.
I.e. the page containing a CameraView never gets garbage collected anymore.
        <scanner:CameraView
            x:Name="MyCameraView"
            OnDetectionFinished="MyCameraView_OnOnDetectionFinished"
            AimMode="True"
            CaptureQuality="Highest" />

I have a sample project that demonstrates that problem:
https://github.com/marco-skizza/BarcodeScanningNativeMauiLeak
Steps to Reproduce:

Disable Hot Reload in Visual Studio
Run the project
Click Button and go back again multiple times
Observe that ~ScannerLeakPage() called never gets logged

This seems to be a problem with iOS as well as Android.

Hello.
I tried your code, at least on Android. The problem is that in your example MyCameraView.Handler?.DisconnectHandler(); never gets called. When i added in ScannerLeakPage.xaml:
...Title="ScannerLeakPage"
   Unloaded="ContentPage_Unloaded">

and in ScannerLeakPage.xaml.cs:
private void ContentPage_Unloaded(object sender, EventArgs e)
{
    MyCameraView.Handler?.DisconnectHandler();
}

and then DisconnectHandler() and ~ScannerLeakPage() both get called and memory footprint stays consistent.
I don't know why, at least on Android emulator, it takes 2-3 page openings and closings so that ~ScannerLeakPage() gets called but after that it is called consistently.

Sorry for that! I forgot that I have the specific dispose code for iOS in place.
So I guess it's an iOS issue only...
P.S.: Yeah, the Garbage Collector is not very predictable. For me it also takes several forth and back to observe it correctly.

Can you please report back the last version that you can confirm that got garage collected normally on iOS

I'm now using version 1.3.1 from NuGet.
This seems to be the last version where the controls gets Garbage Collected.

Hopefully it is fixed in 1.4.2. I have tested your example on Android and macOS and ~ScannerLeakPage() gets triggered.
Please, if you can test on iOS and report back.

Yes, it works now. Many thanks!

Fixed in version 1.4.2


feat: 提供业务函数导出接口

good

发件人: 苏向夜 @.>
发送时间: 2024年1月27日 19:10
收件人: HydroRoll-Team/infini @.>
抄送: 简律纯 @.>; Assign @.>
主题: Re: [HydroRoll-Team/infini] feat: 提供业务函数导出接口 (Issue #44)
Closed #44https://github.com/HydroRoll-Team/infini/issues/44 as completed.
―
Reply to this email directly, view it on GitHubhttps://github.com/HydroRoll-Team/infini/issues/44#event-11616093845, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKVETAAGLGAUJGLPZNCILP3YQTOEFAVCNFSM6AAAAABAYSJQC6VHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJRGYYTMMBZGM4DINI.
You are receiving this because you were assigned.Message ID: @.***>


Data Viewer Bug: Pandas table does not display with datetime objects

Issue Type: Bug
When a column contains datetime object with timezone specified. For example if we have a table with a column with unix timestamps in ms, and we want to create a corresponding column with the local time:
data["datetime"] = data["ts"].map(lambda x: pd.Timestamp(int(x), unit="ms", tzinfo=gettz("Europe/London")))
It works if we don't provide tzinfo though.
Extension version: 2019.8.30787
VS Code version: Code 1.37.0 (036a6b1d3ac84e5ca96a17a44e63a87971f8fcc8, 2019-08-08T01:22:37.660Z)
OS version: Darwin x64 18.7.0
Remote OS version: Linux x64 4.9.184-linuxkit

has this problem come back? getting it now

Duplicate of https://github.com/microsoft/vscode-jupyter/issues/11680


Google Trusted Publishing docs

Towards #13551, merging adds this to #15192.
(Doesn't actually work right now due to https://github.com/pypi/warehouse/issues/13551#issuecomment-1888051237)

I was able to publish https://test.pypi.org/project/gcp-oidc-test/ from a Google Cloud Compute Engine VM with these instructions:


MWPW-144549 CTA alignment for Text, Icon, and Media Blocks

Align CTAs of Text, Icon, and Media blocks in "-up" sections

Resolves: MWPW-144549
Test URLs:

Before: https://main--milo--adobecom.hlx.page/drafts/methomas/text-alignment
After: https://methomas-text-alignment--milo--adobecom.hlx.page/drafts/methomas/text-alignment?martech=off

Bacom:

Before: https://main--bacom--adobecom.hlx.live/products/experience-manager/assets/pricing
After: https://main--bacom--adobecom.hlx.live/products/experience-manager/assets/pricing?milolibs=methomas-text-alignment
Before: https://main--bacom--adobecom.hlx.live/
After: https://main--bacom--adobecom.hlx.live/?milolibs=methomas-text-alignment

Kitchen sink:

Text: https://methomas-text-alignment--milo--adobecom.hlx.page/docs/library/kitchen-sink/text
Icon: https://methomas-text-alignment--milo--adobecom.hlx.page/docs/library/kitchen-sink/icon-block
Media: https://methomas-text-alignment--milo--adobecom.hlx.page/docs/library/kitchen-sink/media

Edge cases and regression:

https://methomas-text-alignment--milo--adobecom.hlx.page/drafts/methomas/text-alignment-all

I'm closing this pull request for now because I've found some edge cases to account for. I'll re-open when it's ready to look at again. Thanks!

I've reopened the PR, and it's ready for review!
Here's a lengthier test page of mostly edge cases. I added all variants, even ones that are unlikely to be used in the "-up" pattern: https://methomas-text-alignment--milo--adobecom.hlx.page/drafts/methomas/text-alignment-all

Also Is there any layout considerations for when/if a .supplemental-text or subtext is used after the .action-area. I made a draft here to explore these and for the most part it looks to just ignore those use cases since the .action-area is no longer the :last-child etc. Just wondering if that was a consideration or concern?

@ryanmparrish I'll take a look and see if there's anything to clean up. Are these just edge cases or are there real use cases where we support this?

Also Is there any layout considerations for when/if a .supplemental-text or subtext is used after the .action-area. I made a draft here to explore these and for the most part it looks to just ignore those use cases since the .action-area is no longer the :last-child etc. Just wondering if that was a consideration or concern?

@ryanmparrish There's a use case for the media block that has text after the action areas so the solution was to exclude the alignment functionality in that case.

That's done with the :last-of-type selector, which I had on the media and text blocks. I've rewritten the icon block functionality to match better so they all work that way.
I've also added your use cases to my edge case test page: https://methomas-text-alignment--milo--adobecom.hlx.page/drafts/methomas/text-alignment-all

Hi @meganthecoder ! I see that the unit tests check is failing, can you please look into that?

@robert-bogos The unit tests are passing now, so I'm adding back the Ready for Stage label. In any case, the failed unit tests were for bulk-publish-v2 and unrelated to this PR.

Looks like this won't get out today, so I'll put it on hold until I get back from PTO


Where does the malware save to?

whenever i click generate source something happens but i dont know where the malware is stored plez help

PySilon-malware-3.7.5\dist


test(ticdc): fix data inconsistence on integration_tests

What problem does this PR solve?

Issue Number: close #11583
What is changed and how it works?
remove rows before add column xxx default now();
Check List
Tests

Integration test

Questions
Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?
Release note
`None`.

/check-issue-triage-complete

/retest

/retest


[Quality Sponsorship and Community Commitment] Remove Global Warning Suppressions

[Keywords]:
Good-first-PR; Quality
[Purpose]:
Eliminate global warning suppressions as much as possible:

Fix code quality issues wherever possible
Suppress some warnings at code level (line, or range of lines)

https://github.com/ROCmSoftwarePlatform/MIOpen/blob/27f9528c059c96b8fc3c62f3da1769a140640139/CMakeLists.txt#L626-L654
and
https://github.com/ROCmSoftwarePlatform/MIOpen/blob/27f9528c059c96b8fc3c62f3da1769a140640139/CMakeLists.txt#L699-L722
[Steps Suggestion]:
Step 1:
Code quality should be checked under both Ubuntu 20.04 and Ubuntu 22.04, for all community users' convenience, we have uploaded the following to docker hub:
docker pull rocm/miopen:ci_rocm530_ubuntu2004
and/or
docker pull rocm/miopen:ci_rocm530_ubuntu2204
Step 2:
Pull MIOpen develop branch
export LC_ALL=C.UTF-8 && \
export LANG=C.UTF-8 && \
sudo apt-get update -y && \
sudo apt-get install -y sudo && \
sudo apt-get -y install git unzip python3-venv pkg-config && \
sudo apt update && \
cd /root && git clone -b develop https://github.com/ROCmSoftwarePlatform/MIOpen && cd MIOpen

Step 3:
Claim the ones you are going to work on removing, and remove them from CMakeLists.txt in https://github.com/ROCmSoftwarePlatform/MIOpen/blob/27f9528c059c96b8fc3c62f3da1769a140640139/CMakeLists.txt
Step 4:
Check HIP tidy:
CXX='/opt/rocm/llvm/bin/clang++' cmake -DCMAKE_PREFIX_PATH=/opt/rocm -DMIOPEN_BACKEND=HIP -DBUILD_DEV=On ..
make -j$(nproc) -k analyze

Check OpenCL tidy:
cmake -DMIOPEN_BACKEND=OpenCL -DCMAKE_PREFIX_PATH=/opt/rocm -DBUILD_DEV=On ..
make -j$(nproc) -k analyze

Overall Status Monitoring:
Clang Tidy:

[x] -altera-id-dependent-backward-branch
[ ] -bugprone-easily-swappable-parameters
[x] -bugprone-implicit-widening-of-multiplication-result
[ ] -cert-err33-c
[ ] -google-readability-casting
[ ] -hicpp-use-emplace
[ ] -modernize-use-emplace
[ ] -performance-unnecessary-copy-initialization
[ ] -readability-container-data-pointer
[x] -readability-identifier-length
[x] -readability-suspicious-call-argument
[ ] -bugprone-use-after-move
[ ] -hicpp-invalid-access-moved
[ ] -modernize-use-nodiscard
[x] -misc-confusable-identifiers  @bghimireamd
[ ] -modernize-unary-static-assert
[ ] -modernize-macro-to-enum
[ ] -modernize-concat-nested-namespaces
[ ] -readability-redundant-declaration
[ ] -readability-simplify-boolean-expr
[x] -bugprone-branch-clone
[x] -clang-diagnostic-deprecated
[ ] -hicpp-deprecated-headers
[ ] -hicpp-member-init
[ ] -performance-no-automatic-move
[ ] -clang-analyzer-cplusplus.NewDeleteLeaks
[ ] -modernize-deprecated-headers

cppcheck:

[x] ctuOneDefinitionRuleViolation:test/

[x] ctuOneDefinitionRuleViolation:src/composable_kernel/composable_kernel//*

[x] ctuPointerArith:test/

[ ] constParameter

[ ] constVariable

[ ] variableScope

[ ] missingReturn

[ ] cstyleCast

[x] unknownMacro

[ ] uselessCallsSubstr

[ ] uninitMemberVar

[ ] overlappingWriteUnion

[ ] operatorEqVarError

[ ] returnTempReference

[ ] objectIndex

[ ] integerOverflowCond

[ ] rethrowNoCurrentException

[ ] mismatchingContainers

[ ] unreadVariable

[ ] CastIntegerToAddressAtReturn

[ ] knownConditionTrueFalse

[x] shadowFunction

[ ] moduloofone

[ ] overlappingWriteUnion - see #1385 for discussion

Please claim your sponsorship by commenting in this thread, and explicitly mark the ones you are working on to avoid work duplications. Thanks!

@junliume I will be working on -misc-confusable-identifiers

-misc-confusable-identifiers

Please use discretion if after all, it would be better to suppress at global level: for example, if there are way too many var pl, p1, pi, pI; to deal with, it might not worth your time fixing all of them

@atamazov @junliume I will be working on -misc-confusable-identifiers

@bghimireamd  Can you append your name to the list above ?

ctuOneDefinitionRuleViolation:test/

This should be suppressed. There is no ODR because of using seperate executables, but cppcheck doesnt understand that as it assumes everything will be compiled together in one binary.

ctuPointerArith:test/

There are FPs with this so we have it globally disabled for MIGraphX. So I dont think we can fix this.

shadowFunction

We have shadow warnings for the compiler so we can disable this check. Its most likely reporting a FP since we would have already caught it with the compiler warnings.

unknownMacro

This means that cppcheck has an error parsing the code. This should probably be fixed first before anything else.

-altera-id-dependent-backward-branch

All the altera checks should be disabled. These are specific to the altera team. Unless we think one of the checks are useful.

-misc-confusable-identifiers

I dont think this is a good check to enable. Its extremely slow, and probably has lots of FPs.

-readability-identifier-length

I dont think this is a useful check. We have it disabled on migraphx.

-readability-suspicious-call-argument

Way too many FPs, we just disabled it in MIGraphX.

Clang tidy provide fix-its for many checks(especially the modernize ones), so we should apply those fix-its first.

You are also missing the -Wno-unused-result warning being disabled here: https://github.com/ROCmSoftwarePlatform/MIOpen/blob/develop/cmake/EnableCompilerWarnings.cmake#L96

unknownMacro

This means that cppcheck has an error parsing the code. This should probably be fixed first before anything else.

I have some fixes for this here on this branch:
https://github.com/ROCmSoftwarePlatform/MIOpen/commit/57d210b6cbfde18cc678e3935b7ad05871fc8aae

Clang tidy provide fix-its for many checks(especially the modernize ones), so we should apply those fix-its first.

I tried to add -fix-errors right after this line:
https://github.com/ROCmSoftwarePlatform/MIOpen/blob/27f9528c059c96b8fc3c62f3da1769a140640139/cmake/ClangTidy.cmake#L128
The results are actually ... not very ideal, I guess smart auto fix is not so smart afterall.

You should also run make -k tidy so it will keep running even after failures so you can capture all fixits at once.

-bugprone-branch-clone is taken

-bugprone-easily-swappable-parameters is taken.

-bugprone-implicit-widening-of-multiplication-result is taken

@atamazov you can push your branch and I will kick off CI pipeline on the two dockers from time to time. :)

@junliume Thanks, I have enough CPU power, please save your time ;)

@junliume @atamazov I'm working on -clang-diagnostic-deprecated (https://github.com/ROCmSoftwarePlatform/MIOpen/pull/1942)

@junliume Which docker image should I take in order to continue working on the issue?

Continuation of this issue: #2115


issue #1366 schema for efficient storage of reference search parameters and tokens

Includes reindex custom operation to support migration of search parameter data from old to new schemas.
Because the Db2 schema uses partition-based multi tenancy, some additional migration steps are required.
# Apply the schema updates. This includes adding new columns and an index to a potentially large
# table. If the schema hosts a lot of data, this may take a while to complete.
# In addition, the Db2 catalog is susceptible to deadlocks when creating FK
# constraints in parallel, so the update needs to be serialized using --pool-size 1
java -jar schema/fhir-persistence-schema-*-cli.jar \
  --prop-file db2.properties --schema-name FHIRDATA --update-schema \
  --pool-size 1

# Rerun grants to cover any new tables added by the above migration step
java -jar schema/fhir-persistence-schema-*-cli.jar \
  --prop-file db2.properties --schema-name FHIRDATA --grant-to FHIRSERVER --pool-size 2

# And make sure that any new tables have partitions for existing tenants
java -jar schema/fhir-persistence-schema-*-cli.jar \
  --prop-file db2.properties --refresh-tenants

Once the schema has been migrated it is ready to handle the ingestion of new data. However, existing data needs to be reindexed before it can be searched using the new FHIR server build.  Adjust the thread count based on the capabilities of the underlying system. Each $reindex operation will process 10 resources. Each resource is processed in its own transaction to avoid deadlock issues.


dagster-connector-added

Describe your changes :

I worked on the adding Dagster Connector.
fix #1801

Type of change :

[x] New feature

Checklist:

[x] I have read the CONTRIBUTING document.
[x] I have commented on my code, particularly in hard-to-understand areas.
[ ]

Reviewers
@open-metadata/ingestion

@codingwithabhi can we add the docs for dasgter as well in this pr?

Thanks, this looks good. Let's add tests and docs, and once the tests pass, we can merge this in! Thanks

@codingwithabhi can you rebase with main and check if the tests passes


Change JsonCodec.withReviver constructor to also take an toEncodable function.

The current JsonCode.withReviver constructor allows constructing a JsonCodec with a different default reviver for the decoder.
Now that the encoder can also be parameterized with a function, the constructor should maybe be changed to .withDefaults that can take either or both of these functions.

This is fixed, but we should remove the withReviver constructor for Dart 2.0.


Lab01 - Fibonacci series

Fixes #591
Review of colleague's PR #587
Changes proposed in this PR:

Implement Lab1 - Fibonacci and NegativeFibonacci series
Add unit tests

Merged PR #591


Using SDF molecules without sanitization to match substructures give RuntimeError

I am using rdkit 2017.03.3
When I am reading in molecules from sdf stream via SDMolSupplier without sanitization, and then trying to match the molecules to SMARTS pattern which includes the total connectivity atomic property requirement,  I get RuntimeError regarding implicit hydrogens.
Here I use cyclohexane as an example:
from rdkit import Chem

# the sdf of cyclohexane is provided at the bottom
suppl = Chem.SDMolSupplier('./cyclohexane.sdf',   removeHs = False, sanitize = False)
rdkmol = suppl[0]
rdkmol.GetSubstructMatches(Chem.MolFromSmarts("[#6X4]-[#6X4]"))

I get:
RuntimeError: Pre-condition Violation
	getNumImplicitHs() called without preceding call to calcImplicitValence()
	Violation occurred on line 153 in file Code/GraphMol/Atom.cpp
	Failed Expression: d_implicitValence > -1

Am I using the SDMolSupplier correctly? If I am, it seems some information is lost when parsing the sdf molecule. It I set sanitize to True this issue disappears.
sdf of cyclohexane:
CT1001745819

 18 18  0  1  0               999 V2000
   -0.0187    1.5258    0.0104 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.0021   -0.0041    0.0020 C   0  0  0  0  0  0  0  0  0  0  0  0
    1.4167    2.0553   -0.0004 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.7182   -0.4975   -1.2568 C   0  0  0  0  0  0  0  0  0  0  0  0
    2.1536    0.0321   -1.2676 C   0  0  0  0  0  0  0  0  0  0  0  0
    2.1328    1.5619   -1.2592 C   0  0  0  0  0  0  0  0  0  0  0  0
   -0.5459    1.8868   -0.8726 H   0  0  0  0  0  0  0  0  0  0  0  0
   -0.5289    1.8773    0.9072 H   0  0  0  0  0  0  0  0  0  0  0  0
    0.5293   -0.3651    0.8851 H   0  0  0  0  0  0  0  0  0  0  0  0
   -1.0205   -0.3814    0.0098 H   0  0  0  0  0  0  0  0  0  0  0  0
    1.4019    3.1452    0.0056 H   0  0  0  0  0  0  0  0  0  0  0  0
    1.9439    1.6943    0.8826 H   0  0  0  0  0  0  0  0  0  0  0  0
    0.7330   -1.5874   -1.2628 H   0  0  0  0  0  0  0  0  0  0  0  0
    0.1910   -0.1364   -2.1398 H   0  0  0  0  0  0  0  0  0  0  0  0
    2.6808   -0.3290   -0.3846 H   0  0  0  0  0  0  0  0  0  0  0  0
    2.6638   -0.3194   -2.1644 H   0  0  0  0  0  0  0  0  0  0  0  0
    1.6057    1.9230   -2.1423 H   0  0  0  0  0  0  0  0  0  0  0  0
    3.1554    1.9392   -1.2670 H   0  0  0  0  0  0  0  0  0  0  0  0
  1  2  1  0  1  0  0
  1  3  1  0  1  0  0
  1  7  1  0  0  0  0
  1  8  1  0  0  0  0
  2  4  1  0  1  0  0
  2  9  1  0  0  0  0
  2 10  1  0  0  0  0
  3  6  1  0  1  0  0
  3 11  1  0  0  0  0
  3 12  1  0  0  0  0
  4  5  1  0  1  0  0
  4 13  1  0  0  0  0
  4 14  1  0  0  0  0
  5  6  1  0  1  0  0
  5 15  1  0  0  0  0
  5 16  1  0  0  0  0
  6 17  1  0  0  0  0
  6 18  1  0  0  0  0
M  END
$$$$

If you turn off sanitization (is there a reason you are doing this?) then things like valence are not calculated. If you need to read without sanitization, then be sure to call 'mol.UpdatePropertyCache()' before you do the substructure match

Hi Greg,
Thank you for your help. I am working on the open force field project that John showed at the UGM. The reason for no sanitization is because the philosophy that the input molecule should already be in the user-intended form to be simulated. Thus the molecule is left untouched before matching against SMIRKS patterns.
May I ask why when I read molecules in mol2 files I do not need to perform 'mol.UpdatePropertyCache()' ? Additionally UpdatePropertyCache() will not alter the molecular topology right?

It's safe to call mol.updatePropertyCache(); it just calculates valence states of the atoms. There are no topology changes.

Thanks again Greg :), have you had the chance to take a look at the other issue I seem to encounter (#1590) regarding difference in interpretation between mol2 and sdf molecules?

Hi Greg,
I am having problems using updatePropertyCache(), regardless of whether the molecule is read from sdf or mol2 or from smiles, I get AttributeError: 'Mol' object has no attribute 'updatePropertyCache'
e.g. :
m1 = Chem.MolFromSmiles('Cc1ccccc1')
print(m1) <rdkit.Chem.rdchem.Mol object at 0x7f3bb90e1c60>
m1.updatePropertyCache()
AttributeError: 'Mol' object has no attribute 'updatePropertyCache'

You’ve got the capitalization wrong: The Python call is UpdatePropertyCache()


Inconsistent behaviour of json construction using std::initializer_list

Description
The construction of a json object using an initializer_list that defines a single element is creating an array for strings and other basic types. This behaviour is different from the usage of other (json) types.
Reproduction steps
See example.
Expected vs. actual results
I would expect that the usage of an intitializer_list would either always create an array, e.g.
{}
[{}]
{}
"hello"
["hello"]
"hello"
[]
[[]]
[]

Or never (from my point of view the correct behaviour, if only a single element was defined):
{}
{}
{}
"hello"
"hello"
"hello"
[]
[]
[]

Minimal code example
int main(int, char*[])
{
  nlohmann::json obj0(nlohmann::json::object());
  nlohmann::json obj1{nlohmann::json::object()};
  nlohmann::json obj2 = nlohmann::json::object();
  std::cout << obj0.dump() << std::endl;
  std::cout << obj1.dump() << std::endl;
  std::cout << obj2.dump() << std::endl;

  nlohmann::json str0("hello");
  nlohmann::json str1{"hello"};
  nlohmann::json str2 = "hello";
  std::cout << str0.dump() << std::endl;
  std::cout << str1.dump() << std::endl;
  std::cout << str2.dump() << std::endl;

  nlohmann::json array0(nlohmann::json::array());
  nlohmann::json array1{nlohmann::json::array()};
  nlohmann::json array2 = nlohmann::json::array();
  std::cout << array0.dump() << std::endl;
  std::cout << array1.dump() << std::endl;
  std::cout << array2.dump() << std::endl;

  return 0;
}

Output:
{}
{}
{}
"hello"
["hello"]
"hello"
[]
[]
[]

Error messages
No response
Compiler and operating system
Apple clang version 15.0.0 (clang-15<IP_ADDRESS>.5)
Library version
3.11.3
Validation

[ ] The bug also occurs if the latest version from the develop branch is used.
[ ] I can successfully compile and run the unit tests.

See the first entry in the FAQ.  https://json.nlohmann.me/home/faq/

Perhaps it's worth adding a big something like this example to the faq and to warn about brace-initialization right where I guess most people look up the syntax for initialization (https://github.com/nlohmann/json?tab=readme-ov-file#json-as-first-class-data-type):
#include <format>
#include <iostream>
#include <nlohmann/json.hpp>

int main()
{
    nlohmann::json j1 = nlohmann::json::object({});
    nlohmann::json j2{ j1 };
    nlohmann::json j3( j1 );

    std::print(std::cout, "is j1 an object? {} an array? {}\n", j1.is_object(), j1.is_array());
    std::print(std::cout, "is j2 an object? {} an array? {}\n", j2.is_object(), j2.is_array());
    std::print(std::cout, "is j3 an object? {} an array? {}\n", j3.is_object(), j3.is_array());
}

Output:
is j1 an object? true an array? false
is j2 an object? false an array? true
is j3 an object? true an array? false

Run it here: https://godbolt.org/z/9YTbfEWo9


Adding alr transformation and its inverse, plus creation of an orthonormal basis from a SBP

Please complete the following checklist:

[x] I have read the guidelines in CONTRIBUTING.md.

[x] I have documented all public-facing changes in CHANGELOG.md.

[ ] This pull request includes code, documentation, or other content derived from external source(s). If this is the case, ensure the external source's license is compatible with scikit-bio's license. Include the license in the licenses directory and add a comment in the code giving proper attribution. Ensure any other requirements set forth by the license and/or author are satisfied. It is your responsibility to disclose code, documentation, or other content derived from external source(s). If you have questions about whether something can be included in the project or how to give proper attribution, include those questions in your pull request and a reviewer will assist you.

[x] This pull request does not include code, documentation, or other content derived from external source(s).

Note: REVIEWING.md may also be helpful to see some of the things code reviewers will be verifying when reviewing your pull request.
I added an additive log-ratio transformation method (alr), as well as a method to compute its inverse (alr_inv). I also added a method to compute the basis from a sequential binary partition.

@essicolo I think this is a pretty good first pass!  I think the alr and alr_inv are looking good.  However, I think the SBP will need a bit more work.  We have throughly tested the _check_orthogonality functionality and have a working SBP calculation in gneiss.  I'd be a bit wary if that had bugs in it.

@essicolo I re-added the checklist text on the opening of the PR. Can you fill it out please? This isn't a specific critique on anything within this PR, it is just part of our standardization for handling pull requests. Thanks!

Also, the 3rd checkbox above doesn't need to be checked, since you aren't copying this from licensed code, right?

The sbp_basis function is derived from the gsi.buildilrBase function of the R compositions package, licensed GPL-3. Is this a problem?

I've set the "DO NOT MERGE" label for the time being while the licensing issue is discussed.

I have written sbp_basis from scratch. It's now simpler and it clears the license issues.

@essicolo hate to say this - but a refactor by itself won't work.  We either need permission from the original author, or someone else who has not seen the code before rewrite this module based on the descriptions in the original manuscript.

@mortonjt As you wish. But what's now in the PR is my own coded version of this piece, p. 22. Nothing to do with the R function anymore.

I contacted one of the authors, who did not see any problem as long as it's cited. I added a reference to the R package in the description of the method.

Here is the permission from the original author.

@essicolo it looks like the commit history is clobbered in this PR -- for example, every line in skbio/stats/composition.py is changed. You might be better off closing this PR and opening a new one with just your changes. I'm not able to help debug the commit history in this PR, so if you or someone else wants to salvage this PR I'm all for that too!

Agreed. I completely messed it up.


Configurable UI Register Testing

IMPORTANT: Where possible all PRs must be linked to a Github issue
Fixes #Testing
Checklist

[ ] I have written Unit tests for any new feature(s) and edge cases for bug fixes
[ ] I have added any strings visible on UI components to the strings.xml file
[ ] I have updated the  CHANGELOG.md file for any notable changes to the codebase
[ ] I have run ./gradlew spotlessApply and ./gradlew spotlessCheck to check my code follows the project's style guide
[ ] I have built and run the fhircore app to verify my change fixes the issue and/or does not break the app

Closing this, because a big refactor is about to happen in the RegisterCard.kt
cc @ellykits


Add support for older versions of react query

Is your feature request related to a problem? Please describe.
The product I'm working on is integrating in a federation of React components. See https://github.com/openshift/dynamic-plugin-sdk Which means that I can't chose the version of React I'm working with. Right now OpenShift console runs React 17. In turn this means that we have to use react-query at version 4.
Describe the solution you'd like
I'd love the codegen executable to accept a parameter to specify which version of react-query to use for the generation.
Describe alternatives you've considered
ATM, to overcome this issue I'm running your codegen solution in it's version 0.4.1. While it's been working great, it also means that I would miss on any new cool features you are implementing.

Is your feature request related to a problem? Please describe.
The product I'm working on is integrating in a federation of React components. See https://github.com/openshift/dynamic-plugin-sdk Which means that I can't chose the version of React I'm working with. Right now OpenShift console runs React 17. In turn this means that we have to use react-query at version 4.
Describe the solution you'd like
I'd love the codegen executable to accept a parameter to specify which version of react-query to use for the generation.
Describe alternatives you've considered
ATM, to overcome this issue I'm running your codegen solution in it's version 0.4.1. While it's been working great, it also means that I would miss on any new cool features you are implementing.

While that would be nice, there is no way for us to support older version as the types do not match. Feel free to fork and back port features. I suggest opening tickets with your out of date code.


when start gartner-client-extensions-demo got below error on windows10

FATA[0000] runtime failed to list nodes: docker failed to get containers with labels 'map[app:k3d]': failed to list containers: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/json?all=1&filters=%7B%22label%22%3A%7B%22app%3Dk3d%22%3Atrue%7D%7D&limit=0": dial unix /var/run/docker.sock: connect: permission denied
uid=1000
user=localdev
INFO[0000] Using config file /tmp/.cluster_config.yaml (k3d.io/v1alpha4#simple)
INFO[0000] portmapping '443:443' targets the loadbalancer: defaulting to [servers::proxy agents::proxy]
INFO[0000] Prep: Network
ERRO[0000] Failed to get nodes for cluster 'localdev': docker failed to get containers with labels 'map[k3d.cluster:localdev]': failed to list containers: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/json?all=1&filters=%7B%22label%22%3A%7B%22app%3Dk3d%22%3Atrue%2C%22k3d.cluster%3Dlocaldev%22%3Atrue%7D%7D&limit=0": dial unix /var/run/docker.sock: connect: permission denied
ERRO[0000] Failed Cluster Preparation: Failed Network Preparation: failed to create cluster network: failed to check for duplicate docker networks: docker failed to list networks: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/networks?filters=%7B%22name%22%3A%7B%22%5E%2F%3Fk3d-localdev%24%22%3Atrue%7D%7D": dial unix /var/run/docker.sock: connect: permission denied
ERRO[0000] Failed to create cluster >>> Rolling Back
INFO[0000] Deleting cluster 'localdev'
ERRO[0000] Failed to get nodes for cluster 'localdev': docker failed to get containers with labels 'map[k3d.cluster:localdev]': failed to list containers: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/json?all=1&filters=%7B%22label%22%3A%7B%22app%3Dk3d%22%3Atrue%2C%22k3d.cluster%3Dlocaldev%22%3Atrue%7D%7D&limit=0": dial unix /var/run/docker.sock: connect: permission denied
ERRO[0000] failed to get cluster: No nodes found for given cluster
FATA[0000] Cluster creation FAILED, also FAILED to rollback changes!

Thanks for reporting @simonjhy :)
This is already fixed here https://github.com/liferay/liferay-cli/issues/83. It will be in the next release
Can try with the next branch to verify?

No response assuming that the issue is resolved.


toggle full screen for embedded readers

Replacing the 'Close mirador' button by 'Toggle full screen' will greatly improve the user experience of embedded readers such as this one.

I think ideally there would be two modes:

mode 1:

the current one, replacing Close Mirador with Close Viewer

mode 2:

Full Screen (both in full screen and not in full screen)

the mode could be passed as an option when instantiating Mirador... (the scripts/embed-iframe.html script would use different options than the main one. @berger-n does it seem reasonable to you?

notice than you must add allowfullscreen parameter to iframe to make fullscreen work
(see updated docs)
once it is done https://bdrc-reader.github.io/mugey-gonpa/tsannyid should be fully working
@eroux you mean a query parameter eg "menu=fullscreen"?
(however I can't see a use case for the 'close viewer' button in the iframe...
actually I thought I had it hidden already like in the /view route http://library.bdrc.io/view/bdr:W12827)

I'm on my phone and can't remember all the details of the mirador config... but I trust you to make the right decision, you know the situation and the use cases!

@ngawangtrinley I'm closing it, reopen if necessary


Move credentials.json to .env file

This should align more with best practices for storing sensitive info and dealing with test/live environments.
Need to consider possible backwards compatibility with:

credentials.json
Command line parameters
launchpad.json config parameters

Also should think about whether there's a global credentials/sensitive info manager class or just one for content sources.
cc @pingevt

See #18

Copied from #126:
Now that we have JS configs, I imagine it would make sense to load in dotenv files for easier and gitignore-able config customization.
We have some logic in ConfigManager to search for the nearest launchpad config in the CWD and parent directories. Once the config is found, we can look for the .env files alongside it.

It could be nice to also add an extra option to the launchpad CLI to allow selecting specific dotenv files, and perhaps cascade them. Example:
Given the following dotenv files (assuming files ending in .local are gitignored):
# .env
API_DATASET="production"
PC_NAME="foo"
HELLO="world"

# .env.local
PC_NAME="bar"

# .env.development
API_DATASET="development"

Running npx launchpad would load .env then load .env.local, resulting in
{
   "API_DATASET": "production",
   "PC_NAME": "bar",
   "HELLO": "world"
}

Running npx launchpad -e development would load .env then load .env.local then .env.development, resulting in
{
   "API_DATASET": "development",
   "PC_NAME": "bar",
   "HELLO": "world"
}

This feature could potentially replace credentials.json too, as users could put API credentials in a gitignored dotenv file then reference them in the config, plus the cascading logic above allow for more flexibility.


[Question]: Has anyone tried KnowledgeGraphDemo on local LLM?

Question Validation

[X] I have searched both the documentation and discord for an answer.

Question
I am trying to reproduce this example on local LLM, however with Open LLAMA 13B or GPT 4 All Snoozy it does not give the desired results.
Wanted to know if we can expect this to work local LLM's?

I even tried with Vicuna Wizard 13B wizard-vicuna-13B.ggmlv3.q6_K.bin which seems to be one of better performing Local LLM's. Any suggestion or advise on how we can make this work on Local LLM's?

OpenSource LLMs are not that great yet tbh
The hardest part here will be getting the LLM to extract triplets properly. You can tune the prompt for this by setting it here:
index = KnowledgeGraphIndex.from_documents(...., kg_triple_extract_template=my_kg_template)
And here is the default prompt:
https://github.com/jerryjliu/llama_index/blob/5fcdbfc429ee08193ce03e57bcb61e3a827fa72a/llama_index/prompts/default_prompts.py#L255

Thanks @logan-markewich , I skipped the triplet extraction and manually added all the triplets (as tuples using index.upsert_triplet) just to check the querying part. However even the querying part seems to be a challenge, do you have any thoughts around why querying part would be difficult or a challenge with local LLM's?

So the query can be difficult for two reasons

we use the LLM to extract keywords from the query text
if enough nodes/triplets are retrieved so that there is too much text for a single LLM call, llama-index refines the answer across multiple LLM calls. Open-Source LLMs are generally bad at doing this right now (the prompt is a little complex)

You can adjust the prompt for both 1 and 2
index.as_query_engine(refine_template=MY_REFINE_TEMPLATE, query_keyword_extract_template=MY_KEYWORD_TEMPLATE)

Here's the default keyword template
https://github.com/jerryjliu/llama_index/blob/5fcdbfc429ee08193ce03e57bcb61e3a827fa72a/llama_index/prompts/default_prompts.py#L130
Here's the default refine template
https://github.com/jerryjliu/llama_index/blob/5fcdbfc429ee08193ce03e57bcb61e3a827fa72a/llama_index/prompts/default_prompts.py#L81

Going to close for now. Feel free to reach out on discord!


Comparing symbol in C code

Hi, I browsed source code and comments, but I could not find the preferred way to test for a specific symbol retrieved from the parameters. I was preparing another wiki article but first want to check this out before I publishing some real awful code :)
In the next function I check if the first symbol equals :eRcvState en then get the value from some global value with (pure coincedence) the same name. Of course, a complete list of symbols must be traversed in the real world example. If I don't recognise the symbol, then the function returs -1.
mrb_value
rb_check_state(mrb_state* mrb, mrb_value self){
	// we got a symbol telling which key to get
	mrb_sym key;
	mrb_sym key_receive = mrb_intern_cstr(mrb, "eRcvState");
	mrb_get_args(mrb, "n", &key);
    if (key == key_receive) {
    	return mrb_fixnum_value(eRcvState);
    }
    return mrb_fixnum_value(-1);
}

Sorry Matz, it was just to confirm I did this the right way. I was not sure if I overlooked some more handy functions. I need to compare lots of keys, so oneliners would be great... I will find some way...
Thanks for the input.


[autoform] support editing fields for @OneToOne releationships

Auto form should inline fields from nested entities referenced with @OneToOne

Model with @OneToOne   annotation causes exception when used with AutoForm in 2.3.0-beta1 build.

React Router caught the following error during render TypeError: Invalid value used as weak map key
at WeakMap.set ()
at new _M (BinderNode.ts:134:11)
at u2 (BinderNode.ts:47:12)
at Object.field (index.ts:121:17)
at AutoFormIntegerField (autoform-field.tsx:37:44)
at renderWithHooks (react-dom.development.js:16305:18)
at mountIndeterminateComponent (react-dom.development.js:20074:13)
at beginWork (react-dom.development.js:21587:16)
at beginWork$1 (react-dom.development.js:27426:14)
at performUnitOfWork (react-dom.development.js:26557:12)

Problem in this line when 'propertyInfo.name' is "address.streetAddress"
https://github.com/vaadin/hilla/blob/7caea6624c721bc424605b505434c96cd88c33c6/packages/ts/react-crud/src/autoform-field.tsx#L22
It would work with form.model["address"]["streetAddress"]
Either this functionality is added or unsupported for AutoForm, but it shouldn't cause exceptions as using model with nested entities are valid for AutoGrid.

@ Entity
@ Table(name = "users")
public class User {
...
@ OneToOne
private Address address;
...
}
@ Entity
@ Table(name = "addresses")
public class Address {
...
private String streetAddress;
...


0.9.6 is whisper like data retention possible

what i would like to do is be able to down sample data over time to the same measure similar to how whisper db works.
ie
< 5 days: keeps raw data

5 < 30d : downsample by 1min
30d <6M :down sample to 5 min
6M drop

retention policy seem to allow me to simple create a max age on all the data.
I think i can accomplish the above scheme with multiple measures and use continious queries to manage it but that doesn't seem very scalable.
please advise.

I agree something like this is needed #5234

Voting up. Especially for some capacity planning ..

+1  Looking for this feature.

+++++1

when use Grafana as webUI, this feature is very useful.

+1


Add build to binder GHA

This will make it so no one has to wait for binder builds. The image will just be built whenever there is a push to main

I'm going to try this out.


stylint errors not show up for webpack hot reloads

Hey,
I am having an issue with stylint-loader in webpack. It works fine when I run npm run dev and all the warnings will be listed, but when I edit my .styl files, warnings will not appear even if the rules got some problem. It seems that errors are not returned from stylint when webpack runs a hot reload.
module: {
		preLoaders: [
			{
				test: /\.styl$/,
				loader: 'stylint',
				include: srcPath
			}
       ]

I don't know if I have the same issue, but I do not get any stylint errors from my webpack + webpack-dev-server/hot.

Sorry, I can't contribute to this repo due that my current workflow has changed and I don't have enough time and motivation to maintain this. Sorry man, you can get more info in #9


[Tensor] Fix bug in the broadcast support

Fix bug that strides and buffer axis are miscalculated
Changes proposed in this PR:

Clarified consecutive-one strategy and same-stride strategy
Change last stride to 0 only if it is using consecutive-one strategy
Add regression test

Self evaluation:

Build test: [X]Passed [ ]Failed [ ]Skipped
Run test: [X]Passed [ ]Failed [ ]Skipped

Signed-off-by: Jihoon Lee<EMAIL_ADDRESS>

:memo: TAOS-CI Version: 1.4.20191203. Thank you for submitting PR #560. Please a submit 1commit/1PR (one commit per one PR) policy to get comments quickly from reviewers. Your PR must pass all verificiation processes of cibot before starting a review process from reviewers. If you are new member to join this project, please read manuals in documentation folder and wiki page. In order to monitor a progress status of your PR in more detail, visit http://nnsuite.mooo.com/.


Default and OSPRay Volume rendering fail for very large-valued coordinates.

Describe the bug
The default Renderer and the RayCastin::OSPRay options of the Volume plot cannot handle a mesh whose coordinates are extremely large.
I was experimenting with VisIt's handling of very-large values for mesh points.
I turned on the 'Double' floating point precision preference.
I opened rect3d.silo
I added a Volume plot of 'u'
I added a Transform operator and set the Scale for all 3 coordinate directions to 1e37.
Clicked Draw.
The default render does not render. You will sometimes see very large black triangles emanating from the origin when you rotate.
The RayCasting::OSPRay option also doesn't render.
RayCasting and RayCasting::SLIVR do work.

[ ] Did VisIt crash?
[X] Did you get wrong results?

Impact

[ ] High - User productivity significantly degraded
[X] Medium - User productivity partially degraded
[ ] Low - User productivity trivially degraded

Likelihood

[ ] High - occurrence is not specific to platform, data, config, a combination of operators, queries, etc.
[ ] Medium - neither low nor high likelihood
[X] Low - occurrence is specific to combination of multiple factors such as configuration, data, platform, etc.

Expected behavior
Since I had specified that VisIt's pipeline should use double-precision data, I expected
the Volume plot to handle the scaled mesh.
Desktop

OS and version: only tested on linux
VisIt Version: 3.0

We think this is potentially a problem in general, with multiple plots not just this plot. We should use same reproducer here in other plots and check. We think we used to have internal automagic scaling to deal with it. We think there was a recent email regarding fact that large dataset worked in 2.13.3 and does not in 3.0.0.


Colour the created margins (by scaling)

Wow, your tool is really what I needed for sending an poster to a publisher for fixing the margins. Thanks.
I was wondering if it is also possible/easy to colour the margins created (using scale 0.95) in a specific color, so the resulting image has that colour on all borders for nicer printing/cutting edge?
This is for example useful if the background colour of your poster is not white and to let it flow until the new edge.

Hi there...
That is an interesting idea.
I am not so sure what path to take on that though.
Some things to consider

This only applies to scaling since resizing uses fit-to-page
The positioning is done by scaling and then translating everything and that happens inside a /BeginPage setpagedevice PS command. AFAIK that creates a new/blank PDF canvas every time.
I think the generated PDFs actually get a transparent bleed (which shows as white on screen). I have inspected a generated PDF file on Illustrator just now and there is actually no info on background or any elements working as background.
Ghostscript does not seem to have an option to set background color for PDF files (it has for PNG files). So we would probably need to do that inside the PS script.

I was trying to find a GS option or at least a PS command that would just magically set the background color, but could not really find that.
So it seems like we will need to actually insert a colored box behind the PDF to work as a background if we want that functionality. So the user would use some command like --add-background 000000 (hex? rgb? cmyk?) and we would add that to the PDF.
Any ideas or advices on this would be appreciated.
Seems not so easy to implement, but I will keep checking.
I will keep this post updated on the progress.
Cheers!
Gus

I found this post about a way to do it and it seems to work.
Example PS call:
This is using RGB as in 1 / 0.7 / 0.8 (some pink)
1 0.7 0.8 setrgbcolor clippath fill

I have inserted that in the PS command on setpagedevice.
Example successfull gs run
$ gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dSAFER -dCompatibilityLevel="1.5" -dPDFSETTINGS="/printer" -dColorImageResolution=300 -dGrayImageResolution=300 -dColorImageDownsampleType="/Bicubic" -dGrayImageDownsampleType="/Bicubic" -dColorConversionStrategy=/LeaveColorUnchanged -dSubsetFonts=true -dEmbedAllFonts=true -dDEVICEWIDTHPOINTS=842 -dDEVICEHEIGHTPOINTS=595 -sOutputFile="../input-nup.TT.pdf" -c "<</BeginPage{1 0.7 0.8 setrgbcolor clippath fill 0.95 0.95 scale 22.157230 15.657425 translate}>> setpagedevice" -f "../input-nup.pdf"

The change was from
-c "<</BeginPage{0.95 0.95 scale 22.157230 15.657425 translate}>> setpagedevice"

To
-c "<</BeginPage{1 0.7 0.8 setrgbcolor clippath fill 0.95 0.95 scale 22.157230 15.657425 translate}>> setpagedevice"

Adding the needed command before anything else.
First tests show that yes, we had transparent backgrounds. I say that because on text documents that will paint the background of the text, unless the document actually has a white box behind it.
Now I need to do more tests and check the other color modes and how to deal with that.
Postscript has setgray, setcolor, setrgbcolor, setcmykcolor, sethsbcolor each with one or multiple uses (function overloading). Using only RGB or CMYK would obviously make it easier to implement.
Because this goes inside the PS command and the command name itself may change, the complexity is a little bit higher. Not that hard though.

Nice idea's and thanks for the quick response.
Is the current pdfScale color-type-agnostic? Meaning it just passes through the original's PDF RGB/CMYK? Maybe the PDFInfo and other methods can read this and use the type of the original?
As for the command line input --add-background 000000, could use the format of the original PDF.
Maybe this is a lot of work though, so just picking the easiest to implement. + showing a warning in the terminal output if it doesn't make sense.

humm... was testing a bit more and checking and then realised that the RGB param actualy only runs with percentages (no RGB numbers from 0 to 255 like photoshop).
Also, to use RGB properly we should also set HSB (Hue Saturation Brightness). Or should at least be able to set it on top of the RGB setting.
The CMYK option is more complete on itself.
For example, even for half-gray it is as easy as CMYK "0 0 0 0.5".
I am honestly thinking of shaving off the whole RGB implementation and keeping only CMYK and GRAY.
Or we need a way to set HSB at least and also to fix the RGB numbers thing.
Ideas? 💡
Cheers!
Gus

~/Downloads/pdfScale/pdfScale.sh  -v -r a0 -s 0.95 --image-resolution 600 --background-cmyk "0 0 0 .14" poster.pdf seems to work for me.
Using this test poster created with Keynote pdf export: poster.pdf
~/Downloads/pdfScale/pdfScale.sh  -v -r a0 -s 0.95 --image-resolution 600 --background-gray 0 poster.pdf produces black
--background-gray 1` produces white, so it seems the documentation is the other way around. :)
--background-rgb "216 216 216" indeed seems to not work.

I'm not a color expert, but if RGB only is useful with HSB, I guess that should be added.
From a usability view I would think that 0-255 RGB values are mandatory, maybe we can convert them?
$IN_RED / 255.0 or something? (if possible in bash)
With output:
Background: RGB Mode > 216 216 216  > (converted) .847058824 .847058824 .847058824
Alternatively (as you suggest) drop RGB support for now, and put in a nice to have feature request issue with some pointers/design/knowledge that we currently have.

Pushed v2.4.1, please update and test.
I actually did basically what you said (even though I didn't read it beforehand).
I have fixed RGB parsing in 255-based numbers and I convert them internally to percentages (which is what postscript likes). There is currently no way to pass RGB percentages directly (not sure if it ever will).
It seems to work without HSB, but CMYK is still recommended since it is easy and complete.
I am still messing with it so v2.4.2 is probably coming soon as well.
I may implement the HSB parameter but then that is even more complexity since it should only be added on top of an RGB config. For now it is staying without it.
Cheers!
Gus

Ok, I was tripping on HSB, which is just like a shortcut to RGB.
Meaning it is just another way to reference the RGB color space but adds nothing to it.
Internally Ghostscript/Postscript will use RGB if HSB is used. I was even implementing HSB but then realised this and decided to not include it since we already have 3 modes to set the background color.
This is from the Postscript manual:

Note that the HSB parameter values supplied to sethsbcolor  are immediately converted into RGB color components. HSB is not a color space in its own right, but merely an alternate way of specifying color values in the DeviceRGB color space.

So I think this should be done for now.
Can you confirm we have no errors and all works now?
Cheers!
Gus

Yes it seems to work great! Thanks!
Maybe an easy way is to just grab the most upper left pixel:
$ convert poster.pdf[1x1] txt:
# ImageMagick pixel enumeration: 1,1,65535,srgba
0,0: (54289,54583,55118.5,65535)  #D411D537D74EFFFF  srgba(82.8396%,83.2883%,84.1054%,1)

But I guess that would be another feature. ;)
I'll close the issue for now.

Or using image magick to reduce the number of colors to 1...
Although I'm sure if it is correct.
$ convert poster.pdf +dither -colors 1 -unique-colors txt:
# ImageMagick pixel enumeration: 1,1,65535,srgba
0,0: (53804.2,54168.4,54898,65535)  #D22CD398D672FFFF  srgba(82.1%,82.6556%,83.769%,1)


Resolve dependencies in react-parcel project

Hi,
I working on a react project which is built on Parcel bundler instead of Webpack.
React Data Export used file-saver, json-loader and xlsx. I have installed all these dependencies in my package.json. But the application still throwing the below error,
Uncaught Error: Cannot find module 'jszip'
at newRequire (src.61e5e814.js:39)
at localRequire (src.61e5e814.js:54)
at make_xlsx (xlsx.js:1344)
at Object.parcelRequire.../node_modules/react-data-export/node_modules/xlsx/xlsx.js../dist/cpexcel (xlsx.js:6)
I have also installed the 'jszip' module. But same result.
How can I fix this issue?
Thanks,
Adi

Hello @securedeveloper, I did install the jszip in my project but the error is still the same. Below is the error complete stacktrace,
The version of installed dependencies are,
file-saver: 1.3.8
json-loader: 0.5.7
jszip: 3.1.5,
xlsx: 0.13.3
I see the following dependencies in react data export package.json.
"dependencies": {
"file-saver": "1.3.3",
"xlsx": "git+https://github.com/securedeveloper/js-xlsx.git"
},
With the same project everything was working fine on last Friday. I was able to export the data into file.  It is not since late last Friday. I have verified all my code and all looks good. When I uninstall the react data export and its dependencies everything is good.
Error stacktrace:
Uncaught Error: Cannot find module 'jszip'
at newRequire (src.61e5e814.js:39)
at localRequire (src.61e5e814.js:54)
at make_xlsx (xlsx.js:1344)
at Object.parcelRequire.../node_modules/react-data-export/node_modules/xlsx/xlsx.js../dist/cpexcel (xlsx.js:6)
at newRequire (src.61e5e814.js:48)
at localRequire (src.61e5e814.js:54)
at Object.parcelRequire.../node_modules/react-data-export/dist/ExcelPlugin/components/ExcelFile.js.react (ExcelFile.js:19)
at newRequire (src.61e5e814.js:48)
at localRequire (src.61e5e814.js:54)
at Object.parcelRequire.../node_modules/react-data-export/dist/index.js../ExcelPlugin/components/ExcelFile (index.js:7)
newRequire @ src.61e5e814.js:39
localRequire @ src.61e5e814.js:54
make_xlsx @ xlsx.js:1344
parcelRequire.../node_modules/react-data-export/node_modules/xlsx/xlsx.js../dist/cpexcel @ xlsx.js:6
newRequire @ src.61e5e814.js:48
localRequire @ src.61e5e814.js:54
parcelRequire.../node_modules/react-data-export/dist/ExcelPlugin/components/ExcelFile.js.react @ ExcelFile.js:19
newRequire @ src.61e5e814.js:48
localRequire @ src.61e5e814.js:54
parcelRequire.../node_modules/react-data-export/dist/index.js../ExcelPlugin/components/ExcelFile @ index.js:7
newRequire @ src.61e5e814.js:48
localRequire @ src.61e5e814.js:54
parcelRequire.../src/component/QuestionnaireListTable.js.@material-ui/core/Button @ QuestionnaireListTable.js:20
newRequire @ src.61e5e814.js:48
localRequire @ src.61e5e814.js:54
parcelRequire.../src/component/QuestionnaireList.js.react @ QuestionnaireList.js:3
newRequire @ src.61e5e814.js:48
localRequire @ src.61e5e814.js:54
parcelRequire.../src/App.js.react @ App.js:11
newRequire @ src.61e5e814.js:48
localRequire @ src.61e5e814.js:54
parcelRequire.../src/index.js.react @ index.js:4
newRequire @ src.61e5e814.js:48
parcelRequire.../node_modules/object-assign/index.js @ src.61e5e814.js:80
(anonymous) @ src.61e5e814.js:106

@adityafuture01 we are using an alias library for xlsx to support styling in excel. The library we are using is https://www.npmjs.com/package/xlsx-style please try to install that package as well. I hope it will work with that library.

@securedeveloper, I did install the xlsx-style. The issue is still the same.
Uncaught Error: Cannot find module 'jszip'
at newRequire (src.61e5e814.js:39)
at localRequire (src.61e5e814.js:54)
at make_xlsx (xlsx.js:1344)
at Object.parcelRequire.../node_modules/react-data-export/node_modules/xlsx/xlsx.js../dist/cpexcel (xlsx.js:6)
at newRequire (src.61e5e814.js:48)
at localRequire (src.61e5e814.js:54)
at Object.parcelRequire.../node_modules/react-data-export/dist/ExcelPlugin/components/ExcelFile.js.react (ExcelFile.js:19)
at newRequire (src.61e5e814.js:48)
at localRequire (src.61e5e814.js:54)
at Object.parcelRequire.../node_modules/react-data-export/dist/index.js../ExcelPlugin/components/ExcelFile (index.js:7)

@adityafuture01 give me some time and I will get back to you after testing this project with Parcel bundler

Thank you @securedeveloper

@securedeveloper
I am having the same issue with jszip.

@harry-sm are you using webpack configuration or you have another setup system?

@securedeveloper
I am using<EMAIL_ADDRESS>

Actually I already tested and investigated the above issue a bit, my suggestion will be adding jzip, and file-saver library by CDN or npm.

@securedeveloper
I'll try that and let you know

@securedeveloper
Still not working I have installed file-saver and jzip but still nothing.
C:\Users............\node_modules\xlsx\xlsx.js:1205:30: Cannot statically evaluate fs argument
1203 | function readFileSync(filename, options) {
1204 |        if(fs === undefined) fs = require('fs');

1205 |        return parse(fs.readFileSync(filename), options);
|                                     ^
1206 | }
1207 |


Destructured parameter should not enforce presence / non-nullability from type annotation on a property that's default-initialized

TypeScript Version:
https://github.com/Microsoft/TypeScript/commit/55cbdc96238c828ed02a54ecd264c7bce0a70acd (current master)
Code
type Props = { propA: number, propB: string, propC: number };

var p: Props = { propC: 0 }; // Not a Props, missing propA and propB. Error, as expected
var q: Props = { propA: 6, propB: "b", propC: 0 }; // Ok, is a Props
var r = { propA: 6, propB: "b", propC: 0 }; // Not annotated, but is a Props
var s = { propA : 6, propC: 0 }; // Not a Props, missing propB. Not annotated, so not an error
var t = { propC: "c" }; // Not a Props, propC is the wrong type. Not annotated, so not an error

// No type annotation on parameter
function Component({ propA = 5, propB = "a", propC }) {
	console.log(propA, propB, propC); // propC is any, undesirable
}

Component(q); // No error, expected
Component({ propC: 0 }); // No error, expected
Component(r); // No error, expected
Component(s); // No error, expected
Component(t); // Error, expected

// Type annotation on parameter
function Component2({ propA = 5, propB = "a", propC }: Props) {
	console.log(propA, propB, propC); // propC is number, desirable
}

Component2(q); // No error, expected
Component2({ propC: 0 }); // Error, propA and propB are missing
Component2(r); // No error, expected
Component2(s); // Error, propB is missing
Component2(t); // Error, expected

tsc -t es5 ./foo.ts

Expected behavior:
Component2({ propC: 0 }) and Component2(s) compile even though their parameters don't have propA and propB from Props, because Component2 default-initializes those parameters.
Actual behavior:
foo.ts(26,12): error TS2345: Argument of type '{ propC: number; }' is not assignable to parameter of type '{ propA: number; propB: string; propC: number; }'.
  Property 'propA' is missing in type '{ propC: number; }'.
foo.ts(28,12): error TS2345: Argument of type '{ propA: number; propC: number; }' is not assignable to parameter of type '{ propA: number; propB: string; propC: number; }'.
  Property 'propB' is missing in type '{ propA: number; propC: number; }'.

plus errors about p and Component2(t) which are expected.

The reason to add the annotation on Component2 is to get type information for the non-default-initialized property propC.
Is there any downside to allowing Component2({ propC: 0 }) and Component2(s) ? Component2(t) should of course still not be allowed. s and { propC: 0 } should still not be considered to be Props for the purpose of type inference.
Otherwise the user has to make a new type for each such function based on what's default-initialized and what isn't, like type PropsForComponentFunction = { propA?: number, propB?: string, propC: number } , and make sure the types match with the original Props. (Or inline the whole type declaration into Component2 but that has the same drawback.)

the type inferred from function Component({ propA = 5, propB = "a", propC }) is { propA?: number; propB?: string; propC: any }. obviously this is less strict that Props = { propA: number, propB: string, propC: number }; that require all three properties.
I think what you are asking for is https://github.com/Microsoft/TypeScript/issues/7355

@mhegazy No, I'm aware of #7355 and this is not it.
Please reopen this.

what is the proposal then?

If you tell me what is unclear in the OP I can fix it.

Expected behavior:

Component2({ propC: 0 }) and Component2(s) compile even though their parameters don't have propA and propB from Props, because Component2 default-initializes those parameters.

but component2 has an argument type of Props, which says that they should have this shape. the intialization of the parameters does not participate in the type, because you provided one.
this is similar to:
type RequiredParam = (a) => void;
var func: RequiredParam = (a?) => { }
func(); // Error

the intialization of the parameters does not participate in the type

And this issue is saying that it should, otherwise the user has to write verbose type aliases for each such use case.

this is similar to:

No, this issue is only about destructured properties being optional, not the entire argument.

I will bring this to discussion.

Discussed for a while and decided this was just too confusing / complex (see #8228), with the acknowledgement that this is going to be annoying one way or another (i.e. making a new type or writing a big annotation or etc). Ultimately people (and the compiler) should be able to trust whatever type annotation is written as gospel.


Lwm2m

Updated the article, added pictures

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Update joi version

Joi.reach is not available in version 6: https://github.com/hapijs/joi/blob/44e8bb4c12a33697c6dfde756326d02eb40c0299/API.md
This is pulled in by circuit-fuses.
This might be the cause for https://github.com/screwdriver-cd/screwdriver/issues/274

I published a new version 2.0.0 with this change included.


Can't load Docker Module in Windows version <IP_ADDRESS>

Steps to reproduce
Just an observation.  you are providing a PowerShell Docker sample on "Adding Docker-PowerShell demo from announce recording #1862".
I works on Windows PowerShell 5.0 and 5.1 but not on Windows PowerShell version <IP_ADDRESS>.
Is there a new set of installation commands? or, is there a workaround?
Expected behavior
To Install PowerShell Docker module.
Actual behavior
Setup commands won't work:

dotnet restore
dotnet publish .\src\Docker.PowerShell -o .\src\Docker.PowerShell\bin\Module\Docker -r win

Environment data
Windows 10 Enterprise Insider Build 14901.rs_preprelease.160805-1700
$PSVersionTable
Name                           Value

SerializationVersion           <IP_ADDRESS>
WSManStackVersion              3.0
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSEdition                      Core
CLRVersion
PSRemotingProtocolVersion      2.3
PSVersion                      6.0.0-alpha
BuildVersion                   <IP_ADDRESS>
GitCommitId                    v6.0.0-alpha.9

@MaximoTrinidad - The code that builds Docker-PowerShell for the 6.0.0-alpha9 build of PowerShell is not yet published. We are actively working on getting the build that was used in the demo published to the public repo's and then this should work.

Hi @jterry75! Thanks for the update. I'm looking forward to it.
:0

This is external to the docker-powershell repo and should be fixed by now.


adding long name for derived variables to be printed in viewer

Finally done, look here: http://aims4.llnl.gov:8000/shaheen2/all_descr/viewer/


iOS stops playing audio after stop recording

When I stop a recording on my iPad Air device, I get the error below:
ERROR:    [0x16e247000] AVAudioSession.mm:692: -[AVAudioSession setActive:withOptions:error:]: Deactivating an audio session that has running I/O. All I/O should be stopped or paused prior to deactivating the audio session.
And after that all audio played is silent.
When I'm in the iOS simulator I have no problems, recordings stop as expected and everything seems to work perfectly.
I'm playing sound effects within an React Native iOS WebView (using Howler.js v2.0.0) immediately before and after recording, so maybe that's part of the problem?

I'll take a look at this today.

Thanks.  Let me know if you have any questions or need more info.

I did some more testing.  Here's what I found so far:

I added delays to ensure Howler.js and AudioRecorder audio were never overlapping.  The error above still gets thrown.
Removing Howler.js entirely resolves the error.  But I need Howler.js to remain in this project so I'll have to figure something else out.
Commenting out [_recordSession setActive:NO error:nil]; foudn in AudioRecorderManager.m resolves the error as well, but there must be a better way than to never sleep the _recordSession AVAudioSession.

Edited ^

Could part of the problem be that the AudioRecorderManager.m doesn't set a sessionCategory when it creates an _audioPlayer so the session defaults to AVAudioSessionCategorySoloAmbient?
      _audioPlayer = [[AVAudioPlayer alloc]
        initWithContentsOfURL:_audioRecorder.url
        error:&error];

I looked at this a bit, but I'm not really sure what's causing it. I'm not using this plugin now and don't have a lot of time to work on it. I'd like to focus on releasing android support, then come back around to this issue. Let me know meanwhile if you find a solution!

It's gross but adding a delay in between stopping and deactivating the session fixes the problem.
Original code, not working:
RCT_EXPORT_METHOD(stopRecording)
{
  [_audioRecorder stop];
  [_recordSession setActive:NO error:nil];
  _prevProgressUpdateTime = nil;
}

Delayed working code:
RCT_EXPORT_METHOD(stopRecording)
{
    [_audioRecorder stop];
    _prevProgressUpdateTime = nil;
    [self performSelector:@selector(stopSession) withObject:nil afterDelay:1000];
}

-(void)stopSession
{
  [_recordSession setActive:NO error:nil];
}

It seems that stop happens async and deactivating the audio session before it's finished can become a race condition issue.
I tried to deactivate the audio session after the audioRecorderDidFinishRecording event so we don't have to use a gross delay.  But recorder stop seems to still still be doing it's thing after the audioRecorderDidFinishRecording event is triggered.  Possibly encoding the audio?  Who knows.

^ Edited on github.

Is this still happening?

I have the same problem too. After I stop the record, I can not play all the media file (video and audio)

@benlinton if you're still seeing this, can you submit a PR with this change? Ideally the delay could be configurable.

I imagine so, but I haven't been working with this library for the last few months so I can't say for sure.

Just encountered this problem when developing a chat app

I have the same problem too. I read library react-native-audio and react-native-sound native code. I find this:

When react-native-audio stop recording, it set AVAudioSession to be inactive in file AudioRecorderManager.m

RCT_EXPORT_METHOD(stopRecording)
{
  [_audioRecorder stop];
  [_recordSession setActive:NO error:nil];
  _prevProgressUpdateTime = nil;
}

Then use react-native-sound to play audio file. It sames like the AVAudioSession isn't set to be active.

So, After added this code in my javascript file. It worked :
if (Platform.OS == 'ios') {  SoundPlayer.enableInSilenceMode(true);}    // <---- this line
this.soundPlayer = new Sound(filename, SoundPlayer.DOCUMENT, (error) => {
  ...
}

I think it's good manners that setting AVAudioSession to be active before creating a new instance of Sound and setting to be inactive after creating fail, playing fail and playing success.
Hope to be helpful.

@HermitCarb it worked for me, thank u~

Looks like this is solved, so closing.