Post big complex JSON along with images

Hi! I need to post to server a complex json and images.
That's how I post photos, and it works good.
RequestParams params = new RequestParams();
params.put("photo[0]", photoFiles.get(0));
params.put("photo[1]", photoFiles.get(1));

asyncHttpClient.post(url, params, responseHandler)

Now about JSON. I know that it's possible to add json as string to requestParams, like this:
params.put("json", jsonObject.toString());

But from here http://stackoverflow.com/a/13901661/3165400  it looks like the right way to post json is something like that:
StringEntity entity = new StringEntity(jsonParams.toString());
client.post(context, restApiUrl, entity, "application/json", responseHandler);

I didn't try it, because of:

There's no realization of post() method, witch can handle RequestParams and Entity both. (I add photo files to requestParams)
It seems like StringEntity is depricated (but maybe I just imported class from wrong library org.apache.http.entity from android.jar)

I also looked on JsonStreamerSample
params.setUseJsonStreamer(true);
Iterator keys = jsonObject.keys();
while (keys.hasNext()) {
     String key = (String) keys.next();
     params.put(key, jsonObject.get(key).toString());
}

How it looks to me, it's just post many parameters instead of post json. Maybe I wrong.  I have some questions about that approach:

Is that better than params.put("json", json.toString). And if answer is "yes", why?
Should it work along with params.put("photo[1]", photoFiles.get(1)) ?

Also, I have deal with complex JSON, smth like that: {"works":[ many objects here with many fields each, and inner array, with many objects again, and array again, and even deeper ], "planes":[and here the same], "events":[and here too]}
I mean, it's gonna be a lot of hassle to transform such a JSON to parameters using this approach.
It would be great, if we have smth simple like params.put("json", jsonObject);   ;)
So I need some advice, what's the best way to post complex json data along with images?
Thanks.

