resultSerializerの使い方追加

バイナリで受信したい場合があったのでやり方を調べました。
ドキュメントは vibe.d にもAPIの使い方があるのですが、実際に参考になったのは以下のテストケースでした。
https://github.com/vibe-d/vibe.d/blob/master/tests/vibe.web.rest.encoding/source/app.d

Codecov Report

Merging #192 (30a38a0) into master (745b08c) will decrease coverage by 0.01%.
The diff coverage is 97.87%.

:exclamation: Current head 30a38a0 differs from pull request most recent head ed41ff4. Consider uploading reports for the commit ed41ff4 to get more accurate results

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@            Coverage Diff             @@
##           master     #192      +/-   ##
==========================================
- Coverage   97.31%   97.30%   -0.01%
==========================================
  Files          40       40
  Lines        2123     2154      +31
==========================================
+ Hits         2066     2096      +30
- Misses         57       58       +1

Impacted Files
Coverage Δ

thirdparty/vibe-d/source/vibed_usage/rest.d
96.49% <96.77%> (+0.33%)
:arrow_up:

source/container_example.d
100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


refactor: simplify to make codes more readable by lambda

Ⅰ. Describe what this PR did
Simplify to make codes more readable.
Ⅱ. Does this pull request fix one issue?
No.
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews

Ⅰ. Describe what this PR did
Ⅱ. Does this pull request fix one issue?

Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews

Codecov Report

Merging #1722 into develop will decrease coverage by 0.14%.
The diff coverage is 100%.

@@              Coverage Diff              @@
##             develop    #1722      +/-   ##
=============================================
- Coverage      46.98%   46.83%   -0.15%
- Complexity      1786     1787       +1
=============================================
  Files            365      365
  Lines          13301    13273      -28
  Branches        1644     1606      -38
=============================================
- Hits            6249     6217      -32
+ Misses          6372     6365       -7
- Partials         680      691      +11

Impacted Files
Coverage Δ
Complexity Δ

...n/java/io/seata/rm/datasource/DataSourceProxy.java
70% <100%> (-1.88%)
9 <1> (+1)

...obuf/convertor/BranchRegisterRequestConvertor.java
88% <0%> (-8%)
3% <0%> (ø)

...buf/convertor/GlobalLockQueryRequestConvertor.java
92.59% <0%> (-7.41%)
3% <0%> (ø)

...obuf/convertor/GlobalRollbackRequestConvertor.java
94.73% <0%> (-5.27%)
3% <0%> (ø)

...otobuf/convertor/GlobalStatusRequestConvertor.java
94.73% <0%> (-5.27%)
3% <0%> (ø)

...otobuf/convertor/GlobalCommitRequestConvertor.java
94.73% <0%> (-5.27%)
3% <0%> (ø)

...protobuf/convertor/RegisterTMRequestConvertor.java
95.45% <0%> (-4.55%)
3% <0%> (ø)

...protobuf/convertor/RegisterRMRequestConvertor.java
91.66% <0%> (-4.17%)
3% <0%> (ø)

...otobuf/convertor/BranchReportRequestConvertor.java
92.59% <0%> (-3.71%)
3% <0%> (ø)

...rotobuf/convertor/RegisterTMResponseConvertor.java
81.25% <0%> (-3.6%)
3% <0%> (ø)

... and 17 more

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 29e1928...2980a13. Read the comment docs.


Remove left over optionals around fee measurements

We used to estimate fee based on sell token only so we made additional
data optional. Now we always have buy token, amount, kind so we can
clean up all the None special cases.
While most of the changes keep the logic the same we do have a
functional change. When validating a fee for a new order we previously
only took the sell token into account (see get_unsubsidized_min_fee).
This would allow someone using the api directly to get lower fee
estimates than we intended.
Fixes #1317
Fixes #1303
Test Plan
CI

Wen merge?

Wen merge?

AFAIU, we the issue brought up here has not yet been addressed in code: https://github.com/gnosis/gp-v2-services/pull/1323#discussion_r739146723

With the newest commit my idea has been implemented.


[rebase v1.24]: remove insecure-port from kas args

insecure-port server option has been removed in 1.24 - https://github.com/kubernetes/kubernetes/blob/v1.23.7-rc.0/staging/src/k8s.io/apiserver/pkg/server/options/deprecated_insecure_serving.go
This is causing cluster bootstrap to fail in rebase PR with the following error:
E0426 04:06:12.761688       1 run.go:74] "command failed" err="unknown flag: --insecure-port"

/assign @p0lyn0mial @soltysh

/retest


docs: remove codesponsor

Right now this is just a broken image, since code sponsor doesn't exist anymore

I know 😭

:tada: This PR is included in version 0.6.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Protect delete job with a modal confirmation

Review @rclough. Closes #134.

Tested on my local machine, works as expected :+1:


Initial fs.statSync errors can't be handled

If the file to-be-tailed doesn't exist, this will error, but that error can't be handled because watch is called from within the constructor, before the client's had a chance to register an 'error' event handler.
I'd be glad to put up a PR to fix this but I'm not sure what fix you'd prefer. My inclination is to call watch asynchronously (i.e. change this to process.nextTick(=> @watch(pos)), except for that that'll break the tests since they expect node-tail to catch synchronous writes (which is easy enough to change except for that maybe that signals that such a change would break some client code too).
Alternatively we could have watch throw that fs.statSync error rather than emit it, except for that that's inconsistent with other error handling in the module and we'd have to change this to handle that change somehow.

A workaround is to have client code call fs.statSync on the file before initializing Tail.

Thanks for this bug report.
If the file to be tailed is not there the Tail has no reason to be initialised, therefore it's probably correct to fail initialization with an exception. There nothing the library can't do about that, it's up to the calling code to figure out why the file is missing and then eventually try to reinitialize Tail.
I'm therefore thinking about removing the unneeded error emit and make explicit that the constructor will throw an exception if the given file is not available.
Thoughts?

How about adding an option to not automatically start watching the file on construction, and wait for an explicit call to watch?

That approach won't solve the problem; the file might still be missing and the library would fail in the scenario where there's the automatic start.
I started  working on a solution that is based on my previous comment, but not ready yet.

Fixed with release 2.0.3.
If the file does not exist the constructor won't initialize the library and an exception will be thrown.


vultr node driver options don't show up.

Rancher versions: 2.0 master 3/11
Steps to Reproduce:

Activate otc or add vultr machine drivers
Go to add template and click on them

Results:  No options showing up

This is a backend issue. Current workaround is refreshing browser.
When I enabled a node driver, a resource.change event with type dynamicSchema will be sent to frontend. It should be schema.
Also in the resourceFields, the default value is {defaultInt: null, defaultString '2'} which is wrong. It should be int, bool or string.

is this the same reason why enabling the openstack node-driver and trying to add an openstack node template shows up as blank?

Version - 2.0 master 3/26
Verified fixed


Compiling webview-sys with edge on ci

Currently it throws a fat linker error but it should be solvable.

Log: https://github.com/eliassjogreen/deno_webview/runs/499222235?check_suite_focus=true

The raw output of the build error from the log entry2020-03-10T23:42:24.7314141Z
As far I understood from related issues the problems are with the windows-rust bindings.
Similar issues can be found here:
https://github.com/davisking/dlib/issues/1448
https://social.msdn.microsoft.com/Forums/windows/en-US/d0026ac6-0f14-495e-b5c6-19648a97cba4/mismatch-detected-for-runtimelibrary-value-mddynamicrelease-doesnt-match-value?forum=vclanguage
It seems it will be somewhere in the cmake section and specially in the windows part of it.

Somehow webview_edge.cpp differs from webview_mshtml.c in the way it's linked creating the linker mismatch error.

Probably caused by the cpp version being different:
.flag_if_supported("/std:c++17");
Linker Tools Error LNK2038:

Indicates the version of the C++ Standard Library and C runtime that's used by an app or library. Code that uses one version of the C++ Standard Library or C runtime is incompatible with code that uses a different version. For more information, see /MD, /MT, /LD (Use Run-Time Library).

Hello in my local computer i can compile with edge when i create a file ".cargo\config" with
[target.x86_64-pc-windows-msvc]
rustflags = ["-Ctarget-feature=+crt-static"]

I tried that yesterday but using it as an environmental variable. It compiled but did not  use edge over ie. Can you confirm that it uses edge?

and i have change the webview2  inmultiple.ts with (for test)
const webview2 = new WebView({
  title: "Multiple deno_webview example",
  url: `data:text/html,

2 Nav

    `,
  width: 800,
  height: 600,
  resizable: true,
  debug: true,
  frameless: false
});

