asyncFire() triggers null exception "Failed to create SerializedScriptValue"

Originally opened as dart-lang/sdk#16848
This issue was originally filed by<EMAIL_ADDRESS>
I'm firing a custom event from an element using asynFire(), nothing fancy, and I get a null exception thrown from CustomEvent._initCustomEvent() (which is native, so I can delve deeper). The arguments to the call all seem fine. I can see a String "exception" in the Variables pane of the Editor: its value is "Failed to create SerializedScriptValue".
With that, the exception gets caught in CustomEvent ctor, and the event gets successfully delivered to the handler in our code.
We have a couple other asyncFire() calls in the code, but none of them causes the same problem. I couldn't figure out what is so specific about this particular call. If that helps, this is the line in question:
https://github.com/dart-lang/spark/blob/master/widgets/lib/spark_selection/spark_selection.dart#L46
I'm using Dart Editor version 1.2.0.edge_032617, Dart SDK version 1.2.0-edge.32616, polymer-0.9.5.

 Comment by sigmundch

Removed Polymer-P-2 label.
Added Polymer-Milestone-Later label.

 Comment by sigmundch

Hey @sergey, is this still an issue with the latest polymer?

Added this to the Later milestone.
Removed Priority-Unassigned label.
Added Priority-Medium, NeedsInfo labels.

 Comment by lrhn

Added Area-Polymer, Triaged labels.

 Comment by sigmundch

Added Polymer-P-2 label.

 Comment by sigmundch

Removed this from the Later milestone.

 Comment by jmesserly

Removed Area-Polymer label.
Added Pkg-Polymer, Area-Pkg labels.

 Comment by sigmundch

Ah - got it. Good to know.
We've seen other issues with serialize-values and the detail object which we'd like to make better. We are tracking progress of that here:  https://code.google.com/p/dart/issues/detail?id=19315
Thanks again for the update!

Added AssumedStale label.

This comment was originally written by<EMAIL_ADDRESS>
Siggi, no, it's no longer an issue (it seems).
For the record, I believe the problem was that in the call in question,
  asyncFire('select', detail: {'value': value, 'isSelected': isSelected});
the value was pointing at another Polymer element's instance, which had a script tag. So the code broke on trying to serialize that tag.

 Comment by sigmundch

Removed Polymer-Milestone-Later label.
Added PolymerMilestone-Later label.


TLS for Kafka

We would like to have TLS configuration for our stream-producer to support Kafka.  At this time stream-loader is more important.

See https://github.com/Senzing/stream-loader/issues/260

Pull requests:

https://github.com/Senzing/stream-producer/pull/105


[BUG] Youtube get_user_videos error

Basic information

Program version: 0.2.0
Python version: 3.10
Operating system: Windows and Ubuntu

Describe the bug
User cannot be found while doing the youtube get_user_videos
Command/Code used
Otherwise, if using the python module, provide the following:

A minimal reproducible example:

from chat_downloader.sites import YouTubeChatDownloader

channel_id = "UC_vMYWcDjmfdpH6r4TTn1MQ"

youtube = YouTubeChatDownloader()
video_ids = youtube.get_user_videos(
    channel_id=channel_id,
)

for video_id in video_ids:
    print(f"{video_id}")

Output, traceback or other information relating to the bug:

chat_downloader.errors.UserNotFound: Unable to find user: "https://www.youtube.com/channel/UC_vMYWcDjmfdpH6r4TTn1MQ"

Expected behavior
Will be able to get the user videos
Additional context/information
I think this might be due to the youtube updating their platform and adding the handles. Might worth looking into it

I'm encountering this issue too. It's probably due to Youtube's recent UI changes. A workaround for this is to extract the videoid from the youtube channel /live link
For example with curl and grep:
videoId=$(curl -s https://www.youtube.com/c/"$channelid"/live| grep -o -E '\{"videoId":"[a-z0-9A-Z_-]{11}' | head -1)
videoId=${videoId:12:11}

Yes it it is because of YouTube UI's changes. Other libraries, like pytube, also have the same problem currently. Fortunately, there are some PRs with fixes, like https://github.com/pytube/pytube/pull/1409
Would one of you like to make those changes here and submit a PR?

What about adding support for /live urls and then just use that to get the livestream for when a channel url is entered instead of parsing the channel page?

@xenova I have the same issue as above.


feat: add OpenAI embedding configuration option in LLM settings

In order to achieve this, I have to make some modifications to langchaingo:
https://github.com/ArnoChenFx/langchaingo/commit/3e1b201db5b9bb515d4fef862a019b9bf33533ea

[!IMPORTANT]
Add openai_embedding configuration option for OpenAI embeddings and update langchaingo dependency.

Configuration:

Add openai_embedding option in config.yaml and config/models.go for specifying OpenAI embedding models.

Client Configuration:

Update configureClient() in llm_openai.go to handle OpenAIEmbedding setting, ensuring only one embedding option is set.

Dependency:

Replace github.com/tmc/langchaingo with github.com/ArnoChenFx/langchaingo in go.mod and go.sum.

This description was created by  for 4a61f506e7f3f5ff1ebd286087a285da4c60a59f. It will automatically update as commits are pushed.

Hi @ArnoChenFx - we've made significant changes to Zep and this PR is no longer valid.


Avoid arithmetic in to_hex function

how much of a boost is this?

new
old

1096247
1489097

Note: The number is a 99.9% for 10000 runs with 1000 bytes of data

+1

If you're interested, we played in to_hex benchmark two years ago. Summary could be found here: https://gist.github.com/maxlapshin/6809909
Matching with function clause is really the fastest method to do the things in Erlang.

wow thats quite cool! :)

+1

+1 as well. Good use of the module constant pool and pattern matching to avoid the arithmetic here.

Thank you @kocolosk for the idea to use body recursion.


Netdisco throwing an error in 0.27.1 (with a Philips Hue hub)

Home Assistant release (hass --version):
0.27.1
Python release (python3 --version):
3.5.2
Component/platform:
netdisco and hue, on 0.27 it used to find my Philips Hue hub gen2 without any problem.
Description of problem:
Whenever I have the discovery: directive in my configuration.yaml, when running hass --open-ui, I get the following error messages:
6-08-31 19:48:50 INFO (Thread-6) [requests.packages.urllib3.connectionpool] Starting new HTTP connection (1): <IP_ADDRESS>
16-08-31 19:48:51 INFO (Thread-6) [homeassistant.components.discovery] Found new service: DLNA http://<IP_ADDRESS>:32469/DeviceDescription.xml
Exception in thread Thread-6:
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/threading.py", line 914, in _bootstrap_inner
    self.run()
  File "/root/.homeassistant/deps/netdisco/service.py", line 59, in run
    self._scan()
  File "/root/.homeassistant/deps/netdisco/service.py", line 76, in _scan
    for service in self.discovery.get_info(disc):
  File "/root/.homeassistant/deps/netdisco/discovery.py", line 76, in get_info
    return self.discoverables[dis].get_info()
  File "/root/.homeassistant/deps/netdisco/discoverables/mystrom.py", line 20, in get_info
    return [self.info_from_entry(entry) for entry in self.get_entries()]
  File "/root/.homeassistant/deps/netdisco/discoverables/mystrom.py", line 20, in <listcomp>
    return [self.info_from_entry(entry) for entry in self.get_entries()]
  File "/root/.homeassistant/deps/netdisco/discoverables/mystrom.py", line 15, in info_from_entry
    'http://{}'.format(self.ip_from_host(entry.server)),
  File "/root/.homeassistant/deps/netdisco/discoverables/__init__.py", line 108, in ip_from_host
    return repr(ips[0]) if ips else host
TypeError: __repr__ returned non-string (type bytes)

Expected:
Get the "Lights" panel in the UI and no error in the logs. I don't get the "Lights" panel... and I get the error message above.
Problem-relevant configuration.yaml entries and steps to reproduce:
discovery:

Additional info:
If I remove the discovery: service, no error message, but my hue lights are not showing in the UI any more either.

