Set Methods are not generated for Anonymous Complex Type

hi, i have a XSD as below and i use the plugin to generate the JAXB Class which does not have any methods other than toString, hashCode and equals. Please refer the second screenshot. Please help me how to generate the methods.

Look in the CustomerAccountType, your property methods are probably there.
Your question is clearly out of the scope of this project.

Sorry for not including the screenshot for CustomerAccountType where i have the the below comments
/**
* Gets the rest of the content model.
*
*
* You are getting this "catch-all" property because of the following reason:
* The field name "CustomerPurchase" is used by two different parts of a schema. See:
* line 28 of file:/C:/00_PROJECTS/99_workspace/c360-canonical-models/src/main/xsd/com/schema/physical/customeraccount/v9_03/customeraccount.xsd
* line 26 of file:/C:/00_PROJECTS/99_workspace/c360-canonical-models/src/main/xsd/com/schema/canonical/customeraccount/v9_03/customeraccount.xsd
*
* To get rid of this property, apply a property customization to one
* of both of the following declarations to change their names:
* Gets the value of the rest property.
*
*
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a set method for the rest property.
*
*
* For example, to add a new item, do as follows:
*
*    getRest().add(newItem);
*
*


The limitations of the free language tool does not prevent the extension from running

References #44
The free version of LangaugeTool is limited and as such cannot accommodate larger emails. This should not impede the extension's ability to run, it should instead continue scanning.
definition of done:

[x] Scanning continues even after the LangaugeTool limit is reached
[x] There are no errors related to using the LangaugeTool

Investigated ways of avoiding the call limit and began implementing
[t:60]

Working on making calls smaller
[t:70]

API is no longer affected by length of email and does not throw errors
[t:60]

API does not throw errors and does not impact other elements
[t:90]

Fixed the merge conflicts
[t:140]


Windows tty: duplicate special keys

Version: 1.25.0
Platform: Windows (10, x64 - would likely affect all version of Windows)

Hi,
I have been investigating an issue with a command line Node tool that I maintain; after tracking it down through issues in Inquirer.js and Node.js, I believe the issue originates in libuv 1.25.0.
This minimal Node.js script will reproduce the problem:
const readline = require('readline')
const process = require('process')

let rl = readline.createInterface({terminal: true, input: process.stdin, output: process.stdout})
rl.resume()
rl.input.on('data', (chunk) => {
  console.log(`Received ${chunk.length} bytes of data - content was: ${chunk}`)
})

Run it, press a special key (e.g. down arrow) and see that two events are received. Revert to Node pre updgrade to libuv 1.25.0 (e.g. 11.7.0) to see the expected behavior.
I believe this is a regression introduced by d2e59bb6003d707bdebd7a381f5a7e1d0cc3fd3b, which was attempting to fix https://github.com/libuv/libuv/issues/2111 and was merged as https://github.com/libuv/libuv/pull/2114.
Specifically, this new code in src/win/tty.c is problematic:
/* Ignore keyup events, unless the left alt key was held and a valid
 * unicode character was emitted. */
if (!KEV.bKeyDown &&
    KEV.wVirtualKeyCode != VK_MENU &&
    KEV.uChar.UnicodeChar != 0) {
  continue;
}

it replaces this test:
if (!KEV.bKeyDown && !(((KEV.dwControlKeyState & LEFT_ALT_PRESSED) ||
    KEV.wVirtualKeyCode==VK_MENU) && KEV.uChar.UnicodeChar != 0)) {
  continue;
}

But does not have equivalent behavior because the grouping together of the condition on the menu key and on the emitted character was dropped. On key up of a special key without menu held, the third clause is false, so the continue is not hit and a spurious event is emitted.
Simplifying for the test on LEFT_ALT_PRESSED apparently being useless (according to that PR), the old code was:
if (!KEV.bKeyDown && !(KEV.wVirtualKeyCode==VK_MENU && KEV.uChar.UnicodeChar != 0)) {
  continue;
}

which, in keeping with the attempt to simplify by removing the negation of the parenthesized group, would boil down to:
if (!KEV.bKeyDown && (KEV.wVirtualKeyCode!=VK_MENU || KEV.uChar.UnicodeChar == 0)) {
  continue;
}

I'm happy to create a PR with the above but I'm not familiar with this repo at all so it might take longer for me to do so than it would for a maintainer 😁
Let me know if my logic makes sense and if you'd like a PR!

Regarding this problem I already created PR on #2160.

Paging @bzoz. FWIW, I came to the same conclusion, that it's caused by d2e59bb60.

@Ezekiel-DA are you (or anyone else on Windows) able to apply this two line change, rebuild Node.js, and see if it fixes the problem?

@cjihrig it does, that is literally the same code I arrived at in the post above. I should have mentioned that I did rebuild Node with it and my basic test passed 😁


atom crash

[Enter steps to reproduce:]

...
...

Atom: 1.17.2 x64
Electron: 1.3.15
OS: Microsoft Windows 10 Pro
Thrown From: Atom Core
Stack Trace
Uncaught Error: Cannot read property 'object' of undefined
TypeError: Cannot read property 'object' of undefined
at ObjectsRegistry.get (C:\Users\adurna\AppData\Local\atom\app-1.17.2\resources\electron.asar\browser\objects-registry.js:41:28)
at EventEmitter. (C:\Users\adurna\AppData\Local\atom\app-1.17.2\resources\electron.asar\browser\rpc-server.js:306:31)
at emitMany (events.js:127:13)
at EventEmitter.emit (events.js:201:7)
at WebContents. (C:\Users\adurna\AppData\Local\atom\app-1.17.2\resources\electron.asar\browser\api\web-contents.js:222:13)
at emitTwo (events.js:106:13)
at WebContents.emit (events.js:191:7)
At C:\Users\adurna\AppData\Local\atom\app-1.17.2\resources\electron.asar\renderer\api\remote.js:217

Error: Cannot read property 'object' of undefined
TypeError: Cannot read property 'object' of undefined
    at ObjectsRegistry.get (~/AppData/Local/atom/app-1.17.2/resources/electron.asar/browser/objects-registry.js:41:28)
    at EventEmitter.<anonymous> (~/AppData/Local/atom/app-1.17.2/resources/electron.asar/browser/rpc-server.js:306:31)
    at emitMany (events.js:127:13)
    at EventEmitter.emit (events.js:201:7)
    at WebContents.<anonymous> (~/AppData/Local/atom/app-1.17.2/resources/electron.asar/browser/api/web-contents.js:222:13)
    at emitTwo (events.js:106:13)
    at WebContents.emit (events.js:191:7)
    at metaToValue (~/AppData/Local/atom/app-1.17.2/resources/electron.asar/renderer/api/remote.js:217:13)
    at undefined.remoteMemberFunction (~/AppData/Local/atom/app-1.17.2/resources/electron.asar/renderer/api/remote.js:113:18)
    at AtomEnvironment.module.exports.AtomEnvironment.getWindowDimensions (~/AppData/Local/atom/app-1.17.2/resources/app/src/atom-environment.js:663:1)
    at AtomEnvironment.module.exports.AtomEnvironment.storeWindowDimensions (~/AppData/Local/atom/app-1.17.2/resources/app/src/atom-environment.js:697:1)
    at WindowEventHandler.module.exports.WindowEventHandler.handleWindowBlur (~/AppData/Local/atom/app-1.17.2/resources/app/src/window-event-handler.js:184:1)
    at ~/AppData/Local/atom/app-1.17.2/resources/app/src/window-event-handler.js:3:1

Commands
     -0:49 editor:move-to-end-of-screen-line (input.hidden-input)
     -0:47.2.0 editor:move-to-first-character-of-line (input.hidden-input)
     -0:46.8.0 editor:move-to-end-of-screen-line (input.hidden-input)
     -0:44.8.0 editor:move-to-first-character-of-line (input.hidden-input)
     -0:43.4.0 editor:move-to-end-of-screen-line (input.hidden-input)
     -0:42.6.0 editor:move-to-first-character-of-line (input.hidden-input)
     -0:42 editor:move-to-end-of-screen-line (input.hidden-input)
     -0:40.4.0 editor:move-to-first-character-of-line (input.hidden-input)
     -0:37.3.0 editor:move-to-end-of-screen-line (input.hidden-input)
     -0:36.6.0 editor:move-to-first-character-of-line (input.hidden-input)
     -0:36.3.0 editor:move-to-end-of-screen-line (input.hidden-input)
     -0:35.6.0 editor:move-to-first-character-of-line (input.hidden-input)
     -0:33.6.0 editor:move-to-end-of-screen-line (input.hidden-input)
     -0:32.9.0 editor:move-to-first-character-of-line (input.hidden-input)
     -0:31.3.0 intentions:highlight (input.hidden-input)
     -0:31.2.0 core:save (input.hidden-input)

Non-Core Packages
busy-signal 1.4.3
editorconfig 2.2.2
file-icons 2.1.7
formatter-json 1.0.1
git-plus 7.9.3
intentions 1.1.2
language-typescript-grammars-only 1.6.0
linter 2.1.4
linter-eslint 8.2.1
linter-ui-default 1.6.1
merge-conflicts 1.4.5
react 0.16.2

Thanks for taking the time to contribute!
We noticed that this is a duplicate of #11692. You may want to subscribe there for updates.
Because we treat our issues list as the Atom team's backlog, we close duplicates to focus our work and not have to touch the same chunk of code for the same reason multiple times. This is also why we may mark something as duplicate that isn't an exact duplicate but is closely related.
For information on how to use GitHub's search feature to find out if something is a duplicate before filing, see the How Can I Contribute? section of the Atom CONTRIBUTING guide.


Change bool pinning option to custom pinning string

I'd suggest to let the user define the hashes to pin by themselves instead, when they e.g. want to pin the cert of a HTTPS MITM box or so or when you forget to update the hash when Threema updates their certs. :wink:
An example can be seen here.
Ref https://github.com/thorsteneckel/threema/commit/5dfa6800628d25c052a62a539ed650a3bc7c15f1#commitcomment-21503456

I guess this can be closed after #24


Policy wizard in the GUI

Description
Currently the Kuma GUI will show all of the policies that are configured and you can view the YAML for them. It would be great if you could click a "new" button and it would generate an example of the policy that could be edited or copied. Right now you need to navigate to the docs and copy/paste from there. Even better would be to have a form where you could enter all of the parameters for the config and generate the exact YAML needed.

This is still missing and we haven’t planned working on it so far.

Just thinking about this out loud. Policies have schema.yaml now.
Are there tools to create forms out of json schemas?
If yes we could consider exposing the schema from the cp and leverage this to create wizards no?

Do we still want to do this?

Let's close it for now and if we need this we'll create this again


Remove dependency on Object Ids

PR is for removing the dashboards dependency on configuration Item Object Ids. It places the Dependency on the configuration item names instead.

@tabladrum LGTM


Set-PoshPrompt doesn't resolve path using home ~

Prerequisites