What I really want is add multipart body to http request. Some parts are files. And one part is string (json).   Something like this:
/
User-Agent: curl/7.21.2 (x86_64-apple-darwin)
Host: localhost:8080
Accept: */*
Content-Length: 1143
Expect: 100-continue
Content-Type: multipart/form-data; boundary=----------------------------83ff53821b7c

------------------------------83ff53821b7c
Content-Disposition: form-data; name="img"; filename="a.png"
Content-Type: application/octet-stream

?PNG

IHD?wS??iCCPICC Profilex?T?kA?6n??Zk?x?"IY?hE?6?bk
Y?<ߡ)??????9Nyx?+=?Y"|@5-?M?S?%?@?H8??qR>?׋??inf???O?????b??N?????~N??>?!?
??V?J?p?8?da?sZHO?Ln?}&???wVQ?y?g????E??0
 ??
   IDAc????????-IEND?B`?
------------------------------83ff53821b7c
Content-Disposition: form-data; name="foo"

bar
------------------------------83ff53821b7c--

Is that possible?

Well,  that works right, string places as payload in body
RequestParams params = new RequestParams();
params.put("photo[0]", photoFiles.get(0));
params.put("photo[1]", photoFiles.get(1));
params.put("json", jsonObject.toString());
client.post(url, params, responseHandler);


HList-<IP_ADDRESS>: doctests failing

Test suite doctests: RUNNING...
### Failure in Data/HList/Record.hs:1145: expression `:t circSucc_'
expected: circSucc_ :: (Eq a, Enum a, Bounded a) => a -> a
 but got: circSucc_ :: (Bounded a, Enum a, Eq a) => a -> a
### Failure in Data/HList/HList.hs:643: expression `hConcat $ hBuild a b'
expected: H[1, 2, 3, 'a', "abc"]
 but got: H[1,2,3,'a',"abc"]
Examples: 308  Tried: 302  Errors: 0  Failures: 2
doctests: readCreateProcess: doctest "-i." "-idist/build/autogen" "-optP-include" "-optPdist/build/autogen/cabal_macros.h" "-Idist/build/autogen" "-w" "Data/HList/CommonMain.hs" "Data/HList/HList.hs" "Data/HList/Record.hs" "Data/HList/Labelable.hs" "Data/HList/HSort.hs" "-XAllowAmbiguousTypes" "-XConstraintKinds" "-XDataKinds" "-XDeriveDataTypeable" "-XExplicitForAll" "-XExplicitNamespaces" "-XFlexibleContexts" "-XFlexibleInstances" "-XFunctionalDependencies" "-XGADTSyntax" "-XGADTs" "-XGeneralizedNewtypeDeriving" "-XKindSignatures" "-XMonoLocalBinds" "-XMultiParamTypeClasses" "-XPatternSignatures" "-XPolyKinds" "-XPolymorphicComponents" "-XRank2Types" "-XRankNTypes" "-XRoleAnnotations" "-XScopedTypeVariables" "-XStandaloneDeriving" "-XTypeFamilies" "-XTypeOperators" "-XTypeSynonymInstances" "-XUndecidableInstances" (exit 1): failed
Test suite doctests: FAIL

cc Adam Vogt<EMAIL_ADDRESS>

Test is already disabled so this is not blocking anything. Closing.


Request: SVG and PNG logos?

I wanted to have a logo for my go2rtc link on my dashboard. Do you have an SVG and PNG that I could submit to https://github.com/walkxcode/dashboard-icons? The PNG should be 512px in height.

There is no designer on the project right now. I'll see what I can do

Done


Adaptive learning: Extend learning path feature to recommend sequence of lecture units and exercises

⚠ Stacked on #7091  please don't merge accidentally

Checklist
General

[x] I tested all changes and their related features with all corresponding user types on a test server.
[x] This is a small issue that I tested locally and was confirmed by another developer on a test server.
[x] Language: I followed the guidelines for inclusive, diversity-sensitive, and appreciative language.
[x] I chose a title conforming to the naming conventions for pull requests.

Server

[x] Important: I implemented the changes with a very good performance and prevented too many (unnecessary) database calls.
[x] I followed the coding and design guidelines.
[x] I added multiple integration tests (Spring) related to the features (with a high test coverage).
[x] I added pre-authorization annotations according to the guidelines and checked the course groups for all new REST Calls (security).
[x] I documented the Java code using JavaDoc style.

Motivation and Context

We want to provide a sequential order of lecture units and exercises for students participating via the learning paths feature.
Description

This PR adds the second half for generating this sequential order by recommending an order of learning objects within the competencies.
The LearningPathService is now split into the LearningPathService that should be used by other components and the sub-services LearningPathRecommendationService and LearningPathNgxSercive that handle the corresponding sub-tasks.
In addition to recommending an order of competencies, the recommendation now includes a suggested order of the learning objects (lecture units and exercises). The recommender will select exercises by difficulty level according to the prior performance of the student and also recommend repetitions of already completed exercises if the achieved score is comparably low.
Steps for Testing

Prerequisites:

1 Instructor
1 Student
1 Course with at least one competency and learning paths enabled
exercises and lecture units for each type linked to competency

Log in to Artemis as Student
Navigate to the Learning Path participation view in the course
Make sure the visualized graph on the left side of your screen is displayed as expected (no mastered competencies displayed, the competencies are ordered sequentially/a chain from top to bottom excluding the nodes for the learning objects, and the recommended lecture units/exercises are a linear chain between the competency start and end nodes)

Review Progress

Performance Review

[x] I (as a reviewer) confirm that the client changes (in particular related to REST calls and UI responsiveness) are implemented with a very good performance
[x] I (as a reviewer) confirm that the server changes (in particular related to database calls) are implemented with a very good performance

Code Review

[x] Code Review 1
[x] Code Review 2

Manual Tests

[x] Test 1
[x] Test 2

Test Coverage

Server

Class/File
Line Coverage
Confirmation (assert/expect)

CompetencyProgressService.java
91%
✅

CourseService.java
89%
✅

ExerciseService.java
96%
✅

LearningObjectService.java
89%
✅

ParticipantScoreService.java
96%
✅

LearningPathNgxService.java
97%
✅

LearningPathRecommendationService.java
98%
✅

LearningPathService.java
98%
✅

CompetencyResource.java
97%
✅

CourseResource.java
94%
✅

LearningPathResource.java
91%
✅

�
Screenshots

As this PR doesn't change the UI there are no screenshots of shiny new components, just a comparison between the old graph received from the server (in participation view) and the new one:
Previously:

Now (excludes completed exercises and displays linear path):

@florian-glombik thank you for your review 👍

the continue button was always disabled (not quite sure if the up down arrow solution is in another PR)

the continue button & sidebar is reworked and fixed in #7235

I did not understand how to delete and modify competency relations

this is unrelated to this PR, but you can click on the respective edge and delete it that way.

Deleting a competency that is linked via relation did not work (400 as response)

do you know if this is also the case on develop? I'll take a look at it but this is an unrelated issue.


[Sugestion] Statically Linked Binaries

Hi! I am the creator of BigDl, and it is also written in Go, I thought it'd be beneficial for Copacabana to use existing repos, my binary manager uses Toolpacks as its main repo, and my repo of shellscripts too, Toolpacks gets updated every 2 days, every binary is rebuilt in a Github Action and Metadata for the binaries gets generated at the same time too, so you can actually even implement an update mechanism and keep track of things. (bigdl does that already).
Please have a look and tell me what you think, it the first serious Go project I've written and so things aren't really done in the best possible way...
https://github.com/xplshn/bigdl
https://github.com/Azathothas/Toolpacks
https://github.com/Azathothas/Static-Binaries
All binaries are statically linked

It seems like you have read my mind.
I'm thinking about changing this project name and start working on it again. I've been to busy with college and other projects for Copacabana (such as Heirloom itself).
I will take a look, I think it will work fairly well until this project gets done.
The idea here is to have a fail-proof package manager, based on the SVR4 model, but this project really looks promising as a "homebrew" way to get extra programs that we may do not package.

By the way, it would be a blessing if I could move this to the Copacabana repository.

By the way, it would be a blessing if I could move this to the Copacabana repository.

That'd be fine with me
In any case, bigdl can be relicensed to 3BSD if it suits you better, and I think you could simply convert each .go file into its own program, bigdl is really flexible, I have a version of it that is a single .go file too, and only one external lib is used (progressbar, and a faster json lib is optional, in the fast branch), I'd also suggest using https://github.com/u-root/gobusybox in case you do separate each functionality into a separate program, so that you can use a symlink and have it be lighter and faster...
I really hope to see a good Linux distro that isn't just a coat of paint over a few programs and a broken set of patches over SUSV4 programs. I thought CobaltBSD looked promising but development came to a halt it seems.

I think you could simply convert each .go file into its own program

This package manager is meant to be made exactly this way, since there will be separate programs for separate functions. It differs from bigdl in the sense that it doesn't do anything apart from installing, creating and removing packages like it's in the specification from February 2000.
Knowing about bigdl is very helpful right now because I know this won't be completely done until August, so another way of installing packages cosily would be great.

The fact that it can download into $HOME is a killer feature to me.

The fact that it can download into $HOME is a killer feature to me.

The $BIGDL_CACHE var and $INSTALL_DIR can be pointed to any place, I think run is great for scripts too, so you can keep the system very lightweight. Anyways, if you do end up using it, please tell me what you think, and in case you make patches, make a PR :)

Anyways, if you do end up using it, please tell me what you think, and in case you make patches, make a PR

I will get this packaged for Copacabana in the next release, it is really helpful.
My real preoccupation for now is making the system itself. I already did once, but it was with GCC and the process was manual enough to produce an enormous "paper" about cross-compiling Linux, and I wish I could make this more automatic and this will probably take some time before I can work on the package part itself. I probably need to refactor Copacabana's build system since its getting too complex in comparison to something made using pure Makefiles.

Have you checked out Sabotage Linux's build and bootstrap scripts? They are a good resource, and their build scripts for some packages too, I also love their netbsd-curses and other drop-in replacements for GNU things

Have you checked out Sabotage Linux's build and bootstrap scripts? They are a good resource, and their build scripts for some packages too, I also love their netbsd-curses and other drop-in replacements for GNU things

I didn't remembered about it.
I will take a look tomorrow (here is about 1:57 A.M.) after I finish some college affairs and then study these.
Thanks, I appreciate it.

Have a good evening hermano, wish you luck


removed "Pss/" from the title of the branch so that Jenkins doesn't have problems with it

removed "Pss/" from the title of the branch so that Jenkins doesn't have problems with it. Not sure if this solves the merge problems?

removed "Pss/" from the title of the branch so that CI Jenkins pipeline doesn't have problems with it. Not sure if this solves the merge problems @mereolog?

Indeed, it does.


Checkbox tree not rendering

RN version : 0.67.2
The issue happens in Android. Nor checked IOS yet.
The tree is not rendered, only something like a small symbol coming up as shown below in the pic.
The code I used is exactly same as given in the example here https://github.com/hoaphantn7604/react-native-checkbox-tree

just closing this, for now, will create a new issue with details after going through the code.
It would be great if we can improve the documentation

Can you give me the source code you have successfully run? i had the same problem, thanks

@abidhkm  Can you give me the source code you have successfully run? i had the same problem, thanks

Hi,
Sorry I updated this package but not updated the documentation yet.
I will update the document.


change note colors

Changed colors to be nicer and did some file reorganization.
Resolves #30.

Right on.


uproxy-lib/tools/taskmanager

I am trying to build uproxy by running grunt. the error message that I got was:
Loading "Gruntfile.coffee" tasks...
Cannot find module 'uproxy-lib/tools/taskmanager'
how to fix this error. thanks.

Do you see the folder node_modules/uproxy-lib which should be created by that command?

yes. I do see node_modules/uproxy-lib/tools but taskmanager is not there. there is only one file in the folder docker-entrypoint.sh. should I install uproxy-lib using shell. how to do it using the git shell.
./setup.sh install

Looks like npm install screwed up (this isn't surprising).  Perhaps rm -rf node_modules and then npm install again?

uproxy's package.json file says to pull in uproxy-lib version 19. Version 19 doesn't have a ./setup.sh file. Maybe you accidentally installed the wrong version manually of uproxy-lib?
If things get confused; you should be able to clean your build directory by rm -r node_modules && npm install && grunt clean

is there a specific name to the folder from which the following is run.
npm install
bower install
grunt

I'd call that the root folder of the github repository. e.g. the root folder of the uproxy repository is where you run these commands from. Maybe we need to clarify this in our README?

Hi @biebergagabcbs,
Did you have any luck getting setup?

Closing, @biebergagabcbs please re-open if you want to discuss further.


master branch README gives instructions on v1 installation

I learned about dlite, landed on the README, clicked through to the "latest and greatest", copy-pasted brew install dlite and tried it out.
It took me a while to figure out that the issues I was seeing--but that were fixed according to the tracker--were due to being on 1.1.5.
The master README should explain how to install 2.0.0.

yeah we should probably update that..


Slice the result of read and readSync to avoid mutating internal state.

See: https://github.com/shiffman/Tensorflow-JS-Examples/issues/7
This avoid users dataSyncing and mutating internal state. Slice is shallow so is very cheap. I ran the benchmarks to make sure, there is no change.
I also updated the benchmarks script to use 1.0 code and hit TF Hub.

This change is

Everything's broken in CPU backend, lots of assumptions about mutating internal state. Working on the fix.

Okay, fixed. Ready for review.

Also this doesn't slice the call into backend.write -- what do you think about that?

Dropping this change since it has performance impacts. Slice is shallow but not cheap.


SQLView: empty SQL result returns error in HTML output

Describe the bug
An empty SQL result (no rows selected) returns error in HTML output
To Reproduce
Steps to reproduce the behavior:

Go to '...'
Click on '....'
Scroll down to '....'
See error

Expected behavior
empty HTML
Screenshots

TypeError: Cannot read properties of undefined (reading 'f_busy')
at eval (eval at template (/home/saltcorn/.local/lib/node_modules/@saltcorn/cli/node_modules/underscore/underscore-node-f-pre.js:917:14), :6:16)
at template (/home/saltcorn/.local/lib/node_modules/@saltcorn/cli/node_modules/underscore/underscore-node-f-pre.js:924:19)
at Object.run (/home/saltcorn/plugin_packages/@saltcorn/sql/index.js:120:16)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at View.run (/home/saltcorn/.local/lib/node_modules/@saltcorn/cli/node_modules/@saltcorn/data/models/view.ts:457:14)
at View.run_possibly_on_page (/home/saltcorn/.local/lib/node_modules/@saltcorn/cli/node_modules/@saltcorn/data/models/view.ts:552:18)
at /home/saltcorn/.local/lib/node_modules/@saltcorn/cli/node_modules/@saltcorn/server/routes/view.js:73:23
Additional context
Add any other context about the problem here.

When the result set is not empty, everything works fine.

duplicate of https://github.com/saltcorn/sql/issues/2


Port Group O test to pytest ref #3945

Refactor Group O mentioned in #3945

test_random_invert
test_random_posterize
test_random_solarize
test_random_adjust_sharpness
test_random_autocontrast
test_random_equalize

Please let me know if I need to change anything.

+30 −70

Nice!
Thanks a lot @ShrillShrestha !

@NicolasHug, thanks for guiding me. :)


[Image] pointerEvents prop for Image component?

There are a variety of use cases where being able to specify pointerEvents on an image would solve zIndex / overlap / touch event complexities. Please see https://github.com/lelandrichardson/react-native-maps/issues/562#issuecomment-246076794 as an example.
It appears that wrapping the Image component in a
<View
  pointerEvents="none"
/>

doesn't seem to do the trick either.

Why wouldn't having  <View pointerEvents="none"><Image/></View> not solve the issue? That should make the entire view untouchable. Even without it, a view itself does not have a touch interaction of its own, so a view like <View><Image/></View> should not need any pointer events as far as I understand. Can you share the code example that doesn't work?
zIndex docs are here https://facebook.github.io/react-native/docs/layout-props.html#zindex . I'm not sure how pointerEvents relate to zIndex though.


Fixed \yiiunit\framework\helpers\JsonTest::testEncode() for PHP 5.4

'\Generator' is only supported since PHP 5.5

Q
A

Is bugfix?
✔

New feature?
❌

Breaks BC?
❌

Fixed issues
Fixed unit test for #19777, #19796

👍🏻


Use string for usb device description.

Because usb descriptions can be way more complex than was expected, we are changing it to be the entire string instead of trying to interpret its parts to populate fields of a struct.
Fix #20.

@joaoantoniocardoso please apply the fixup.

@patrickelectric done.


Enable Clad in xeus-clang-repl

Clad integrates with xeus-cling automagically. However, if we try the same approach it integrates but it fails to start as we pick up the conda build of clad that's compatible with clang5 (on which is still based xeus-cling).
We need to find out how to tell conda to install clad built with clang15 on which is currently based xeus-clang-repl.

Handled in conda-forge/clad-feedstock#11

That has landed, we need to see if we can downgrade xeus-clang-repl to work with llvm14 as clad v1.0 does not yet support llvm15.

What blocks clad from supporting llvm15? (This is all developmental so going backwards seems like extra work in general...)

On Nov 4, 2022, at 11:14 AM, Vassil Vassilev @.***> wrote:
That has landed, we need to see if we can downgrade xeus-clang-repl to work with llvm14 as clad v1.0 does not yet support llvm15.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.

We need another release of clad while for xeus-clang-repl we likely need to change a single number from 15 to 14.


SMTP checks should run against all MX found only if there is a error.

SMTP checks are currently incorrectly run against all MX servers found while it should stop on the first successful RCPT TO. It should try the next MX only if the current MX failed with temporary error (connection timeout or refused, 4xx error). If the current MX returned 5xx error for any command (not only RCPT TO) then other MXs should not be attempted and validation should fail.

Alexey, thanks for your deep analyzing of Truemail. SMTP check stops if RCPT TO has been successful or fails, otherwise Truemail checks next mx. This behavior for cases when remote SMTP server has closed connection without QUIT command from client. Check your gem version. This feature has been implemented in the last two versions.


Add win 32 codes

https://infosys.beckhoff.com/english.php?content=../content/1033/devicemanager/391166347.html&id=

closed with #3


[SR-14355] Wrongly generated swiftinterface

Previous ID
SR-14355

Radar
rdar://problem/75451691

Original Reporter
kolya-j (JIRA User)

Type
Bug

Environment
swift 5.3 and 5.4
xcode 12.4 and 12.5

Additional Detail from JIRA

Votes
0

Component/s
Compiler

Labels
Bug

Assignee
@tshortli

Priority
Medium

md5: fa046b49f2808701c4be1b39791167c9

Issue Description:
If literal value are string - they are emitted to swiftinterface file
public enum Special: Unicode.Scalar {
    case tab = "\u{0009}"
}

In swiftinterface it will looks like this:
public enum Special : Swift.Unicode.Scalar {
  case tab
}

And during compilation we getting a error:
"error: enum cases require explicit raw values when the raw type is not expressible by integer or string literal"
Best guess here is that swift see that literal are string and do not translate them to swiftinterface, without checking, that enum raw value is not a string

Closing this as resolved with https://github.com/apple/swift/pull/41009


Version Packages

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
<EMAIL_ADDRESS>Patch Changes

#5249 5315602 Thanks @CarmenPopoviciu! - test: add vitest-pool-workers package and example tests to hello-world templates

<EMAIL_ADDRESS>Patch Changes

Updated dependencies [a0768bc]:

<EMAIL_ADDRESS>

<EMAIL_ADDRESS>Patch Changes

#5238 a0768bc Thanks @RamIdeas! - fix: versions upload annotations (--message and/or --tag) are now applied correctly to the uploaded Worker Version

I added an issue to track the missing tests from the Gradual Rollouts feature addition: https://github.com/cloudflare/workers-sdk/issues/5254


How to enable bluetooth in OMV image?

I'm trying to get BT running in OMV image 0.9.x, unfortunately I can't get a hciX device. Running dmesg command I see:
[    1.484780] Bluetooth: Core ver 2.21
[    1.484843] Bluetooth: HCI device and connection manager initialized
[    1.484868] Bluetooth: HCI socket layer initialized
[    1.484891] Bluetooth: L2CAP socket layer initialized
[    1.484931] Bluetooth: SCO socket layer initialized
[    2.869635] Bluetooth: Virtual HCI driver ver 1.5
[    2.870196] Bluetooth: HCI UART driver ver 2.3
[    2.870621] Bluetooth: HCI UART protocol H4 registered
[    2.871088] Bluetooth: HCI UART protocol LL registered
[    2.871553] Bluetooth: HCI UART protocol ATH3K registered
[    3.005576] Bluetooth: RFCOMM socket layer initialized
[    3.006117] Bluetooth: RFCOMM ver 1.11
[    3.006513] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    3.007069] Bluetooth: HIDP socket layer initialized
[    3.014613] [BT_RFKILL]: Enter rfkill_rk_init
[    3.015732] of_get_named_gpiod_flags: parsed 'uart_rts_gpios' property of node '/wireless-bluetooth[0]' - status (0)
[    3.015742] [BT_RFKILL]: bluetooth_platdata_parse_dt: get property: uart_rts_gpios = 83.
[    3.016501] of_get_named_gpiod_flags: can't parse 'BT,power_gpio' property of node '/wireless-bluetooth[0]'
[    3.016536] of_get_named_gpiod_flags: parsed 'BT,reset_gpio' property of node '/wireless-bluetooth[0]' - status (0)
[    3.016545] [BT_RFKILL]: bluetooth_platdata_parse_dt: get property: BT,reset_gpio = 9.
[    3.017307] of_get_named_gpiod_flags: parsed 'BT,wake_gpio' property of node '/wireless-bluetooth[0]' - status (0)
[    3.017315] [BT_RFKILL]: bluetooth_platdata_parse_dt: get property: BT,wake_gpio = 91.
[    3.018077] of_get_named_gpiod_flags: parsed 'BT,wake_host_irq' property of node '/wireless-bluetooth[0]' - status (0)
[    3.018085] [BT_RFKILL]: bluetooth_platdata_parse_dt: get property: BT,wake_host_irq = 4.
[    3.019189] [BT_RFKILL]: Request irq for bt wakeup host
[    3.019741] [BT_RFKILL]: ** disable irq
[    3.020277] [BT_RFKILL]: bt_default device registered.
The output from 'rfkill list all':
0: bt_default: Bluetooth
Soft blocked: no
Hard blocked: no
Curiously this last command doesn't list WIFI interface, which reports similar issues in dmesg output like bluetooth. Investigating a bit I saw some old threads that pointed bt was disabled to get PCIE working, but not sure if this is the case anymore. How could bluetooth get enabled?.

Can you post more details what board do you use, what module do you use, etc?

Excuse me ayufan I just discovered it was my mistake reviewing the specs of my board, Rockpro64. I wrongly understood that it includes BT/WIFI modules, but taking a quick look to manufacturer page it seems it's an external module sold separately.


Prevent both author and authors in pubspec.yaml

#1338

The nearby code sometimes throws a string, sometimes throws an exception. Is this string presented to the user? How about making a particular kind of exception type for pubspec errors that can be presented to the user, and not presenting the user with any other exception details?

The thrown object's .toString() is presented to the user, while the exception details go to the logs. I have no idea if a separate exception type would be beneficial, but it can be done.
I'll deal with the thrown String in a separate PR, as there seems to be happening in a lot of other places (link rule was not turned on).

sgtm


Fix a crash in ExternalTextureGL

Abandon ownership of tbm surface in PopulateTextureWithIdentifier
This patch includes temporary fix for invalid tmb_surface

Signed-off-by: Boram Bae<EMAIL_ADDRESS>

Fix flutter-tizen/plugins#86

@swift-kim if you don't mind, I want to include #80


Tweak to readme

Using # as href target is misleading, as it might imply there is additional behavior (like showing the entire text when someone clicks on 'read more').

Actually I wanted to suggest such behavior with the #, but left the implementation to the user and don't provide it out of the box, since it exceeds the scope of this library.
For reference, I link to an appropriate example again.
Until I update the Readme, I will gladly take your tweak :sun_with_face:


Monitored conditions no longer created if not explicitly listed

Two issues:
The configuration options states the parameter monitored_conditions which is a list of container conditions to monitor is optional.  If not listed, it defaults to all conditions.  Under 1.14 and older this means all of the conditions were created as individual sensors.  But under 1.16 (and possibly 1.15) none of the sensors are created.  I needed to change my yaml config to now include the monitored_conditions parameter and list the ones that I wanted in order to get the individual sensors back.  Something in code may need to be fixed so all sensors are created like they were before if monitored_conditions is not used.  Or maybe the config readme needs to be updated to state that if monitored_conditions is not used, no individual sensors are created
The allinone sensor with multiple attributes is created at all times regardless if it is not listed in the monitored_conditions list.
1.14 yaml config which created all the individual sensors:
monitor_docker:
  - name: Docker
    url: unix://var/run/docker.sock
    containers:
      - homeassistant
      - mariadb
    rename:
      homeassistant: Home Assistant
      mariadb: MariaDB
  - name: RPi0W
    url: tcp://<IP_ADDRESS>:2375
    containers:
      - zwavejsui
    rename:
      zwavejsui: ZwaveJSUI

1.16 yaml I needed to add to get the sensors back:
    monitored_conditions:
      - state
      - status
      - health
      - uptime
      - image
      - cpu_percentage
      - 1cpu_percentage
      - memory
      - memory_percentage
      - network_speed_up
      - network_speed_down
      - network_total_up
      - network_total_down

Thanks for reporting, I will try to reproduce the issues here.

I also have the same issue - all my sensors are now unavailable after update to 1.16.  I had none listed and it defaulted to all.  Not I have zero,

Can you try the latest master in the repo? The issue should be fixed now, but requires more testing.

For me it works with 1.16 with "allinone"

Works as it did before without explicitly listing conditions to monitor

Thanks for confirming, I will close the issue now


Incorrect BDD Parallel execution background fail/success

First of all, thank you for this amazing project. I have been using it in my company and we did over 1k e2e tests across multiple projects having no issues.
Since our integration tests suite grew considerably, we wanted to run them in parallel to avoid pipelines running for hours.
What are you trying to achieve?
Running BDD features in parallel and getting the correct amount of fails and success.
What do you get instead?
In the picture below, all the tests passed, but after checking the report I saw that there were 3 failed tests all of them in the background steps.

Running the tests with npx codeceptjs run-workers 4 --reporter mocha-multi --verbose I get the following output:

Details

CodeceptJS version: 3.0.6
NodeJS Version: 14.15.1
Operating System: Linux / OSX
puppeteer Version: 5.5.0
Configuration file:

exports.config = {
    gherkin: {
        features: './features/*.feature',
		steps: [...]
    },
    helpers: {
        Mochawesome: {
            disableScreenshots: false
        },
        Puppeteer: {
            chrome: {
                args: ['--start-maximized', '--no-sandbox', '--disable-web-security', '--disable-setuid-sandbox', '--proxy-server="direct://"', '--proxy-bypass-list=*', '--disable-dev-shm-usage', '--shm-size=1gb'],
                defaultViewport: {
                    height: 625,
                    width: 1280
                }
            },
            show: true,
            // eslint-disable-next-line no-process-env
            url: '...'
        },
    },
    hooks: [],
    include: {
        // eslint-disable-next-line id-length
        I: './steps_file.js'
    },
    mocha: {
        bail: true,
        reporterOptions: {
            'codeceptjs-cli-reporter': {
                options: {
                    steps: true,
                    verbose: false,
                },
                stdout: '-',
            },
            mochawesome: {
                options: {
                    consoleReporter: false,
                    html: false,
                    overwrite: false,
                    reportDir: './',
                    reportFilename: 'e2e-report.json',
                    timestamp: true
                },
                stdout: '-'
            }
        }
    },
    name: 'cockpit-integration',
    output: './screenshots/out',
    plugins: {
        retryFailedStep: {
            enabled: true
        },
        screenshotOnFail: {
            enabled: false
        },
        stepByStepReport: {
            deleteSuccessful: true,
            enabled: false,
            fullPageScreenshots: false
        },
        tryTo: {
            enabled: true,
            registerGlobal: true
        },
    },
    tests: './*.test.js',
    timeout:<PHONE_NUMBER>99999
}

Edit 27/04
Digging deep into the code I traced the problem to codeceptjs/lib/command/workers/runTests.js
When sendToParentThread, there is a method called simplifyTest but it only handles the err object to be sent if there is a property err in the test object passed. The issue happens when an actual err is passed with a funcion in it, and the test contains no err property.

postMessage documentation gives a clear definition about what can or cannot be sent to a worker:

postMessage accept only value or JavaScript object handled by the structured clone algorithm, which includes cyclical references.

Looking at the structured clone algorithm, it accepts:

All primitive types (However, not symbols), Boolean object, String object, Date, RegExp (The lastIndex field is not preserved.), Blob, File, FileList, ArrayBuffer, ArrayBufferView (This basically means all typed arrays like Int32Array etc.), ImageBitmap, ImageData, Array, Object (This just includes plain objects (e.g. from object literals)), Map, Set

What it does not accept

Error and Function objects cannot be duplicated by the structured clone algorithm; attempting to do so will throw a DATA_CLONE_ERR exception.

Trying to fix the problem and adding the handler for err objects passed like this works partially and we start getting tests that fail in the background hooks.

I would love to make a PR with this change but I understand this is probably a core change that would probably have some other implications that I can't anticipate

I am sorry i didnt have time earlier to look into this. Sure, any PR is welcome, better to start discussion as a part of PR, it helps to dive into context


Remove unused parameter in hero code

The method _startHeroTransition, from HeroController, receives an Animation<double> animation, but does nothing with it.

Hi @mateusfccp, Thanks for filing the issue. I can see the animation variable is not being used once the value is assigned
https://github.com/flutter/flutter/blob/9514106108d1be5e6ece944b3981b1c41111fcf9/packages/flutter/lib/src/widgets/heroes.dart#L896


🚧  map to homepage with hover/click options + banana man intro + dialogue component + extremely basic character tab component

Added the tucker map

[x] Basic Dialogue

[x] Map with Clickable Component and hover effects

[x] Audio Component

[x] Basic Banana man Intro using the Dialogue component

[x] Extremely basic character tab - can be replaced in the future

[x] SVG parsing tool to get group location info

[ ] Make it pretty - Cooler dialogue CSS/presentation, add a cool BG, etc. (Someone else do it)

u can't just delete your problems neosh

u can't just delete your problems neosh
It wants me to put an attribute that throws an error. I think AccessLint thinks that the  tag is a normal one, not an SVG one.

Haha yeah I know, carry on

Hey @neosh11, generally it's a good idea to try keep pull requests as small as possible and focused on a single change or addition. For example your useAudio hook on its own would fit nicely into a separate PR.

Hey @neosh11, generally it's a good idea to try keep pull requests as small as possible and focused on a single change or addition. For example your useAudio hook on its own would fit nicely into a separate PR.

Yes, that is a lovely idea 😊😊😊

I don't think we really want the typed dialog with cursor and everything. I think word by word may be more appropriate.

I don't think we really want the typed dialog with cursor and everything. I think word by word may be more appropriate.

And I'm fine to merge in so we have something to work from but this really should have been 3 different PRs

And I'm fine to merge in so we have something to work from but this really should have been 3 different PRs


Proof that it works

Goals

[x] Pull everything about the schema into this project, so we can completely control it. If we control it, we can make it only as complex as we need it to be. We can also point to the schema from the exercise docs.
[x] Create dummy data within code.
[ ] Include a graphiql endpoint for exploring the API, figuring that might be useful within the exercises. I did not meet this goal and I'm not sure I can with miragejs.  (Edit: I might have an idea on how to do it.)

Decisions
I looked into a few options for fake endpoints, including:

https://github.com/miragejs/graphql - this is what I decided to use
https://github.com/marmelab/json-graphql-server - simplest to implement, but it doesn't allow for a custom schema
https://github.com/APIs-guru/graphql-faker - seems to be based on extending an existing endpoint, but I didn't want the noise of the entire Artsy schema to distract

Mirage was the option that aligned most with the goals and seemed quick to set up.
Concerns

Do we need a graphiql playground? I don't think we do, but it might be nice.
We will be maintaining the schema by hand with this. I don't personally see a problem because I'd just copy examples from the real Artsy schema.
Data seeding could get out of control quickly so we should be quick to refactor that part.

Gonna merge this to move forward!

Gonna merge this to move forward!


Search in CustomResourceDefinition instances view do not find items if they are not present on the first page

Description
Search do not find items if they are not present on first page.
Expected result
Search presents items
Actual result
Search shows: Couldn't find resources matching this query.
Steps to reproduce

Troubleshooting
I went to page 2 and then search works.

invalid, I used wrong place to search for :D

Reopened, and renamed a ticket to real not necessary search capability that led me to that issue.


Fresh install I get Invalid credentials

I follow in install instruction ... but I get Invalid Credentials
I install 411 in Ubuntu 16.04.1 LTS
The user exist in the database everything looks fine ... any idea ?

If you try re-running the create_user.php script and create a new user, are you able to log in with that user?

/var/www/411$ bin/create_user.php
Creating new user
Username: user1
Real name: user1
Password: user
Email<EMAIL_ADDRESS>Admin (y/n): y
User created! ID: 2

Same thing.
I tried yesterday with CentOS6 and php 7 and I have the same problem... today I installed ubuntu and I have the same issue. Not sure what I am doing wrong.

Could you provide the database row (including password hash) for 'user1'?

sudo apt-get install apache2 libapache2-mod-php php-xml php7.0-sqlite php7.0-curl nodejs-legacy npm sqlite3 zip
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
All settings correct for using Composer
Downloading 1.2.0...
Composer successfully installed to: /usr/local/bin/composer
Use it: php /usr/local/bin/composer
sudo npm install -g grunt-cli bower
git clone https://github.com/kiwiz/411.git
sudo cp -R 411 /var/www/
sudo chown -R grosca:www-data /var/www/411/
sudo a2enmod rewrite
sudo a2enmod headers
sudo cat /etc/apache2/sites-enabled/411.conf
<VirtualHost *:80>
ServerName 411alerts.example.com
php_value include_path ".:/var/www/411/phplib"

DirectoryIndex index.php index.html index.htm
DocumentRoot /var/www/411/htdocs
<Directory /var/www/411/htdocs>
    AllowOverride Indexes FileInfo Options
    Options -Indexes +FollowSymLinks
    Order allow,deny
    Allow from all
</Directory>

sudo service apache2 restart
/var/www/411$ npm install
/var/www/411$ bower install
/var/www/411$ composer install
/var/www/411$ sqlite3 data.db < db.sql
/var/www/411$ sudo chmod 664 data.db
/var/www/411$ sudo chown grosca:www-data data.db
grosca@nyvm2906:/var/www/411$ bin/create_site.php
Creating new site
Site name: 411alerts.example.com
Hostname: nyvm2906
From email<EMAIL_ADDRESS>From Error email<EMAIL_ADDRESS>Default To email<EMAIL_ADDRESS>Site created! ID: 1
grosca@nyvm2906:/var/www/411$ bin/create_user.php
Creating new user
Username: user1
Real name: user1
Password: user1
Email<EMAIL_ADDRESS>Admin (y/n): y
User created! ID: 1
$2y$10$ny3g2tcgU3D2aIL4DZ.AVOXzRgQce5MnaOEMN01KcgT5UG5kTL7.C

Ah, I've got it. You need to specify the full hostname that you're serving 411 from for the Hostname (not Site name). In this example, the hostname would be "411alerts.example.com". Lemme know if that works.  Well my hostname of the server is nyvm2906 and my site name is 411alerts.example.com :))
Now I get this error:
[Wed Aug 17 13:27:47.685528 2016] [:error] [pid 25739] [client <IP_ADDRESS>:55819] except [NONE] FOO\UnauthorizedException: "Invalid nonce specified" at [/var/www/411/phplib/REST.php:101] 0:[FOO\REST->route() called at [/var/www/411/htdocs/api/login.php:6]], referer: http://411alerts.example.com/login
any idea ?

I never got to login because I get this error now.
[Wed Aug 17 14:55:24.379220 2016] [:error] [pid 25738] [client <IP_ADDRESS>:59647] except [NONE] FOO\UnauthorizedException: "Invalid nonce specified" at [/var/www/411/phplib/REST.php:101] 0:[FOO\REST->route() called at [/var/www/411/htdocs/api/login.php:6]], referer: http://411alerts.example.com/login

That's odd... I just created a Gitter. Will probably be easier to do the debugging there.

@kiwiz I think has something to do with dns . I set the hostname as the hostname of the server and works. 411.example.com was just an entry on my hosts file.


Fix the flaky alarms tests

Proposed changes
This PR fixes the flaky alarm tests

Run tests in serial
Fix the issues in the way the results validated

Types of changes

[x] Bugfix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Improvement (general improvements like code refactoring that doesn't explicitly fix a bug or add any new functionality)
[ ] Documentation Update (if none of the other choices apply)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Paste Link to the issue

Checklist

[x] I have read the CONTRIBUTING doc
[x] I have signed the CLA (in all commits with git commit -s)
[x] I ran cargo fmt as mentioned in CODING_GUIDELINES
[x] I used cargo clippy as mentioned in CODING_GUIDELINES
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] I have added necessary documentation (if appropriate)

Further comments

This PR has to be rebased to get the fix for test report generation.


Lovelace resource issues

Loading lovelace: in v2g_liberty_package.yaml disables Dashboard Resources in Home Assistant.
By loading lovelace: here, other HACS (frontend) integrations stop working, since you cannot load resources via UI & Yaml simultaneously in HA.

Hmm, I indeed did not test this. How have you fixed it now? Removed the resources from the package and added them via HACS?
What would be your ideal solution?

I tried removing the resources, but it didn't help. It seems as long as
lovelace:
  mode: yaml

is mentioned somewhere in the configuration, the resources from the Dashboard > Resources pane are skipped completely.
I found a threat in the HA community that helped.
I changed

I think this issue has been resolved by the latest version. Can you confirm?


Enabling hermetic,prefetch,source build, Updating CEL expressions, Changing repo for fetch-tsa-certs

/retest


[Suggestion] Spell to activate an Archgenie Lamp

A spell to activate an Archgenie Lamp; the opposite of Terminate Archgenie. Commence Archgenie.
Can be casted by a casting device or staff to activate the Archgenie Lamp in your mainhand/offhand, or by a lamp to activate itself similar to Herme's.
While dropping or placing the lamp in a chest can disable it, it may need to throw an error on a finale to prevent players from making Archgenie Lamps you can't deactivate by hand.
This would be useful in three scenarios:

To activate the lamp after Terminate Archgenie to "undo" the termination,
To make Archgenie Lamps that disable any current archgenies, serve a purpose, then resume the lamp it disabled,
And to make lamps that automatically recharge themselves. A cypher that erases then re-craft itself can bypass it's inability to recharge. A similar (albeit more complicated) solution could be employed with Archgenie Lamps. The lamp could clear itself, teleport a villager and media nearby and cast Make Genie to refill itself (assuming the lamp is kept in the offhand). Currently if this was done the player would need to manually re-activate the lamp every time it resets itself this way.

A possible pattern for Commence Archgenie

I haven't added this because there can only be one lamp active at a time. Which lamp would this spell activate? For your second idea, how do you know that the deactivating lamp won't just activate itself again?

The spell could check for lamps in the order: item in offhand, item in mainhand, item that casted the spell. Then, by activating the first one found the second idea could work, provided the other lamp was kept in your offhand. This would be weird though since similar things in hex check for your mainhand before your offhand. You could still do the second idea if the order was consistent with hex casting by using hexgloop's hotbar patterns as long as the check for the lamp that cast the spell remained the last check.

actually maybe it should use the order that Place Block uses so it can target a lamp in any given inventory slot

I have added it.


Add query_tag to the model hierarchy

Feature
Feature description
After starting to analyze our query history in some depth, I had the realization that it would be useful to be able to specify QUERY_TAG (snowflake concept) anywhere in the hierarchy, like the materialization configuration.
This way, you can query snowflake query_history by the query tag. Maybe you set one query tag for your whole dbt project. Maybe you set it per model folder. Maybe you set it on specific models.
https://docs.snowflake.net/manuals/sql-reference/parameters.html#query-tag
https://stackoverflow.com/questions/50965558/snowflake-cli-snowsql-query-tagging
QUERY_TAG is a session parameter, so the solution might be to set it in snowflake's table and view materializations, if the query tag is set?
Who will this benefit?
Anyone using snowflake who would like more granular information in her query history.

I can see this being useful in a few different situations.

cost/usage tracking: all queries run by DBT against snowflake being tagged and thus traceable in snowflake query history
snowflake optimization/debugging: tags at the model level for trending performance and anomaly detection.

I am considering starting work to resolve this issue and the above use cases make me think there may be at least 2 distinct places one would want to add a tag:

at the connection level
at the model level

The second can easily be achieved with model hooks (this is not to say some centralized supported method should not be developed).
I am however not sure how to go about setting query tag immediately after opening a connection so that all queries run regardless of their source are tagged. Any ideas on how to achieve that or other thoughts on the general problem before I dig in would be appreciated.

hey @DrMcTaco - I like the way you're thinking about this feature! I agree - I think we should support query tags both at the model level and at the connection level. We'd very much welcome a PR for this change.
Some rough implementation notes:

We can add a parameter to the SnowflakeCredentials dataclass to capture a query_tag string in a profiles.yml target.
We'll want to alter the session parameter after opening a connection. Check out an example of where we do something similar in the postgres plugin.
Supporting this session parameter in model configs is going to be a tiny bit more involved than setting this field for all connections opened by dbt. We'd need to update each of dbt's Snowflake materializations to check the config and execute a SQL query to set the session parameter before running a query. There might be a better way to do this though.... let me think about that some more.

Beyond these things, we also need to think about what happens if a query_tag is provided for both the target and a model. The easiest approach would just be to run two alter session queries. I think/hope Snowflake will do the right thing there, but it's worth verifying the behavior!
Let me know what you think about all that :)

The easiest approach would just be to run two alter session queries. I think/hope Snowflake will do the right thing there, but it's worth verifying the behavior!

Looks like you can just run one after another and the second will overwrite the first

In other news I have the profile based query_tags working. I am getting a bit hung up finding the right place and way to do it in the model macros. I am not the most familiar with Jinja.
Can you link to a macro where something similar is done?

Nice!
For the model-level configs, you'll want to add the query_tag config here to register the config with the Snowflake adapter plugin:
https://github.com/fishtown-analytics/dbt/blob/74c78ef9279638d14949d4e93ae76166d4fd8022/plugins/snowflake/dbt/adapters/snowflake/impl.py#L20-L27
As far as the jinja code is concerned, I'd grab this config value from the jinja context with config.get('query_tag'). If the config is defined, then I'd issue the alter session statement at the top of the Snowflake materialization macros:

incremental
table
view

I'd try to run this query as early as possible in the materialization code as possible so that all of the SQL (eg. hooks) are executed with the correct query tag. It might also be a good idea to make a helper macro (like this one) that actually does the heavy lifting to run this alter session statement if a config is defined.
One last thing to consider: dbt uses a connection pool to execute queries. Do we need to "reset" the query_tag after running a given model? I want to make sure that the session parameter for a previous model doesn't leak into a subsequent model executed from the same thread.


Message interfaces

This pull request introduces an abstract interface between a particular representation of protocol messages and their usage by the core protocol logic.
This decouples the core protocol code from a particular way the protocol messages are represented, e.g. from automatically generated code of Protocol Buffers. It is advantageous to make this separation before introducing more complex message types as those of the view change operation.

Summary of changes in https://github.com/hyperledger-labs/minbft/pull/122#commits-pushed-8900a07:

Regenerated old mock files in separate commit
Added message implementation

Sorry, I'll fix the DCO issue with the next update...

Added message implementation

Thanks for the update. Reply message still unimplemented, is that intentional?

Reply message still unimplemented

I seem to have finished implementing messages half-way :slightly_smiling_face: My plan was to get your feedback on this while working on some other patches for view change (that will also fix #110). Those changes might affect how the message interfaces will be used in the core protocol logic.

Summary of changes:

Fixed DCO issue
Added implementation of Reply message

The change set looks good to me, so I think it's ready to merge.

I initially planned to merge it after final changes for switching the core to use the message interfaces. That's why I opened this pull request ad "draft".

This makes me review easier (nice practice), thank you.

In fact, the link is just a copy of the one attached to the "force-pushed" text (which doesn't look like a link):

The change set looks good to me, so I think it's ready to merge.

I initially planned to merge it after final changes for switching the core to use the message interfaces. That's why I opened this pull request ad "draft".

"Draft" status was removed when I clicked "ready for review" button to update my review status. I'm not sure that this was the right review process, so sorry if it surprised you. I leave this PR open for you to add the final changes, or to merge current PR branch.

It looks like the official recommendation for resolving ambiguities among similar interfaces, as opposed to using sealed interfaces, is to augment interfaces with so-called qualifying methods. This would look like follows.
type ReplicaMessage interface {
	Message
	ReplicaID() uint32

	ImplementsReplicaMessage()
}

// ...

type Reply interface {
	ReplicaMessage
	// ...

	ImplementsReply()
}

type reply struct {
	// ...
}

func (m *reply) MarshalBinary() ([]byte, error) { /* ... */ }