Funny, my Hue lights associated correctly but I had this crash happen on the sabnzbd discoverable.
Traceback (most recent call last):
  File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
    self.run()
  File "/home/iot/.homeassistant/deps/netdisco/service.py", line 59, in run
    self._scan()
  File "/home/iot/.homeassistant/deps/netdisco/service.py", line 76, in _scan
    for service in self.discovery.get_info(disc):
  File "/home/iot/.homeassistant/deps/netdisco/discovery.py", line 76, in get_info
    return self.discoverables[dis].get_info()
  File "/home/iot/.homeassistant/deps/netdisco/discoverables/sabnzbd.py", line 20, in get_info
    return [self.info_from_entry(entry) for entry in self.get_entries()
  File "/home/iot/.homeassistant/deps/netdisco/discoverables/sabnzbd.py", line 21, in <listcomp>
    if entry.name.startswith('SABnzbd on')]
  File "/home/iot/.homeassistant/deps/netdisco/discoverables/sabnzbd.py", line 15, in info_from_entry
    return (self.ip_from_host(entry.server), entry.port,
  File "/home/iot/.homeassistant/deps/netdisco/discoverables/__init__.py", line 108, in ip_from_host
    return repr(ips[0]) if ips else host
TypeError: __repr__ returned non-string (type bytes)

Is this still happening with newest HA? The way that netdisco works, this should be pretty isolated, and a failure of another discoverable entity will not directly impact the Hue hub.

I confirm this has been fixed in a more recent HA version. Thank you all!


Support DN and password for LDAP SASL.

Both DigestMD5 and CramMD5 require DN and password.

I could not get a successful gradle build on master.  Recommend you build this before accepting.

Merged out of band via bb7aaeb985937bb232c886126f172bf5f3cf3844


Do not use "ingress-node-replication" with VXLAN

JTAC advises to not use "ingress-node-replication" when using BGP EVPN VXLAN. "multicast-mode ingress-replication" is enough to achieve the same effect. "ingress-node-replication" will replicate packets to VTEP not advertising the Type 3 route and also incurs a low-level overhead which may exhaust the chipset capacity (on a Broadcom platform for example). Please check with a QFX engineer if needed.

Additional reference:

Retains the QFX10000 switch’s default setting of disabled for ingress node replication for EVPN-VXLAN. With this feature disabled, if a QFX10000 switch that functions as a VTEP receives a BUM packet intended, for example, for a physical server in a VLAN with the VNI of 1001, the VTEP replicates and sends the packet only to VTEPs on which the VNI of 1001 is configured. If this feature is enabled, the VTEP replicates and sends this packet to all VTEPs in its database, including those that do not have VNI 1001 configured. To prevent a VTEP from needlessly flooding BUM traffic throughout an EVPN-VXLAN overlay network, we strongly recommend that if not already disabled, you disable ingress node replication on each of the leaf devices by specifying the delete vlans vlan-name vxlan ingress-node-replication command.


Support for multispectral images?

Would be great to bring in multispectral imagery into this really fantastic pipeline. It seems like both the png and webp formats don't have support for more than 3+alpha bands, which might kill this idea preflight, but I'm interested in looking into it.
The robosat.unet code has some suggestion that there was an idea to do this.
https://github.com/mapbox/robosat/blob/a9ad0d348d7cd4ebb6c75a570e28ba6b94347522/robosat/unet.py#L92
Any progress? Might it ever happen?

There's a ticket already tracking this: https://github.com/mapbox/robosat/issues/56 let's centralize discussion there.
It's certainly possible and on our radar; if you want to help out here that would be great. The basic idea is to use n input channels in the model using the pre-trained weights and zero-initializing new channels. The datasets might need to change a bit but we can use our cocatenation dataset to let users provide multiple slippy map dirs (e.g. one for rgb, one for additional depth, etc.).

Ah, didn't see that. I'll see if there's bandwidth for that. Thanks for the heads-up!

Great! Feel free to hit me up if you need guidance or are running into problems!


Have I Been Pwned Module

Feature Use Case
 ✨ Checker Package - Have I Been Pwned module
Feature Proposal
Have Leon check if an email address has been compromised using https://haveibeenpwned.com/API/v2.

Going to begin work on this once I get the go-ahead from @louistiti

Hello @iifeoluwa,
Awesome! I'm looking forward to see the results.
Quick thing, it would be nice to let the user setup pre-defined email addresses in the config.json. In that way, when the user say: Have I been pwned?, then Leon will check the email addresses in the config.json and request the Have I Been Pwned API.
And if the user provides the email addresses in the query, like Is<EMAIL_ADDRESS>has been pwned? then Leon can extract the email addresse(s) (here<EMAIL_ADDRESS>via the entities and pass them to the Have I Been Pwned API.

Hi @louistiti, thank you for the pointers.
I'd like to clarify the email address in config part though. To the best of my knowledge, Leon doesn't ask for an email address at any part of the install process. Should the user be able to manually insert an email entry in the package's config file, or do we set it as another ENV variable that is read?
Setting as ENV variable might be much less appropriate though because, in cases where user wants to enter >1 email addresses, we'd have to start employing things like delimiting email addresses with special character which isn't all that great.

Indeed Leon does not ask for any email address during setup. But if you take a look at this part of the docs, you can see that every package has their own configuration, in your case, the configuration is located in packages/checker/config/config.json. You will need to add a key haveibeenpwned in this file with a sub-key emails that contains the list of email addresses for example. So it should be something similar as that:
{
  "isitdown": {
    "options": {}
  },
  "haveibeenpwned": {
    "emails": [
<EMAIL_ADDRESS><EMAIL_ADDRESS>    ],
    "options": {}
  }
}

Leon should be able to find the email address in the query itself (e.g. Is<EMAIL_ADDRESS>has been pwned?). You can use the entities from your module file to extract the email addresses. You can take the Is It Down module as example as it extracts the domain names from the queries (cf. here).
If the user does not provide any email addresses in the query, then Leon will request the Have I Been Pwned API with the email addresses he can find in the config file. You can easily grab a config property value via utils.config().

Hi @louistiti, I encountered some hiccup testing this module and was hoping you'd have some pointers.
Following the instructions in the docs, I tried running this;
PIPENV_PIPFILE=bridges/python/Pipfile pipenv run python bridges/python/main.py en checker isitdown "Check github.com is up"
But what I got was this error;
Traceback (most recent call last):   File "bridges/python/main.py", line 4, in <module>     import utils   File "/Users/ifeoluwa/Projects/forks/leon/bridges/python/utils.py", line 22, in <module>     queryobjfile = open(queryobjectpath, 'r', encoding = 'utf8') FileNotFoundError: [Errno 2] No such file or directory: 'en'
This is happening because queryobjectpath is set to argv[1] (which is 'en'), and trying to open that as a directory, which it is not. Is there an error somewhere or am I missing something?
Thanks for your help!

 🔧 [1.0.0-beta.2] Improve NLU for more detailed queries

I've recently updated the module execution from the Leon's brain. Leon now uses a file instead of using the args.
The standalone module execution works like this:
PIPENV_PIPFILE=bridges/python/Pipfile pipenv run python bridges/python/main.py server/src/query-object.sample.json

And the JSON file will depend of the module you are executing, so for the Is It Down module, it should looks like this:
{
  "lang": "en",
  "package": "checker",
  "module": "isitdown",
  "query": "Check if github.com, mozilla.org and twitter.com are up",
  "entities": [
    {
      "sourceText": "github.com",
      "utteranceText": "github.com",
      "entity": "url",
      "resolution": {
        "value": "github.com"
      }
    },
    {
      "sourceText": "mozilla.org",
      "utteranceText": "mozilla.org",
      "entity": "url",
      "resolution": {
        "value": "mozilla.org"
      }
    },
    {
      "sourceText": "twitter.com",
      "utteranceText": "twitter.com",
      "entity": "url",
      "resolution": {
        "value": "twitter.com"
      }
    }
  ]
}

In your case, the entities that may be extracted from a query are email addresses. As Leon use NLP.js, the JSON entities array should look like that.
I'll update the docs within one or two days.

I've edited the docs, you can take a look here :smiley:
Let me know if you have any questions.

Great, thanks!

 ✨ Checker Package - Have I Been Pwned Module

Done in https://github.com/leon-ai/leon/pull/80.


Running powershell script in pom.xml goals fails on linux only agents

Reproduction steps

In the pom.xml run a powershell script
e.g:

<execution>
    <id>Generate help files</id>
    <phase>generate-resources</phase>
    <goals>
        <goal>run</goal>
    </goals>
    <configuration>
        <target>
            <exec executable="powershell.exe">
                <arg value=".\GenerateHelpFiles.ps1 " />
            </exec>
        </target>
    </configuration>
</execution>

Run the Jenkins Security Scan on PR

Expected Results
Expected the Scan to execute
Actual Results
The scan failed cause the agent did not have powershell.exe

Anything else?
In the pom.xml we run a powershell script running in the build goals, but the agent building the plugin in the security scan script is a linux agent thus it won't be capable of building the plugin used for the security assesment (https://github.com/jenkinsci/uipath-automation-package-plugin/blob/develop/pom.xml#L120C1-L126C41).
What can we do to onboard to the Jenkins Security Scan?

scan example: https://github.com/jenkinsci/uipath-automation-package-plugin/actions/runs/11416380208/job/31767532043

I managed to fix this by using pwsh instead of powershell.exe. ✅
💡 But adding the option to build on windows agents would be a nice addition.
e.g:
<execution>
    <id>Generate help files</id>
    <phase>generate-resources</phase>
    <goals>
        <goal>run</goal>
    </goals>
    <configuration>
        <target>
            <exec executable="pwsh">
                <arg value=".\GenerateHelpFiles.ps1 " />
            </exec>
        </target>
    </configuration>
</execution>

Thanks for reporting this. I admit I did not consider builds that require Windows to pass when I created this, as that's not common in the Jenkins project. GitHub offers Windows runners, so this should be doable with a few changes. Fixing this is not a very high priority for me at the moment, as this is a rare use case.
Meanwhile I recommend looking into using the published package from a standard CodeQL workflow, for which Jenkins Security Scan is currently just a fairly small wrapper. Looking at the default CodeQL workflow it doesn't look like it is intended to run with Windows based on labels, but perhaps it's OS agnostic enough to work -- I see a few references to Windows in https://github.com/github/codeql-action, so might be worth a try. See the package's readme for instructions for use in a generic CodeQL workflow.

Thanks @daniel-beck
I'll close this issue as it is not blocking for us anymore, in case we'll need windows agents only we'll evaluate your suggestion.


Complete Python doc comments.

Complete Python inline documentation for non-test classes, functions and methods.
This issue depends on #106. #118 depends on this issue.

No longer publicly docing the API


[bct] Rename tool

Do we need to rename the tool to make it clearer that we can also report general changes and get a changelog output from it? BreakingChangesChecker might be too specific, we could consider something like CodeChangesChecker.

Propose: CodeReporter


Windows usage help request.

Hi! I have cbc installed (which works fine from the cli) and I can build coin_cbc without error but when I execute cargo test I get a litany of unresolved external symbol errors. I'm not sure what to pass the linker so it'll link properly; its definitely finding the lib it just isn't finding the exported symbols (which are definitely there - confirmed via dumpbin).
In WSL everything is aces! A simple install of the coin lib, a git clone and cargo test and cargo run --example knapsack was smooth as silk.

Hello again, got it working.
I added the build.rs block as stated by Phil (https://github.com/KardinalAI/coin_cbc/pull/2#issuecomment-1219605762) to the coin_cbc root directory and
set the to coin_cbc_sys link to 'static'
#[link(name = "CbcSolver", kind = "static")]
extern "C" {
    pub fn Cbc_newModel() -> *mut Cbc_Model;
    pub fn Cbc_deleteModel(model: *mut Cbc_Model);
    ...

also, because I didn't want to use $PATH I added a full link-search path to the coin_cbc_sys build.rs.
cargo test and cargo run --example knapsack worked. :)


Inconsistent naming of LockingStrategy

There is both a "LockingStrategy" in the readme and several variations on "LockStrategy". Is this intentional?

It's a typo in the readme, fixed in #10. Thanks!


[bug] Extra Pixels panel patch spacing / overflows

When placing extra pixels on the canvas, the "Extra Pixels Panel" appears on the right. The left side of the panel displays the different types of pixels available. The user can click the "Faction" option to expand more information.
The spacing and formatting of this tab can act weird when expanding the factions button. It would be good to fix issues with spacing and overflows caused by this.
References

Extra pixels panel frontend
Factions button

@Oshioke-Salaki Thank you for volunteering for the issues. Please comment here if you'd like to take this!

i

Please I am interested


Hide the organization prefix (`@/) in the team admin

Team admin can be saved without the need to manually edit the username

before
after

Task linked: QF-3353 Make team members easier


Zero bridgeid

Hello,
I see the following recurring warning in the log on the RPi4 with HB and the Conbee II connected to the USB cable:
[deCONZ] warning:<PHONE_NUMBER>0000000000: not a RaspBee/ConBee mac address
Here I can see that Conbee has a null bridge ID.
pi@homebridge:/var/lib/homebridge $ ph discover
{
"<IP_ADDRESS>": {
"apiversion": "1.56.0",
"bridgeid": "001788FFFE6B688C",
"datastoreversion": "147",
"factorynew": false,
"mac": "00:17:88:6b:68:8c",
"modelid": "BSB002",
"name": "Philips hue",
"replacesbridgeid": null,
"starterkitid": "",
"swversion": "1956178040"
},
"<IP_ADDRESS>:4530": {
"apiversion": "1.16.0",
"bridgeid": "0000000000000000",
"datastoreversion": "93",
"devicename": "ConBee II",
"factorynew": false,
"mac": "d8:3a:dd:03:d4:68",
"modelid": "deCONZ",
"name": "Phoscon-GW",
"replacesbridgeid": null,
"starterkitid": "",
"swversion": "2.21.1"
I haven't found any solution on the web to fix the problem. Can you please help me?
J.K.

Sorry, I cannot.  This is an issue with deCONZ, that sporadically occurs.  I don't know what causes it, nor how to solve it.  Best ask in the deCONZ support forum


Adaptive online learning for time series analysis code

The code is here. The paper is here

The task would be analogous to this issue, to begin with.


fixing merge_asof(..., left_on='col', right_index=True) issue #6183

https://github.com/dask/dask/issues/6183

[x] Tests added / passed
[x] Passes black dask / flake8 dask

Thanks for the PR, this is looking pretty good! Just a few small changes needed.

i've found some problems in multi.py::pair_partitions():
dd.merge_asof(dd.from_pandas(pd.DataFrame({'a':[10,20,30]}, index=[10,20,30]), npartitions=1),
              pd.DataFrame({'b':[1,2,3]}, index=[1,2,3]),
              left_index=True, right_index=True).compute()

raises
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/noreentry/miniconda3/envs/py38forge/lib/python3.8/site-packages/dask/dataframe/multi.py", line 867, in merge_asof
    result = merge_asof_indexed(left, right, **kwargs)
  File "/home/noreentry/miniconda3/envs/py38forge/lib/python3.8/site-packages/dask/dataframe/multi.py", line 773, in merge_asof_indexed
    for i, J in enumerate(pair_partitions(left.divisions, right.divisions)):
  File "/home/noreentry/miniconda3/envs/py38forge/lib/python3.8/site-packages/dask/dataframe/multi.py", line 674, in pair_partitions
    while R[j + 1] <= L[i]:
IndexError: tuple index out of range


Retrieve the matched length

Hi,
Is there any way/trick to know the length matched by the text used to match on it?
For example when you construct a prefix DFA, try to make it match with a text, the dfa gives you the edit distance but you do not know the exact length that this text "covers" on the original text.
let query = "Levente";
//                ^ missing "sh"

let max_dist = 3;
let dfa = Dfa::new_prefix(query, max_dist);

let text = "Levenshtein";
let dist = dfa.eval(text);
assert_eq!(dist, 2);

Here we can easily retrieve the edit distance but we would also like to know that this text covers 9 characters (i.e. "Levenshte") and not the text length 6 (i.e. "Levente").
Something I though about was to count the number of insertions and deletions, but the DFA doesn't stores that, didn't it?

Hey @fulmicoton,
I just found out that there is a distance method on the DFA that returns the distance associated with this state is there any way to also retrieve the length where the automaton stopped? Is this information stored in the DFA state?
To make it maybe a little more clear, if the original word (hel) that created the DFA is a prefix of another word, is there a way to know where in the targeted word (hello) the DFA stopped (3 chars)? (hello).
Thank you very much!

Hello @Kerollmops ,
I assume you are trying to use this to build a highglighter?
There are no such method but if you can contribute one that would be awesome.
There is no such thing right now but I think the following approach gives correct results.
Iterate through the targetted word chars and navigate the statemachine.
For each char, keep track of the current distance.
Depending on your taste, it might not be necessarily the best highlight.
For instance for
"hell" "heltlo world"

It will highlight "heltlo world"
I suspect some people would rather have "heltlo world".
To get the second behavior, I suspect we need to look at the parametrized dfa.

Hey,

where the automaton stopped I am not entirely sure what you mean by "where the automaton stopped".

When I say "where the automaton stopped" I mean "Retrieve the number of bytes consumed by the automaton". In other words being able to know how many bytes have been consumed for this state.

I assume you are trying to use this to build a highglighter?

Exactly, good guess 😀

There are no such method but if you can contribute one that would be awesome.

I understand that there is a Vec of distances and you use the state as an index in this Vec to return the associated distance with the given state.
Do you think it is possible to also create a Vec with the offset in bytes in the targeted string, when we create the DFA?


Aggregate-count on connection returning null on non-nullable field

Describe the bug
Aggregate-count is not working properly when implementing a resolver
To Reproduce
Steps to reproduce the behavior:

Start prisma with the following datamodel:

type Person {
  id: ID! @unique
  name: String!
}

Start with the following schema:

type PageInfo {
  hasNextPage: Boolean!
  hasPreviousPage: Boolean!
  startCursor: String
  endCursor: String
}

type Person {
  id: ID!
  name: String!
}

type PersonConnection {
  pageInfo: PageInfo!
  edges: [PersonEdge]!
  aggregate: AggregatePerson!
}

type PersonEdge {
  node: Person!
  cursor: String!
}
type Query {
  personConnection: PersonConnection!
}

However :
export const QueryResolvers = {
  // This returns error "Cannot return null for non-nullable field PersonConnection.aggregate"
  async personConnection(parent, args, context, info) {
    return await prisma.personsConnection()
  }

  // This works
  async personConnection(parent, args, context, info) {
    const aggregate = await prisma.personsConnection().aggregate()
    const pageInfo = await prisma.personsConnection().pageInfo()
    const edges = await prisma.personsConnection().edges()
    return {aggregate, pageInfo, edges}
  }
}

Expected behavior
I didn't quite expect the hack to work, and I don't quite know what the problem is. However, I do expect the aggregate count to work properly without me having to repeat myself thrice :)
Screenshots
If applicable, add screenshots to help explain your problem.
Versions (please complete the following information):

Connector: Postgres
Prisma Server: 1.25
prisma CLI: [e.g. prisma/1.24.0 (darwin-x64) node-v10.4.0]
OS: OSX high sierra
other dependencies: prisma-client, prisma-binding, etc. if applicable

Additional context
Add any other context about the problem here.

@arnabkd : I believe what you are running into is this: https://github.com/prisma/prisma/issues/3513#issuecomment-439346021
The comment has a resolution. We are tracking making this experience better in this issue https://github.com/prisma/prisma/issues/3513
If you agree to it, please feel free to close this issue and follow this one https://github.com/prisma/prisma/issues/3513 for a resolution.

I currently resolve the aggregate on each of the types like so:
https://github.com/javascript-af/javascript-af/blob/master/packages/backend/src/resolvers/Repo/RepoConnection.ts
(Also a small tip: You can directly return a promise from a resolver
So this will look something like this for your case:
const resolvers = {
  PersonConnection:{
    aggregate: (parent, args, ctx) => {
      return prisma.personsConnection(args).aggregate();
    },
  },
  Query:{
    personConnection(parent, args, context, info) {
      return prisma.personsConnection()
    }
  }
}

Now, you can easily fetch all of the stuff:

But I also feel this is a duplicate to #3513

Sorry for the late response, I thought I had closed and commented. My bad.
Yes, this does look like a duplicate.

Just following up the above I found that
const resolvers = {
  PersonConnection:{
    aggregate: (parent, args, ctx) => {
      return prisma.personsConnection(args).aggregate();
    },
  },
  Query:{
    personConnection(parent, args, context, info) {
      return prisma.personsConnection()
    }
  }
}

Will never be passed valid 'args' and the aggregate count will always be the maximum count of persons.
If you instead modify the Query return to actually return each expected connection object:
 Query:{
    personConnection(parent, args, context, info) {
        const newReturn = {
            pageInfo: prisma.personsConnection(args).pageInfo(),
            edges: prisma.personsConnection(args).edges(),
            aggregate: prisma.personsConnection(args).aggregate()
        }
        return newReturn
    }
  }

You should get accurate aggregates


Topic reading limitation regarding login

Hello,
Is it possible to limit the read of some topic regarding some specific login ?

Closing due to no activity, feel free to reopen with more details

Hello,
I have a complementary question about filtering.
Is it possible to filter topic name with regex but regarding specific cluster.
A explain, for example I have a topic with the same name on two clusters and I want to give access to a user only on one cluster.
Regards
Alain

will need some code that is not so trivial.
For now acl are only by groups & for all cluster.
If you have same topic name for both cluster (that seems to be common case), KafkaHQ will need a huge enhancement on that part (since we need to add acls for a cluster that is not really done and seems to be a long task as I see)


Track Expense - Transaction created in OldDot appears in NewDot after chat revisit

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Version Number: v9.0.73-1
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5316310&group_by=cases:section_id&group_order=asc&group_id=309130
Issue reported by: Applause Internal Team
Action Performed:

Sign in ND and OD.
In OldDot - Create an unreported transaction
In ND, observe the self-DM.

Expected Result:
Created expenses should immediately appear in the self-DM.
Actual Result:
Transaction created in OldDot appears in NewDot after chat revisit
Workaround:
Unknown
Platforms:

[ ] Android: Standalone
[ ] Android: HybridApp
[x] Android: mWeb Chrome
[ ] iOS: Standalone
[ ] iOS: HybridApp
[ ] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

Screenshots/Videos
https://github.com/user-attachments/assets/34933763-83f7-4143-bc08-23bb751b9927
View all open jobs on GitHub

I can reproduce repeatedly but this is such a polish to me when switching between the platforms I don't think we need to address it now


Request built-in status bar panel

Description
At present, the main functions of Hyprland are quite user-friendly, balancing aesthetics and convenience very well. But there is no built-in status bar, instead software like Waybar is used to provide relevant functions. On the one hand, configuring waybar software is quite troublesome and not aesthetically pleasing (even after configuration), with relatively few functions. So I hope to have a built-in status bar that matches Hyprland, similar to the kde panel.

And how exactly do you imagine such a status bar in hyprland would be configured?

I'd also like to add that personally, Hyprland doesnt need an integrated status bar. There are many options already out there, from the already mentioned waybar, over EWW with its own configuration format, to AGS, which is configured in JavaScript ( Or Typescript, if you use a TS preprocessor ). If you still want a solution that is more tightly integrated with Hyprland, and you know C++, you can also write a plugin for Hyprland.

Won't be implemented, as there already are a plethora of bars. You can find more, aside from the already-mentioned ones, using GitHub Search https://github.com/search?q=wayland+bar&type=repositories.

If you prefer having everything set up for you, use the nwg-shell package and you'll have a nice-looking psuedo desktop environment running on hyprland in a few minutes (has a panel, bar, app drawer, widgets, etc). I don't use them but I admire the project and follow all the package updates - helpful for learning about gtk.


Fix PumpProbePulses.pulse_mask() for empty or partially empty trains

@bj-s reported an issue with PumpProbePulses.pulse_mask() in a run where all trains are pumped, but every 50th train has no FEL pulses.
The special implementation of pulse_mask() implicitly assumed every train to have at least one FEL and PPL pulse in its implementation. Additionally while fixing this, I noticed it was not included in the fixes in https://github.com/European-XFEL/EXtra/pull/100 regarding handling of trains without pulses.
Extended the tests to cover what previously failed.

Thanks for review!


Azure DNS provider cannot deal with unescaped semicolons

I originally commented on https://github.com/github/octodns/issues/79 but it's probably best to open a new issue.
I'm trying use octodns with Route 53 and Azure DNS.
In Azure, a TXT record with escaped semi-colons yields TWO backslashes via dig.
A TXT record without any escaping yields NO backslashes in the response from dig.
A TXT records surrounded in double quotes ... well, it's just weird, see below.
Unescaped semi-colons:
lsilverman@mgmt-lsilver:~$ dig +short TXT unescaped.trackabout.com @ns1-03.azure-dns.com.
"v=DKIM; k=rsa; p=1234567890"

Escaped semi-colons
lsilverman@mgmt-lsilver:~$ dig +short TXT escaped.trackabout.com @ns1-03.azure-dns.com.
"v=DKIM\\; k=rsa\\; p=1234567890"

Quoted TXT
lsilverman@mgmt-lsilver:~$ dig +short TXT quoted.trackabout.com @ns1-03.azure-dns.com.
"\"v=DKIM; k=rsa; p=1234567890\""

This is causing problems with the sync. Octo is refusing to read the TXT records from Azure due to the missing backslashes. But if I add backslashes, the records are invalid. Catch-22.

In azuredns.py I modified _data_for_TXT thusly:
   def _data_for_TXT(self, azrecord):
        return {'values': [reduce((lambda a, b: a + b), ar.value).replace(';', '\;')
                           for ar in azrecord.txt_records]}

This resulted in a clean preview run. I'm going to test pushing this against a test domain.

No good. The records end up getting saved in Azure DNS with backslashes, and then they come down as double backslashes during the next run.

I'm guessing the fix requires changing the TXT record value just before submitting the change to remove the backslash before the semi-colon. I don't know Python, and I can't spot the right line. Can anyone help? I'm happy to submit a PR if we get this sorted out.

I might also add that Azure now supports CAA records. I'd love to include that improvement, but again, Python...

Hi @silverl - please take a look at this: https://docs.microsoft.com/en-us/azure/dns/dns-faq#does-azure-dns-support-extended-ascii-encoding-8-bit-set-for-txt-recordset-
I think this is what is biting you here. Please review and update.

@subsarma I read the article you recommended, but I don't understand how it applies. Can you please explain what you think is happening?

I believe OctoDNS uses an older version of the Azure DNS API for which the behavior of "" character in TXT record is different than that in the newer version. If you are looking for behavior as documented in RFC 1035, then OctoDNS plugin needs to be updated to the latest version of Azure DNS API.

@h-hwang Would you be able to update the dependencies for the Azure provider?
I gave it the college try. I'm not facile with Python. I forked and checked out the code base and attempted to bootstrap. I was met with dependency issues between botocore and python-dateutil.
I optimistically upgraded botocore to the latest 1.10.4 but received the same bootstrap warnings.
botocore 1.10.4 has requirement python-dateutil<2.7.0,>=2.1, but you'll have python-dateutil 2.7.2 which is incompatible.

Isn't this fixed with #272 ?


K8s Cloud connector for Rabbit hardcodes username/password

Need to support the ability to specify other username/password combinations in addition to virtual host and managment UI settings.  All these values should be managed via Boot autoconfiguration so as to be able to provide an easy way to override with environment variables.

We do not use spring-cloud-kubernetes-connector dependency anymore.


Create Manishak798.json

closes #1881
Checklist for profile addition

[x] Name the PR fix: add <Manishak798>.
[x] You've added file named Manishak798.json in the profiles directory.
[x] You've linked the PR to the correct issue.

Other additions/changes

[x] Changes made in this PR are mentioned below
[x] Search previous suggestions before making a new one, as yours may be a duplicate.
[x] I acknowledge that all my contributions will be made under the project's license.
[x] I've read the contributing guidelines

This PR adds/fixes

Notes

closes issue number 1881


[Switch] Don't function out of the box in React

How to reproduce this bug:

Render 3 radio style switch components in react
Try to click a switch...no animation or movement...click event occurs
In same app place 3 radio style switches in the index.html
Click and they work like they are supposed to
Also, they will toggle with $("#switchID").prop("checked",true/false) in the console
This code does not work when attempted in React, at least for me
Tried to reInit even though switches don't get initialized
I am stumped

What should happen:
radio switches could work on click
What happened instead:
nothing
Browser(s) and Device(s) tested on:
chrome browser chromebook codepen
Foundation Version(s) you are using:
6.4
Test case link:
https://codepen.io/benjaminadk/pen/dRgbEr?editors=1000

CodePen with Foundation 6.3.1, Float Grid and MotionUI

CodePen with Foundation 6.3.1, Float Grid with RTL Direction and MotionUI

CodePen with Foundation 6.3.1, Flexbox grid and MotionUI

CodePen with Foundation 6.4.1, XY Flexbox grid and MotionUI

CodePen with Foundation 6.4.1, XY Flexbox grid with RTL Direction and MotionUI

CodePen with Foundation 6.4.1, XY Flexbox grid with Prototype Mode and MotionUI

CodePen with Foundation 6.4.1, Float Grid and MotionUI

Your pen works fine for me (Firefox 54, Chromium 59, both on Linux).
I can change both sliders values by clicking anywhere on them or by dragging the slider handler, both methods work as expected.

that is because i removed the SWITCHES that didnt work.  sorry i should
have made a copy. my bad.
On Sun, Jul 9, 2017 at 7:45 AM, Arnaud Thomas Desessarts <
<EMAIL_ADDRESS>wrote:

Your pen works fine for me (Firefox 54, Chromium 59, both on Linux).
I can change both sliders values by clicking anywhere on them or by
dragging the slider handler, both methods work as expected.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/zurb/foundation-sites/issues/10378#issuecomment-313924190,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AavonehneIZpI40l97xB0_iWPSXFAla-ks5sMOePgaJpZM4OR5-l
.

Can you provide a pen that reproduces the bug you describe (and only that)?

https://codepen.io/benjaminadk/pen/weQGBR?editors=0010
I have made pen you asked for
Two switch groups
The only things I have done are:

give each switch input unique id
use className in react components

I am not smart enough to figure out what is happening :|
On Mon, Jul 10, 2017 at 12:53 AM, Arnaud Thomas Desessarts <
<EMAIL_ADDRESS>wrote:

Can you provide a pen that reproduces the bug you describe (and only that)?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/zurb/foundation-sites/issues/10378#issuecomment-314032034,
or mute the thread
https://github.com/notifications/unsubscribe-auth/Aavona249toivYdmrIF59T7cDRpr5OItks5sMdiKgaJpZM4OR5-l
.

Your labels are missing the "for" attribute.

YES!  so i did some research and i changed the "for" to "htmlFor" and it
works!  i knew about class => className but had never heard of for =>
htmlFor    https://codepen.io/benjaminadk/pen/weQGBR?editors=0010   thanks
for pointing out the problem, now i can use Foundation switches in react!
On Mon, Jul 10, 2017 at 6:02 PM, Knight-Yoshi<EMAIL_ADDRESS>wrote:

Your labels are missing the "for" attribute.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/zurb/foundation-sites/issues/10378#issuecomment-314292496,
or mute the thread
https://github.com/notifications/unsubscribe-auth/Aavond0qQ47epO3EWODKgejmlMelrk-Hks5sMsmKgaJpZM4OR5-l
.

CHANGE "for" to "htmlFor"


Criteo Audiences (Actions) destination

Proposed changes
Added documentation for the new Criteo Audiences (Actions) destination. (slug: actions-criteo-audiences)
Merge timing
Please review and let us know when it is ready to be published.
We are currently in Beta testing phase and waiting for one of our clients to test the destination.
We want documentation to be published as soon as client testing is done and destination is visible in Segment Catalog.

Reopened as #2729 for editability.


Cg update with oc site

@seanwash - do you want to review any of this or do you trust me 😜

If it's been working for you then it's been working for me.


Initial work on a Razor syntax

Hi,
I did a little work on support for Razor syntax .cshtml files, and thought I'd share it here. It's not perfect, probably one would need to use YAMLMacros to extend the HTML syntax to get it to handle C# code in HTML attributes properly etc., but I believe it is better than not having Razor syntax highlighted at all.

Thanks, I'll check it out. I can also push the two Razors I have if you want to look at them. One is original and the other a port with some tweaks, but neither of them is very good.

I can also push the two Razors I have if you want to look at them.

could be useful, yes please - even if you think they are not very good, there may be something valuable there :)

Okay, both branches are pushed. Be forewarned: they're embarrassingly bad and none of the code was written since the embed keyword existed. 😉 It also turns out that I didn't get very far on the port of https://packagecontrol.io/packages/Razor

Certainly the C# code should get the source scope, but probably not the embedded html in those blocks. Not sure how I missed that, I will take a look when I get chance. Should we also include the @ characters, do you think? it may look odd if we don't?

Sorry for ignoring this so long. Thank you, Keith!


"npm not found" every time terminal opens

Every time I open the terminal nvm doesn't start node automatically, I have to use nvm use everytime I start a terminal session. Example below:

Is this just a normal behavior? I only have node 0.10 installed, why it asks me to use it everytime?

That's by design.
If you want 0.10 always used, you can either do nvm alias default 0.10 or make a ~/.nvmrc file containing "0.10", and it will be automatically used.

@ljharb I think this use be highlighted in the documentation, otherwise people who are new to nvm gets confused, thinking something went wrong with the installation process.

Sure! PRs welcome.


error when use "tf.get_variable_scope().reuse_variables()"

import tensorflow as tf
import tensorflow.contrib.slim as slim
import numpy as np
from scipy.io import loadmat, savemat
import scipy.spatial.distance as ssd
from sbir_sampling import triplet_sampler_asy
from sbir_util import *
from ops import spatial_softmax, reshape_feats
import os, errno
NET_ID = 0 #0 for step3 pre-trained model, 1 for step2 pre-trained model
def attentionNet(inputs, pool_method='sigmoid'):
assert(pool_method in ['sigmoid', 'softmax'])
with slim.arg_scope([slim.conv2d],
activation_fn=tf.nn.relu,
weights_initializer=tf.truncated_normal_initializer(0.0, 0.1),
weights_regularizer=slim.l2_regularizer(0.0005),
trainable=True):
net = slim.conv2d(inputs, 256, [1, 1], padding='SAME', scope='conv1')
if pool_method == 'sigmoid':
net = slim.conv2d(net, 1, [1, 1], activation_fn=tf.nn.sigmoid, scope='conv2')
else:
net = slim.conv2d(net, 1, [1, 1], activation_fn=None, scope='conv2')
net = spatial_softmax(net)
return net
def sketch_a_net_sbir(inputs, trainable):
with slim.arg_scope([slim.conv2d, slim.fully_connected],
activation_fn=tf.nn.relu,
weights_initializer=tf.truncated_normal_initializer(0.0, 0.1),
weights_regularizer=slim.l2_regularizer(0.0005),
trainable=False):
with slim.arg_scope([slim.conv2d], padding='VALID'):
# x = tf.reshape(inputs, shape=[-1, 225, 225, 1])
conv1 = slim.conv2d(inputs, 64, [15, 15], 3, scope='conv1_s1')
conv1 = slim.max_pool2d(conv1, [3, 3], scope='pool1')
conv2 = slim.conv2d(conv1, 128, [5, 5], scope='conv2_s1')
conv2 = slim.max_pool2d(conv2, [3, 3], scope='pool2')
conv3 = slim.conv2d(conv2, 256, [3, 3], padding='SAME', scope='conv3_s1')
conv4 = slim.conv2d(conv3, 256, [3, 3], padding='SAME', scope='conv4_s1')
conv5 = slim.conv2d(conv4, 256, [3, 3], padding='SAME', scope='conv5_s1')  # trainable=trainable
conv5 = slim.max_pool2d(conv5, [3, 3], scope='pool3')
conv5 = slim.flatten(conv5)
fc6 = slim.fully_connected(conv5, 512, trainable=trainable, scope='fc6_s1')
fc7 = slim.fully_connected(fc6, 256, activation_fn=None, trainable=trainable, scope='fc7_sketch')
fc7 = tf.nn.l2_normalize(fc7, dim=1)
return fc7
def sketch_a_net_dssa(inputs, trainable):
with slim.arg_scope([slim.conv2d, slim.fully_connected],
activation_fn=tf.nn.relu,
weights_initializer=tf.truncated_normal_initializer(0.0, 0.1),
weights_regularizer=slim.l2_regularizer(0.0005),
trainable=False):  # when test 'trainable=True', don't forget to change it
with slim.arg_scope([slim.conv2d], padding='VALID'):
# x = tf.reshape(inputs, shape=[-1, 225, 225, 1])
conv1 = slim.conv2d(inputs, 64, [15, 15], 3, scope='conv1_s1')
conv1 = slim.max_pool2d(conv1, [3, 3], scope='pool1')
conv2 = slim.conv2d(conv1, 128, [5, 5], scope='conv2_s1')
conv2 = slim.max_pool2d(conv2, [3, 3], scope='pool2')
conv3 = slim.conv2d(conv2, 256, [3, 3], padding='SAME', scope='conv3_s1')
conv4 = slim.conv2d(conv3, 256, [3, 3], padding='SAME', scope='conv4_s1')
conv5 = slim.conv2d(conv4, 256, [3, 3], padding='SAME', trainable=trainable, scope='conv5_s1')
conv5 = slim.max_pool2d(conv5, [3, 3], scope='pool3')
# residual attention
att_mask = attentionNet(conv5, 'softmax')
att_map = tf.multiply(conv5, att_mask)
att_f = tf.add(conv5, att_map)
attended_map = tf.reduce_sum(att_f, reduction_indices=[1, 2])
attended_map = tf.nn.l2_normalize(attended_map, dim=1)
att_f = slim.flatten(att_f)
fc6 = slim.fully_connected(att_f, 512, trainable=trainable, scope='fc6_s1')
fc7 = slim.fully_connected(fc6, 256, activation_fn=None, trainable=trainable, scope='fc7_sketch')
fc7 = tf.nn.l2_normalize(fc7, dim=1)
# coarse-fine fusion
final_feature_map = tf.concat(1, [fc7, attended_map])
return final_feature_map
def init_variables(model_file='/home/soe/PycharmProjects/Deep_SBIR_tf-master/model/sketchnet_init.npy'):
if NET_ID==0:
pretrained_paras = ['conv1_s1', 'conv2_s1', 'conv3_s1', 'conv4_s1', 'conv5_s1', 'fc6_s1', 'fc7_sketch']
else:
pretrained_paras = ['conv1_s1', 'conv2_s1', 'conv3_s1', 'conv4_s1', 'conv5_s1', 'fc6_s1']
d = np.load(model_file).item()
init_ops = []  # a list of operations
for var in tf.global_variables():
for w_name in pretrained_paras:
if w_name in var.name:
print('Initialise var %s with weight %s' % (var.name, w_name))
try:
if 'weights' in var.name:
# using assign(src, dst) to assign the weights of pre-trained model to current network
# init_ops.append(var.assign(d[w_name+'/weights:0']))
init_ops.append(var.assign(d[w_name]['weights']))
elif 'biases' in var.name:
# init_ops.append(var.assign(d[w_name+'/biases:0']))
init_ops.append(var.assign(d[w_name]['biases']))
except KeyError:
if 'weights' in var.name:
# using assign(src, dst) to assign the weights of pre-trained model to current network
init_ops.append(var.assign(d[w_name+'/weights:0']))
# init_ops.append(var.assign(d[w_name]['weights']))
elif 'biases' in var.name:
init_ops.append(var.assign(d[w_name+'/biases:0']))
# init_ops.append(var.assign(d[w_name]['biases']))
except:
if 'weights' in var.name:
# using assign(src, dst) to assign the weights of pre-trained model to current network
init_ops.append(var.assign(d[w_name][0]))
# init_ops.append(var.assign(d[w_name]['weights']))
elif 'biases' in var.name:
init_ops.append(var.assign(d[w_name][1]))
# init_ops.append(var.assign(d[w_name]['biases']))
return init_ops
def compute_euclidean_distance(x, y):
"""
Computes the euclidean distance between two tensorflow variables
"""
d = tf.square(tf.sub(x, y))
d = tf.sqrt(tf.reduce_sum(d))  # What about the axis ???
return d

def square_distance(x, y):
return tf.reduce_sum(tf.square(x - y), axis=1)
def compute_triplet_loss(anchor_feature, positive_feature, negative_feature, margin):
with tf.name_scope("triplet_loss"):
d_p_squared = square_distance(anchor_feature, positive_feature)
d_n_squared = square_distance(anchor_feature, negative_feature)
loss = tf.maximum(0., d_p_squared - d_n_squared + margin)
return tf.reduce_mean(loss), tf.reduce_mean(d_p_squared), tf.reduce_mean(d_n_squared)
def main(subset, sketch_dir, image_dir, sketch_dir_te, image_dir_te, triplet_path, mean, hard_ratio, batch_size, phase, phase_te, net_model):
ITERATIONS = 20000
VALIDATION_TEST = 200
perc_train = 0.9
MARGIN = 0.3
SAVE_STEP = 200
model_path = "/home/soe/PycharmProjects/Deep_SBIR_tf-master/model/%s/%s/" % (subset, net_model)
#pre_trained_model = '/home/soe/PycharmProjects/Deep_SBIR_tf-master/model/sketchnet_init.npy'
pre_step = 0
if not os.path.exists(model_path):
    os.makedirs(model_path)

# Siamease place holders
train_anchor_data = tf.placeholder(tf.float32, shape=(None, 225, 225, 1), name="anchor")
train_positive_data = tf.placeholder(tf.float32, shape=(None, 225, 225, 1), name="positive")
train_negative_data = tf.placeholder(tf.float32, shape=(None, 225, 225, 1), name="negative")

# Creating the architecturek
if net_model == 'deep_sbir':
    train_anchor = sketch_a_net_sbir(tf.cast(train_anchor_data, tf.float32) - mean, True)
    tf.get_variable_scope().reuse_variables()
    train_positive = sketch_a_net_sbir(tf.cast(train_positive_data, tf.float32) - mean, True)
    train_negative = sketch_a_net_sbir(tf.cast(train_negative_data, tf.float32) - mean, True)
elif net_model == 'DSSA':
    train_anchor = sketch_a_net_dssa(tf.cast(train_anchor_data, tf.float32) - mean, True)
    tf.get_variable_scope().reuse_variables()
    train_positive = sketch_a_net_dssa(tf.cast(train_positive_data, tf.float32) - mean, True)
    train_negative = sketch_a_net_dssa(tf.cast(train_negative_data, tf.float32) - mean, True)
else:
    print 'Please define the net_model'

init_ops = init_variables()
loss, positives, negatives = compute_triplet_loss(train_anchor, train_positive, train_negative, MARGIN)

# Defining training parameters
batch = tf.Variable(0)
learning_rate = 0.001
data_sampler = triplet_sampler_asy.TripletSamplingLayer()
data_sampler_te = triplet_sampler_asy.TripletSamplingLayer()
data_sampler.setup(sketch_dir, image_dir, triplet_path, mean, hard_ratio, batch_size, phase)
data_sampler_te.setup(sketch_dir_te, image_dir_te, triplet_path, mean, hard_ratio, batch_size, phase_te)
optimizer = tf.train.MomentumOptimizer(momentum=0.9, learning_rate=learning_rate).minimize(loss,
                                                                                global_step=batch)
#validation_prediction = tf.nn.softmax(lenet_validation)
# saver = tf.train.Saver(max_to_keep=5)
dst_path = '/home/soe/PycharmProjects/Deep_SBIR_tf-master/log'
model_id = '%s_%s_log.txt' % (subset, net_model)
filename = dst_path+'/'+model_id
# f = open(filename, 'a')
# Training
with tf.Session() as session:

    session.run(tf.global_variables_initializer())
    session.run(init_ops)
    for step in range(ITERATIONS):
        f = open(filename, 'a')
        batch_anchor, batch_positive, batch_negative = data_sampler.get_next_batch()

        feed_dict = {train_anchor_data: batch_anchor,
                     train_positive_data: batch_positive,
                     train_negative_data: batch_negative
                     }
        _, l = session.run([optimizer, loss], feed_dict=feed_dict)
        # save_path = saver.save(session, model_path, global_step=step)
        print("Iter %d: Loss Train %f" % (step+pre_step, l))
        f.write("Iter "+str(step+pre_step) + ": Loss Train: " + str(l))
        f.write("\n")
        # train_writer.add_summary(summary, step)

        if step % SAVE_STEP == 0:
            str_temp = '%smodel-iter%d.npy' % (model_path, step+pre_step)
            save_dict = {var.name: var.eval(session) for var in tf.global_variables()}
            np.save(str_temp, save_dict)

        if step % VALIDATION_TEST == 0:
            batch_anchor, batch_positive, batch_negative = data_sampler_te.get_next_batch()

            feed_dict = {train_anchor_data: batch_anchor,
                         train_positive_data: batch_positive,
                         train_negative_data: batch_negative
                         }

            lv = session.run([loss], feed_dict=feed_dict)
            # test_writer.add_summary(summary, step)
            print("Loss Validation {0}".format(lv))
            f.write("Loss Validation: " + str(lv))
            f.write("\n")
        f.close()

if name == 'main':
# 'deep_sbir'(the model of cvpr16) or 'DSSA'(the model of iccv17)
net_model = 'deep_sbir'
subset = 'shoes'
mean = 250.42
hard_ratio = 0.75
batch_size = 128
phase = 'TRAIN'
phase_te = 'TEST'
base_path = './data'
sketch_dir = '%s/%s/%s_sketch_db_%s.mat' % (base_path, subset, subset, phase.lower())
image_dir = '%s/%s/%s_edge_db_%s.mat' % (base_path, subset, subset, phase.lower())
triplet_path = '%s/%s/%s_annotation.json' % (base_path, subset, subset) # pseudo annotations for handbags
sketch_dir_te = '%s/%s/%s_sketch_db_%s.mat' % (base_path, subset, subset, phase_te.lower())
image_dir_te = '%s/%s/%s_edge_db_%s.mat' % (base_path, subset, subset, phase_te.lower())
main(subset, sketch_dir, image_dir, sketch_dir_te, image_dir_te, triplet_path, mean, hard_ratio, batch_size, phase, phase_te, net_model)

This is my code used above, in the # creating the architecture part, the code "tf.get_variable_scope().reuse_variables()" cause an error report :
Variable fc6_s1/weights/Momentum/ does not exist, or was not created with tf.get_variable(). Did you mean to set reuse=tf.AUTO_REUSE in VarScope?
I read some issues about reuse and I know the problem is the sentence trying to use some variable not created. But I am a very bigginer of tensorflow, so I don't know how  to fix this code. If any people can help me, thank you very much !

@lukaszkaiser

I think this is working as intended, the problem is figured out so looks solved. Thanks for reporting @LittleFlyFish !

Thank you for your reply, I just read your other comments and think of a
way to solve it. 😆
On Fri, Aug 17, 2018 at 6:40 PM, Lukasz Kaiser<EMAIL_ADDRESS>wrote:

Closed #21657 https://github.com/tensorflow/tensorflow/issues/21657.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tensorflow/tensorflow/issues/21657#event-1795197914,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AY46UibImboTpvVLpdGai2k6Jmw6-mBQks5uRwAagaJpZM4V_0uB
.


Replace SignIn with RefreshSignIn in UI

Manage actions lose cookie info (persistent/external login claim) when they call SignInAsync instead of RefreshSignIn

See https://github.com/aspnet/Identity/pull/1615#issuecomment-363236876
cc @HaoK

Cool, are you planning on fixing this @jbagga ?

I'll let it be triaged first. @Eilon

Yeah seems like a good idea.

Assigning cost: S as I expect to wrap this up within a day or two.


Added support for explicit choice of text_key when converting from SPSS.

This PR resolves #275.
Updated usage follows.
This will convert SPSS labels under the default text key "main":
meta_r, data_r = read_spss(
    path_sav,
    ioLocale=None)

This will convert SPSS labels under the text_key "en-GB":
meta_r, data_r = read_spss(
    path_sav,
    ioLocale=None,
    text_key='en-GB')

This PR resolves #275.


[特别任务] 拆分学习 Layer-wise LDP（LLDP）算法实现... (#766)

Type of change

[x] Add a new tool/primitive/application with a new markdown page (Thank you! Also, please tell us more about this awesome thing!)

Description

This commit includes the unfinished implementation of #766

I have read the CLA Document and I hereby sign the CLA


Update go version to 1.20

Description

Bump Go version to 1.20
Use ubi9 as base image (already tested in other services)

Type of change

Bump-up dependent library (no changes in the code)

Testing steps
CI
Checklist

[ ] make before_commit passes
[ ] updated documentation wherever necessary
[ ] added or modified tests if necessary
[ ] updated schemas and validators in insights-data-schemas in case of input/output change

Yes please, revert the ubi8 changes in docker file.


Allow for more than one jar on project bootclasspath

It's possible for there to be more than one jar in the configuration's
bootclasspath (ie, when building projects for specific ROMs). Also,
fix comment to indicate where the bootclasspath actually gets added
(git blame shows that it switched from being prepended to being
appended intentionally).

Since #129 changed the implementation to leverage the unit testing support in version 1.1.0 of the Android Gradle plugin, I don't think this is needed any longer. Please re-open if I'm mistaken.


Following the instructions leaves me with an empty container

Hello all,
I'm attempting to follow the instructions in the README. However, if I mount vaultfs on a docker container, it's as though the container is empty. (This is on centos 7.) Have I misunderstood something about usage, or is this a driver bug?
# docker run -d -p 8200:8200 -e 'VAULT_DEV_LISTEN_ADDRESS=<IP_ADDRESS>:8200' --name=dev-vault vault
# vaultfs docker -t db802500-0b77-bf18-4b9c-4fd6aee42e4a secret --address http://localhost:8200
# docker run --volume vaultfs:/test centos:7 /bin/bash
docker: Error response from daemon: Container command '/bin/bash' not found or does not exist..

Digging into Docker logs, I found:
Jul 27 20:52:39 m0060480.lab.ppops.net docker[4190]: time="2016-07-27T20:52:39Z" level=error msg="containerd: start container" error="oci runtime error: could not synchronise with container process: stat /run/docker/libcontainerd/5b7a7ffd9088905cabb5e0d02021e27e2c96d6869ddc5e2fea110269e51c7833/secret/vaultfs: no such file or directory" id=5b7a7ffd9088905cabb5e0d02021e27e2c96d6869ddc5e2fea110269e51c7833


[Feature] Smallest larger subspace/largest smaller subspace

If we have a set of states, we may want to know what is the smallest subspace that these states can be embedded into. Similarly, we may want to know some largest subspace that is contained in this set.

This is partially implemented now with VertexSet.enclosing_subspace, but we don't have the smaller subspaces yet.

Now also supports VertexSet.enclosed_subspace. Maybe we will want to add this also for colored sets in the future, but I'm closing the issue for now. We can make a new issue for that once it becomes relevant.


Where to replace code blocks with custom JavaScript

Given a function createCodeSnippetComponent that transforms a snippet of source code into a JavaScript function representing a React component that renders that code, how and where would I hook into the pipeline to swap the node?
Specifically, if the createCodeSnippetComponent returns a string representation of the React component, where might I be able to replace the whole fenced code block with an MDX element representing that code?

https://github.com/wooorm/xdm#components

Hi @ChristianMurphy, I'm not sure how I'd be able to achieve my goal with runtime components. I'm hoping to make the swap at compile time so that the resulting MDX component has substituted the whole code block with what I've compiled.
It does raise the question though of how this would behave at runtime. The simple approach would mean that components so-produced wouldn't respect any  overrides.

I'm not sure how I'd be able to achieve my goal with runtime components. I'm hoping to make the swap at compile time so that the resulting MDX component has substituted the whole code block with what I've compiled.

It sounds like what you're really after is https://reactjs.org/blog/2020/12/21/data-fetching-with-react-server-components.html :slightly_smiling_face:
But until then you could use a https://github.com/wooorm/xdm#optionsrehypeplugins (maybe, though less likely https://github.com/wooorm/xdm#optionsremarkplugins) to swap the rehype node for what you want.
https://unifiedjs.com/learn offers an intro to writing plugins, and https://github.com/rehypejs/rehype-highlight offers an example of what it could look like (or could be used directly)

Hi @ChristianMurphy, I don't think that this is a use-case for RSC; I specifically want to do this ahead of time so that there is almost no cost at runtime (whether server or client rendered). This question is about using xdm's compile() API.
I'm aware of the fact that there are a number of different ASTs involved and have read the docs on the pipeline. What I'm struggling to figure out is which AST, and therefore type of plugin, I should be looking at. Once I find the right AST, I'm comfortable building a plugin but wouldn't know where to start to figure out the shape of the new JavaScript node to produce so that the rest of the XDM pipeline is unaffected.
In other words, what I think I want to do is swap out a pre>code node in one of the intermediate AST's and replace it with the code of a React component. I do not want the code that I inject to get highlighted; it is the highlighting code.

It sounds like something very interesting, but it also sounds like you have some more knowledge on what you're steering for? Do you have some background info on why none of the existing rehype plugins are suitable?

I am doing some code generation of React components that I hope to use both from the context of .mdx? code blocks and special import syntax. Having two distinct code formatting pipelines will result in unnecessary bytes being shipped to the browser and will likely make aligning behaviour and styling very challenging.
You can see a demonstration of the generated code, highlighting the code that generated the code here: https://plnkr.co/edit/MTxvFaFkw5dpJ3eb?open=Code.js&preview.

It just occurred to me that I can probably regex replace the code blocks before handing the off to xdm.

You seem to want to sort of pre-evaluate javascript? If so, there’s also recmaPlugins as an option, which work similar to remark/rehype/etc, but on a javascript syntax tree (https://github.com/syntax-tree/esast). Where you’re given something close to: https://astexplorer.net/#/gist/14cebe29b6ca9ee829aa9563c4906568/20db73a0f0ccec56e50404414cb439dc785716f8.
This is similar to building Babel plugins, but there’s no need to learn an API: it’s a json syntax tree.
If you’re going to precompile content, an alternative is to use HTML, which gzips well, and could also be injected?

I hope to use both from the context of .mdx? code blocks and special import syntax

As in, they both used in the content, and they are exported? If they are exported, how would they be named?

It just occurred to me that I can probably regex replace the code blocks before handing the off to xdm.

How would that work?

I do believe @ChristianMurphy is right that React Server Components could help here. In that demo there was some pretty smart stuff of what data went down the wire, which might make this pre-evaluate thing superfluous?

I don't think that RSC are a panacea for doing work like this. The syntax highlighting provided by libraries like shiki do quite a bit of work. Notably, then need to spin up a WASM module, compile the textmate syntax definition and use that to tokenize the actual code. Doing this in a RSC would mean delivering very minimal bytes to the browser at the expense of repeated, redundant and expensive work on the server side. It also means adopting an experimental build of React that has strong opinions on the server side. I believe that doing the expensive work once, at build time and working to deliver the minimal bytes to the browser is a better set of trade-offs.
While I have a working approach that compiles to hast, it is missing a key element that I'm looking for: the ability to select which lines to render and which ranges to emphasize at runtime. Line selection is less relevant to code blocks since you'd typically render every line in the code block. However, having a single implementation for all code snippets seems worth it. Line emphasis would be triggered by extra meta information in the code block meta.

@ggoodman I agree RCS is not a panacea.
However, I do think it solves your specific use case, it supports both server side and client side caching. What you are describing is a server side cache.
It can in addition mix in some dynamic runtime elements with the static content.

it is missing a key element that I'm looking for: the ability to select which lines to render and which ranges to emphasize at runtime

There are a few approaches you could take.
As noted above, it still sounds like React Server Components would be a good fit.
An alternative would be to inject react elements for each line, and update them using some shared state (likely Context)
Another alternative. you could reach in using ref or dom selectors, and modify the content on the client directly.

Line emphasis would be triggered by extra meta information in the code block meta.

:raised_eyebrow: code block metadata (in the markdown/mdx sense) is static, so why would this need to be dynamic/runtime?

I think at this point we've strayed a bit from the issue at hand. I feel like there is a bunch of context that will be hard for me to share about why I'm hoping to hook into xdm as described. While it's fun discussing alternative approaches, it will be hard for these to make sense for my use-case without spending quite a bit of time sharing the context in which I'm working.
Would there be any ways to get a sort of functional equivalent to a regex replace of code blocks before passing the source through the acorn parse?

I posted a suggestion before, using recma/esast: https://github.com/wooorm/xdm/issues/9#issuecomment-779638239, and some other ideas.

While it's fun discussing alternative approaches

I’m not asking questions because it’s my idea of fun; I do find asking questions the best way to figure out what context you have. Context is important.

Would there be any ways to get a sort of functional [...] before passing the source through the acorn parse?

Why should this happen before acorn parse? acorn parsing is the very first thing that happens (at the same time markdown is parsed)

I feel like there is a bunch of context that will be hard for me to share about why I'm hoping to hook into xdm as described. While it's fun discussing alternative approaches, it will be hard for these to make sense for my use-case without spending quite a bit of time sharing the context in which I'm working.

Context is important for answering a question, especially when the missing context prevents you from using standard technologies and approaches.
On top of that, the nestled implications that you don't have time to explain your problem and that your time is more valuable, and that we should guess the right answer by reading between the lines in vague comments is not appreciated.
Your original question was answered in https://github.com/wooorm/xdm/issues/9#issuecomment-779420982.
If you have follow on questions take the time to properly explain them.

On top of that, the nestled implications that you don't have time to explain your problem and yet, that we have the time guess the right answer by reading between the lines in vague comments, are not appreciated.

Thanks for calling that out. You two have both been engaging in good faith and I appreciate the dialogue. I will come back with a better explanation of the context. Perhaps with that, we'll be able to come to the best solution across the board and maybe all learn something in the process.

<3

For a project I'm working on (Nostaglie), I plan to be writing several tutorials on how to interact with the framework and its features. Nostalgie is a next.js-like framework that takes a user's code as input and produces a distributable node server that has some novel data fetching / routing / SSR integrations. Part of the philosophy is that the resulting server should follow best performance practices so that SSR is as efficient as possible. A few strategies are currently in place to help make SSR efficient:

SSR happens in a different thread / process as the http.Server so that the blocking, synchronous work of ReactDOMServer.renderToString() is not affecting the server's ability to handle incoming requests in a timely manner. A consequence of this is that since SSR happens in a pool of workers, it is non-trivial to share state between these workers (especially if this state is non-serializable).
SSR is given a time budget for async work, like data fetching. The initial ReactDOMServer.renderToString() will always happen, but subsequent renders may or may not happen, depending on how quickly any async work completes.
Any work that can reasonably be done at compile-time is pre-computed so that runtime renders have as little remaining work to do. The thinking is that the one-time cost of pre-compilation would be amortized over many many requests.

On the subject of the tutorials, it occurred to me that a really nice way to do this would be to create several example apps that demonstrate what I'm trying to teach in the tutorial. I plan to make those examples serve an additional purpose though; to act as the source of source code snippets embedded in the tutorials. In that way, the examples remain the source of truth. I can test the examples and since I'm just pulling their code at build-time, I wouldn't risk copy/paste errors or worse, sharing invalid / broken code in the tutorials.
With that idea in mind, I thought that it would be interesting to be able to import whole source files as syntax-highlighted components. The same component could be used with different props to present different ranges of the underlying source file. To achieve this, I figure that during client-side render (CSR) or server-side render (SSR), I would need some abstract representation of the lines of these source files. That abstract representation should be as small as possible but contain enough information to add the actual syntax highlighting when rendered.
My solution to this was to precompile the source files into a 2d array of (token + coloring) information (2d because its an array of lines of arrays of tokens). At runtime, a function that could be shared by all instances of the snippet highlighter could take the abstract representation and return a React component. The React component would accept props for selecting the range to present and, optionally, ranges therein to emphasize.
I knew that since Nostalgie is a bundler / compiler at its heart, it would be simple to introduce a new import specifier syntax to import this sort of React component. However, it remains uncertain for me how to align this design with .md and .mdx files. In such files, code blocks have no underlying file so maybe their contents could be treated as a virtual file. I thought that since I already had the infrastructure in place to produce JavaScript code to represent a syntax-highlighted snippet, I could inject that into the xdm pipeline that is already designed to handle JavaScript.

Taking a step back, leaving mdx and md out of the picture for a moment.
How would Nostalgie handle this style of syntax highlighting with a plain JS file?

code blocks have no underlying file so maybe their contents could be treated as a virtual file

Could you expand on what you mean by this?
xdm.compile returns a vFile by default, could that be used in Nostalgie? Or is it looking for something more specific?

@ggoodman a lot to think about, thanks, so more later.
My first idea is also, somewhat similar to Christian is thinking, that this might be a thing for JS in general, and not specific to md/mdx. Could this be done by generating a js file (possible virtually) that represents a component?

I've mostly hacked it together using the regex replace but in running it over my changelog (where code blocks are often indented under list items) is missing those instances. I've picked up a regex that is designed to avoid capturing indented code blocks since these, in theory should not be escaped under normal circumstances. I guess this part of MDX must be contextual on the current level of indentation... something that a regex will likely always fail at.
Anyway, notwithstanding that hiccup, here is an impression of what it looks like:

As you can see, there are a few (totally arbitrary) lines that have been highlighted. The relevant code to trigger this looks like:
```tsx emphasize:2-5
export interface ClientAuthAuthenticated {
  isAuthenticated: true;
  credentials: {
    audience?: string;
    claims: IdTokenClaims;
    scope: string[];
    user: UserinfoResponse;
    idToken: string;
    accessToken: string;
  };
  loginUrl: string;
  logoutUrl: string;
}
```

The React component to render the pre-compiled token array looks like:
import * as React from 'react';
import type { CreateSnippetDataResult } from './parser';

export function createSnippetComponent(parseResult: CreateSnippetDataResult) {
  return function BoundCodeSnippet(props: Omit<CodeSnippetProps, 'parseResult'>) {
    return <CodeSnippet {...props} parseResult={parseResult} />;
  };
}

export interface CodeSnippetProps {
  parseResult: CreateSnippetDataResult;
  fromLine?: number;
  toLine?: number;
  emphasizeRanges?: Array<[fromLine: number, toLine: number]>;
}

export function CodeSnippet(props: CodeSnippetProps) {
  const { bgColor, fgColor, firstLineOffset, language, tokensByLine } = props.parseResult;
  const fromLine = Math.max(0, (props.fromLine || 1) - 1);
  const toLine = Math.max(fromLine + 1, props.toLine || tokensByLine.length);
  const lineSlice = tokensByLine.slice(fromLine, toLine);
  const firstLineNumber = firstLineOffset + fromLine + 1;
  const emphasizeLines = React.useMemo(
    () =>
      (props.emphasizeRanges || []).reduce((lines, [fromLine, toLine]) => {
        for (let i = fromLine; i <= toLine; i++) {
          lines.add(i);
        }

        return lines;
      }, new Set<number>()),
    [props.emphasizeRanges]
  );

  return (

        {lineSlice.map((line, lineIdx) => {
          const lineNumber = firstLineNumber + lineIdx;

          return (

              {line.map(([value, fgColor], tokenIdx) => {
                return (

                    {value}

                );
              })}
              {lineIdx < lineSlice.length - 1 ? '\n' : null}

          );
        })}

  );
}

I've been able to set things up so that a single instance of the <CodeSnippet> component is present in the front-end and is re-used for each code snippet.

Hmm your previous post seemed to indicate you wanted to get tutorials from an external file, but this one is from markdown?
About the indent: this mdx parser does not allow indented code, so I’m not sure what’s going on there.
How does that replace you’re using look, and where are you doing it?

 Looking at the AST you get in remarkPlugins, it strikes me that I might be able to achieve exactly what I was hoping for with access to injecting a remark plugin before remarkMdx. That way, I'd be able to make strategic substitutions on the MDAST before the mdx magic kicks in.
The alternative, I think, is to use the existing remarkPlugins and inject exactly one mdxjsEsm node for the import of the component (import { CodeSnippet } from 'path/to/runtime/library'). Constructing this and all the estree structures I see in .data.estree seems doable, but unfortunate. Is that needed? Additionally, each pre node whose only child is a code node would be replaced with an mdxJsxFlowElement node. Constructing this seems to be fairly straight forward.
Would you be open to adding the ability to hook into the pipeline before remarkMdx? What do you think of the alternative?

 Looking at the AST you get in remarkPlugins, it strikes me that I might be able to achieve exactly what I was hoping for with access to injecting a remark plugin before remarkMdx. That way, I'd be able to make strategic substitutions on the MDAST before the mdx magic kicks in.

Parsing generally happens all at once.
remark-mdx adds some additional parse types into remark but it still runs as one unit.

The alternative, I think, is to use the existing remarkPlugins and inject exactly one mdxjsEsm node for the import of the component (import { CodeSnippet } from 'path/to/runtime/library').

That is how most things are approach in unified, through updating the AST.

A side note, the work you are doing sounds a lot like a minimal version of https://github.com/pomber/code-surfer (MDX and Gatsby SSR based) and https://github.com/code-hike/codehike (general React version), you may be able to draw code or inspiration from those projects.

It seems that I've been able to make it work via the more verbose, alternative approach. The code is an absolute disaster area of comments and as anys but it works. I've created a couple helpers to create the necessary estree nodes for the import of my component and the passing of the 'parse result' as an attribute to the injected <CodeSnippet> component. 🎉 🎉 🎉
Once I have it cleaned up, I'll circle back with how it hangs together.
Here's a snapshot of the edge-case that was breaking my regex. The regex was failing to account for code blocks nested within multi-paragraph list elements. That this is now highlighted shows that the remark-based plugin seems to work.

The alternative, I think, is to use the existing remarkPlugins and inject exactly one mdxjsEsm node for the import of the component (import { CodeSnippet } from 'path/to/runtime/library'). Constructing this and all the estree structures I see in .data.estree seems doable, but unfortunate. Is that needed? Additionally, each pre node whose only child is a code node would be replaced with an mdxJsxFlowElement node. Constructing this seems to be fairly straight forward.

You are now getting pretty close to my earlier suggestion: make a recma plugin!
I do not suggest a remark plugin, because what you are doing has more to do with JavaScript than markdown

Going to close this as this question seems answered!

For anyone following in my internet footsteps, the code that arose from this discussion can be found here: https://github.com/ggoodman/nostalgie/blob/720d2f5f334ffbaf4201fcf628f6f345af15cc0f/src/worker/mdxCompiler.ts#L76-L160.
Thanks for your help and (especially) patience @wooorm and @ChristianMurphy.

@ggoodman very cool to see the whole, a few of my open questions from the conversion now fall into place. This looks nice!


Both DisplayName and StatisticName are null

As mentioned previously, the DisplayName and StatisticName are returned as null. I tried accessing the value from the Leaderboard Sample too and encountered the same problem for display name. There didn't appear to be a way to access the stat name from the sample. Please see the images below. I may be able to debug this with the Sample since it includes the DLL too :)

I'll debug and get back to you

I can confirm this is a bug.  I'll get a fix for this soon

Thank you Jason :)

Ok, this should be fixed now:
https://github.com/Microsoft/xbox-live-api/commit/add8f2fae3ed890611eed537bc555ade9d630f26
I updated that C++/CX test app to log these values.


[🐛 Bug]: Checking todo's completed in tree fails

VSCode Environment
Version: 1.67.2
Commit: c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5
Date: 2022-05-17T18:20:57.384Z (1 wk ago)
Electron: 17.4.1
Chromium: 98.0.4758.141
Node.js: 16.13.0
V8: <IP_ADDRESS>-electron.0
OS: Darwin x64 21.5.0
Marquee Version
v3.1.1653395108
Workspace Type
Local Workspace
What happened?
Click the check box, nothing happens.

What is your expected behavior?
Checked and updated both in tree and widget.
Relevant Log Output
No response
Code of Conduct

[X] I agree to follow this project's Code of Conduct

Is there an existing issue for this?

[X] I have searched the existing issues

Also clicking edit doesn't do anything

@admc I applied a patch that will ensure that an update event is fired. Unfortunately I was not able to reproduce the issue around not being able to click on the edit context menu. Can you provide some information on how to reproduce it?

Nevermind I can reproduce now for some reason as I was writing an e2e test for it 🙈

@sourishkrout this is what I tried and it works for me even without auto-launch:

well, @christian-bromann, the tree-view will only get populate until after you launch the Marquee dash, no? I think that's what's been called "the bug".

@sourishkrout I think https://github.com/stateful/vscode-marquee/issues/114 will resolve that.


Create api for vehicle status

Checklist

[X] I've read the contribution guidelines.
[X] I've searched other issues and no duplicate issues were found.
[X] I've agreed with the maintainers that I can plan this task.

Description
Hi, currently autoware do not have any api that can monitor the vehicle status, if an user or application want to get the information, they will need to get from different topic.
I suggest to create an api that combine the vehicle status and output into 1 topic.
Purpose
Hi, I'm thinking to port the vehicle status to autoware.
https://github.com/tier4/tier4_ad_api_adaptor/tree/tier4/universe/awapi_awiv_adapter#awapivehiclegetstatus
Here will the layout

position
geo_point
velocity
- target_velocity
acceleration
- target_acceleration
gear
turn_indicators
hazard_lights
door
energy

Possible approaches
The documentation PR
https://github.com/autowarefoundation/autoware-documentation/pull/312
https://autowarefoundation.github.io/autoware-documentation/pr-312/design/autoware-interfaces/ad-api/list/api/vehicle/
Definition of done
An api that combine the vehicle status and output to the user and application is created

For target_velocity and target_acceleration, It might be better to separate these as vehicle command message.
For geo_point, this cannot be provided if the map only has local coordinates.

For target_velocity and target_acceleration, It might be better to separate these as vehicle command message. For geo_point, this cannot be provided if the map only has local coordinates.

Sorry for late reply, I miss the message.
I agree that we should move the target_velocity and target_acceleration to vehicle_command.
We should just put in the current vehicle status data
For the geo_point I think we might able to convert from MGRS to the global longitude and latitude

I created the document for vehicle status
https://autowarefoundation.github.io/autoware-documentation/pr-312/design/autoware-interfaces/ad-api/list/api/vehicle/

For the geo_point I think we might able to convert from MGRS to the global longitude and latitude

According to the lanelet2_extension documentation, Autoware works in a local coordinate system independent of MGRS by setting local_x and local_y.

I'm thinking we also can add the contraint for this vehicle status.
It will be a new api named, /api/vehicle/moving_constraint
which will contains following
float32 max_velocity
float32 min_acceleration
float32 max_jerk
float32 min_jerk

I forgot the API to control doors. I have three suggestions.

array command

message:
  - NONE
  - CLOSE
  - CLOSE
  - NONE

index command

message:
  - { index: 1, command: CLOSE }
  - { index: 2, command: CLOSE }

role command

message:
  - { role: GET_ON, command: CLOSE }


click not binding on slick-next and slick-prev

I am trying to bind a click event on a slick-light box slick-next .
$('.slick-prev').on('click',function(){
})
This works with slick but I am not able to figure out why it is not getting triggered in this case.

For support, ask over at Stack Overflow. Github issue tracker is not a support forum.


Drivers: Add all uart/spi/i2c pin for STML32 F0 MCUs

Configure all uart/spi/i2c pins for STML32 F0 MCUs.

Is it really useful? The file contains definitions for most STM32F0s.
For each line, it will be necessary to check all the declensions. This is very tedious, and can generate errors.
In addition, the other files (like the STM32F4) are not structured like this.

The file contains definitions for most STM32F0s.

These definitions are only valid for 2 STM32F0 variants among the 16 possible variants.

For each line, it will be necessary to check all the declensions.

This is the only way this could work for all SoCs of this series.
Though, to make it easier, you can put all the definitions under a single #ifdef and group by variants instead of grouping per pin..

This is very tedious

Agreed

In addition, the other files (like the STM32F4) are not structured like this.

For other series (like STM32F4), all pins definitions are the same for all the SoC variants. Or at least oll the SoC variants supported by Zephyr (and if it is not the case, it should be corrected).


Missing icons in MaterialCommunityIcons

[x] Review the documentation: https://github.com/oblador/react-native-vector-icons
[x] Search for existing issues (including closed issues): https://github.com/oblador/react-native-vector-icons/issues

Environment
react-native-vector-icons <IP_ADDRESS>

Description
Describe your issue in detail. Include screenshots if needed.
Missing icons
cash-clock
invoice-text-clock
office-building-remove
Is it possible to just import all the icons from @mdi/js into react-native-vector-icons so we don't have keep reporting what icons are missing?

@Rc85 With the next version of RNVI, we will move to more frequent (possibly automated) updates.
I'm going to be aiming for monthly font updates till I have automation in place.
You can test the new version which has updated fonts at #1612


multiple buffers rings terminal bell

labeling any file on the startify screen with t, s, v, etc, rings the terminal bell. Any of these character inputs triggers a bell ring, which has gotten a little annoying after a few hundred times.
The command line message is Batchmode off

I can reproduce that. It just happens for the first entry of each list, right?

It beeps because of 'showmatch' although we set the matchpairs= for the Startify buffer already.
I reported this to Vim: https://github.com/vim/vim/issues/8053
Until it get fixed and for people using older versions, I'll just disable 'showmatch' while toggling batchmode.


Consider replacing MenuItem with Accordion

Nested MenuItems are basically nested Accordions modulo some differences. It would be nice to replace our custom implementation of fc-menuitem with vaadin-accordion (or document what features prevent us from doing so)

I think that fc-menuitem is a better implementation because it allows nested hierarchies and also has a nice animation when opening/closing.
In fact with an empty menu and with this method, it already should be possible to provide an accordion or another component.

I agree.


device.services.getNetworkInterfaces is not a function

device.init().then(() => {
status = 1;
const info = device.services.getNetworkInterfaces();
console.log(JSON.stringify(info));
})
how to get mac info?
error message : device.services.getNetworkInterfaces is not a function

Why can't I get a scope only by using a probe?


Add Flag to Reset the DB on Shutdown.

Pull request to add the flag discussed in #97.
I had to add a reset flag to every DB configuration and change the Reset implementation.
Other approach could be doing the implementation on the Shutdown method, but that would imply to add a new Resetable() bool method to the subsystem interface.
Please let me know your comments.

Thank you so much for the contribution @favalos!
I have one (hopefully) small change to ask.
The shutdown function on the api/aio interfaces are used as a signal to begin a graceful shutdown. The aio method is currently unused, but we do use it on the api side. When this signal is received we stop taking new requests but continue to process any sqes/cqes already in the system until all are complete. As such we can't reset the database via the shutdown function as we still need to write to the database after this function has been called.
You can see the shutdown process here.

shutdown signal received (happens in a go routine and calls api.shutdown+aio.shutdown via system.Shutdown)
system.Loop will return once all outstanding sqes/cqes are complete
api.Stop() called
aio.Stop() called (internally calls Stop for all subsystems)

I recommend moving the call to Reset (if the flag is true) the Stop function, this is when we can safely reset.

Hi @dfarr,
Thanks for the detailed explanation, I did the changes accordingly.
Let me know if that looks fine.

Thank you @favalos for contributing to resonate !!!

Closes #97


Changes variable name from "underline" to "bold"

Sorry - seem to have added a load of commits to this that weren't intended for it! I only meant to add the variable name change to the PR - d'oh!


Enable code signing when testing

Coverage decreased (-1.0%) to 91.215% when pulling a579d24e262e19e1b116a52a4b3713e4cd438e81 on sign-tests into 763f7a478a80f513f271e1097cdf1b8bf5c0ecf2 on master.

Coverage decreased (-1.0%) to 91.215% when pulling a579d24e262e19e1b116a52a4b3713e4cd438e81 on sign-tests into 763f7a478a80f513f271e1097cdf1b8bf5c0ecf2 on master.


Type Errors

Type errors absolutely everywhere, I would suggest either disabling typing for the entire project or fixing the typing issues, I would do this myself but I have other commitments and deadlines to keep to on another project.
Found 204 errors in 46 files.

Errors  Files
     5  node_modules/@flavorly/vanilla-components/dist/components/alert/alert.vue:9
     1  node_modules/@flavorly/vanilla-components/dist/components/button/button.vue:8
    13  node_modules/@flavorly/vanilla-components/dist/components/checkbox/checkbox-group.vue:13
     4  node_modules/@flavorly/vanilla-components/dist/components/checkbox/checkbox.vue:81
     5  node_modules/@flavorly/vanilla-components/dist/components/country-input/country-input-option.vue:5
     4  node_modules/@flavorly/vanilla-components/dist/components/country-input/country-input.vue:151
    20  node_modules/@flavorly/vanilla-components/dist/components/datatable/datatable.vue:41
     2  node_modules/@flavorly/vanilla-components/dist/components/datatable/partials/actions.vue:10
     8  node_modules/@flavorly/vanilla-components/dist/components/datatable/partials/dialog-confirm-action.vue:10
    11  node_modules/@flavorly/vanilla-components/dist/components/datatable/partials/dialog-filters.vue:15
     1  node_modules/@flavorly/vanilla-components/dist/components/datatable/partials/dialog-settings.vue:14
     4  node_modules/@flavorly/vanilla-components/dist/components/datatable/partials/empty-state.vue:7
     1  node_modules/@flavorly/vanilla-components/dist/components/datatable/partials/filter-badge.vue:31
     4  node_modules/@flavorly/vanilla-components/dist/components/datatable/partials/head.vue:8
     4  node_modules/@flavorly/vanilla-components/dist/components/datatable/partials/pagination.vue:8
     3  node_modules/@flavorly/vanilla-components/dist/components/datatable/partials/search-bar.vue:6
     5  node_modules/@flavorly/vanilla-components/dist/components/datatable/partials/selection-bar.vue:52
     3  node_modules/@flavorly/vanilla-components/dist/components/datetime-input/datetime-input.vue:3
     1  node_modules/@flavorly/vanilla-components/dist/components/dialog/dialog.vue:11
     2  node_modules/@flavorly/vanilla-components/dist/components/dropdown/dropdown-menu.vue:16
     3  node_modules/@flavorly/vanilla-components/dist/components/dropdown/dropdown.vue:133
     1  node_modules/@flavorly/vanilla-components/dist/components/forms/form-label.vue:51
     3  node_modules/@flavorly/vanilla-components/dist/components/input-group/input-group.vue:132
     9  node_modules/@flavorly/vanilla-components/dist/components/input/input.vue:11
     1  node_modules/@flavorly/vanilla-components/dist/components/misc/transitionable.vue:34
     6  node_modules/@flavorly/vanilla-components/dist/components/phone-input/phone-input.vue:4
     1  node_modules/@flavorly/vanilla-components/dist/components/rich-radio-option/rich-radio-option.vue:71
     5  node_modules/@flavorly/vanilla-components/dist/components/rich-radio/rich-radio.vue:13
     1  node_modules/@flavorly/vanilla-components/dist/components/rich-select-option-image/rich-select-option-image.vue:6
     1  node_modules/@flavorly/vanilla-components/dist/components/rich-select-option-indicator/rich-select-option-indicator.vue:7
     1  node_modules/@flavorly/vanilla-components/dist/components/rich-select/partials/clear-button.vue:3
     1  node_modules/@flavorly/vanilla-components/dist/components/rich-select/partials/option-list.vue:9
     2  node_modules/@flavorly/vanilla-components/dist/components/rich-select/partials/option.vue:8
     2  node_modules/@flavorly/vanilla-components/dist/components/rich-select/partials/search.vue:44
     1  node_modules/@flavorly/vanilla-components/dist/components/rich-select/partials/state.vue:7
     2  node_modules/@flavorly/vanilla-components/dist/components/rich-select/partials/trigger-tags-tag.vue:7
     2  node_modules/@flavorly/vanilla-components/dist/components/rich-select/partials/trigger.vue:10
     7  node_modules/@flavorly/vanilla-components/dist/components/rich-select/rich-select.vue:7
     1  node_modules/@flavorly/vanilla-components/dist/components/select/select.vue:104
     1  node_modules/@flavorly/vanilla-components/dist/components/skeleton/skeleton.vue:43
    13  node_modules/@flavorly/vanilla-components/dist/components/slideover/slideover.vue:15
    12  node_modules/@flavorly/vanilla-components/dist/components/tags-input/tags-input.vue:9
     9  node_modules/@flavorly/vanilla-components/dist/components/textarea/textarea.vue:11
     8  node_modules/@flavorly/vanilla-components/dist/components/toggle/toggle-group.vue:13
     9  node_modules/@flavorly/vanilla-components/dist/components/toggle/toggle.vue:9
     1  node_modules/@flavorly/vanilla-components/dist/core/config/popper-options.ts:16
ERROR: "type-check" exited with 2.

Hello, thanks for your concern, most of the type errors come from 1 definition that is pending to be fixed, we will do a major refactor to the library core soon so ill close this for now, as types are only intended for local dev for the moment.


docs: update create command

npm init svelte@next my-app has been changed to npm create svelte@latest my-app.
Reference: https://kit.svelte.dev/

@oekazuma great catch, thanks for this!


CROWBAR_EXPERIMENTAL is not longer needed for Cloud6

I would just keep it. We could have experimental features again and then we would have to add it again.


Added support for the 'sendMode' feature

added in documentation version 1.4 but not configurable in the PHP library.
sendMode is a great (and probably the only) way at the moment to simulate a 'sandbox' to message sending in message media.
It benefits a developer to be able to control this flag to simulate sending SMS.
However, there's no available way in this library to use this feature apart from hacking the MMSoap.php which is not ideal. (MMSoap is suppose to sit in the vendor folder un-touched)
Therefore I would like to make this variable as a parameter in sendMessages.
Also helped with some formatting into psr-2 standards.

Looks good. I like it.
Thanks for all clean-ups.

Looks good.


minimal sample stopped working

hello!
here is video of minimal setup of that perfect plugin, which stopped working  ( i think after updating it today ):
https://user-images.githubusercontent.com/21224705/132539461-0f140b62-4705-47b2-a85c-249791556d3b.mp4
basically it looks like cb is never called for some reason 🤔
any ideas on that?

Hi! Yes this was due to an error I made yday when doing some refactoring https://github.com/williamboman/nvim-lsp-installer/commit/77ee79632a0a6ce885246c15cd0cd1e8c0b889fc. Should be fixed in the latest version!