[X] I have read and understand the CONTRIBUTING guide
[X] I looked for duplicate issues before submitting this one

Description
Set-PoshPrompt doesn't resolve path using home ~
Environment

Oh my Posh version: 3.23.4
Theme: ~/OneDrive/Documents/PowerShell/.go-my-posh.json
Operating System: macOS 10.15.7
Shell: pwsh
Terminal: iTerm2

Steps to Reproduce
From a good prompt, I'll run
Set-PoshPrompt ~/OneDrive/Documents/PowerShell/.go-my-posh.json
Set-PoshPrompt ( Resolve-Path ~/OneDrive/Documents/PowerShell/.go-my-posh.json )

Expected behavior: prompt should always be ➜ ~/OneDrive/Documents/PowerShell
Actual behavior:
➜ ~/OneDrive/Documents/PowerShell Set-PoshPrompt ~/OneDrive/Documents/PowerShell/.go-my-posh.json
<EMAIL_ADDRESS>  PowerShell  96  ﲵ pwsh    Set-PoshPrompt ( Resolve-Path ~/OneDrive/Documents/PowerShell/.go-my-posh.json )
➜ ~/OneDrive/Documents/PowerShell

You can see that Set-PoshPrompt ~/OneDrive/Documents/PowerShell/.go-my-posh.json causes the prompt to become the default powerline:  carl@MACPC   PowerShell  96  ﲵ pwsh   

Workaround is to call Resolve-Path first like:
Set-PoshPrompt ( Resolve-Path ~/OneDrive/Documents/PowerShell/.go-my-posh.json )

I'll add Resolve-Path to the module code. I thought I tested this, but on MacOS however.


Brew service no longer exists on latest skhd

➜  ~ brew services restart skhd
Error: Formula skhd has not implemented #plist, #service or installed a locatable service file
➜  ~ skhd --version
skhd-v0.3.7

Same here. After updating and upgrading brew packages. (Apple Silicon / last macOS monterey)
As a workaround, you can start skhd with launchd running skhd --start-service
In my case I first get an error skhd: service file '/Users/user/Library/LaunchAgents/com.koekeishiya.skhd.plist' is not installed! attempting installation..and had to restart it skhd --restart-service.
Hope it can help.

@qtaped it doesn't work for me, try to restart it but got the same error
skhd: service file '/Users/eh/Library/LaunchAgents/com.koekeishiya.skhd.plist' is not installed! abort..
Btw I got the same error when trying to start yabai as well, here is what I have tried:
❯ brew services start yabail

Error: Formula "yabai" has not implemented #plist, #service or installed a locatable service file

Also try this
❯ yabai --start-service

yabai: service file '/Users/user/Library/LaunchAgents/com.koekeishiya.yabai.plist' is not installed! attempting installation..
yabai: service file '/Users/user/Library/LaunchAgents/com.koekeishiya.yabai.plist' could not be installed! abort..

try skhd --stop-service and skhd --start-service, may check log file for more information

You can try to run skhd --install-service or/and check if the directory ~/Library/LaunchAgents exists. If it's not the case : mkdir ~/LIbrary/LaunchAgents and run again skhd --start-service

Same here. After updating and upgrading brew packages. (Apple Silicon / last macOS monterey)

The exact same happened to me, but I cannot get it to work.

brew services is not listing skhd anymore.

When I try

$ skhd --start-service
skhd: service file '/Users/pablo/Library/LaunchAgents/com.koekeishiya.skhd.plist' is not installed! attempting installation..
Load failed: 5: Input/output error
Try running `launchctl bootstrap` as root for richer errors.

I've tried uninstalling skhd and removing those plist files manually for fresh start.

Tried all combinations of --stop-service, --start-service and --restart-service.

Added it to accessibility list again.

I was able to get it started from launchctl but is not working:

$ ps aux | grep skhd
pablo             1682   0.0  0.0 408628368   1648 s000  S+   11:08AM   0:00.00 grep skhd

$ launchctl load ~/Library/LaunchAgents/com.koekeishiya.skhd.plist

$ ps aux | grep skhd
pablo             1649   0.0  0.1 408880208  17168   ??  S<   11:07AM   0:00.07 /opt/homebrew/bin/skhd
pablo             1682   0.0  0.0 408628368   1648 s000  S+   11:08AM   0:00.00 grep skhd

Running it manually neither works.

Why why why 😢

Load failed: 5: Input/output error

This is a launchctl gimmick, and other people have also experienced the same error using brew services.
Moved away from brew services because of https://github.com/koekeishiya/yabai/issues/1619

Load failed: 5: Input/output error

This is a launchctl gimmick, and other people have also experienced the same error using brew services.
Moved away from brew services because of koekeishiya/yabai#1619

I am currently getting Load failed: 5: Input/output error when trying to start skhd using skhd --start-service so I am not sure this is actually a brew issue?

Load failed: 5: Input/output error

This is a launchctl gimmick, and other people have also experienced the same error using brew services.
Moved away from brew services because of koekeishiya/yabai#1619

I am currently getting Load failed: 5: Input/output error when trying to start skhd using skhd --start-service so I am not sure this is actually a brew issue?

I was getting the exact same error.. only god knows how it solved for itself after touching a million things. Good luck.


Home Assistant 2021.11.x breaks Tuya light strip

I have under cabinet lights that run in the Tuya app. (Torchstar brand) They have worked fine in HA until updating the core to 2021.11.2. My power cords still work but the lights now only show in the configuration as a device, but not an entity. They say “unsupported” next to them. I restored 2021.10.x and they fine again. Why would they not work in HA if they still show/work in the Tuya app? I have also confirmed the device type as "dj" which is definitely listed under supported devices.

Hello i've same problem with all my Zigbee lights handled by Tuya protocol

