Sleep API draft

Sleep() API
The proposed API is limited to a single sleep statement before or after a http request or group and is an expansion rather than breaking change of the current HAR specification.
An entry or page object can specify a sleep property. The sleep property accepts either an Int or Array [Int, String PlacementType] where Int = Time in Milliseconds (rendered output is Seconds) and PlacementType = before|after.
If only an Int is specified PlacementType.After is implicitly set.
Example
// SPEC
{
  "log": {
    "pages": [
      {
        "sleep": 500,
        "id": "group_0",
        "title": "Group 0"
      },
      {
        "sleep": [200, "before"],
        "id": "group_1",
        "title": "Group 1"
      }
    ],
    "entries": [
      {
        "sleep": 1200,
        "request": {
          "method": "POST",
          "url": "http://test.loadimpact.com/foobar"
        }
      },
      {
        "pageref": "group_0",
        "sleep": [1800, "before"],
        "request": {
          "method": "POST",
          "url": "http://test.loadimpact.com/login"
        }
      },
      {
        "pageref": "group_1",
        "sleep": [1800],
        "request": {
          "method": "GET",
          "url": "http://test.loadimpact.com/items"
        }
      }
    ]
  }
}

// RENDERED
import { sleep, group } from "k6";
import http from "k6/http";

export const options = {};

export default function main() {
  let response;

  response = http.post("http://test.loadimpact.com/foobar");
  sleep(1.2);

  group("group_0 - Group 0", function() {
    sleep(1.8);
    response = http.post("http://test.loadimpact.com/login");
  });
  sleep(0.5);

  sleep(0.2);
  group("group_1 - Group 1", function() {
    response = http.get("http://test.loadimpact.com/items");
    sleep(1.8);
  });
}

The proposed API does not make it possible to sleep both before and after a request. Not sure what the use-case would be, but we could change the array-tuple to an object instead:
// SPEC
{
  "log": {
    "pages": [
      {
        "sleep": { "before": 1200, "after": 800 },
        "id": "group_0",
        "title": "Group 0"
      }
    ],
    "entries": [
      {
        "pageref": "group_0",
        "sleep": 1800,
        "request": {
          "method": "POST",
          "url": "http://test.loadimpact.com/foobar"
        }
      }
    ]
  }
}

// RENDERED
import { sleep, group } from "k6";
import http from "k6/http";

export const options = {};

export default function main() {
  let response;

  sleep(1.2)

  group("group_0 - Group 0", function() {
    sleep(1.8);
    response = http.post("http://test.loadimpact.com/login");
  });

  sleep(0.5);
}

Numbers can still be used as a short-hand for, e.g. 1234 is the same as writing { "after": 1234 }.

Agree that's better, will make that change 👍


Fancy zone set to wrong area

Microsoft PowerToys version
0.56.2
Running as admin

[X] Yes

Area(s) with issue?
FancyZones
Steps to reproduce

Make custom layout w/ fancy zone

reboot or re-connect to external display
sometimes happen

✔ Expected Behavior
Keep selected custom zone layout
❌ Actual Behavior
inverse zones or select different zone layout. and can't change

Other Software
No response

Hi, thanks for reporting! Could you attach /bugreport?

PowerToysReport_2022-03-18-10-57-06.zip

@gentksb thanks for the report.
Do you connect different monitors? FancyZones saves data for each monitor separately and when you connect the new one, the default layout is applied initially.
/needinfo

@SeraphimaZ Hello,
I connect 2 monitors via USB-C hub. Old UWQHD and new QHD.
This issue is on old one.

Thank you for the clarification. I see, this issue is related to https://github.com/microsoft/PowerToys/issues/16370, https://github.com/microsoft/PowerToys/issues/14261. I'll close this one in favor of tracking the concern over on the referenced thread.


Inference on single video

Hi,
do you have a demo.py/ipynb that I can use to run inference on a single video to see the captions generated? If not, can you describe how I can go about making this setup?
Thanks

Encoder part: use ResNeXt, ECO and Semantic Detection Network to extract features from a video clip.
Decoder part: use those features as inputs to the captioning model.

@WingsBrokenAngel
Can you please provide code/repo links on how to go about feature extraction for encoder part?

@WingsBrokenAngel
Can you please provide code/repo links on how to go about feature extraction for encoder part?

ResNeXt could be found in tensornets and ECO could be found in ECO-efficient-video-understanding.


Sync parquet to other file formats

Issue : https://github.com/apache/incubator-xtable/issues/553
What is the purpose of the pull request
This PR is for changes made to sync parquet to delta ,hudi & Iceberg
Brief change log

Changes to sync from parquet to delta ,hudi & iceberg
Handle incremental sync

Co Authored by :  @sundarshankar89

@sudhar91 this is a great step forward on this feature! My main request is to pull some of these classes that are focused on conversion such as the partition and data file conversion into their own PR with unit tests written. It will be easier and quicker to get those straightforward changes reviewed while the rest of the details are figured out.

@sudhar91 this is a great step forward on this feature! My main request is to pull some of these classes that are focused on conversion such as the partition and data file conversion into their own PR with unit tests written. It will be easier and quicker to get those straightforward changes reviewed while the rest of the details are figured out.

Thanks for taking ur time to review ,    i couldnt push my unit test because i was having a weird jar conflicts on my test will fix them  next week, i raised this PR because wanted to validate whether my approach is right in terms of this feature :)


⚠ AtmoVantage Client Portal has degraded performance