func (m *reply) ReplicaID() uint32 { /* ... */ }

// ...

func (reply) ImplementsReply() {}
func (reply) ImplementsReplicaMessage() {}

What do you think of this alternative?

Thanks for the info. I'd rather like the official way even both are not perfect. It needs less codes, is easier to read for me, and is in the official FAQ.

Implements* methods in your example are global so visible to external packages. It seems not what you originally wanted, but if you think that's acceptable, that's fine and I'll go with it.

I'd rather like the official way even both are not perfect. It needs less codes, is easier to read for me, and is in the official FAQ.

I agree that following an official recommendation should make that easier for others to understand it. Though, I'm not sure if it needs less code: Note that reply struct needs to implement both ImplementsReply and ImplementsReplicaMessage. Maybe in our case it's not a big overhead.

Implements* methods in your example are global so visible to external packages. It seems not what you originally wanted, but if you think that's acceptable, that's fine and I'll go with it.

What was desired was to avoid reply struct satisfying messages.ReplicaMessage interface just because it happens to implement ReplicaID method. The "qualifying methods" approach also achieves that goal. The "sealed interfaces" approach is a bit more strict in the sense that the only way to implement messages.Reply is to embed messages.IsReply provided by messages package. So it resembles nominative typing rather than regular Go's structural typing.
Basically the actual problem I tried to solve is perfectly captured on Wikipedia:

