EscapeHTML=false doesn't work when exporting JSON

What version of CUE are you using (cue version)? 0.4.0
Does this issue reproduce with the latest release? Yes
What did you do?
test.cue
x: "&<>"

cue eval test.cue
x: "&<>"
cue export test.cue
{
    "x": "\u0026\u003c\u003e"
}
cue export test.cue --escape
{
    "x": "\u0026\u003c\u003e"
}

What did you expect to see?
Go's encoding/json will encode & < and > in utf-8 by default and this can be turned off by setting SetEscapeHTML as false, which is what the --escape flags does when encoding to JSON but it doesn't seem to be working as expected. I expect this output -
{
    "x": "&<>"
}

@verdverm I had the same hunch, but escapeHTML is set to false by default anyway. I also forced the cfg.EscapteHTML to false and yet got the same results. Also confirmed that when marshalling happens the json module gets the correct false flag. So something else seems broken here

I can confirm that the escape flag is not being stored into the encConfig object. So that needs a fix.
diff --git a/cmd/cue/cmd/common.go b/cmd/cue/cmd/common.go
index 94011825..7021569a 100644
--- a/cmd/cue/cmd/common.go
+++ b/cmd/cue/cmd/common.go
@@ -711,6 +711,7 @@ func (b *buildPlan) parseFlags() (err error) {
                AllErrors: flagAllErrors.Bool(b.cmd),
                PkgName:   flagPackage.String(b.cmd),
                Strict:    flagStrict.Bool(b.cmd),
+               EscapeHTML: flagEscape.Bool(b.cmd),
        }
        return nil
 }

This may be an additional and separate issue from the encoders use of the boolean value. I can also confirm that cue export output is always escaped regardless of the JSON encoder setting for this.
I believe this is because json.Encode calls json.Marshal and cue.Value has a custom MarshalJSON function which calls back into the module json.Marshal function without any of the config from the original encoder.

The real issue is that the flag is not available for Marshaling the specific CUE value  as the json encoder does not pass that information through, it seems.

Yeah, I believe that this isn't possible to fix until there's a new JSON encoder that allows access to those fields. FYI @dsnet

Hi ! Is there a workaround for this issue ?

is there any timeline for this?

There isn't a workaround right now. I'm looking at this now, as I believe there is a way for us to fix it without changes in upstream Go, but I can't promise a timeline.

This should now be fixed in master, which will be tagged as the first v0.6 alpha soon.


Issue while reading "/home/user/repo/.npmrc". Failed to replace env in config: ${NODE_AUTH_TOKEN}

Verify canary release

[X] I verified that the issue exists in the latest Turborepo canary release.

Link to code that reproduces this issue
sorry no reproduces repo, just create .npmrc
What package manager are you using / does the bug impact?
pnpm
What operating system are you using?
Mac
Which canary version will you have in your reproduction?
turbo 2.0.12
Describe the Bug
in my .zshrc, already added export NODE_AUTH_TOKEN=XXXXX
in normal pnpm install / run , it never show any warn about missing NODE_AUTH_TOKEN env
but when run in turbo task, it always show warn:
Issue while reading "/home/user/repo/.npmrc". Failed to replace env in config: ${NODE_AUTH_TOKEN}
Expected Behavior
should be able to read my env
To Reproduce
add .npmrc
# github npm packages
//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}
@acme:registry=https://npm.pkg.github.com # for github package
always-auth=true

Additional context
No response

I think it will be solved when add in turbo.json
"globalPassThroughEnv": ["NODE_AUTH_TOKEN"],


TODO:

[x] rename change_detection.adwin vs concept_drift.adwin (test_*, imports, ...)
[x] check that the docs generate properly for child class
[x] update the docstrings to reflect the different input and purpose
[x] update the example notebooks accordingly
[x] for concept_drift, add the accuracy calculation with/without detector
[x] revert test_adwin to prior version, move to change_detection
[x] add coverage tests for concept_drift.adwin

Nitpick changes:

[x] remove round_val from LFR's update
[x] increment version number
[x] update EDDM docstring

Noting #84, much of the code in ADWINacc and test_adwin_acc will be backed out when that issue is fixed.


[AJ-807] WDS troubleshooter

Troubleshoot link appearing when WDS is unavailable:

Troubleshooting pop-up:

Can you share a screenshot of what this looks like when WDS has an instance running? I'm wondering what the DB status field will look like-

@calypsomatic is this going to be visible to customers? If not, accessibility isn't really something we need to worry about. We also don't really need to be concerned if the troubleshooter is just a temporary affordance while WDS is settling in.

is this going to be visible to customers? If not, accessibility isn't really something we need to worry about. We also don't really need to be concerned if the troubleshooter is just a temporary affordance while WDS is settling in.

@cahrens Yes - the idea is that a customer would open this up and send the info to support.  Wording along these lines along with easier clipboard-copying coming soon!

is this going to be visible to customers? If not, accessibility isn't really something we need to worry about. We also don't really need to be concerned if the troubleshooter is just a temporary affordance while WDS is settling in.

@cahrens Yes - the idea is that a customer would open this up and send the info to support. Wording along these lines along with easier clipboard-copying coming soon!

Ah, then I will take a look at some point.

Should this be done in TS? Seems right now it is done via JS?
I don't have strong opinions either way, just curious what the direction of new files in the UI should be?

@aaronkanzer Yeah I noticed that it was JS not TS but just didn't have the strength of will to update it and deal with whatever headaches ensued.  But I can certainly try if we think it's for the best.


Suport for Device 62bc  RM4