In dc49a17, AtmoVantage Client Portal (https://checkout.atmovantage.com/portal/atmovantage/login) experienced degraded performance:

HTTP code: 200
Response time: 7083 ms

Resolved: AtmoVantage Client Portal performance has improved in 8f97e09 after 27 minutes.


:85:in `require': cannot load such file -- nokogiri

Hello, i'm trying to run your script on windows 10, i have installed ruby with DEVKIT. But it still showing me this error. Can you tell me what to do? And where should i put the ffmpeg and librsvg files? Thank you for help.
<internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in require': cannot load such file -- nokogiri (LoadError)
from internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb:85:in require'         from presentation-render.rb:1:in '`

Hey, this script isn't tested on windows 10 at all, but it looks like nokogiri isn't installed on your system yet.
The script will create the necessary folders that will hold the files for ffmpeg.
Kind regards,
Daniel


🍳 Use MUI Cards for the cart.

@IAmTamal can i have a go at this?

quick question, i tried starting the project locally and i got this, is there something I'm missing?


QnA Maker follow-up prompts do not work in test WebChat CDN bot using the Composer

Describe the bug
I have a bot using the Bot Framework Composer, and we have 800+ FAQs. You can check an example here:
https://partner.microsoft.com/en-us/Search#/?search=action pack
Follow up prompts appear in the Test pane within QnA Maker

However, it doesn't show in the bot:

Version

Browser

[ ] Electron distribution
[x] Chrome
[x] Safari
[x] Firefox
[x] Edge

OS

[x] macOS
[x] Windows
[ ] Ubuntu

To Reproduce
Steps to reproduce the behavior:

Go to https://partner.microsoft.com/en-us/Search#/?search=action pack
Type in the bot "convert trial to paid"
See answer. It doesn't show the follow up prompts

Expected behavior
The expected behavior is to see the follow-up prompts as we see in QnA maker.

@ismendes , did you check the Enable Multi-turn extraction when you extracted the qna pairs in composer?
And what composer version are you using? We had a bug on the multi-turn extraction feature, and it should be fixed in the latest main branch.

Hi,
Yes, we have enabled multiturn extraction in the QNA knowledge base setting. Currently we are using composer version 1.0.2.
Today we updated to latest version 1.2.0. Even after updating the composer to latest version, followon prompt is not getting displayed to QNA answers. We are using QnaMaker generate answer api to fetch qna answers and we are using following settings in the body section of the qna maker api.
{
"question": "QNA question",
"top": 1
}
Is there any modification required so that api response will display followon prompt qna answer?
Thanks,
Madan

@luhan2017, please, check Madan's answer, he's a software engineer from my team. Thanks!

Did you use the QnARecognizer to query qna or a normal qnadialog?
We only support multi-turn for the QnARecognizer, could you share some screenshot on how do you extrac qna pairs in composer, are the multi turn informations extracted successfully? Then I can identify if it is an extraction issue or a runtime issue.

Hi,
We are using neither QnARecognizer nor a normal qnadialog to query qna. We are using "qna maker generate answer API" call for qna questions(to fulfill one of the requirement).
We have created qnamaker knowledgebase separately on qnamaker.ai portal and not using the composer.
Thanks..

@BeheraMadan, can you also please give background of the requirement we had that led us to decide for the route of using the API call feature and not the QnA trigger?

Hi,
we wanted to store telemetry parameters such as user asked questions, question found or not in knowledge base, corresponding matched question in knowledge base, confidence score etc which was not possible with qnamaker dialog because qnamaker trace for qnamaker dialog is not available as shown in below screenshot.  Also these telementry parameters we wanted to store in the qnamaker answer message itself with the help of image url parameters.

So we use api call.

Makes sense. We need to verify if the trace from QnA maker is now available if using the QnA trigger, and refactor if so.

Hi,
The scenario is like below.
When ever there is a qna question asked by the user , we want to store corresponding telemetry data such as QnA_ArticleFound or not in the knowledge base, QnA_UserOriginalQuestion, QnA_MatchedQuestion, QnA_Score, ConversationId etc so that this data can be used by data team for analysis purpose.
If we use qnamaker dialog in composer, there is no qnamaker trace available to capture above mentioned data . Please find below screenshot for reference

Now if we use generate answer api to query qnamaker  we can trace the api response and capture all the data mentioned above. Please find below screenshot for the reference.

this is the reason we decided to use api call so that we can trace qna maker response and capture and store  the above mentioned telemetry data.
But if we use api call, qna answer is not displaying followup prompt which is getting displayed if we use qnamaker dialog.
Based  on this there can be these scenarios as mentioned below.

If qnamaker trace is available it will resolve our problem.
If we use api call how can we modify api call request so that qna answer will display followup prompt as well in the chat window.

Hi,
Please find below some more screenshots for the reference
Below are the screenshots when we use qnamaker dialog

Below are the screenshots when we use api call to query qnamaker.

@BeheraMadan ， if you just want to see the qna trace, you can configure you qna service in the emulator.

Create a new bot configuration, enter the Endpoint Url, and connect to the bot.

Add a QnAMaker service under Services tab

Choose connect to a knowledge base manually and fill in your qna maker configurations

Then you can see the QnAMaker Trace，you can even edit, train and publish it.

If you want to continue to use the API, you should follow this to show the multi-turn prompts:
You should check if you qnaResponse.context.prompts has value, if yes, add it to the response. Please just follow the detailed actions in QnA Intent Recognized trigger. I didn't see that part in your screenshot.

@BeheraMadan did this answer your question? any update on this?

We are using qnamaker dialog action instead of qnamaker api call.

Followup prompt is working  for this qnamaker dialog action.

Close this issue, please let me know if you still need help here. @BeheraMadan


Move to JuliaMath

I suggest moving this package to JuliaMath.

Cc @simonbyrne @tkelman

@jverzani you okay with this? I think I've already invited you to that org.

I'm happy to, if someone can walk me through the steps.
On Thursday, August 25, 2016, Tony Kelman<EMAIL_ADDRESS>wrote:

@jverzani https://github.com/jverzani you okay with this? I think I've
already invited you to that org.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/JuliaLang/Roots.jl/issues/45#issuecomment-242321361,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAZvTORaCWtTtM6pWRFI_bfm7EhqlLsKks5qjVgqgaJpZM4JsxL6
.

--
John Verzani
Chair, Department of Mathematics
College of Staten Island, CUNY
<EMAIL_ADDRESS>

Needs someone with admin access, so I'll just do it now. Eventually we'd need to update the url file in METADATA to point to its new home, but I have an update-redirects.jl script that will do it automatically and there's no rush on that. GitHub will put in place an automatic redirect that does the right thing.

Done.


Clef paths are invalid

Multiple Clef startup paths on Linux have ~ in them. These get fed into Clef as is, not expanded, causing invalid paths:
err="open /home/karalabe/Downloads/~/.ethereum/keystore: no such file or directory"

Thanks for the report, OK I will try to dynamically get the Linux ~ path in the clef plugin code and will report back 👍


stand alone library?

it would be very useful to have the stand-alone library hosted on jsdeliver with the tree-sitter and everything it is very hard to follow the node_modules packaging and the massive tree-sitter.

have the stand-alone library hosted on jsdeliver

I looked at their website and I don't see what I have to do to get them to host it. Don't they just host everything automatically?

IDK it's there and doesn't work gives errors. I am not as good at node and stuff. https://www.jsdelivr.com/package/npm/curlconverter-release

So I tried to do this a few days ago. This was my experience trying to use curlconverter from https://www.jsdelivr.com/package/npm/curlconverter

<script<EMAIL_ADDRESS>
throws
Uncaught SyntaxError: export declarations may only appear at top level of a module

because it is an ESModule

<script type="module"<EMAIL_ADDRESS>
throws
Uncaught TypeError: The specifier “yamljs” was a bare specifier, but was not remapped to anything. Relative module specifiers must start with “./”, “../” or “/”.

So then you have to build an importmap to resolve each dependency from jsDelivr:
<script type="importmap">
  {
    "imports": {
      "yamljs"<EMAIL_ADDRESS>      "tree-sitter"<EMAIL_ADDRESS>      // ..and so on
    }
  }
</script>
<script type="module"<EMAIL_ADDRESS>
at this point I gave up, fired up webpack, and just built my own bundle :D

I think the request here is to publish a built asset as part of the package which has all the dependencies bundled so that it can be pulled in as a single file from jsDelivr that is usable in the browser.

I don't think it's possible to use libraries that use Wasm (which curlconverter does) through jsDelivr

Well maybe just the import map somewhere would be good enough so the user doesn't have to find it all.


Implicit not found when compile files in two packages.

Below is minimal project with sealed trait in one package (file src/main/scala/ru/tinkoff/tcb/model/model.scala) and usage of generic copy method on it in another package (file ./src/main/scala/ru/tinkoff/tcb/adapters/example.scala). sbt compile gives error ("could not find implicit value for parameter update").
I expect this code compile correctly, because:

Same usage of copy near the trait declaration compiles well.
Moreover, exactly this code one can compile in two passes: first, comment definitions of methods in file ./src/main/scala/ru/tinkoff/tcb/adapters/example.scala, run sbt compile, uncomment definitions (reverting changes back) and sbt compile again.

shapeless-implicit-not-found.zip
My scenario is such: I want to refactor some big class with many option fields to a sealed trait with several case classes. I can't put all in one package. Probably, it will help to move model classes to separate subproject (have not tested yet). But maybe there exists simpler way?
copySyntax object is taken from shapeless examples.
I've tried with sbt 0.13.0 on CentOS 6, oracle java 1.8.0_92.
--
Alexey Golovko<EMAIL_ADDRESS>

Probably related to https://github.com/scala/scala/pull/5284
You may try scalaVersion := "2.12.1" or scalaOrganisation := "org.typelevel"

Thank you, have compiled successfully real project with org.typelevel.
Attached example also works with 2.12.1, but too many dependencies aren't built for scala 2.12.

Thanks for the report ... if it's SI-7046 related then the only reliable fix is the compiler fix.


⚠ Bofrost.at has degraded performance

In 9ca5d22, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 1008 ms

Resolved: Bofrost.at performance has improved in 95d8a07.


How can I show different  with the same marked by changing the id of the

I want to change the 3d model using buttons, change the id of the a-entity with JS but nothing happens, thanks.

Hi,
you can do that with Javascript.
Load a script on your HTML.
On that script, you can retrieve your HTML a-entity element. For example:
With an HTML with this parts:
<a-assets>
    <a-asset-item id="id1" src="...">
    <a-asset-item id="id2" src="...">
</a-assets>

(......)

<a-marker...>

</....>

on the script you will have something like:

var element = document.querySelector('#entityID1');
element.setAttribute('gltf', '#2');

this will switch to the second gltf asset, defined in the a-assets.


error in cp of moist air (for liquid content > 0)

Reported by hubertus on 19 Apr 2008 15:31 UTC
Cp for moist air is wrong when there are liquid droplets in the air. The effect can be large due to the high cp of liquid water. Problem is easy to fix.

Migrated-From: https://trac.modelica.org/Modelica/ticket/70

Comment by hubertus on 13 Aug 2009 08:05 UTC
Fixed: Using h_pTX_der, because cp should always be dh/dT @ constant p

Comment by hubertus on 13 Aug 2009 08:06 UTC
Missing rev-info: fixed in 92ae0416725e0f2b57303b894cace73aaa7b42b0

Modified by dietmarw on 13 Aug 2009 08:17 UTC


P5 - Replace levelDB with badgerDB in shed

This PR replaces leveldb with badgerdb.
Refer P5 in #66

This PR should be rebased with master when https://github.com/ethersphere/bee/pull/74 is merged. PR #74 has only one comment that needs to be resolved.

PR https://github.com/ethersphere/bee/pull/74 is merged, please, rebase.

There is also a panic from the badger codebase which is related to Go 1.14 unsafe.Pointer safety rules. This relates to badger 1.6.0 used in this PR. I didi not check if this issue is present in version 2.0.3.
=== RUN   TestNewDB
fatal error: checkptr: unsafe pointer arithmetic

goroutine 16 [running]:
runtime.throw(0xe12690, 0x23)
	/opt/hostedtoolcache/go/1.14.2/x64/src/runtime/panic.go:1116 +0x72 fp=0xc0000893d0 sp=0xc0000893a0 pc=0x446cd2
runtime.checkptrArithmetic(0xc00022a080, 0x0, 0x0, 0x0)
	/opt/hostedtoolcache/go/1.14.2/x64/src/runtime/checkptr.go:43 +0xb5 fp=0xc000089400 sp=0xc0000893d0 pc=0x418115
github.com/AndreasBriese/bbloom.Bloom.JSONMarshal(0x0, 0xe, 0xc00022a080, 0x8, 0x8, 0x9, 0x1ff, 0x7, 0x37, 0x0, ...)
	/home/runner/go/pkg/mod/github.com/!andreas!briese/bbloom@v0.0.0-20190306092124-e2d15f34fcf9/bbloom.go:238 +0xd1 fp=0xc0000894e8 sp=0xc000089400 pc=0xa086d1
github.com/dgraph-io/badger/table.(*Builder).Finish(0xc0002028a0, 0xc0002800cb, 0x14, 0x533322e)
	/home/runner/go/pkg/mod/github.com/dgraph-io/badger@v1.6.0/table/builder.go:229 +0x7c1 fp=0xc000089ac8 sp=0xc0000894e8 pc=0xa0b621
github.com/dgraph-io/badger.writeLevel0Table(0xc0001aa060, 0x2a00000000, 0x39, 0x0, 0x0, 0x0, 0xf096a0, 0xc000206018, 0x0, 0x0)
	/home/runner/go/pkg/mod/github.com/dgraph-io/badger@v1.6.0/db.go:845 +0x618 fp=0xc000089ca0 sp=0xc000089ac8 pc=0xa2a828
github.com/dgraph-io/badger.(*DB).handleFlushTask(0xc0000fd180, 0xc0001aa060, 0x2a00000000, 0x39, 0x0, 0x0, 0x0, 0x0, 0x0)
	/home/runner/go/pkg/mod/github.com/dgraph-io/badger@v1.6.0/db.go:884 +0x5af fp=0xc000089e00 sp=0xc000089ca0 pc=0xa2ae8f
github.com/dgraph-io/badger.(*DB).flushMemtable(0xc0000fd180, 0xc00012a0a0, 0x0, 0x0)
	/home/runner/go/pkg/mod/github.com/dgraph-io/badger@v1.6.0/db.go:918 +0x1cc fp=0xc000089f98 sp=0xc000089e00 pc=0xa2b62c
github.com/dgraph-io/badger.Open.func4(0xc000010318)
	/home/runner/go/pkg/mod/github.com/dgraph-io/badger@v1.6.0/db.go:298 +0x8b fp=0xc000089fd8 sp=0xc000089f98 pc=0xa70e2b
runtime.goexit()
	/opt/hostedtoolcache/go/1.14.2/x64/src/runtime/asm_amd64.s:1373 +0x1 fp=0xc000089fe0 sp=0xc000089fd8 pc=0x47a871
created by github.com/dgraph-io/badger.Open
	/home/runner/go/pkg/mod/github.com/dgraph-io/badger@v1.6.0/db.go:297 +0x2308

https://github.com/ethersphere/bee/pull/75/checks?check_run_id=573849921#step:10:311

@janos fixed most of the comments by you. I am not sure about the dump though. Looks like it happened while opening the DB which i am doing so many times. May be this is related to CI machine... Lets see if it comes up again. I have raised a issue in badger repo also https://github.com/dgraph-io/badger/issues/1294

Thanks for addressing my comments, but now PutInBatch errors need to be handled https://github.com/ethersphere/bee/pull/75/checks?check_run_id=574344361#step:7:8.

@janos fixed the lints.. but the dump seems to be tricky for now. How do you want to proceed?

Thanks @jmozah. I think that we should not have panics related to pointer arithmetics, or actually, any type of panic. Would you mind to check if this problem is not present with badger 2.0.3?

2.0.3 also has the same issue... I dont think this is related to badger.. we are doing something wrong..

ok... looks like it works in 2.0.3...

2.0.3 also has the same issue... I dont think this is related to badger.. we are doing something wrong..

The panic is exactly pointing to badger using bbloom package code that handles pointers. It is clear what is the error.

The panic is exactly pointing to badger using bbloom package code that handles pointers. It is clear what is the error.

They had some issues in the bloom filter i dont remember. @jarifibrahim  is looking in to it.

We fixed something similar in badger v2.0.3. I'll look at v1.6.1 and get back. :+1:

We fixed something similar in badger v2.0.3. I'll look at v1.6.1 and get back. 👍

@jarifibrahim  i took this as anopportunityy and moved to 2.0.3 :-)