A pitfall of structural typing versus nominative typing is that two separately defined types intended for different purposes, but accidentally holding the same properties (...), could be considered the same type by the type system, simply because they happen to have identical structure.

So far, I don't have a strong opinion on which approach to follow. Maybe I adjust the code to follow the "qualifying methods" approach, and we'll see how it looks like. Sleep on it, then decide :slightly_smiling_face:

I'm not sure if it needs less code

It is my understanding that the sealed interface needs an additional type definition (IsReplicaMessage, etc.), which is not in the official recommended way.
I don't have a strong option and either is fine.

I tried to adjust the code for qualifying methods approach. Please have a look to see which approach you prefer.

Thanks, I prefer the qualifying methods approach.

Basically the actual problem I tried to solve is perfectly captured on Wikipedia:

A pitfall of structural typing versus nominative typing is that two separately defined types intended for different purposes, but accidentally holding the same properties (...), could be considered the same type by the type system, simply because they happen to have identical structure.

So far, I don't have a strong opinion on which approach to follow. Maybe I adjust the code to follow the "qualifying methods" approach, and we'll see how it looks like. Sleep on it, then decide

OK, so let's go with the "qualifying methods" approach. It's nice to keep the commit about "sealed interface" because the project history has the record and that allows us to revisit easier in the future.
I'm OK to merge your branch, but the latest commit has "RFC" in the subject, so you may make the final change.