Please raise an issue in the GitHub repository (https://github.com/lprhodes/homebridge-broadlink-rm/issues) with details of the type of device and its device type code: "62bc". The device is connected to your network with the IP address "<IP_ADDRESS>".

This fork isn't being developed anymore unfortunately. Fortunately there are forks which was still being worked on. I personally have done work on homebirdge-broadlink-rm-pro which does support these devices.

Okay my friend, thank you!


Replies to your Nim question

Hello there,
Here is a reply to your Nim questions
Questions

how to specify immutable inside for(foo in bar) ?
does it have dfmt equivalent?
has REPL?
can we modify a slice of an immutable array declared by 'let'?
how to use global variables? (cf http://gradha.github.io/articles/2015/02/goodbye-nim-and-good-luck.html)
rdmd equivalent?
how to search for symbols fooBar given that nim allows foobar fooBar foo_bar etc?

Answers

[ ] 1. Immutability is defined by the iterator return type.
for foo in in bar implicitely calls the items iterator which is defined as iterator items[T](a: yourCollection[T]): T = meaning it accepts a collection and return an immutable value.

The mutable iterator is iterator mitems[T](a: var yourCollection[T]): var T = and you call it like that for foo in bar.mitems:

[x] 2. No

[ ] 3. unofficially, you can use nim secret but it does not support a lot of things. The most promising is nrpl.

[ ] 4. Slicing doesn't return a var T for let arrays so you can't. Note that immutability for stack objects/array/types is deep but for ref/ptr types it is shallow, it means that the memory address pointed to cannot be modified but the content can.

[ ] 5. I don't understand the issue. Non-const global vars are not allowed in proc tagged noSideEffects and care must be used if accessed from multiple threads but there is nothing special about them otherwise.

[ ] 6. Not sure about how D compilation works and why this is needed. Nim only compiles changed file by default.

[ ] 7. Nim provides "nimsuggest" that can be used for vim, emacs, vscode, atom that autocompletes. Otherwise, consistency within a library.

thanks, incorporating your answers gradually in the README (eg https://github.com/timotheecour/D_vs_nim/commit/d29221cc593fa09475516d7d4897bd72257dd2fd) and marking these as checked in ur answer


error while trying to build using codebuild + buildspec.yml

Describe the bug
Trying to build the solution by using CodeBuild, but it seems there is a script that is missing from the repository build-open-source-dist.sh
To Reproduce
Create a CodeBuild project getting the source from current repository and start build using buildspec on project source repository.
Expected behavior
Deploy solution to S3 Bucket
Please complete the following information about the solution:

[main] Version: [e.g. v1.0.0]
[us-east-1] Region: [e.g. us-east-1]
[no] Was the solution modified from the version published on this repository?
[yes] If the answer to the previous question was yes, are the changes available on GitHub?
[no] Have you checked your service quotas for the sevices this solution uses?
[yes] Were there any errors in the CloudWatch Logs?

Build Logs
980 | [Container] 2023/03/16 00:20:55 Running command echo "Starting open-source-dist `date` in `pwd`"
981 | Starting open-source-dist Thu Mar 16 00:20:55 UTC 2023 in /codebuild/output/src076791728/src/github.com/clouddog-br/video-on-demand-on-aws/deployment
982 |
983 | [Container] 2023/03/16 00:20:55 Running command chmod +x ./build-open-source-dist.sh && ./build-open-source-dist.sh $SOLUTION_NAME
984 | chmod: cannot access './build-open-source-dist.sh': No such file or directory
985 |
986 | [Container] 2023/03/16 00:20:55 Command did not exit successfully chmod +x ./build-open-source-dist.sh && ./build-open-source-dist.sh $SOLUTION_NAME exit status 1
987 | [Container] 2023/03/16 00:20:55 Phase complete: BUILD State: FAILED
988 | [Container] 2023/03/16 00:20:55 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: chmod +x ./build-open-source-dist.sh && ./build-open-source-dist.sh $SOLUTION_NAME. Reason: exit status 1
989 | [Container] 2023/03/16 00:20:55 Entering phase POST_BUILD
990 | [Container] 2023/03/16 00:20:55 Running command echo "Retrieving next stage buildspec `date` in `pwd`"
991 | Retrieving next stage buildspec Thu Mar 16 00:20:55 UTC 2023 in /codebuild/output/src076791728/src/github.com/clouddog-br/video-on-demand-on-aws/deployment
992

Thanks for your feedback. We are currently reviewing this with our engineering team.

Hello @aro1976, please follow these guidelines to deploy the solution instead: https://docs.aws.amazon.com/solutions/latest/video-on-demand/deployment.html


Naming errors

Received an e-mail from Victor Lebedev highlighting some naming errors, which we need to address:

I found a few bugs and typos in your supernova catalog:

two supernovae ( SMTJ21413915-5643445, MASTEROTJ134201.21-023856.2 )
present twice;

The following supernovae in alias mentioned twice:
Gaia16agf
MASTEROTJ111920.95+724857.3
PSNJ18121900+2131150
SNhunt10
SNhunt138
SNhunt27
SNhunt28
SNHunt309
SNhunt313
SNhunt314
SNhunt33
SNhunt34
SNhunt36
SNhunt39
SNhunt41
SNhunt42
SNhunt45
SNhunt49
SNhunt51
SNhunt55
SNhunt58
SNhunt62
SNhunt63
SNhunt64
SNhunt66
SNhunt7
SNhunt70
SNhunt77
SNhunt79
SNhunt82
SNhunt84
SNhunt85

supernovae SNhunt133, SNhunt281
are doubles PSNJ17124620+2313265, SN2015bp

in a supernova  AT2016aha   erroneously alias name SNhunt307

supernova PESSTOESO154-G10  one hand you have a double SN2014eg , while in the NED is designated as SN2013fc

Finally, "Possible supernova" there can be named supernovae (and Name , and Alias).

I believe I have resolved all of these, running new import and will check after it has completed.

These are now resolved, closing.


Bridges have caterpillar caps where they join road network

From drive test in Phoenix, they have tons of roads and paths going over freeways that show like:
#18/33.38530/-111.94269

We need combo of cap styles to fix this:
            minor_road_bridge:
                filter: { is_bridge: yes }
                draw:
                    lines:
                        cap: round
                        outline:
                            cap: butt


Add CRUDF cmdlets around UserPreferences API endpoints for easy management of the Client Tools List View Customization

Since Tridion Docs 13/13.0.0 the Client Tools List View can be customized in visibility, order, width, sorting across the various list views. The local configuration is eventually stored on the user profile inside the repository.
The Client Tools do this based on User25.SetPreferences, User25.FindPreferences, User25.RetrievePreferences and User25.DeletePreferences API calls introduced in 13.0.0
This enhancement is about proper cmdlets with objects to make debugging, correcting and provisioning easier.

[ ] Set-…preferences like ishfield… format that memory only pipeline object. Remember that is preferences could become available on settings.
[ ] Find-/Get-

Take pipeline IshUser, if not present the IshSession IshUser
Takes two filters according to Api and returns ishpreferences object

[ ] Set-

Take pipeline IshUser, if not present the IshSession IshUser... Allowing mass overwrite/update

Takes either single key/value or ishfield like group object or hash key/value
Returns ishpreferences object

[ ] Remove-

Take pipeline IshUser, if not present the IshSession IshUser
Takes two filters according to Api
Or takes keys from incoming ishfield like object

[ ] Print/format like ishuser, key, value in a table

The idea is quite old, not picked up yet. Given the switch from either WcfSoapWithWsTrust or WcfSoapWithOpenIdConnect to OpenApiWithOpenIdConnect. This set of cmdlets might be a good candidate to directly implement on the future Public REST Api.


Sent lumens without a memo

Hello I sent my lumens to my coinbase account without the memo and now my lumens are gone. Is there anyway to retrieve them? Here is the transaction I.D.
9525fbb5d76a575bd2a2c0195a8c36be2936a9334dc367e343bb7a76570c734b

Coinbase has your Lumens now, not Keybase. You will need to talk to them instead.

Log a ticket with Coinbase. I have done though they said to send 2 small amounts of Lumens with the correct wallet address and memo ID. However I cannot find a place to put the memo ID when I use Keybase.
I think I disabled it, though there is no setting I have found to add it back. Is this a bug or a feature?

Add a public memo (on Stellar) is where you should paste the memo ID or whatever they call it.
The address goes in the To area.

@junderw I'll give it a shot, thanks.

It worked! Thank you very much. I think I got confused because Coinbase and Keybase look kind of similar to me. Not helped by the fact they both use the Proxima Nova font.

They're also both sponsored by and partners of the Stellar Development Foundation (-:
Glad you got it sorted.


[Feature] New Radio components

Radio

[x] Radio example
[x] Disabled state
[x] Radio link
[x] Helper text
[x] Bordered
[x] Radio list group
[x] Horizontal list group
[x] Radio in dropdown
[x] Inline layout
[x] Advanced layout
[x] Colors

Completed by @jjagielka .


Add volunteer test

In this PR, we are Implementing Volunteer Test:

[ ] DateTest
[x] EmailTest
[x] NameTest
[x] PhoneTest
[ ] TimeTest (need help to check the logic, also Time in event and volunteer is the same, maybe we should combine)
[ ] UniqueVolunteerListTest
[ ] VolunteerInvolvedInEventPredicateTest
[ ] VolunteerTest

We have also created a VolunteerBuilder class for testing.

[ ] VolunteerBuilder

:warning: Please install the  to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
Attention: Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.

Files with missing lines
Patch %
Lines

.../java/seedu/address/model/volunteer/Volunteer.java
0.00%
1 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Files with missing lines
Coverage Δ
Complexity Δ

...ain/java/seedu/address/logic/parser/CliSyntax.java
94.11% <ø> (-0.89%)
1.00 <0.00> (ø)

.../main/java/seedu/address/model/volunteer/Time.java
94.73% <100.00%> (+94.73%)
7.00 <2.00> (+7.00)

.../java/seedu/address/model/volunteer/Volunteer.java
0.00% <0.00%> (ø)
0.00 <0.00> (ø)

... and 14 files with indirect coverage changes


refactor: alias actix-* features to their equivalent tokio-* features

Actix Web v4 is going stable in the next couple weeks and finally works under #[tokio::main] / #[tokio::test]. Therefore, I think it's safe to "remove" these feature flags now. They haven't actually been doing anything more than tokio- flags for a while.
I thought that removing the private flags and aliasing the public ones to their tokio- equivalent would be the best migration path. That way this could go out in a non-breaking release.
Inspired by #1669.

Test failures look similar to master failures.

It's also definitely possible to run fewer CI checks now, but I would leave that to a follow up PR.

The reason we've kept the runtime-actix-* features around is to try to limit confusion from newer users who may not know that Actix is based on Tokio or what that actually means in practice. They can just pick the runtime-actix-* feature without worrying.
Whether we keep the aliases or not going forward depends on how clear Actix-web wants to be about its interoperability with Tokio. While there's obviously no intent to hide Tokio, there's also nothing that, based on our experiences, states it clearly enough for a naive user to understand that Actix-web works on Tokio. For example:
The release-candidate docs still show using #[actix_web::main], which I still think would suggest to a naive user that Actix is a separate runtime from Tokio: https://docs.rs/actix-web/4.0.0-rc.2/actix_web/index.html
The README mentions "Full Tokio compatbility" but doesn't elaborate on what that means, and it's not mentioned at all in the otherwise identical list of features in the crate docs.
The docs for #[actix_web::main] don't explain that it uses a Tokio runtime.
The docs for actix_web::rt do mention Tokio in passing, but they don't explain why it's relevant.
I do agree, however, that it doesn't make sense to have a separate set of CI passes just for Actix, although I could also see a naive user complaining that Actix isn't covered in CI if we don't have them, so it still comes back around to Actix-web's messaging on the matter.

Appreciate the perspective on clarity wrt relationship with Tokio. I'll make some changes to the docs. No rush removing the actix-* flags or CI checks until you're happy.

Actix Web v4 is released.

@abonander you or someone else on the team available for review?

Rebased. I still think it's a good idea to simplify these.


Online DJ / Chat room not working

Bug
I wanted to became a DJ ! But Kaku knows that i'm a bad dj ..
Steps to reproduce the bug
Click on become a DJ with pseudo and chan name then create a chan
What is your Kaku version ?
1.8.0
What is your OS with version number ?
Windows 10 x64
Which platform you are using to listen to music ?
All
Which track format you are using ?
best video
Is there any error coming from Inspector ?

Others
Feel free to point out any missing points here :) thanks !

@Kingbalou my bad ... thanks for reporting the issue, i already figured out the problems. I'll make a new release later when I refactor online DJ feature. Sorry about that :S

already fixed.


Gas Estimation: tests dont work with<EMAIL_ADDRESS>and later

Running any version of ganache-cli >=6.4.2 (Gas Exactimation) breaks tests on this repository. In reviewing the<EMAIL_ADDRESS>changelog, I read to submit an issue here if an OOG error is experienced.
Expected Behavior
By following the "Test" section of the README, I expect all tests to run successfully (with npm run test). This is what happens prior to<EMAIL_ADDRESS>To run ganache-cli, I am not using the npm script, but rather using ganache-cli -p 8545 -m "asset member awake bring mosquito lab sustain muscle elephant equip someone obvious" -a 100
Current Behavior
error=Error: Returned error: VM Exception while processing transaction: out of gas
ganache-cli versions 6.4.2, 6.4.3, and 6.4.4 produce the above error when running npm run test.
Steps to Reproduce (for bugs)
# Install Ganache-cli globally:
npm install --global ganache-cli

# Install Truffle globally:
npm install --global<EMAIL_ADDRESS>
# Install local node dependencies:
npm install

# Compile contracts
npm run compile

# Run ganache-cli
ganache-cli -p 8545 -m "asset member awake bring mosquito lab sustain muscle elephant equip someone obvious" -a 100

# Run contracts test suite
npm run test

Context
This was discovered when running tests on this repository.
Your Environment

<EMAIL_ADDRESS><EMAIL_ADDRESS>

Hey there @shanefontaine! Thanks for opening this issue!
I just released a new beta with a gas estimation fix a few minutes ago! I haven't even published the release notes yet!
Do you mind trying it out and letting me know if it fix the issue for you?
To update to the beta run:
npm install --global ganache-cli@beta

Great timing. This beta version works perfectly. I'll go ahead and close this issue.

@davidmurdoch is there going to be any note or warning on 6.4.2-6.4.4 that says that there may have been a breaking change in these versions? Or will this fix be included in a major semantic change soon? I am wondering if there are any other people that have run into this issue and have not read the one line in the Changelog.

This wasn't a breaking change (at least not in the semver definition of "breaking"). This was a regression/bug. The next patch release will fix this bug.

That makes sense. Thank you.


Update ADOPTERS.md w/ Expedia Group

Hey, I just made a Pull Request!

:heavy_check_mark: Checklist

[ ] A changeset describing the change and affected packages. (more info)
[ x] Added or updated documentation
[ ] Tests for new functionality and regression tests for bug fixes
[ ] Screenshots attached (for UI changes)

Sorry, hijacked to make this process a lil bit smoother, spell checking is no longer applied to ADPTERS.md 😅
Also formatted the file, so should pass checks now

Sorry, hijacked to make this process a lil bit smoother, spell checking is no longer applied to ADPTERS.md 😅
Also formatted the file, so should pass checks now

Oh, nevermind, workflow doesn't use the same script so updated the vocab instead ._.

Oh, nevermind, workflow doesn't use the same script so updated the vocab instead ._.


how to install this lib by pip

At the moment you need to install directly from one of the wheels in the release page. I'm planning to upload to pypi at some point but not sure how to do versioning so i haven't yet.


create a test that fails to demonstrate issue #75

Note: in its current form, this test fails... I haven't worked on a fix for it, but figured an IT that failed might make it easier to fix the issue reported in #75

Hmm... nevermind. this test doesn't demonstrate this issue yet. I'll try to improve it so it does.

This latest PR also adds a simple fix for the issue identified... the test metadata method tries to copy everything from the docker info directory over - if that directory is used for something else and has folders in it, the copy will fail.
It seems like only copying the set of expected files over would be a better behavior, because it's hard to detect if someone is putting files in that directory that shouldn't be there - but if there is a directory there in this PR it will be detected and a suggestion on how to configure the plugin will be logged at the warning level


5.1.0 - Playlist parser class ignores thumbnailRenderer

Steps to reproduce

Get a channel object
Search for playlists
Look into the result for any playlists
3.1. Look non-parsed response to see that thumbnailRenderer exists

Example

This bug was encountered in the Freetube repo in this pull request:
https://github.com/FreeTubeApp/FreeTube/pull/3710#issuecomment-1611868490
Failure Logs
N.A.

Expected behavior
For Playlist instances to have an (optional) thumbnail_renderer prop just like GridPlaylist
Current behavior
The Playlist class ignores the thumbnailRenderer prop
Version
Default
Anything else?
It seems that the thumbnailRenderer node is not always set, for instance on Mix playlists (aka playlists that users didn't make). So if the thumbnailRenderer node should be added it should be optional/possibly undefined.

Checklist

[X] I am running the latest version.
[X] I checked the documentation and found no answer.
[X] I have searched the existing issues and made sure this is not a duplicate.
[X] I have provided sufficient information.

I am planning to add this prop myself in a PR


Import tracker producing wrong output in case of a single extras_module

Describe the bug
In case there is a single extras_modules, import_tracker does not produce extras_require output correctly.
Expected behavior
Even if there's only a single module in extras_module, the extras_require output should correctly map the optional modules required for it.
Additional context
Adding a second extras_module fixes the extras_require output.

This issue has been mosyly addressed by #39. Closing for now and will reopen if the remaining corner case becomes an issue.


dbscsnv option missing from datatarget

Hi Brad,
it seems I missed something while trying to add the dbscsnv option to the installer/upgrade.
I'm getting bcbio_nextgen.py upgrade: error: argument --datatarget: invalid choice: 'dbscsnv' (choose from 'variation', 'rnaseq', 'smallrna', 'gemini', 'cadd', 'vep', 'dbnsfp', 'battenberg', 'kraken')
Could you check where I went wrong?
Thanks
M

Nevermind, fixed it in #1699
can you go over this and check if I didn't miss anything?
Thanks!
M

Thanks for the fix, I'll follow up in #1699


feedback

@cowboy / @tkellen the code in master should be viewed as  "placeholder" code.
I'm going to add another issue to get your thoughts on a couple of approaches I'm exploring for event logging. First though, it occurred to me while trying to patch the event logger code into file and options (just to try to do it in more than one lib) that we should consider making all legacy libs constructors. This will make the API uniform and consistent, and when libs like this one are patched in, we can follow the same exact pattern across all of them.
However, if we do this, we'll also need to implement a facade around option, config and any other top-level exports that are currently exposed and used as functions. thoughts?

I envision this library exporting these functions:

LogMethodsToEvents - provide the same API that grunt.log currently provides, but instead of logging directly to the console, emit events (maybe on a .event property of the returned instance)
LogEventsToMethods - takes a reference to to grunt logger grunt.log as the first argument, along with a list of all event emitters to observe. Any time an event is emitted, the corresponding actual grunt.log method is called.

And being used as-follows:
// Inside grunt-legacy-file, for example
var LogMethodsToEvents = require('grunt-event-logger').LogMethodsToEvents;
function File(options) {
  this.log = new LogMethodsToEvents();
  // etc
}
File.prototype.doSomething = function() {
  // exact same API as before but instead of calling .verbose directly call .log.verbose
  this.log.write('foo').ok();
  this.log.verbose.writeln('--verbose').or.writeln('not --verbose');
}

// Inside grunt
var grunt = {};
grunt.log = new require('grunt-legacy-log').Log({grunt: grunt});
grunt.file = new require('grunt-legacy-file').File({grunt: grunt});
grunt.option = new require('grunt-legacy-option').Option({grunt: grunt});
grunt.config = new require('grunt-legacy-config').Config({grunt: grunt});
grunt.fail = new require('grunt-legacy-fail').Fail({grunt: grunt});
// etc

var LogEventsToMethods = require('grunt-event-logger').LogEventsToMethods;
LogEventsToMethods(grunt.log, [
  grunt.file.log.events,
  grunt.option.log.events,
  grunt.config.log.events,
  // etc
]);
// not sure about fail yet, but I think this could work
LogEventsToMethods(customFailHandler, [
  grunt.fail.log.events
]);

So instead of actual log method -> write to stdout, it's proxy log method -> emit event -> handle event -> actual log method -> write to stdout
Does this make sense?

Also, I think we should rename this library to grunt-legacy-log-events or similar, since I want it to be absolutely clear that this only exists to help us break legacy libs out of Grunt, and won't be used otherwise.

Or grunt-legacy-event-logger

rename this library

consider it done. In general I'll just put a best-guess in place then we can rename to whatever makes sense.

k

Any time an event is emitted, the corresponding actual grunt.log method is called.

ok, I had a bullet list of questions I was about to paste up here but that gets rid of most of them...

I chatted with @cowboy about this this morning and I was going to reply but it looks like he covered the main points of our conversation in the comments above. If you need anything else, just say the word @jonschlinkert!

Maybe it could something like this (completely untested):
var methods = [
  'write',
  'writelns',
  'ok',
  'error',
  // etc
];

var modes = [
  null,
  'verbose',
  'notverbose'
];

exports.LogMethodsToEvents = function() {
  var log = {
    event: new EventEmitter(),
    verbose: {},
    notverbose: {}
  };
  log.verbose.or = log.notverbose;
  log.notverbose.or = log.verbose;
  methods.forEach(function(name) {
    modes.forEach(function(mode) {
      var namespace = mode ? log[mode] : log;
      namespace[method] = function() {
        log.event.emit(method, {
          mode: mode,
          args: arguments,
        });
        return namespace;
      };
    });
  });
  return log;
};

exports.LogEventsToMethods = function(log, emitters) {
  emitters.forEach(function(emitter) {
    methods.forEach(function(method) {
      emitter.on(method, function(data) {
        var namespace = data.mode ? log[data.mode] : log;
        namespace[method].apply(namespace, data.args);
      });
    });
  });
};

It make make sense to just emit a generic log event and have the method be a property of the data object, it would make for a lot less event handlers!

yesterday where we left off was that we were going to create two libs: one as a generic lib for creating the event loggers (some kind of factory), and the other as a facade to grunt legacy libs. I still stand by that as the way to go. it allows us to be generic, keep it simple, and IMHO it will be just as easy to maintain if not easier than creating one lib. Are we still doing the second lib?
If so, the last code snippet is a little closer to what I was thinking because it's a better pattern for us to  create a facade around - it's similar to the code I showed you in our call yesterday, except for the namespaces.
today I started working on this (unfinished):
var util = require('util');
var Emitter = require('events').EventEmitter;

/**
 * Create an instance of `EventLogger`
 *
 * @api public
 */

function EventLogger() {
  Emitter.call(this);
  this.methods = [];
}
util.inherits(EventLogger, Emitter);

/**
 * Emit a log event.
 *
 * @param  {String} `name` the name of the log event to emit
 * @param  {String} `message` Message intended to be logged to the console.
 * @return {Object} `EventLogger` for chaining
 * @api public
 */

EventLogger.prototype.base = function(name, message) {
  var event = this.methods.length === 0 ? name : this.methods.join('.');
  this.methods = [];
  this.emit(event, message);
  return this;
};

/**
 * Create a logger with the given `name`.
 *
 * @param  {String} `name` the name of the log event to emit
 * @return {Object} `EventLogger` for chaining
 * @api public
 */

EventLogger.prototype.create = function(name) {
  Object.defineProperty(EventLogger.prototype, name, {
    enumerable: true,
    configurable: true,
    get: buildLogger.call(this, name)
  });
};

/**
 * Create a chainable, logger getter object
 *
 * @param  {String} `name` the name of the log event to emit
 * @return {Function} getter function, used in `defineProperties`
 */

function buildLogger (name) {
  var self = this;
  var getter = function() {
    self.methods.push(name);
    var logger = function (message) {
      return self.base(name, message);
    };
    logger.__proto__ = EventLogger.prototype;
    return logger;
  };
  return getter;
}

/**
 * Expose `EventLogger`
 */

module.exports = EventLogger;

/**
 * example usage
 */

var logger = new EventLogger();

logger.on('info', console.log);
logger.on('log', console.log);
logger.on('info.log', console.log);
logger.on('log.info', console.log);
logger.on('verbose.info', console.log);
logger.on('verbose.error', console.log);

logger.create('info');
logger.create('log');
logger.create('warn');
logger.create('error');
logger.create('verbose');

logger.verbose.error('verbose.error message');
logger.log.error('info message');
logger.log.warn('log message');
logger.log.info('log.info message');
logger.verbose.info('whammy');

IMHO whether it's something along the lines of @cowboy's last example, or the one I just pasted, I'd like to see this done as two libs to make it clean. If that's not consensus, no worries we can still get all of that implemented, but I don't think it's as cookie-cutter as it seems.

@jonschlinkert I might be misunderstanding here, but your example seems far more complex than what is necessary to just decouple the legacy libs from grunt.log. Maybe I just don't understand what you're getting at. Can you contextualize it in a grunt-specific example?
Also, @tkellen do you have any suggestions here?

It make make sense to just emit a generic log event

yeah that definitely has appeal, it's simple. I think we would just need to decide on the args passed to the emitter so that code context can be correctly interpreted in the listeners..

I think both approaches are valid. One question I would ask that might be useful in guiding which to choose is this: do we expect this interface to only be used privately or do we plan to have the public API actually function using emitters at some point?

Taking a that a bit further, I think it would be useful to concretely identify the ultimate goal from a functionality standpoint and then allow @jonschlinkert to implement the solution he thinks makes sense.
It seems to me that the complexity of what we're describing is small enough that our time would be better spent actually building prototypes we can interact with vs discussing what they might look like.

Example (pseudo-code):
logger.on('info', grunt.log.info);
logger.on('verbose.info', grunt.verbose.info);
logger.on('verbose.warn', grunt.verbose.warn);

scratch that last example... completely agree with @tkellen's point.

I just chatted with @cowboy on the phone about this. We think you should run with your idea @jonschlinkert!
As an aside, I also think we should set a deadline/goal for when grunt.file lands back in Grunt. This might seem arbitrary to say here, but I believe we're out at this level of abstraction because it's needed for grunt.file to work? It would be great if we could be focused about what goal we're trying to serve vs getting lost in the semantics of how event logging might potentially work.
If I were picking a date from thin air, I'd say let's try to make this happen by June 5th. If that's not a reasonable date, no worries, set another. Whatever the case, let's get a date!
Excited to see what you come up with @jonschlinkert!

sounds like a plan, @tkellen thanks!

Thanks @tkellen. June 5 sounds great, and also, I'm far more interested in getting the legacy grunt stuff done than bikeshedding!

(Even though it may be impossible to tell)

lol, just saw that...


[Bug] AttributeError: module 'pinecone' has no attribute 'GRPCIndex'

Is this a new bug in the Pinecone Python client?

[X] I believe this is a new bug in the Pinecone Python Client
[X] I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior
I have pinecone upgraded to v2.2.4, and also installed the GRPC client.
When I run the following command:
index = pinecone.GRPCIndex(index_name)
I get the following error:
AttributeError: module 'pinecone' has no attribute 'GRPCIndex'
Expected Behavior
Previously when using v2.2.2, using the same pipeline worked.
Steps To Reproduce
Run Pinecone v2.2.4 with GRPC client.
Relevant log output
No response
Environment
- OS:
- Python: 3.10.11
- pinecone: 2.2.4

Additional Context
No response

I also encountered the same problem. Did you find a solution?

I had to uninstall pinecone using:
pip3 uninstall pinecone-client
Then reinstall pinecone with:
pip3 install pinecone-client[grpc]
it seem like ok

@Abe410 Feel free to close this issue if the proposed solution by @chostyouwang works as intended, Thanks!


net::ERR_PROXY_CONNECTION_FAILED even though I do not use any proxy and it was working perfectly!

Version: 1.28.2
Commit: 7f3ce96ff4729c91352ae6def877e59c561f4850
Date: 2018-10-17T00:20:56.183Z
Electron: 2.0.9
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64

OS Version: Ubuntu 16.04

Steps to Reproduce:
It keeps saying "net::ERR_PROXY_CONNECTION_FAILED" even though I do not use any proxy !!
I uninstalled completely and removing all the settings and reinstalled it and it is still the same !
the settings file:
{
"editor.fontSize": 16,
"editor.formatOnPaste": true,
"editor.formatOnType": true,
"http.proxyStrictSSL": false,
"markdown.preview.fontSize": 16,
"terminal.integrated.fontSize": 16
}

Does this issue occur when all extensions are disabled?: Yes/No
No
Checked the network tab:
ERR net::ERR_PROXY_CONNECTION_FAILED: {1}
az764295.vo.msecnd.net/experiments/vscode-experiments.json Failed to load resource: net::ERR_PROXY_CONNECTION_FAILED
marketplace.visualstudio.com/_apis/public/gallery/extensionquery Failed to load resource: net::ERR_PROXY_CONNECTION_FAILED
workbench.main.js:sourcemap:5575 Error querying extensions gallery Error
at XMLHttpRequest.t.xhrRequest.i.TPromise.o.onerror (workbench.main.js:sourcemap:5520)
s @ workbench.main.js:sourcemap:5575
workbench.main.js:sourcemap:2374 net::ERR_PROXY_CONNECTION_FAILED

Do you have a HTTP_PROXY environment variable set?


Way to build this without x11 stuff

Hello. Is there a way to build this without needed the x11 headers? We want to use this as a CLI based tool only and would rather not bring more libraries in than we need. Thank you

Actually, better yet, can you provide prebuilt binaries? I've followed all the steps and ran into this when trying to build:
In file included from /usr/lib/gcc/x86_64-linux-gnu/10/include/immintrin.h:53,
from chacha_avx.cpp:26:
/usr/lib/gcc/x86_64-linux-gnu/10/include/avx2intrin.h: In function ‘__m256i {anonymous}::RotateLeft(__m256i) [with unsigned int R = 8]’:
/usr/lib/gcc/x86_64-linux-gnu/10/include/avx2intrin.h:588:1: error: inlining failed in call to ‘always_inline’ ‘__m256i _mm256_shuffle_epi8(__m256i, __m256i)’: target specific option mismatch
588 | _mm256_shuffle_epi8 (__m256i __X, __m256i __Y)
| ^~~~~~~~~~~~~~~~~~~
chacha_avx.cpp:73:31: note: called from here
73 |     return _mm256_shuffle_epi8(val, mask);
|            ~^
In file included from /usr/lib/gcc/x86_64-linux-gnu/10/include/immintrin.h:53,
from chacha_avx.cpp:26:
/usr/lib/gcc/x86_64-linux-gnu/10/include/avx2intrin.h:588:1: error: inlining failed in call to ‘always_inline’ ‘__m256i _mm256_shuffle_epi8(__m256i, __m256i)’: target specific option mismatch
588 | _mm256_shuffle_epi8 (__m256i __X, __m256i __Y)
| ^~~~~~~~~~~
chacha_avx.cpp:73:31: note: called from here
73 |     return _mm256_shuffle_epi8(val, mask);
|            ~~~~~~~~~^
make[1]: *** [Makefile:400: Bin-Intermediate/Release-linux-x86_64/cryptopp/chacha_avx.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:124: cryptopp] Error 2

Hello @STashakkori,
Sadly, the only way to build CLI alone is by modifying the Source/Main.cpp, the compiler will cast out the unused libraries. however, libs like x11 should still be present at compile time.
There are already built binaries for Linux & Windows in the Releases, which can be used directly, but they contain CLI and UI code as well.
About the failed build attempt you did, can you give more details on the OS and Distro you are using ?
Thank you.

**Update:
Trying this on a different machine that is ubuntu20 instead of 21 and has a newer SoC worked.

Glad it worked! by the way you can modify the Source/Main.cpp for CLI only.
Main.cpp for CLI only will look like this:
/**
*	Enigma Entry Point
*/
#include <pch.hpp>

#if ! ENIGMA_TESTING
	#include <Enigma.hpp>
#else
	#include <Tests/TestsAll.hpp>
#endif

int main(int argc, char* argv[])
{
	// Initialize Logger
	Enigma::Logger::Initialize();
	// Initialize SQLite3 Database
	Enigma::Database::Initialize();

	Enigma::i32 exit_code = -1;

	try
	{
		//========= CLI Entry =========//
		const auto _Cli = std::make_unique<Enigma::CLI>(argc, argv);
		exit_code = _Cli->Run();
	}
	catch (const std::exception& e)
	{
		// Exit Abnormally
		ENIGMA_CRITICAL(e.what());
		exit_code = EXIT_FAILURE;
	}

	// Shutdown SQLite3 Database
	Enigma::Database::Shutdown();
	// Shutdown Logger
	Enigma::Logger::Shutdown();

	return exit_code;
}

/**
*	Windows Entry Point (for Release & Distribution)
*	Note: even when using WinMain, release & dist are built as ConsoleApp so CLI will work properly.
*/
#if defined(ENIGMA_PLATFORM_WINDOWS) && (defined(ENIGMA_RELEASE) || defined(ENIGMA_DIST))

int WINAPI WinMain(
	[[maybe_unused]] _In_ HINSTANCE instance,
	[[maybe_unused]] _In_opt_ HINSTANCE prev_instance,
	[[maybe_unused]] _In_ LPSTR cmd_line,
	[[maybe_unused]] _In_ int cmd_show)
{
	return ::main(__argc, __argv);
}

#endif

Ah ok thank you @BaderEddineOuaich . By the way this is a finely crafted tool. My compliments to the craftsman

Thank you, you too. Happy Holidays and talk to you soon
On Fri, Oct 15, 2021 at 12:23 PM Bader @.***> wrote:

You're welcome!
If you encounter any problems, questions or clarifications, please don't
hesitate to open an issue or contact me 👍
Have a nice day!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/BaderEddineOuaich/Enigma/issues/5#issuecomment-944470042,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABAPQ26UMEEBYJUILCDPGKLUHBPSBANCNFSM5GCKEK5A
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.


Release on Opam

Hi!
The latest version of Reason released on Opam is not compatible with OCaml 4.11. This is currently impacting several projects that use Reason, for instance:

ocaml-lsp-server (https://github.com/ocaml/opam-repository/pull/17079)
spin (https://github.com/tmattio/spin/issues/86)

Is there any plan to release the latest version of Reason on Opam?
Thanks a lot 🙂

ping @anmonteiro

Thanks for the reminder. I'll cut a release this weekend.

@anmonteiro Could it also have https://github.com/facebook/reason/pull/2635 if possible?

Unfortunately I can't cut releases. @jordwalke would have to do it. I'm gonna publish 3.6.2 which exists somewhere on NPM.

https://github.com/ocaml/opam-repository/pull/17592

I believe this particular issue can be closed now that the package is available in opam. Thanks a lot for that again!

Thanks a lot @anmonteiro and @kit-ty-kate! Closing this now 🙂


Test Automation

Challenge Confirm the Ending has an issue.
User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.63 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.
My code:

function confirmEnding(str, target) {
  // "Never give up and good luck will find you."
  str = str.split(' ');
  if(str[str.length -1] === target){
    return true;
  } else {
    str = str.join('');
    str = str.split('');
  if(str[str.length -1] === target){
    return true;
  } else {
    return false;
  }
  }
}

confirmEnding("Bastian", "n");

Hey guys, I don't know if I don't understand well, but in this test above the second argument "same" should be "sesame" ?
"confirmEnding("Open sesame", "same") should return true."

Sorry guys, now I realized what I did wrong and complete the code with one line hehe
"return (str.substring(str.length - target.length) == target);"


Changelog please?

A changelog would be nice to have, so that developers know what features/fields are gone from VSTS. We can't be expected to sift through diffs of several 6000+ line typings files to find what has changed. Right now I only know of API changes when users report that my extension is broken. It would also be helpful to mark things as deprecated/obsolete before removing them.

Not to highjack the tread, but if you go back to tagging your releases like you used to (https://github.com/Microsoft/vss-web-extension-sdk/releases) it at least makes it possible to bisect the releases


Loosen numpy requirements; Python 3.7 support

Adjusting the build, the user numpy requirement can be changed from numpy==1.22 to numpy>=1.21.
As a consequence we can continue support for Python 3.7 in addition to 3.8-3.10.
I would suggest pushing this out soon to resolve some issues this is causing for lanl/scico.

Jordan, sorry for the uninformative commit message. I made some changes to the demos and the names of the development scripts, and I accidentally did it in an inelegant way.
Do this include a fix for Bugzilla?

Making a note this is related to issue #224 see summary here https://github.com/cabouman/svmbir/issues/224#issuecomment-1020583300
The problem was binary mismatches if we cythonized with a different numpy version than from the install environment.  Seems though that if we build from the older numpy 1.21.6, the libraries are forward compatible up through the current 1.23.5.
Tested on the linux and macOS builds, but please follow up if anybody sees import errors after this is released.


Added parameter I18n.fallbackLocales

In rails you can fallback en-GB and en-US to en and sv-SE to sv and so on. Added parameter fallbackLocales that if its set to true will do just this.

Could you write some tests to make sure that everything will be ok?

Added three tests to make sure fallbackLocale works as intended.

Given the tests, will this be merged? Thanks!


Failed to send cookie

I had installed univk_audio via GitHub.
Then I had modified auth_example.py and auth_with_example.py, assigning my vk.com creds to the following variables:
univk_audio.auth_exceptions.GetCookiesRequestError: Failed to send/process 'Get Cookies' request
When I running auth_with_example.py or auth_example.py. I get the following error message:
  File "C:\Users\t3mm1\AppData\Local\Programs\Python\Python39\lib\site-packages\univk_audio\async_auth.py", line 225, in __send_get_cookies_request
    async with self._session.get(
  File "C:\Users\t3mm1\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 1141, in __aenter__
    self._resp = await self._coro
  File "C:\Users\t3mm1\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 508, in _request
    req = self._request_class(
  File "C:\Users\t3mm1\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client_reqrep.py", line 283, in __init__
    url2 = url.with_query(params)
  File "C:\Users\t3mm1\AppData\Local\Programs\Python\Python39\lib\site-packages\yarl\_url.py", line 1007, in with_query
    new_query = self._get_str_query(*args, **kwargs) or ""
  File "C:\Users\t3mm1\AppData\Local\Programs\Python\Python39\lib\site-packages\yarl\_url.py", line 968, in _get_str_query
    query = "&".join(self._query_seq_pairs(quoter, query.items()))
  File "C:\Users\t3mm1\AppData\Local\Programs\Python\Python39\lib\site-packages\yarl\_url.py", line 931, in _query_seq_pairs
    yield quoter(key) + "=" + quoter(cls._query_var(val))
  File "C:\Users\t3mm1\AppData\Local\Programs\Python\Python39\lib\site-packages\yarl\_url.py", line 946, in _query_var
    raise TypeError(
TypeError: Invalid variable type: value should be str, int or float, got None of type <class 'NoneType'>

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "c:\Users\t3mm1\Desktop\projects\steGAYlos team\case3-neebu\vk.py", line 22, in <module>
    asyncio.run(get_auth_cookies_with_example())
  File "C:\Users\t3mm1\AppData\Local\Programs\Python\Python39\lib\asyncio\runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "C:\Users\t3mm1\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 642, in run_until_complete
    return future.result()
  File "c:\Users\t3mm1\Desktop\projects\steGAYlos team\case3-neebu\vk.py", line 18, in get_auth_cookies_with_example
    cookies = await auth.get_auth_cookies(path = "cookies.txt")
  File "C:\Users\t3mm1\AppData\Local\Programs\Python\Python39\lib\site-packages\univk_audio\async_auth.py", line 266, in get_auth_cookies
    raise err
  File "C:\Users\t3mm1\AppData\Local\Programs\Python\Python39\lib\site-packages\univk_audio\async_auth.py", line 259, in get_auth_cookies
    cookie_string = await self.__send_get_cookies_request()
  File "C:\Users\t3mm1\AppData\Local\Programs\Python\Python39\lib\site-packages\univk_audio\async_auth.py", line 233, in __send_get_cookies_request
    raise GetCookiesRequestError("Failed to send/process 'Get Cookies' request") from err
univk_audio.auth_exceptions.GetCookiesRequestError: Failed to send/process 'Get Cookies' request
Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x00000162C2BE5040>
Traceback (most recent call last):
  File "C:\Users\t3mm1\AppData\Local\Programs\Python\Python39\lib\asyncio\proactor_events.py", line 116, in __del__
    self.close()
  File "C:\Users\t3mm1\AppData\Local\Programs\Python\Python39\lib\asyncio\proactor_events.py", line 108, in close
    self._loop.call_soon(self._call_connection_lost, None)
  File "C:\Users\t3mm1\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 746, in call_soon
    self._check_closed()
  File "C:\Users\t3mm1\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 510, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x00000162C2BE5040>
Traceback (most recent call last):
  File "C:\Users\t3mm1\AppData\Local\Programs\Python\Python39\lib\asyncio\proactor_events.py", line 116, in __del__
    self.close()
  File "C:\Users\t3mm1\AppData\Local\Programs\Python\Python39\lib\asyncio\proactor_events.py", line 108, in close
    self._loop.call_soon(self._call_connection_lost, None)
  File "C:\Users\t3mm1\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 746, in call_soon
    self._check_closed()
  File "C:\Users\t3mm1\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 510, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed```

I try change hash parameter on string 72 in "request_data.py" file to value "5fd509994f872859e4", but the error also occurred


H bond analyser

It should detect N/O/F-H···N/O/F contacts (under 4 Å) and a N/O/F-H-N/O/F angle (180 ± 30º)


Numeric input as confirmation of account suggestion

I still haven't got rid of this intuition after a year+ of using hledger-iadd so it might be worth considering.
Currently it's required to enter both the account and the amount as 2 separate steps.
I keep doing the following thing while entering a transaction:

I accept the date
I enter the description
I type the amount and press enter
Then I have the amount suggested as a new account and have to back up and enter the data properly.

Would it make sense to interpret input that stars with a digit on an account question as "yes, I like the suggested account name, here's the amount"? Note: if yes - a flag might be a good idea since it's perfectly possible for someone to have accounts that begin with a number

I also do this from time to time, so there certainly is a bit of a UX problem. However, I'm not entirely sold on the suggested workaround.
I think the the current UI in general isn't great at communicating the current state of your q&a session. For example, I also sometimes try to type a description into the date prompt or an account name into the description field. In general, you either have to have perfect muscle memory or interpret a few spread-out clues and read text to know where you are.
A better way of presenting the current state, e.g in a WYSIWYG fashion like an HTML form or similar, would probably(hopefully) go along way to eliminate these sort of errors. However, that's of course a lot of work and might create new problems.


Chinese language support

Does Lunr support Chinese search? If not, how can I make it support?

Hello @yangxuan74
We are using https://github.com/MihaiValentin/lunr-languages to provide support for other languages. Unfortunately, lunr-languages does not support Chinese but you can contribute a new language: https://github.com/MihaiValentin/lunr-languages/blob/master/CONTRIBUTING.md

I found lunr that supports Chinese https://github.com/darkyzhou/lunr-languages-zh, but how does it add toantora-site-generator-lunr?

Unfortunately, darkyzhou/lunr-languages-zh is a complete fork of lunr-languages so I'm a bit unsure...
I guess it would be nice if each language was distributed as a standalone npm package. Then, we could implement a logic to load additional/optional languages.
@darkyzhou What do you think about this idea?

Unfortunately, darkyzhou/lunr-languages-zh is a complete fork of lunr-languages so I'm a bit unsure...
I guess it would be nice if each language was distributed as a standalone npm package. Then, we could implement a logic to load additional/optional languages.
@darkyzhou What do you think about this idea?

I think it's a nice idea. :)
Since the authors of both lunr-languages and lunr.zh.js are still inactive on GitHub. One can just copy lunr.zh.js's content from the PR and publish it as an individual npm package.

holy moly, MihaiValentin is back and that PR is merged.
now lunr-languages v1.5.0 natively supports Chinese!
@Mogztter @yangxuan74

Thank you for bringing this to my attention.That's good news.

holy moly, MihaiValentin is back and that PR is merged.
now lunr-languages v1.5.0 natively supports Chinese!

Awesome news!

Thank you for bringing this to my attention.That's good news.

👍🏻
Feel free to submit a pull request to upgrade to the latest version https://github.com/MihaiValentin/lunr-languages/releases/tag/1.7.0


Fixed search bar issue on Chrome and Safari

Referencing https://github.com/Dogfalo/materialize/issues/3161
This fixes the bug in Chrome and Safari (previous commit https://github.com/Dogfalo/materialize/commit/c129dc17f76b799d7dc68a550db04c8a53bcdae1 solves only Chrome issue)

Thanks, it works well for me.

+1 can we merge this?

Actually this issue might be duplicated with : https://github.com/Dogfalo/materialize/issues/3161 which is already merged (more code is changed as part of this PR though).

@gugerard The original issue mentions a cursor bug in Safari and this addresses that as well as the Chrome fix

There is duplicated code in this pull request. Take a look at the whole file, your form and input-field styles are duplicates


PMID:11872168

decreased nuclease activity during nitrogen starvation
increased RNA catabolic process during nitrogen starvation

decreased nuclease activity during nitrogen starvation FYPO:0005891
increased RNA catabolic process during nitrogen starvation FYPO:0005892
edit file: de7745210933ee0c76aa64dd9366ba2750ca5515
release: 33aa05df02539d433cfa8db6fa62fe5861d13072


Operator precedence

I was looking for operator precedence

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

ID: 7eeac581-6235-2192-d909-e7fe3d21197f
Version Independent ID: 9d8e2a57-1c18-8cba-9bd4-eef546fe2dcb
Content: C# Operators
Content Source: docs/csharp/language-reference/operators/index.md
Product: dotnet-csharp
GitHub Login: @BillWagner
Microsoft Alias: wiwagn

Thanks for your feedback, @avifarah. Operator precedence is discussed in Operators topic in the C# programming guide.
Since operator precedence is documented, I'm going to close this issue. If you disagree, please feel free to respond.


Track the OS changes on Linux

Problem
Unknown OS change (even just a single file change) could introduce unintended system behavior. Without knowing what was the change, troubleshoot can get extremely difficult.
Potential solution
Clarify the change between 2 snapshots of the system can resolve this issue.
Potential requirement

[ ] A solution takes an input of recorded state to compare with.
[ ] A solution can compare a file by a checksum.
[ ] A solution can compare a file by timestamp (not yet sure how useful this is though).
[ ] A solution can omit the designated paths and files as an option.
More to come.

Doing research

systracer http://www.blueproject.ro/systracer/

Only for Windows

Installwatch https://en.wikipedia.org/wiki/Installwatch

Last release was in 2006. Newer dev seems to be included in CheckInstall
Seems to work on Linux too.

CheckInstall

Last release was in 2009...
Seems available  via apt
Seems the focus  is specific to a pkg built/installed by the tool itself. So the entire OS is likely out of scope.

WhatChanged https://www.majorgeeks.com/files/details/what_changed.html

Win only..

watchman https://github.com/facebook/watchman

This sounds promising capability-wise.
Building master takes a long time...But v4.9.0 (which is the latest that was released in 2017) built quick enough.
It seems focusing on runtime checking. So this may be short of what I want (static monitoring to compare multiple hosts).

pyinotify (github https://github.com/seb-m/pyinotify)

Nice. Binary available from pip.
Seems old. Probably falls short of reqs.

PyInotify https://github.com/dsoprea/PyInotify. This seems a different package from the previous one with the same name https://github.com/seb-m/pyinotify

Can't find static analysis feature nor record feature.

Asked on superuser.com#q1541466.


Deprecate the AndroidBuild and XamarinLicense tasks

Deprecating the AndroidBuild and XamarinLicense tasks.  Adding them back into the releases/m122 branch as they were removed, but not deprecated, in the releases/m10 branch

@kelliejos,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot


v23.08.2 Application Homepage Setting Not Working

Describe the Bug
when I go to the base URL, I want the system to default to /books. This had worked for me prior to the upgrade to 23.08.2. Previous version is 23.06.2. Now I just get some default page showing popular pages, books, and chapters along with a very noticeable Page Not Found across the top of the page, above those other sections. There is a book that is published that allows unauthenticated users to see and read it. This does not show up.
After logging in as an admin and going to the base URL, I get the same behavior.
I have also set the default page to shelves and specific pages with no change in behavior.
Steps to Reproduce
Go to settings | customization. Set application homepage to books. Go to default url and note this is not the books you expected to see.
Expected Behaviour
I expect the base URL to display the contents of /books or anything else I choose after making the application homepage change.
Screenshots or Additional Context
Note the URLs for the base site vs /books

Browser Details
various forms of chromium and firefox
Exact BookStack Version
23.08.2

Hi @2devs1code,
This is not something I've been able to reproduce.
Can you confirm:

The installation method and environment of your BookStack install.
If all update commands (If re-ran) complete without error.
The full output of running git status && git log -n 1 from your BookStack install.
The full output of running ls -alh bootstrap/cache from your BookStack install (Assuming a linux system).

From the responsible party:

fresh install then reattached previous v26 db
update commands all ran clean

/var/www/bookstack# php artisan migrate

                                                                                APPLICATION IN PRODUCTION.

  Do you really wish to run this command? (yes/no) [no]
❯ yes

   INFO  Running migrations.

  2023_06_10_071823_remove_guest_user_secondary_roles ..................................................................................... 6ms DONE
  2023_06_25_181952_remove_bookshelf_create_entity_permissions ............................................................................ 0ms DONE
  2023_07_25_124945_add_receive_notifications_role_permissions ............................................................................ 9ms DONE
  2023_07_31_104430_create_watches_table ................................................................................................. 86ms DONE
  2023_08_21_174248_increase_cache_size .................................................................................................. 74ms DONE

/var/www/bookstack# php artisan cache:clear
php artisan config:clear
php artisan view:clear

   INFO  Application cache cleared successfully.

   INFO  Configuration cache cleared successfully.

   INFO  Compiled views cleared successfully.

/var/www/bookstack# systemctl restart apache2

/var/www/bookstack# git status && git log -n 1
On branch release
Your branch is up to date with 'origin/release'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	.env.bak
	public/apiref.html
	public/sitemap.xml

nothing added to commit but untracked files present (use "git add" to track)
commit 3f473528b13f59680ee5c8dc600abfd444920f92 (HEAD -> release, tag: v23.08.2, origin/release)
Author: Dan Brown<EMAIL_ADDRESS>Date:   Mon Sep 4 12:06:50 2023 +0100

    Updated version and assets for release v23.08.2
root@ip-10-0-0-31:/var/www/bookstack# ls -alh bootstrap/cache
total 36K
drwxrwxr-x 2 root www-data 4.0K Sep 13 17:20 .
drwxr-xr-x 3 root www-data 4.0K Sep 13 17:20 ..
-rwxrwxr-x 1 root www-data   14 Sep 13 17:20 .gitignore
-rwxrwxr-x 1 root www-data 1.6K Sep 13 17:20 packages.php
-rwxrwxr-x 1 root www-data  20K Sep 13 17:20 services.php

/var/www/bookstack# git status && git log -n 1
On branch release
Your branch is up to date with 'origin/release'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	.env.bak
	public/apiref.html
	public/sitemap.xml

nothing added to commit but untracked files present (use "git add" to track)
commit 3f473528b13f59680ee5c8dc600abfd444920f92 (HEAD -> release, tag: v23.08.2, origin/release)
Author: Dan Brown<EMAIL_ADDRESS>Date:   Mon Sep 4 12:06:50 2023 +0100

    Updated version and assets for release v23.08.2
[2:28](https://analoginfo.slack.com/archives/D04E928LCR4/p1694633293821389)

/var/www/bookstack# ls -alh bootstrap/cache
total 36K
drwxrwxr-x 2 root www-data 4.0K Sep 13 17:20 .
drwxr-xr-x 3 root www-data 4.0K Sep 13 17:20 ..
-rwxrwxr-x 1 root www-data   14 Sep 13 17:20 .gitignore
-rwxrwxr-x 1 root www-data 1.6K Sep 13 17:20 packages.php
-rwxrwxr-x 1 root www-data  20K Sep 13 17:20 services.php

@2devs1code For the update commands output, was that the output of the first run or a re-run? Also, since it's not shown, does the composer install --no-dev step complete without error?

re-run
:~/bookstack$ composer install --no-dev

@php -r "!file_exists('bootstrap/cache/services.php') || @unlink('bootstrap/cache/services.php');"
Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Nothing to install, update or remove
Package socialiteproviders/slack is abandoned, you should avoid using it. Use laravel/socialite instead.
Generating optimized autoload files
Illuminate\Foundation\ComposerScripts::postAutoloadDump
@php artisan package:discover --ansi

INFO  Discovering packages.
barryvdh/laravel-dompdf ..................................................................................................................... DONE
barryvdh/laravel-snappy ..................................................................................................................... DONE
intervention/image .......................................................................................................................... DONE
laravel/socialite ........................................................................................................................... DONE
laravel/tinker .............................................................................................................................. DONE
nesbot/carbon ............................................................................................................................... DONE
nunomaduro/termwind ......................................................................................................................... DONE
socialiteproviders/manager .................................................................................................................. DONE
62 packages you are using are looking for funding.
Use the composer fund command to find out more!

@php artisan cache:clear

INFO  Application cache cleared successfully.

@php artisan view:clear

INFO  Compiled views cleared successfully.
www-data@ip-10-0-0-31:~/bookstack$ php artisan migrate
                                                                                APPLICATION IN PRODUCTION.

Do you really wish to run this command? (yes/no) [no]
❯ yes
INFO  Nothing to migrate.
www-data@ip-10-0-0-31:~/bookstack$ php artisan cache:clear
php artisan config:clear
php artisan view:clear
INFO  Application cache cleared successfully.
INFO  Configuration cache cleared successfully.
INFO  Compiled views cleared successfully.
:~/bookstack$ git status && git log -n 1
On branch release
Your branch is up to date with 'origin/release'.
Untracked files:
(use "git add ..." to include in what will be committed)
.env.bak
public/apiref.html
public/sitemap.xml
nothing added to commit but untracked files present (use "git add" to track)
commit 3f473528b13f59680ee5c8dc600abfd444920f92 (HEAD -> release, tag: v23.08.2, origin/release)
Author: Dan Brown<EMAIL_ADDRESS>Date:   Mon Sep 4 12:06:50 2023 +0100
Updated version and assets for release v23.08.2

:~/bookstack$ ls -alh bootstrap/cache
total 36K
drwxrwxr-x 2 www-data www-data 4.0K Sep 13 19:53 .
drwxr-xr-x 3 www-data www-data 4.0K Sep 13 17:20 ..
-rwxrwxr-x 1 www-data www-data   14 Sep 13 17:20 .gitignore
-rwxrwxr-x 1 www-data www-data 1.6K Sep 13 19:53 packages.php
-rwxrwxr-x 1 www-data www-data  20K Sep 13 19:53 services.php

Okay, and the homepage is still not working? Just asking since, if the original details were a re-run, they indicate the database migrations were not originally performed upon upgrade before.

If still not working, are any other views/pages broken right now?
Does the homepage work if you log in?
Do you have any customizations active (visual/logical theme system)?

home page is still not working. It makes no difference if I login or not. We have the same custom headers that were present in v26. Nothing changed.
We added footer links, configured application home page and have these custom head content items:

Okay. When you originally mentioned:

I have also set the default page to shelves and specific pages with no change in behavior.

Are you saying the other options also show the "Page not found" or do these work.
Also:

Does the default homepage option work without issue?
Does adding CACHE_DRIVER=database fix the issue?

None of the home page settings work as expected. They all go to the same bad page. No dice on the cache.

Okay, really unsure what's going on here.
Let's see if we can call the homepage manually and get more detail on the issue.
Can you run the below from your BookStack install directory then share the output?:
php artisan tinker --execute='$controller = app()->make(\BookStack\App\HomeController::class);try {app()->call([$controller, "index"]);dd("working");} catch (Throwable $e) {dd($e);}'

@ssddanbrown thanks for your help. I'm working here with @2devs1code on this issue.
I tried your first two suggestions.  Setting the homepage to Default or any of the other settings had no effect. I also tried adding CACHE_DRIVER=database and separately with SESSION_DRIVER=database, with restarts after each change, also with no effect.
I tried the tinker line after each of the above .env changes.  In all cases, I got the following error.
www-data@ip-10-0-0-31:~/bookstack$ php artisan tinker --execute='$controller = app()->make(\BookStack\App\HomeController::class);try {app()->call([$controller, "index"]);dd("working");} catch (Throwable $e) {dd($e);}'

In ConfigPaths.php line 393:

  Writing to directory /var/www/.config/psysh is not allowed.

Having search for any issues related to that message, I created the .config directory and the tinker line now yields
www-data@ip-10-0-0-31:~/bookstack$ php artisan tinker --execute='$controller = app()->make(\BookStack\App\HomeController::class);try {app()->call([$controller, "index"]);dd("working");} catch (Throwable $e) {dd($e);}'
"working" // vendor/psy/psysh/src/ExecutionClosure.php(40) : eval()'d code:4

Even so, no change to the homepage error.  Does "code:4" or anything else tell you something.

Having done that, I get "hello" if I go to /index.php but not for /.  That's still the not found page.
I had a Cloudfront config that was sending errors to index.html, which I changed to index.php.  FWIW, I've got caching disabled on everything but /uploads/ which is redirecting from s3.
Here's the conf, I think unedited from installation.
<VirtualHost *:80>
  ServerName docs.analoginfo.com

  ServerAdmin webmaster@localhost
  DocumentRoot /var/www/bookstack/public/

  <Directory /var/www/bookstack/public/>
      Options -Indexes +FollowSymLinks
      AllowOverride None
      Require all granted
      <IfModule mod_rewrite.c>
          <IfModule mod_negotiation.c>
              Options -MultiViews -Indexes
          </IfModule>

          RewriteEngine On

          # Handle Authorization Header
          RewriteCond %{HTTP:Authorization} .
          RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

          # Redirect Trailing Slashes If Not A Folder...
          RewriteCond %{REQUEST_FILENAME} !-d
          RewriteCond %{REQUEST_URI} (.+)/$
          RewriteRule ^ %1 [L,R=301]

          # Handle Front Controller...
          RewriteCond %{REQUEST_FILENAME} !-d
          RewriteCond %{REQUEST_FILENAME} !-f
          RewriteRule ^ index.php [L]
      </IfModule>
  </Directory>

  ErrorLog ${APACHE_LOG_DIR}/error.log
  CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

In the access.log, I'm still seeing some requests for / get issued as /index.html (404) thus the error page.  Since you mentioned it, I've done 2 things to try to correct that. First was adding this line to the above:
          RewriteRule ^ %1 [L,R=301]

          RewriteRule "^/index.html" "/index.php" [L]

          # Handle Front Controller...

And the second was to do effectively the same thing w a cloudfront function.
Still the error page.

Doh, I found it. More in a moment.

The cloudfront top-level distribution config was defaulted to index.html. Just changed it to index.php and reset all the tweaks from above.  Works great... thank you so much!

@2devs1code go ahead and close this one.  Thanks!

thank you @ssddanbrown

Thanks for confirming back the cause, and glad to hear that you found the source of the issue!


PV2-458 increase limits for block sync

Block size in test networks is about 190kB. It violates the limit of 16MB for 128 blocks during sync and clients will disconnect without error message during sync. This PR increases the limits.
base still tbd

Can we close this PR?


Tweak libuv shutdown sequence

Increase timeouts for thread and listener shutdowns
Use PostAsync to observe ObjectDisposedExceptions in the shutdown sequence

Use PostAsync to observe ObjectDisposedExceptions in the shutdown sequence

Do you have any evidence that the ODEs are coming from AllowStop, OnStopRude or OnStopImmediate?

Spoke to @halter73 about this and decided to just remove the unreference from AllowStopRude

{System.ObjectDisposedException: Safe handle has been closed
   at System.Runtime.InteropServices.SafeHandle.DangerousAddRef(Boolean& success)
   at System.StubHelpers.StubHelpers.SafeHandleAddRef(SafeHandle pHandle, Boolean& success)
   at Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions.NativeMethods.uv_unref(UvHandle handle)
   at Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.LibuvFunctions.unref(UvHandle handle)
   at Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvHandle.Unreference()
   at Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvThread.OnStopRude()
   at Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvThread.<>c.<StopAsync>b__39_1(LibuvThread t)
   at Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvThread.CallbackAdapter`1.<>c.<.cctor>b__3_0(Object callback, Object state)
   at Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvThread.DoPostWork()}


[PE-D][Tester A] [User Guide] Table of contents: Editing a Meeting command error

Under the table of contents and under the explanation of the function, the Editing a Meeting command should be "editMeeting" instead of "edit"

Labels: severity.Medium type.DocumentationBug
original: GiselleTan/ped#3

Duplicate of #173


Add tracer to getTransports

Is your feature request related to a problem? Please provide an existing Issue # , or describe.
Fixing the breaking change - https://github.com/opensearch-project/performance-analyzer/issues/555
Resolves - https://github.com/opensearch-project/performance-analyzer/issues/555
Describe the solution you are proposing
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Check List

[ ] New functionality includes testing.

[ ] All tests pass

[ ] New functionality has been documented.

[ ] New functionality has javadoc added

[x] Commits are signed per the DCO using --signoff

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

@khushbr Need you help in reviewing this PR- This is breaking change introduced by telemetry instrumentation changes in the OpenSearch. It needs to go in 2.11 please take a look.


parallel-letter-frequency: Use &str with lifetime, not String

The previous version had a comment that explained a need for copying the
&str into Strings, but this can be avoided.
The disadvantage is now that this function can only be invoked with
&'static str, which means that it can't (for example) accept arbitrary
user input as part of a command-line program. So it works for our style
of testing (all our tests do indeed use &'static str) but is
unrealistic code.

Reviewers should consider the disadvantage carefully before deciding whether to merge. Of course, this is only the example and doesn't affect the test code. On the other hand, it could be better to keep the example code realistic.
In the extreme case, we might even choose to add a test that creates non-'static strings, so that using &'static str is not possible (I do not advocate for this, but y'all can if you like)

I don't like this. Who will look at examples? I guess some people who want to simply "cheat" and those who are stuck and want to peek at a solution. It may look like a function accepting only 'static str is a good solution to these people, while in the real world it is rarely useful nor a good pattern to use.
If we merge this at least put a warning comment before the function... and by doing that we are back to the original problem with the comment explaining things.

@ijanos Do you have more details on why it's not a good pattern? I would like to know more!
From my experience, I use the examples a lot when learning a new language. I usually know how to solve the problem, but I don't know the language's syntax or idioms. So I'll look at the example code to figure out what I need to use. I don't know if that's common, but this use case is one of the reasons we settled on the goal of having our example solutions be, well, exemplary. We want them to use reasonably idiomatic, well-written Rust.

The problem is explained shortly with: It is now impossible for this function to take a &str with non-static lifetime, and this is a very harsh restriction.
I can try to come up with example code soon, but not now.

No intent to merge - better close now to avoid any mistakes. I do still plan to get back to you with a reason why it's not going to get merged.

@IanWhitney Accepting a static string slice basically means accepting only strings available at compile time. Imagine using a library that has a restriction like that, you cannot call it on anything you don't know during compile, like data from a file, data downloaded from somewhere or user input.

Reopening to show Travis. Please do not merge.

The commit https://github.com/exercism/xrust/pull/239/commits/5070848fcb065b5cbb2053f0558af9212f8bac41 should show the restrictiveness of &'static str. I couldn't even pass the result of a format! into frequency.

Oops, type error. Have to make Travis do it again.

The commit https://github.com/exercism/xrust/pull/239/commits/8fe6c5bcb988557cb41fe58970001ef9380ffc93 should show the restrictiveness of &'static str. I couldn't even pass the result of a format! into frequency. You will see that the build fails: https://travis-ci.org/exercism/xrust/builds/189277410

Ok, I think I see what's going on here now. My understanding was that all &str were really &'static str under the hood. That was my understanding from the book.
So, based on that belief, I thought these two lines are identical
pub fn frequency(texts: &[&str], num_workers: usize) -> HashMap<char, usize> {

pub fn frequency(texts: &[&'static str], num_workers: usize) -> HashMap<char, usize> {

But the non-lifetime version is allowing Rust to do some implicit conversion of
let hi = format!("Hello, {}!", "world");
&[&hi]

into something it can think of as a str. Right?
But one you say "I only accept static str" then the compiler can't do the conversion since it can't satisfy the lifetime requirements.
🦆

But the non-lifetime version is allowing Rust to do some implicit conversion of
let hi = format!("Hello, {}!", "world");
&[&hi]

into something it can think of as a str. Right?

format! creates a value of type String. If we take a reference to it, deref coercion allows it to be used wherever a &str is required, because String implements Deref

But one you say "I only accept static str" then the compiler can't do the conversion since it can't satisfy the lifetime requirements.

My understanding. Please correct.

the non-lifetime version

The version without lifetime annotations follows the rules of lifetime elision which should mean that it is equivalent to:
pub fn frequency<'a, 'b>(texts: &'a [&'b str], num_workers: usize) -> HashMap<char, usize>

The only requirement on texts is that frequency may not outlive the slice nor the strings contained within it. Put another way, the minimum lifetime of the slice and strings is the scope of frequency. This requirement is the standard rule for borrowing.
At this point, let's see why we have to do parts[i].push(line.to_string()) instead of just parts[i].push(line). We have to examine the type of thread::spawn(https://doc.rust-lang.org/std/thread/fn.spawn.html) - its argument (normally a closure, but anything implementing FnOnce) must at least have 'static` lifetime (as long as the program). This is because the threads can outlive their spawner.
The strings in texts are not guaranteed to have 'static lifetime. The only constraint imposed on them is that they must live as long as frequency. Since they are not guaranteed to have 'static lifetime, they cannot be closed over by the closure.
Aside: If we wanted to have the type system prove that the threads terminate before their spawner, that seems a bit tricky! But it's been done! I have not investigated this create to see what it is doing.

What happens in this PR? If I understand lifetime elision properly, what I wrote should be equivalent to:
pub fn frequency<'a>(texts: &'a [&'static str], num_workers: usize) -> HashMap<char, usize>

For the texts slice, the slice is still required to only live for as long as frequency does. But now the strings are required to live for lifetime &'static, as long as the program. So, because frequency now imposes this requirement on its callers, frequency is now at liberty to allow closures to close over the strings in texts. But imposing the requirement on the callers leads to unrealistic code, and would not make a good example for our students. As I showed, you can no longer take references of arbitrary Strings, such as those created by fmt! or any other function, because those Strings do not live for &'static time.

But the non-lifetime version is allowing Rust to do some implicit conversion of
let hi = format!("Hello, {}!", "world");
&[&hi]

into something it can think of as a str. Right?

format! creates a value of type String. If we take a reference to it, deref coercion allows it to be used wherever a &str is required, because String implements Deref

But one you say "I only accept static str" then the compiler can't do the conversion since it can't satisfy the lifetime requirements.

My understanding. Please correct.

the non-lifetime version

The version without lifetime annotations follows the rules of lifetime elision which should mean that it is equivalent to:
pub fn frequency<'a, 'b>(texts: &'a [&'b str], num_workers: usize) -> HashMap<char, usize>

The only requirement on texts is that frequency may not outlive the slice nor the strings contained within it. Put another way, the minimum lifetime of the slice and strings is the scope of frequency. This requirement is the standard rule for borrowing.
At this point, let's see why we have to do parts[i].push(line.to_string()) instead of just parts[i].push(line). We have to examine the type of thread::spawn - its argument (normally a closure, but anything implementing FnOnce) must at least have 'static lifetime (as long as the program). This is because the threads can outlive their spawner.
The strings in texts are not guaranteed to have 'static lifetime. The only constraint imposed on them is that they must live as long as frequency. Since they are not guaranteed to have 'static lifetime, they cannot be closed over by the closure passed to thread::spawn.
Aside: If we wanted to have the type system prove that the threads terminate before their spawner, that seems a bit tricky! But it's been done! I have not investigated this crate to see what it is doing.

What happens in this PR? If I understand lifetime elision properly, what I wrote should be equivalent to:
pub fn frequency<'a>(texts: &'a [&'static str], num_workers: usize) -> HashMap<char, usize>

For the texts slice, the slice is still required to only live for as long as frequency does. But now the strings are required to live for lifetime &'static, as long as the program. So, because frequency now imposes this requirement on its callers, frequency is now at liberty to allow closures passed to thread::spawn to close over the strings in texts.
But imposing the requirement on the callers leads to unrealistic code, and would not make a good example for our students. As I showed, references of arbitrary Strings (such as those created by fmt! or any other function) are no longer acceptable as arguments of frequency, because those Strings do not live for &'static time.

EBWODP: Clarified that

But one you say "I only accept static str" then the compiler can't do the conversion since it can't satisfy the lifetime requirements.

is I believe a reasonable summary (previous text was unclear on whether it is)

One piece of the picture I realized isn't clear:
So why is it that we can allow the closure passed to thread::spawn to close over part? I believe the answer is:
parts is Vec<Vec<String>> - everything there is owned. Inside the for loop, using the move keyword, we move ownership of part into the closure, so the closure owns a Vec<String>. Since it's owned by the closure, it satisfies the requirement of &'static lifetime.

EBWODP: No, it's because a Vec<String> contains no references. The closure can close over Vec<String>, but not over Vec<&str>.


UI/UX Markdown Quick Start doc

Allow creating a markdown file to describe instructions for creating web apps which maybe are rendered instead of the default index.html file.

Depends on #238 for backend bits.
My idea here is that we introduce conventions around having a markdown file in a multi-file project, and if present, render it along with the preview.  For example, imagine if README.md, INSTRUCTIONS.md, LEARN.md, etc were names that triggered the editor to do something different on start-up.  Normally we look for an index.html file to render in the preview.  However, we could also choose to show a markdown file if present, and/or provide a switchable preview view (maybe tabs?) that let you jump between the preview HTML and the markdown.
This would let us easily support having instructions/tutorials written in markdown inside a project.

This is part of what we're discussing for tutorials in MVP, cc @flukeout.

I've basically got this working in #392 for a tutorial.html file.  It's unclear whether or not we want to support Markdown or not, based on conversations with Hannah and Luke.  I might rip the MD stuff out.

This is landed.


Add bindings for the serialization of SKPicture

Description of Change
Add bindings for the serialization of SKPicture.
Bugs Fixed

Fixes #880

API Changes
class SKPicture {
    public SKData Serialize ();
    public void Serialize (Stream stream);
    public void Serialize (SKWStream stream);

    public static SKPicture Deserialize (IntPtr data, int length);
    public static SKPicture Deserialize (ReadOnlySpan<byte> data);
    public static SKPicture Deserialize (SKData data);
    public static SKPicture Deserialize (Stream stream);
    public static SKPicture Deserialize (SKStream stream);
}

Behavioral Changes
New APIs that do not change behaviour of existing functionality.
PR Checklist

[ ] Has tests (if omitted, state reason in description)
[ ] Rebased on top of master at time of PR
[ ] Changes adhere to coding standard
[ ] Updated documentation

@mattleibow Tested  public void Serialize (Stream stream); with my app and works as expected.

I have found one interesting tidbit that DrawLine is actually converted to DrawPoints.


Doesn't respond to Read Reporting Configuration Request

Can the firmware respond to these with the current reporting configuration?
At the moment they seem to be ignored, even though they are Acked at the APS layer.

The firmware does not support this command.

Does it not allow configuration of Attribute reporting?
It seems to reply with "success" message when setting:

The natural follow up to that is to send a Read Reporting Configuration Request in order to repeat back the configuration and make sure that it matches what was sent.


document backend architecture

Should answers questions like:
- Both `entity` and `dto` exists as file and directory in the `model` package.
  Shouldn't they both be a regular package of their own?
- Both `entity` and `dto` split each struct and it's function implementations across two files.
  Wouldn't it make more sense to put struct and functions together into one file for each?
- Why is `dto` part of the service layer?
  As this is the way we represent data in the api it fits better as subpackage of `controller`.
- Intersection of layers.
  The service layer should be the one acting between controllers and database.
  Why do controllers get the database connection pool as argument when this would better fit the service layer?
  Why does the database layer handle mapping from entity to dto when this should belong in the service layer?

One thing we might want to consider is using traits instead of implementing e.g. entities themselves. So e.g. we could have a trait
trait Database {
    type T;
    fn find() -> Vec<Self::T>;
    fn find_by_id(id: i32) -> Self::T;
    fn create(element: Self::T) -> Self::T;
    fn delete(id: i32) -> Self::T;
}
impl Database for Plants {
    type T = Self;

    fn find() -> Vec<Self::T> {
        todo!()
    }

    fn find_by_id(id: i32) -> Self::T {
        todo!()
    }

    fn create(element: Self::T) -> Self::T {
        todo!()
    }

    fn delete(id: i32) -> Self::T {
        todo!()
    }
}

although that will require a lot of thinking (as we need async traits which is a separate library, we need to make the Database trait work for all different variants )

Both entity and dto exists as file and directory in the model package.
Shouldn't they both be a regular package of their own?

This is how you handle modules in Rust. You can either have a file called e.g. entity.rs and a directory entity/ or you can have no such file, but then you are required to put a mod.rs inside the entity/ directory.

Both entity and dto split each struct and it's function implementations across two files.
Wouldn't it make more sense to put struct and functions together into one file for each?

In the beginning I put them like this. This is because of the explanation in point 1. Although you don't have to do it like this. Most libraries put struct and impl in one file. I don't have a strong preference so whatever you prefer is fine.

Why is dto part of the service layer?
As this is the way we represent data in the api it fits better as subpackage of controller.

DTO is part of the model module. Generally DTOs should be allowed to 'live' in both controller and service layer (at least they taught us that in SEPM). Therefore I would leave it in model together with entity as those represent the data we act upon.
Also I don't quite understand why you mean DTO is part of the service layer. There folder service/ represents the service layer and DTOs are not in there.

Intersection of layers.
The service layer should be the one acting between controllers and database.
Why do controllers get the database connection pool as argument when this would better fit the service layer?

This is how actix does it. We are not actually putting the pool there, but rather actix 'provides' the data. There is no other way of doing this apart from making a global pool and ignoring the way actix wants us to do 'data management' (or however you want to call it)

Why does the database layer handle mapping from entity to dto when this should belong in the service layer?

I agree this should be moved to either controller or service layer.

@markus2330 I wrote it in here for now. After discussion we can put the relevant parts in the documentation.

although that will require a lot of thinking

Better keep it simple.

After discussion we can put the relevant parts in the documentation.

I don't know what you want to discuss here. Please create a PR with a proper description of how our architecture is (or should be if there are currently troubles, please create issues for such problems), as already asked of you several times and as written in your individual tasks.


Crashes on launch on Apple Silicon

When I got my shiny new MacMini with the M1 chip, migration assistant transferred my entire homebrew installation from my Intel mac. Somewhat surprisingly, it almost all "just worked" under Rosetta. The only exception I have found so far is shell2http.
Workaround: Build a native M1 version of go according to the instructions here.
Then in this directory, do:
make build
codesign -s - ./shell2http

Voila!

Thanks for the advice, but all binaries are builded on CI (TravisCI) under Linux. I'll investigate how to sign under linux (and build for M1).
Perhaps a signature is required for Big Sur and for intel too, can someone check it?

I'm pretty sure codesigning is not required for intel. After all, I was able to run almost my entire homebrew suite after copying it over from an intel machine with no extra signing or modification needed. Including large apps like emacs and postgresql, they all work with more than adequate performance under Rosetta.
The problem is something to do with go running under Rosetta. Perhaps this issue is relevant.

@chetstone could you please to check the latest release - https://github.com/msoap/shell2http/releases/tag/v1.14.1
I've migrated to the Github Actions and goreleaser for build and now distribution for Apple Silicon placed in shell2http_1.14.1_darwin_arm64.tar.gz file

Sorry about the delay.. I had moved my use of shell2http to another machine, but I just installed 1.14.1 via homebrew on my M1 machine and it works fine.Thanks!via Newton MailOn Sat, Nov 13, 2021 at 8:53, Sergey Mudrik @.***> wrote:
Closed #66.
—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.
[
{
@.": "http://schema.org",
@.": "EmailMessage",
"potentialAction": {
@.": "ViewAction",
"target": "https://github.com/msoap/shell2http/issues/66#event-5613278360",
"url": "https://github.com/msoap/shell2http/issues/66#event-5613278360",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
@.": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]

@chetstone thanks for feedback.


RuntimeError: Working outside of application context.

Expected Behavior

Flask-apscheduler gets the loaded redis configuration information from Flask create_app

Actual Behavior

RuntimeError: Working outside of application context

Minimum example

git@github.com:zxiaozhou/example.git

Environment

Python version: 3.6
Flask version:1.1.2
Werkzeug version:pycharm 2020.1

Part of the network problem has not been submitted. I want to save it first and then modify it.
So before I could finish, I was locked up, and the management desk got excited

You are doing things wrong. Don't push app contexts randomly, especially not at import time.
In any case, this is not a flask issue so either ask in a place related to flask-apscheduler or in our Discord/IRC channels.

@ThiefMaster But I've deleted 'app.app_context().push()' as well。

The main idea is to uniformly read the configuration information in memory from flask everywhere. But something went wrong
发自我的iPhone

在 2020年4月23日，18:24，Adrian<EMAIL_ADDRESS>写道：

Closed #3585.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

If you have to access the app or flask config at import time you are doing something wrong. The only case where this is OK is while instantiating your app. There is no need to change anything on the flask side.