Could not find batching properties in rabbit:listener-container schema

Affects Version(s): 2.2.8

Question
I have upgraded the spring rabbit amqp version to 2.2.8 and could not find the batch properties in the latest schema definition http://www.springframework.org/schema/rabbit/spring-rabbit.xsd under rabbit:listener-container.
Please point me the correct URL schema to refer for defining batch properties under the rabbit:listener-container tag. Or Is this something deprecated and we have to create org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer bean manually instead of using rabbit:listener-container tag.

The schema was fixed in 2.3 (next release); we need to back-port those changes.

Merged as https://github.com/spring-projects/spring-amqp/commit/0d544f19638d42288011d59fcc94ae1b2d82523f

Thanks Gary. Should we need to wait for next release to consume this? Or is that schema available for 2.2.8 version. if yes, I could not see batch-enabled property.

It will be fixed in 2.2.9, which is not currently scheduled for release until July 22.
In the meantime you can just wire up the container as a <bean/> instead and set the properties that way.

Thank you Gary.


Error in screen dump for Test_smoothscroll_one_long_line.

The corrected screen dump puts the cursor on the 1st screen line, the current dump erroneously has the cursor on the 2nd screen line. So the test seems to pass, but in fact it fails. This is related to https://groups.google.com/g/vim_dev/c/YkQbUsC-pek/m/WeyQk4lhAwAJ
BTW, if I do call term_dumpload("Test_smooth_one_long_2.dump") the cursor is shown in the wrong spot. I'm guessing this is an issue in term_dumpload, but this area is not well known (or even poorly known) to me. The first line on the screen is
<<<ts of text with lots of text with lot

The term_dumpload shows the cursor on column 0; but it should be on column 3, the first visible text character on that line.

The corrected screen dump puts the cursor on the 1st screen line, the
current dump erroneously has the cursor on the 2nd screen line. So the
test seems to pass, but in fact it fails. This is related to
https://groups.google.com/g/vim_dev/c/YkQbUsC-pek/m/WeyQk4lhAwAJ
BTW, if I do call term_dumpload("Test_smooth_one_long_2.dump") the cursor is
shown in the wrong spot. I'm guessing this is an issue in
term_dumpload, but this area is not well known (or even poorly
known) to me. The first line on the screen is
<<<ts of text with lots of text with lot

The term_dumpload shows the cursor on column 0; but it should be on
column 3, the first visible text character on that line.

I tried to make it so that when using CTRL-E the cursor moves to a
visible part of the text, but as little as possible.  With 'scrolloff'
zero it might end up on the showbreak or "<<<", then moving it a bit
right seemed the best solution. But one screen line down might be
better.  And when 'scrolloff' is non-zero it gets much more complicated.
Try moving the cursor left-right after some CTRL-E and CTRL-Y, or using
"gj" and "gk".  I do think we can ignore 'scrolljump' here, it's not
important when 'smoothscroll' is set.
I was trying to tackle one part at a time, but there are conflicting
requirements, might need  more wholistic approach.  And good test
coverage (many options interfere, such as 'showbreak').
--
OLD WOMAN: King of the WHO?
ARTHUR:    The Britons.
OLD WOMAN: Who are the Britons?
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- @.*** -- http://www.Moolenaar.net   \
///                                                                      \
\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

On 22/10/27 11:45 AM, Bram Moolenaar wrote:

(got my system back from the shop; so good)
Given: "xxx" is a file with a single line covering 4 screen lines
Do:
 gvim -u NONE -U NONE xxx
 :set smoothscroll
 Ctrl-E

Note that cursor starts at beginning of line, column 0.
After entering Ctrl-E, observe cursor is on 2nd screen line column 0.
It should be on the 1st screen line column 3, just after "<<<".
I thought this was nicer

I see. It also happens when "showbreak=+++", in that case skipping a
screen line doesn't look right to me.

You mean putting the cursor below the +++, instead of right of it?
Since the scrolling is up-down I think it's logical that the cursor is
moved down, not right.  Isn't that happening?  Please give a repro
example if needed.

Moved over to github from mailing list, to attach some images. This PR is about the cursor ending up on the 2nd screen line after CTRL-E so it fits here.
Here's an example with one long line
Before CTRL-E:

After CTRL-E:

I filed #11504 which will fix this.


Update 6.0/sc to version 6.0.29-40ae4983d7

Changes proposed in this pull request:

Update 6.0/sc to version 6.0.29-40ae4983d7

@goofball222

LGTM, thanks for the contribution!


Create Table of Contents for Part 19

Is your feature request related to a problem? Please describe.
A linked table of contents needs to be added to aid in navigating the tutorial
Describe the solution you'd like
Just simply link the table of contents to the headers in the tutorial just like in many parts of this repository.

Hey @rcallaby ,
Can you assign me this issue ?

@shubhampaliwal3011 I have assigned you a different task, please allow others the opportunity to contribute.

Hi @rcallaby , can I please be assigned to this task/issue?

Hi @rcallaby , I have done some experimentation and research and I would like to be assigned to this task please! Thanks


License

hi,
thanks for releasing this! would you mind adding a license?
thanks!

It's all MIT licensed, thanks for raising the issue. Added a license file!

thanks!


Should support trackpad gestures from host

When running on a desktop platform, Flutter should be able to get trackpad gesture information from the host to enable scrolling.

Gestures should include scroll, pinch, and zoom.
Scroll is already minimally supported, because it falls back to emulating mouse scrollwheel, which is already implemented, but it's not as proportional as it should be.