Log error :
Logger: homeassistant.components.light
Source: components/tuya/light.py:400
Integration: Lumière (documentation, issues)
First occurred: 11:58:51 (1 occurrences)
Last logged: 11:58:51
Error while setting up tuya platform for light
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 249, in _async_setup_platform
await asyncio.shield(task)
File "/usr/src/homeassistant/homeassistant/components/tuya/light.py", line 316, in async_setup_entry
async_discover_device([*hass_data.device_manager.device_map])
File "/usr/src/homeassistant/homeassistant/components/tuya/light.py", line 309, in async_discover_device
TuyaLightEntity(
File "/usr/src/homeassistant/homeassistant/components/tuya/light.py", line 400, in init
device.status_range[self._brightness_dpcode].values
KeyError: <DPCode.BRIGHT_CONTROLLER: 'bright_controller'>

Hi @almighty059 unfortunately i'm not able to help i've switched to zigbee2mqqt 6 months ago

@Moustik2002 I actually just figured it out. Two of my Tuya devices were causing the Tuya integration to break but I don't know why yet. When I remove them all of the lights come back and function correctly. The devices were two switches, one was an outlet socket that gets plugged into the wall outlet and the other was a hardwired switch that gets put inside of the electrical box.
I actually just noticed that you said your "power cords" still work correctly. I assume that they were Tuya smart power cords and probably considered switches just like mine. If that is all that you were using then I bet if you would have removed the power cords from the Tuya integration the lights would have started working correctly again. If that's true then the power switches are breaking the integration of any devices that use the light domain.
Thanks for the response though because I think your issue confirmed what's happening with with devices.


Update comments on heap availability on no_std.

As per https://github.com/rust-embedded/book/issues/33.

bors r+


customized the cherry pick branch name

if I cherry-pick to muliple branches, the branch name is same for different release branch, that cause conflict. same branch to create pull request and cherry pick but created from different release branches

Hi @litaocdl, have you already done some work on this topic? Otherwise I'm happy to start working on it, since I'll need this improvement too.

Hey @litaocdl
in what scenario do you have this? The release branch + git commit SHA should always be unique.


draftsSelectors: Flow typed selector

Issue in focus: #2971
I'm aware of the PR #3166, but draftsSelectors wasn't a part of original PR message. I went through the discussion and didn't find any mention of removing this entirely so I went ahead and typed the selector present in draftsSelectors.js.
Tests ran:

[x] npm run test:flow
[x] npm run test:lint

Looks good, merged -- thanks!

npm run test:flow
npm run test:lint

I'm curious, how did you come across those commands to use? Generally we've recommended yarn test:flow and yarn test:lint, both for consistency with use of yarn elsewhere and because it's one fewer word to type.
Though since yesterday, those are just aliases for a still shorter command: tools/test will run all of them, and only on files you've changed so it's very fast. :smile: Or tools/test flow etc. for running just one kind of check.

the way auto-complete works on my terminal, to get yarn, i have to go all the way till the 3rd character but npm run is the first thing that pops up when I type in n so I just went with that

Maybe this means you want something like alias y=yarn in your .bashrc :wink: , so you can type just y flow.

That's really smart! I wonder why I din't notice it before :sweat_smile:
Thanks a lot @gnprice


Mention kitty port in the README

Tell me if you made a port and i'll list them here

👋 👋 👋

Thank you!


Android launch fails on rpl-s platform

unable to find the operating system in a/b slots
Tracked-On: OAM-110665

kernel changes not requried and created pr https://github.com/projectceladon/vendor-intel-utils-vertical-iot/pull/70 for vm manger changes


Zip search not consistently bringing up MOC cards

This was an Oregon zip code but only brought up the event table. No MOC cards.

can't reproduce


address CVE-2019-13990 by updating quartz from 2.2.3 to 2.3.2

The latest version of the grails quartz plugin, currently 2.0.13, has the vulnerability CVE-2019-13990.  This issue is addressed by updating to quartz 2.3.2.  Instead of users updating the dependency themselves, see example, this issue should be addressed in the plugin directly.  Relevant links:
quartz github issue
maven central vulnerability

This repository has been inactive for a few years. @puneetbehl it appears you are the latest maintainer.  Mind taking a look?

@puneetbehl are you able to take a look at this or refer me to another maintainer of the project?

@puneetbehl are you able to take a look at this or refer me to another maintainer of the project?

@Richardson-e @mattmoss @puneetbehl are you able to take a look at this?

Sorry for the delayed response. Thank you for this PR. We are working on updating a new version of the Quatz plugin and wiil include all these changes. @Richardson-e Could you please add these changes to the latest codebase.


netascode.gen user denied access to repo in nac-meraki pipeline

Hi Team,
I have tried running pipeline today as an update for nac-meraki repo.
As you know part of this pipeline is to run  update_repos.py. I can see your netascode.gen user being denied access to this repo so it fails.
Could it be the token has expired, or perhaps permissions have been revoked accidentally for netascode.gen ?
I am unable to check the security settings of the repo, so please could you validate this for me ?
--- snip from pipeline ---
08:34:23 remote: Permission to netascode/terraform-meraki-nac-meraki.git denied to netascode-gen.
08:34:23 fatal: unable to access 'https://github.com/netascode/terraform-meraki-nac-meraki/': The requested URL returned error: 403
Thanks.
Jon

Should be resolved now.


Remove arch book because it's too old (about 2012) and link doesn't e…

…xist
What does this PR do?
Remove Resource  آرچ بوک in Persian
For resources
Description
The book link does not work (404) and also the book is about Archlinux book around 2012. so everything probably deprecated.

I think the index entry also needs removal

@eshellman fix that

thanks


Updating to CF Rate Limits

Description

Update new rate limits

Testing required outside of automated testing?

[x] Not Applicable

Screenshots (if appropriate):

[ ] Not Applicable

Rollback / Rollforward Procedure

[x] Roll Forward
[ ] Roll Back

Reviewer Checklist

[ ] Description of Change
[ ] Description of outside testing if applicable.
[ ] Description of Roll Forward / Backward Procedure
[ ] Documentation updated for Change

:tada: This PR is included in version 1.37.1 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Upload new versions to PyPI

Hi,
I'm trying to create a conda-forge recipe for fast_hdbscan, but the Windows build is failing due to a bug that has been fixed in version 0.1.1. However, I can't create a recipe for newer releases because they are not in PyPI.
Are there any plans to have new releases in PyPI?

Yes, I should get on to that. Sorry for the issues.

Thank you!

Is there an update on this issue?
I'm encountering the following problem with numpy>=2 using the version on pypi regarding line 134 of cluster_tree.py.
    ignore = np.zeros(root + 1, dtype=np.bool8)

E   AttributeError: module 'numpy' has no attribute 'bool8'


Prebuilds repo

Repo with prebuilt versions of dependencies and Derive.

Create repo for builds of dependencies and added LFS support.
Currently unable to push to repo. Asks for Github credentials every time and fails even though they are correct.
Leaving this for now.

Closing issue. Do not think it is required. Have improved the dependency build scripts.


Server not starting?

Whenever I try to run the basic example shown in the readme I get the following error:
Traceback (most recent call last):   File "Z:\Conda\lib\site-packages\beamngpy\beamng.py", line 470, in connect     self.skt.connect((self.host, self.port)) ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it
No opened port was found after running both the BeamNG.research/tech executable and checking it using the "netstat -ab" command.
Disabling my firewall also did nothing.
Do you know what could be causing this issue ?

Solved
determine_user_path somehow didn't work for me and was unable to load the executable.
I solved it by adding the "user" parameter in the BeamNGpy object construction. This in turn was the address to some folder containing the tech key.


Add RPC signatures for fetch blocks and fetch blocks metadata

cc @xichen2020

Coverage decreased (-0.6%) to 78.512% when pulling 71b2df16b00fa1d3bf07e4c20921e99846059bf5 on fetch-blocks-contract into 0af1e3c008093a2067f4355fbd2c0e94bb962063 on master.

LGTM


Port incorrect in image

The Internal Load Balancer image specifies port 1443 instead of port 1433.

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

ID: 7eaaf7c7-c1fe-1afc-e7f8-bc0e90044fb8
Version Independent ID: 6461936a-3f5d-c2fe-cb37-e40fc9dc929e
Content: Azure Load Balancer overview
Content Source: articles/load-balancer/load-balancer-overview.md
Service: load-balancer
GitHub Login: @KumudD
Microsoft Alias: kumud

@rabryst can you please link the document where it specifies port 1443?

https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/load-balancer/media/load-balancer-overview/IC744147.png
Sorry about that. I was using my phone and it was tricky to get the URL.

#in-progress


[Feature] Time Zone Converter

Description
Convert times between different time zones.
Screenshots
No response
Checklist

[X] I have checked the existing issues.
[X] I follow Contributing Guidelines of this project.
[ ] I am a IWOC'24 contributor.
[ ] I am a JWOC'24 contributor.
[ ] I am a SWOC'24 contributor.

Code of Conduct

[X] I agree to follow this project's "Code of Conduct".

👋 Hello! I'd be happy to help with this issue. Could you please assign it to me? Additionally, could you please label it for the appropriate level? Thank you! 🚀

We already have Time Zone Calculator, pls create new issues @amishah1110


Feature request/suggestion: Categorizing faker classes

Hadn't used this gem in a bit – the list of examples has become pretty difficult to parse (and seems to be getting more so). Bucketing the Faker classes in some way seems useful and could be done in a non breaking way. (e.g. move Faker::RickAndMorty to Faker::PopCulture::RickAndMorty and expose its namespace in both ways).
Not sure the proper bucketing/classification, would be happy to open a PR if there's interest (I feel like there would be strong opinions on this).

Ha yes. I foresaw this several months ago and have been watching the library as it grows.  The conclusion was that, seeing as that faker is most likely only used in development, until it becomes unwieldy there was no need to split it up.
I could see how that time would be now.
I think pop culture works.  I know I've seen Pokémon soon after Go was released.
It depends on the mission of the library.  Undoubtedly, a price is different from a city and the two cannot be used interchangeably. However, what's the pressing need to have fake Pokémon or rick and morty data?  If it's fake data then it doesn't need to be real, by definition.
Personally if I want a city, a fake city, and it sounds like a real city (fakeadelphia) then I'm cool as long as it doesn't repeat (if I don't want it to).  I don't need real cities.
Just some thoughts.

On Sep 14, 2017, at 7:17 PM, Jon Kaplan<EMAIL_ADDRESS>wrote:
Hadn't used this gem in a bit – the list of examples has become pretty difficult to parse (and seems to be getting more so). Bucketing the Faker classes in some way seems useful and could be done in a non breaking way. (e.g. move Faker::RickAndMorty to Faker::PopCulture::RickAndMorty and expose its namespace in both ways).
Not sure the proper bucketing/classification, would be happy to open a PR if there's interest (I feel like there would be strong opinions on this).
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

If it's _fake_ data then it doesn't need to be real, by definition

Yes.
It's almost like there needs to be two libraries, one for fake things like
FactoryHelper::String.random #=> "3 뇦\u0017&y\u{3A109}$8^4* 녹豿4좘툢ꔾ쉙6ɉ\uA6 8TN畀챵|\"3쇤Ŵ"

and another for fake real data like
Faker::RickAndMorty.character #=> "Rick Sanchez"

I think this can be closed now 👍

Cool, looks like this was implemented!

👍


Automated daily update to rustc (to nightly-2024-03-21)

Automated update to Github CI workflow rust.yml by create-pull-request GitHub action

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 83.444%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
19061

Relevant Lines:
22843

💛  - Coveralls

Still no update on our clippy issues.
There is a workaround in one of the issues, maybe we should try that..


Fix exception when trying to automatically train mProphet model after decoys removed

I would think that training a model could fail for a lot of different reasons, so it seems unnecessary to write code to specifically handle the "there are no decoys in the document" case. Have we tested what happens if the model training fails for some other reason?
I do not know of a reliable way to make training a model fail, but I wonder what would happen if the user deleted all but one of the decoys.

Handling the case of zero decoys might be a little more helpful for users. But now I added a more general case also (your idea of deleting all but one of the decoys works).
It looks like I changed a bunch of code in MProphetScoringModel.cs, but I just wrapped the code in a try/finally so that we can complete the progress monitor even if an exception happens (otherwise it gets stuck on the status bar).

I tend to prefer making the current function a sub-function and putting the try {} finally in the calling function, rather than adding indentation to a large block of code.


Update the website

@flavio I included the video and added some other small fixes. Let me know if it is okay to be merged.

@cyntss I like the changes! There's a file conflict however, I solved that locally and I can push to the gh-pages branch for you if you want.

LGTM

@flavio thank you for merging it :+1:


Search Bar

I noticed there is a todo regarding searching for a claim by tag, but this is not a User story. In fact I don't think there is any need for a search bar. Am I wrong or can we just take it out?

Down with the search bar!


large models

Hello-
Thank you for sharing this work. I've noticed how well these models work with smaller audio files. Is there any plans to release the large models?
Thanks

followup- i finetuned whisper large-v3 using the script in this repo and short audio clips still suffer from same issue.
is it possible that the large-v3 needs more training? If so, can you share some details on how to do that? Thanks again.

Hi, do you plan on sharing how you did? Especially GPU requirements, scripts, time needed, etc? Also what's your opinion on quantization aware fine tuning? IIRC it can potentially greatly reduce the size, increase the speed and at no additional computing cost.

https://gist.github.com/eschmidbauer/c1bb441028a61db19d833a289688e8f6
slightly modified script provided in repo

Thanks! Do you plan on sharing the model? I'm also interested in:

GPU requirements, time needed,

and

Also what's your opinion on quantization aware fine tuning? IIRC it can potentially greatly reduce the size, increase the speed and at no additional computing cost.


Dates Nil

New Version Swift above 4 dates are getting nil no date is appended..

Can you try to reproduce this bug with new library version 2.2.0?


Download link for ESP-IDF v4.4 beta1 does not work (IDFGH-6403)

https://dl.espressif.com/dl/esp-idf/releases/esp-idf-v4.4-beta1.zip
returns 404

@iamdavidcz Thanks for reporting, we have observed the issue and will fix soon.

@iamdavidcz  Thanks for the issue, the link works now

@Alvin1Zhang I can confirm that the link works now, thank you


Fixing Travis CI build

trying to fix the build with ubuntu bionic

Still a lot errors like these:
/usr/share/dotnet/sdk/2.2.108/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(129,5): error MSB4018: The "GenerateDepsFile" task failed unexpectedly. [/home/travis/build/MUnique/OpenMU/src/PlugIns/MUnique.OpenMU.PlugIns.csproj]
2763
/usr/share/dotnet/sdk/2.2.108/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(129,5): error MSB4018: System.MissingMethodException: Method not found: System.Collections.Generic.IList`1<NuGet.Packaging.Core.PackageDependency> NuGet.ProjectModel.LockFileTargetLibrary.get_Dependencies() [/home/travis/build/MUnique/OpenMU/src/PlugIns/MUnique.OpenMU.PlugIns.csproj]
2764
/usr/share/dotnet/sdk/2.2.108/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(129,5): error MSB4018:   at Microsoft.NET.Build.Tasks.DependencyContextBuilder+<>c__DisplayClass36_0.<GetLibraries>b__0 (NuGet.ProjectModel.LockFileTargetLibrary export) [0x00000] in <aafa1364e74c4a5ea60cdcaa95f71707>:0  [/home/travis/build/MUnique/OpenMU/src/PlugIns/MUnique.OpenMU.PlugIns.csproj]

Will remove Travis CI from the project.
An Azure Pipeline builds this project for windows already. The Linux build is covered by a new pipeline which builds the docker container image.
So, there is no reason anymore to keep Travis.


Components are not displayed correctly in Streamlit v.1.29.0

In the newly released Streamlit v.1.29.0, Components are not displayed correctly: the text color and background color of elements become white (only the preset element is visible).

thanks,fixed in new version.

Thank you for the good package and rapid fixing


Detail of the test

Hi,
Thanks for working on this. Would you share more about the detail of the metrics and the task for each dataset?
For example, TruthfulQA has multiple choice and generation tasks, each using some metrics.
Thanks,
VIet

All experiments were conducted in Hugging Face's Docker environment called "space." Additionally, you can compile your model as well. For more detailed information, please check the following link!
The images in this repository are used as the background data for the results on the following page.
https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard

I think you misunderstand my question.
The question is:
What are the metrics used to report in the open_llm_leaderboard. Are they accuracy/accuracy_norm/bleu/rouge/bleurt?

As I mentioned above, you can check at here.
https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/blob/main/utils.py
LMEH_REPO = "HuggingFaceH4/lmeh_evaluations"

METRICS = ["acc_norm", "acc_norm", "acc_norm", "mc2"]
BENCHMARKS = ["arc_challenge", "hellaswag", "hendrycks", "truthfulqa_mc"]
BENCH_TO_NAME = {
    "arc_challenge":"ARC (25-shot) ⬆",
     "hellaswag":"HellaSwag (10-shot) ⬆",
     "hendrycks":"MMLU (5-shot) ⬆",
     "truthfulqa_mc":"TruthfulQA (0-shot) ⬆",
}

In the evaluation of LLM (Language Model), there are various metrics available to assess the model's performance. However, the most reliable approach is to examine the check code and evalset.

Thank you for pointing this out. I didn't know that it has source code behind it. I really appreciate your prompt response.
Close the issue due to the problem is solved.


Request for Integrating the new NAS algorithm: Cream

Cream of the Crop: Distilling Prioritized Paths For One-Shot Neural Architecture Search

Hi @scarlett2018 , the issues had been solved, pls have a review.


[MongoDB extension] Refactor with camel 3.1.x new connection bean

As originally described in jira issue, the next camel 3.1.x version will add a change to the camel-mongodb component, using a new connection bean interface replacing the older deprecated one.

@squakez are you by any chance planning to work on this?

@squakez are you by any chance planning to work on this?

Not in the short term. I may have a look after Jan 15, but no guarantees.

I'll take this one. Probably best we test it ASAP against a Camel 3.1 SNAPSHOT to verify that the changes work ok.


https://docs.microsoft.com/en-us/graph/api/channel-post-chatmessage?view=graph-rest-beta

Result is 404

I think this is the link you're looking for:
https://docs.microsoft.com/en-us/graph/api/channel-post-messages?view=graph-rest-beta

Hey - still not fixed, can we get this link updated please?

Here's where it's still broken, from the February 2019 changelog:

@CorbinMeek, thanks for pointing the other location where it's still broken. I've opened https://github.com/microsoftgraph/microsoft-graph-docs/pull/6478.


Darken the background on the command palette

Please change the background in the command palette to match the new background of the cards mentioned in #17

Will add an option for this.

Done. There's a new checkbox in the settings.

Thank you! Love this theme!


Improve Retry and Resume Logic for Log Streaming

Due to the following reasons, there is a possibility of fetching duplicate logs during log resumption. Hence, there is a need to improve the logic for resuming log retrieval:

The accuracy is compromised because it relies on the relative seconds calculated from the timestamp of the last log and the current time.
Since since_seconds is in seconds, it may result in fetching duplicate logs if multiple logs are output within a one-second timeframe.

https://github.com/kube-rs/kube/discussions/1339


ConnectionRefusedError error on OSX

Since the last update we are getting a "ConnectionRefusedError: [Errno 61] Connection refused" on all of our OSX machines. Windows machines seem fine. I tried running the OmniServer in a Terminal and I get a JSON syntax error:
00038022 System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: JSON syntax error.
at Nancy.Json.JsonDeserializer.Deserialize (System.IO.TextReader input) [0x00000] in :0
at Nancy.Json.Json.Deserialize (System.IO.TextReader input, Nancy.Json.JavaScriptSerializer jss) [0x00000] in :0
at Nancy.Json.Json.Deserialize (System.String input, Nancy.Json.JavaScriptSerializer jss) [0x00000] in :0
at Nancy.Json.JavaScriptSerializer.DeserializeObjectInternal (System.String input) [0x00000] in :0
at Nancy.Json.JavaScriptSerializer.Deserialize[AutoCompleteRequest] (System.String input) [0x00000] in :0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in :0
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) <0x00131>
at System.Reflection.MethodBase.Invoke (object,object[]) <0x0002a>
at Nancy.ModelBinding.DefaultBodyDeserializers.JsonBodyDeserializer.Deserialize (string,System.IO.Stream,Nancy.ModelBinding.BindingContext) <0x00238>
at Nancy.ModelBinding.DefaultBinder.DeserializeRequestBody (Nancy.ModelBinding.BindingContext) <0x00318>
at Nancy.ModelBinding.DefaultBinder.Bind (Nancy.NancyContext,System.Type,object,Nancy.ModelBinding.BindingConfig,string[]) <0x003ee>
at Nancy.ModelBinding.DynamicModelBinderAdapter.TryConvert (System.Dynamic.ConvertBinder,object&) <0x0007a>
at (wrapper dynamic-method) object.CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,object) <0x00106>
at System.Dynamic.UpdateDelegates.UpdateAndExecute1<object, OmniSharp.AutoComplete.AutoCompleteRequest> (System.Runtime.CompilerServices.CallSite,object) <0x005a1>
at Nancy.ModelBinding.ModuleExtensions.Bind<OmniSharp.AutoComplete.AutoCompleteRequest> (Nancy.INancyModule) <0x0011b>
at OmniSharp.AutoComplete.AutoCompleteModule/c__AnonStorey0.<>m__0 (object) <0x00025>
at (wrapper dynamic-method) object.CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,System.Func2<object, object>,object) <0x000a7> at System.Dynamic.UpdateDelegates.UpdateAndExecute2<System.Func2<object, object>, object, object> (System.Runtime.CompilerServices.CallSite,System.Func`2<object, object>,object) <0x005e0>
at Nancy.Routing.Route/<>c__DisplayClass4.b__3 (object,System.Threading.CancellationToken) <0x0016b>

This is a duplicate to another issue. Can you check that out and close this
one. Hopefully some pointers in the other issue to resolve your problem
On Thursday, 2 April 2015, 6b796c65<EMAIL_ADDRESS>wrote:

Since the last update we are getting a "ConnectionRefusedError: [Errno 61]
Connection refused" on all of our OSX machines. Windows machines seem fine.
I tried running the OmniServer in a Terminal and I get a JSON syntax error:
00038022 System.Reflection.TargetInvocationException: Exception has been
thrown by the target of an invocation. --->
System.InvalidOperationException: JSON syntax error.
at Nancy.Json.JsonDeserializer.Deserialize (System.IO.TextReader input)
[0x00000] in :0
at Nancy.Json.Json.Deserialize (System.IO.TextReader input,
Nancy.Json.JavaScriptSerializer jss) [0x00000] in :0
at Nancy.Json.Json.Deserialize (System.String input,
Nancy.Json.JavaScriptSerializer jss) [0x00000] in :0
at Nancy.Json.JavaScriptSerializer.DeserializeObjectInternal
(System.String input) [0x00000] in :0
at Nancy.Json.JavaScriptSerializer.DeserializeAutoCompleteRequest
http://System.String input [0x00000] in :0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke
(System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags
invokeAttr, System.Reflection.Binder binder, System.Object[] parameters,
System.Globalization.CultureInfo culture) [0x00000] in :0
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke
(object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
at System.Reflection.MethodBase.Invoke (object,object[])
at
Nancy.ModelBinding.DefaultBodyDeserializers.JsonBodyDeserializer.Deserialize
(string,System.IO.Stream,Nancy.ModelBinding.BindingContext)
at Nancy.ModelBinding.DefaultBinder.DeserializeRequestBody
(Nancy.ModelBinding.BindingContext)
at Nancy.ModelBinding.DefaultBinder.Bind
(Nancy.NancyContext,System.Type,object,Nancy.ModelBinding.BindingConfig,string[])
at Nancy.ModelBinding.DynamicModelBinderAdapter.TryConvert
(System.Dynamic.ConvertBinder,object&)
at (wrapper dynamic-method) object.CallSite.Target
(System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,object)
at System.Dynamic.UpdateDelegates.UpdateAndExecute1
(System.Runtime.CompilerServices.CallSite,object)
at Nancy.ModelBinding.ModuleExtensions.Bind (Nancy.INancyModule)
at OmniSharp.AutoComplete.AutoCompleteModule/c__AnonStorey0.<>m__0
(object)
at (wrapper dynamic-method) object.CallSite.Target
(System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,System.Func2<object,
object>,object) <0x000a7>
at System.Dynamic.UpdateDelegates.UpdateAndExecute2<System.Func2, object,
object> (System.Runtime.CompilerServices.CallSite,System.Func`2,object)
at Nancy.Routing.Route/<>c__DisplayClass4.b__3
(object,System.Threading.CancellationToken)
--
Reply to this email directly or view it on GitHub
https://github.com/OmniSharp/omnisharp-sublime/issues/149.

I think I looked at the issue you are referring to. I did make sure to set omniServer to executable. Is there something else I missed?

Close Sublime, Open Activity Monitor, Check no processes of mono-sgen bu
filtering for mono in the top right search box in Activity Monirot window
Open Sublime, Open a csharp file, click in it, wait a few seconds, then
check in Activity Monitor to see if there is a mono process.
Try running ctrl+k+d to format your file to see if it works, this would
show its communicating to the server
On 2 April 2015 at 17:25, 6b796c65<EMAIL_ADDRESS>wrote:

I think I looked at the issue you are referring to. I did make sure to set
omniServer to executable. Is there something else I missed?
--
Reply to this email directly or view it on GitHub
https://github.com/OmniSharp/omnisharp-sublime/issues/149#issuecomment-88965726
.

I don't see it so I guess it's not starting it. I can copy the serve line from the Sublime console and paste it into a Terminal window and it seems to startup, but then I get the JSON syntax errors from the server.

I was able to get Sublime to start the server. I'm not sure what changed, but I had to create a symlink so Sublime could find mono (I had installed it with home brew): sudo ln -s /usr/local/bin/mono /usr/bin/
Here's the JSON syntax error I'm getting from the server:
00016649 System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: JSON syntax error.
at Nancy.Json.JsonDeserializer.Deserialize (System.IO.TextReader input) [0x00000] in :0
at Nancy.Json.Json.Deserialize (System.IO.TextReader input, Nancy.Json.JavaScriptSerializer jss) [0x00000] in :0
at Nancy.Json.Json.Deserialize (System.String input, Nancy.Json.JavaScriptSerializer jss) [0x00000] in :0
at Nancy.Json.JavaScriptSerializer.DeserializeObjectInternal (System.String input) [0x00000] in :0
at Nancy.Json.JavaScriptSerializer.Deserialize[AutoCompleteRequest] (System.String input) [0x00000] in :0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in :0
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) <0x00131>
at System.Reflection.MethodBase.Invoke (object,object[]) <0x0002a>
at Nancy.ModelBinding.DefaultBodyDeserializers.JsonBodyDeserializer.Deserialize (string,System.IO.Stream,Nancy.ModelBinding.BindingContext) <0x00238>
at Nancy.ModelBinding.DefaultBinder.DeserializeRequestBody (Nancy.ModelBinding.BindingContext) <0x00318>
at Nancy.ModelBinding.DefaultBinder.Bind (Nancy.NancyContext,System.Type,object,Nancy.ModelBinding.BindingConfig,string[]) <0x003ee>
at Nancy.ModelBinding.DynamicModelBinderAdapter.TryConvert (System.Dynamic.ConvertBinder,object&) <0x0007a>
at (wrapper dynamic-method) object.CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,object) <0x00106>
at System.Dynamic.UpdateDelegates.UpdateAndExecute1<object, OmniSharp.AutoComplete.AutoCompleteRequest> (System.Runtime.CompilerServices.CallSite,object) <0x005a1>
at Nancy.ModelBinding.ModuleExtensions.Bind<OmniSharp.AutoComplete.AutoCompleteRequest> (Nancy.INancyModule) <0x0011b>
at OmniSharp.AutoComplete.AutoCompleteModule/c__AnonStorey0.<>m__0 (object) <0x00025>
at (wrapper dynamic-method) object.CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,System.Func2<object, object>,object) <0x000a7> at System.Dynamic.UpdateDelegates.UpdateAndExecute2<System.Func2<object, object>, object, object> (System.Runtime.CompilerServices.CallSite,System.Func`2<object, object>,object) <0x005e0>
at Nancy.Routing.Route/<>c__DisplayClass4.b__3 (object,System.Threading.CancellationToken) <0x0016b>

Pull the latest repo. See #144. This may help
On Thursday, 2 April 2015, 6b796c65<EMAIL_ADDRESS>wrote:

I was able to get Sublime to start the server. I'm not sure what changed,
but I had to create a symlink so Sublime could find mono (I had installed
it with home brew): sudo ln -s /usr/local/bin/mono /usr/bin/
Here's the JSON syntax error I'm getting from the server:
00016649 System.Reflection.TargetInvocationException: Exception has been
thrown by the target of an invocation. --->
System.InvalidOperationException: JSON syntax error.
at Nancy.Json.JsonDeserializer.Deserialize (System.IO.TextReader input)
[0x00000] in :0
at Nancy.Json.Json.Deserialize (System.IO.TextReader input,
Nancy.Json.JavaScriptSerializer jss) [0x00000] in :0
at Nancy.Json.Json.Deserialize (System.String input,
Nancy.Json.JavaScriptSerializer jss) [0x00000] in :0
at Nancy.Json.JavaScriptSerializer.DeserializeObjectInternal
(System.String input) [0x00000] in :0
at Nancy.Json.JavaScriptSerializer.DeserializeAutoCompleteRequest
http://System.String input [0x00000] in :0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke
(System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags
invokeAttr, System.Reflection.Binder binder, System.Object[] parameters,
System.Globalization.CultureInfo culture) [0x00000] in :0
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke
(object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
at System.Reflection.MethodBase.Invoke (object,object[])
at
Nancy.ModelBinding.DefaultBodyDeserializers.JsonBodyDeserializer.Deserialize
(string,System.IO.Stream,Nancy.ModelBinding.BindingContext)
at Nancy.ModelBinding.DefaultBinder.DeserializeRequestBody
(Nancy.ModelBinding.BindingContext)
at Nancy.ModelBinding.DefaultBinder.Bind
(Nancy.NancyContext,System.Type,object,Nancy.ModelBinding.BindingConfig,string[])
at Nancy.ModelBinding.DynamicModelBinderAdapter.TryConvert
(System.Dynamic.ConvertBinder,object&)
at (wrapper dynamic-method) object.CallSite.Target
(System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,object)
at System.Dynamic.UpdateDelegates.UpdateAndExecute1
(System.Runtime.CompilerServices.CallSite,object)
at Nancy.ModelBinding.ModuleExtensions.Bind (Nancy.INancyModule)
at OmniSharp.AutoComplete.AutoCompleteModule/c__AnonStorey0.<>m__0
(object)
at (wrapper dynamic-method) object.CallSite.Target
(System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,System.Func2<object,
object>,object) <0x000a7>
at System.Dynamic.UpdateDelegates.UpdateAndExecute2<System.Func2, object,
object> (System.Runtime.CompilerServices.CallSite,System.Func`2,object)
at Nancy.Routing.Route/<>c__DisplayClass4.b__3
(object,System.Threading.CancellationToken)
--
Reply to this email directly or view it on GitHub
https://github.com/OmniSharp/omnisharp-sublime/issues/149#issuecomment-89037923
.

It finds mono without the symlink now, but I'm still getting JSON syntax error. Any idea what might be causing that?

Afraid not :(
On Thursday, 2 April 2015, 6b796c65<EMAIL_ADDRESS>wrote:

It finds mono without the symlink now, but I'm still getting JSON syntax
error. Any idea what might be causing that?
--
Reply to this email directly or view it on GitHub
https://github.com/OmniSharp/omnisharp-sublime/issues/149#issuecomment-89043151
.

Can you just run mono omnisharp server.exe
On Thursday, 2 April 2015, Jonathan Channon<EMAIL_ADDRESS>wrote:

Afraid not :(
On Thursday, 2 April 2015, 6b796c65<EMAIL_ADDRESS><javascript:_e(%7B%7D,'cvml','notifications@github.com');>> wrote:

It finds mono without the symlink now, but I'm still getting JSON syntax
error. Any idea what might be causing that?
--
Reply to this email directly or view it on GitHub
https://github.com/OmniSharp/omnisharp-sublime/issues/149#issuecomment-89043151
.

You'll need to give it a path with the -s parameter

I gave it the path to my project and it starts up fine. I don't see the error until I try to edit a csharp file in Sublime.

i suspect something odd in your file, see if you can put it in a reproducable git repo taking it back to the bare minimum?

I tried it with some other files and it seems to be working. I'll try and narrow down what makes that file so special. Thanks for your help getting the server to startup!

The JSON error seems to be related to the size of the file. The file I was having trouble with is large, over 4000 lines of code. I took another file that was also fairly large and started duplicating code and it started having errors around 3000 lines of code.

I isolated the large file in a new project and it's working fine so I'm not sure why it is failing. Any suggestions on debugging this?

Did a little more testing and it seems to be something related to the project and certain files. The files that cause the server errors work fine when copied to a new project. Our project is very large so it's making it difficult to narrow down whats causing it. Maybe something changed with the server? We didn't have any problems until that last update.

This is a weird one. I don't think there anything did change with the
server however I am spotting the server crashing quite frequently and I
don't know why. I wonder if we have a command argument to the server to
turn exception logging on whilst we track these issues down
On Friday, 3 April 2015, 6b796c65<EMAIL_ADDRESS>wrote:

Did a little more testing and it seems to be something related to the
project and certain files. The files that cause the server errors work fine
when copied to a new project. Our project is very large so it's making it
difficult to narrow down whats causing it. Maybe something changed with the
server? We didn't have any problems until that last update.
--
Reply to this email directly or view it on GitHub
https://github.com/OmniSharp/omnisharp-sublime/issues/149#issuecomment-89375373
.

Try pulling the latest master branch again to see if the refactoring PR has helped

It's still not working with the latest code. I don't know if this is helpful, but here's the error I'm getting in Sublime now:

500

500 - InternalServerError
Something went horribly, horribly wrong while servicing your request.
We're sorry :-(

Graphics courtesy of the awesome Matthew Inman

Details

Error Details
Error details are currently disabled. Please set StaticConfiguration.DisableErrorTraces = false; to enable.

Exception in thread Thread-21:
Traceback (most recent call last):
File "./json/decoder.py", line 368, in raw_decode
File "./json/scanner.py", line 63, in _scan_once
StopIteration
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./threading.py", line 901, in _bootstrap_inner
File "/Users/kharrison/Library/Application Support/Sublime Text 3/Packages/OmniSharp/lib/omnisharp.py", line 46, in run
self.callback(json.loads(decodeddata))
File "./json/init.py", line 319, in loads
File "./json/decoder.py", line 352, in decode
File "./json/decoder.py", line 370, in raw_decode
ValueError: No JSON object could be decoded

Can you paste what happens in the sublime output window?

What I posted previously was from the Sublime console (ctrl-`). Is there a different output that would be more helpful?

Receiving the same error.  Just installed latest.  Here is traceback info
Traceback (most recent call last):
File "/Users/jsherman/Library/Application Support/Sublime Text 3/Packages/OmniSharp/lib/urllib3/connectionpool.py", line 544, in urlopen
body=body, headers=headers)
File "/Users/jsherman/Library/Application Support/Sublime Text 3/Packages/OmniSharp/lib/urllib3/connectionpool.py", line 349, in _make_request
conn.request(method, url, **httplib_request_kw)
File "./http/client.py", line 1065, in request
File "./http/client.py", line 1103, in _send_request
File "./http/client.py", line 1061, in endheaders
File "./http/client.py", line 906, in _send_output
File "./http/client.py", line 844, in send
File "/Users/jsherman/Library/Application Support/Sublime Text 3/Packages/OmniSharp/lib/urllib3/connection.py", line 155, in connect
conn = self._new_conn()
File "/Users/jsherman/Library/Application Support/Sublime Text 3/Packages/OmniSharp/lib/urllib3/connection.py", line 134, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File "/Users/jsherman/Library/Application Support/Sublime Text 3/Packages/OmniSharp/lib/urllib3/util/connection.py", line 88, in create_connection
raise err
File "/Users/jsherman/Library/Application Support/Sublime Text 3/Packages/OmniSharp/lib/urllib3/util/connection.py", line 78, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 61] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./threading.py", line 901, in _bootstrap_inner
File "/Users/jsherman/Library/Application Support/Sublime Text 3/Packages/OmniSharp/lib/omnisharp.py", line 38, in run
response = pool.urlopen('POST', self.url, body=self.data, timeout=self.timeout).data
File "/Users/jsherman/Library/Application Support/Sublime Text 3/Packages/OmniSharp/lib/urllib3/poolmanager.py", line 161, in urlopen
response = conn.urlopen(method, u.request_uri, **kw)
File "/Users/jsherman/Library/Application Support/Sublime Text 3/Packages/OmniSharp/lib/urllib3/connectionpool.py", line 617, in urlopen
release_conn=release_conn, **response_kw)
File "/Users/jsherman/Library/Application Support/Sublime Text 3/Packages/OmniSharp/lib/urllib3/connectionpool.py", line 617, in urlopen
release_conn=release_conn, **response_kw)
File "/Users/jsherman/Library/Application Support/Sublime Text 3/Packages/OmniSharp/lib/urllib3/connectionpool.py", line 617, in urlopen
release_conn=release_conn, **response_kw)
File "/Users/jsherman/Library/Application Support/Sublime Text 3/Packages/OmniSharp/lib/urllib3/connectionpool.py", line 597, in urlopen
_stacktrace=sys.exc_info()[2])
File "/Users/jsherman/Library/Application Support/Sublime Text 3/Packages/OmniSharp/lib/urllib3/util/retry.py", line 271, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
OmniSharp.lib.urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=54045): Max retries exceeded with url: /autocomplete (Caused by ProtocolError('Connection aborted.', ConnectionRefusedError(61, 'Connection refused')))