@janos fixed all the comments. The build fails and it is not related to my changes.

@jmozah I ma sorry for no being clear enough. I think that no logging should be done related to errors if the error is returned. Could you please remove Errorf calls whenever you removed Debugf calls in the previous commit? They are not needed.

@janos coding guidelines says "This means that the same problematic event may have two log lines but with different severities" thats why i had Errorf and Debugf messages. This is still not clear for me where to put Error and where to put debug and where to put both.

@jmozah It also states in https://github.com/ethersphere/bee/blob/master/CODING.md#error-propagation-annotation-and-handling section that errors should not be logged if they are returned. Error should not be logged and passed at the same time. That is the point of my comments. Sorry if that was not clear.

@janos no issues. it is clear now for me. I made the changes.

@janos no issues. it is clear now for me. I made the changes.

Thanks @jmozah

Bee is still dependent on Swarm and Ethereum as the example_store_test.go in shed uses it.
Once we move chun related stuff inside bee.. we will get rid of Swarm and ethereum.


Get all markers present in a cluster.

When didTap cluster function is called, it zooms the camera to one of the markers present inside the cluster but I want to show all the markers that were in that cluster and focus the camera on those markers.
I was able to achieve this in android. However in iOS the google utils sdk doesn't provide a way to get all the items present in a cluster object.
Here's the android code
mClusterManager
            .setOnClusterClickListener(new
ClusterManager.OnClusterClickListener<Service_Provider>() {
                @Override
                public boolean onClusterClick(final Cluster<Service_Provider> cluster) {
        LatLngBounds.Builder builder = LatLngBounds.builder();
        for (ClusterItem item : cluster.getItems()) {
           builder.include(item.getPosition());
          Log.w(TAG, "Clicked Cluster Item name: " + item.getTitle());
         }
        final LatLngBounds bounds = builder.build();

        map.animateCamera(CameraUpdateFactory.newLatLngBounds(bounds, 100));
                    return true;
                }
            });

What I have tried in iOS so far
func clusterManager(_ clusterManager: GMUClusterManager, didTap cluster:
GMUCluster) -> Bool {
    print("Did tap cluster")
    let newCamera = GMSCameraPosition.camera(withTarget: cluster.position,
                                             zoom: mapView.camera.zoom +1)
    let update = GMSCameraUpdate.setCamera(newCamera)
    mapView.moveCamera(update)
}

Can someone help me achieve the same thing in ios?

@broady @domesticmouse @jum @markmcd Can you please help me with this?

Hi @hamzabinamin, You should be able to iterate theough the cluster.items to compute the bounds and then use GMSCameraUpdate.fitBounds.
It makes sense to have a bounds property on the cluster to make this easier.

@hamzabinamin here's how it would look like in Obj-C:
GMSCoordinateBounds *bounds = [[GMSCoordinateBounds alloc] init];
for (id<GMUClusterItem> item in cluster.items) {
  bounds = [bounds includingCoordinate:item.position];
}
GMSCameraUpdate *update = [GMSCameraUpdate fitBounds:bounds];
[mapView moveCamera:update];


pypi sdist is missing tests

Hi! I'm packaging pytest-services for Arch Linux.
We usually use pypi for tracking python libraries and their sources. During building and testing of 2.0.1 I realized, that the tests are missing from the sdist on pypi.
It would be great if they could be added. Thank you!

please make a PR to include them


DESIGN: Create a design for Ordelie New Class screen

This screen should be a desktop version

I want to work on this

@Techchic-30 you can work on this.

solved #31


NCIM Term for cell line "NCI-H929" for IHECRE00004639

ATCC has Plasmacytoma C0032131 as disease
IgA, kappa myeloma not in NCIM

there is also IgA myeloma C0563305

related:
MM.1S (IHECRE00003705) has "Immunoglobulin A Lambda Myeloma" in ATCC

The disease for NCI-H929n cell line is Plasmacytoma.
The NCIM term for Plasmacytoma is CUI C0032131.


Object contextual type has no effect in nested object assignment in JS

TypeScript Version:  4.2.0-dev.20201119

Search Terms:
javascript cast narrow array tuple
Sorry but didn't find any duplicates within a reasonable amount of time. Didn't check every issue on every page though.
Code
/**
 * @type {import('eslint').Linter.Config<import('eslint/rules').ESLintRules>}
 */
const config = {
  rules: {
    'strict': 2,
  },
};
// ...
config.rules.strict = [2, 'global'];

Code is JavaScript. Using @types/eslint 7.2.5.
Expected behavior:
No error.
Actual behavior:
Type '(string | number)[]' is not assignable to type 'RuleEntry<["function" | "safe" | "global" | "never"]>'.
  Type '(string | number)[]' is not assignable to type '[RuleLevel, ("function" | "safe" | "global" | "never")?]'.
    Target requires 1 element(s) but source may have fewer.ts(2322)

on the config.rules.strict line.
Workaround is to do:
config.rules.strict = /** @type {typeof config.rules.strict} */ ([2, 'global']);

or the less cumbersome but apparently undocumented:
/** @type {typeof config.rules.strict} */
config.rules.strict = [2, 'global'];

I confirm that the type checking does work with either of the annotations (e.g. replacing 'global' with 'globa' will elicit a complaint from the type checker). In either case though, imho better not to have the annotation at all since it interrupts code reading flow.
Playground Link:
Emm couldn't get the import('eslint') to work in the Playground.
Related Issues:
Unfortunately no. If I find any, I'll add them to this list.

Self-contained example:
/**
 * @typedef {["one", "two"]} Num
 */

 /** @type {{ prop: { blah: Num } }} */
 const obj = {
   prop: {
     blah: ["one", "two"]
   }
 };

obj.prop.blah = ["one", "two"];

Interestingly, the error goes away if

you remove the prop object, so it’s just an assignment to obj.blah, or
the Num type is not objecty

The binder can't tell that obj.prop.blah = ['one', 'two'] isn't an expando declaration, so it speculatively creates a symbol on blah. This is incorrect in this case, since there's already a declaration of obj around. It also wouldn't make sense in a module, because the speculative symbol just exists to allow global merges.
(It's also possible that the symbol is completely incorrect.)
The presence of the symbol means that the checker also thinks that the assignment is a declaration, and declarations don't get contextual types from their left side.
The singly-nested case (obj.blah) has the same incorrect binding, but there's a bizarre fallback that redoes a lot of the work that getTypeOfExpression would do on a single identifier, but only if the declaration has an explicit type annotation.
I'm going to try making the binder stricter and see whether I can get rid of some of this special-case code. I'll leave this in 4.2 for now in case it turns out to be a simple bug, but if I have to improve the binder significantly I'll move it to 4.3.

binder: nope.The binder only inspects declarations, not initialisers, so it can't know that blah is already bound.
checker: nope. Replacing the bizarre fallback with getTypeOfExpression causes lots of stack overflows and circular anys.

There might be a cleverer bizarre fallback I haven't thought of, and of course it's possible to expand the current bizarre fallback to two levels instead of just one.
At this point I'm not sure there's a good fix for this bug.

I've turned the associated .eslintrc.js configuration file into a .eslintrc.cts file (TypeScript 4.6.3) and all seems to work well so I'm closing this issue.


Broken on/off state recognition for NU8042

Describe the bug
v0.3.6 breaks state recognition for my NU8042. I'm not using Smart Things. I can control TV via integration but it does not detect on/off state changes. TV state is always off.
Expected behavior
Behavior from v0.3.5, I've already downgraded to that and it works well.
Environment details:

Environment: HassOS
Home Assistant version installed: 0.112.3
Component version installed: v0.3.6
Last know working version: v0.3.5
TV model: Samsung NU8000 / NU8042 / NU8072

Output of HA logs
No errors were seen in HA logs.

Can verify, this is also happening for me on a Q9F . I’m using the SmartThings part of the integration for status report.

Also happening with my UE43MU6100 (fw 1280). When I click on a switch button it shows tv in on state and what it does, but reverts to off state in about 5 seconds.

Reading the first post seems not related to SmartThings, that is the only think that I changed in last release, but may be there is a dependencies problem with a library that I changed in the manifest.
Could someone enable debug and attach here log file so that I can check better what is happening? You should add the following lines in configuration.yaml:
logger:
  default: info
  logs:
    custom_components.samsungtv_smart: debug

Then reboot HA, use TV for a while and then attach here the log file.
Thx

It looks like it just needed to generate a new token (connection pairing with TV)... I don't know why it did not invoke that pop-up on my TV before. I was running 0.3.6 for more than 24h and launching TV a few times in the meantime.
I will use an opportunity, to mention the that I've found on both v0.3.5 and v0.3.6. (However, I don't need it to be fixed as I workaround it easily.)
There are two logs:

From v0.3.5: home-assistant_v0.3.5.log
I've launched TV at 18.43 (6.43 PM) and let it run till 18.57.
You can also notice that it turned back 'on' at 18.58, less then a minute after I turned it off (via remote). That's a fake state change as TV remained turned off for that time. This fake state lasts around a minute.
From v0.3.6: home-assistant_v0.3.6.log

Same thing here. I've launched TV at 19.10 and let it run till 19.20. Fake state can be seen at 19.31 and it has lasted a little bit longer.
I'm not sure if I sure create separate issue for that. Right now I did a workaround in my automations to ignore this fake state. I'm just checking if TV is unmuted (it is muted while it reports this fake 'on' state) or by comparing last_changed timestamp.

Ok, I will check your log.
It is also interestisting your "check mute state" work-around, I can try to implement it in the component itself. False positive is because in some case TV connect to the network, probably to check for update, while is turned off. But an additional check can solve this issue.
I do not understand how you discovery that new token was required. The popup appear on TV screen or not?

False positive is because in some case TV connect to the network, probably to check for update, while is turned off. But an additional check can solve this issue.
I know that it was an issue before. At that time I was checking the source because during the false 'on' state it was reporting "TV/HDMI" – which I don't use ;)  But it was fixed it one of latest releases.
This one, however, appears only after I turn off my TV. It triggers only once for about a minute. Then there are no false-posivites for even 24h. So I assume this one is something different.
Anyways, it for sure reports simultaneously "TV/HDMI" source and is_volume_muted: as true in false-positive state.