I had a proposed approach for gestural scroll (which assumed the OS itself was providing pre-interpreted gesture streams, as are available on macOS for scroll and pinch, for instance), which was intended to be extensible to other gestures like pinch to zoom, but Hixie was concerned that as implemented it conflated pre-interpreted gestures with the raw gesture input that recognizers are designed for.
Where it left off was that he wanted a doc that cataloged all the relevant gesture stream info that was available for each OS (we'd want to cover macOS, Windows, Linux, and Chrome OS), so that we could design accordingly. That's still on my TODO list, but has been consistently below other work in priority, so if someone else wants to do that before I get to it I'm happy to hand off.

(For background see the discussion on #21953, particularly the end.)

Note for a temporary fix in AndroidTouchProcessor.java:
On a Chromebook, if the user scrolls using two fingers on the trackpad, ARC translates it into a mouse down-move-up event sequence with "buttons: 0", which is no longer acceptable by DragGestureRecognizer.
This temporary fix patches these events by setting buttons to 1, the primary button. This is by no means perfect, besides being ugly, but also it can trigger unintended drags that are not scrolling. The correct way is to implement trackpad gestures (as in this issue), but it is a much bigger job.
After this issue is fixed, remove the patch (the if-clause).

@dkwingsmt @gspencergoog @stuartmorgan Are you guys working on this? We need this functionality for our project! Thanks.

While I understand the importance of this feature, I don't think any of us 3 are working on it at the moment.  This is still on my radar and might come back after issues of higher priorities are finished.

iPadOS 13.4 (March 24 release) supports mouse/trackpad for 2018 iPad Pro.

@gspencergoog @stuartmorgan could this issue please be expanded to include the ability to react to all trackpad changes, not just the limited set of gestures that were enumerated in the first comment https://github.com/flutter/flutter/issues/23604#issuecomment-488523607 i.e. force touch information on macOS (#53988) and changes to individual fingers via Listener.onPointerSignal.

No; those are all district things that need distinct solutions. Please file a new feature request for raw touch information.

Will this also support touch screens on Notebooks? Is this already supported on any desktop platform?

Touch screen on notebook is supported by touch events, and I would be surprised if it isn't already supported; although if you're talking about pinching and rotating, that have to be recognized by the app. Otherwise, for touchpad, no progress yet.

I would be surprised if it isn't already supported

Touch events have not been wired up in any desktop embedding. That's unrelated to this issue though (see #52202, #65171)

To do this on Windows with max perf we’d have to use DirectManipulation or InteractionTracker API’s

To do this on Windows with max perf we’d have to use DirectManipulation or InteractionTracker API’s

Other than scroll gestures, also "back" and "forward" trackpad gestures should be supported. They are commonly used gestures on macOS.

I'm also facing this issue while trying to do pinch zoom using the trackpad on a macOS with an interactive viewer widget.

This issue was opened on Oct 2018, now we have April 2021. Many issues were closed as duplicates of this issue, but here not much seems to happen. And I think the reference to a trackpad is misleading, because I want to be able to zoom/rotate on Windows or Web even without having a trackpad, just using a mouse. Either with a mouse wheel, or in a way similar to what Kivy does for Python: A right click paints a dot on the screen, simulating one finger, another mouse-click with hold simulates the second finger, which can now be moved around, towards or away from the dot, thus causing zoom or rotate. Another click on the dot removes it again.

And I think the reference to a trackpad is misleading

It isn't, because this issue is about wiring up trackpad gestures. If you want something else, that needs to be filed as a separate issue.

OK, not misleading. I had the impression that people who migrate from an Android or IOS Flutter app to a Web or Windows app like me, and are surprised that they cannot pinch and zoom, come eventually to this issue, because trackpad gestures come close to what you can do on a mobile screen. But not all trackpads support more than one finger, and many PCs do not even have a trackpad. Therefore I think it would be nice to have something in the platform, that emulates two finger gestures. Like with kivy. But you are right, such a feature needs a separate issue. In the meantime, I use the Listener widget and the mouse wheel. With no mouse key pressed, the wheel zooms, with a key pressed, it rotates.

I found several problems:

Trackpad scrolling produces a delta of zero in a Windows Window, but not Flutter web on Windows.
onPointerSignal in Listener does NOT fire when any other key is pressed. This works in Flutter web, but not Windows. It fires extremely inconsistently on Windows.

Here's a dartpad replicating the behavior. It works in the dartpad website, but they won't fire properly on Windows.
https://dartpad.dev/0bba2bc60f5ea81322463f91a37c5053?null_safety=true
I need to add that I have the synaptics touchpad driver.

Should I file a separate issue or keep this here? This functionality is crucial to my team's project for accessibility purposes.

@SwissCheese5 You should file new issues. This issue is about supporting trackpad gestures directly; the fact that trackpad scroll currently sends scroll wheel events is partial workaround for the lack of support tracked here. Limitations with that workaround would be unrelated to this.

Done, thank you.

Not just scroll, we can't even select a particular text in Web.

Idk why but there are still no updates on this issue. Its a major problem and should be solved ASAP. I also have my flutter web project that needs this. Please solve it 🙏

@dkwingsmt @gspencergoog @stuartmorgan
I think since iPadOS only exposes the trackpad gestures through UIKit gesture recognizers, an approach of parsing raw trackpad touches in Flutter won't work. It will have to involved forwarding the native gesture details to the proper GestureRecognizers.
By faking touches instead of sending scroll events, I was able to get two-finger swiping gestures to behave identically to native UIKit. Of course it will be better to turn the events into DragUpdateDetails and route them to the GestureRecognizer underneath the cursor.
https://github.com/moffatman/engine/commit/1ff25130a7130f1e6cdfbb2bfde5b6ce712b302e
I am happy to contribute to this feature. I would love to get the native trackpad feel on my app on iPad, so please let me know if I'm wasting my time here or it's something I should continue at.

https://github.com/flutter/flutter/issues/23604#issuecomment-488545525 is still the next step for this issue. This needs a design doc before it is implemented.
If you want to contribute to this feature, making that document would be the next step.

Any progress on this would be greatly appreciated. I feel like this is one of the most crucial features for Flutter web.

I have almost completed my design document and some implementations. Hate to break it to you @khari998 but I don't believe it will be possible to get trackpad gestures working on the Web.

I have almost completed my design document and some implementations. Hate to break it to you @khari998 but I don't believe it will be possible to get trackpad gestures working on the Web.

I just converted a production website to Flutter Web and this seems to be the only thing missing. I want to cry 🙃
What is preventing this from being possible?

The browser doesn't tell web application code when scrolling ends. So we can't know whether the user is still holding their fingers on the trackpad or they lifted them off. See https://github.com/w3c/uievents/issues/58. Only on Safari it could be possible, since they have a non-standard feature called Gesture Events. But in general the browser steals all the gestures for itself and does the zooming and manipulating of the page.

The browser doesn't tell web application code when scrolling ends. So we can't know whether the user is still holding their fingers on the trackpad or they lifted them off. See w3c/uievents#58. Only on Safari it could be possible, since they have a non-standard feature called Gesture Events. But in general the browser steals all the gestures for itself and does the zooming and manipulating of the page.

So basically Chrome interprets the gestures from the trackpad by itself for the HTML it renders but is not able to handle it for Flutter because Flutter isn't in HTML?

I think Web has standardized scroll events but I guess probably not for zooming events or scroll ends, or other details. Anyway, I'm looking forward to @moffatman's design docs. :)

@dkwingsmt
Here's the document: https://flutter.dev/go/trackpad-gestures
I have it implemented on nearly all platforms, but it's not cleaned up. So I'll wait for design comments then fixup before creating the PR.

TODO
After this is implemented, revert the patch in flutter/engine#11420 by removing the if-clause and the variable _POINTER_BUTTON_PRIMARY.
For reasoning, see the PR.

This TODO will be fixed by https://github.com/flutter/engine/pull/31595/files#r870134971. However, I'll to test it on a real device.


Adding a *.domain.tld possibilty

I read quickly RFC's and CORS website, it doesn't allow nor disallow this; I needed it, it may be useful to somebody else.
Changes proposed in this pull request:

Allow to have a 'allow_origins' => ['https://*.example.com'] to match all subdomains from example.com

I think you added this snippet to the wrong method? It should probably be in isOriginAllowed().

Yup, sorry, I copy-pasted too quickly.

Can you use a library like league/uri to break down the URL instead of this manual stuff?

Oh, good idea ! I'll look after it.

Would it perhaps make more sense to add regex support like here: nelmio/NelmioCorsBundle#65 ?

Well, if you prefer, but I liked the fact that it still looked like normal URIs in the config file.

I think it would be easier to implement regular expressions than parsing the URL for wildcards etc., plus it can be more flexible, e.g. you may only want to allow app1.example.com, app2.example.comup toapp99.example.com`

I added and used league/uri. I must admit, it's cleaner 😄
It seems to require and use PHP 7+, and this require 5.6+. You may want to upgrade the PHP version requirement, as the last Lumen use 7+ ?

I think it would be easier to implement regular expressions than parsing the URL

I'm not a big fan of RegExp in fact, but if you think it's for the better...
Do you sees it as a foreach (domain) if (preg_match(domain, origin)) return true ?
If so, I'll close this and make a new PR.

It should not require a version that is incompatible with PHP 5.6 if you run composer require league/uri

The 4.2.3 is the last compatible with PHP <7, but it's not supported anymore by PHPLeague since 06/08/2017. We should not use that.

I don't think it's a dealbreaker if it's supported or not as long as it works for this particular use case.

So be it !
I've made the edits.

I'll hope it's ok this time.
Thanks for your patience.

Hi,
It seems you forgot to accept my PR, now that's it's close to the project standard ?

I'm going to close this PR due to inactivity. It is still missing test cases for example so it can't be accepted in its current form. Feel free to re-open this PR if you find the time to finish it.


Docs.MS Release Updates for azure-core-tracing-opentelemetry

Update docs metadata and targeting for release of azure-core-tracing-opentelemetry

Docs Build status updates of commit 6ee94c5:
:warning: Validation status: warnings

File
Status
Preview URL
Details

docs-ref-services/preview/core-tracing-opentelemetry-readme.md
:warning:Warning
View (azure-java-preview)
Details

package.json
:white_check_mark:Succeeded

docs-ref-services/preview/core-tracing-opentelemetry-readme.md

Line 2, Column 1: [Warning-ms-prod-and-service] Only one of the following attributes can exist: 'ms.prod', 'ms.service'. Use ms.prod for on-premise products, or ms.service for cloud services.
Line 9, Column 16: [Warning-ms-prod-technology-invalid] Invalid value for 'ms.technology': 'azure' is not valid with 'ms.prod' value 'azure'.
Line 11, Column 13: [Warning-ms-service-subservice-invalid] Invalid value for 'ms.service': 'plugin'.
Line 2, Column 1: [Suggestion-description-missing] Missing required attribute: 'description'.
Line 22, Column 1: [Suggestion-table-syntax-invalid] Table syntax is invalid. Ensure your table includes a header and is surrounded by empty lines. NOTE: This Suggestion will become a Warning on 1/29/21.
Line 30, Column 5: [Suggestion-preserve-view-not-set] Did you mean to link to a specific version? It's usually better not to specify a version, so the link always goes to the canonical version. If you really need to link to a specific version, add &preserve-view=true to the URL: https://docs.microsoft.com/java/azure/jdk/?view=azure-java-stable. Otherwise, remove the view parameter.

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel


How to disable server-side javascript operation as configuration

I've checked some online material. There are two solutions, one is editing mongod.conf () file another one is mongod --no-scripting. I think the first one is a permanent one. How can I achieve that?. I can't able to find that mongod.conf file

I do not understand what you are asking for. This is Elixir's MongoDB client library so it has nothing to do with mongod.conf at all.

Sorry for the wrong question. I was using alphine-mongo container and I can't able to find mongod.conf in that container. So, I thought by using Mongo.start_link() options. we can set those configurations. Is there is any way to set that configuration in the container?


Panci doesn't support Tox with variables

Try this tox file for example: https://github.com/WoLpH/django-tags-input/blob/master/tox.ini
Calling panci like this: panci --to travis tox.ini I get this output:
language: python
python:
- '{.2'
- '{.2'
- '}.-'
- '{.3'
- 3.}
script: '

  pip freeze

  python setup.py test'

Just wanted to say thanks for this lovely tool. I would like to see this feature added, but don't have time myself either :(

See https://github.com/msabramo/python-panci/pull/16
Thank you, @maikhoepfel, for the idea of parsing the output of tox -l!

Thanks for the fix @msabramo, I honestly completely forgot about this issue... my bad

@WoLph: No worries. It's my project and any help I get with it is appreciated but not expected!


Improve GNU testsuite + improve rm output

Fixed a few gnu tests:
Warning: GNU testsuite = TOTAL: 601 / PASS:  159 / FAIL:  332 / ERROR: 20
was
Warning: GNU testsuite = TOTAL: 601 / PASS:  154 / FAIL:  337 / ERROR: 20


Distribute examples as JSON

Then you can import them directly for testing (with https://www.typescriptlang.org/tsconfig#resolveJsonModule)

(i.e. import * as data from 'myst-spec/dist/examples/commonmark.basic.json'

The JSON should be there?
<EMAIL_ADDRESS>See the myst.tests.json does the import work? This is the full test suite, but can be stripped down by title I think?

Ah yeh missed that cheers.
But, as just mentioned on slack, it might be helpful to allow for breaking down by "category" i.e. the original filenames.
Either having the tests as separate JSON, or appending it to each test case dict.
For, https://github.com/executablebooks/unified-myst, I wanted to start introducing the tests incrementally (starting with the "basic" commonmark ones)

No worries, I figured it out


Optional random() argument

Hi!
I found the project very funny and interesting! But I would like to propose an improvement...
As a lover of cats, I might have in mind by which letter I want the name of my pet to start, even though I have no clue of the full name:
const catNames = require('cat-names');

catNames.random('W'); // > 'Whiskers'

PD: why no PR with new names? My :cat2: is called Schrödinger, I think it's an awesome name! :smile:

Glad you like it. The .random function is just for convenience. Not really interested in adding anything more. The main thing here is the list. You're free to create additional modules making use of the data.

why no PR with new names?

I sourced the names from the 100 most popular cat names of 2015 or something. If I opened up submissions everyone would submit their cat name, and cats can be named pretty much anything, and I don't have the time to manage all those submissions. You could always create your own fork of this module with more names. For my needs, 100 names is more than enough though.


add readme file

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (572ef52) 44.44% compared to head (9c3236b) 44.44%.

Additional details and impacted files
@@            Coverage Diff            @@
##               main       #2   +/-   ##
=========================================
  Coverage     44.44%   44.44%
  Complexity        8        8
=========================================
  Files             5        5
  Lines            27       27
=========================================
  Hits             12       12
  Misses           15       15

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


dependency issues

trying to install the requirements.txt, facing lot of dependency issues.
will it be possible to create an updated requirements.txt as these packages have evolved a lot, and current set have lot of dependency issues, between openai, langchain, gardio, langkit[all]
using pyenv with python 3.11.2

pydentic is causing lot of issues, tried few version to experiment
The conflict is caused by:
    gradio 4.8.0 depends on pydantic>=2.0
    langchain 0.1.0 depends on pydantic<3 and >=1
    ray[default] 2.5.1 depends on pydantic; extra == "default"
    fastapi 0.89.1 depends on pydantic!=1.7, !=1.7.1, !=1.7.2, !=1.7.3, !=1.8, !=1.8.1, <2.0.0 and >=1.6.2
    gradio 4.8.0 depends on pydantic>=2.0
    langchain 0.1.0 depends on pydantic<3 and >=1
    ray[default] 2.5.1 depends on pydantic; extra == "default"
    fastapi 0.88.0 depends on pydantic!=1.7, !=1.7.1, !=1.7.2, !=1.7.3, !=1.8, !=1.8.1, <2.0.0 and >=1.6.2

Yeah homie, we made the decision to finish writing all of the projects,
then we’ll update the requirements.txt along with some other helpful
package management so it’s nice for you to run.
My book: LLMs in Production
45% discount - https://shortener.manning.com/amDJ
Dňa ne 28. 1. 2024 o 6:46 Sagar Desai @.***>
napísala(a):

trying to install the requirements.txt, facing lot of dependency issues.
will it be possible to create an updated requirements.txt as these
packages have evolved a lot, and current set have lot of dependency issues,
between openai, langchain, gardio, langkit[all]
—
Reply to this email directly, view it on GitHub
https://github.com/IMJONEZZ/LLMs-in-Production/issues/1, or unsubscribe
https://github.com/notifications/unsubscribe-auth/ALEZCMEEPEPOD2ERK4Q6B2DYQZJDBAVCNFSM6AAAAABCOGC4NGVHI2DSMVQWIX3LMV43ASLTON2WKOZSGEYDIMJXGIYDGMQ
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

Already purchased book, great collection,
sounds good, I will wait try out till then.


MNT add annotation to several methods in computer vision functions

MNT

add to imports: NamedTuple, Iterable and List

add annotation to: add_image, get_image_from_map, find_multiple, find find_until, find_all, find_text, find_process, get_last_element, screenshot get_screenshot, screen_cut, get_element_coords, get_element_coords_centered

updated the documentation from methods: find_multiple, find, find_until find_all, find_text, find_process, get_element_coords

removed the duplicity of (x,y) variables by setting a default value in the function definition
old:
   x = x or 0
   y = y or y
new (in function definition):
   x: int = 0
   y: int = 0

Automatic linter changes:
I'm currently using pyright, black and flake8 to help with linting, formatting and code style.
changes related to the next functions were made by the linters.

added double quotes as default logging
updated the identation of some functions uses: functools.partial(), _replace() locate_all_opencv(), locate_all_opencv(), find_all(), click(), click_relative() mouse_click(), double_click_relative(), find_app_window(), find_app_element() connect_to_app(), right_click_relative()

The second PR related to the issue #49

studying a better way to annotate this function, nice tests guys! ;)


Fixes #3389 [User Profiles] - Show user's profile when his name is clicked

**Description (required)
Fixes #3389
**What changes did you make and why?
Profile Activity, AchievementsFragment, ContributionsFragment & LeaderboardFragment accept username instead of using the default account.
Added RemoteDataSource for contributions that do not persist contributions.
On Clicks on AuthorNames in  MediaDetails, Menu-Options in MediaDetails & Leaderboard list takes to the profile of that user with the corresponding Achievements, Leaderboard and ContributionsList.
Tests performed (required)
Tested betaDebug/prodDebug on API 29
Screenshots (for UI changes only)
---
- - -

Codecov Report

Merging #4393 (b8f4146) into master (a5154fb) will decrease coverage by 0.05%.
The diff coverage is 2.60%.

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

Hi @nicolas-raoul , Sorry I missed this before, I have updated my PR with the changes.

Wow some conflicts appeared here :( This issue has lower priority but writing these just to remind you Ash.

Hey @ashishkumar468 , would you prefer this PR be closed? I think it can be easier to start all over again than fixing conflicts. What do you think?

Hey @neslihanturan , let me try to rebase the PR, based on the effort needed to do that, I will get back : D

Hey @ashishkumar468 :) Do you think it is worth to rebase?


FittedBox RTL

alignment needs to be AlignmentGeometry.

See Align for the pattern.

Fixed by https://github.com/flutter/flutter/pull/12662


Missing files

Amazing project. Thanks for the effort. Files are missing, for eg; train_predict_index.npy, test_predict_index.npy
train_predict_index = np.load("train_predict_index.npy", allow_pickle=True)
test_predict_index = np.load("test_predict_index.npy", allow_pickle=True)

In the prediction, the model file is missing: gen_GRU_model_89.h5
G_model = tf.keras.models.load_model('gen_GRU_model_89.h5')
Really appreciate it if you could upload them. Thanks. :)

I don't think we use the file name as "train_predict_index" anymore, it should be 'index_train.npy' and 'index_test.npy', and you will get the index files while you run the code "2. data_preprocessing.py".

Okay. Thank you.
And the model file? Will that generate after training? I couldn't find the code where you were saving the model as 'gen_GRU_model_89'

Generated them. Thanks.


220713 enhance test coverage

Codecov Report

Merging #51 (086db1b) into version/0.13.0 (82aa6e9) will increase coverage by 0.78%.
The diff coverage is 100.00%.

@@                Coverage Diff                 @@
##           version/0.13.0      #51      +/-   ##
==================================================
+ Coverage           94.59%   95.38%   +0.78%
==================================================
  Files                  28       28
  Lines                2757     2772      +15
  Branches              674      613      -61
==================================================
+ Hits                 2608     2644      +36
+ Misses                147      126      -21
  Partials                2        2

Impacted Files
Coverage Δ

src/columns.ts
96.33% <100.00%> (-2.07%)
:arrow_down:

src/errors.ts
100.00% <100.00%> (ø)

src/index.ts
100.00% <100.00%> (ø)

src/models/Condition.ts
86.39% <100.00%> (+14.96%)
:arrow_up:

src/steps/Step.ts
98.85% <100.00%> (+1.61%)
:arrow_up:

src/steps/DeleteFromStep.ts
100.00% <0.00%> (+9.52%)
:arrow_up:

src/util.ts
100.00% <0.00%> (+12.50%)
:arrow_up:

Continue to review full report at Codecov.

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


Added => Algo => Quick Sort => Go

Assigned Issue Number ?
#91
Language Opted ?
Go
Number of files added or updated ?
1
Name of these files ?
Algorithms => Sorting_Algorithms => Quick_Sort => Quick_Sort.go
Checklist

[x] I've read the contribution guidelines.
[x] I've referred the correct issue number.
[x] I've fill up this entire template correctly.

@ahampriyanshu Hello, I'm keeping receiving emails about adding my name to contribuitors list and it keeps failing, is annoying, how can it be fixed?


Count vowels

Ghyath Ibrahim
#26 Count Vowels

This module provides functionality to count vowels in a given string,
considering both lowercase and uppercase vowels (a, e, i, o, u).
Behavior
Files

[ ] The file name describes the function's behavior
[ ] There is a module docstring in the function file
[ ] The test file's name matches the function file name -
/tests/test_file_name.py
[ ] There is a module docstring in the tests file

Unit Tests

[ ] The test class has a helpful name in PascalCase
[ ] The test class has a docstring
Every unit test has

[ ] A helpful name
[ ] A clear docstring
[ ] Only one assertion
[ ] There is no logic in the unit test

[ ] All tests pass
[ ] There are tests for defensive assertions
[ ] There are tests for boundary cases

Function Docstring

[ ] The function's behavior is described
The function's arguments are described:

[ ] Type
[ ] Purpose
[ ] Other assumptions (eg. if it's a number, what's the expected range?)

The return value is described

[ ] Type
[ ] Other assumptions are documented

The defensive assertions are documented using Raises:

[ ] Each assumption about an argument is checked with an assertion
[ ] Each assertion checks for only one assumption about the argument

[ ] Include 3 or more (passing!) doctests

The Function

[ ] The function's name describes it's behavior
[ ] The function's name matches the file name
[ ] The function has correct type annotations

Strategy
Do's

[ ] Variable names help to understand the strategy
[ ] Any comments are clear and describe the strategy
[ ] Lines of code are spaced to help show different stages of the strategy

Don'ts

[ ] The function's strategy is not described in the documentation
[ ] Comments explain the strategy, not the implementation
[ ] The function does not have more comments than code

If it does, consider finding a new strategy or a simpler implementation

Implementation

[ ] The code passes the formatting checks
[ ] The code passes all Ruff linting checks
[ ] The code has no (reasonable) Pylint errors

In code review, you can decide when fixing a Pylint error is helpful and
when it's too restricting.

[ ] Variables are named with snake_case
[ ] Variable names are clear and helpful
[ ] The code follows the strategy as simply as possible
[ ] The implementation is as simple as possible given the strategy
[ ] The code includes defensive assertions
[ ] Defensive assertions include as little logic as possible

Great work on the Implementation. It's well formatted, clean, simple, and easy to understand with well-named variables.
Very well structured and follows all key testing principles : clear organization, good coverage of edge cases, meaning full names and helpful docstrings.
Good use of lower() for case sensitivity and .strip() for whitespace check.
All checks passed by Ruff Check.
All checks passed by Pylint 10.00/10.

Ghyath Ibrahim
– #26
This module provides functionality to count vowels in a given string,
considering both lowercase and uppercase vowels (a, e, i, o, u).
Behavior
Files

[X] The file name describes the function's behavior
[X] There is a module docstring in the function file
[X] The test file's name matches the function file name -
/tests/test_file_name.py
[X] There is a module docstring in the tests file

Unit Tests

[X] The test class has a helpful name in PascalCase
[X] The test class has a docstring
Every unit test has

[X] A helpful name
[X] A clear docstring
[X] Only one assertion
[X] There is no logic in the unit test

[X] All tests pass
[X] There are tests for defensive assertions
[X] There are tests for boundary cases

Function Docstring

[X] The function's behavior is described
The function's arguments are described:

[X] Type
[X] Purpose
[X] Other assumptions (eg. if it's a number, what's the expected range?)

The return value is described

[X] Type
[X] Other assumptions are documented

The defensive assertions are documented using Raises:

[X] Each assumption about an argument is checked with an assertion
[X] Each assertion checks for only one assumption about the argument

[X] Include 3 or more (passing!) doctests

The Function

[X] The function's name describes it's behavior
[X] The function's name matches the file name
[X] The function has correct type annotations

Strategy
Do's

[X] Variable names help to understand the strategy
[X] Any comments are clear and describe the strategy
[X] Lines of code are spaced to help show different stages of the strategy

Don'ts

[X] The function's strategy is not described in the documentation
[X] Comments explain the strategy, not the implementation
[X] The function does not have more comments than code

If it does, consider finding a new strategy or a simpler implementation

Implementation

[X] The code passes the formatting checks
[X] The code passes all Ruff linting checks
[X] The code has no (reasonable) Pylint errors

In code review, you can decide when fixing a Pylint error is helpful and
when it's too restricting.

[X] Variables are named with snake_case
[X] Variable names are clear and helpful
[X] The code follows the strategy as simply as possible
[X] The implementation is as simple as possible given the strategy
[X] The code includes defensive assertions
[X] Defensive assertions include as little logic as possible


Change JetBrains Logo on Website

Documentation is

[ ] Missing
[X] Outdated
[X] Confusing
[X] Not sure?

Explain in Detail
Hi there, this is not really a bug, we just noticed that the JetBrains logo is quite hard to identify on the WebSite so if possible we would like to update the logo. I am more than happy to file a pr, I was just not able to locate https://sponsors.vuejs.org/images/jetbrains.png in the codebase, so if you have any pointer for me I am more than happy to resolve this myself
Your Suggestion for Changes

Here is the logo we would like to use
Reproduction
No response
Steps to reproduce
No response

Updated! (also adjusted CSS to make it appropriately sized)

looks great, thanks a lot for taking care of it, very much appreciate it!


About us page - Design Changes

Pictures to the left and smaller pics.
pic size: 200px x 200px and margin between the persons is 50px
from

Donie :D


Wrong name for an item

Issue description
When I was looking through the items in the mod I found this ruby looking thing, but it had the name "Banana". I'm pretty sure that it isn't supposed to be named Banana but since this isn't a huge bug, you don't need to fix it pronto.

Steps to reproduce

Look at items
Look for ruby looking item
It shows the name banana

Minecraft version
1.21 (Latest)
Fabric loader version
0.16.0
Fabric API version
0.100.8+1.21
Oritech version
0.8.0
Other relevant versions
No response
If a (crash)log is relevant for this issue, link it here: (It's almost always relevant)
No response

Thanks, the banana item was/is the first testing item I added when starting the mod. I then just kinda forgot about it. I've added a proper model for it now, although uses are still missing. That might come in the future. The texture will be included in the next release (probably 0.8.1)


⚠ Bofrost.at has degraded performance

In 4284db6, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 1702 ms

Resolved: Bofrost.at performance has improved in 6e9f2b6 after 30 minutes.


Iterating devices and supported families

Iterating all available devices can take a lot of time when there are multiple sensors on the 1-wire bus. The typical way to iterate all devices, also used in the library in both setResolution() functions, is with a for-loop like this:
DeviceAddress deviceAddress;
for (int i = 0; i < sensors.getDeviceCount(); i++) {
  sensors.getAddress(deviceAddress, i);
  [do something with the deviceAddress]
}

This way to iterate all devices takes a lot of time because the getAddress() function starts to look for devices from the start. Every time it is called, it finds the first device address first and keeps going until the device is found at the index asked for. Schematically:
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5

The Onewire protocol and library make it possible to continue the first address search and win a lot of time, schematically:
1
> 2
  > 3
    > 4
      > 5

With five sensors on the 1-wire bus this way of continuing the search would save the time of 'finding' 10 addresses. This functionality can be added to the DallasTemperature library by adding these two functions, their names are consistent with the resetAlarmSearch() and alarmSearch() functions:
void DallasTemperature::resetAddressSearch(void) {
  _wire->reset_search();
}

bool DallasTemperature::addressSearch(uint8_t* deviceAddress) {
  if ( !_wire->search(deviceAddress) )
    return false;
  if ( !validAddress(deviceAddress) )
    return addressSearch(deviceAddress);
  return true;
}

The typical and faster way to iterate all devices using these functions becomes:
DeviceAddress deviceAddress;
sensors.resetAddressSearch();
while ( sensors.addressSearch(deviceAddress) ) {
  [do something with the deviceAddress]
}

The library could use resetAddressSearch() and addressSearch() in both setResolution() functions. I did some speed measurements changing the resolution 10 times with both the global and the one address setResolution functions. I started with the setResolution branche of Rob Tillaart which is optimized already on other aspects. For the measurements I turned of the AutoSaveScratchPad flag, toggled back and forth between resolution 10 and 11 for 5 times and had 3 sensors connected. These were the results:
Getting addresses by index >>
10x setResolution(global):  1513 ms
10x setResolution(address): 1452 ms

Searching next address >>
10x setResolution(global):  1079 ms (28.7% faster)
10x setResolution(address): 1018 ms (29.9% faster)

So the library can gain speed by using resetAddressSearch() and addressSearch(). Adding them as private functions would be a gain, but libary users may also be interested in using them. What is your opinion, should they be added as private or public functions, or not added at all?

Aside from speed there are additional problems in the (old) typical way to itterate all devices, also found in the library in both setResolution() functions:

Forgot to check return value of getAddress(). In itself easy to add. It should be checked because the value returned by getDeviceCount() is reflecting the number of devices on the 1-wire bus when begin() was (last) executed. This number may be changed since that moment. The new way of itterating solves this problem.
Forgot to check if the found address belongs to a device supported by the library. This can be checked with validFamily(). Intuitively one may think using getDS18Count() instead of getDeviceCount() in the for-statement would solve this, but that won't work as the indexes used in getAddress() also increase for unsupported devices.

I can think of two ways this last problem can be countered:

First, the library can be altered to only count supported deviced when indexes are used. Similarly, the addressSearch() function above would only find supported device families. Maybe a bit over the top would be to add validFamily() checks to every function sending a command to a device. With this the current behavior of the library is slightly altered, but maybe this is the way implementation was always meant to be?

Second, it is posible to add a flag to the addressSearch() function to indicate if all devices or all supported devices are needed. When this is preferred to the solution above, an additional question arrises: should the default be to find (a) all devices, or (b) all supported devices?

My personal order of preference would be (1) first, then (2b) and then (2a). What do you think?

While looking into the search code of the OneWire library I noticed it also supports the Conditional Search command that is used to search for devices in an 'alarmed' state. The DallasTemperature seems to use adapted code from an old version of the OneWire library in the alarmSearch() function. Since then there has probably been good reason to replace the code in the OneWire library 'by the one from the Dallas Semiconductor web site' (as is noted in the comments of the OneWire library).
I'm wondering if the separate search code for alarms in DallasTemperature is still needed. Using the standard capability in the OneWire library would reduce compiled size and there would be no need to declare global variables alarmSearchJunction, alarmSearchExhausted and alarmSearchAddress[] anymore. It may even not be needed to use REQUIREALARMS anymore. But maybe I'm not aware of reasons to duplicate the conditional search capability... What is your opinion on this?

Part 1:  loops to iterate over devices are O( n x (n-1) ) while it could be O(n)
You did an experiment with 3 devices, that means
1
1 2
1 2 3
6 steps == 151 ms
was replaced by
1
2
3
3 steps == 101 ms
==> every search saved == ~15 ms,  IMHO a substantial gain.
[prediction 2 devices ==> 1 saved search == 15 ms]
[prediction 4 devices ==> 6 saved searches == 90 ms]
Public vs Private
The function sensor.getAddress() is public and used for quite some time.  So the new functions must be made public too (same purpose)
Recursion
One point of attention is that addressSearch(deviceAddress) is recursive and on a microprocessor the stack and heap are already close enough :)
I propose to rewrite  [ please verify ] - might gain a few micros too.
bool DallasTemperature::addressSearch(uint8_t* deviceAddress) {
	while (_wire->search(deviceAddress)) {
		if (validAddress(deviceAddress)) return true;
	}
	return false;
}

Addressing by index
Addressing the sensors by index is IMHO error prone as sensors or other one-wire devices may fail causing their "numbering" to change run time.  Although I back the above proposal, it is not adequate to solve this issue.  Think also of the scenario in which one sensor fails and is replaced by another one. The numbering will probably change.
To be sure to read the right sensor one must use its address. As this takes 8 bytes per sensor it uses a lot of space on a small processor. Therefor I proposed to use the alarm fields as user data fields  which makes it possible to use a single byte to address the right sensor, even when others are broken or replaced (with same user data field of course) .
Other addressing scheme?
I have been thinking of another addressing scheme to identify DS sensors.  (not 100% fool proof but almost in most scenarios) It uses byte 7 [CRC] of the sensor address as the unique id of the sensor. It can have 256 unique values and even for up to 20 sensors it is still relative easy to find sensors with an unique ID/CRC.  Advantage is that one does not need the alarm fields for unique ID.
A variation on this scheme uses 2 bytes of the 8 address bytes as identification. From my limited heuristics byte 1 seems a good candidate. Combined with the CRC this gives 65536 possible id's which makes the chance of address collision pretty small even up to 100 sensors.
Keeping one byte per sensor is not as memory consuming as keeping all 8 address bytes.
To make this work one should have a function like
bool getAddressFromCRC(uint8_t* address, uint8_t CRC)
{
  resetAddressSearch();
  while ( sensors.addressSearch( address ) ) {
    if (address [7] == CRC) return true;
  }
  return false;
}

so far my feedback, the other points I'll have to think about a bit more.

While looking into the search code of the OneWire library I noticed it also supports the Conditional Search command that is used to search for devices in an 'alarmed' state. The DallasTemperature seems to use adapted code from an old version of the OneWire library in the alarmSearch() function. Since then there has probably been good reason to replace the code in the OneWire library 'by the one from the Dallas Semiconductor web site' (as is noted in the comments of the OneWire library).

I'm wondering if the separate search code for alarms in DallasTemperature is still needed. Using the standard capability in the OneWire library would reduce compiled size and there would be no need to declare global variables alarmSearchJunction, alarmSearchExhausted and alarmSearchAddress[] anymore. It may even not be needed to use REQUIREALARMS anymore. But maybe I'm not aware of reasons to duplicate the conditional search capability... What is your opinion on this?

If it is possible to keep the interface and at same time reduce /minimize  the footprint is always a good idea...

Part 1: loops to iterate over devices are O( n x (n-1) ) while it could be O(n)
==> every search saved == ~15 ms, IMHO a substantial gain.
Public vs Private
The function sensor.getAddress() is public and used for quite some time. So the new functions must be made public too (same purpose)

Good to know you share my opinion. :thumbsup:

Recursion
One point of attention is that addressSearch(deviceAddress) is recursive and on a microprocessor the stack and heap are already close enough :)
I propose to rewrite [ please verify ] - might gain a few micros too.

Good to rewrite the recursion as a loop, I think the proposed code is correct.

Addressing by index
Other addressing scheme?

A lot to think about... I read earlier posts about this and will think about these points too.
AlarmSearch

If it is possible to keep the interface and at same time reduce /minimize the footprint is always a good idea...

By using the OneWire library search function for the conditional/alarm search too, the internal search variables will be shared with the normal/address searches. It will not actually change the interface, but a small part of behavior will change: because the search variables will be shared the alarmSearch will be reset whenever begin() or resetAddressSearch() is called.

IIRC REQUIREALARMS was used before there was an optimizing compiler, if functions are not called the compiler will not include them.

Apart from the functions there are some variables for every instance of DallasTemperature. I think they use memory even when the functions are not used. Setting the default/no alarmHandler in the constructor may also take some space. Compiling a sketch without searching alarms with REQUIRESALARMS == false shows a difference of 8 bytes in program storage space and a difference of 12 bytes in use of dynamic memory by global variables (Arduino Nano).
Sharing the search variables will probably decrease that memory usage. Not a substantial number of bytes (but a substantial part of the 12/8 bytes?), but the 'need' for setting REQUIRESALARMS to false will decrease even further.

Just noticed that getAddress() checks the validity of an address only when it is at the requested index, but it does number devices with invalid addresses. I think only valid addresses should have an index, or even only valid addresses of supported devices. See my post/questions above.

As said addressing by index only works if

there is only one type of device per bus
there are no failures on the bus
there are no (run time) replacements on the bus

Imagine the class scans the bus at start-up and compares the number of DS18B20 devices found that with a parameter of the constructor. This would guard pretty well against [2].
During this initial scan it also checks if there are other types of devices on the bus and their number. This would definitely help to handle [1].
If an DS18B20 address is requested by index, the class scans the whole bus again to see if the number of devices is the same. During the scan it of course saves the address @ index. If the full scan returns the same number of devices and no sensor is replaced one can be quite certain that the address is indeed the sensor intended.
To recognize (run time) replacement [3] the initial scan should not only count the devices, but also store a CRC16 of all individual addresses.  If a device is replaced, chance is only 1 in 65536 that the new CRC16 will be identical. This is not 100% but acceptable, otherwise use CRC32. Even better is to have this CRC16 as parameter in the constructor too (for robustness sake) but that would mean that two instances of the system would have different code. How much robustness is needed?
Extra memory would be a few bytes to hold the number of devices and the CRC16/32. And yes, some calls would take longer as it would scan the bus completely.
just some thoughts...

I have created another issue #193 which has considerable overlap with this and proposes a solution.


take does not specify behavior for 0-D input array

It is not clarified in the spec how take should handle 0-D inputs for the indexed (x) argument.
NumPy allows this, even when axis=0
In [1]: import numpy as np

In [2]: np.take(np.ones(()), np.zeros(2, dtype="i4"), axis=0)
Out[2]: array([1., 1.])

of course, this won't work when using Python-sequence-style indexing
In [4]: np.ones(())[np.zeros(2, dtype="i4")]
---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
Cell In[4], line 1
----> 1 np.ones(())[np.zeros(2, dtype="i4")]

IndexError: too many indices for array: array is 0-dimensional, but 1 were indexed

Referring to take(x, indices, axis=3 as "conceptually equivalent" to x[:, :, :, indices, ...] implicitly disallows this behavior.
The description of the output seems to agree

out (array) – an array having the same data type as x. The output array must have the same rank (i.e., number of dimensions) as x and must have the same shape as x, except for the axis specified by axis whose size must equal the number of elements in indices.

This wouldn't make much sense for a 0-D array, much like in cumulative_sum a similar conclusion was drawn.

I agree this is very similar to the discussion at https://github.com/data-apis/array-api/issues/797. There numpy also allows it, but as @seberg pointed out, this is really legacy numpy behavior being too lax about this sort of thing. Note that here as with cumulative_sum, the issue is also that axis=0 doesn't make sense for a 0-D input, as it doesn't have any axes. With cumulative_sum, we decided to leave it undefined https://github.com/data-apis/array-api/pull/851/files. It really should be an error, but there's no reason for the standard to take a hard line here especially given some libraries do allow it. That same conclusion makes sense to me here too.


Missing method for "Run actor synchronously"

Documented here: https://apify.com/docs/api/v2#/reference/actors/run-actor-synchronously
But there is no corresponding method or option.

Yes, that seems to be true. You can use the Apify.call() method of the Apify SDK to do it.
An extra benefit of using Apify.call() is that it's not limited by the 300 second max timeout of the API endpoint.


null value error

When I try to create a payload using beaconater i get the folllowing error: null value error at beaconator.cna:140
I can then copy paste the whole command from the script console to the terminal and that works properly.
I already installed pezor and updated the PATH variable.
Once I manually created the subfolder output and hard coded the full path to pezor, It is now creating the shellcode.bin file in the output folder but not creating the final payload even though it says Success beacon can be found at path/to/cna/output

+1

This can be fixed by creating a folder called output.  I will add this folder on the next version, to be released later this week.


Feature Request: Breadcrumb

Add a breadcrumb component to allow for easier navigation of the explorer

Added in #331


[GHSA-7jvx-f994-rfw2] materialize-css vulnerable to cross-site Scripting (XSS) due to improper escape of user input

Updates

Affected products
Description
Source code location

Development has moved to https://github.com/materializecss/materialize
Also, this CVE is a duplicate of CVE-2019-11003.

Hey @erik-krogh, thank you for the contribution, but the project this advisory does not apply to the new package that you're suggesting. I have not validated the continuation of the project, but this advisory would still apply to the old package regardless.


v3.1.0 seems to break webpack-dev-server behavior

tl:dr It appears that, in going from 3.0.0 to 3.1.0, something has changed the way this package interacts with webpack-dev-server which causes the dev server to be unable to serve purely from memory. As a result, running webpack-dev-server on an app which has not already been transpiled once will not work.
For more details, see below:
For example, I have an existing app that uses webpack-dev-server and<EMAIL_ADDRESS>Source files live in src, output lives in dist, the dev server uses dist as its contentBase, etc. If I delete the dist folder, and run the dev server, it will still serve up my files just fine, and respond to changes even though the dist folder doesn't actually exist. This simulates what (for example) a newly-scaffolded app might look like.
However, I created a new app last night that uses the exact same config and packages as my existing app, and suddenly webpack-dev-server would claim to be producing a valid bundle, but my browser would just throw 404 errors over and over. After troubleshooting the code itself, babel, my webpack config, restarting my computer, etc., I finally started diffing the package.json between the two apps and testing each difference by installing the older version of each package where the versions were different. Sure enough, rolling back to<EMAIL_ADDRESS>solves the problem entirely. Conversely, upgrading the older (and currently working) app the 3.1.0 will cause the webpack dev server problem to suddenly appear.
For reference, heres my devDependendencies:
  "devDependencies": {
    "babel-cli": "^6.7.5",
    "babel-eslint": "^6.0.0",
    "babel-loader": "^6.2.4",
    "babel-plugin-array-includes": "^2.0.3",
    "babel-plugin-transform-decorators-legacy": "^1.3.4",
    "babel-plugin-transform-object-assign": "^6.5.0",
    "babel-preset-es2015": "^6.6.0",
    "babel-preset-react": "^6.5.0",
    "babel-preset-react-hmre": "^1.1.1",
    "babel-preset-stage-1": "^6.5.0",
    "clean-webpack-plugin": "^0.1.8",
    "css-loader": "^0.23.1",
    "eslint": "^2.5.3",
    "eslint-config-airbnb": "^6.2.0",
    "eslint-plugin-react": "^4.2.3",
    "extract-text-webpack-plugin": "^1.0.1",
    "html-webpack-plugin": "^2.15.0",
    "mobx-react-devtools": "^4.0.2",
    "npm-install-webpack-plugin": "^3.0.0",
    "rimraf": "^2.5.2",
    "style-loader": "^0.13.1",
    "webpack": "^1.12.14",
    "webpack-dev-server": "^1.14.1",
    "webpack-merge": "^0.12.0"
  }

Let me know if you need any other info. Thanks!

Is this a problem with the example/webpack1 example in this project as well?

Hmmm, I just tested this locally with example/webpack1 and webpack-dev-server served the assets correctly...

What'd be great is if you could either provide an example folder showing the issue or try to replicate it with the example/webpack1.

I have an example for webpack 1 here. If you uncomment the commented bit from webpack.config.js you should see the behavior and run npm start you should see the behavior (no "Hello world", just 404 on index).

@bebraw yep, this example replicates the issue I was referring to

Wait, are you guys using --watch?  The plugin pivots off of the watch-run event.
Just to confirm, do either of you see this problem on your machine with the example in this repo?

Yea, I'm thinking this is due to the switch to use the watch-run event.
I'll try to get it going.  Thanks @bebraw for the working demo!

@ericclemmons I tried your demo. It works perfectly. I guess me and @cafreeman are doing something a little different. The biggest difference seems to be that we go through webpack-dev-server instead of webpack --watch and all that.

@bebraw @ericclemmons is correct. I'm using webpack-dev-server, not webpack --watch

That's exactly it. I'll look into it!

Coverage remained the same at 94.375% when pulling 2820fc1ceb920db2174c9686785c48c0c8d09b6f on 43-webpack-dev-server into 9fdaa2b8bb68455906fe3c925725c3e2acf0f71a on master.

Coverage remained the same at 94.375% when pulling 4cc5b6cfd3b6ec5cb9a752c1388ae034c25c5ea2 on 43-webpack-dev-server into 9fdaa2b8bb68455906fe3c925725c3e2acf0f71a on master.

Ok, this is weird.  With this PR I created example/webpack1-dev-server and ran:
 ~/Projects/ericclemmons/npm-install-webpack-plugin/example/webpack1-dev-server  ⑂ 43-webpack-dev-server +    npm start

> @ prestart /Users/Eric/Projects/ericclemmons/npm-install-webpack-plugin/example/webpack1-dev-server
> rimraf build

> @ start /Users/Eric/Projects/ericclemmons/npm-install-webpack-plugin/example/webpack1-dev-server
> webpack-dev-server --config webpack.config.client.js --content-base=public --hot --inline --port=3000 --progress

Installing babel-core...
Installing babel-plugin-react-html-attrs...
Installing babel-preset-react...
Installing babel-preset-es2015...
Installing babel-preset-stage-0...
Installing babel-preset-react-hmre...
 70% 1/1 build moduleshttp://localhost:3000/
webpack result is served from /
content is served from /Users/Eric/Projects/ericclemmons/npm-install-webpack-plugin/example/webpack1-dev-server/public
Installing babel-loader...
 54% 6/8 build modulesInstalling bundle-loader...
 48% 45/71 build modulesInstalling style-loader...
Installing css-loader...
 68% 98/101 build modulesInstalling file-loader...
Installing url-loader...
Hash: dadf53f346c2025a1c82
Version: webpack 1.12.15
Time: 33779ms
                               Asset       Size  Chunks             Chunk Names
f4769f9bdb7466be65088239c12046d1.eot    20.1 kB          [emitted]
                           client.js     942 kB       0  [emitted]  client
                  1.dadf5-2a09093.js  711 bytes       1  [emitted]
chunk    {0} client.js (client) 882 kB [rendered]
    [0] multi client 52 bytes {0} [built]
    [1] (webpack)-dev-server/client?http://localhost:3000 2.67 kB {0} [built]
    ...
webpack: bundle is now VALID.

and got:

It works.
I'm going to have to clone the react-boilerplate project because there's definitely something different happening there...

I'm starting to think this is something specific to html-webpack-plugin or indexTemplate part.
 ~/Projects/survivejs/react-boilerplate  ⑂ npm-install-fail +    npm start
# Original, no npm-install-webpack-plugin
><EMAIL_ADDRESS>start /Users/Eric/Projects/survivejs/react-boilerplate
> webpack-dev-server

[webpack-validator] Config is valid.
http://localhost:8080/
webpack result is served from /
content is served from /Users/Eric/Projects/survivejs/react-boilerplate
404s will fallback to /index.html
webpack: wait until bundle finished: /
Child html-webpack-plugin for "index.html":

webpack: bundle is now VALID.
^C
 ~/Projects/survivejs/react-boilerplate  ⑂ npm-install-fail +    npm start
# With npm-install-webpack-plugin
><EMAIL_ADDRESS>start /Users/Eric/Projects/survivejs/react-boilerplate
> webpack-dev-server

[webpack-validator] Config is valid.
http://localhost:8080/
webpack result is served from /
content is served from /Users/Eric/Projects/survivejs/react-boilerplate
404s will fallback to /index.html
webpack: wait until bundle finished: /
Child html-webpack-plugin for "index.html":

webpack: bundle is now VALID.

I get the 404 page, and when I add code like import something from "something", I can tell the plugin is working, but the built index.html isn't being served up.
http://localhost:8080/app.js and http://localhost:8080/style.js both still work!

@jantimon Any clue why html-webpack-plugin might fail here?

Ok, I think I got it.  More coming...

@bebraw Ok, the issue is with html-webpack-plugin caching the compilation result, manually adding it to the compilation result, which means that the HTML generates during the dry-run, but isn't added to the real compilation target.
It's simply the plugin not using the correct hooks. Caching is fine, but it should always add the output to the result.
18a7190 seems to solve it.

Coverage increased (+0.03%) to 94.41% when pulling 18a719057ed3f895a1a24c4466881e13b1bfbbc3 on 43-webpack-dev-server into 9fdaa2b8bb68455906fe3c925725c3e2acf0f71a on master.

@bebraw Dunno if you can apply this patch locally, but it worked for me:
diff --git a/.nvmrc b/.nvmrc
index 8470d3a..9773998 100644
--- a/.nvmrc
+++ b/.nvmrc
@@ -1 +1 @@
-v5.7.1
+v6.0.0
diff --git a/src/plugin.js b/src/plugin.js
index 3d5b7b2..5dd9522 100644
--- a/src/plugin.js
+++ b/src/plugin.js
@@ -55,11 +55,22 @@ NpmInstallPlugin.prototype.apply = function(compiler) {

 NpmInstallPlugin.prototype.preInstall = function(compilation, next) {
   var options = this.compiler.options;
-  var dryrun = webpack(Object.assign(
+  var config = Object.assign(
+    // Start with new config object
     {},
-    { cache: {} },
-    options
-  ));
+    // Inherit the current config
+    options,
+    {
+      // Ensure fresh cache
+      cache:{},
+      // Register plugin to install missing deps
+      plugins: [
+        new NpmInstallPlugin(this.options),
+      ],
+    }
+  );
+
+  var dryrun = webpack(config);

   dryrun.outputFileSystem = new MemoryFS();

@cafreeman Are you running that plugin too?

Unless someone says "this is broken!", I'm shipping soon :)

@ericclemmons Hi, sorry about the lag in responses. For some reason these notifications aren't showing up in my GitHub account :(
I am definitely running html-webpack-plugin as well.

@ericclemmons @bebraw ok, just installed from the 43-webpack-dev-server branch, blew away my build folder and ran npm start successfully! Looks like it's fixed :)

YES!! Thanks for the help guys!
I'll be releasing 3.1.1 today!

Needs anything to be fixed in the html-webpack-plugin?

@jantimon Nope! You can see the explanation & the fix here:

https://github.com/ericclemmons/npm-install-webpack-plugin/pull/43#issuecomment-215860865

v3.1.1 is out!


x1029  (core) —Get DNAP study ("DNAP study ID and description") from some resource

Our DNAP studies look something like "S6659 - HCA Embryo Foetal WSSS Dev Spatial Sanger".
Where does it come from? Is S6659 a cost code? Is the rest a description?
Questions to answer:

What possible sources are there for study information? (MLWH, SequenceScape REST API are probably the most likely, but there may be others)
When are data sources updated with new studies? (e.g. is there a use case of receiving samples under a study not yet in the data source?)
What information will different end users have to select the correct study?
How will users / PSD correct mistakes? (Can just be RT tickets to start with)
What happens when a sample belongs to multiple studies? (This does happen in SeqOps.....)
In SequenceScape Studies and Projects are different. Studies contain ethics and data release restrictions. Projects appear to be a wrapper for cost codes. (There is a nice page in PSD Public Confluence on this).  There is no restriction or mapping between Studies and Projects. So what happens when the Cost Code / Project and Study change independently? (It may not matter for STAN, but worth asking the question)
Options for how STAN will behave if the data source is unavailable?
Options for how STAN will be tested in isolation from the external data source?
Anything else we would like to know that is needed before or early on in implementation?

People to ask:

Neil in PSD (nts)
Richard Clark in the SSR team (rcc)
Minal / Katy

Desired outputs:

A set of use cases for user/s selecting the study, changing the study when study data is (and perhaps is not) available.
Options for fallback in case external data sources are not available
Options for how STAN will be tested
User story/s to implement the feature

HCA Embryo Foetal WSSS Dev Spatial Sanger is the name of a study in Sequencescape (id=6659). I don't know where the S6659 comes from.

The Sequencescape project_metadata table has a project_cost_code column that looks plausible, but it's not obviously connected to studies, and S6659 isn't in it. =(

apparently the "S" shouldn't be in front on the number on the study ID if that helps. Still trying to find if there is a central list somewhere, or if you can speak with the DNAP lims dev team and see if they know how its made?

In that case the number could just be the ID of the study.

yeah I think it might be

Do we know what the id should be of Bryant-DUK - Spatially resolved host-pathogen interactions across the cystic fibrosis lung? There are several studies in Sequencescape with similar names.

just looking into it now

My suggestion is that we replace our existing dnap study table with a table that separated the sequencescape study id from the study name; we periodically load the available studies from the sequencescape API (and update the name of any that have changed).

I'm happy with that David, sounds great

can you change the "Bryant-DUK - Spatially resolved host-pathogen interactions across the cystic fibrosis lung" to 7381 - Spatially resolved host-pathogen interactions across the cystic fibrosis lung please?

@KatyTudor Bryant-DUK — done

thanks

NB the SequenceScape API doesn't expose the study id, but the mlwh does, so that's the route I'm going.

@KatyTudor Can the Stan dnap study named "WC10982_Spatially resolved host-pathogen interactions CF_Visium" please be corrected to follow the format of all the others please?

@khelwood I have disabled that option now, as they have given us an updated ID in the correct format. Is this associated with any SGP number? If not can we delete it, if not I can we patch the work number to have "7381 - Spatially resolved host-pathogen interactions across the cystic fibrosis lung" DNAP study name?

@KatyTudor I've updated the associated work number and deleted the misnamed study. If more misnamed studies are created before this story is released, we'll have to fix them in order to release the story.


automatic tests for read_pandas

Can mock up a pandas dataframe in order to avoid having to import pandas -- the API we rely on is probably pretty stable.

https://github.com/probcomp/bayeslite/blob/master/tests/test_read_pandas.py

FYI, better to cite commits than URIs like that -- those URIs are not stable and do not refer to historical events.  In this case, the relevant commit is a4f9813da840ff7bc16295da538aac44c853b315.


$modal.open compatibility with component (angular.component method)

Hello,
I want to ask if you're considering support of angular.component method which is new API for creating components.
I'd like to have the ability to call $modal.open method with the component definition. Now I have to specify controller and template options...
My API proposal:
angular.module('myApp').component('myModal', {
  bindings: {
    greeting: '<'
  },
  template: '
{{$ctrl.greeting}}
',
  controller: function () {},
})

// open the modal
$modal.open({
  component: 'myModal',
  bindings: {
    greeting: 'hello',
  },
});

Thanks for response.
O.

I believe this would force us to only support Angular 1.5+ and i'm not sure we're ready to go there  yet.

@icfantv Is there any issue with coexistence of both variants? Could't proposed API coexist with current one?

@zdychacek, i don't know.  this would require investigation if this is, in fact, something we want to support.  but we need to have the discussion first.

I'm not against this, but we'll have to determine at what stage we want to implement this. We could implement it now, and have code where this only applies to angular 1.5+, but that adds bloat for those using 1.4.

I'm trying to use existing modal with component this way:
modalInstance = this.$uibModal.open({
      template: '<my-component message="{{$ctrl.message}}"></my-component>',
      size: 'sm',
      controllerAs: '$ctrl',
      controller: () => {
        this.message = 'some message';
    });

Then in my component:
let myComponent = {
  bindings: {
    message: '@'
  }
};

However, it doesn't work :( this.message in component controller is empty. I'm not sure why.

@Olgagr there should be nothing wrong with having an arrow function if your transpiler is working correctly.  Arrow functions are simply rewritten as you have defined above.  I would encourage you to look at your transpiled code with the arrow function and see what it's generating.

@icfantv I think in this case it makes difference because $uibModal.open is run in controller class of other component. To show wider context:
class PublicationController {

    openModal() {
        modalInstance = this.$uibModal.open({
         template: '<my-component message="{{$ctrl.message}}"></my-component>',
         size: 'sm',
         controllerAs: '$ctrl',
         controller: function() {
            this.message = 'some message';
         });
    }
}

Can you see the problem here ? If I use lambda, this will be PublicationController instance.

@Olgagr, i don't follow, i use arrow functions inside my ES6 classes all the time.  the only thing I don't do is specify a function for my controller property - but the transpiler should be converting them all anyway.

@icfantv And this is a difference :) Arrow functions are not compiled to the same code as "normal" functions. See the difference: http://bit.ly/1N5cEEn

ah, ok.  good to know.  thanks.

@Olgagr You can't use arrow function in this case because arrow functions has lexical scoping which means that this points to something else (global object or undefined in strict mode), so this is not a controller instance. In this case normal function should be used.

I'm not sure this proposal has much sense or very necessary. The example @zdychacek gives can already be expressed with existing syntax:
// Proposal
$modal.open({
  component: 'myModal',
  bindings: {
    greeting: 'hello',
  },
});

// Can currently be implemented
$modal.open({
  template: '<my-modal greeting="$ctrl.hello"></my-modal>',
  controller: function() {
    this.greeting = 'hello'
  },
  controllerAs: '$ctrl'
})

Existing syntax is very flexible and can already be used with components. At the same time, proposal means introducing two more config properties (component and bindings), which is not even very necessary (again, because you can use components in template). It is also a little confusing: it's not obvious that bindings will get merged (?) with component bindings and how this merge is going to happen. What is one provides both component and controller and template?
So there are questions that are not very obvious.

@dfsq Yes, I know about it (arrow functions). We've just discussed this above :)

I agree with @dfsq . I also use the existing syntax with components and so far it works pretty well.

@dfsq Hi, I would like to know, how do you access $modaInstance service from within the component's controller?
I can't see any other solution than passing it explicitly via component's bindings from the controller.
$modal.open({
  template: '<my-modal greeting="$ctrl.greeting" modal-instance="$ctrl.modalInstance"></my-modal>',
  controller: [ '$modalInstance', function ($modalInstance) {
    this.greeting = 'hello';
    this.modalInstance = $modalInstance;
  } ],
  controllerAs: '$ctrl',
});

@zdychacek Do you need the whole modal instance ? For example, to have access to close or dismiss methods you can also pass just them as bindings:
$modal.open({
  template: '<my-modal greeting="$ctrl.greeting" close="$ctrl.close()" dismiss="$ctrl.close()"></my-modal>',
  controller: [ '$modalInstance', function ($modalInstance) {
    this.greeting = 'hello';
    this.close = $modalInstance.close;
    this.dismiss = $modalInstance.dismiss;
  } ],
  controllerAs: '$ctrl',
});

and then in your component bindings:
{
   close: '&',
   dismiss: '&'
}

@Olgagr No I don't need it whole. I've only tried to model the behaviour as similar as possible to the current one and that's to have an option to inject $modalInstance service into the component's controller directly.
But I can live with the solution mentionted above :)

On thing that is surprising to me: bindings are not updated. Let's say I open modal like this:

class SomeComponentController {

    constructor()
       this.pages = this.getPages();
    }

    open() {
         var _this = this;
         $modal.open({
             template: '<my-modal pages="$ctrl.pages""></my-modal>',
             controller: function () {
                   this.pages = _this.pages;
           }],
           controllerAs: '$ctrl',
        });
    }

}

my-modal component has bindings:
bindings: {
   pages: '<'
}

Now, at some point, when modal is already opened, inside SomeComponentController this.pages changes. However, inside my-modal component this pages binding is not refreshed ($onChanges method is not called). This is surprising. It should be live binding after all, right ?

@Olgagr This should not happen, most likely there is something with the way you are updating SomeComponentController's pages.
Here is a quick demo: http://plnkr.co/edit/XeqlnwjePvSTn0pXPaPz?p=preview

@dfsq Thanks for demo! Yes, you're right. The bindings should be updated.

@dfsq I was able to reproduce the issue. Here is modified your plunker example:
http://plnkr.co/edit/Jq6fwT?p=preview
Instead of pushing to array, I'm changing reference. As you can see the modal binding is not updated any more. Also $onChanges hook is not fired.
When you do the same only but with a regular component, the binding is updated. Also $onChanges is hook is fired: https://plnkr.co/edit/Rf82S9fCvA35R1kBMAc5?p=preview
I'm trying to understand why this is happening.

#5881

@Olgagr , you use one-way binding '<'. For your controller to see the updated reference, you need to use two-way binding: '='.

@dietergeerts Hmm, why ? One way binding are updated from parent to child.

@Olgagr, I think I misunderstood you then, I thought the change wasn't going back to the parent.

adminApp.component('componentModal',
{
    bindings: {
        title: "@",
        component: "@"
    },
    transclude: true,
    template: "",
    controller($uibModal: angular.ui.bootstrap.IModalService) {
        var title = this.title;
        var component = this.component;

        this.open = () => {
            $uibModal.open({
                template: [
                    '
',
                    '
',
                    '       ×',
                    '
'+ title +'
',
                    '
',
                    '
',
                    '       <' + component + '></' + component + '>',
                    '
',
                    '
'
                ].join(''),
                backdrop: 'static',
                keyboard: true,
                size: 'l',
            });
        }
    }
});

<component-modal title="My Title" component="my-component">

</component-modal>

@Dashue
What about passing data into your component through attributes? I tried modifying your example to pass in attributes as well, but can't seem to get it to work.

How about binding to a collection of keys and values, then iterate over that as you build up the component directive? In my case it's a self-contained component being shown in a modal, what's your use-case? What are the parameters you're sending in?

I think that would work fine for the data(passing in an array), but I also need to pass in two callbacks from the modal to the parent (keeping in line with the 1 way data binding flow). Basically my modal shows data and can initiate event callbacks to modify it.

Nothing comes to mind unfortunately.

@Olgagr i'm trying to use methods inside the controller but it doesn't work, have you any idea ?
this is not working..
    edit()
    {
        var ctrl = this;
        var modalInstance = this.modal.open({
        animation: true,
        templateUrl: 'myModalContent.html',
        controller : function() {
            this.ok = function  () {
                alert('hi there')
            }
        },
        controllerAs: 'vm',
        size: 'lg',
        });
    }

No, it doesnt seem to work with templateurl, you need to use a template and pass through the objects..thats what I came to after countless hours trying to modularize this.. wish you could just keep the template AND controller separated in their own files..

@netfox01 Yes, @pziegler is right. You can't use templateUrl, you have to use inlined template HTML.

i used templateUrl with ng-template and it's working, i found a solution to copy all the component attributes, but it's not working for methods
component javascript
    edit()
    {
        var ctrl = this;
        var modalInstance = this.modal0.open({
        animation: true,
        templateUrl: 'myModalContent.html',
        controller : function() {
            $.extend(true, this, ctrl); // copy all component attributes to this controller
            this.go = function  () {
                alert('hello')
            }
        },
        controllerAs: 'vm',
        size: 'lg',
        });
    }

component html

hmm, interesting.. that would help me out.. now to only be able to move controller to separate file would be great..

It can be done in a far better way imho, but like stated above, '&' bindings will not work, but you can use '<' for functions:
// This code isn't complete, and is just to show the initial idea, I would have too much work to remove our project specific code...
(function () {
    'use strict';

    angular.module('my.toolkit')

		// The factory which will hold a function to show the modal.
        .factory('tkModalService', function ($uibModal) {
            return {
                show: show
            };

            function show(options) {
                return $uibModal.open({
                    template: createTemplate(options.component, options.attributes);
                    controller = ModalWithComponentController;
                    resolve = {
                        data: options.attributes
                    };
				}).result;
            }

			// The template is created by building the tag of the provided component name and the attributes given.
			// The actual attributes will be stored in the controller, and this referenced in the component for access.
            function createTemplate(component, attributes) {
                var name = _.kebabCase(component);
                return '<' + name + ' ' + createAttributes(attributes) + '></' + name + '>';
            }

            function createAttributes(attributes) {

				// In order to get hold of the modal instance, and thus to be able to close it, we'll put it on the component as attribute.
				// The tkModal component, which needs to be used in the actual modal component, will requires this to work with.
                return 'data-tk-modal-instance="$ctrl.instance" '
                    + _(attributes).keys().map(createDataAttribute).join(' ');
            }

            function createDataAttribute(key) {
                return 'data-' + _.kebabCase(key) + '="$ctrl.' + key + '"';
            }

            /* @ngInject */
            function ModalWithComponentController($uibModalInstance, data) {
                this.instance = $uibModalInstance;
                _.assignIn(this, data);
            }
        })

		// This directive is just to assign it the modal instance, so tkModal can require it to work with.
		.directive('tkModalInstance', function () {
            return {
                restrict: 'A',
                require: 'tkModalInstance',
                link: link
            };

            function link(scope, element, attributes, ownCtrl) {
                _.assignIn(ownCtrl, scope.$eval(attributes.tkModalInstance));
            }
        })

		// This directive is kind of a wrapper for the bootstrap modal styling and html structure.
		// It will transclude the content in the modal-body, and it also will require the modal instance,
		// so it can hook up the buttons to confirm and cancel.
		// This has to be used inside your modal component. This will also try to require a form, for
		// extra form validation etc....
		.directive('tkModal', function () {
            return {
                restrict: 'E',
                templateUrl: '/toolkit/layout/tkModal.html',
                transclude: true,
                require: ['^^tkModalInstance', '?^^form'],
                scope: {
                    title: '@',
                    okText: '@',
                    onConfirm: '&',
                    icon: '@?',
                    context: '@?',
                    canConfirm: '<?',
                    codeCancel: '=?'
                },
                link: link,
                controller: Controller,
                controllerAs: '$ctrl',
                bindToController: true
            };

            function link(scope, element, attributes, controllers) {
                scope.$ctrl.modalInstance = controllers[0];
                scope.$ctrl.form = controllers[1];
            }
        });

    function Controller($q) {
        var $ctrl = this;

        $ctrl.canConfirm = _.has($ctrl, 'canConfirm') ? $ctrl.canConfirm : true;

        $ctrl.codeCancel = $ctrl.cancel = function () {
            $ctrl.form && $ctrl.form.$setPristine(); // Finish off for unsaved changes!
            $ctrl.modalInstance.dismiss();
        };

        $ctrl.validateAndOk = function () {
            $ctrl.invalid = $ctrl.form && $ctrl.form.$invalid;
            if (!$ctrl.invalid) {
                return $q.when($ctrl.onConfirm())
                    .then(function (data) {
                        $ctrl.form && $ctrl.form.$setPristine(); // Finish off for unsaved changes!
                        $ctrl.modalInstance.close(data);
                    });
            } else {
                $ctrl.form.$setDirtyPropagate();
                return $q.reject();
            }
        };
    };
})();

This can then be used like this:
The usage:
...
tkModalService.show({
    component: 'tkModalComponent',
    attributes: {
        test: 'Hello World'
    }
}).then(function (data) {
    // You can now do something with the data that your modal did return.
});
...

The component js
(function () {
    'use strict';

    angular.module('toolkit.app')
        .component('tkModalComponent', {
            templateUrl: '/app/modal/tkModalComponent.html',
            controller: Controller,
            bindings: {
                test: '@'
            }
        });

    /* @ngInject */ /* Because gulp-ng-annotate doesn't know components yet! */
    function Controller($q) {

        this.onConfirm = function () {
            return $q.when(true);
        };
    }
})();

The component html
<form name="$ctrl.form">
  <tk-modal data-title="Component Modal"
            data-ok-text="Confirm"
            data-on-confirm="$ctrl.onConfirm()">
    <tk-content data-space-content data-scrollable>
      Modal content

      Test value: {{$ctrl.test}}
      <tk-form-group>
        <input type="text" name="textInput" required data-ng-model="$ctrl.input"/>
      </tk-form-group>
      <tk-form-group>
        <tk-datepicker name="dateInput" data-model="$ctrl.datepicker"/>
      </tk-form-group>
    </tk-content>
</tk-modal>
</form>

Interesting, thanks for the input!

An update on my thoughts on this - I'm inclined to support this, seeing as UI Router already does, and the Angular 2 router works with components. The overhead shouldn't be too bad.
PRs welcome!

@wesleycho so this will be done and it should work with ng1.4.x with directives of type 'E', correct?

Yes.

@wesleycho will this change be propagated from say version 0.14.3 or will it be available only in latest library vesion?

@jeserkin, we do not back port changes. We only release new, latest versions.  We simply don't have the manpower as volunteers to support multiple versions.

Does @zdychacek API proposal is the way we want to implement this ?

@Olgagr as far as I can tell, it can't be just passed into template. Component/Directive of type element must be specified. I would assume, that $uibModalInstance can be passed same way into component controller as into directly specified controller. But I reviewed this library code long ago, since then it changed much.

Here is the API signature to be implemented - it will be used like
$modal.open({
  component: 'myComponent'
});

where myComponent is defined either via module.component or module.directive with restrict: 'E' (or at the least, allowing it to be used as an element directive). This component will automatically be set with the attribute $resolve and have value $resolve, which is an object containing all of the resolved from the resolve object passed into $modal.open, as mentioned in the (documentation](http://angular-ui.github.io/bootstrap/#/modal).
One will be able to use $resolve like so:
module.component('myComponent', {
  controller: 'MyController',
  bindings: {
    $resolve: '<'
  }
});

If this sounds sensible, I will look to implement this within the next few weeks.

@wesleycho  What about component lifecycle and & bindings ? Will it work with this solution ?

@Olgagr I was considering that - my assumption is that component users will eschew using controller, controllerAs, etc. from the $modal API in favor of moving that into the component rendered, and using the resolve data to construct everything desired.
Can you give an example as to how you were thinking of using this?

@wesleycho Yes, I can give you very specific example, because I have an Angular application that uses almost only components. I have a WYSIWYG editor, where user can put image. When he clicks image the modal window is shown, where user can crop image. The definition of this cropping component (that I would like to load in modal window) looks like this:
import template from './image_editor.html';
import controller from './image_editor.controller';
import './image_editor.scss';

let imageEditorComponent = {
  bindings: {
    onSave: '&',
    image: '<',
    savingErrors: '<'
  },
  template,
  controller
};

export default imageEditorComponent;

As you can see, this component is not responsible for saving changes on image. It should delegate this to parent component. On the other hand, parent component should notify this component, if there are any errors when saving cropped image.
Right now, I'm calling this component from parent this way:
var _this = this;

this.modalInstance = this.$uibModal.open({
      template: `
        <image-editor
          on-save="$ctrl.save(dataURL, imageDimentions)"
          image="$ctrl.image">
        </image-editor>
      `,
      controllerAs: '$ctrl',
      controller: function ImageEditorController() {
        this.save = (dataURL, imageDimentions) => {//do something};
        this.image = _this.image;
        this.savingErrors = _this.errors();
      }
    });
  }

And this is working, except that savingErrors is never updated ($onChanges is not fired).

Thank you for this example.
This use case would demand the library not make the assumption - I'm ok with that. We will need to support a bindings object then, which will look like this:
$uibModal.open({
  component: 'myComponent',
  controller: 'MyModalController',
  bindings: {
    myAttribute: 'myStringReferenceTo$scopeVariable'
  }
});

The bindings object here will just add the attributes and values to the component, where the attribute name will be the properties and the values will be the values of the object.
Does this sound amenable?
As for $onChanges, where are you interested in having it working, in the modal controller? I don't think it makes sense for it to be supported in the modal controller. We should add support for $onDestroy I think though, but that is a separate issue to this one.

@wesleycho Lifecycle hooks should work in the component you assign to the modal. They are so useful and if the component doesn't fire them, it will be confusing.

So they're not working in the component currently when in use? Can you file another issue, that sounds like a bug.

@wesleycho I've already done it (#5881), but the issue was closed as duplicate of this discussion.

Hi, i'm new to Angular and this angular-ui-bootstrap library, my project uses the new component structure of Angular 1.5.
Can someone please summarise this discussion for me? I can sort of create a component modal but there are some aspects of data binding that wont work? Is there a concise example of how I would use it for now until the feature is implemented in 2.1? Thanks!

This isn't the place for such questions. There are examples in this issue on how to do this - otherwise, it is encouraged to ask help questions in places such as Stack Overflow, IRC, or Slack.

@wesleycho will this new component based solution still need controller to be assigned in modal open action? Component as well as it predecessor directive of type element (restrict: 'E') already have controller. Can't it be used. So that last example here would look like:
$uibModal.open({
  component: 'myComponent',
  bindings: { // Previous resolve property (I assume)
    myAttribute: 'myStringReferenceTo$scopeVariable'
  }
});

@jeserkin How can you pass bindings to component/directive without this controller in modal open action ?

@Olgagr the controller should be defined on your component, so it'd receive its bindings through the bindings object, just as in the case of ui-router.

Let's make sure to get this right.
I think for @Olgagr's use case, how we want to do this should be
$uibModal.open({
  component: 'differentComponent',
  resolve: {
    ...
  }
})

where differentComponent contains the desired components and the default attribute-value pair will be $resolve="$resolve (which is already published onto $scope).
I think this makes the most sense since all that controller stuff isn't needed here since that should be encapsulated by the component. This may require a bit of extra verbosity in some cases due to having to define the component, but it isn't necessary to change to this syntax - this is just offering a different option for those who desire it. It is wholly backwards compatible with pre-Angular 1.5 because it doesn't rely on anything Angular 1.5 specific in the library itself, and provides simplicity in API form.
Thoughts?

I might be getting that wrong way, but the end result would mean, that when I instantiate modal open action I pass in a resolve object containing the elements, that will be injected into component responsible for modalInstance, correct? If so, then how will resolve object be injected into component? Like before as for responsible controller, where every resolve property was a function and result was independent injectable for that exact responsible controller or in some other way? Maybe a more complete example could be provided for the vision?

@jeserkin in the example of the proposal I posted, the modal would create
<different-component $resolve="$resolve"></different-component>

and one would be responsible for determining how the resolve is handled inside the component.

@wesleycho your example is exactly how I'd envision using this. Resolve's should automatically map to the component's bindings when provided, eliminating the need for a wrapping controller or template.

I have opened an implementation in #6179 - if there is any comment about implementation anyone wants to add, feel free to comment in that PR.

Awesome!, I was just searching for this possibility 👍  Many thanks


Prevent BufferedWriter from producing empty files

Preventing BufferedWriter from producing empty files
Motivation:
In the current implementation, if the users forget to call 'flush()' on the writer when creating a new file with 'withFileHandle(forWritingAt:options:execute)' the newly created file is empty.
Modifications:
Added the 'withBufferedWriter()' method for the 'WritableFileHandleProtocol' and implemented it for the WriteFileHandle and 'ReadWriteFilehandle'. The method calls flush on the bufferedWriter after executing the closure that writes the contents to the file as indicated by the user.
Result:
Users can now use the 'withBufferedWriter' method instead of instantiating the bufferedWriter themselves, reducing the possibility of omitting 'flush()'.
TO DO:

documentthe method
implement tests

@swift-server-bot add to allowlist


Improvements around organisation lookup

This is a collection of refactorings and code improvements to make this area of the code easier to understand and to work with.
The highlights:

better naming of classes and methods
extract code specifically relating to talking to Content API and Content Store
fetch the content_id when looking up orgs

/cc @jamiecobbett

Awesome refactoring :) :clap:


Support SCAN for iterating over collection elements

Some collection operations, such as iterating over a List require retrieving everything stored in Redis to memory.
redis-py provides Pythonic support for the Redis SCAN commands, which allow for incremental iteration.

The Redis docs warn:

A given element may be returned multiple times. It is up to the application to handle the case of duplicated elements, for example only using the returned elements in order to perform operations that are safe when re-applied multiple times.

If that limitation is difficult to work around I may postpone this feature.

The scan features were added in Redis 2.8, so per #74, this will not replace the current __iter__ methods until 2019 at the earliest.

The "given element may be returned multiple times" problem doesn't have a good workaround, so I've made new methods. See #97 for details.