I've done some digging on what I believe to be the same issue.
I noticed I only get this error on larger .cs files.  I believe what's happening here is that when POST data (aka the size of the text buffer) is large enough (around 72kb), the data is truncated, and this is interpreted by omnisharp-server as malformed JSON.
You reproduce this pretty easily (again I'm testing on OSX 10.10) a simple .cs file and pasting large blocks of random text (it doesn't even have to compile) over again until the file is > 100kb, after this, any omnisharp functionality will fail (autocomplete, syntax checking, etc.)
It looks very much it's caused by this bug: https://github.com/NancyFx/Nancy/issues/1333, however I tried upgrading omnisharp-server to use Nancy 1.1 and I still got this error, so it may be something similar.
It would be great if someone could look into this :D

I created a simple sublime project that reproduces this issue, which I uploaded here, since github won't let me attach zips:
https://drive.google.com/file/d/0B9c71SR5GOIgOXpJMjhNdEFIOE0
The solution files were created from a blank Unity project (A lot of the people who use Omnisharp seem to be Unity devs :).  I believe the solution file does play some role, as removing the solution_file entry in OmnisharpBug.sublime-project causes auto-complete to work even with the large file size; however this may just be because the missing solution file triggers an exception that prevents further execution.

I can replicate @6b796c65 error with a large csharp file
Nancy is returning a 500 for some reason so we may need to turn on error tracing in the server to see whats going on cc @nosami