I do not understand how you discovery that new token was required. The popup appear on TV screen or not?
Yup. It appeared on TV. Not sure why it worked this time.

I put some additional check and timeout, for this reason false positive are very limited now. There is also an option to change default time-out because different model have different behavior. But is interesting your check, make sense because when TV change from off to on is never muted, also if was muted when turned off (can you confirm that for you is the same?)
I think I should also add a persistent notification in HA when a new token is requested, because without this can be not clear what is happening (as happen for this issue).
Thx for you contribute.
Please can everybody in this thread confirm that renewing token solve the issue?

But is interesting your check, make sense because when TV change from off to on is never muted, also if was muted when turned off (can you confirm that for you is the same?)

Good point. Yup, I've just checked on mine and after being turned on it "unmutes" itself if it was muted before turning off.

I think I should also add a persistent notification in HA when a new token is requested, because without this can be not clear what is happening (as happen for this issue).

Good idea. That would definitely improve UX, especially for new users.

The same behavior with my UE65MU7003. The integration cannot detect on/off state changes. TV state is always off, from the last update.

If possible enable debug log as explained before a post here your log, so that I can check the occuring issue.
As alternative simply try removing authorization for Home-Assistant on your TV, turn it off for a while on turn on again. You should see a popup on the TV requesting for authorization, confirm a check if now it work.

Logfile attached:
log.txt

But in all the time frame covered by attached log the TV state was off?

Hi!
The TV itself was running.
After restart HA the TV state was OFF and after some trying it turned to
ON, but all my attempts to change volume up or down or mute or the input
source were negative!
Of course, TV has got permission for my HA.
Currently, I running on the previous version of integration and don't have
the problem.
Best Regards,
Vadim
вс, 12 июл. 2020 г. в 01:02, ollo69<EMAIL_ADDRESS>
But in all the time frame covered by attached log the TV state was off?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/ollo69/ha-samsungtv-smart/issues/28#issuecomment-657136783,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOSYMEBECQP3QUF2LOW4KCDR3DON3ANCNFSM4OVKCCEA
.

Can you please try if last release fix the issue and give me your feed-back

Thank you, last update has fixed the issue. All works well.
From: ollo69<EMAIL_ADDRESS>Sent: Sunday, July 12, 2020 3:21 PM
To: ollo69/ha-samsungtv-smart
Cc: svadel; Comment
Subject: Re: [ollo69/ha-samsungtv-smart] Broken on/off state recognition for NU8042 (#28)
Can you please try if last release fix the issue and give me your feed-back
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/ollo69/ha-samsungtv-smart/issues/28#issuecomment-657214654 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AOSYMEBKRBWFF2GRJZIGUILR3GTD7ANCNFSM4OVKCCEA .Image removed by sender.
--
Это сообщение проверено на вирусы антивирусом Avast.
https://www.avast.com/antivirus

I will also update that for me all still works good. Except this fake state that occurs only once, around a minute after TV was turned off. – However this was discussed above and it is not the topic of this issue.
Thanks! I'm closing the issue as it looks like it's resolved.


Use Erlang Solutions (esl) repo to provide Erlang on all platforms

Description
Historically this cookbook used the Erlang Solutions repository when installing on Ubuntu <= 12.04 as a workaround for known SSL issues. This change removes that conditional, making the Erlang Solutions repository the default method of installing Erlang using the sensu::rabbitmq recipe.
Marked as WIP while I run test-kitchen locally
Motivation and Context
Closes #411
Paid support are available for Sensu Enterprise and Sensu Core, but both offerings require use of the Erlang Solutions runtime distribution.
How Has This Been Tested?
Local test-kitchen tests are good 👍
Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[x] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

[x] My change requires a change to the documentation.
[x] I have updated the documentation accordingly.
[x] I have read the CONTRIBUTING document.

Known Caveats
This change may cause the Erlang Solutions distribution of the erlang runtime to be installed on systems which have previously installed erlang from distribution packages.

Looks like a simple change and it puts the cookbook in-line with supported deployments :+1: Will merge once travis tests pass.


.dockerignore is incorrectly parsed

Given a .dockerignore file:
# Ignore everything
*

# But what docker actually needs
!.cache
!ci
!package.json
!requirements
!src
!typings
!yarn.lock

and a batect config:
...
    build_directory: .
    dockerfile: ci/server.dev.Dockerfile
    run_as_current_user:
        enabled: true
        home_directory: /home/code
    volumes:
        - container: /code/src
          local: src
          options: cached
    working_directory: /code

The error message:
Error: Could not build image from directory '...'.
Building image failed: Cannot locate specified Dockerfile: ci/server.dev.Dockerfile

Removing the .dockerignore file makes everything work.
I would try to debug the cause and make a PR but don't speak kotlin yet :(

Hi @cazgp, thanks for taking the time to submit such a detailed bug report. I'll take a look at this in the next few days.

I've just pushed a fix for this and I'll release an updated version shortly.
In the meantime, you can grab the latest version from the files section of https://bintray.com/charleskorn/batect/batect/0.34.0-dev.0.31%2Bcd7886b if you want to try out the fix before I publish the release. (It might take ~20 minutes for the build and publish to finish.)


Fix explicit interface example

Fixes #1087.

I think the test failure is unrelated to this change. @BillWagner are you happy to address that? Let me know if you'd like me to do so.

I think the test failure is unrelated to this change. @BillWagner are you happy to address that? Let me know if you'd like me to do so.

That's already addressed in #1108
We should be good once we get the remaining question there resolved.


Add citations

This gets "Cite this repository" added to the home page.  That is really intended to provide a single citation, so the references were used for the list.

It can be tested at https://github.com/clulab/processors/tree/kwalcock/citation.


supports @material-ui 4.0.0

@material-ui version 4 is released. Could you please make an update?
Thank you.

It should work. I'll publish a new release with the updated peer dependency shortly.

thank you very much

Would you also use React.forwardRef to create the icon components? Because this is required in some components in material-ui (V4). Described here: https://material-ui.com/guides/composition/#caveat-with-refs

@minhna Just released v6.0.0 for Material-UI v1, v3 and v4. It requires React 16.8 or later (hence the major bump). Here's a compatibility table. I'll update all three major versions for the foreseeable future.

Material-UI
React
mdi-material-ui

0.x
any
^4.0.0

^1.0.0
any
^5.0.0

^3.0.0
any
^5.0.0

^4.0.0
^16.8.0
^6.0.0

@marcberchtold Great idea! :+1: I updated the component to behave like Material UI's icons, it now uses React.memo and React.forwardRef.


Can't find modules of .ts extension

I have a project with some .ts files.
Given:
src/store.ts
src/hello.vue
src/component.vue

And the file hello.vue:
import component from '@/component';
import store from '@/store';

I get the in-line error (red underline and tooltip)  Cannot find module '@/store'.
This error only occurs for .ts files, not .vue or .js.
How can I have eslint recognize these imports are working? (The imports work, as confirmed by vue-cli serving them properly, build working etc.

@komali2 does this work for you when using eslint from the command line. If not, then this is a general ESLint problem. If it does work from the command line, can you please create a GitHub repository that helps me reproduce what you are seeing.


Getting error on CS2 docker image

What should I do?
It somehow now don't want to start. I have tried 7.11 and 7.10.

Hope someone know how to fix

Update CSSharp: https://github.com/roflmuffin/CounterStrikeSharp/releases/latest

Hey!
As crash had mentioned, update CSSharp or use MatchZy with CSSharp release.
Thanks!


Support multiple SpatialData objects

This PR allows for viewing multiple SpatialData objects with napari-spatialdata. This, by passing a list of SpatialData objects to Interactive. This list is converted to an EventedList. In order to properly support viewing elements even when SpatialElement names are shared between SpatialData objects a few changes have been made.

The' ElementWidget' checks whether there are duplicate elements which are stored in the list element_names, If element_name is in this list then a suffix _{index} is added to element_name. The entry of element_name in _elements is changed from a str corresponding to the element type, to a dictionary with key-values
-  element_type corresponding to the original value of _elements,
- sdata_index corresponding to the index of the SpatialData object in the EventedList
- original_name corresponding to the original name.
This behavior also ensures that instead of napari creating an index for the copy which is not informative, a suffix will be pointing to the SpatialData object. This also means in case of more than 1 duplicate SpatialElement name, both layers belonging to the same SpatialData will have the same suffix. The way it is implemented can also handle duplicate element_name with different associated coordinate systems.
A new _get_sdata function is used to obtain the SpatialData object from the EventedList and to indicate whether multiple SpatialElements with the same name exist.
SdataWidget and SpatialDataViewer make use of the function at 2 to create the layers appropriately. In the viewer, the name argument now corresponds to the name with a potential suffix, and name in metadata is the name in the SpatialData object.

Codecov Report
Patch coverage: 73.91% and project coverage change: -0.15 :warning:

Comparison is base (086040f) 74.75% compared to head (407a38d) 74.60%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #136      +/-   ##
==========================================
- Coverage   74.75%   74.60%   -0.15%
==========================================
  Files          16       16
  Lines        1604     1650      +46
==========================================
+ Hits         1199     1231      +32
- Misses        405      419      +14

Impacted Files
Coverage Δ

src/napari_spatialdata/_viewer.py
60.63% <65.62%> (-1.70%)
:arrow_down:

src/napari_spatialdata/_sdata_widgets.py
85.21% <76.08%> (-1.39%)
:arrow_down:

src/napari_spatialdata/_interactive.py
80.95% <80.00%> (-2.39%)
:arrow_down:

src/napari_spatialdata/utils/_utils.py
74.85% <87.50%> (+0.63%)
:arrow_up:

src/napari_spatialdata/__main__.py
81.81% <100.00%> (ø)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

I have added additional behaviour in order to validate layer.name upon a layer.name change. The following has changed:

Add callbacks for when layers are added / removed. Inserted layers have a callback being connected for when their name is changed.

Add self.layer_names which is updated when layers are inserted / removed and when a layer.name is changed. This is added to be able to determine what the layer name was before a change.

A name validation callback:

if sdata is in the metadata and the name is already in sdata then the name change is reverted.
if sdata is in metadata and layer.name is changed to a name of an already open layer then the name change is reverted.
if sdata and the new layer.name is in any of the SpatialData objects, name is changed to layer.name + _sdata.index
If no sdata in metadata, but a layer with same name already exists or the name is found in any of the SpatialData objects, the name is reverted in order to prevent potential naming conflicts. This should prevent issues when linking layers to a Spatialdata object.

Currently, these behaviours have been tested manually. I am looking to add tests, but currently the event blocker being used does not seem to work in the tests so I am trying to figure that out. However, the code can already be reviewed.

Thanks for the additional validations @melonora, I will review the changes and add comments in the next days (but in case anyone reviews before me and approves, please proceed with merging).

Fixed the docstring and the CLI bug, they were indeed tiny. Unfortunately there is a more serious problem related to the addition of the suffixes _0, _1, arising when adding a shapes element:

Added the fixes, and thanks for yours on the table. There were also some bugs (older, not related to this PR) on the display of points and circles. I fixed them.
I could test it and it works great.

[ ] There is only one bug that I found that is still open (checkbox to keep track things to do in this PR), here is how to reproduce it:

open transcripts_1
opentranscripts_2
plot qv on top of trancript_2
click on trancript_1
try to plot qv also here

Then I get the following error:

Same things for shapes, so any small test dataset with a duplicate element that has annotations either in a table either in a column of the Dask DataFrame / GeoDataFrame should be able to reproduce the bug. Could you please have a look?

Works great! Thanks for the fix. Good to merge now.
A minor things, I get this warning when I add or select elements),do you also get it?

Do you have any quick fix? If so it would be great if it could be quickly implemented, otherwise it can also be tracked for a follow up PR.

Works great! Thanks for the fix. Good to merge now.
A minor things, I get this warning when I add or select elements),do you also get it?  Do you have any quick fix? If so it would be great if it could be quickly implemented, otherwise it can also be tracked for a follow up PR.