@ynamiki @Naoya-Horiguchi Thanks for the feedback! The recommended approach indeed doesn't seem too bad, let's stick to it.

I'm OK to merge your branch, but the latest commit has "RFC" in the subject, so you may make the final change.

I would still prefer to merge it when I make the interfaces actually used by the core... Please let me know if you need it sooner.

Summary of changes:

Rebased
Updated commit message of "messages: Use qualifying methods instead of sealed interfaces"

A few comments:

I think the final commit ("client,core: Use message interfaces") is the most interesting one since last review, and it looks good to me as long as I checked (it's a little too large to check line-by-line.)
One question: there are many conversions like *messages.Request -> messages.Request especially in definitions of function parameters, is that necessary change for your current purpose? Maybe my point is unclear, but I'm a little worried that that could introduce unexpected behaviors.
Patch 12/13 ("core: Restructure TestMakeReplicaMessageProcessor ") has some broken indentations, although that will be fixed by patch 13/13.

@Naoya-Horiguchi Thanks for reviewing this.

* I think the final commit ("client,core: Use message interfaces") is the most interesting one since last review, and it looks good to me as long as I checked (it's a little too large to check line-by-line.)

Sorry for making the commit so large, but I couldn't find a better way to do the switch without breaking building/testing.

* One question: there are many conversions like `*messages.Request` -> `messages.Request` especially in definitions of function parameters, is that necessary change for your current purpose? Maybe my point is unclear, but I'm a little worried that that could introduce unexpected behaviors.

Before the switch messages.Request was a structure, after the switch it is an interface, thus the declarations change. This must be a pretty safe change, because the compiler detects this kind of type mismatch.

* Patch 12/13 (["core: Restructure TestMakeReplicaMessageProcessor "](https://github.com/hyperledger-labs/minbft/pull/122/commits/41b32d422bd9d2b99a6327b6fade4643226b2cec)) has some broken indentations, although that will be fixed by patch 13/13.

Thanks, I think I missed it when resolving rebase conflicts. That's easy to fix :slightly_smiling_face:

Before the switch, Request was a structure (from messages/protobuf package), after the switch it is an interface (from messages package), thus the declarations change. This must be a pretty safe change, because the compiler detects this kind of type mismatch.

Make sense, thank you very much. So I'm totally fine about proposed patches with the indent fix. :+1:

One (slightly off-topic) question: do we have a nice tool to support refactoring that has been done in the last commit? I guess changing a struct to an interface is a common refactoring method and this cause tedious and extensive code modification. It is hard to do that manually.

I have no idea about specific tools, but maybe some modern editor (VSCode in my mind) helps for the purpose. For example, if you change some code around struct definition, VSCode automatically (in real time manner) checks whole repository and marks all type mismatches as warnings. So you can adjust all affected places with confidence.

I tried to resolve conflict, but I found that I had to change core/request_test.go (not listed in the conflicting files) to pass the unit tests, so I think we can't simply use Web UI and we might have to push origin/master via CLI. Should I do this? The resolved branch passes the CI test.

do we have a nice tool to support refactoring that has been done in the last commit? I guess changing a struct to an interface is a common refactoring method and this cause tedious and extensive code modification. It is hard to do that manually.

@ynamiki I think gofmt could help with this job, but this time I actually followed compiler errors and fixed most of them with regex substitution...

I tried to resolve conflict, but I found that I had to change core/request_test.go (not listed in the conflicting files) to pass the unit tests,

Maybe we better first finalize and merge #142, then rebase this PR.

so I think we can't simply use Web UI and we might have to push origin/master via CLI.

I am not sure how good the Web UI is for this kind of job :slightly_smiling_face:

Should I do this? The resolved branch passes the CI test.

No worries, I'll take care of this PR.

do we have a nice tool to support refactoring that has been done in the last commit?

Thanks to both of you for reply. I understand there are not a one-shot method and we need to update code manually referencing compiler errors.

Summary of changes:

Rebase with conflict resolution


Startup app fails

I am using express.oi module with NW.js. Any ideas why this is failing?
var express = require('express.oi');

var app = express();

// Pass in your express-session configuration
app.io.session({
  secret: 'express.oi makes me happy'
});

app.http().io();

app.listen(3000);

C:\myApp>node app.js
C:\myApp\app.js:6
app.io.session({
       ^
TypeError: undefined is not a function
    at Object.<anonymous> (C:\myApp\app.js:6:8)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)
    at node.js:814:3

app.http().io() must be before app.io.session!!!
In .io() function you are create app.io object

app.http().io() must be before app.io.session
In .io() function you are create app.io object

Thanks. That works. I copied exactly from Usage > Setting up the app. I will request a change.

@kevkha sorry about the confusion! I've updated example in the README.

Thanks @sibartlett! Much appreciated. Can you give an example of both server and client? I got the server part from the readme but not sure how to in the client side. Thanks in advance.

@kevkha
Server side route
app.io.route('tests', {
  test: function(req) {
    req.socket.emit('someEvent', 'Some text or JSON string or ....');
  }
});

Client side
...
<script src="pathTo/socket.io-client/socket.io.js"></script>
<script>
    var socket = io.connect();
    socket.on('someEvent', function(data){
        console.log(data);
    });
    socket.emit('tests:test');
</script>
...

Don't forget to install socket.io-client i.e. with bower (bower install socket.io-client --save)

Thanks @Shold. If I npm install socket.io-client --save I have to require it in client side instead of calling the socket.io.js correct?

@kevkha Yes, socket.io.js from socket.io-client. About npm and bower SO answer

You only need to install socket.o-client from npm or bower if you want to bundle/precompile the file yourself.
express.oi will serve the client at /socket.io/socket.io.js by default.

@sibartlett lol Thanks!

I learn that many different ways of doing things. It would be less confusion if a working example is provided in the readme or wiki :) Thanks guys.


Modify docs to get more algorithms in the ToC

Here's a PR for #55.
I found it tricky to manipulate the sections to get the entries I wanted in the ToC, such that their links help navigation. I've managed to get something sensible working here. However I should highlight that these changes have:

put the sections of text inline within one page per parent category (such as "C++11 Algorithms")
nested each of the groups of algorithms within another untitled section (because otherwise, I couldn't get them all to appear on the same page)

And of course those changes may have broken some previous URLs into the docs.
What do you think? I think this is broadly a change in the right direction but I'd welcome any suggestions you have about better ways to achieve the same goals.

I failed to notice that this PRs build had failed but I think that was actually nothing to do with the PR's changes to the docs. I've just pushed a trivial change to see if that triggers a clean build.

Now all the builds have failed :grimacing: …
$ ./b2 headers
boost-install.jam: No such file or directory
Jamroot:307: in boost-install
ERROR: rule "boost-install.boost-install" unknown in module "Jamfile</home/travis/build/boostorg/boost-root>".
libs/chrono/build/Jamfile.v2:113: in modules.load
/home/travis/build/boostorg/boost-root/tools/build/src/build/project.jam:372: in load-jamfile
/home/travis/build/boostorg/boost-root/tools/build/src/build/project.jam:64: in load
/home/travis/build/boostorg/boost-root/tools/build/src/build/project.jam:89: in load-used-projects
/home/travis/build/boostorg/boost-root/tools/build/src/build/project.jam:75: in load
/home/travis/build/boostorg/boost-root/tools/build/src/build/project.jam:142: in project.find
/home/travis/build/boostorg/boost-root/tools/build/src/build-system.jam:618: in load
/home/travis/build/boostorg/boost-root/tools/build/src/kernel/modules.jam:295: in import
/home/travis/build/boostorg/boost-root/tools/build/src/kernel/bootstrap.jam:139: in boost-build
/home/travis/build/boostorg/boost-root/boost-build.jam:17: in module scope
The command "./b2 headers" failed and exited with 1 during .
Your build has been stopped.

But I don't think this anything to do with the changes in my PR.

Manually applied on develop as a814721

Thanks for this. Shall I close this PR then?
(As it happens, I've just been watching your std::midpoint() CppCon talk on the tube this morning. I'm currently up to the {oops - literal 0 is also a null pointer} point. It's a great talk - thanks.)

I will close it when I merge to master - probably later today.

merged to master for the 1.72.0 release.


added: .yes class for buttons with yes caption

why? if class is needed, then it should be added to all buttons, not just for yes.


Use 1password for retrieving secrets

I have two concerns about it though:

I plan to switch to Bitwarden when my 1Password subscription expires, because Bitwarden is open source
In the current state of the dotfiles, anyone can easily fork and just change my name and email address. This would add substantial complications to the forking process

No need for now. :)


lcd/lvgl-display resolution/orientation/rotation problems

imxrt-1052-based board
Zephyr  SHA-1: 0714052c74bfe4e74ae6fca705da4d7d66c92681
integrated LVGL- SHA-1: 2b498e6f36d6b82ae1da12c8b7742e318624ecf5
LCD-panel 1024/768
My application should use 270 deg rotated orientation of lcd-panel. During lvgl_init()  in zephyr\modules\lvgl\lvgl.c lvgl-disp resolution is set based on display_get_capabilities() output. But mcux_elcdif_get_capabilities() returns x/y_resolution of lcd-panel excluding rotation. So my lvgl-disp initilized as W=1024, H=768, instead of W=768, H=1024. imxrt has a built-in GPU/PXP which is used in elcdif-driver to rotate an image but this CONFIG_MCUX_ELCDIF_PXP_ROTATE_90/180/270 considered for data rotation, but not taken into account when determining display capabilities - if rotate 90/270 is active display height and width should be swaped. Is this a feature or bug? I think get_capabilties() should return rotated resolution (lvgl_allocate_rendering_buffers() must take into account display rotation when adjusting disp_driver->hor_res/ver_res).
As far as I know LVGL-lib has built-in rotation mechanism using NXP_PXP. So I tried to enable it by insert CONFIG_LV_USE_GPU_NXP_PXP in my prj.conf, but received error message
modules/lib/gui/lvgl/src/draw/nxp/pxp/lv_draw_pxp_blend.c:37:10: fatal error: lvgl_support.h: No such file or directory
So it seems this option not integrated into Zephyr, or some files missed. Am I missing something?
If CONFIG_MCUX_ELCDIF_PXP_ROTATE_90/180/270 is activated via prj.conf PXP will be used only if x=0,y=0 and full buffer should be outputed in mcux_elcdif_write(). In case partial buffer output such code used
src = buf;
dst = dev_data->fb[dev_data->next_idx];
dst += dev_data->pixel_bytes * (y * config->rgb_mode.panelWidth + x);

for (h_idx = 0; h_idx < desc->height; h_idx++) {
  memcpy(dst, src, dev_data->pixel_bytes * desc->width);
  src += dev_data->pixel_bytes * desc->pitch;
  dst += dev_data->pixel_bytes * config->rgb_mode.panelWidth;
}

This code does not take into account rotation, so the output buffer may contain both rotated and unrotated data. So need to add code to rotate data. I have an example used in previous appl to rotate 270 deg.

LVGL offers settings for display rotation. Can you check if this patch resolves the issue:
iff --git a/modules/lvgl/lvgl.c b/modules/lvgl/lvgl.c
index 76df359e7f..d96c6c6ddf 100644
--- a/modules/lvgl/lvgl.c
+++ b/modules/lvgl/lvgl.c
@@ -228,6 +228,7 @@ static int lvgl_init(void)
 #ifdef CONFIG_LV_Z_FULL_REFRESH
        disp_drv.full_refresh = 1;
 #endif
+       lv_disp_set_rotation(lv_disp_get_default(), LV_DISP_ROT_270);

        err = lvgl_allocate_rendering_buffers(&disp_drv);
        if (err != 0) {

Regarding PXP we did some work to get the needed pieces into place:
https://github.com/lvgl/lvgl/pull/5838 (Sidenote: this also needs to be ported to v9 and submitted upstream)
https://github.com/zephyrproject-rtos/hal_nxp/pull/343
What is still missing is the setup in the glue code in the zephyr main repository:
https://github.com/zephyrproject-rtos/hal_nxp/pull/343#issuecomment-1991627546
Hooking up the IRQs up is kinda messy but doable.

LVGL offers settings for display rotation. Can you check if this patch resolves the issue:
iff --git a/modules/lvgl/lvgl.c b/modules/lvgl/lvgl.c
index 76df359e7f..d96c6c6ddf 100644
--- a/modules/lvgl/lvgl.c
+++ b/modules/lvgl/lvgl.c
@@ -228,6 +228,7 @@ static int lvgl_init(void)
 #ifdef CONFIG_LV_Z_FULL_REFRESH
        disp_drv.full_refresh = 1;
 #endif
+       lv_disp_set_rotation(lv_disp_get_default(), LV_DISP_ROT_270);

        err = lvgl_allocate_rendering_buffers(&disp_drv);
        if (err != 0) {

This code try to rotate unregistered display driver - lv_disp_get_default() returns NULL, so lv_disp_set_rotation() return without effect. But this is not solution - IMHO - it will activate lvgl built-in rotate engine, and without implemented hardware support SW-rotatre will use, as far as I understand.

This code tries to rotate unregistered display driver - lv_disp_get_default() returns NULL, so lv_disp_set_rotation() return without effect. But this is not solution - IMHO - it will activate lvgl built-in rotate engine, and without implemented hardware support SW-rotatre will use, as far as I understand.

Yeah my bad, you might need to put this later down in the function. That's correct it will use the software rotation done by LVGL. Not too sure what the best way to go about this is. IMO touching the get_capabilities is not a great option, it should reflect the display "real" resolution. Is the rotation in your case caused by the way that you are mouting the display physically?
PXP support is generally available in 8.4, it needed the IRQs to be connected. A PR was raised https://github.com/zephyrproject-rtos/lvgl/pull/52 and I upstreamed this to v8.4 and v9.1.
Note: from my understanding within v9.1 we have to use the LVGL display rotation since this is the information from which the PXP engine is fed. Of course this means that in the case that PXP is not used there will be a performance hit due to the SW rotation being used.
I think that since we are offering the capability to statically define the drawbuffers we need a LVGL Kconfig flag for setting the display rotation. This is not ideal since you might get weird effects if the display does support rotation on the controller side, but I can not come up with a nicer solution for this. @danieldegrasse  @jfischer-no  do you have any input on this :^) ?

I think that since we are offering the capability to statically define the drawbuffers we need a LVGL Kconfig flag for setting the display rotation. This is not ideal since you might get weird effects if the display does support rotation on the controller side, but I can not come up with a nicer solution for this. @danieldegrasse @jfischer-no do you have any input on this :^) ?

I'm a bit unclear here- are you saying add a Kconfig to enable software rotation?
From the PXP side, it is only really useful (as far as I know) if an entire framebuffer is provided for it to rotate. Hence the reason for the issue noted above:

This code does not take into account rotation, so the output buffer may contain both rotated and unrotated data

When using the PXP I set CONFIG_LV_Z_FULL_REFRESH=y and LV_Z_VDB_SIZE=100.
Currently it should be possible to rotate a display buffer with LVGL and Zephyr by calling lv_disp_set_rotation(), and setting CONFIG_MCUX_ELCDIF_PXP_ROTATE_90/180/270 (note that the PXP rotates counterclockwise, so for a rotation setting of LV_DISP_ROT_90 you would set CONFIG_MCUX_ELCDIF_PXP_ROTATE_270), without swapping the width/height of the display.
I'm able to rotate the LVGL widgets sample using the PXP like so:
Add rotation call in sample code:
--- a/samples/modules/lvgl/demos/src/main.c
+++ b/samples/modules/lvgl/demos/src/main.c
@@ -36,6 +36,8 @@ int main(void)
        CONFIG_LV_USE_DEMO_STRESS, or CONFIG_LV_USE_DEMO_WIDGETS
 #endif

+       lv_disp_set_rotation(lv_disp_get_default(), LV_DISP_ROT_90);
+
        lv_task_handler();
        display_blanking_off(display_dev)

Use the following build command:
west build -p always -b mimxrt1050_evk samples/modules/lvgl/demos/ -DCONFIG_LV_Z_DEMO_WIDGETS=y -DCONFIG_MCUX_ELCDIF_PXP_ROTATE_270=y -DCONFIG_DMA=y -DCONFIG_MCUX_ELCDIF_PXP=y -DCONFIG_LV_Z_FULL_REFRESH=y -DCONFIG_LV_Z_VDB_SIZE=100
As a side note, I'm aware the documentation for the PXP rotation is misleading. I'll open a PR to make it more robust, to make this use case a bit simpler to enable

Is the rotation in your case caused by the way that you are mouting the display physically?

Yes. In my case display mounted in portrait mode (768 x 1204) while original is landscape (1024 x 768). So panel's zero point does not match with lvgl zero point. Previous in zephyr were CONFIG_LVGL_HOR_RES_MAX/CONFIG_LVGL_VER_RES_MAX which configured lvgl resolution, now lvgl resolution matches with panel settings.

@glory-man could you try this, and see if you have any luck using the PXP?

Yes. It works. As far as understand in this case used display_mcux_elcdif.c PXP realization,  disp->driver->sw_rotate = 0 by-default - so SW rotation switched off , lvgl-gpu switched off too.
I can suggest such mod
diff --git a/drivers/display/display_mcux_elcdif.c b/drivers/display/display_mcux_elcdif.c
index e4b45f89d40..25b85c76c24 100644
--- a/drivers/display/display_mcux_elcdif.c
+++ b/drivers/display/display_mcux_elcdif.c
@@ -117,13 +117,44 @@ static int mcux_elcdif_write(const struct device *dev, const uint16_t x, const u
 		}
 		/* Now, write the display update into active framebuffer */
 		src = buf;
-		dst = dev_data->fb[dev_data->next_idx];
-		dst += dev_data->pixel_bytes * (y * config->rgb_mode.panelWidth + x);
+		if (!IS_ENABLED(CONFIG_MCUX_ELCDIF_PXP_ROTATE_90) && !IS_ENABLED(CONFIG_MCUX_ELCDIF_PXP_ROTATE_180) && !IS_ENABLED(CONFIG_MCUX_ELCDIF_PXP_ROTATE_270)) {
+			dst = dev_data->fb[dev_data->next_idx];
+			dst += dev_data->pixel_bytes * (y * config->rgb_mode.panelWidth + x);

-		for (h_idx = 0; h_idx < desc->height; h_idx++) {
-			memcpy(dst, src, dev_data->pixel_bytes * desc->width);
-			src += dev_data->pixel_bytes * desc->pitch;
-			dst += dev_data->pixel_bytes * config->rgb_mode.panelWidth;
+			for (h_idx = 0; h_idx < desc->height; h_idx++) {
+				memcpy(dst, src, dev_data->pixel_bytes * desc->width);
+				src += dev_data->pixel_bytes * desc->pitch;
+				dst += dev_data->pixel_bytes * config->rgb_mode.panelWidth;
+			}
+		}
+		else {
+			int w_idx;
+			for (h_idx = 0; h_idx < desc->height; h_idx++) {
+				int offs = 0;
+				dst = dev_data->fb[dev_data->next_idx];
+				if (IS_ENABLED(CONFIG_MCUX_ELCDIF_PXP_ROTATE_90)) {
+					offs = ((x + 1) * config->rgb_mode.panelWidth - (y + h_idx) - 1);
+				} else if (IS_ENABLED(CONFIG_MCUX_ELCDIF_PXP_ROTATE_180)) {
+					offs = ((config->rgb_mode.panelHeight - (y + h_idx)) * config->rgb_mode.panelWidth - x - 1);
+				} else if (IS_ENABLED(CONFIG_MCUX_ELCDIF_PXP_ROTATE_270)) {
+					offs = ((config->rgb_mode.panelHeight - x - 1) * config->rgb_mode.panelWidth + (y + h_idx));
+				}
+				dst += (dev_data->pixel_bytes * offs);
+				for (w_idx = 0; w_idx < desc->pitch; w_idx++) {
+					memcpy(dst, src, dev_data->pixel_bytes);
+					if (IS_ENABLED(CONFIG_MCUX_ELCDIF_PXP_ROTATE_90)) {
+						offs = config->rgb_mode.panelWidth;
+					} else if (IS_ENABLED(CONFIG_MCUX_ELCDIF_PXP_ROTATE_180)) {
+						offs = -1;
+					} else if (IS_ENABLED(CONFIG_MCUX_ELCDIF_PXP_ROTATE_270)) {
+						offs = -config->rgb_mode.panelWidth;
+					} else {
+						offs = 0;
+					}
+					dst += (dev_data->pixel_bytes * offs);
+					src += dev_data->pixel_bytes;
+				}
+			}
 		}

 		LOG_DBG("Setting FB from %p->%p", (void *)dev_data->active_fb,

in display_mcux_elcdif driver to enable partial framebuffer rotation. In this case demo could be worked with CONFIG_LV_Z_FULL_REFRESH=n.

Yes. It works. As far as understand in this case used display_mcux_elcdif.c PXP realization, disp->driver->sw_rotate = 0 by-default - so lvgl-SW rotation switched off , lvgl-gpu switched off too.

Yes- this is correct.

I can suggest such mod

Interesting- thanks for looking at how to enable this. Truthfully partial refreshes are not a priority for me in that driver (because performance is very poor using that method, and it isn't how the peripheral was designed to function). However, if you are interested in sending a PR to enable this feature I'd be happy to review it and help get it merged!

Truthfully partial refreshes are not a priority for me in that driver (because performance is very poor using that method, and it isn't how the peripheral was designed to function).

I also have an example code for rotating (implemented for rotation by kPXP_Rotate90 and kPXP_Rotate270, but not for kPXP_Rotate180) a buffer of arbitrary size using PXP in blocks that are multiples of kPXP_BlockSize16, the rest of the buffer outside the block boundaries is rotated programmatically.

Fyi: I submitted https://github.com/zephyrproject-rtos/zephyr/pull/73474 before seeing this issue. Is it of any help here?

Fyi: I submitted #73474 before seeing this issue. Is it of any help here?

as  you correctly said in your PR

Certain display drivers allow for setting an initial display orientation using a device tree property.

i use nxp-elcdif and setting display orientation is not supported in it. but in case if add display orientaiton setup in DT this PR can help


LGTM.com - false positive: if/elif/else comparison incorrect (unreachable, always true)

Description of the false positive
alpha is a variable provided through the function and takes on any value from (-inf,+inf).

Related PR: diana-hep/pyhf#574 .
CC: @lukasheinrich @matthewfeickert
Language: python

https://lgtm.com/projects/g/diana-hep/pyhf/snapshot/4a8bb79dcb5a18156090441c789404248a4872bb/files/src/pyhf/interpolators/code2.py?sort=name&dir=ASC&mode=heatmap#x490ee0f59f7109a3:1
(and related)
https://lgtm.com/projects/g/diana-hep/pyhf/snapshot/4a8bb79dcb5a18156090441c789404248a4872bb/files/src/pyhf/interpolators/code2.py?sort=name&dir=ASC&mode=heatmap#x4162964d9ead9482:1

If I change it to elif alpha >= -1 then LGTM is satisfied, but the logic is clearly the same as -1 <= alpha <= 1 in our case. So we're confused why LGTM is flagging this.


Missing checkbox in generated markdown

Consider the following tree:
{
   "type":"root",
   "children":[
      {
         "type":"list",
         "start":null,
         "spread":false,
         "ordered":false,
         "children":[
            {
               "type":"listItem",
               "spread":false,
               "bullet":"-",
               "checked":false,
               "children":[
                  {
                     "type":"paragraph",
                     "children":[
                        {
                           "type":"text",
                           "value":""
                        }
                     ]
                  }
               ]
            }
         ]
      }
   ]
}

And the following code/configuration:
"mdast-util-to-markdown": "0.5.3", (latest)
"mdast-util-gfm-strikethrough": "0.2.2", (latest)
"mdast-util-gfm-task-list-item": "0.1.5", (latest)

var mdast2md = require('mdast-util-to-markdown');
var strikethrough = require('mdast-util-gfm-strikethrough');
var tasklistitem = require('mdast-util-gfm-task-list-item');

const markdown = mdast2md(mdtree, {
  extensions: [strikethrough.toMarkdown, tasklistitem.toMarkdown]
});

Here is the result of markdown:
"*\n"

Problem:
The result should be something like this: "* [ ] "

That doesn’t work on GitHub, and this project is guarding you from it:

[ ]

It is required to have some content in the paragraph: https://github.com/syntax-tree/mdast-util-gfm-task-list-item/blob/26584d70469a3528ead5510662830982e247bae2/to-markdown.js#L13

bullet is not an mdast property btw.

I'm sorry but there is still a problem somewhere.
Because if you do it the other way :
From this markdown "* [ ] " (the expected output before)
To a mdtree, using this (with the latest plugins):
var md2mdast = require('mdast-util-from-markdown');
var strikethroughSyntax = require('micromark-extension-gfm-strikethrough')
var strikethrough = require('mdast-util-gfm-strikethrough');
var tasklistitemSyntax = require('micromark-extension-gfm-task-list-item');
var tasklistitem = require('mdast-util-gfm-task-list-item');

const mdtree = md2mdast(this.markdown, {
  extensions: [strikethroughSyntax(), tasklistitemSyntax],
  mdastExtensions: [strikethrough.fromMarkdown, tasklistitem.fromMarkdown]
});

You will retrive my tree at the beginning (minus the property 'bullet' like you pointed out).
A -> B
C <- B

Any thoughts about that @wooorm ?

I have confirmed this is a bug in micromark-extension-gfm-task-list-item, I’ll fix it there.

Fixed: https://github.com/micromark/micromark-extension-gfm-task-list-item/releases/tag/0.3.2. Thanks again @RichardFevrier!

Sorry @wooorm to continue this thread but I want to be sure the actual behavior is right.
If we take "- [ ] " in Input, the last space is trimmed in the tree and if we convert it back to markdown we find this "- [ ]\n"
Is it the expected result?
(As always all modules are up to date)

Trimming initial and final spaces on lines is part of how markdown works, too.
Adding a final line ending is to ensure files are valid: it’s not really part of markdown but unix wants it that way
So yes, the input/output you show is expected. Does that answer your question, or is there something I missed?

That's perfectly clear!
Thank you to take time to answer 🙏
Your lib is amazing by the way ❤

Thank you!!


Is there a way to Save Diagram

Question.  Is there a way to save the serialized diagram to a DB and then re-render the diagram again after extracting from the DB?

have you work this out ?


Adding guest networks in guest physical network tab

Fixes https://github.com/apache/cloudstack-primate/issues/758

@blueorangutan package

@davidjumani a Jenkins job has been kicked to build primate packages. I'll keep you posted as I make progress.

Packaging result: :heavy_check_mark:centos :heavy_check_mark:debian :heavy_check_mark:archive.
QA: http://primate-qa.cloudstack.cloud:8080/client/pr/764 (JID-3540)

@blueorangutan package

@davidjumani a Jenkins job has been kicked to build primate packages. I'll keep you posted as I make progress.

Packaging result: :heavy_check_mark:centos :heavy_check_mark:debian :heavy_check_mark:archive.
QA: http://primate-qa.cloudstack.cloud:8080/client/pr/764 (JID-3541)

@rhtyd Good to go!


Added nowrap to days of buffering div

Github Issue (if applicable): #451
Trello Link (if applicable):
Forum Link (if applicable):
Explanation of Bugfix/Feature/Enhancement:
Removes word wrap from days of buffering div
Recommended Release Notes:
toolkit-for-ynab/toolkit-for-ynab/#451

Thank you!

Awesome, glad I could help out.


Attempt to fix binary downloads for scala native

closes #131

closes #131

Looks good :)

Looks good! Would be great to have the headers as well, but if that's not possible, let's merge as-is :)


Deprecate HostConfig at API container start

Close #14777
Signed-off-by: Antonio Murdaca<EMAIL_ADDRESS>

Unluckily, adding a deprecation notice in API response requires modifying the returned status code or add content to a 204 no-content response. I hope the deprecation notice here will suffice.

LGTM

ping @cpuguy83 does this LGTY?

LGTM
ping @vieux @aluzzardi

rebased!

LGTM

:+1:


Why isn't GLFW used as the default windowing system for all 3 desktop platforms?

GLFW is cross-platform and under active development. This change would also simplify the development for flutter on the desktop and allow for a more unified code-base.
Am I missing something?

GLFW does not support a number of core goals of the desktop embedding architecture, including platform view support and add-to-app scenarios.
Anyone who wants a GLFW-based embedding is of course welcome to use one instead; several exist.


Sort out CXX and CC, make detect_cc ONLY detect the compiler type.

Summary:
Compiler flags can get borked.  It causes compilation errors
Description:
Currently stan-dev/math uses $(CC) to specify the C++ compiler and stan-dev/cmdstan (correctly) uses $(CXX) for the same thing.  This breaks things when cmdstan sets $(CXX) from $(CC) but includes stan-dev/math detect_cc in its makefile (which ignores $(CXX)).
Reproducible Steps:
git clone git@github.com:stan-dev/cmdstan
cd cmdstan

edit make/local to say CXX=g++
make examples/bernoulli/bernoulli

This fails because g++ is called with a clang++ flag.
Current Output:
--- Linking C++ model ---
g++ -Wall -I . -isystem stan/lib/stan_math/lib/eigen_3.3.3 -isystem stan/lib/stan_math/lib/boost_1.64.0 -isystem stan/lib/stan_math/lib/cvodes_2.9.0/include -std=c++1y -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -I src -I stan/src -isystem stan/lib/stan_math/ -DEIGEN_NO_DEBUG -DFUSION_MAX_VECTOR_SIZE=12 -stdlib=libc++ -Wno-unused-function -Wno-uninitialized -DNO_FPRINTF_OUTPUT -pipe   -O3 -o examples/bernoulli/bernoulli src/cmdstan/main.cpp -include examples/bernoulli/bernoulli.hpp stan/lib/stan_math/lib/cvodes_2.9.0/lib/libsundials_nvecserial.a stan/lib/stan_math/lib/cvodes_2.9.0/lib/libsundials_cvodes.a
g++: error: unrecognized command line option ‘-stdlib=libc++’
make/models:10: recipe for target 'examples/bernoulli/bernoulli' failed
make: *** [examples/bernoulli/bernoulli] Error 1
Expected Output:
Success.
Additional Information:
http://discourse.mc-stan.org/t/clang-ubuntu-problems/1761
Current Version:
v2.17.0 AND develop

The solution is to modify stan-dev/math makefiles to use CXX and CC correctly, and to move the setting of CXXFLAGS out of detect_cc

We use CXX both for both math and cmdstan. Fixed.


[SPARK-31203][BUILD] Upgrade derby to <IP_ADDRESS> from <IP_ADDRESS>

What changes were proposed in this pull request?
This PR aims to upgrade derby.
Some major changes from this upgrade are
DERBY-6987   The default Network Server security policy file could be trimmed down somewhat.
DERBY-6986  Network Server COMMAND_TESTCONNECTION need not try to open a database
DERBY-6726	NPE from trigger
Why are the changes needed?
To bring some bug fixes.
Does this PR introduce any user-facing change?
no
How was this patch tested?
manual build

Can one of the admins verify this patch?

cc @dongjoon-hyun

Can one of the admins verify this patch?

ok to test

Could you leave some major changes from <IP_ADDRESS> to <IP_ADDRESS> in the PR descritpion? e.g., https://github.com/apache/spark/pull/27860#issue-385900495

Test build #120094 has started for PR 27970 at commit 515f3a0.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/24810/
Test PASSed.

Test build #120094 has finished for PR 27970 at commit 515f3a0.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/120094/
Test PASSed.

Retest this please.

Test build #120107 has started for PR 27970 at commit 515f3a0.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/24820/
Test PASSed.

Test build #120107 has finished for PR 27970 at commit 515f3a0.

This patch fails PySpark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/120107/
Test FAILed.

Retest this please.

Test build #120137 has started for PR 27970 at commit 515f3a0.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/24851/
Test PASSed.

Test build #120137 has finished for PR 27970 at commit 515f3a0.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/120137/
Test PASSed.

Yeah, Derby isn't for production purpose - separate Metastore is supposed to be used. I don't think that security issue actually matters too. Also, yes, I wouldn't upgrade derby but rather try to match with Hive's side.
Furthermore, different Derby can be picked up (see https://github.com/apache/spark/pull/20944).  Sharing it will potentially cause an issue; therefore, technically upgrading does not fully address the issue you pointed out.
-1 from me.

Hi @dongjoon-hyun , i opened the PR because of the security fix. If you suggest this PR is not required then i will close it.
Please provide your suggestions thanks.

If the security issue doesn't directly affect the project, we dont necessarily have to upgrade it. Given that we don't use Derby in production and the upgrade doesn't look completely handling the issue even if it affects Spark, seems not worthwhile upgrading for now.
Can you describe how Spark is affected by the security issue you mentioned?

Thank you all!


Drag child component to drag entire parent element

Hi. Is there a way to drag the parent component of a child component? Let me explain. I have the following code:
import WindowHeader from './WindowHeader'
import Draggable from 'react-draggable'
import './Window.css'

function Window({title, text_color, background_color, children}) {
    return (

            <Draggable>

                    <WindowHeader
                        title={title}
                        text_color={text_color || 'black'}
                        background_color={background_color || 'lightgray'}
                    />

            </Draggable>

                {children}

    )
}

export default Window

I want the <Draggable> component to drag the entire parent ONLY if the <WindowHeader> component is dragged.

Okay, never mind! After reading the README, I realized I had to make the <Draggable> component the parent component of
 and then wrap the <WindowHeader> in a
 with the className of handle. Now everything works!


Status of QUIC and HTTP/3

Hi team,
I moved this from here: https://github.com/MicrosoftDocs/architecture-center.de-de/issues/6
@git001 commented 2 hours ago — with docs.microsoft.com
Do you plan to offer also QUIC & HTTP/3 in your loadbalancers?

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

ID: 936c85d9-c953-2def-c399-77cbda32b24d
Version Independent ID: 9173c834-2c40-9169-b13b-6273759a2c8a
Content: Overview of Azure load-balancing options - Azure Application Architecture Guide
Content Source: docs/guide/technology-choices/load-balancing-overview.md
Service: architecture-center
Sub-service: reference-architecture
GitHub Login: @sharad4u
Microsoft Alias: pnp

Hi @CeciAc Thanks for reaching out. We will review and update as appropriate.

AB#160203 - Thanks for reporting - this issue is under review


Fire multiples tap at the same time ?

I don't know if it's a bug or if I didn't understand how to do it, but how to get multiples tap at the same time like on hammer.js ?
Ex :
var PointerListener = new PointerListener(document.body);

document.querySelectorAll('.box').forEach(box => {
  box.addEventListener('tap, function(event){
	  // do something
  });
});

For the moment if i "tap" on 3 boxes with 3 different fingers at the same time nothing happen !
DEBUG just say !
[PointerListener] pointerdown event detected 2 contact.nomodule.min.js:1:47954
[PointerListener] pointerup event detected contact.nomodule.min.js:1:48580
[PointerListener] hadActiveGestureDuringCurrentContact: false contact.nomodule.min.js:1:51538
[PointerListener] pointerup event detected contact.nomodule.min.js:1:48580
[PointerListener] hadActiveGestureDuringCurrentContact: false contact.nomodule.min.js:1:51538

Thanks for help !

Ok, i found it i have to do like this :
document.querySelectorAll('.box').forEach(box => {
  var PointerListener = new PointerListener(box);
  box.addEventListener('tap, function(event){
	  // do something
  });
});

Thanks for bringing this up. This is a use case I did not have in mind. Currently, a SinglePointerGesture gets invalidated if two pointers are present. I am thinking about implementing a setting which allows multiple parallel SinglePointerGestures with one PointerListener.


Patch curl to find the libssh2 library

When installing curl, it can look for libssh2 and use it to enable the SCP and SFTP protocols support.
I did not set libssh2 as a Build-Depends of curl, as it is not necessarily the behavior everyone wants.

Hi @cguebert, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
The agreement was validated by Microsoft and real humans are currently evaluating your PR.
TTYL, MSBOT;

Thanks for the PR!
I made two changes during the merge:

I bumped the port version, because the produced binaries are different
I added libssh2 as a Build-Depends. This is to avoid the very confusing situation where both curl and libssh2 are installed, but because curl was installed before libssh2, it didn't build with ssh2 support. In the future, we should improve support for optional dependencies, but for now this minimizes end-user pain.