I set the dev with set DEV=file://./target/release
and exec the exmple with  deno -A --reload examples\multiple.ts
the window 2 content is
Mozilla/5.0 (Windows NT 10.0; Win64; x64; WebView/3.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Edge/18.19041
Yes it's work ;)
Sorry for my bad english !!!


Get platform.coop presentation video from from NYC conference

Video Link to all presentations - http://isoc-ny.org/p2/platform-coop-2017
Would be nice content to get a summary and a specific clip from gregs talk
as good faith and relationship building someone could clip the whole thing and add titles and descriptions to send out to there team for use. More work but more value generated

bio: LUCIUS GREGORY MEREDITH
session: BREAKOUT PANEL - NEXT MONEY: NEW TECH FOR NEW FINANCE
Sat, November 11
01:30 PM - 03:00 PM
livestream video; Greg starts aroud 6:00.
Summary of Greg's intro:

quick facts:

300 members. founded Jan 2017
capitalized to about $20M

why RChain? governance and blockchain can't be separated; I felt compelled to connect them.
My coop experience:

West Virginia grocery as a teen
Oberland college co-op
shop at REI, PCC

not sure "1 member 1 vote" is the right model all the time... fluidity...
want to hear more from the rest of you...

FWIW: I think Ian mentioned making contact with the https://www.buytwitter.org/ effort at this Platform Co-ops conference.


Is this a defect about Synchronizer.releaseShared in Java6ConcurrentBag/Java8ConcurrentBag

According to the code below, when "Synchronizer.releaseShared()" is called, all of the threads waiting on  method "borrow()" will be signalled.
https://github.com/brettwooldridge/HikariCP/blob/2.3.x/hikaricp-java6/src/main/java/com/zaxxer/hikari/util/Java6ConcurrentBag.java#L111
  @Override
  protected long tryAcquireShared(final long seq)
  {
     return java67hasQueuedPredecessors() ? -1L : getState() - (seq + 1);
  }

Hope is like this: If only one (or N) entry is requited, it's better to signal only one (or N) thread, right?

@atellwu Similar to standard Object.wait(), Object.notify(), and Object.notifyAll() semantics, the options provided by java.util.concurrent.locks.AbstractQueuedLongSynchronizer are:

Do not notify (return -1)
Notify one thread (return 0)
Notify all threads (return >0)

The code above supports: signal none, signal one, and signal all.
Example
Assume the sequence (getState()) is 13 when Thread1 starts waiting.
Thread2 also wants to acquire a connection, and sees the sequence at 13.
Thread3 now releases one connection, and sequence becomes 14.  The AbstractQueuedLongSynchronizer will unpark (wake-up) the first queued thread (Thread1).
Thread1 will call tryAcquiredShared(13).
The getState() - (seq + 1) calculation results in 14 - (13 + 1) which equals 0.  When tryAcquiredShared() returns zero (0), that tells the AbstractQueuedLongSynchronizer "don't unpark any more threads, there is only one resource available".  Only one thread was signaled.

If, in this example, two connections had been released quickly, sequence would have gone to 15. The calculation by Thread1 would be 15 - (13 + 1) = 1.  A return value > 0 means "continue to the next queued thread".  So, Thread2 would also have called tryAcquiredShared().
The ability to notify (signal) N threads specifically only exists with higher-level constructs such as Semaphore, but imposes an unacceptable performance tradeoff in real world benchmarks against the
AbstractQueuedLongSynchronizer.

Yes, you are right, thanks for your answer


Holograms-101 - need to stop playing the rolling sound on reset

In catchup-chapter 7, position the stage on the floor and drop a sphere.
Notice the sphere rolls off the stage and onto the floor.
If the spatial mapping mesh is noisy enough, it will continue to roll with enough velocity to keep the rolling sound playing
Issue the "reset world" command
Notice, the sphere goes back to its original local position, but the rolling wave is still playing.

Closed via #40


Improved CI to catch the problem with incorrect PRL files

Here are problems with linkage:
https://dev.azure.com/trikset/aqtinstall/_build/results?buildId=1399&view=logs&j=c0130b29-789d-5a3c-6978-10796a508a7f&t=17fa007c-c91f-5c67-01dd-c6dc0f3947a4&l=11742
https://dev.azure.com/trikset/aqtinstall/_build/results?buildId=1399&view=logs&j=4a0dadba-b014-54f8-0bf6-a2ee97567f21&t=f7cb4e1f-77dd-5be2-be6a-0e1fc5abfb48&l=12092
This is fixed in #640  , but  (maybe) that PR should be merged into this after review.

#739 is a combined PR. Now it is up to you (dear maintainers) to choose :)


Add trap-add in util.sh

Fixed pull #8621 missed trap-add definition in util.sh & delete un-used check-prereqs

LGTM, please merge it asap since according to this issue https://github.com/GoogleCloudPlatform/kubernetes/issues/8985, without this cure, the deployment will fail at the beginning.

LGTM


[feature] About Screen

Description
This PR Structures the About Screen as per the provided design. The data used is mock data which shall be replaced once data from the server is available.
To enable navigation to the Team screen, minor changes have been made to the following existing files:
SingleSpeakerScreen.tsx
BottomTabsNavigator.tsx
MainStackNavigator.tsx

A new file, the custodian of custom navigation types, (src/types/Navigation.ts) has been created.
Fixes #17
Type of change

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

How Has This Been Tested?
By running the app locally, and testing using the Android emulator and an android device running on android 9
Screenshots
- About Screen on loading

- on scrolling

on navigating to Team screen. The circled word was passed as a route param

[ ] Test A
[ ] Test B

Checklist:

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
[ ] Any dependent changes have been merged and published in downstream modules

@brianwachira I have noted that the Publish App to Develop Channel  job has failed due to lack of an image asset. (see screenshot below). How do I go about fixing this? Open a new PR?

@brianwachira I have noted that the Publish App to Develop Channel job has failed due to lack of an image asset. (see screenshot below). How do I go about fixing this? Open a new PR?

I've seen it's being addressed by PR#49


Improve basis of record facets

Improve basis of record facets
A basis of record value should match the Darwin Core Type Vocabulary:

PreservedSpecimen
FossilSpecimen
LivingSpecimen
HumanObservation
MachineObservation
MaterialSample
Occurrence / Unknown

This means the following basis of record shown on GBIF.org are invalid:

Observation (47,653,413)
Literature (504,040)

GBIF shows these basis of records facets because it accommodates historical data using these values. Ideally these wrong historical values will be fixed at source. In the meantime, here are a couple suggestions to make selecting a basis of record facet on GBIF.org less confusing.
Proposal #1: Hide invalid facets "Observation" and "Literature" because they a) cause confusion with users, b) cause confusion with publishers who expect to use these values in the IPT but aren't allowed (because the IPT validates all basis of record values are valid).
Proposal #2: Categorize these invalid facets under a parent facet to make them easier to understand:
"Observation" could be shown instead as "unknown observation" located under the parent facet "Observation" that includes all types of observations:

Observation

human observation
machine observation
unknown observation

"Literature" could be shown instead as "coming from literature" located under parent facet "Unknown" that includes all types of unknown occurrences:  :

Unknown

coming from literature
completely unknown

fbitem-4cd51ab3c35a7b3305c9ec1422d26bc93a21a482
Reported by: @kbraak
System: Firefox 51.0.0 / Mac OS X 10.10.0
Referer: https://demo.gbif.org/occurrence/search?basis_of_record=HUMAN_OBSERVATION&basis_of_record=OBSERVATION
Window size: width 1407 - height 994
API log
Site log

@kbraak is the parent term in option #2 not Occurrence instead of Observation which you want to get rid of as its not an official term anymore?
I would also like to point out that this affects how we interpret values. Our BoR parser does generate Literature values still, cause we have it in our API, and would need to be changed.
Personally I would be in favour of entirely rethinking the BoR vocabulary and create a new, hierarchical one not too different from the current official one. During several TDWG meetings GBIF was told to lead such a vocabulary development

Thanks Markus,
Thanks for reminding that this has implications on how we parse basisOfRecord values.
To answer your question, the parent term in option #2 could well read:

Observed occurrences

human observations
machine observations
unknown (may be human or machine)

Unknown type of occurrences

coming from literature
unknown (may be observation or specimen or material sample)

I agree that long-term a new hierarchical BoR vocabulary makes sense.
My intermediate aim here, however, is just to help users understand how to properly filter by basisOfRecord. Currently users are confused how to use this filter, not least because there are no definitions (see issue #240).


Split Preview

Thanks for improving the split preview window. Can you have the waveform preview also update to reflect the selected split? That is, when I draw a region and it asks me if I want to split, it would be nice to see the mean waveforms previewed to help me decide. Let me know if that's confusing...thanks!

I tested using Fermium dataset and I believe I fixed it in v4.9.2


Remove targetpath from gir

WIP
Need fix gir to remove mkdir -p $(@D)/src

Undo change to build cargo.toml
Make absolute path
When gkoz/gir#93 merged, I update gir and remove mkdir

Out of curiosity, what happens without abspath?

Old reason was remove '..' from path.
Now just not sure what do create_dir_all when path relative, and not exists.

And prefer full path as output

Ready.

Thanks!

You plan add build test?

Not yet. I consider this a prototype, further extension should wait until @GuillaumeGomez has a chance to look at all this. Currently I'm working on making the "normal" crates build with these.

IMHO better leave sys in normal crate (as current)

On other side, sys modules will be updated rarely, so may be good that it all in one place.


SW Registers Same Tab as Two Clients

Open a new tab and look at the clients registered to the SW.

It's a feature not a bug 😛
When the page initially loads, the service worker responds with the injection/downloader html. The injected page then fetches the originally requested page and displays it in an iframe. Each context, the parent page and it's iframe, is it's own client so that's why there are two.


Support passing memory addresses directly

Hello!
Currently we can only pass java.nio.ByteBuffer, however, it would be nice to be able to pass memory addresses directly.
e.g. io.netty.buffer.ByteBuf#memoryAddress
Thanks!

Search for the "Unsafe" variants: compressUnsafe and decompressUnsafe

Yes, saw it first time and then my mind went like 'ok let's forget about that'
Thanks!


Doubtful that variable offset has not been used while executing cosyvoice.llm.llm.TransformerLM.inference()?

When executing cosyvoice.llm.llm.TransformerLM.inference(), the variable offset in the function is not used,see code line .
diff --git a/cosyvoice/llm/llm.py b/cosyvoice/llm/llm.py
index dcd087a..ef198b6 100644
--- a/cosyvoice/llm/llm.py
+++ b/cosyvoice/llm/llm.py
@@ -197,7 +197,7 @@ class TransformerLM(torch.nn.Module):
         offset = 0
         att_cache, cnn_cache = torch.zeros((0, 0, 0, 0), device=lm_input.device), torch.zeros((0, 0, 0, 0), device=lm_input.device)
         for i in range(max_len):
-            y_pred, att_cache, cnn_cache = self.llm.forward_chunk(lm_input, offset=0, required_cache_size=-1,
+            y_pred, att_cache, cnn_cache = self.llm.forward_chunk(lm_input, offset=offset, required_cache_size=-1,
                                                                   att_cache=att_cache, cnn_cache=cnn_cache,
                                                                   att_mask=torch.tril(torch.ones((1, lm_input.shape[1], lm_input.shape[1]),
                                                                                device=lm_input.device)).to(torch.bool))

or maybe the variable a is not really needed.

not used, offset is calculated from att_cache actually, we keep it because other embedding function may need it


RefreshScope updates configuration properties only once

I have been  struggling with refresh scope updating my properties only once and after that it will not replace them any longer, although getting the properties via actuator/env shows that the value has been correctly fetched.
This has been around for a while but I am reporting this with M5.
I have attached a project with a config client and server to demonstrate the issue.
refreshscope.zip
To run this test:

in config server application yaml update the search location to point to the correct location of the config-server

run both apps, and call localhost:8080/get    --> should get the value 7

update application.yml in demo_config_server/config-repo to any value and call localhost:8080/actuator/refresh

repeat (2) --> shows new value

repeat (3) with a new value

repeat (2) --> still value from step (3)

check under actuator localhost:8080/actuator/env?pattern=mrm.*   --> value from (5) is there

Please let me know if you need more details

run both apps? I only see one.

the zip file contains 2 spring apps, demo_app and demo_config_server

@spencergibb  the zip file contains 2 spring apps, demo_app and demo_config_server

some debugging and it seems that the context used in the biding on the 2nd run and onwards is different and does not contain any sources!

It shames me to say this, but any workaround would be nice for this issue as it is affecting my production system.

@vbasem do you know Finchley and Boot milestones are not recommended for production?

Same issue with boot - 2.0.0.M7 and cloud - Finchley.M6

See https://github.com/spring-projects/spring-boot/issues/12451

This issue will be fixed by Spring Boot 2.0.1 due Mar 29. That should be what Finchley.RC1 builds upon.

Wanted to add for those who will struggle to understand why properties are not refreshed at all (might make sense to add to documentation?).
Issue might be more connected to spring than to spring cloud, however:
apparently if you are using embedded spring config server, native profile and configure config file location with 'classpath:' prefix (for example: search-locations: classpath:config
i.e. ClassPathResource) then in a case of default spring boot web application resources will be loaded using Tomcat's class loader which caches resources.
And in this case property source values are not refreshed at all.

No, it was a specific bug in spring boot

@vbasem can you confirm 2.0.1 fixed your issue?

@spencergibb sorry for the late reply, I am migrating the code to 2.0.1 and Finchley M9 and will report back. Sadly with webflux there were breaking changes and it is taking me longer than anticipated.

@spencergibb thank you for the update once again. It does indeed solve the issue at hand. I am able to reload the config and get the updated values.

Still have this issue with
<spring-boot.version>2.3.3.RELEASE</spring-boot.version>
<spring-cloud.version>Hoxton.SR8</spring-cloud.version>


KVM Switches

Has anyone tested any KVM switches to extend the functionality across multiple computers? If so it might be nice if this was added to the documentation.
Alternatively, since this project uses the pikvm project as an upstream, is it safe to assume that the KVM switches listed in that projects documentation also work with this?

Yes， the KVM switches listed in pikvm projects documentation also work.

BliKVM discord @https://discord.gg/dwx7vKYt

Thanks. I'll join the discord. Hopefully I'll be able to test a few new KVM switches after my KVM arrives.

It's my understanding that some KVM switches don't play nice with BliKVM. I think this is because those KVM switches don't much adhere to standards. Sorry I don't have more details but wanted to share the information with you.

For controlling just 2 systems I use  29 euro AIMOS HDMI KVM switch, https://amzn.eu/d/6knC4yF
Works fine with hotkey switching ootb.


Valid pattern match fails to compile

The following pattern matching expression fails. I am not sure if this is a valid error.
Repro steps
type Token =
  | T_Exclamation
  | T_Question
  | T_String of string
  | T_Lparen
  | T_Rparen
  | T_Eof
  | T_Empty

let compare (x:Token) (y:Token) =
  match x, y with
  | N_Session, N_Session -> 0
  | _,_ -> 1

Error
error FS0038: 'N_Session' is bound twice in this pattern
Related information

Windows 10
.NET Runtime,
Visual Studio Version 2017, 15.3.2

You don't have the case N_session so it's treated as variable and you can't use the same car name in one pattern more then one

@AviAvni .. Indeed. you are correct. I will close this issue.


remove unused deps and features

Drop lazy_static, aligned and some (unused) windows-sys features.

Thank you for your PR!


Add satellite pre-processing for city climate model

Just to speed things up I plan on merging this PR as is (sometime today). I'll then write and apply a patch with minimal changes that satisfy the newly added pre-commit hooks, just so that the CI will pass on the master branch.


Fixed typos

Ativation -> Activation

@oanapl or @tugup pls review/sign-off. Thanks!

#sign-off

#hold-off

@oanapl or @tugup Adding a couple more changes ... went through the entire docs, no more changes after this :)

@Christina-Kang : Thanks for your contribution to the Azure documentation! The author, @harahma, has been notified to review your proposed change.

#sign-off


RER and Windows Authentication

What about RER hosting and authentication? I didn't find information here what authentication options should be set up in the service but some articles say that the receiver service can only work with anonymous authentication (e. g.  https://sptechjournal.wordpress.com/2015/07/26/sharepoint-2013-hosting-remote-event-receivers-in-iis/)
In my case (SPF 2013) I was able to make receiver working only with anonymous authentication but there are another worries about security because default client context retrieval code inside event receiver does not check who calls the service.

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

ID: 22e75925-b939-1b47-cca8-5a4aaa452e90
Version Independent ID: 3d6e85ec-30bc-6c69-7cd3-ca07081ea79b
Content: Create a remote event receiver in SharePoint Add-ins
Content Source: docs/sp-add-ins/create-a-remote-event-receiver-in-sharepoint-add-ins.md
Service: unspecified
GitHub Login: @spdevdocs
Microsoft Alias: spdevdocs

I can confirm Anonymous is required for RER. This is because if the RER needs to callback into SharePoint it can use OAuth. Also the only way to address  the "anyone can call the RER" concern is to put the RER behind a network device (firewall, proxy) that can verify the source and filter requests that are not coming from the SP servers.

@flaviuc
Create an add-in event receiver in SharePoint Add-ins says that in production environment I have to avoid custom port number (I have no idea why and the document doesn't explain). In this case firewall cannot be used effectively

RERs sit in their own folder... https://support.microsoft.com/en-us/help/324066/how-to-restrict-site-access-by-ip-address-or-domain-name something like this should work... IP based restriction in "local" web.config

@flaviuc
Anyway such a considerations and instructions should be reflected in documentation as well as big red WARNING about security hole in default RER implementation that comes from Visual Studio item template. This is main reason I opened the issue.

The documentation states the requirement that production endpoints for the RER cannot include a port number. Therefore it is documented... not sure what action is requested from this issue...
Can you please clarify?

@andrewconnell

@flaviuc
Anyway such a considerations and instructions should be reflected in documentation as well as big red WARNING about security hole in default RER implementation that comes from Visual Studio item template. This is main reason I opened the issue.

That's just a copy of what was posted above... my comment was stating that based on what I have read, I'm not clear what is being requested.
@ivanbilokon said:

"considerations and instructions should be reflected in documentation"

I read the thread as talking about ports. The doc is clear in stating: "The URL of a production receiver cannot specify a particular port. This means that you must use either port 443 for HTTPS, which we recommend, or port 80 for HTTP."
So... it is documented... and therefore I'm not clear what is being requested.
@ivanbilokon said:

big red WARNING about security hole

What security hole? There is no security hole... when a RER fires it submits an HTTP POST to the specified endpoint. The payload includes a token which your service can inspect to ensure it came from SharePoint.

@andrewconnell sorry for not being clear. I'll try to clarify what I meant.
If I create event receiver via default project template it creates some service with some basic ClientContext retrieval code via TokenHelper class:
using (ClientContext clientContext = TokenHelper.CreateRemoteEventReceiverClientContext(properties))
If I look at the CreateRemoteEventReceiverClientContext implementation I find this:
if (IsHighTrustApp())             {                 return GetS2SClientContextWithWindowsIdentity(sharepointUrl, null);             }
This code ignores any token information that could be passed to the helper from SPRemoteEventProperties. In this case we still have security hole if we leave the default code as is.
I agree that code sample in the article may not have the same issue (actually I don't remember because that was a year ago). But the article does not say that I need to make the service accessible anonymously, how to make that working and what security impact does it have in case of high trust apps.

The ProcessEvent() method passes in an instance of the SPRemoteEventProperties which contains the ContextToken submitted in the request.
In the code in the doc, there's a section with the comment //If there is a valid token, continue. That's exactly what you should to validate the call is coming from SharePoint. SharePoint includes a context token in the HTTP POST when an RER fires that TokenHelper can validate it was signed by SharePoint / Azure AD / ACS (I forget which one as it's been a long time, but it's irrelevant).
The sample code in any File > New Project experience in Visual Studio may not be 100% hardened for your liking. The goal of all VS projects is to get to you a working solution OOTB as fast as possible.
To your point:

But the article does not say that I need to make the service accessible anonymously, how to make that working and what security impact does it have in case of high trust apps.

I guess it's not mentioned because it's not required. Your initial post above stated "What about RER hosting and authentication? I didn't find information here what authentication options should be set up in the service" ... the doc doesn't mention it because you don't do that. SharePoint isn't going to authenticate with the remote service... it just simply doesn't work that way.
The service is secured with the context token SharePoint provides. The guidance is for the service to be configured to only work on SSL to sure someone isn't jumping in the middle.

@andrewconnell Now overall idea is clear. Thanks.

Cool... happy to clear this up!


PyBNN benchmark container error when running

I get an import error at line client_abstract_benchmark.py:335 when launching the BNNOnBostonHousing singularity container.
[2023-06-06 17:29:46,453][BenchmarkClient][INFO] - ~~~ HPOBENCH VERSION: 0.0.11dev ~~~~ CONTAINER VERSION: 0.0.4 ~~~
Traceback (most recent call last):
  File "/home/HPOBench/hpobench/container/server_abstract_benchmark.py", line 131, in <module>
    exec(f"from hpobench.benchmarks.{args.importBase} import {args.benchmark} as Benchmark")
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python3.7/site-packages/hpobench/benchmarks/ml/__init__.py", line 1, in <module>
    from hpobench.benchmarks.ml.histgb_benchmark import HistGBBenchmark, HistGBBenchmarkBB, HistGBBenchmarkMF
  File "/usr/local/lib/python3.7/site-packages/hpobench/benchmarks/ml/histgb_benchmark.py", line 15, in <module>
    from sklearn.experimental import enable_hist_gradient_boosting  # noqa
ModuleNotFoundError: No module named 'sklearn

Hi,
Thanks for bringing this up.
We too noticed the issue and have been looking into a fix.
The containers will be updated soon (hopefully in a week) which should fix it.
In the meantime, perhaps the non-container version of the benchmark works for your use case.


error when using gawk

Using wcwidth.awk with gawk and a UTF-8 locale fails:
      $ make
      gawk
      - sanity check: gawk: wcwidth.awk:104: error: Invalid collation character: /^([-][-][ -~]*)+/

It does seem to work with mawk, or with gawk with the C locale though.
Commenting out the lines 104-112 solves the problem, but I'm not sure what it impacts.

Thanks. I'll leave it commented then, as I'm not sure I'll have time to look into it in the foreseeable future.


How to register plugins in io.flutter.embedding.android.FlutterActivity

I am using Experimental:-Add-Flutter-Activity to add a Flutter Activity with my native android app, but some plugin are not work.
I found that I didn't register plugins at all, Can anyone tell me how to do it at io.flutter.embedding.android.FlutterActivity?
import io.flutter.embedding.android.FlutterActivity;
import io.flutter.embedding.engine.FlutterEngine;
import io.flutter.embedding.engine.dart.DartExecutor;
import io.flutter.plugin.common.MethodCall;
import io.flutter.plugin.common.MethodChannel;
import io.flutter.plugin.common.PluginRegistry;
import io.flutter.plugins.GeneratedPluginRegistrant;
import io.flutter.view.FlutterMain;

public abstract  class BaseFlutterActivity extends FlutterActivity {

@Override
    protected void onCreate(Bundle savedInstanceState) {
        FlutterMain.startInitialization(this);
        super.onCreate(savedInstanceState);
        GeneratedPluginRegistrant.registerWith(this);
        initMethodChannel();
    }

[✓] Flutter (Channel master, v1.10.6-pre.29, on Mac OS X 10.14.6 18G95, locale zh-Hans-CN)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 10.3)
[✓] Android Studio (version 3.5)
[✓] VS Code (version 1.38.1)
[✓] Connected device (1 available)

• No issues found!

@ZhenTs You should use io.flutter.app.FlutterActivity instead of io.flutter.embedding.android.FlutterActivity. For example:
import android.content.Context
import android.content.Intent
import android.os.Bundle
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleOwner
import androidx.lifecycle.LifecycleRegistry
import io.flutter.app.FlutterActivity
import io.flutter.facade.Flutter
import io.flutter.plugin.common.MethodChannel
import io.flutter.plugins.GeneratedPluginRegistrant
import io.flutter.view.FlutterMain
import io.flutter.view.FlutterView

class MyActivity : FlutterActivity(), LifecycleOwner {

    private val lifecycleRegistry = LifecycleRegistry(this)

    override fun getLifecycle(): Lifecycle = lifecycleRegistry

    override fun onCreate(savedInstanceState: Bundle?) {
        FlutterMain.startInitialization(this)
        super.onCreate(savedInstanceState)
        GeneratedPluginRegistrant.registerWith(this)
        initMethodChannel();
    }

    override fun createFlutterView(context: Context?): FlutterView {
        val flutterView = Flutter.createView(this, lifecycle, null)
        setContentView(flutterView)
        return flutterView
    }
}

According to this, you need to override configureFlutterEngine, for example:
  @Override   public void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) {     // Use the GeneratedPluginRegistrant to add every plugin that's in the pubspec.     GeneratedPluginRegistrant.registerWith(new ShimPluginRegistry(flutterEngine));   }

@ZhenTs Have you solved this ?

Yes, by overriding configureFlutterEngine.

@askarsyzdykov Not really but the master branch already includes the new embedding api which solves some issues that I'm currently facing. If you target to stable then everything works as expected.

@matthew-carroll I'd like ask your help to understand how FlutterView should be used in the v2 embedding.
Currently, I'm creating my CustomView which extends from FlutterView.  In order to attach and detach I've implemented the following methods:
   @Override
    protected void onDetachedFromWindow() {
        super.onDetachedFromWindow();
        detachFromFlutterEngine();
    }

    @Override
    protected void onAttachedToWindow() {
        super.onAttachedToWindow();
        attachToFlutterEngine(MyFlutterEngine.getInstance(getContext()));
    }

This seems to work just fine but after some push and pop events it seems that ui events are no longer managed. There is some information regarding AppLifecycleState.resumed in the new embedding wiki but I'm not able to understand how it applies in the new embedding flow.
Your help would be greatly appreciated. Thanks in advance,

Can you elaborate a bit on what you're looking to achieve with a custom FlutterView?
Generally speaking, if you're going to use a custom FlutterView, you'll need to replicate the same logic that currently exists in FlutterActivity and FlutterFragment, which has mostly been centralized in a delegate here:
https://github.com/flutter/engine/blob/master/shell/platform/android/io/flutter/embedding/android/FlutterActivityAndFragmentDelegate.java

@matthew-carroll Sure. I've created a native Android SDK on top of flutter. The SDK exposes three ways of integrating our ChatView namely, MyChatActivity, MyChatFragment and MyChatView. Each of these classes extends from the flutter counterpart classes FlutterActivity, FlutterFragment and FlutterView.
In MyChatFragment I'd to override the following method:
@Override
    public boolean shouldAttachEngineToActivity() {
        return true;
    }

I was also forced to forward onRequestPermissionsResult to MyChatFragment otherwise Flutter was not handling request permissions correctly. I believe this is what you guys would expect.
My current problem is that when using MyChatView which extends FlutterView the permissions request is not being handled by flutter but now I'm not sure how to fix it because FlutterView does not expose onRequestPermissionsResult and it also does not have any delegate to forward the call.
So, I'm trying to understand what should be implemented on my side to fix these issues.
Thanks for your time.

That's right, FlutterView does not receive any lifecycle or Activity calls because it's just a View. You'll have to replicate the behavior that I linked in my previous solution. If you're using a FlutterView directly, you'll need to manage the associated FlutterEngine, including sending Flutter lifecycle messages over the associated system channel. Using a FlutterView directly is not particularly easy at this point. We haven't focused on that use-case. For now you'll need to replicate all the standard Flutter behavior that exists in FlutterFragment and FlutterActivity, which is why those classes happen to exist. Does that make sense?

Yeah I think we'll investigate the standalone FlutterView use-case sometime soon, but it's not scheduled as a current priority. CC @xster for priority visibility.

The ask is to have a compositional helper class that a non-flutter activity/fragment forwards to when using a view+engine without a flutter activity/fragment? Not currently supported but seems reasonable.

What about the original issue question? Currently it looks like MethodChannel is incompatible with io.flutter.embedding.android.FlutterActivity!

@BurningAXE on master your plugins should be automatically registered in the new FlutterActivity.
If you're not on master then you need to override the following:
  @Override
  public void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) {
    // Use the GeneratedPluginRegistrant to add every plugin that's in the pubspec.
    GeneratedPluginRegistrant.registerWith(new ShimPluginRegistry(flutterEngine));
  }

@matthew-carroll Do you have a working example for the master channel version? I wasn't able to get MethodChannel messages to and from my Flutter module.

It would probably be easier if you could share an example of what's not working. Can you post the relevant code that you're attempting to use on the Android side related to plugins?

Sure. Here is my FlutterActivity subclass:
import io.flutter.embedding.android.FlutterActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.embedding.engine.FlutterEngineCache
import io.flutter.embedding.engine.plugins.shim.ShimPluginRegistry
import io.flutter.plugin.common.MethodCall
import io.flutter.plugin.common.MethodChannel
import io.flutter.plugin.platform.PlatformViewsController
import io.flutter.plugins.GeneratedPluginRegistrant

class FlutterViewActivity : FlutterActivity() {
    override fun provideFlutterEngine(context: Context): FlutterEngine? {
        val flutterEngine = FlutterEngineCache.getInstance().get("my_engine_id")
        return flutterEngine
    }

    override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
        // Create a ShimPluginRegistry and wrap the FlutterEngine with the shim.
        val shimPluginRegistry = ShimPluginRegistry(flutterEngine, PlatformViewsController())

        // Use the GeneratedPluginRegistrant to add every plugin that's in the pubspec.
        GeneratedPluginRegistrant.registerWith(shimPluginRegistry);
        registerFlutterCallbacks(flutterEngine)
    }

    fun registerFlutterCallbacks(flutterEngine: FlutterEngine) {
        MethodChannel(flutterEngine.dartExecutor, CHANNEL_DATA).setMethodCallHandler { call, result ->
            // manage method calls here
           ...
        }
    }
}

The engine is created and cached in my Application subclass:
```
private void setupFlutter() {
    // Instantiate your FlutterEngine.
    FlutterEngine flutterEngine = new FlutterEngine(this);

    // Pre-warm your FlutterEngine by starting Dart execution.
    flutterEngine
            .getDartExecutor()
            .executeDartEntrypoint(
                    DartExecutor.DartEntrypoint.createDefault()
            );

    FlutterEngineCache
            .getInstance()
            .put("my_engine_id", flutterEngine);
}

It seems that everything is working but I'm not receiving the calls on `MethodChannel`. Sending works, though.

@BurningAXE what Flutter version do you use?

Sorry for missing that. I tried running that on v1.12.3-pre.27 which was HEAD of the master channel yesterday.

@BurningAXE with the code example you posted, are you having issues with your plugins, or your standalone method channel, or both?

@matthew-carroll I don't receive messages on the method channel from the Flutter module to the Android one.

But your plugins are working as expected?

Yes. Please separate it in another issue if you think it's unrelated to this one. I just thought it's linked.

Can you also post the Dart card that you're using to try to send messages from Dart to Flutter?

I am confused! What is a Dart card? And I'm trying to send messages from Flutter to Android module.

That was a typo. I was asking for the Dart code. And Dart is the same thing as Flutter. You're trying to send a message from Dart/Flutter to the Android platform. So it might be helpful to see the Dart code where you setup the channel and try to send a message.

Ok, got it.
In main.dart:
const dataMethodChannel = const MethodChannel('com.kanbanize.android.flutter/data');
In a widget's State:
  _BoardWidgetState() {
    dataMethodChannel.setMethodCallHandler(_receiveFromHost);
    try {
      dataMethodChannel.invokeMethod("FlutterModuleLoaded");
    } catch (e) {
      print('Failed to invoke FlutterModuleLoaded: $e');
    }
}

I don't see the log from the catch statement.

and your CHANNEL_DATA constant on Android equals "com.kanbanize.android.flutter/data"?

Yes:
const val CHANNEL_DATA = "com.kanbanize.android.flutter/data";
Mind you - this code was working with io.flutter.app.FlutterActivity

@BurningAXE I've setup a Kotlin add-to-app project and successfully sent a message from Dart to Android. Here are the relevant pieces of my project:
Pre-warm engine in Application subclass:
class MyApplication : Application() {
    lateinit var flutterEngine : FlutterEngine

    override fun onCreate() {
        super.onCreate()

        // Instantiate a FlutterEngine.
        flutterEngine = FlutterEngine(this)

        // Start executing Dart code to pre-warm the FlutterEngine.
        flutterEngine.dartExecutor.executeDartEntrypoint(
            DartExecutor.DartEntrypoint.createDefault()
        )

        // Cache the FlutterEngine to be used by FlutterActivity.
        FlutterEngineCache
            .getInstance()
            .put("my_engine_id", flutterEngine)
    }
}

Subclass FlutterActivity:
class ChannelReproActivity : FlutterActivity() {
    val TAG = "ChannelReproActivity"

    override fun provideFlutterEngine(context: Context): FlutterEngine? {
        return FlutterEngineCache.getInstance().get("my_engine_id")
    }

    override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
        // Use the GeneratedPluginRegistrant to add every plugin that's in the pubspec.
        GeneratedPluginRegistrant.registerWith(flutterEngine)

        // Add method channel.
        MethodChannel(flutterEngine.dartExecutor, "com.kanbanize.android.flutter/data").setMethodCallHandler { call, result ->
            Log.d(TAG, "Received call from Dart.")
        }
    }
}

Send message from Dart:
const dataMethodChannel = const MethodChannel('com.kanbanize.android.flutter/data');

void main() {
  runApp(MyApp());

  dataMethodChannel.setMethodCallHandler((MethodCall call) async {
    // no-op
  });
  try {
    dataMethodChannel.invokeMethod("FlutterModuleLoaded");
  } catch (e) {
    print('Failed to invoke FlutterModuleLoaded: $e');
  }
}

The above works for me.
BTW, I'm guessing that you're not really at tip of tree because the constructor that you invoke for your ShimPluginRegistry no longer exists. A PlatformViewsController is no longer sent into that constructor. So you may want to check the version of Flutter that you're building against.
Also, depending on your needs, if you register your method channel with your FlutterEngine inside your Application subclass, then you can avoid doing that in an Activity and then you can use FlutterActivity directly without subclassing. But that will only work if it's OK for you to have that channel registered as long as the FlutterEngine exists.

@matthew-carroll Thanks a lot for the time you put into this!
I updated to the current tip of master (which should be v1.12.12-pre.4) and tried your code (which was mostly the same as my code). However, I hit this issue. To get past that and just give it a try I commented GeneratedPluginRegistrant.registerWith(flutterEngine)
What I found was that I do receive messages from Flutter to Android. However, the message is send when I create the engine, not when I start the Activity! I invoke "FlutterModuleLoaded" inside the State of my main widget. It looks like that Flutter starts actually building the widget tree as soon as the engine is created and "pre-warmed". Is this correct and expected?
If correct - do we need to wait and verify Flutter is loaded anymore or it's safe to assume it is?

@BurningAXE let's go ahead and pick this up on that other issue then.
I think this issue is resolved, so I'm going to close it. Feel free to re-open if there are unhandled issues related to this ticket.

@matthew-carroll Yes, I think the issue is resolved. Can you please answer my two questions at the end as you already have the context and (hopefully) the knowledge :)

I have managed to implement a io.flutter.embedding.android.FlutterActivity into my existing Android app OK (with a cached engine), but I am unable to get any channel comms working at all. Even a straightforward async method call from my flutter module will not trigger the MethodCallHandler in my FlutterActivity.
I could see the flutter example 'platform_channel' project is working OK with embedded FlutterActivity, but it does not have an explicit declaration for a FlutterEngine.
Just wondering if I am missing a step?
@BurningAXE - how did you resolve your original MethodCall problem?

@coastalgit In my case it turned out the channel messages were coming but they were coming too early! I had an automatic message to let me know Flutter has loaded (so I can send it some data). However, when you cache the engine it turns out it immediately builds the widget tree (even though it is not yet visible anywhere) and sends the message. At this time there is no FlutterActivity to receive it. I have another message that is sent at the touch of a button and I receive it in the FlutterActivity.

@BurningAXE I see, thanks. Are you subclassing FlutterActivity? I think I must be missing something quite obvious. Am I still to define io.flutter.embedding.android.FlutterActivity in the manifest, even though it is subclassed?

@BurningAXE @matthew-carroll @xster
I desperately need some assistance with this gents. I am unable to get a method channel open between my flutter module and the subclassed FlutterActivity in my native Android app. I do not believe I am actually getting my subclassed instance of FlutterActivity generated.
AndroidManifest.xml:
<activity android:name=".MyFlutterActivity"
    android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"
            android:exported="true"
            android:hardwareAccelerated="true"
<EMAIL_ADDRESS>            android:windowSoftInputMode="adjustResize"/>

<!--
<activity android:name="io.flutter.embedding.android.FlutterActivity"/>
 -->

From existing Android app:
public class MainApp extends FlutterApplication {
    FlutterEngine fe;
    @Override
    public void onCreate() {
        super.onCreate();
        fe = new FlutterEngine(this);
        fe
          .getDartExecutor()
          .executeDartEntrypoint(
            DartExecutor.DartEntrypoint.createDefault()
          );
        FlutterEngineCache.getInstance().put("my_engine_id", fe);
    }

Launching my subclass of FlutterActivity from within a native existing Android activity in the existing app:
private void loadMySubclassedFlutterActivity(){
        Intent flutterIntent = MyFlutterActivity
                .withCachedEngine("my_engine_id")
                .build(this);
        startActivity(flutterIntent);
}

My subclass:
public class MyFlutterActivity extends FlutterActivity {
    private static final String TAG = MyFlutterActivity.class.getSimpleName();
    private static final String REQUEST_CHANNEL = "add2app.io/request";

    @Override
    public FlutterEngine provideFlutterEngine(Context context) {
        Log.d(TAG, "provideFlutterEngine: ");
        return FlutterEngineCache.getInstance().get("my_engine_id");
    }

//    @Override
//    protected void onCreate(Bundle savedInstanceState) {
//        Log.d(TAG, "onCreate: ");
//        super.onCreate(savedInstanceState);
//    }

    @Override
    public void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) {
        Log.d(TAG, "configureFlutterEngine: ");
        //super.configureFlutterEngine(flutterEngine);
        GeneratedPluginRegistrant.registerWith(flutterEngine);

        new MethodChannel(flutterEngine.getDartExecutor(), REQUEST_CHANNEL).setMethodCallHandler(
                (call, result) -> {
                    if (call.method.equals("getNativeMsg")) {
                        String nd = "Ola from Android";
                        result.success(nd);
                    } else {
                        result.notImplemented();
                    }
                }
        );
    }
}

With above code, if I leave the manifest entry commented out for FlutterActivity, I get

android.content.ActivityNotFoundException: Unable to find explicit activity class {com.example.fluttand/io.flutter.embedding.android.FlutterActivity};

If I uncomment it, my flutter app appears OK, but (i) I do not see any MyFlutterActivity log messages and (ii) the method call from within my dart code to invokeMethod('getNativeMsg') generates the exception:

MissingPluginException(No implementation found for method getNativeMsg on channel add2app.io/request)

I've seen some references to the following manifest entry, but not sure if it is relevant:
<meta-data
  android:name="flutterEmbedding"
  android:value="2" />

Building off master (29 November 2019 at 14:17:52 WET)
Any input greatly appreciated.

Hi @coastalgit ,
Here is my relevant code:
AndroidManifest.xml:
        <activity
            android:name=".FlutterViewActivity"
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"
            android:hardwareAccelerated="true"
            android:windowSoftInputMode="adjustResize"
            />

Application subclass:
import androidx.multidex.MultiDexApplication;
import io.flutter.embedding.engine.FlutterEngine;
import io.flutter.embedding.engine.FlutterEngineCache;
import io.flutter.embedding.engine.dart.DartExecutor;

public class MyApplication extends MultiDexApplication {

	@Override
	public void onCreate() {
	    super.onCreate();
            //...
            setupFlutter();
	}

    private void setupFlutter() {
        // Instantiate your FlutterEngine.
        FlutterEngine flutterEngine = new FlutterEngine(this);

        // Pre-warm your FlutterEngine by starting Dart execution.
        flutterEngine
                .getDartExecutor()
                .executeDartEntrypoint(
                        DartExecutor.DartEntrypoint.createDefault()
                );

        FlutterEngineCache
                .getInstance()
                .put("my_engine_id", flutterEngine);
    }
}

FlutterActivity subclass (in Kotlin):
import io.flutter.embedding.android.FlutterActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.embedding.engine.FlutterEngineCache
import io.flutter.plugin.common.BinaryMessenger
import io.flutter.plugin.common.MethodChannel
import io.flutter.plugins.GeneratedPluginRegistrant

class FlutterViewActivity : FlutterActivity() {

    companion object {
        const val CHANNEL_DATA = "com.kanbanize.android.flutter/data";
        const val CHANNEL_ACTIONS = "com.kanbanize.android.flutter/actions";
        val TAG = this::class.java.simpleName
        val boardKey = "boardKey"
        val workflowIdKey = "workflowIdKey"

        @JvmStatic
        fun startActivity(context: Context, board: Board, workflowId: Long) {
            val intent = Intent(context, FlutterViewActivity::class.java)
            intent.putExtra(boardKey, board)
            intent.putExtra(workflowIdKey, workflowId)
            context.startActivity(intent)
        }
    }

    override fun provideFlutterEngine(context: Context): FlutterEngine? {
        return FlutterEngineCache.getInstance().get("my_engine_id")
    }

    override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
        GeneratedPluginRegistrant.registerWith(flutterEngine);

        registerFlutterCallbacks(flutterEngine.dartExecutor)
    }

    fun registerFlutterCallbacks(messenger: BinaryMessenger) {
        MethodChannel(messenger, CHANNEL_DATA).setMethodCallHandler { call, result ->
            // manage method calls here
            if (call.method == "FlutterModuleLoaded") {
                flutterModuleIsLoaded = true
            }
            else {
                result.notImplemented()
            }
        }

        MethodChannel(messenger, CHANNEL_ACTIONS).setMethodCallHandler { call, result ->
            // manage method calls here
            try {
                if (call.method == "AddNewTask") {
                    addNewTask()
                }
                else {
                    result.notImplemented()
                }
            } catch (ex: Exception) {
                Crashlytics.log(0, TAG, "Failed to handle call: " + call.toString())
            }
        }
    }
}

The AddNewTask message is sent at the tap of a button and I get the call in Android so it works. I just tested it with the latest Flutter version on the master channel - v1.12.16-pre.35
Let me know if I can help in any other way - I know how frustrating this lack of stability and helpful resources is!

@BurningAXE - Firstly, many thanks for the rapid response.
Immediately, when I seen your startActivity helper method, I could see the cause of my problem. I was launching my subclassed Activity based on the content in the docs, whereby I was using:
Intent flutterIntent = MyFlutterActivity
                .withCachedEngine("my_engine_id")
                .build(this);
startActivity(flutterIntent);

I switched from this to the traditional means of launching an Activity:
Intent flutterIntent = new Intent(this,MyFlutterActivity.class);
startActivity(flutterIntent);

... and my subclassed Activity started ok and my existing method channel code worked :)
I tip my hat to you sir.
Out of interest, as the Add2App adventure is in its infancy -- it would be good to share/track progress. Are you on the fluttercommunity.slack.com channel?

Nice! I'm really glad I could help!
As for the Slack community - hadn't thought to join but just did it out of curiosity. I am Milen Marinov there.

@BurningAXE

It looks like Flutter starts actually building the widget tree as soon as the engine is created and "pre-warmed". Is this correct and expected?

That's correct. When you start executing Dart code, which is the same thing as "pre-warming the engine", your main() methods runs, which probably invokes runApp(), which builds your widget tree.

If correct - do we still need to wait and verify Flutter is loaded or it's safe to assume it is now?

I would not make any assumptions about timing. The safest bet is to maintain a messaging that ensures both sides of a channel/plugin are ready to handle work.

@matthew-carroll Thanks for the answers!

@matthew-carroll after migrating our app to V2 embedding, this plugin stopped working, do you know what can we do to make it work again? This is a release blocker for our app https://github.com/avioli/uni_links/issues/29

@BurningAXE I've setup a Kotlin add-to-app project and successfully sent a message from Dart to Android. Here are the relevant pieces of my project:
Pre-warm engine in Application subclass:
class MyApplication : Application() {
    lateinit var flutterEngine : FlutterEngine

    override fun onCreate() {
        super.onCreate()

        // Instantiate a FlutterEngine.
        flutterEngine = FlutterEngine(this)

        // Start executing Dart code to pre-warm the FlutterEngine.
        flutterEngine.dartExecutor.executeDartEntrypoint(
            DartExecutor.DartEntrypoint.createDefault()
        )

        // Cache the FlutterEngine to be used by FlutterActivity.
        FlutterEngineCache
            .getInstance()
            .put("my_engine_id", flutterEngine)
    }
}

Subclass FlutterActivity:
class ChannelReproActivity : FlutterActivity() {
    val TAG = "ChannelReproActivity"

    override fun provideFlutterEngine(context: Context): FlutterEngine? {
        return FlutterEngineCache.getInstance().get("my_engine_id")
    }

    override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
        // Use the GeneratedPluginRegistrant to add every plugin that's in the pubspec.
        GeneratedPluginRegistrant.registerWith(flutterEngine)

        // Add method channel.
        MethodChannel(flutterEngine.dartExecutor, "com.kanbanize.android.flutter/data").setMethodCallHandler { call, result ->
            Log.d(TAG, "Received call from Dart.")
        }
    }
}

Send message from Dart:
const dataMethodChannel = const MethodChannel('com.kanbanize.android.flutter/data');

void main() {
  runApp(MyApp());

  dataMethodChannel.setMethodCallHandler((MethodCall call) async {
    // no-op
  });
  try {
    dataMethodChannel.invokeMethod("FlutterModuleLoaded");
  } catch (e) {
    print('Failed to invoke FlutterModuleLoaded: $e');
  }
}

The above works for me.
BTW, I'm guessing that you're not really at tip of tree because the constructor that you invoke for your ShimPluginRegistry no longer exists. A PlatformViewsController is no longer sent into that constructor. So you may want to check the version of Flutter that you're building against.
Also, depending on your needs, if you register your method channel with your FlutterEngine inside your Application subclass, then you can avoid doing that in an Activity and then you can use FlutterActivity directly without subclassing. But that will only work if it's OK for you to have that channel registered as long as the FlutterEngine exists.

Hi @matthew-carroll , When i use this this example, how can i set route or custom route in flutter. In Flutter version 1.7.x i use this method to set route in flutter.
override fun createFlutterView(context: Context?): FlutterView {
        val layoutParams = WindowManager.LayoutParams(-1, -1)
        val nativeView = this.createFlutterNativeView()
        val flutterLayoutView = FlutterView(this, null, nativeView)
        flutterLayoutView.layoutParams = layoutParams
        flutterLayoutView.setInitialRoute(routeValue)
        this.setContentView(flutterLayoutView)
        return flutterLayoutView
    }

@Zazo032 which plugin stopped working? Can you please include the commit version of the plugin that you're using and your output from flutter doctor? Also, can you describe what's not working? Do you have a stack trace of an error?

@arifcebe you can set the initial route by adjusting my earlier example to look like the following:
class MyApplication : Application() {
    lateinit var flutterEngine : FlutterEngine

    override fun onCreate() {
        super.onCreate()

        // Instantiate a FlutterEngine.
        flutterEngine = FlutterEngine(this)

        // Set an initial route.
        flutterEngine.navigationChannel.initialRoute = "your_route_here";

        // Start executing Dart code to pre-warm the FlutterEngine.
        flutterEngine.dartExecutor.executeDartEntrypoint(
            DartExecutor.DartEntrypoint.createDefault()
        )

        // Cache the FlutterEngine to be used by FlutterActivity.
        FlutterEngineCache
            .getInstance()
            .put("my_engine_id", flutterEngine)
    }
}

@Zazo032 which plugin stopped working? Can you please include the commit version of the plugin that you're using and your output from flutter doctor? Also, can you describe what's not working? Do you have a stack trace of an error?

https://pub.dev/packages/uni_links
I know it's a third party plugin, and I would happily work a PR to fix it, but I'm not really sure on how to do it.
This is the console output:
I/flutter (18156): MissingPluginException(No implementation found for method getInitialLink on channel uni_links/messages)

And as that method doesn't seem to have a valid implementation with v2 embedding, we can't open external links inside our app
flutter doctor
[√] Flutter (Channel master, v1.13.6-pre.16, on Microsoft Windows [VersiÃ³n 10.0.18363.535], locale es-ES)
    • Flutter version 1.13.6-pre.16 at C:\flutter
    • Framework revision fcaf9c4070 (2 days ago), 2019-12-21 14:03:01 -0800
    • Engine revision 33813929e3
    • Dart version 2.8.0 (build 2.8.0-dev.0.0 886615d0f9)

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at C:\Users\crist\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.2
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
    • All Android licenses accepted.

[√] Android Studio (version 3.5)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 42.1.1
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)

that has a simple （but not recommended）way to do this.
startActivity(
                    FlutterActivity
                            .withNewEngine()
                            .initialRoute("/page2")
                            .build(this)
                            .setClass(this,FlutterHostActivity.class)
            );

then override configureFlutterEngine method.

@Zazo032 would you mind filing a new bug for that plugin specifically and the error you're seeing? If you tag me in it then I'll add it to my list and see what I can find out about that particular plugin.

Seems almost fixed with this PR: https://github.com/avioli/uni_links/pull/55
Will wait until it lands, as far as we have tested, the rest of the plugins work properly. Thanks!

I solved this with reference to https://flutter.dev/docs/development/packages-and-plugins/plugin-api-migration.

I registered for V1 in Application class and for V2 in MainActivity and it works for background alarm as I want
public class SupervisorApplication extends FlutterApplication implements PluginRegistry.PluginRegistrantCallback {
    @Override
    public void onCreate() {
        super.onCreate();
        AlarmService.setPluginRegistrant(this);
    }

    @Override
    public void registerWith(PluginRegistry registry) {

        //WakelockPlugin.registerWith(registry.registrarFor("wakelock.wakelock.WakelockPlugin"));

        /// background services registration for android alarmq
        /// here we are registering services that we can use for the callback which runs in background.
        FlutterDownloaderPlugin.registerWith(registry.registrarFor("vn.hunghd.flutterdownloader.FlutterDownloaderPlugin"));
        ///AndroidAlarmManagerPlugin.registerWith(registry.registrarFor("io.flutter.plugins.androidalarmmanager"));
        SharedPreferencesPlugin.registerWith(registry.registrarFor("io.flutter.plugins.sharedpreferences.SharedPreferencesPlugin"));
        JustAudioPlugin.registerWith(registry.registrarFor("com.ryanheise.just_audio.JustAudioPlugin"));
        PathProviderPlugin.registerWith(registry.registrarFor("io.flutter.plugins.pathprovider"));
        FlutterLocalNotificationsPlugin.registerWith(registry.registrarFor("package com.dexterous.flutterlocalnotifications.FlutterLocalNotificationsPlugin"));
        DeviceInfoPlugin.registerWith(registry.registrarFor("io.flutter.plugins.deviceinfo.DeviceInfoPlugin"));
        AndroidAlarmManagerPlugin.registerWith(registry.registrarFor("io.flutter.plugins.androidalarmmanager"));
        SqflitePlugin.registerWith(registry.registrarFor("com.tekartik.sqflite.SqflitePlugin"));
        PermissionHandlerPlugin.registerWith(registry.registrarFor("com.baseflow.permissionhandler"));
        try {
            LocationPlugin.registerWith(registry.registrarFor("com.lyokone.location"));

        }catch (Exception e){
            Log.e("","=============sda=dsa==sed=d=d=ds==d=dsx==dxs=ds=d=xs=dx=xdf==fxd=f===s=fd==f=fd=f==df=d");
        }

    //    GeneratedPluginRegistrant.registerWith(registry.);
    }

}

and Main Activity
public class MainActivity extends FlutterActivity  {

    static String CHANNEL = "superviser.native.actions";

   /* @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        //make transparent status bar
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            getWindow().setStatusBarColor(0x00000000);
        }
        //Remove full screen flag after load
        ViewTreeObserver vto = getWindow().getDecorView().getViewTreeObserver();
        vto.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
            @Override
            public void onGlobalLayout() {
                getWindow().getDecorView().getViewTreeObserver().removeOnGlobalLayoutListener(this);
                getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
            }
        });

    // View decorView = getWindow().getDecorView();
    // decorView.setOnSystemUiVisibilityChangeListener
    // (new View.OnSystemUiVisibilityChangeListener() {
    //     @Override
    //     public void onSystemUiVisibilityChange(int visibility) {
    //         // Note that system bars will only be "visible" if none of the
    //         // LOW_PROFILE, HIDE_NAVIGATION, or FULLSCREEN flags are set.
    //         if ((visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0) {
    //             // TODO: The system bars are visible. Make any desired
    //             // adjustments to your UI, such as showing the action bar or
    //             // other navigational controls.
    //             hideSystemUI();
    //         } else {
    //             // TODO: The system bars are NOT visible. Make any desired
    //             // adjustments to your UI, such as hiding the action bar or
    //             // other navigational controls.

    //         }
    //     }
    // });

        registerPlugins(getFlutterEngine());

       // vto.add
    }*/

    @Override
    public void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) {

        registerPlugins(flutterEngine);

    }

    private void registerPlugins(@NonNull FlutterEngine flutterEngine) {
       /* new MethodChannel(flutterEngine.getDartExecutor().getBinaryMessenger(), CHANNEL).setMethodCallHandler(
                new MethodChannel.MethodCallHandler() {
                    @Override
                    public void onMethodCall(MethodCall call, MethodChannel.Result result) {
                        Log.i("InstllDebug", "before install: ");

                        if (call.method.equals("install")) {
                            Log.i("InstllDebug", "onMethodCall: ");
                            String url = call.argument("url");
                            Log.i("InstllDebug", "url " + url);

                            install(url);
                        }
                        if (call.method.equals("homebutton")) {

                            Intent startMain = new Intent(Intent.ACTION_MAIN);
                            startMain.addCategory(Intent.CATEGORY_HOME);
                            startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                            startActivity(startMain);
                        }

                    }
                });
*/

        ShimPluginRegistry shimPluginRegistry = new ShimPluginRegistry(flutterEngine);
        com.acs.nfc.acs_nfc.AcsNfcPlugin.registerWith(shimPluginRegistry.registrarFor("com.acs.nfc.acs_nfc.AcsNfcPlugin"));
        flutterEngine.getPlugins().add(new io.flutter.plugins.androidalarmmanager.AndroidAlarmManagerPlugin());
        flutterEngine.getPlugins().add(new io.flutter.plugins.battery.BatteryPlugin());
        flutterEngine.getPlugins().add(new io.flutter.plugins.camera.CameraPlugin());
        flutterEngine.getPlugins().add(new io.flutter.plugins.connectivity.ConnectivityPlugin());
        flutterEngine.getPlugins().add(new io.flutter.plugins.deviceinfo.DeviceInfoPlugin());
        flutterEngine.getPlugins().add(new io.flutter.plugins.firebase.crashlytics.firebasecrashlytics.FirebaseCrashlyticsPlugin());
        flutterEngine.getPlugins().add(new io.flutter.plugins.firebaseperformance.FirebasePerformancePlugin());
        flutterEngine.getPlugins().add(new vn.hunghd.flutterdownloader.FlutterDownloaderPlugin());
        org.blankapp.flutterplugins.flutter_flipperkit.FlutterFlipperkitPlugin.registerWith(shimPluginRegistry.registrarFor("org.blankapp.flutterplugins.flutter_flipperkit.FlutterFlipperkitPlugin"));
        flutterEngine.getPlugins().add(new com.dexterous.flutterlocalnotifications.FlutterLocalNotificationsPlugin());
        it.matteocrippa.flutternfcreader.FlutterNfcReaderPlugin.registerWith(shimPluginRegistry.registrarFor("it.matteocrippa.flutternfcreader.FlutterNfcReaderPlugin"));
        io.flutter.plugins.flutter_plugin_android_lifecycle.FlutterAndroidLifecyclePlugin.registerWith(shimPluginRegistry.registrarFor("io.flutter.plugins.flutter_plugin_android_lifecycle.FlutterAndroidLifecyclePlugin"));
        com.fuyumi.flutterstatusbarcolor.flutterstatusbarcolor.FlutterStatusbarcolorPlugin.registerWith(shimPluginRegistry.registrarFor("com.fuyumi.flutterstatusbarcolor.flutterstatusbarcolor.FlutterStatusbarcolorPlugin"));
        com.brianegan.flutterstetho.FlutterStethoPlugin.registerWith(shimPluginRegistry.registrarFor("com.brianegan.flutterstetho.FlutterStethoPlugin"));
        flutterEngine.getPlugins().add(new io.flutter.plugins.googlemaps.GoogleMapsPlugin());
        flutterEngine.getPlugins().add(new io.flutter.plugins.imagepicker.ImagePickerPlugin());
        com.ryanheise.just_audio.JustAudioPlugin.registerWith(shimPluginRegistry.registrarFor("com.ryanheise.just_audio.JustAudioPlugin"));
        flutterEngine.getPlugins().add(new com.lyokone.location.LocationPlugin());
        flutterEngine.getPlugins().add(new io.flutter.plugins.packageinfo.PackageInfoPlugin());
        flutterEngine.getPlugins().add(new io.flutter.plugins.pathprovider.PathProviderPlugin());
        flutterEngine.getPlugins().add(new com.baseflow.permissionhandler.PermissionHandlerPlugin());
        com.example.serialnumber.SerialNumberPlugin.registerWith(shimPluginRegistry.registrarFor("com.example.serialnumber.SerialNumberPlugin"));
        flutterEngine.getPlugins().add(new io.flutter.plugins.sharedpreferences.SharedPreferencesPlugin());
        flutterEngine.getPlugins().add(new com.tekartik.sqflite.SqflitePlugin());
        flutterEngine.getPlugins().add(new io.flutter.plugins.urllauncher.UrlLauncherPlugin());
        flutterEngine.getPlugins().add(new creativecreatorormaybenot.wakelock.WakelockPlugin());

        GeneratedPluginRegistrant.registerWith(flutterEngine);
    }

Hi there!
I also had this same issue. I found the solution on the official docs:
Writing custom platform-specific code
Here is what I did:
MainActivity.kt (Android platform)
package com.daniloapr.example

import androidx.annotation.NonNull;
import com.daniloapr.example.plugins.MyMethodCallHandler
import io.flutter.embedding.android.FlutterActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugin.common.MethodChannel
import io.flutter.plugins.GeneratedPluginRegistrant

class MainActivity: FlutterActivity() {
    override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
        GeneratedPluginRegistrant.registerWith(flutterEngine)

// add the following code:
    private val methodChannelName= "channel_unique_name" //set this string as you want. But keep it the same on the whole project.
    MethodChannel(flutterEngine.dartExecutor.binaryMessenger, methodChannelName)
            .setMethodCallHandler (MyMethodCallHandler(this))
    }
}

MyMethodCallHandler.kt (Android platform)
class MyMethodCallHandler(private val activity: Activity): MethodChannel.MethodCallHandler {

   //whenever the dart side invokes some method on the "channel_unique_name" channel, the onMethodCall is called
    override fun onMethodCall(call: MethodCall, result: MethodChannel.Result) {
        when(call.method) {
            "doSomething" -> {
                val arg1= call.argument<Int>("arg1") ?: 0
                val arg2 = call.argument<Double>("arg2") ?: 0.0
                doSomething(arg1, arg2)
            }
        }
    }

    private fun doSomething(arg1: Int, arg2: Double) {
        //do your stuff
    }
}

my_plugin.dart (Flutter side)
abstract class MyPlugin {

  static const MethodChannel _channel = const MethodChannel('channel_unique_name');

  static void doSomething({int arg1, double arg2}) {
      try {
        _channel.invokeMethod('doSomething', {'arg1': arg1, 'arg2': arg2});
        print("MyPlugin.doSomething(): Success!");
      } catch(error) {
        print("Error: ${error.toString()}");
      }
  }
}

Now, anywhere in your flutter project you can call MyPlugin.doSomething(arg1, arg2);, and it will call the native code on Android. Now, you must implement the MyMethodCallHandler.swift to make it work on iOS as well.


Upgrade Tipue Search to v5.0

New JS and CSS files for Tipue Search v5.0.
LateTask to create "search.html" page to use for search entries

This is a first approach. I'm having some issues that I don't know how to fix them:

I need to include some JS files in "body_end" from the template rendering. To do this, I added a new block in my custom base.tmpl:

[...]
    ${template_hooks['body_end']()}
    <%block name="extra_body_end">
    ### Leave this block alone.
    </%block>

[...]

I'm not being able to render the search.tmpl that inherits from base.tmpl in the same way that it was rendered before. I'm not sure about the context I need to pass to it. I was trying this, but it didn't work:

context = copy(self.site.GLOBAL_CONTEXT)
            context.update({
                'lang': LocaleBorg().current_lang,
                'title': 'Search',
                'permalink': '/search.html',
            })

Doing this in this way, doesn't need nothing from the final user after installing the plugin and also it will look much better than a simple input in the navbar that breaks all the style of the page (even when it shows the results).
Does it make sense for you guys?

How does this break layout? http://ralsina.me/tr/es/weblog/index.html (search for london)

Aore serious bug in the old version is that it only works with one language. In my site there's only data for the english versions of posts.

Last comment  for a while: "didn't work" how?

Regarding the layout: I'm trying to render all the results in the same way that the posts are rendered in the index, for example. I mean, inside the "content" part of the webpage. This way will keep the style of the whole page (navbar on the top, results in the content part, footer after the results). Does it make sense for you?
Regarding the languages: (looking at the code) I think it is handling that case now, isn't?
Regarding the "didn't work" comment: the data is rendered but it seems the context I'm using is not the same as the used for other base.tmpl rendering because many stuff are not included when I render search.tmpl in this way. For example, all the bootstrap magic is not executed for some reason.

@humitos I don't understand what you mean by "bootstrap magic" ... I'll take a look at it  now.

I built the  demo site with this plugin enabled. The search page looks ok, except for  the search form itself that looks bad, but that seems to be because the  markup is wrong?
Also, it doesn't  search?

See attached screnshot showing that boootstrap is loaded...

I have localsearch set up on https://irclogs.getnikola.com/ (src) that works this way and that looks good.  Here’s how I did it:

I used stories/search.html, which is an empty page that is rendered using search.tmpl. You could probably make your task use the generic page renderer, and it does not need to be a LateTask.
I changed the CSS so it looks better with bootstrap.
I include tipuesearch.css everywhere, but I’m pretty sure it’s not necessary because I deleted the input styling. Could go in extra_head in search.tmpl.

PS. extra_js did not exist in the base theme, added in getnikola/nikola@5d22c2b.
conf.py
SEARCH_FORM = """
<form class="navbar-form navbar-left" action="/search/" role="search">

        <input type="text" class="form-control" id="tipue_search_input" name="q" placeholder="Search" autocomplete="off">

    <button type="submit" class="btn btn-default">Submit</button>
</form>
"""

EXTRA_HEAD_DATA = """
<link rel="stylesheet" type="text/css" href="/assets/css/tipuesearch.css">
"""

search.tmpl
## -*- coding: utf-8 -*-
<%inherit file="base.tmpl"/>
<%block name="content">

Search

Search requires JavaScript, sorry for the inconvenience.

Use the search box in the navigation bar to search.

</%block>

<%block name="extra_js">
${parent.extra_js()}

</%block>

css diff
--- /home/kwpolska/git/nikola-plugins/v7/localsearch/localsearch/files/assets/css/tipuesearch.css	2015-01-29 13:45:57.082000000 +0100
+++ plugins/localsearch/localsearch/files/assets/css/tipuesearch.css	2015-07-20 16:45:07.335161074 +0200
@@ -7,6 +7,7 @@
 */

+/* bootstrap has better styles
 #tipue_search_input
 {
      font: 12px/1.7 'open sans', sans-serif;
@@ -24,7 +25,7 @@
 #tipue_search_input:focus
 {
      border: 1px solid #ccc;
-}
+} */
 #tipue_search_button
 {
      width: 70px;
@@ -54,12 +55,12 @@

 #tipue_search_warning_head
 {
-     font: 300 16px/1.6 'open sans', sans-serif;
+     /*font: 300 16px/1.6 'open sans', sans-serif;*/
 	color: #333;
 }
 #tipue_search_warning
 {
-     font: 12px/1.6 'open sans', sans-serif;
+     /*font: 12px/1.6 'open sans', sans-serif;*/
 	color: #333;
 	margin: 7px 0;
 }
@@ -75,12 +76,14 @@
 }
 #tipue_search_results_count
 {
-     font: 13px/1.6 'open sans', sans-serif;
+     /*font: 13px/1.6 'open sans', sans-serif;*/
+    font-size: 13px;
 	color: #333;
 }
 .tipue_search_content_title
 {
-     font: 300 23px/1.6 'open sans', sans-serif;
+     /*font: 300 23px/1.6 'open sans', sans-serif;*/
+    font-size: 23px;
 	margin-top: 31px;
 }
 .tipue_search_content_title a
@@ -95,13 +98,15 @@
 }
 .tipue_search_content_text
 {
-     font: 12px/1.7 'open sans', sans-serif;
+     /*font: 12px/1.7 'open sans', sans-serif;*/
 	color: #333;
 	padding: 13px 0;
 }
 .tipue_search_content_loc
 {
-     font: 300 13px/1.7 'open sans', sans-serif;
+    font-weight: 300;
+    font-size: 13px;
+     /*font: 300 13px/1.7 'open sans', sans-serif;*/
      overflow: auto;
 }
 .tipue_search_content_loc a
@@ -122,7 +127,7 @@
 {
 	padding: 0;
 	margin: 0;
-     font: 12px/1 'open sans', sans-serif;
+     /*font: 12px/1 'open sans', sans-serif;*/
 }
 #tipue_search_foot_boxes li
 {

What’s the status of this?

@humitos do you mind if I steal this one?

El 8 de septiembre de 2015 12:36:13 GMT-04:00, Roberto Alsina<EMAIL_ADDRESS>escribió:

@humitos do you mind if I steal this one?

Reply to this email directly or view it on GitHub:
https://github.com/getnikola/plugins/pull/99#issuecomment-138623987

Not at all. Sorry, Im not having time right now. I will check again un a couple of days to see if its not solved. Thanks
Manuel Kaufmann
http://elblogdehumitos.com.ar/

Superseded by https://github.com/getnikola/plugins/pull/111


Retrieve local full path

Hello,
I'm building an offline mode for my app and I need to store images.
BUT !
I'm working in localStorage and there is a lil quota... I can't add all stringified files into it
SO !
Is it possible to retreive (and store in localStorage) fullpath of the selected file instead of retrieve the file itself ?
When the connection is back, my SYNC function will be able to upload all files with their path, everything will be fine and the localStorage will love me.
Thanks!

You cannot access the selected file programmatically later and the browser does not provide the full path because of the security concerns.

Thanks for your answer, is there a way to store a "shortcut" of the file during offline time and proceed to a real upload when the connection is back ?

You can use html5 FileSystem to store the file locally for browser: http://stackoverflow.com/questions/4940586/can-you-use-html5-local-storage-to-store-a-file-if-not-how
but otherwise you need to store the whole file's content in localStorage.


fix: replace atomic to portable_atomic because atomic is now deprecated

was this ever released to crates.io? the page still shows the old dep: https://crates.io/crates/embedded-tls/versions


Sync eng/common directory with azure-sdk-tools for PR 2348

Sync eng/common directory with azure-sdk-tools for PR https://github.com/Azure/azure-sdk-tools/pull/2348  See eng/common workflow

/check-enforcer override


Update docs for new behavior and configuration settings

Can you add base_url + description to the top section of configuration_options as well. Other then that looks good to merge.

@jpiepkow done


BUG: stats.beta.ppf incorrectly returns NaN for certain arguments on Ubuntu with Scipy 1.14.0

Describe your issue.
stats.beta.ppf incorrectly returns NaN with certain arguments in Scipy 1.14.0 on Ubuntu when installed from the wheel.
The issue appears with multiple versions of Ubuntu (20.04 and 22.04), Numpy (1.24, 1.25, 1.26, 2.0), and Python (3.10, 3.11, 3.12).
The code below demonstrates the issue. This same code does not produce the bug on Mac OS or in earlier versions of Scipy; thus, the issue seems specific to the manylinux wheel for Scipy 1.14.0.
Reproducing Code Example
from scipy import stats

stats.beta(5., 5.).ppf(0.5)

Error message
np.float64(nan)

SciPy/NumPy/Python version and system information
1.14.0 2.0.1 sys.version_info(major=3, minor=12, micro=1, releaselevel='final', serial=0)
Build Dependencies:
  blas:
    detection method: pkgconfig
    found: true
    include directory: /opt/_internal/cpython-3.12.2/lib/python3.12/site-packages/scipy_openblas32/include
    lib directory: /opt/_internal/cpython-3.12.2/lib/python3.12/site-packages/scipy_openblas32/lib
    name: scipy-openblas
    openblas configuration: OpenBLAS 0.3.27.dev DYNAMIC_ARCH NO_AFFINITY Zen MAX_THREADS=64
    pc file directory: /project
    version: 0.3.27.dev
  lapack:
    detection method: pkgconfig
    found: true
    include directory: /opt/_internal/cpython-3.12.2/lib/python3.12/site-packages/scipy_openblas32/include
    lib directory: /opt/_internal/cpython-3.12.2/lib/python3.12/site-packages/scipy_openblas32/lib
    name: scipy-openblas
    openblas configuration: OpenBLAS 0.3.27.dev DYNAMIC_ARCH NO_AFFINITY Zen MAX_THREADS=64
    pc file directory: /project
    version: 0.3.27.dev
  pybind11:
    detection method: config-tool
    include directory: unknown
    name: pybind11
    version: 2.12.0
Compilers:
  c:
    commands: cc
    linker: ld.bfd
    name: gcc
    version: 10.2.1
  c++:
    commands: c++
    linker: ld.bfd
    name: gcc
    version: 10.2.1
  cython:
    commands: cython
    linker: cython
    name: cython
    version: 3.0.10
  fortran:
    commands: gfortran
    linker: ld.bfd
    name: gcc
    version: 10.2.1
  pythran:
    include directory: ../../tmp/pip-build-env-ufvy_lvk/overlay/lib/python3.12/site-packages/pythran
    version: 0.16.1
Machine Information:
  build:
    cpu: x86_64
    endian: little
    family: x86_64
    system: linux
  cross-compiled: false
  host:
    cpu: x86_64
    endian: little
    family: x86_64
    system: linux
Python Information:
  path: /opt/python/cp312-cp312/bin/python
  version: '3.12'

I'm able to reproduce this on Ubuntu 22.04. Bisection suggests the problem may be caused by 5cb9a2c30092d841d9e7d7a505a882d3b19cc53b, or PR #20393.
Full bisection log:

git bisect start
# bad: [87c46641a8b3b5b47b81de44c07b840468f7ebe7] REL: SciPy 1.14.0 rel commit [wheel build]
git bisect bad 87c46641a8b3b5b47b81de44c07b840468f7ebe7
# good: [7dcd8c59933524986923cde8e9126f5fc2e6b30b] REL: 1.13.0 release commit [wheel build]
git bisect good 7dcd8c59933524986923cde8e9126f5fc2e6b30b
# good: [f6a5fff752f252cfdd5b9908e3602e7daaef632b] DOC: prepare 1.13.0 release notes (#19880)
git bisect good f6a5fff752f252cfdd5b9908e3602e7daaef632b
# bad: [7d4600e705f0929a77097d82d0d605aeb9c9bc50] Merge pull request #20541 from mdhaber/xp_skew
git bisect bad 7d4600e705f0929a77097d82d0d605aeb9c9bc50
# good: [5ad315ab1d363eed8bc40882aaaae5d3ecd5f20a] Merge pull request #20427 from mdhaber/make_examples_faster
git bisect good 5ad315ab1d363eed8bc40882aaaae5d3ecd5f20a
# bad: [bb3575679665d9ac6a6b359679b935f8a2eebd15] MAINT: stats.skew: simplify NumPy code
git bisect bad bb3575679665d9ac6a6b359679b935f8a2eebd15
# bad: [c241196b6b67343f90817d1800fab78d5736fb46] Merge pull request #20473 from ev-br/test_falker
git bisect bad c241196b6b67343f90817d1800fab78d5736fb46
# bad: [8960e4a7268524b65914537f32180d0e07c0b6f6] ENH: sparse: special-case DIA * scalar (#20445)
git bisect bad 8960e4a7268524b65914537f32180d0e07c0b6f6
# good: [c7e101f2bf62452e8bab488e84ecce99328e91b5] DOC: stats.power: whitespace for Sphinx
git bisect good c7e101f2bf62452e8bab488e84ecce99328e91b5
# bad: [003026a4fc7df2e43589c41b38b6123dab7ff5f1] ENH: Translate `sph_harm` Cython->C++, add private `_sph_harm_all` gufunc (#20438)
git bisect bad 003026a4fc7df2e43589c41b38b6123dab7ff5f1
# bad: [9a9c713478b396e442b1994264e4cf72c6572e15] MAINT: sparse: Update EfficiencyWarning message to reflect array/matrix (#20443)
git bisect bad 9a9c713478b396e442b1994264e4cf72c6572e15
# bad: [5cb9a2c30092d841d9e7d7a505a882d3b19cc53b] MAINT/BLD: Remove `stats._boost` and add the distribution related functions to ``scipy.special._ufuncs`` (#20393)
git bisect bad 5cb9a2c30092d841d9e7d7a505a882d3b19cc53b
# good: [3591e45598aaf87165243c0ea44aa9cc1c4966fe] BLD: special: Install cython_special.pxd (#20441)
git bisect good 3591e45598aaf87165243c0ea44aa9cc1c4966fe
# first bad commit: [5cb9a2c30092d841d9e7d7a505a882d3b19cc53b] MAINT/BLD: Remove `stats._boost` and add the distribution related functions to ``scipy.special._ufuncs`` (#20393)

cc @czgdp1807

@jzmaddock would you be willing to check whether this is a bug in Boost or just the wrapper? The problem seems to be with the beta distribution PPF at argument 0.5. More specifically, I only see this particular issue when the shape parameters are the same integral value.

Works for me and returns 0.5 as expected.

Thanks. Well, looks like this is in the boost wrapper then:
from scipy.special._ufuncs import _beta_ppf
_beta_ppf(0.5, 5, 5)  # nan

I created a boost/math issue with a reproducer in C++.
In https://github.com/scipy/scipy/pull/20393 (ping @steppi), the line
#define BOOST_MATH_PROMOTE_DOUBLE_POLICY      false

was removed from scipy/special/boost_special_functions.h and replaced by more policy-related typedefs a few lines further down in the file.  If I restore that line before all the includes from boost/math, beta(5.0, 5.0).ppf(0.5) returns 0.5.  So it looks like the newer code ends up not setting the policy as expected.

I suspect the correct fix is to add
boost::math::policies::promote_double<false >,

to BetaPolicyForStats here:
https://github.com/scipy/scipy/blob/a2a287d1f7c81154256ba742b4b8bb108a612166/scipy/special/boost_special_functions.h#L532-L542.

Thanks @WarrenWeckesser, I've confirmed that your suggested fix works for doubles, but have found that the result is still nan when the inputs are floats.
import numpy as np
from scipy.special._ufuncs import _beta_ppf

x, a, b = np.float32(0.5), np.float32(5.), np.float32(5.)
_beta_ppf(x, a, b)
# np.float32(nan)

If I disable double promotion and enable float promotion in BetaPolicyForStats, I don't get the nan with either float or double input.


Add option to change dropdown icon

Is it possible to implement functionality to change dropdown icon to not be always Icons.arrow_drop_down but something custom. So we can also use this icon Icons.expand_more For example something like this ?

The issue with the dropdown icon in country_code_picker_plus: ^0.0.9 has been fixed.

Awesome. Thank you for that.


Full commit message not included in slack web hooks

Hi, would it be possible to have the option to include the full commit message in messages posted to Slack? Right now it doesn't include the full message, just the title of the commit.

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

ID: 7fd5671b-b7b8-9acb-c195-7897fec3538b
Version Independent ID: ff894c1b-f2f7-581d-94b4-dbc77d80ad6d
Content: Create a service hook for Azure DevOps Services and TFS with Slack
Content Source: docs/service-hooks/services/slack.md
Product: devops
GitHub Login: @elbatk
Microsoft Alias: elbatk

@chrisjpatty That's good feedback, thanks for letting us know. I am forwarding this to the product team and closing this issue, since the issues in this repo are for content feedback. Although I am forwarding this to the product team, it will carry more weight if you also file a feature request here:
https://developercommunity.visualstudio.com/spaces/21/index.html
You can also submit product feedback, such as bug reports or feature requests, by choosing Product feedback at the bottom of any article:

Thank you.
PS If I have mischaracterized this issue and it should remain as a doc feedback item, please reactivate the issue and we'll take another look. Thank you for your feedback.


How is it that when I hold down the mouse and drag left it orbit anti-clockwise ? The same for moving mouse up and down, is basic navigation completely broken ?

20 June 2020
How is it that when I hold down the mouse and drag left it orbit anti-clockwise ?
The same for moving mouse up and down, is basic navigation completely broken ?
If you were to go to your main page: https://nunustudio.org/index.html
Click and dragging actually orbit the CORRECT WAY but it is completely reversed inside nunuStudio.

Hello
Please check your settings on the editor to ensure that inverted mouse is not enabled for the editor navigation.
Otherwise this might be some sort of bug and i will need some additional details (browser, type of mouse, etc).

Thanks a lot!

I literally just open the program, did not even go to the preference whatsoever.
Thank you for your quick respond, I currently deleted the program until this basic issue is fix.

Thanks a lot. Since i cannot reproduce this issue i will close it.

I re-install a fresh copy of windows and tried again.
Same issue.

Reinstalling of course will not solve the issue.
Im open to try and solve it but i need some information, since this is not something that im able to reproduce and has never been reported before. Operative system? Version of the application? Any particularity in your mouse input?

I think the viewport is updown inverted ?
I am currently too busy to make a video and talk about it in my channel, I will update you when I get around to it.
THANK YOU anyway, you are really responsive....it gives me confidence about this engine.
Thank you, thank you for being so responsible, your respond alone is worth applauding.

Reinstalling of course will not solve the issue.
Im open to try and solve it but i need some information, since this is not something that im able to reproduce and has never been reported before. Operative system? Version of the application? Any particularity in your mouse input?

I meet the same problem, when using orbit as camera navigation mode, the movement was reversed. Also the invert vertical in the settings doesn't seem to work. In MacOS, chrome 99.0.  (In threejs editor, the orientation is normal.)


Add SQL and PPL features to notebooks

Description
[Describe what this change achieves]
Issues Resolved
[List any issues this PR will resolve]
Check List

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

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

LGTM. Since this is part of RC1, I don't see any reason to wait. Merge whenever you're happy with it.

Agreed with @aetter let's merge this when we are ready.