Yes, there is one thing I am testing is whether we can switch to using active instead of _current. It will become deprecated, see #137. The main thing is that when having multiple selected items, you can still have a _current item, but not active. The active item is always _current though.

it looks great @melonora ! LGTM!


fix: Menu glitch fix, testing with superset-ui/core v0.17.39

SUMMARY

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

https://github.com/apache/superset/pull/14388 uses 0.17.40. This is a sanity check using the prior patch version. Will fill in more details here if things work.
TEST PLAN

ADDITIONAL INFORMATION

[ ] Has associated issue:
[ ] Changes UI
[ ] Includes DB Migration (follow approval process in SIP-59)

[ ] Migration is atomic, supports rollback & is backwards-compatible
[ ] Confirm DB migration upgrade and downgrade tested
[ ] Runtime estimates and downtime expectations provided

[ ] Introduces new feature or API
[ ] Removes existing feature or API

/testenv up

/testenv up

No different from the v0.17.40 PR. Closing this one.


Does it work with typescript module libs like vuex-class-modules?

the modules are dynamically loaded, nothing is being saved.
import { VuexModule, Module, Mutation, Action } from 'vuex-class-modules';
import store from '@/store';
@Module
export default class QuoteModule extends VuexModule {
}
export const quoteModule = new QuoteModule({ store, name: 'quote' });

const vuexLocal = new VuexPersistence({
  storage: window.localStorage,
  modules: ['quote'],
});

export default new Vuex.Store({
  strict: true,
  /*
  Ideally if all your modules are dynamic
  then your store is registered initially
  as a completely empty object
  */
  plugins: [vuexLocal.plugin],
});

Not sure what you are asking @pancake-boy. Could you please elaborate?
Your code seems weird. You are importing a store from @/store, but then creating a new independent store and exporting that.

thats to create an instance and register it into the store

i'm gonna try switching to vuex-module-decorators and see how that goes

Feel free to reopen when you want to go into more detail.

@pancake-boy @bodograumann  hello, tell me pelase have you figured out how to persist state for this package with dynamic modules? Thanks.


add last update to list

when adding new items to shopping list, make something visible to know at homepage. to not be misunderstand from last one.

done


Error while creating wiki: TF401019: The Git repository with name or identifier 8638BA9F-0383-4616-A1BC-B84051FEFF8C does not exist or you do not have permissions for the operation you are attempting.

Error while creating wiki: TF401019: The Git repository with name or identifier 8638BA9F-0383-4616-A1BC-B84051FEFF8C does not exist or you do not have permissions for the operation you are attempting.
AB#3566

Same here ... tried several times with and without creating Fork.

As usual ... the issue is solved by removing the space from the project name.
I was generating the project named "Tailwind Traders" as instructed resulting in the error above.
Creating the same thing after cleaning up and naming the project TailwindTraders it properly finished generating all items.

As usual ... the issue is solved by removing the space from the project name.
I was generating the project named "Tailwind Traders" as instructed resulting in the error above.
Creating the same thing after cleaning up and naming the project TailwindTraders it properly finished generating all items.

It works! Thank u

Thank you posting your comment with resolution.


[WIP] Role Definition Check for MIWI

Which issue this PR addresses:

Fixes
What this PR does / why we need it:

Test plan for issue:

Is there any documentation that needs to be updated for this PR?


Is possible to navigate through folders?

I'm not sure if your library allow to do this, if not, could you support it?

No it is not supported, and I'm not currently working on it, but I would like to implement it in future.
Any pull request are welcome.


Release 3.2.1

Summary

https://github.com/mattermost/mattermost-plugin-jira/pull/868

Ticket Link
https://github.com/mattermost/mattermost-plugin-jira/issues/876

Codecov Report
Base: 31.46% // Head: 31.42% // Decreases project coverage by -0.03% :warning:

Coverage data is based on head (0920a3b) compared to base (f986c15).
Patch has no changes to coverable lines.

Additional details and impacted files
@@                Coverage Diff                @@
##           release-3.2.1     #877      +/-   ##
=================================================
- Coverage          31.46%   31.42%   -0.04%
=================================================
  Files                 49       49
  Lines               5982     5982
=================================================
- Hits                1882     1880       -2
- Misses              3911     3913       +2
  Partials             189      189

Impacted Files
Coverage Δ

server/subscribe.go
67.61% <0.00%> (-0.38%)
:arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

Superseded by https://github.com/mattermost/mattermost-plugin-jira/pull/884


Game as a Component

Description

Turns Game into a Component
Turns ComponentEffects into Components
Adds Component.changeParent
Removes onMount and replaces it with onParentChange
onLoad now only runs once for each component, so that you can initialize late variables in there

Things that this will make simpler:

No code duplication between BaseComponent and BaseGame
Multi-stage games
TransformEffect that @st-pasha suggested
Changing the parent of a component
...

In this example a square is move from one parent game to another and back again every 5 seconds:
https://user-images.githubusercontent.com/744771/132994425-ddeff3fd-9ff8-4093-be80-b1dcdc61b688.mp4
Component (and Game) Lifecycle:

Component inheritance tree:

Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] My PR includes unit or integration tests for all changed/updated/fixed behaviors and are passing (See Contributor Guide).
[x] My PR does not decrease the code coverage, or I have a very special case and explained on the PR description why this PR decreases the coverage.
[x] I updated/added relevant documentation (doc comments with ///) and updated/added examples in doc/examples.
[x] I have formatted my code with ./scripts/format.sh and the Flame analyzer (./scripts/analyze.sh) does not report any problems.
[x] I read and followed the Flame Style Guide.
[x] I have added a description of the change under [next] in CHANGELOG.md.
[ ] I removed the Draft status, by clicking on the Ready for review button in this PR.
[x] I am willing to follow-up on review comments in a timely manner.

Breaking Change
Does your PR require Flame users to manually update their apps to accommodate your change?

[x] Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md).
[ ] No, this is not a breaking change.

Related Issues
#900

In #899 I was envisioning that BaseGame would have member _root of type BaseComponent. One of the benefits was the ability to quickly swap out the root for another component. Would this still be possible with this approach?

In #899 I was envisioning that BaseGame would have member _root of type BaseComponent. One of the benefits was the ability to quickly swap out the root for another component. Would this still be possible with this approach?

Yes, it will. I'm going to add a method that is named changeParent(Component c) or something like that on Component which will remove the component from its current parent and then set the new parent and re-initialize the tree under the new parent..

This is great work, @spydon -- can't wait to see it merged!

Yeah, protected is truly missed. Can't think of anything right now, but
maybe if we just rename this, the confusion would be avoided? What if we
call this loadedCache or something? I believe that the on prefix is
what will cause the confusion.
Em seg., 13 de set. de 2021 às 08:33, Lukas Klingsbo <
@.***> escreveu:

@.**** commented on this pull request.
In packages/flame/lib/src/components/component.dart
https://github.com/flame-engine/flame/pull/906#discussion_r707248108:

@@ -95,8 +291,67 @@ abstract class Component {
/// ```
Future? onLoad() => null;

Future? _onLoadCache;

/// Since [onLoad] only should run once throughout a components lifetime it is
/// cached so that it can be reused when the parent component/game/widget
/// changes.
Future? get onLoadCache => _onLoadCache ?? (_onLoadCache = onLoad());

If only dart had protected... Any ideas for how to make it internal?
Since it needs to be reached by the GameWidget and from ComponentSet.
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
https://github.com/flame-engine/flame/pull/906#discussion_r707248108,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAGMAOJENP732WJDCJOAYB3UBXOPRANCNFSM5BWZD2AA
.


test(perf)(refactor): refactored test cases to improve performance an…

…d decrease interdependencies. Removed legacy test cases to be replaced with one simple one. Added warnings for legacy nomenclature to indicate that it is no longer supported and encourage users to switch to using our current standard naming convention, despite the legacy naming convention still working (for now).

don't we also need to delete the jupyter notebooks?

The legacy notebooks were removed in a past pull request. If you check the main branch, they are no longer there.

Force error here.

Ready to go.


How was the T set in the default setting?

In Section 4.2 Analysis of Sparse Sampling, it is read If not otherwise stated, we randomly sample a single frame (Ntrain=1 and T=1) from full-length videos for training, and use the middle frame (Ntest=1) for inference, with input image size L=448.
I am confused, if not otherwise stated in the following analysis, is T of training equals to T of test ? or T of test always equals to 1? Since i have noticed that there is no T_train or T_test.

Thank you!
What parameter in config file is T? @JianJuly


Invalid type parameter in getReducedType()

Consider the following patch that switches off derivative function type cache:
diff --git a/lib/SIL/IR/SILFunctionType.cpp b/lib/SIL/IR/SILFunctionType.cpp
index d361a27f7d9..2b0b5a3aff7 100644
--- a/lib/SIL/IR/SILFunctionType.cpp
+++ b/lib/SIL/IR/SILFunctionType.cpp
@@ -883,7 +883,7 @@ CanSILFunctionType SILFunctionType::getAutoDiffDerivativeFunctionType(
   auto insertion =
       ctx.SILAutoDiffDerivativeFunctions.try_emplace(key, CanSILFunctionType());
   auto &cachedResult = insertion.first->getSecond();
-  if (!insertion.second)
+  if (0 && !insertion.second)
     return cachedResult;

   SILFunctionType *constrainedOriginalFnTy =

Then AutoDiff/SILOptimizer/semantic_member_accessors_sil.swift fails with:
Invalid type parameter in getReducedType()
Original type: τ_0_0.TangentVector
Simplified term: τ_0_0.[Differentiable:TangentVector]
Longest valid prefix: τ_0_0
Prefix type: τ_0_0

Requirement machine for <τ_0_0, τ_0_1>
Rewrite system: {
}
}
Property map: {
}
Conformance paths: {
}
Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the crash backtrace.
Stack dump:

So it seems that getReducedType() behavior somehow changes. I double checked and input types seems to be same on the first and subsequent invocations

Tagging @slavapestov @BradLarson

Requirement machine for <τ_0_0, τ_0_1>

This generic signature does not have a τ_0_0: Differentiable requirement, so indeed the type parameter τ_0_0.TangentVector is not valid in this generic signature. The bug is upstream. Perhaps there's some kind of problem with the caching logic where generic signatures are getting mixed up?

Right. Somehow the generic signature might be lost on the subsequent calls.

@slavapestov Things are a bit more interesting here. Here is bit of SIL in question:
  %14 = partial_apply [callee_guaranteed] %13<T>() : $@convention(thin) <τ_0_0 where τ_0_0 : Differentiable> (@inout Generic<τ_0_0>, @in_guaranteed τ_0_0) -> () // user: %15
  %15 = convert_function %14 : $@callee_guaranteed (@inout Generic<T>, @in_guaranteed T) -> () to $@callee_guaranteed @substituted <τ_0_0, τ_0_1> (@inout Generic<τ_0_0>, @in_guaranteed τ_0_1) -> () for <T, T> //
user: %16
  %16 = differentiable_function [parameters 0 1] [results 0] %15 : $@callee_guaranteed @substituted <τ_0_0, τ_0_1> (@inout Generic<τ_0_0>, @in_guaranteed τ_0_1) -> () for <T, T> // user: %17

And indeed we're trying to calculate derivative type for substituted type:
(sil_function_type type=@callee_guaranteed @substituted <τ_0_0, τ_0_1> (@inout Generic<τ_0_0>, @in_guaranteed τ_0_1) -> () for <T, T>
  (input=bound_generic_struct_type decl=null.(file).Generic@/Users/asl/Projects/swift-project/swift/test/AutoDiff/SILOptimizer/semantic_member_accessors_sil.swift:21:8
    (generic_type_param_type depth=0 index=0))
  (input=generic_type_param_type depth=0 index=1)
  (substitution_map generic_signature=<τ_0_0, τ_0_1>
    (substitution τ_0_0 -> T)
    (substitution τ_0_1 -> T))
  (substitution_map generic_signature=<nullptr>))

Looks like getConstrainedAutoDiffOriginalFunctionType does not know what to do with pattern substitutions and without invocation generic signature is not adding any Differentiability constraints at all. However getTangentParameterConventionForOriginalResult / getTangentParameterConvention seem to use pattern substitutions.

Ah yes, and things are working with caching enabled because we do not consider pattern substitutions as part of the key.


fixes #13 and fixes #16

Added Trait for pulling in request user meta data into the event.
Add the ability to set callback from EventStoreServiceProvider.

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


Is there a way to have a signal in order to know if the Form is valid or not ?

Hello, thx for this nice lib :)
I wonder if there is a way to get a signal which returns a boolean and is updated when the form is valid or not ?

We have the .invalid signal property of the form store: https://modularforms.dev/solid/api/FormStore

@fabian-hiller is there a possible way to change default value of .invalid to be true at first ? cause it doesn't change until the form get submitted

The idea then was to call it invalid instead of valid and only set it to true when we know for sure that the form is invalid. What is your use case? Often it is possible to combine dirty, submitted and invalid to achieve a certain goal.

I trying to make submit button disabled until the form is valid, here's my button component
export const FormButton: FormButtonT = (props) => {
	const [form, elemntProps] = splitProps(props, ['of'])
	return <Button {...elemntProps} disabled={form.of.invalid || !form.of.dirty} loading={form.of.submitting || elemntProps.loading} />
}

I tried to use dirty but after first input changed the button get enabled.
Example in stackblitz

Try to set validateOn to 'input' or 'change' in your form options when calling createForm or createFormStore. https://modularforms.dev/solid/api/FormOptions

Already did, when start typing invalid return true but after finish changing input with a valid value the invalid return false again.

True. Sorry for my last comment. It seems like the only way to do this at the moment is to call validate(...) initially, use form.invalid to disable the submit button and only show the error messages of an individual field if it has been touched or is dirty.


[Data-Plane-Manager] Second Version of DPM Auto UTs

The second version of DPM Auto test.
It can provide custom parameter options, support more flexible test scenarios

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@5385893). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master     #398   +/-   ##
=========================================
  Coverage          ?   36.81%
  Complexity        ?     1150
=========================================
  Files             ?      447
  Lines             ?    10703
  Branches          ?     1365
=========================================
  Hits              ?     3940
  Misses            ?     6230
  Partials          ?      533

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 5385893...ab9667a. Read the comment docs.

@kevin-zhonghao Let us go through this PR together today.


Fully support Python 3.4.

There are several closed issues which resolve with (usually @dan-blanchard saying):

You just need to install the Python 3 compatible fork of fabric in our requirements.txt.

https://github.com/Parsely/streamparse/issues/86#issuecomment-101348677 is currently the most useful doc for this. Even the FAQ from the docs says:

Yes, streamparse is fully compatible with Python 3 starting with version 3.3 which we use in our unit tests.

A short-term fix would be to make the docs clearer about the requirements.txt usage. A longer-term fix is to drop Fabric altogether, as discussed in #45 where #99 is relevant.

fabric3 is what we rely on now, so this can be closed.


feat(icons.scss): add 2 china apps icons

hi, I made two china apps icons into the repo by myself :)

Thanks for your contribute 🎉
I wish I accepted the idea of everyone's icon.
But Adding just one icon greatly increase the CSS file size.
So I'd like to accept only relatively important icons for everyone to use.
ref https://github.com/nostalgic-css/NES.css/issues/310#issuecomment-469073437
Sorry... 😭

got it 👍 :)


Standardize Logging

No Ticket. Standardize all logging across the app.

Coverage decreased (-0.5%) to 73.826% when pulling bfb89994e7f084f4d9a51daec555e79df7fb0466 on harmonize-logging into 514849d48999b231bfc8044e89725e6978a70add on develop.


Adds useRandomArrayItem and useStatus hooks

useStatus hook has not been tested as thoroughly as the useRandomArrayItem hook
Test for useRandomArrayItem passes as expected when running test but jest.advanceTimersByTime doesn't seen to have an effect when tests are ran from a build so commented the test out for now

Fixed test, closing and re-opening new PR


Fix tripwire and intrusion entities

SmartMotionHuman is triggered as a separate event from CrossLineDetection and CrossRegionDetection. These should only be translated when listeners for the more specific entities are not present.
Resolves #138
Resolves #189

Released in https://github.com/rroller/dahua/releases/tag/0.9.44


txnbuild: method that returns xdr.TransactionEnvelope

It will be good to have  method that returns the xdr.TransactionEnvelope since this is not exported. There are times when you need this and it will save users from the need to marshal the base64.
One use case is for the compliance server which sends xdr.Transaction. in order to get this I had to do the following
...
// error checks omitted
	tx.Build()
	tx.Sign()
	txeB64, _ := tx.Base64()

	var txXDR xdr.TransactionEnvelope
	_ = xdr.SafeUnmarshalBase64(txeB64, &txXDR)
	txB64, _ := xdr.MarshalBase64(tx)

This could have been
 ...
       tx.Build()
       txEnv :=  tx.TxEnvelope() // returns xdr.TransactionEnvelope
      // txEnv.Tx will contain xdr.Transaction

I like this idea a lot. It's related to #956. You could use this to export an unsigned envelope, for signing later. Would be great to coordinate the two features.

closed in #1438


Cannot reuse already patched geometry.

Thank you for creating such a great library. While using it, I encountered an error when loading a glb file in r3f.
chunk-HM6WVW62.js?v=9216be66:19381 Uncaught Error: Cannot reuse already patched geometry.
    at new Gt (@three__ez_instanced-mesh.js?v=80ddd4ad:798:708)
    at InstancedEcd (InstancedEcd.jsx:10:25)
    at renderWithHooks (chunk-VNKMZVZQ.js?v=9216be66:5896:26)
    at mountIndeterminateComponent (chunk-VNKMZVZQ.js?v=9216be66:9379:21)
    at beginWork (chunk-VNKMZVZQ.js?v=9216be66:10362:22)
    at beginWork$1 (chunk-VNKMZVZQ.js?v=9216be66:14192:22)
    at performUnitOfWork (chunk-VNKMZVZQ.js?v=9216be66:13668:20)
    at workLoopSync (chunk-VNKMZVZQ.js?v=9216be66:13608:13)
    at renderRootSync (chunk-VNKMZVZQ.js?v=9216be66:13587:15)
    at recoverFromConcurrentError (chunk-VNKMZVZQ.js?v=9216be66:13177:28)

My code
import { InstancedMesh2 } from<EMAIL_ADDRESS>import {useThree} from "@react-three/fiber";
import { useGLTF } from '@react-three/drei'
import * as THREE from 'three';

export default function InstancedEcd() {
  const { nodes, materials } = useGLTF('/draco/lingmou.glb')
  const renderer = useThree((state)=>state.gl)
  const material = new THREE.MeshBasicMaterial({color: 0xffffff});
  const instancedMesh = new InstancedMesh2(
    renderer, 10000, nodes.chasis.geometry,   new THREE.MeshNormalMaterial()
  )

  instancedMesh.updateInstances((obj, index) => {
    obj.position.z = index % 100;
    obj.position.x = index / 100;
    obj.rotateY(Math.PI);
  });
  instancedMesh.computeBVH();

  return <primitive object={instancedMesh} />

}

my enviroment
macbook & chrome
    "@react-three/drei": "^9.99.7",
    "@react-three/fiber": "^8.15.19",
<EMAIL_ADDRESS>"^0.2.6",
    "three": "^0.162.0",

Hello, thank you! 😄
Geometries and materials cannot be shared with multiple Mesh / InstancedMesh because they are modified by adding unique data to manage the various instances.
In the case of geometries, an InstancedBufferAttribute is added to manage the indices that need to be rendered.
This can be solved by cloning geometries and materials that are reused.
const instancedMesh = new InstancedMesh2(
  renderer, 10000, nodes.chasis.geometry.clone(), new THREE.MeshNormalMaterial()
)

@OhBonsai
This needs to be handled better, I thank you for opening the bug. I will do a PR in the next few days :)

From the next version, it will no longer be necessary to manually clone the geometry.