I've submitted a PR on the server to turn the error output on

So now with that merged it reports the error is the same as that in the first comment of this issue reported by @6b796c65

The most recent update resolved the issue for me.  Sublime can start up the server now.

I've tried installing a different serializer in the server to see if it copes better with the size of the buffer and although the error message is slightly different I believe its due to the size of the buffer. I'm not sure what else we can do :cry: cc // @nosami

@jchannon I thought that's what https://github.com/OmniSharp/omnisharp-server/blob/befdf7d7892a49d3a783c460003a39b75b4df51d/OmniSharp/Bootstrapper.cs#L29 was supposed to do.
Needs a test.

It is but I'm wondering if we're sending more bytes than that.
On 8 April 2015 at 17:57, Jason Imison<EMAIL_ADDRESS>wrote:

@jchannon https://github.com/jchannon I thought that's what
https://github.com/OmniSharp/omnisharp-server/blob/befdf7d7892a49d3a783c460003a39b75b4df51d/OmniSharp/Bootstrapper.cs#L29
was supposed to do.
Needs a test.
--
Reply to this email directly or view it on GitHub
https://github.com/OmniSharp/omnisharp-sublime/issues/149#issuecomment-90974600
.

Doesn't seem like file size of the issue here. The issue disappeared when the problem file was moved to another solution. Maybe try the sample solution posted above?

I will do but I've replicated it in one of my projects ie/non unity

I've narrowed this down to a bug in Nancy.  Nancy does some shenanigans on the input stream provided by HttpListenerRequest.  When it reaches a certain hardcoded size threshold (80kb) it attempts to dump it to disk to avoid storing a potentially large stream in memory.
When it comes back from this disk-dump, the stream contains a large number of null characters, which causes the JSON parsing to barf.  I haven't figured out which bit of the disk-dumping logic is broken, but it wouldn't surprise me if this is the platform dependent part.
I'm able to fix this issue with a (rather blunt) change to Nancy to completely disable this behavior:
https://github.com/NancyFx/Nancy/pull/1925/files
Disabling the disk-dumping feature entirely may or may not be the right choice for Nancy in general, but it seems unlikely Omnisharp would care about this optimization.  Maybe Nancy can expose this setting in a config?

Similar to this Nancy issue https://github.com/NancyFx/Nancy/issues/1090
On Monday, 4 May 2015, Cameron Chrisman<EMAIL_ADDRESS>wrote:

I've narrowed this down to a bug in Nancy. Nancy does some shenanigans on
the input stream provided by HttpListenerRequest. When it reaches a certain
hardcoded size threshold (80kb) it attempts to dump it to disk to avoid
storing a potentially large stream in memory.
When it comes back from this disk-dump, the stream contains a large number
of null characters, which causes the JSON parsing to barf. I haven't
figured out which bit of the disk-dumping logic is broken, but it wouldn't
surprise me if this is the platform dependent part.
I'm able to fix this issue with a (rather blunt) change to Nancy to
completely disable this behavior:
https://github.com/NancyFx/Nancy/pull/1925/files
Disabling the disk-dumping feature entirely may or may not be the right
choice for Nancy in general, but it seems unlikely Omnisharp would care
about this optimization. Maybe Nancy can expose this setting in a config?
--
Reply to this email directly or view it on GitHub
https://github.com/OmniSharp/omnisharp-sublime/issues/149#issuecomment-98831069
.