I'm running into this error as well. Started working from the latest version (0.2.10). I have some custom logic to collect / merge all my child meshes, maybe that doesn't work with this library?
Here's how Im loading my models:
    private _createInstancedMesh(platformMeta: { id: string; count: number; gltf: GLTF }) {
        if (platformMeta.gltf) {
            const threeModel: Group = platformMeta.gltf;

            const meshes = collectMeshes(threeModel);

            const geometries: BufferGeometry[] = meshes.map((mesh) => mesh.geometry);
            const mergedGeometry = mergeGeometries(geometries, true);

            if (threeModel.children && threeModel.children[0]) {
                // Create the InstancedMesh with the loaded model
                const platformMesh = new InstancedMesh2(
                    Game!.Renderer!.Renderer,
                    platformMeta.count,
                    mergedGeometry,
                    // if i just pass in a single material, this works.
                    // new MeshNormalMaterial()
                     meshes.map((mesh) => {
                         const material = mesh.material;
                         if (Array.isArray(material)) {
                             material.forEach((mat) => {
                               mat.side = FrontSide;
                             });
                         } else {
                             material.side = FrontSide;
                         }
                         return material;
                     })
                );

                return platformMesh;
            }
        } else {
            throw new Error(`Failed to load model for ${platformMeta.id}`);
        }
    }

P.s, I appreciate you making this library public! I've tested with just passing in a single material and I'm getting some great performance gains already, would just love to sort out using multiple materials on my merged geometry.

I'm running into this error as well. Started working from the latest version (0.2.10). I have some custom logic to collect / merge all my child meshes, maybe that doesn't work with this library?

Sorry dug in deeper and I should expand:
I understand now that the issue here was several sub-meshes had the same material. When I filtered out unique materials (by name) I then got:

SortingUtils.ts:18 Uncaught Error: Multi material is not supported.

HOWEVER! When I remove the custom sort I was also doing:
platformMesh.customSort = createRadixSort(platformMesh);

Things work! (Sorry, this should perhaps be its own ticket knowing the actual solution)

P.s, I appreciate you making this library public! I've tested with just passing in a single material and I'm getting some great performance gains

I'm glad 😄

platformMesh.customSort = createRadixSort(platformMesh);

This could be better supported if all materials are transparent or not. Is this your case?
If you'd like to help, would you like to create an example for me with radix sort + multimaterial?

P.s, I appreciate you making this library public! I've tested with just passing in a single material and I'm getting some great performance gains

I'm glad 😄

platformMesh.customSort = createRadixSort(platformMesh);

This could be better supported if all materials are transparent or not. Is this your case? If you'd like to help, would you like to create an example for me with radix sort + multimaterial?
Anyway, it would be better to open a separate issue to discuss it :)

Will do! Will be tied up for the rest of the week but will try and carve out some time for this. For now I don't need radix sort. I don't believe any of the materials are transparent, but I will check on that as well

I made a fix to use radix sort, but it will be available with version 0.3.0 :)


Input events are always consumed

The documentation doesn't indicate that registering events consumes the input, but listening for hotkeys does just that. I'd love the ability to specify that the hotkey manager should never consume input for my use-case.

This is not how hotkeys work unfortunately. I think what you're looking for is something like https://docs.rs/rdev/latest/rdev/


Typo 'SEVERPROPERTY'

In the section 'Checking Azure AD-only authentication using T-SQL', 'SEVERPROPERTY' should be 'SERVERPROPERTY'.

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

ID: 0e687bed-d811-859c-ccb4-01bc7fb5cdc9
Version Independent ID: c503c3ba-2dbc-a71b-0527-952ca9641e4b
Content: Azure Active Directory-only authentication - Azure SQL Database & Azure SQL Managed Instance
Content Source: azure-sql/database/authentication-azure-ad-only-authentication.md
Service: sql-db-mi
Sub-service: security
GitHub Login: @GithubMirek
Microsoft Alias: mireks

Hi @tylersouthard ,
Thanks for sharing this feedback. We will look into this and update as appropriate.

Hi @tylersouthard ,
Changes are deployed into the document for the typo. Thanks for your contribution.
#please-close


Cannot inject monitor code

A friend I know is struggling with this problem. Here are the list of drivers and what he gets when he runs loader.exe
drivers (1).txt
cannot inject monitor code.txt
Btw, I read the issue #60 and you said to uninstall the program that installed this driver, but how do you find that program. I really didn't understand, sorry for bothering.

Doesn't work...

That does work for removing his specific error. Check out I.E #60. A new issue is then presented after referred to in #74.


chore(master): release 0.10.0

:robot: I have created a release beep boop
0.10.0 (2024-11-22)
Features

JdocTask configuration cache support (67b64d0)

Reverts

configuration cache enabled (sonatype-portal-publish error) (64ba2a0)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/boolivar/jdoc-test/releases/tag/0.10.0 :sunflower:


Fix wiki history border

What's the issue:
Horrible white border on wiki revision history
What's fixed:
Border is now the border-color CSS variable.
Screenshots:

Before:

After:

You can see this here: https://github.com/seanysean/github-dark/wiki/_history
One more thing: I'm planning on sending some more pull requests, so should I update github-dark.user.css as well in them?

Hi @seanysean! Thanks for the PR. I missed it somehow. Yes if you could update the user.css that would help immensely. It's pretty easy. Just paste the main css in between the brackets of the user.css block (after @-moz-document domain("github.com") {)


MGDOBR-630: Review the fields being logged

https://issues.redhat.com/browse/MGDOBR-630
PR owner checklist
Please make sure that your PR meets the following requirements:

[x] Your code is properly formatted according to this configuration.
Run mvn clean verify -DskipTests so that imports are correctly set.
[x] Your commit messages are clear and reference the JIRA issue e.g: "[MGDOBR-1] - $clear_explanation_of_what_you_did"
[x] All new functionality is tested
[x] Pull Request title is properly formatted: MGDOBR-XYZ Subject
[x] Pull Request contains link to the JIRA issue
[x] Pull Request contains link to any dependent or related Pull Request
[x] Pull Request contains description of the issue
[x] Pull Request does not include fixes for issues other than the main ticket

PR reviewer(s) checklist

[ ] Check if code and Github action workflows have been modified and if the modification is safe
[ ] If the modification is safe, add the safe to test label

How to trigger pipelines and use the bots:

Run the end to end pipeline
Annotate the pull request with the label: safe to test. If you want to run the pipeline again, remove and add it again.

Rebase the pull request
Comment with: /rebase.

@r00ta @kostola @danielezonca @lucamolteni It is simple enough to disable for %dev:
https://github.com/quarkiverse/quarkus-logging-json#configuration
If we agree, I'll add that to this PR.

The operator is still showing JSON logging locally.. weird. I am putting it down to a caching issue somewhere.
I will try it again tomorrow as I can't see anything in the setup that would suggest the operator should be logging JSON.

The operator is still showing JSON logging locally.. weird. I am putting it down to a caching issue somewhere.
I will try it again tomorrow as I can't see anything in the setup that would suggest the operator should be logging JSON.

Are you using shard-run.sh to run the shard?

Are you using shard-run.sh to run the shard?

Yes.

@r00ta I discovered that the operator, ingress and executor all ignore the %dev profile settings in application.properties and log as JSON regardless if the io.quarkiverse.loggingjson:quarkus-logging-json dependency is present OR I set quarkus.log.console.json=false i.e. without the profile prefix.
I am having a think...

@r00ta I discovered that the operator, ingress and executor all ignore the %dev profile settings in application.properties and log as JSON regardless if the io.quarkiverse.loggingjson:quarkus-logging-json dependency is present OR I set quarkus.log.console.json=false i.e. without the profile prefix.
I am having a think...

It's because the operator is run with the minikube profile. The ingress and executor are run with the default profile.
So for the operator you have to add %minikube.... and for the ingress/executor I'd leave them as they are. If needed the developer can add it on the fly during the development

Thank-you for the explanation @r00ta however I was mid-way through testing the change I've pushed here that allows switching between plain-text/JSON logging in the operator, ingress and executor. I tested locally with and without JSON logging enabled and the the logs for the three affected components are as required.
@r00ta @robpblake @sutaakar Please re-review.


webhooks/gitlab: Use information about all assignees.

Previously, the GitLab webhook code, namely the get_objects_assignee
method first tried to get a single assignee and if that failed then it
looks for multiple assignees and then it would return the first
assignee that it found (there's actually a code smell here - a loop
which would always return on the first iteration).
Instead, this commit will change that behavior to first check for
multiple assignees first then for a single assignee if we can't find
multiple assignees. Ultimately it will return a list of all of the
assignees (however many that might be [0, n]). This method has then
aptly been renamed to get_assignees.
Finally, we tweked the code using this method to always use it's
output as an "assignees" parameter to templates (there's also an
assignee parameter which we want to avoid here for consistency).
Fixes #16173.

@Hypro999 can you rebase this?  It conflicts with a big webhook refactoring PR from @showell that I just merged.

@timabbott done.

Other than that comment, this lgtm! :)

I guess it's not possible/easy to show only what has changed? In particular, when only the assignment changes, I'd rather not have the whole MR description in the Zulip message.

We definitely have that sort of logic with some other integrations, so it's certainly possible if the GitLab webhook provides the old values that our webhook code could use to compare (I haven't looked).  I agree we should ideally not be repeating all the MR's metadata after the MR was created.

Just rebased this for the time being, I'll make the change for that comment in the morning.

I think we'd ideally be using the name, rather than the ID, given that both seem available in fixtures? At least, we're using the names for "Tomasz Kolek created ..." at the start, and it seems better to be consistent.

@timabbott I modified the second commit of this PR to achieve consistency with the name we use. Can you take another look at this?

I think we'd ideally be using the name, rather than the ID, given that both seem available in fixtures? At least, we're using the names for "Tomasz Kolek created ..." at the start, and it seems better to be consistent.

@timabbott I modified the second commit of this PR to achieve consistency with the name we use. Can you take another look at this?

We definitely have that sort of logic with some other integrations, so it's certainly possible if the GitLab webhook provides the old values that our webhook code could use to compare (I haven't looked). I agree we should ideally not be repeating all the MR's metadata after the MR was created.

From what I can see on the GitLab side, it looks like the sent info contains a changes section with previous and current values. Should that be a different issue, though?

Looks great, merged, thanks @Hypro999!  @Jellby yeah, I'd recommend opening a separate issue for that (or a PR, now that you've seen how this works!).


Pass original request payload to success/error action

Coverage remained the same at 97.015% when pulling ab2177bdb3087730b0b18d35400563b4d482bbb8 on pass-args-to-success into 6ba7858a451d3f33552f99d31024e0556fe5227b on master.


turbolinks:load fires twice

I am experiencing the turbolinks:load event being fired twice on initial load of the page as well as each subsequent request for more content from the backend.
These are the versions I'm using:

gem 'rails', '>= 5.0.0.rc1', '< 5.1'
gem 'turbolinks', '~> 5.x'

I subscribe to this event once in my client side: $(document).on("turbolinks:load", function () { ....  I was unable to find anything in the documentation nor on Google search results about this event being fired more than once, so I'm not sure how to proceed fixing this.  Does anyone have any methods they could recommend in discovering the cause to this?
Also, in the call stack below, does it show jQuery invoking the turbolinks:load after Turbolinks itself invokes that event?

What version of Turbolinks are you running? (post output of $ bundle list | grep turbolinks)
No, that doesn't show JQuery firing turbolinks:load - JQuery overrides a lot of event handling stuff and inserts itself in. Sort of like ActiveSupport.

$ bundle list | grep turbolinks
  * turbolinks (5.0.0.beta2)
  * turbolinks-source (5.0.0.beta4)

Could this be the same issue as https://github.com/turbolinks/turbolinks/issues/81#issuecomment-215127019?

It might be related?  However, I'm using Rails and Turbolinks is coming through the gem in my Gemfile, so it is being put in my precompiled assets.  And this script tag does appear in my <head> tag.

If your <script> is in <head>, it’s not the same issue.
Could you try to distill this down to a reproducible test case for us?

I'd be happy to. I have done that before, is there a template or something I can go off of or a general process one goes through to do that? Or is it just a matter of creating as simple of an app as possible that replicates the issue?

Or is it just a matter of creating as simple of an app as possible that replicates the issue?

Bingo 😁 No template at this time, unfortunately. But see if you can reproduce the issue by making a small test app.

I'll do my best 😀

Well this is beyond frustrating...I've attempted this and I can't get the application (which is just the result of running the rails new ... command, pasting in the Gemfile I had (not a ton added), running the devise and figaro installers, and at no point could I get my application.js file to be served.  I've never run across this before.  In my app/views/layouts/application.html, I have the following:
<!DOCTYPE html>
<html>
  <head>
    <title>TurbolinksIssue</title>
    <%= csrf_meta_tags %>

    <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track': 'reload' %>
    <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
  </head>

  <body>
    <%= yield %>
  </body>
</html>

In my app/assets/javascripts/application.js file I have the following:
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file. JavaScript code in this file should be added after the last require_* statement.
//
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery
//= require jquery_ujs
//= require hello
//= require turbolinks
//= require_tree .
var i = 0;
$(document).on("turbolinks:load", function () {
console.log(i++);
}

Does anyone know why I can't get any of my javascript assets to load?  I put the //= require hello in there after I add the same turbolinks:load handler to a separate file called hello.js as well and none of my javascript assets will be placed into the <head> of my application I'm trying to replicate the issue in.  Do I need to do anything else to get the assets served?  I even created a scaffold: rails g scaffold people first_name last_name, ran the migrations and still no assets being served.

Before I was able to get the above test app to work, we figured out what was going on...kinda.  There is a file in our javascript assets called init.js.  init.js subscribes to the turbolinks:load event.  This file was being invoked more than once, so the event was being fired twice, it was being handled twice.  Changing the name of the file to app-init.js stopped the double invocation I was seeing.  I'm sorry for the waste of time!

No problem! Glad you figured it out.

Hello @jakehockey10, I hope your doing well.
I am experiencing the same frustrating issue that you seemed to.  Any event listeners added within
document.addEventListener("turbolinks:load", function(){...});
Are added again every time the "turbolinks:load" event fires. ex, if I click a link, then click second link, the turbolinks:load event has fired 3 times, and any .on('click') events will fire 3 times. (extremely frustrating)
I see you were able to solve your issue, but my question for you is: what do you mean by

init.js subscribes to the turbolinks:load event.

Any help is much appreciated.

@eozelius what I meant by that is that I had a javascript asset named init.js in my assets pipeline that was subscribing to the "turbolinks:load" event more than once.  By my subscription looks like this, instead:
$(document).on("turbolinks:load", function () { // subscription to the "turbolinks:load" event
    ....
});

@jakehockey10 thanks for the reply.
I see, I had the same issue since I was using $(document).on("turbolinks:load", function () {...}); in several of my js files, which as mentioned above will cause any events defined within that to fire as many times as the turbolinks:load event has been fired.
The solution that I will implement is to not use the turbolinks:load and instead use delegation.  After rereading the turbolinks documentation several times I found this:

When possible, avoid using the turbolinks:load event to add event listeners directly to elements on the page body. Instead, consider using event delegation to register event listeners once on document or window.

Cheers.

@eozelius
Oh my, I missed that in the documentation!  I'm not even familiar with that concept yet.  Do you have any links you can send me that helped you understand that concept?

Yeah, I only found out delegation existed after 3 years of professional jquery development hahaha.
Essentially delegation if you want to add an click listener to a <li>, you add the add the .on('click') listener to the <ul>, and then pass a 'li' selector.
$('ul').on('click', 'li', function(){...})
so when the <ul> is clicked, jQuery will try to find a <li> within the <ul>, and if it can find that <li> it will fire the function.
disclaimer: I have only been working with delegation for a few hours, so I could be mistaken on some concepts.
Documentation from http://api.jquery.com/on/

.on( events [, selector ] [, data ], handler )
selector
Type: String
A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element.

another great explanation: https://learn.jquery.com/events/event-delegation/

@eozelius Thanks, I really appreciate you sharing with me this information.  Good luck with what you are working on!

no problem dude @jakehockey10.  happy coding.

@jakehockey10 One last peculiar annoying thing about using delegations and turbolinks together.
All your event listeners have to be added to the $(document) or $(window) objects, because everything else even <html> gets reloaded, and the events won't fire on them.  for example:
// Works
$(document).ready(function(){
$(document).on('click', 'ul li', function(){  ... });
});
// Does Not work
$(document).ready(function(){
$('ul').on('click', 'li', function(){ .... });
});

Hey @eozelius - no need to wrap in a $(document).ready when you're using the event delegation pattern on document. You use the ready callback when the element you're binding to might not exist yet. Not an issue for document – it will exist.

Hello @packagethief, thanks for the info.
I used the $(document).ready only because I am still quite new to delegation, and I am used to added event listeners only after the page has loaded.
But yes, when using turbolinks it is unnecessary.

Hi there,
I'm having a similar issue. After the second click, my assets are loaded twice (see picture : https://postimg.org/image/fuest7qjx/ ).
Any solution if I don't want to use delegations ?

Here's a working solution / hack :-)
Remove the event handler just before implementing it again like this:
$(document).on('turbolinks:load', function () {

	// unregister the event listener
	$('div#target').off('click');

	// register the event listener
	$('div#target').on('click', function (e) {
		// do whatever..
	});

});

This issue is not resolved. Why do you close it?

Hi Guys,
I'm using react_on_rails with turbolinks, my issue was app was loading twice after my second redirection in the app. Issue of duplicates got fixed with the following code, I'm going ahead with this as a hot fix for now. I might be completely wrong but please let me know if there is any issues. Please Let me know.
// ../HelloWorld/startup/registration.jsx
document.addEventListener("turbolinks:before-visit", function() {
  Turbolinks.clearCache();
})

@RathanKumar actually, using this hotfix you just have disabled all the caching features of Turbolinks (so no fast back-buttons, no pages previews and etc). But... you know, more I deal with Turbolinks, more I want to just remove it at all from my project. Always I have to break my brains trying to adapt my or third-party javascript so it will work fine with Turbolink cache, and almost always you have to find new ways of workarounds, and almost always the bugs is not obvious from first application run. It is easier to just make normal SPA application with React or Angular.

Same here.
This worked for me.
$(() => {
  $('select').select2({
    placeholder: "Por favor selecione",
    width: '100%',
    allowClear: true
  })
});

For me sometimes the event turbolinks:before-visit is triggered tons of time when I click a link, I don't know why this happens, because at first everything works fine, but somehow when you navigate between pages and you do some actions then you go to that page where the event is, the bug starts ! sometimes no bug at all ! so I have no idea what's the reason behind

@jimchild49 likely you have somewhere in your js-code some bindings for this action ($(document).on('turbolinks:before-visit')) in place which is reevaluated every time you make some action on page or some navigation. So you bind same function multiple times for this hook (turbolinks:before-visit).

I fixed this problem by making my event listeners idempotent, e.g. I changed the selector for my jQuery on event listener from document to a more unique element on my page (however, one which was still the parent of the event target).
More simply put, I fixed this by changing this:
$(document).on('click', '.my-elements-class-name', function(event) {
...
});

to this:
$('.primary-container').on('click', '.my-elements-class-name', function(event) {
...
});

You don't need to disable turbolinks cache or turbolinks previews for this to work.
Thank you @nateberkopec for the knowledge you shared here which enabled me to find this fix!

I don't know if anyone else here spoke to this point as well but...
If Turbolinks is loaded more than once into a single layout, it'll call fire the turbolinks:load listener for each Turbolinks load.
For example, let's say in your layout you have 2 js manifest files and each one includes turbolinks. But you only have one block $(document).on("turbolinks:load", function(){})...etc

In turbolink before visit event stop livewire component render because of turbolinks every visit page append the component into the window.livewire.components array. if you stop the livewire component on turbolinks:before-visit event then it's remove or empty the window.livewire.components every page before visit. it's solved your problem.
`document.addEventListener('turbolinks:load', () => {
window.livewire.rescan();
});
document.addEventListener('turbolinks:before-visit', () => {
window.livewire.stop();
});`


Error creating temp folder.

root@bb1:~# SecretScanner -image-name worker1
Initializing....
Scanning image worker1 for secrets...
scanImage: Could save container image failed to save image: invalid output path: directory "/tmp/Deepfence/SecretScanning/df_worker1" does not exist

findSecretsInImage: failed to save image: invalid output path: directory "/tmp/Deepfence/SecretScanning/df_worker1" does not exist

main: error while scanning image: failed to save image: invalid output path: directory "/tmp/Deepfence/SecretScanning/df_worker1" does not exist

panic: Fatal error....

goroutine 1 [running]:
github.com/deepfence/SecretScanner/core.(*Logger).Log(0x7ffc1c756662, 0x5, {0x56cb7e, 0x24}, {0xc00033ff50, 0x1, 0x1})
	/root/go/src/github.com/deepfence/SecretScanner/core/log.go:68 +0x25e
github.com/deepfence/SecretScanner/core.(*Logger).Fatal(...)
	/root/go/src/github.com/deepfence/SecretScanner/core/log.go:73
main.main()
	/root/go/src/github.com/deepfence/SecretScanner/main.go:139 +0x14c

Ubuntu 20
go version go1.17.6 linux/amd64

Despite running as root i had to supply -temp-folder /root/tmp/ and it worked.