After looking at my pull request, one of the Nancy devs mentioned this was a bug  (https://github.com/NancyFx/Nancy/issues/1865) in Mono and is fixed in 4.0.  Can confirm after installing Mono 4.0 via brew, the problem goes away.

Ah good stuff!!!
On 11 May 2015 at 17:46, Cameron Chrisman<EMAIL_ADDRESS>wrote:

After looking at my pull request, one of the Nancy devs mentioned this was
a bug (NancyFx/Nancy#1865 https://github.com/NancyFx/Nancy/issues/1865)
in Mono and is fixed in 4.0. Can confirm after installing Mono 4.0 via
brew, the problem goes away.
--
Reply to this email directly or view it on GitHub
https://github.com/OmniSharp/omnisharp-sublime/issues/149#issuecomment-100975731
.

I downloaded Mono 4.0 and can verify this issue has been fixed :D

Yay!
On 28 May 2015 at 15:41, Kyle<EMAIL_ADDRESS>wrote:

I downloaded Mono 4.0 and can verify this issue has been fixed :D
--
Reply to this email directly or view it on GitHub
https://github.com/OmniSharp/omnisharp-sublime/issues/149#issuecomment-106366055
.


Make into a Python package which can be pip installed and indexed on PyPI?

I can supply a PR if there's interest.

+1 to this. Suggest pip install glacier-cli.


Add Check if valorant is dropped

just post request to gql.twitch.tv/gql with Autorization token ( {Authorization: "Oauth " + cookie.token} ) in header and with body:
{
    "operationName": "OnsiteNotifications_ListNotifications",
    "variables": {
        "limit": 3,
        "cursor": "",
        "language": "en"
    },
    "extensions": {
        "persistedQuery": {
            "version": 1,
            "sha256Hash": "b317b93ed481bf07c35defbcf01848f09744805ebb640734763298f9a7dfd64f"
        }
    }
}

If result contains "You just received the **VALORANT**" then valorant has been dropped and we can console.log('dropped') and process.exit()
Also, to easy get token you can use next script in your browser console:
newWin=window.open("about:blank","","width=350,height=10");newWin.document.write(JSON.stringify(Object({token:cookies["auth-token"]})))

Or just emulate click on notifications button

Can you make a pull request please?


fix: reset settings fields when a new projectId loads

Description
The project settings page was leaving stale values visible when switching between a root bot or any of its skills in the left-hand-side list. This fixes that by reloading the values from the settings when the visible projectId changes.
Task Item
closes #5785
Screenshots
These are a before and after comparison of clicking the "EchoBot-5" label:

Coverage decreased (-0.03%) to 55.079% when pulling e7a49f5882eafef022ce7f35afc0307f9fc4698f on beyackle/fix_runtimePageSkillBot into c5dbfc584fb93277fcef235c4c0798e6f5939726 on main.


MINOR: Update offset.storage.topic description

This is a minor change just to clarify that this topic only stores offsets of source connector tasks. Instead, offsets for sink connector tasks are stored in __consumer_offsets, as for consumer groups.

@mimaison

Thanks @fvaleri, this is a useful change. I've left a few small comments but it should be good to go after they're addressed.

Thanks @C0urante for the quick feedback. It should be good now.


Missing Jade lexer while from linguist.libs.repository import Repository

Sup
I want to use your py linguist but stucked with an error.
At the import action  from linguist.libs.repository import Repository (described in readme.md doc)
I got an error:
...
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/linguist/libs/language.py", line 112, in __init__
    raise TypeError('%s is missing lexer' % self.name)
TypeError: Jade is missing lexer

Tried to pip install pyjedi – didn't help too.
What actions should I do to make it work?
P.S. I'm using Python 2.7

Moreover, system contains latest pygments and pygments.lexers.html.PugLexer (has a Jade support), but anyway I had the same error.
Help me :(

A little workaround helped me to run it.
         if not self.lexer:             # raise TypeError('%s is missing lexer' % self.name)             pass


Added a hello world program in python in two different ways

Hope you will merge my request and help us learn.

please accept the changed file. Earlier the repo commit gave some error. Now it is looking good.
Thanks


Test enhancement

Changed log

According to PHPUnit fixtures reference, the setUp and tearDown methods should be protected, not public.
Remove unused variables and declared namespace.
The assertEquals method should be assertEquals($expected, $actual).
Changing some parameter positions to correct the assertion usage.
The assertThat method can call via $this or self.
To be compatible with static method, using self instead, not using static.
Using the assertNull to assert expected is same as null.
To be consistency, using class namespace declaring at the head of PHP file.

Codecov Report

Merging #18 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             master    #18   +/-   ##
=======================================
  Coverage       100%   100%
  Complexity      349    349
=======================================
  Files            25     25
  Lines           891    886    -5
=======================================
- Hits            891    886    -5

Impacted Files
Coverage Δ
Complexity Δ

backend/Services/Storage/Filesystem.php
100% <0%> (ø)
58% <0%> (ø)
:arrow_down:

backend/Controllers/routes.php
100% <0%> (ø)
0% <0%> (ø)
:arrow_down:

backend/Services/Tmpfs/Adapters/Tmpfs.php
100% <0%> (ø)
20% <0%> (ø)
:arrow_down:

backend/Services/View/Adapters/Vuejs.php
100% <0%> (ø)
5% <0%> (ø)
:arrow_down:

Continue to review full report at Codecov.

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

Thank you very much for fixing all this.


Plugin with id 'maven' not found.

Getting the below error in  "react-native": "^0.67.3", during build process
* What went wrong:
A problem occurred evaluating project ':react-native-device-number'.
> Plugin with id 'maven' not found.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':react-native-device-number'.
> com.android.builder.errors.EvalIssueException: compileSdkVersion is not specified. Please add it to build.gradle

Issue resolved. Please check the latest version, i anything after 1.0.5. thanks


⚠ Bofrost.de has degraded performance

In ae11584, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 715 ms

Resolved: Bofrost.de performance has improved in 73df831.


SPDX - "main" package does not have a SUPPLIER field

I've used scalibr on a few images and jar files, but noticed that the top level main package does not have a supplier field, despite every other package having it
Is this intended, or is it a bug?
Steps to reproduce:
Run scalibr -o spdx23-json=... (scanning anything should suffice)

Ah I think we just forgot to set it for the main package, there's no particular reason for why it shouldn't be set there. I'll send a PR to fix, thanks for catching!

Done in https://github.com/google/osv-scalibr/pull/255


Do not throw exception when default_value's type does not match the actual type

Thanks for this great library. I have been quite happy about almost every aspect of the library, except one point about the value method on object.
Consider this sample code.
int main() {
  nlohmann::json j = { {"b", nullptr}};
  std::string result = j.value("b", "1"); // std::domain_error: type must be string, but is null
  return 0;
}

When I'm using value to specify a default value of a key, I pretty much don't care about whether it exists or not, whether it is a valid value or not. It's pretty much like, if it failed to fetch a value of a specific type, then return the default_value I specified.
So I'm thinking about changing the following method:
https://github.com/nlohmann/json/blob/develop/src/json.hpp#L3653
to something like this:
    template <class ValueType, typename
              std::enable_if<
                  std::is_convertible<basic_json_t, ValueType>::value
                  , int>::type = 0>
    ValueType value(const typename object_t::key_type& key, ValueType default_value) const
    {
        // at only works for objects
        if (is_object())
        {
            // if key is found, return value and given default value otherwise
            const auto it = find(key);
            if (it != end())
            {
                try
                {
                    return *it;
                }
                catch (...)
                {
                    // if some kind of exception occurred, return default value
                    return default_value;
                }
            }
            else
            {
                return default_value;
            }
        }
        else
        {
            throw std::domain_error("cannot use value() with " + type_name());
        }
    }

Which I think will make the value method a lot easier to use. What do you think? @nlohmann

Thanks for reporting. I'll have a look.

This has been causing me issues too, this addition would be a great help.

@cezheng
I understand your use case, but it is different to the described behavior of the value function:

Returns either a copy of an object's element at the specified key key or a given default value if no element with key key exists.

(Emphasis added). In your example, there exists an entry with key b of value null, and you are requesting value to cast it to a std::string which is not possible - hence the exception from the conversion function.
I am not sure whether your proposed "catch all and return default_value" behavior would be helpful, because it may be confusing.
Consider for instance an object that stores numbers and strings. If you ask value to give you the value for a given key or 42 if an error occurs, you never know whether you got 42, because (1) it was the stored value, (2) there was no value stored at the given key, or (3) a string was stored at the given key.

@nlohmann That's true if the user cares about error handling. For many real cases, this is just inconvenient. If we really care about whether there's an error, there're plenty of other methods for us to find that out, and providing a default value means we really don't want any exceptions.

I'm not sure I agree with that last statement. Providing a different value that what's stored because the caller asked for the wrong type doesn't seem right.

What about only if the value is null? To me it makes sense for .value to return the default value if the value is null. For my usage, there is an API that returns JSON, but a certain string is set to null instead of not being present if it is not relevant, and I want to use the default value for this.

what about having a nothrow version of value so that users can choose which to use?

We could have a nothrow version
For example in java
json.getString <- throw version
json.optString <- nothrow version

This bugs me as well, I would like to see much more permissives functions to avoid code like this:
auto it = object.find("property");
if (it != object.end() && it->is_string())
    myvalue = *it;

I would like to see much more permissives implicit conversions functions that also allow casting to default values if not.
json j; // null
int i = j; // i = 0

This will help us deserialize untrusted input much easier! Like this:
auto port = object["network"].value("port", 6667);

What do you think?

In that case, untrusted input, would you want that to do a string to number conversion if port were a string?
I think that might be better as something that explicitly calls out that it will do a conversion.
object ["network"].try_parse("port", 6667);
It could be as, cast, value_as, ...

With this post, I try to summarize the discussion. Please correct me if I misunderstood.
Using the example of @markand, the current value function distinguishes these cases when called with
auto port = object["network"].value("port", 6667);

object["network"]["port"] exists and holds an integer value, say 8080. As a result, variable port equals 8080.
object["network"] has no value with key "port". Hence, the default value 6667 is returned, so port equals 6667.
object["network"]["port"] exists and holds a non-integer value, for instance a string "port is not set". Right now, a std::domain_error exception would be thrown, because the value type of object["network"]["port"] does not match the default value.
object["network"] is not an object, and a std::domain_error exception is thrown.

The current discussion shows that case 3 makes people unhappy. Right now, it seems we have three possibilities:

Leave the value function as it is.
Follow the proposal of @cezheng and make a non-throwing version of value.
Follow the proposal of @markand and

Apparently, “solution” 1 leaves people unhappy… However, it also has the most unsurprising behavior.
For solution 2, I already expressed my concerns that it may be confusing if the default value is returned even if the requested value object["network"]["port"] exists, but just happens not to match the type of the default value.
Solution 3 seems to be an implicit conversion from the stored value to the type of the default value. Here, I see an issue: Such a conversion only makes sense for few types. While a conversion from number types is straightforward, it may already be confusing to assume an implicit conversion from booleans or null to int. But even if some convention is found, what to do with strings, arrays, or objects? For these types, I fail to see reasonable semantics. This in turn may introduce more confusion by falling back to the default value in such cases.
Did I miss anything?

Did I miss anything?

Leave the value function as it is and add another function that in case #3 tries to convert to the type of the default value.

It's roughly equivalent to the differences between Int.Parse and Int.TryParse in C#.

@gregmarr What do you mean with "tries to convert to the type of the default value"? Apart from "add another function", isn't this what I described with possibility 3 (note: I edited the original comment, because the sentence stopped in the middle).

It's very similar, I just made it explicit by using a different function instead of implicit with the existing function.

What about an overload of value() that takes the expected value type as additional argument, thus:

If the property is missing, return the default value
If the property is there but not as expected type, return the default value.

Alternatively, we can just add a function that takes a json object as default value and compare the types directly from the json default value argument.
auto v = object.value("port", 123); // 123 is a json object.

// v = 123 if port is present and of type int.

@markand I like this approach. I'll have a look.

I implemented the proposal of @markand with a slight change: instead of having the user provide a type, the type is derived from the default value. There are two cases:

A value is found for the given key which matches the type of the default value; return the value at the key.
Return the default value otherwise.

An exception is only thrown if the function is called on a JSON value which is not an object.
There are still some issues with respect to number types: currently, -100 and 100 would be treated as different types. This may yield situations in which the return value is returned even if there is a stored value which just happens to be of the wrong number type...
The function (ignore the name for now) looks like this:
template <class ValueType, typename
          std::enable_if<
              std::is_convertible<basic_json_t, ValueType>::value
              , int>::type = 0>
ValueType value_with_type(const typename object_t::key_type& key,
                          ValueType default_value) const
{
    // derive JSON value type from given default value
    const value_t return_value_type = basic_json(default_value).type();

    // at only works for objects
    if (is_object())
    {
        // if key is found and stored value has the same type as the
        // default value, return value and given default value otherwise
        const auto it = find(key);
        if (it != end() and it->type() == return_value_type)
        {
            return *it;
        }
        else
        {
            return default_value;
        }
    }
    else
    {
        throw std::domain_error("cannot use value() with " + type_name());
    }
}

Here are some test cases:
json j =
{
    {"port", 1234}, {"proxy", true}
};

int port1 = j.value_with_type("port", 8080);
int port2 = j.value_with_type("the_port", 8080);
int port3 = j.value_with_type("proxy", 8080);

bool proxy1 = j.value_with_type("proxy", false);
bool proxy2 = j.value_with_type("the_proxy", false);
bool proxy3 = j.value_with_type("port", false);

CHECK(port1 == 1234);
CHECK(port2 == 8080);
CHECK(port3 == 8080);

CHECK(proxy1 == true);
CHECK(proxy2 == false);
CHECK(proxy3 == false);

What do you think?

Does this solve the issue for you? @cezheng, @jackb-p, @gregmarr, @prsyahmi, @markand ?
Should this be a separate function? If so, what should be the name?
Should this replace the current value function?

This solves the issue for me. To me it doesn't matter whether it's a new function (and I don't really know whether it should be :confused:)

It is very nice.
@jackb-p a behaviour change in a public function is considered as breaking change and thus should require a major version upgrade (if following semantic versioning).
For me there is no problem if it is a new function, it's much more explicit.

I wouldn't mind putting a changed function into the 3.0.0 release. As #244 would also introduce changes to the public API, a major release should be not too far away.

Any further opinion on this?

Change value() to the described semantics (return the default value if the type at key does not match the type of the default value)?
Leave value() as is and implement the described semantics in a new function for which we would need a name?
Anything else? ;)

I currently prefer the first option, because the change affects a corner case that no-one really thought about in the first place.

Do you mean replacing value with value_with_type's implementation? I wouldn't mind either way since all I want is a nothrow version of value though.

First option sounds good to me then!
Get Outlook for Androidhttps://aka.ms/ghei36
From: Niels Lohmann
Sent: Wednesday, 10 August, 10:03 p.m.
Subject: Re: [nlohmann/json] Do not throw exception when default_value's type does not match the actual type (#278)
To: nlohmann/json
Cc: Jack, Mention
Any further opinion on this?
Change value() to the described semantics (return the default value if the type at key does not match the type of the default value)?Leave value() as is and implement the described semantics in a new function for which we would need a name?Anything else? ;)
I currently prefer the first option, because the change affects a corner case that no-one really thought about in the first place.

You are receiving this because you were mentioned.
Reply to this email directly, view it on https://github.com/nlohmann/json/issues/278#issuecomment-239003564 GitHubhttps://github.com/nlohmann/json/issues/278#issuecomment-239003564, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABJutUUNKdsHrUtAM6gLIrxkBl2b4hQbks5qejyagaJpZM4JF_GV.

Option 1 sounds good to me then.

@cezheng Yes, this is what I mean with option 1. Note it would still thrown when applied to a JSON type other than an object.

I'm a little late to this party, but it's related to my #283 report. And perhaps tied to all of this?
It would be neat if value() didn't thrown an exception when part of the request doesn't exist. For example, if I have a pointer type "/this/that", right now value() throws an exception if "/this" doesn't exist, but returns the default if "/this/that" doesn't exist.
I'd prefer it return the default if any of it doesn't exist.

@clwill This is a question I would like to discuss:
The original idea behind the value function is to have a third option beside operator[] and at. Given an object obj and a key k:

obj[k] returns a reference to the entry at key k, and inserts null if there is no key k yet;
obj.at(k) returns a reference to the entry at key k if it exists, but throws if it does not exist;
obj.value(k, default_value) returns the value stored at key k or default_value if there is no key k. (I skip the details on how to proceed if the default value does not match the value at key k).

In any case, all three functions only work on objects.
Either function also exists for JSON pointers. The question is: may the JSON value to call the function on be anything but an object? The current implementation will throw a std::domain_error in this case.

One may argue that this is OK, because this behavior is symmetric to the above versions.
One may also argue that the default value shall be returned, because not being able to resolve the JSON pointer could be the same situation as not being able to resolve a key.

The different interpretations become clear for the following JSON values j and the call j.value("/this/that", 42):

j={"this": {"that": 23}} - the call shall return 23, because j["this"]["that"]=23.
j={"this": {"nothing": 23}} - the call shall return 42, because j["this] is an object where key "that" does not exist.
j={"this": null} - the call could throw, because j["this"] is not an object; or it could return 23, because the JSON pointer "/this/that" cannot be resolved.

What do you think?

While I appreciate the semantic consistency you're stressing, I think the meaning of value() is/should be: I'll look up what you asked for (be it an individual item, float, array, whatever), and if I don't find it, I'll return the default value.
For example, I would argue that value("/this/that/7", 19) to reference an array that should also return 19 if element 7 doesn't exist, if that isn't found, or if this isn't found.
To that end, I think the only time value() should throw is in the case of a malformed pointer. In all other cases it should return a found value, or the default value.
I don't know if this is hard to implement, but my thinking is at the higher level about what the point of value() is. Maybe I'm reading in too much?

@clwill Let's not thing about how hard implementation is - it's more important to come up with semantics that do surprise the caller.

Then in that case, I think throwing errors should be reserved for coding issues, not data issues. That is, missing/wrong data (as in the original form of this issue -- the data type of the found object) shouldn't throw, it should return the default.
As the original poster put it:

When I'm using value to specify a default value of a key, I pretty much don't care about whether it exists or not, whether it is a valid value or not. It's pretty much like, if it failed to fetch a value of a specific type, then return the default_value I specified.

I think that's pretty much where I am too.

@clwill If the data is there but the wrong type, how do you tell whether it's a coding issue or a data issue?  If the data is known to be correct, then this is a coding issue, because the caller is using the wrong type to look it up.

I'm confused, if the data is known to be correct, why are you using value() and not [] or at?

It can be known to be correct and still have optional entries.

in reply to @nlohmann comment: https://github.com/nlohmann/json/issues/278#issuecomment-234062889
Please, don't forget about a sub-case of 3: object["network"]["port"] exists and holds a string value, for instance a string "1234".

I'm sorry we discussed thus issue for so long and still did not find a solution. I just read this thread again and it seems to me that we spent a lot of time discussing the case what should happen if the type of the default value does not match the stored value if it is present. The thing is: the stored value is a JSON value, so why shouldn't the default value be a JSON value itself. The resulting function would have the same semantics as Python's get function:

get(key[, default])
Return the value for key if key is in the dictionary, else default. If default is not given, it defaults to None, so that this method never raises a KeyError.

The name get is already taken, so here would be an implementation with name get_value:
basic_json get_value(const typename object_t::key_type& key,
                     basic_json default_value = nullptr) const
{
    // get_value only works for objects
    if (is_object())
    {
        // if key is found return stored value, or default value otherwise
        const auto it = find(key);
        if (it != end())
        {
            return *it;
        }

        return default_value;
    }
    else
    {
        JSON_THROW(type_error::create(306, "cannot use get_value() with " + type_name()));
    }
}

Any opinions on this?

I'm not sure if a default parameter is great here.
Also, do we really want to return a basic_json?
Why not using user-defined conversions?
// omitting boilerplate: U must be convertible to T
template <typename T = basic_json, typename U = void>
T get_value(const typename object_t::key_type& key, U&& default_value) const { /* ... */ }

This looks a bit like optional::value_or, and we could also add a get_or method to provide that feature for all JSON types, not just object.

Thanks for the quick reply!

I though a default parameter would be nice, because it matches the Python way. Maybe I got too used to that...
If we don't return basic_json we may again get into troubles if the values stored value, the return value, and the default value do not match. Or am I misreading your template magic?
I'm fine with any name. I just wanted to make a proposal for those you care less about the types without changing the original value function.

To be honest I did not read the whole thread with scrutiny (I scrolled quite fast)
Here are some calling code I had in mind while writing this reply:
j.get_value("key", nullptr); // T is defaulted to basic_json, will return a basic_json
j.get_value<vector<string>>("key", {"default", "value"});

Since U must be convertible to T, that only leaves the question of the stored value.
I would say that when you provide a default value, you expect the method to not throw anything in case of failure, but to return the default.
So the logical conclusion (for me, at least) would be to try catch around the conversion call, and to return the default in the catch block.
However, this will simply not work for users using -fnoexceptions, this method would be a big lie to them...
I don't know if this is a real problem though, since good support for those users would require a lot of code to be rewritten using constructs like optional or expected.

Now I see what you are up to with the template parameters ;)
The second example is exactly the issue I wanted to avoid in the first place. If j["key"] is not convertible to std::vector<string>, you have an error. Try/catch is indeed not helpful if you have exceptions switched off. Therefore, I liked the Python way - and at the same time, have get_value return the same type as operator[] or at.
Another question: do you think whether it is (a) possible and (b) a good idea to implement get_value with name get?
And: I still like the idea of returning null if the value was not found - be it with a default parameter or a second function with only one parameter.

Hmm, I gave it some thought, and I think you're right about the second example, we should throw if there is a type mismatch.
I do still believe we could use the prototype I wrote earlier, instead of restricting it to basic_json though, if the conversion fails, it's the responsability of the from/to_json implementer to throw. (We should begin a draft on those functions preconditions by the way).
About implementing get_value with get, it is possible but I don't think this would be a good idea, get operates on a json value, and giving a key as an argument feels quite weird, I would personally prefer adding another method.
However, a get_or method with a single parameter (the default value) still looks valuable to me.

As long as the version that returns basic_json does not throw, I am happy. I wonder what the others from this thread think.

I have changed to limp along with a "test first" strategy. Not "what's the value, apply default in case" approach but "is there value? No value? Fine, apply default. Is value? Use it."
I'm building code on an embedded device and am doing my damnedest to avoid having exceptions thrown for anything other than real hard core exceptions -- such as hardware failures. This code is simply for device parameter settings, and it seems to me that throwing exceptions when a default value is missing is awfully dramatic.
So, if there is any option I can get where throwing exceptions is a truly last resort kind of thing (e.g. a completely malformed request), then I'm good.

On Jul 9, 2017, at 12:00 PM, Niels Lohmann<EMAIL_ADDRESS>wrote:
As long as the version that returns basic_json does not throw, I am happy. I wonder what the others from this thread think.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/nlohmann/json/issues/278#issuecomment-313941565, or mute the thread https://github.com/notifications/unsubscribe-auth/ABROJVcqK1C2I31TZa0V7qFmn7JvQigNks5sMSNbgaJpZM4JF_GV.

Hello,
I just read through the post, but I don't think there is a solution for this problem here, right?
I totally agree with @nlohmann in one point:
I don't think that the default value should be returned, when the given JSON value for a key, doesn't matches the requested value. But I do think that the null value is a special case. nullis used mostly for not given, which is the same as leaving out the key completely. So I think, that the solution of returning the default value in case of nullmakes a lot of sense.
Sorry for heating up this thread, and even more if there is already a solution, but I am currently facing exactly this dilemma.
Thanks for the great library & cheers!
Daniel

I currently have the issue, that I have to parse a lot of json from various sources. Sometimes there is a mistake in one of the sending clients and they send an integer as a string or null instead of an integer, etc. I would prefer it if there were some functionality to give me a value, if the json value is of the expected type and exists and in any error case returns me a default value. Currently there seems to be no functionality like that and I need to write my own function, that combines value(key, default) and a try catch for type errors. I would like to have a function, that can help me avoid the try catch.

What would be the signature of that function?

The signature would basically be the same as value, taking the key and the default value. It would only differ in the behaviour, since it would treat type errors as the key not existing. I have no idea, what one would name this function though. Basically I don't want to catch the errors, when someone sends me the wrong type for an optional field, but just discard it and use the default value.
json j = R"({ "timestamp": "1234567890", "width": null })"_json;
uint64_t ts = j.value1("timestamp", 0); // just default to 0 in the error case
uint64_t width = j.value1("width", 0); // I don't care, that someone put null in the json insted of not adding the key at all

It could be possible to rely on overload with a extra type as parameter.
struct NoTypeError {};

template <typename T>
T value(std::string, T default, NoTypeError);


[GRANT-220] - GET, POST, PATCH for Score Table

- GET /applications/:applicationId/scores retrieves all scores that belong to the application
- POST /applications/:applicationId/scores creates a new score
- PATCH /applications/:applicationId/scores/:scoreId updates an existing score

Merging because of time constraints.
Make a separate ticket for fixes/changes later if needed.


Enhancement: Add link to download json report

I didn't see a link in the UI to download a submission result (json) as I might get if I used the API.  Would be nice to add that as an option.

The copy to clipboard is sufficient for the JSONSectionBody and I've directed power users that want the JSON to the API.  If I get more requests for either, then it might make imply that it would be helpful to include, but for now I'm going to close this.  Thanks!


Playwright Bug

Describe the bug
Hello,
When I run the example test mentioned here https://cumulusci.readthedocs.io/en/latest/robot-playwright.html, I get this error:
Suite setup failed: Timed out waiting for a lightning page

This is the page that opened:

Reproduction steps

Authorize cumulusci to a sandbox
Run the script mentioned here: https://cumulusci.readthedocs.io/en/latest/robot-playwright.html
Review errors provided in script
n. ...

Your CumulusCI and Python versions
CumulusCI version: 3.71.0 (/Users/kollu/.local/bin/cci)
Python version: 3.11.1 (/Users/kollu/.local/pipx/venvs/cumulusci/bin/python)
You have the latest version of CumulusCI ⛅
Operating System
MacOs Ventura Version 13.0
Windows environment
No response
CumulusCI installation method
pipx
Error Gist
No response
Additional information
No response

We hit this as well but you can turn off the wait. See the example below:
*** Settings ***
Resource          cumulusci/robotframework/SalesforcePlaywright.robot
Suite Setup       Run keywords
...               Open test browser    wait=false
...               AND Set browser timeout    60 seconds
Suite Teardown    Close browser

Fixed in #3503


Make wignal warning more clear

Before the change:
tensorflow.python.framework.errors_impl.InvalidArgumentError: Bad audio format for WAV: Expected 1 (PCM), but got3 [Op:DecodeWav]
After the change:
tensorflow.python.framework.errors_impl.InvalidArgumentError: Bad audio format for WAV: Expected 1 (PCM), but got audio format number 3 [Op:DecodeWav]

I signed it!


User forget Password And Reset Password

Adding forget password or reset Password Setting for Users .

I am working on the forget password page
I am going to upload the forgotpwd mail template soon