Fix for IAR project

Added some missing references in the IAR platform. Also increased the flash size in the CppuTestTest project as I got an out of memory error from the linker. Now running fine on EWARM <IP_ADDRESS>51.

Coverage remained the same at 99.875% when pulling 7bb69ef0d0942c270aeb7d6a8f6896caffd1d36a on dangu:dev/IAR_fix into b801207a6506ffd6880d74bc410e09c220cc752d on cpputest:master.


Add option to ignore task_state_time events

Add command-line option to ignore mesos_slave_task_state_time events, whose frequency is too much for some prometheus instances.
Fixes #5

@lloesche any chance to get this one merged? It will solve a stability issue faced by multiple users.

Hi @StephanErb and @jonashaag,
sorry this project hasn't seen any love from my side. I only very sporadically get to work on it.
I've invited you two and Johannes (@discordianfish) as collaborators with merge and push rights.
Johannes used to work at Mesosphere and he and another fellow coworker Tomás wrote the original exporter. I don't even know if he still uses it.
@discordianfish if not feel free to reject the collaborator invite. Same for you Jonas and Stephan, if you're not comfortable or don't want the collaborator rights for whatever reason feel free to reject the invite.
This is just my attempt of taking myself as a bottleneck out of the equation. I hope it will help get PRs merged faster and you the users more involved. That's the idea of open source isn't it? I love Prometheus just unfortunately don't get to work with it as much as I'd like to.
If you have any questions, concerns, anything email me<EMAIL_ADDRESS>or you can also message me directly on the Apache Mesos Slack chat (mesos.slack.com) @lukas.

@discordianfish Would you be willing to review my merge requests?

Rebased

LGTM, but I can't tell anything about how fitting all this is in a Mesos world. Not using that anymore :)
@lloesche You have no prometheus + mesos users at hand who would be better to review those things?
Docker adds native metrics and CoreOS even opened a Prometheus team, so I think Mesosphere should spend some resources here as well ;)

@lloesche bump

I have tested this patch by pointing it to the leading master of a real Mesos 1.x cluster and it worked like expected. I have used the following command lines for testing:
./mesos_exporter -master="http://mesosmaster1.example.org:5050" -addr=<IP_ADDRESS>:9091 -ignoreCompletedFrameworkTasks

./mesos_exporter -master="http://mesosmaster1.example.org:5050" -addr=<IP_ADDRESS>:9091


Improvements/bug fixes release strategy

Hey @shadcn thanks so much for building this library it's awesome!
I've been using various components for a little while and am happy to see yesterday's release - congrats 🎉.
The new release has raised some interesting questions around versioning, bug fixes, improvements and overall depending on this library. I understand why you've chosen to not publish this as an npm package (for now) and I really like this approach as it gives me the flexibility to enhance the components as I see fit.
With that said, what is the recommended strategy to pull in improvements/fixes as a project depending on various components? Or is there a way to at least know that components have been updated / fixed (I'm thinking of versioning here)?
I'd love to hear your thoughts on this 😄

@mattphillips Thanks for the ping on this.
To be honest, my original plan for these components was to provide more of a starting point or template rather than a full-blown library. Meaning you use it as a base to build your own and the code is pretty much yours after initialization.
However, with this project gaining traction, I'm revisiting my approach a bit.
I'm now looking into a solution for supporting updates either via documentation or using codemods.
I'll be sure to keep you updated on my progress and let you know as soon as we have something ready for testing.

I'm sorry for adding a comment in addition to bumping the existing :eyes:, but is there any progress wrt the update strategy?
Due to the specifics of this project, could some kind of helper functionality built into the cli be another option to consider in order to maintain components in a project that uses shadcn-ui?

@marcindulak I'm working on a diff command to compare changes with upstream.
See https://ui.shadcn.com/docs/changelog#diff-experimental

Will it also include an indication of versions of the downstream component libraries (like cmdk used for https://ui.shadcn.com/docs/components/command or similar) used to generate the components?
When a security vulnerability is discovered in a downstream project or a new feature is needed, a helper to guide the downstream component upgrade path will be handy.

Hi, a thousand (at least) thanks for this excellent library, Morty! :) Love the avatar btw.
I was going to suggest this exact same feature.
In fact, I've stumbled upon the issue of packaging a component library that uses Shadcn, and thus Tailwind, which results in broken style in my depending app.
And YOU confirmed my intuition about how I could handle my component library: with the now-much-beloved copy-paste paradigm!
Packaging & releasing to NPM is such a hassle!! And with Tailwind, we have to hack around to make it work in client apps, while not being sure to be able to override the default styles.
But if my library is part of my client app's code... it's a wonderful world again, where everything works as dreamed!
Only thing is: what about versioning? Well, I already have a tool of my own that automates a lot of stuff (ramping up the backend part of my app in a k8s cluster, while connecting to frontend to the load balancer, generating code, compiling, downloading translations from gdrive, etc). I'm going to use it to download my library's code right into my project, as you did with your CLI tool.
But I'll try to add some notion of version, so that all the apps using my lib will know about new versions.  Probably using the version no of the package.json file.

This issue has been automatically closed because it received no activity for a while. If you think it was closed by accident, please leave a comment. Thank you.

@wuleninja Wanted to ask, the fact that Tailwind is bundled as npm package, does not stop you from taking Tailwind source from github, put it your code and maintain it. Would not that be essentially the same strategy as taking this lib and copying it?

@shadcn - please add more of your thoughts about this issue.
I see https://www.npmjs.com/package/shadcn-ui on npm. Is this a permanent change of direction, and https://ui.shadcn.com/docs#is-it-available-as-an-npm-package needs to updated to reflect it?
I would also like to explain a point of view which counters the approach of copy-pasting code from external, maintained projects present on npm. A code copy-pasted from a different project becomes an additional maintenance liability, both in terms its security and code evolution. When vulnerabilities are discovered, without the npm audit features it's harder to track and address the vulnerabilities. See an example at https://github.com/SheetJS/sheetjs/issues/2667#issuecomment-1250093342.
One can argue that even when taking into account that some developers store production secrets on their machines, vulnerabilities discovered by npm audit may be irrelevant in some cases, see that view at https://overreacted.io/npm-audit-broken-by-design/, but they may become relevant in other cases, see https://jfrog.com/blog/malware-civil-war-malicious-npm-packages-targeting-malware-authors/ or https://www.aquasec.com/blog/can-you-trust-your-vscode-extensions/.
Now, when shacd-ui exists on npm, could you comment on the question how it could help in tracking the dependencies of the ui components it provides, like https://ui.shadcn.com/docs/components/accordion, on their downstream dependencies. I mean how can I get an extra hint when deciding whether in my project to update dependencies used by shadcn-ui like https://daypicker.dev/, https://www.embla-carousel.com/, https://recharts.org/en-US/, https://cmdk.paco.me/ or others? Will the update break any of the components I copied from shadcn-ui into my project?

My 2 cents: I've just released a major version of the react-day-picker package (used by Calendar) and now users are confused why their code copied from shadcn-ui doesn't work anymore.
The shadcn-ui installation docs do not cite the version of the external package to install, and users are now installing an incompatible version. Others are opening a PR - but it seems difficult to see it merged anytime soon.
I believe the initial strategy "to provide more of a starting point or template" is failing when adding external dependencies. The need of a "release strategy" is a consequence of this design choice. @shadcn will end to rewrite a dependency system (like is partially doing with CLI), and well... good luck with that.
The good news is that release strategy and dependencies handling are issues already solved by npm.
This UI library looks great and deserves for sure a better treatment. In my opinion, to survive needs to be published to npm and adopt semver.

@marcindulak The shadcn-ui npm package is just the cli. It pulls components from the registry. So the registry always holds the latest "versions" of the components.
@marcindulak @gpbl The cli has support for pinned dependencies (which I just did for react-day-picker while we upgrade to v9).
We don't really need to handle versioning inside the components since it's generally a thin layer on top of the dependencies. When you upgrade, you upgrade the underlying dependencies (in this case react-day-picker).
On our end, we'll make sure we test and document the upgrade for the components. See https://ui.shadcn.com/docs/components/input-otp#changelog as an example.


Menu does not work

Hello,
Great theme. The menu does not work. When you click it nothing happens. What is the reason?
Thank you

Hello!
I just saw that I forgot to add jQuery below the footer, is why the menu does not work
Sorry and thank you for the observation haha

No problem. This is a great theme. I will definitely recommend it!
On Apr 25, 2015 10:48 PM, "Germán Encinas"<EMAIL_ADDRESS>wrote:

Hello!
I just saw that I forgot to add jQuery below the footer, is why the menu
does not work
Sorry and thank you for the observation haha
—
Reply to this email directly or view it on GitHub
https://github.com/germannencinas/Gunter/issues/1#issuecomment-96319399.

Also, I believe the place to put the Google analytics code is wrong. Google only picks it up if I put  it though the ghost cp.

@aliendonkey Did you fix this issue with analytics?


Package Resolution Failed

SwiftUI-Intropect could not be resolved.
I get this error when trying to add this package via spm.

This was caused by another package in spm


Merge from team

Codecov Report

Merging #271 (304ccb6) into master (c741f9b) will increase coverage by 0.03%.
The diff coverage is 0.00%.

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


Values not saved

Hello! When I use this JSON file, the hosted version of the character builder doesn't save out the whole file; most exported fields are empty. I actually only have this JSON because I edited it by hand.
{
  "name": "Opus Magueyes",
  "race": null,
  "racialAbilityBonus": [],
  "claz": "BARD",
  "clazAbilityBonus": [
    "CHARISMA"
  ],
  "level": 1,
  "initiative": 2,
  "feats": {},
  "ac": 14,
  "pd": 12,
  "md": 13,
  "armorType": "1",
  "attackPenalty": 0,
  "hasShield": false,
  "recoveries": 8,
  "recoveryDice": 8,
  "abilityScores": {
    "STRENGTH": 13,
    "CONSTITUTION": 13,
    "DEXTERITY": 13,
    "INTELLIGENCE": 12,
    "WISDOM": 8,
    "CHARISMA": 17
  },
  "details": {
    "racialPower": [
      "Samsaran: Flash of Past Lives",
      "",
      "",
      ""
    ],
    "unique": [
      "Befriended a water elemental. Was marked friend to all elementals with an aura only visible to elementals. They refuse to fight for me, but will give me information, point me towards profitable quests, and send me on errands. I regularly summon my friend elemental to play dragonchess.",
      "friend to all elementals (only they can see the",
      "mark). Won't fight for me, but shares info, ",
      "quests, and lore."
    ],
    "icons": [
      "The Grand Oracle (2 + 1 Loremaster bonus)",
      "The Dweller Below (1)",
      "",
      ""
    ],
    "classFeatures": [
      "Bardic Songs",
      "Battle Cries",
      "Spells",
      "",
      "",
      "",
      "",
      "",
      "",
      "",
      ""
    ],
    "powersAndSpells": [
      "Song of Spilt Blood",
      "Soundburst",
      "Charm Person (Spellsinger bonus)",
      "",
      "Disguise Self (Jack of Spells bonus)",
      "Mage Hand (Jack of Spells bonus)",
      "Light (Jack of Spells bonus)",
      "Ghost Noise (Jack of Spells bonus)",
      "",
      "Keep it Together!",
      "We Need You!"
    ],
    "magicItems": [
      "",
      "",
      "",
      "",
      "",
      "",
      "",
      "",
      "",
      "",
      ""
    ],
    "talents": [
      "Jack of Spells (1 wiz spell + 1 wiz cantrips)",
      "Loremaster (+2 Tavern Owner, icon bonuses)",
      "Spellsinger (+1 spell)",
      "",
      ""
    ],
    "feats": [
      "Jack of Spells (Adventurer)",
      "",
      "",
      "",
      "",
      "",
      "",
      "",
      "",
      "",
      ""
    ],
    "equipment": [
      "1d6 Mace",
      "1d6 Throwing Axe",
      "",
      "",
      "",
      "",
      "",
      "",
      "",
      "",
      ""
    ],
    "backgrounds": [
      "Failed Hedge Wizard (5)",
      "Tavern Owner (3 + 2 from Loremaster)",
      "",
      "",
      ""
    ]
  },
  "hp": 24
}

Thanks for reporting this issue - I've updated the hosted version of the character sheet as well.

Huzzah, thank you very much!


Evaluate model performance when using chainer.links.BatchNormalization togather with chainer.config.train=False bug report

chainer version: 3.4.0
cupy version: 2.4.0
When I am using resnet-101 to classify images. The resnet-101 model have L.BatchNormalization layer.
After I trained over, I load model parameter and use chainer.using_config('train', False) to evaluate the model performance.
I am surprised that even I am using train dataset(not validation dataset), the accuracy is lower than When I was in training procedure observation ( it was 99%  in the final iteration of training). It was only 80% in train split dataset.
I think the L.BatchNormalization has bug when you set chainer.using_config('train', False) to evaluate the pretrained model.

Could you share the minimum code to reproduce the issue?

I think the problem is caused by that BatchNorm uses different statistics for training and testing.
My answer is based on the assumption that you are applying a pre-trained model on a new dataset (including training/validation/test set). Maybe I'm wrong 😅
Specifically, if you use a pre-trained model, then the statistics of the batches in the original dataset (maybe ImageNet) is reused. As a result, during training, the statistics (mean, std) is actually the combination of the previous dataset and your current training split. Then if you evaluate the training split again with chainer.using_config('train', False), the statistics is reset and thus is purely from the training split. These differences may cause the performance degradation, as I have previously encountered.
Anyway, I think it's important to consider what data are used for computing the running average of statistics for BatchNorm, since this will make a big difference for evaluation even if using the same data.

@jinjiren Yes I use pretrained imagenet model to load and to train.
After I trained over, How should I evaluate the model?? Should I don't set chainer.using_config('train', False)??
what is your advice

@jinjiren Do you mean if I load pretrained imagenet weight to train a new dataset , What is the best practice to set chainer.links.BatchNormalization  when evaluate on validation dataset???

It's better to use chainer.using_config('train', False) in this situation. However, this is not a problem specific to Chainer. Instead, it's a common problem when finetuning models with BatchNormalization layers. For more details, you can refer to [1] Y. Li, N. Wang, J. Shi, X. Hou, and J. Liu, “Adaptive Batch Normalization for practical domain adaptation,” Pattern Recognit., vol. 80, pp. 109–117, 2018.

@jinjiren I am PhD student, I need to publish paper, Right now, I use chainer.using_config('train', False) to evaluate my model, but because I use imagenet to pretrain model, Like you say, it will cause accuracy very very low in test dataset.
What should I do?? Must I retrain the model without load ImageNet parameter?

Because re-train is time consuming and it will cause I take a week. So it is expensive

Sorry I made a typo, you should use train=True when evalutation for this task.

@jinjiren But, please see my stackoverflow page: https://stackoverflow.com/questions/49808312/how-to-use-chainer-links-batchnormalization-when-loading-pretrained-parameter-th
@cocuh written:
In testing mode, it uses pre-computed population statistics to normalize
the input variable. The population statistics is approximated if it is
computed by training mode, or accurate if it is correctly computed by
fine-tuning mode.

He has different opinion with yours.

By the way, bad experiment results are not other people’s faults. Please be polite to people who are helping you. It’s your own responsibility to do good research, understand and analyze the experiment results. At least you should read the paper I linked carefully and probably discuss or cite it in your paper.
Deadline is not the reason to be rude.

@jinjiren I am very very sorry to offend you , Please forgive me, I am appreciate your generous help!
I am urgent in deadline, If I say something wrong, please forgive me.
Again sorry,  I didn't mean to rude

I will read carefully your given paper. After that I will talk to you, Will you help me please.

@unnonouno Can you help me about this issue please, I am stuck it for weeks.

@jinjiren I have read paper : [1] Y. Li, N. Wang, J. Shi, X. Hou, and J. Liu, “Adaptive Batch Normalization for practical domain adaptation,” Pattern Recognit., vol. 80, pp. 109–117, 2018.
It seems I need to re-implement a parameter-free layer AdaBatch and re-train it.

Do you have code of AdaBatch.?
Do you mean currently the best practice is to use chainer.using_config('train', True) in Chainer?

@jinjiren Thank you very much!

We discussed this topic and will document more on modes of BatchNormalization and when to use each of them.

We discussed this topic and will document more on modes of BatchNormalization and when to use each of them.

I raised another issue for this point #5277.
As for questions, please post on StackOverflow with chainer tag.


SqlTempDBConfiguration functions

Test-SqlTempDBConfiguration - Check tempdb against several rules for best practice configuration
Set-SqlTempDBConfiguration - Configure tempdb to match best practices

Man, github makes resolving conflicts 100% impossible. if anyone has tips, please let me know.
I just branched your branch to make the changes, published and still the conflict won't resolve. Please resync dbatools.psd1, add changes, and resubmit pull.


add a comment on exception triggers

this is almost always a real networking issue and there is no bug in
chef-client.

@chef/client-core easy review
issues cut against this exception typically cannot be replicated and wind up being networking issues and chef-client is functioning exactly as designed.

:+1: Networking is hard let's go shopping.


Broken image

On the design patterns page the images are broken. The same
On website broken
http://docs.groovy-lang.org/latest/html/documentation/assets/img/ChainOfResponsibilityClasses.gif
On github working
https://raw.githubusercontent.com/apache/incubator-groovy/master/src/spec/doc/assets/img/ChainOfResponsibilityClasses.gif

Hi anshbansal,
thanks for reporting. :)
This should already be fixed with the next version (groovy 2.4.4):
http://docs.groovy-lang.org/next/html/documentation/assets/img/ChainOfResponsibilityClasses.gif
We just need to finally release this version.

With the release of 2.4.4 the link works: http://docs.groovy-lang.org/latest/html/documentation/assets/img/ChainOfResponsibilityClasses.gif
Issue can be closed. Thanks!

Thanks for the confirmation!


Fix Clippy warnings and add it to CI

Closes #891.

For what ever reason the cross compile build for NetBSD is using Rust 1.35. I don't know why, or how to fix it. Other then that this should be ready for review.

Perhaps your azure image already comes with rustup installed at 1.35, so rustup doesn't update it?  If that's the problem, you could try either changing clippy's rust version from stable to 1.36, or do a rustup update stable after installing rust.

@Thomasdezeeuw this is correct, azure changed stuff with regards to rust which broke a bunch of CI :(. The azure-install-rust.yml file can be changed to this.

Fixed the build on NetBSD, now need to fix the Clippy check.

Seems to work now, I'll rebase this on master.


feat(tutorial): complete step 5 by kimi1020

My deployed app's URL is below:
https://carbon-tutorial-kimi1020.mybluemix.net/#/

https://carbon-tutorial-kimi1020.mybluemix.net/#/

Per instructions in the tutorial step 5, please include your mybluemix.net URL for your deployed app in your pull request description.

https://carbon-tutorial-kimi1020.mybluemix.net/#/


Move on().cancellation() to its own group

Similar to the work we did with onTermination().

Yes, but only for cancellation. Two methods: invoke and invokeUni.

That was the plan 😉


How does discovery work with container networking?

Maybe something magic happens and it all works just fine. Would be good to try it and document it at least.

Revisiting this now that I have more context on spring-cloud-cloudfoundry-discovery. My previous comment related to Spring Cloud Services with Spring Cloud Netflix Eureka, and doesn't apply in the context of spring-cloud-cloudfoundry.
The spring-cloud-cloudfoundry-discovery module doesn't implement registration of apps to a server for lookup by clients. The discovering "client" app calls CF to get a list of all apps in the same CF org and space and creates a mapping of logical app name (e.g. hi-service) to app route (e.g. https://hi-service.apps.mycf.com, https://hi-service-random-words.apps.mycf.com).
To properly support container-to-container networking, there would need to be an option for the discovery logic to map from logical app name to the IP address of each running app instance's container. It doesn't appear that the CF API provides a way to get the in-container IP address of an app instance, only the IP address of the Diego cell that the container is running on. Unless there's a way to query the CF API to get the internal container IP address, it won't be possible for spring-cloud-cloudfoundry-discovery to support direct container-to-container communication with the current design.

Cloud Foundry now supports DNS-based polyglot service discovery.
This sample worked thought it's a naive implementation
https://github.com/making/demo-hystrix/blob/master/hystrix-dashboard/src/main/java/com/example/hystrixdashboard/CloudFoundryAppServiceDiscoveryClient.java
How about providing more generic DNS based Discovery Client?

We're open to ideas. Isn't DNS-based discovery basically how java.net.URL works out of the box?

Looks good. Maybe send a PR? If you can figure out how to write a test that would be awesome.

Will do. I'll implement followings:

extend existing CloudFoundryDiscoveryClient and override getService method so that  it can inherit getServices.
rewrite serviceId -> hostname logic using cf-java-client. Currently, i'm assuming that appId equals to hostname but this is not always true.

DNS-based discovery would work fine with newer versions of CF, but isn't supported on older versions.  I don't see users asking for container-to-container support with spring-cloud-cloudfoundry right now, so I think going with the future-based DNS approach is fine.
@making One approach would be to add a new property like spring.cloud.cloudfoundry.discovery.useDNS and auto-configure either the existing CloudFoundryDiscoveryClient or a new implementation of the DiscoveryClient based on that property. The DNS-based DiscoveryClient wouldn't need CF Java Client at all (it just needs map appName to appName.apps.internal) so I'm not sure extending the existing CloudFoundryDiscoveryClient makes much sense for DNS-based discovery.

@scottfrederick @dsyer
I made two candidates. Can you give me advices which one should be appropriate.

https://github.com/making/spring-cloud-cloudfoundry/commit/f1ee034d69db7433a5e52a477fafbf48e06fe84b
https://github.com/making/spring-cloud-cloudfoundry/commit/5469b74476d83d61c23920556761fa1e931fb95e

First one is using cf-java-client to retrieve application metadata and checks if internal domain is included in app's urls. index-based routes is used. so we don't need resolve ip address in this client.
Second one is just relying on DNS and does not depends on cf-java-client.
I've not tested against DSN server.

Since they are both configurable, would they be beneficial as is? We're close to an RC1, so if you'd like to submit a PR @making.

@scottfrederick Container to container networking need network policy (cf add-network-policy frontend --destination-app backend --protocol tcp --port 808) so I don't think containers can be accessed across spaces.
Supported both type
https://github.com/making/spring-cloud-cloudfoundry/commit/dae4a73308db8c43978fb70ada409750f28aa610
I'll send a PR after I test it on PWS.

Hello, I want to thank you all for this nice feature, it works as charm. I have one question regarding DNS based discovery: Is it safe to use it in web-flux/reactive application or we need some non-blocking DNS resolver for this one?

There shouldn't be any manual DNS resolving happening


Referentially Transparent type inference

Search Terms

referential transparency
substitution
looked at Common Feature Requests on the FAQ

Suggestion
Depending on the context, TypeScript will infer some types in slightly different ways:

"foo" can be inferred as either the string literal type "foo" or string.
[1, 2] can be inferred as either the tuple type [number, number] or as number[].

One consequence of this is that referential transparency is sometimes broken. See examples below. (Disclaimer: I'm not entirely sure whether I'm using this term correctly!)
I believe this can be a real source of confusion for JavaScript developers coming to TypeScript, since it flags correct code as incorrect and generates errors that require understanding of some advanced features of TypeScript (e.g. string literal types). The solution often involves digging around through type declaration files with no guarantee of success (see also below).
One idea for fixing this would be to base type inference on how a value is used later on. But I assume that has many downsides. Mainly I wanted to raise this issue with the TypeScript team and hear if you consider this a problem or WAI or just impossible to get right.
Examples
Simple example
In plain-old JavaScript, extracting a constant is always OK:
doSomething(value);
// -->
const v = value;
doSomething(v);

This is sometimes OK in TypeScript, sometimes not. Here's an example where it's not:
function panTo(latLng: [number, number]) { /* ... */ }

panTo([10, 20]);  // ok

const x = [10, 20];
panTo(x);  // error:

// Argument of type 'number[]' is not assignable to parameter of type '[number, number]'.
//  Property '0' is missing in type 'number[]'.

Real world example
Real world examples of this often come up with third-party type declarations. For example, in react-mapbox-gl you specify the initial center, zoom, pitch and bearing of the map as tuples:
<Map
  center={[-74, 40.7]}
  zoom={[14.5]}
  pitch={[45]}
  bearing={[-17.6]}
  }>
    { /* ... */ }
</Map>

If you try to factor this out into a constant to avoid magic numbers you get an error:
const INITIAL_VIEW = {
  center: [-74, 40.7],
  zoom: [14.5],
  pitch: [45],
  bearing: [-17.6],
};

return (
  <Map {...INITIAL_VIEW} }>
    { /* ... */ }
  </Map>
);  // error!

The error is a bit of a mouthful:
Type '{ children: Element[]; onClick: () => void; center: number[]; zoom: number[]; pitch: number[]; bearing: number[]; style: string; containerStyle: { height: string; width: string; }; }' is not assignable to type 'Partial<Pick<Readonly<{ children?: ReactNode; }> & Readonly<Props & Events>, "zoom" | "center" | "bearing" | "pitch" | "movingMethod" | "onStyleLoad">>'.
  Types of property 'zoom' are incompatible.
    Type 'number[]' is not assignable to type '[number]'.
      Property '0' is missing in type 'number[]'.

The only solution I'm aware of is to dig through the internals of the type declarations until you find the correct type:
import {Props as MapProps} from 'react-mapbox-gl/lib/map';

const INITIAL_VIEW: Partial<MapProps> = {
  center: [-74, 40.7],
  zoom: [14.5],
  pitch: [45],
  bearing: [-17.6],
};

return (
  <Map {...INITIAL_VIEW} }>
    { /* ... */ }
  </Map>
);  // ok

And this assumes that the relevant type is exported. If not you may have to just give up and throw in an as any.
Both of these examples involved tuples being inferred as arrays, but the same thing can happen with string literals being inferred as string.
Checklist
My suggestion meets these guidelines:

[ ] This wouldn't be a breaking change in existing TypeScript / JavaScript code
[x] This wouldn't change the runtime behavior of existing JavaScript code
[x] This could be implemented without emitting different JS based on the types of the expressions
[x] This isn't a runtime feature (e.g. new expression-level syntax)

We're discussing this quite a lot recently; see some comments in #27486. We don't have any ideas at the moment other than the open issues around explicitly denoting literal types.
The real problem here is that we don't have a notion of tracking side effects throughout the type system. Consider something like this:
function fn(tup: [string, number]) {
  tup[0].substr(1);
  tup[1].toFixed();
}

const arr = ["foo", 10];

const m = arr.MYSTERY();

fn(arr);

If MYSTERY is slice, then this code is OK. If MYSTERY is reverse, then this code crashes. But we really don't know the difference between the two, nor do we have any machinery for tracking behavior if the call to MYSTERY is in another function.
Another case is like this:
function fn(obj: { name: "fred" | "bob" }) { /* ... */ }

const obj = { name: "fred" };

// CASE 1
fn.name = "jack";

// CASE 2
fn(obj);

We would like to say that CASE 1 is valid code because this is extremely idiomatic JavaScript. And in the absence of CASE 1, we'd like to say CASE 2` is valid code, because it plainly is. And if both are present, then there's an error. But we would really like to say that the rules for reading and the rules for writing are the same, because in most positions (i.e. function calls) it's ambiguous whether a property is being used for reading or writing.

The as const feature in TS 3.4 completely resolves this issue so far as I'm aware. Closing.


Fix typo in code-comment ('aproximate')

The word "aproximate" is misspelled here -- it needs a double "p".

bors r+
Thanks!


Error running autocomplete  QueryError

[18/Jul/2018 14:59:10 +0000] decorators   ERROR    Error running autocomplete
Traceback (most recent call last):
File "/home/kay/Desktop/hue/desktop/libs/notebook/src/notebook/decorators.py", line 97, in decorator
return func(*args, **kwargs)
File "/home/kay/Desktop/hue/desktop/libs/notebook/src/notebook/api.py", line 573, in autocomplete
autocomplete_data = get_api(request, snippet).autocomplete(snippet, database, table, column, nested)
File "/home/kay/Desktop/hue/desktop/libs/notebook/src/notebook/connectors/solr.py", line 47, in decorator
raise QueryError(message)
QueryError

I've already quoted the lines as below in desktop/libs/notebook/src/notebook/api.py
@require_POST
@check_document_access_permission()
@api_error_handler
def autocomplete(request, server=None, database=None, table=None, column=None, nested=None):
response = {'status': -1}
Passed by check_document_access_permission but unused by APIs
notebook = json.loads(request.POST.get('notebook', '{}'))
snippet = json.loads(request.POST.get('snippet', '{}'))
**# try:
autocomplete_data = get_api(request, snippet).autocomplete(snippet, database, table, column, nested)
response.update(autocomplete_data)
except QueryExpired:
pass**
response['status'] = 0
return JsonResponse(response)

This line throws a exception, but I did not know how to debug,
I just quote it.
autocomplete_data = get_api(request, snippet).autocomplete(snippet, database, table, column, nested)

I have the same problem too

You should have some Thrift errors above the autocomplete error that would tell the root cause of the issue


1 pixel wide lines remain thin when CanvasItem is scaled

Godot version
4.0 dev
System information
Kubuntu 21.04
Issue description
When the CanvasItem is scaled, the 1 pixel wide lines remain thin (although other transformations apply). Thick lines are scaled correctly.
Probably a bug in the RenderingServer::canvas_item_add_line function, RendererCanvasCull::canvas_item_add_line or deeper.
See the comment.

Also related: #41023.
Steps to reproduce
See the MRP.
Minimal reproduction project
1px_line_bug.zip

This is done by design: https://github.com/godotengine/godot-proposals/issues/1363


parse_parameter list index out of range

Got the following error while running against gwt endpoint 2.8.2.

same issue here

Thanks a lot @myyxl, that fixed the issue for me!


Performance issue

Hello,
I just did tests with InfluxQL in cURL in terminal, and it works very fast (milliseconds), now the same query takes up to 19 seconds in influxdb-rust.
Any idea what the problem may be?

Rust Version: rustc 1.50.0 (cb75ad5db 2021-02-10)
Runtime version (e.g. Tokio): 0.2.22
OS Version: MacOS 10.14.6

Steps to Reproduce:
#[tokio::main]
async fn main() {
    // Connect to db `test` on `http://localhost:8086`
    let client = Client::new("https://influxdb-host", "example_db")
        .with_token("jwt");

    // Let's see if the data we wrote is there
    let read_query = Query::raw_read_query("SELECT * FROM example_db.example_rp.history WHERE tag='example'");

    let start = Time::now();
    let result = client
        .query(&read_query)
        .await;
    let end = Time::now();

    println!("{}", result.unwrap());
    println!("{:?}", end - start); // Duration { seconds: 16, nanoseconds: 823561000 }
}

VS
curl --get https://influxdb-host/query?db=example_db \
  --header "Authorization: Token jwt" \
  --data-urlencode "q=SELECT * FROM example_db.example_rp.history WHERE tag='example'"

# took miliseconds

In this case it is bringing a month of data, where in every second there is at least one record.

@moisesdelacruz has this been resolved? I am clong now and will reopen once you confirm it's an issue with this crate.


Limit the number of parallel processes

I added 100 files — e-mage started 100 processes. It's overkill.
(windows 10)

For a batch image compressor like E-Mage, this is a big problem. I have more than 10,000 images but I must manually add 8 each time and wait for them to finish.
But the question is: How should E-Mage handle this?
I believe an arbitrary maximum of 4 parallel processes at a time suits 90% of users. Another way would be to count the number of CPU cores and set the maximum of parallel processes to that.

There could be a option to configure, so the user chooses how many processes will run in parallel.
The default value could be the number of CPU cores.

+1, the default option definitely should be the number of cores.


v0.5.2 failing on my repo

Describe the bug
Activating extension 'vitest.explorer' failed: Vitest failed to start:
Error: The service was stopped

Reproduction
Repro will come soon.
System Info
System:
    OS: macOS 14.4
    CPU: (10) arm64 Apple M1 Pro
    Memory: 1.93 GB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.15.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.5.0 - /usr/local/bin/npm
    pnpm: 8.6.12 - /usr/local/bin/pnpm
  IDEs:
    VSCode: 1.87.2 - /opt/homebrew/bin/code
    Vim: 9.0 - /usr/bin/vim
    Xcode: 15.3/15E204a - /usr/bin/xcodebuild
  Browsers:
    Chrome: 122.0.6261.129
    Edge: 122.0.2365.92
    Safari: 17.4
  npmPackages:
    @vitejs/plugin-react: ^4.2.1 => 4.2.1
    @vitest/coverage-v8: ^1.3.1 => 1.3.1
    @vitest/ui: ^1.3.1 => 1.3.1
    vite: ^5.1.6 => 5.1.6
    vitest: ^1.4.0 => 1.4.0

Used Package Manager
pnpm
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
[ ] The provided reproduction is a minimal reproducible example of the bug.

I just tried using #296 against my repo, and I get the following log output:
[INFO 21:27:35] [Vitest] Extension is activated because Vitest is installed or there is a Vite/Vitest config file in the workspace.
[INFO 21:27:35] [API] Vitest config {"folder":{"uri":{"$mid":1,"fsPath":"/Users/redacted/Documents/src/redacted","external":"file:///Users/redacted/Documents/src/redacted","path":"/Users/redacted/Documents/src/redacted","scheme":"file"},"name":"redacted","index":0},"id":"/Users/redacted/Documents/src/redacted/vitest.workspace.ts","vitestNodePath":"file:///Users/redacted/Documents/src/redacted/node_modules/.pnpm/vitest@1.4.0_@types+node@20.11.27_@vitest+ui@1.3.1_jsdom@24.0.0_less@4.1.3_stylus@0.59.0/node_modules/vitest/dist/node.js","version":"1.4.0"}
[INFO 21:27:35] [API] Running Vitest: v1.4.0 (WATS)
[INFO 21:27:35] [WORKER] onMessage {"type":"init","meta":[{"vitestNodePath":"file:///Users/redacted/Documents/src/redacted/node_modules/.pnpm/vitest@1.4.0_@types+node@20.11.27_@vitest+ui@1.3.1_jsdom@24.0.0_less@4.1.3_stylus@0.59.0/node_modules/vitest/dist/node.js","folder":"/Users/redacted/Documents/src/redacted","workspaceFile":"/Users/redacted/Documents/src/redacted/vitest.workspace.ts","id":"/Users/redacted/Documents/src/redacted/vitest.workspace.ts"}]}

Interesting. I was suspecting something with the import. I had a .npmrc file which contained:
symlink=true

I deleted it, deleted node_modules and ran pnpm install again. That worked. Hmmm. Perhaps that's repro enough (just having symlink to true for PNPM).

I tried reproing the .npmrc thing with the sample repos. I couldn't make it re-occur. I suspect maybe my node_modules folder maybe got corrupted? It's just strange.
Any advice I can use to continue debugging is still useful.

There is still no repro. Let's close this issue for now, I cannot give you more debugging tips unfortunately.


Update dispatch filter for recurrence and end time

Fixes #161

losing in favour of https://github.com/frequenz-floss/frequenz-api-dispatch/pull/184


Interpreting Fine-tuned Bert model using LIME

Thanks for this amazing work. I am trying to interpret Fine-tuned BERT model using Transformer framework. It seems there is tokenization issue, when I try to use LIME with BERT. Here is the error that i am getting:
Traceback (most recent call last):
  File "src/predict.py", line 351, in <module>
    exp = explainer.explain_instance(s, prediction.predictor, num_features=6)
  File "/home/ramesh/.virtualenvs/transformer-env/lib/python3.6/site-packages/lime/lime_text.py", line 417, in explain_instance
    distance_metric=distance_metric)
  File "/home/ramesh/.virtualenvs/transformer-env/lib/python3.6/site-packages/lime/lime_text.py", line 484, in __data_labels_distances
    labels = classifier_fn(inverse_data)
  File "src/predict.py", line 297, in predictor
    input_ids, input_mask, segment_ids = self.convert_text_to_features(text)
  File "src/predict.py", line 135, in convert_text_to_features
    tokens_a = self.tokenizer.tokenize(text_a)
  File "/home/ramesh/.virtualenvs/transformer-env/lib/python3.6/site-packages/transformers/tokenization_utils.py", line 649, in tokenize
    tokenized_text = split_on_tokens(added_tokens, text)
  File "/home/ramesh/.virtualenvs/transformer-env/lib/python3.6/site-packages/transformers/tokenization_utils.py", line 637, in split_on_tokens
    if sub_text not in self.added_tokens_encoder \
TypeError: unhashable type: 'list'

Here is my code:
def predictor(self, text):

        max_seq_length=128
        input_ids, input_mask, segment_ids = self.convert_text_to_features(text)
        self.model.to(self.device)

        with torch.no_grad():
            outputs = self.model(input_ids, input_mask, segment_ids)

        logits = outputs[0]
        logits = F.softmax(logits, dim=1)

        return logits.numpy()

def convert_text_to_features(self, text_a, text_b=None):

        features = []
        cls_token = self.tokenizer.cls_token
        sep_token = self.tokenizer.sep_token
        cls_token_at_end = False
        sequence_a_segment_id = 0
        sequence_b_segment_id = 1
        cls_token_segment_id = 1
        pad_token_segment_id = 0
        mask_padding_with_zero = True
        pad_token = 0
        tokens_a = self.tokenizer.tokenize(text_a)
        tokens_b = None

        self._truncate_seq_pair(tokens_a, self.max_seq_length - 2)

        tokens = tokens_a + [sep_token]
        segment_ids = [sequence_a_segment_id] * len(tokens)

        if tokens_b:
            tokens += tokens_b + [sep_token]
            segment_ids += [sequence_b_segment_id] * (len(tokens_b) + 1)

        tokens = [cls_token] + tokens
        segment_ids = [cls_token_segment_id] + segment_ids

        input_ids = self.tokenizer.convert_tokens_to_ids(tokens)

        input_mask = [1 if mask_padding_with_zero else 0] * len(input_ids)
        padding_length = self.max_seq_length - len(input_ids)

        input_ids = input_ids + ([pad_token] * padding_length)
        input_mask = input_mask + ([0 if mask_padding_with_zero else 1] * padding_length)
        segment_ids = segment_ids + ([pad_token_segment_id] * padding_length)

        assert len(input_ids) == self.max_seq_length
        assert len(input_mask) == self.max_seq_length
        assert len(segment_ids) == self.max_seq_length

        input_ids = torch.tensor([input_ids], dtype=torch.long).to(self.device)
        input_mask = torch.tensor([input_mask], dtype=torch.long).to(self.device)
        segment_ids = torch.tensor([segment_ids], dtype=torch.long).to(self.device)
        return input_ids, input_mask, segment_ids

if __name__ == '__main__':

    model_path = "models/mrpc"
    bert_model_class = "bert"
    prediction = Prediction(bert_model_class, model_path, lower_case=True, seq_length=128)
    label_names = [0, 1]
    explainer = LimeTextExplainer(class_names=label_names)
    train_df = pd.read_csv("data/train.tsv", sep = '\t')

    for example in train_df["string"]:
        exp = explainer.explain_instance(example, prediction.predictor, num_features=6)
        print(exp.as_list())

I have checked this issue356,  but still i cannot figure out my problem.
Any leads will be appreciated.
Thank you :)

The prediction function in explain_instance should take a list as input and output a 2d array of prediction probabilities. Your function takes a single string and outputs a 1d numpy array of probabilities.

Thanks for your reply. I figured it out, if anyone is interested in interpreting BERT using LIME. Here is the correct example :)
class Prediction:

    def __init__(self, bert_model_class, model_path, lower_case, seq_length):

        self.model, self.tokenizer, self.model_config = \
                    self.load_model(bert_model_class, model_path, lower_case)
        self.processor = MrpcProcessor()
        self.max_seq_length = seq_length
        self.device = "cpu"
        self.model.to("cpu")

    def load_model(self, bert_model_class, model_path, lower_case):

        config_class, model_class, tokenizer_class = MODEL_CLASSES[bert_model_class]
        config = config_class.from_pretrained(model_path)
        tokenizer = tokenizer_class.from_pretrained(model_path, do_lower_case=lower_case)
        model = model_class.from_pretrained(model_path, config=config)

        return model, tokenizer, config

    def predict_label(self, text_a, text_b):

        self.model.to(self.device)

        input_ids, input_mask, segment_ids = self.convert_text_to_features(text_a, text_b)
        with torch.no_grad():
            outputs = self.model(input_ids, segment_ids, input_mask)

        logits = outputs[0]
        logits = F.softmax(logits, dim=1)
        # print(logits)
        logits_label = torch.argmax(logits, dim=1)
        label = logits_label.detach().cpu().numpy()

        # print("logits label ", logits_label)
        logits_confidence = logits[0][logits_label]
        label_confidence_ = logits_confidence.detach().cpu().numpy()
        # print("logits confidence ", label_confidence_)

        return label, label_confidence_

    def _truncate_seq_pair(self, tokens_a, max_length):
        """Truncates a sequence pair in place to the maximum length."""

        # This is a simple heuristic which will always truncate the longer sequence
        # one token at a time. This makes more sense than truncating an equal percent
        # of tokens from each, since if one sequence is very short then each token
        # that's truncated likely contains more information than a longer sequence.
        while True:
            total_length = len(tokens_a)
            if total_length <= max_length:
                break
            if len(tokens_a) > max_length:
                tokens_a.pop()

    def convert_text_to_features(self, text_a, text_b=None):

        features = []
        cls_token = self.tokenizer.cls_token
        sep_token = self.tokenizer.sep_token
        cls_token_at_end = False
        sequence_a_segment_id = 0
        sequence_b_segment_id = 1
        cls_token_segment_id = 1
        pad_token_segment_id = 0
        mask_padding_with_zero = True
        pad_token = 0
        tokens_a = self.tokenizer.tokenize(text_a)
        tokens_b = None

        self._truncate_seq_pair(tokens_a, self.max_seq_length - 2)

        tokens = tokens_a + [sep_token]
        segment_ids = [sequence_a_segment_id] * len(tokens)

        if tokens_b:
            tokens += tokens_b + [sep_token]
            segment_ids += [sequence_b_segment_id] * (len(tokens_b) + 1)

        tokens = [cls_token] + tokens
        segment_ids = [cls_token_segment_id] + segment_ids

        input_ids = self.tokenizer.convert_tokens_to_ids(tokens)

        # The mask has 1 for real tokens and 0 for padding tokens. Only real
        # tokens are attended to.
        input_mask = [1 if mask_padding_with_zero else 0] * len(input_ids)
        #
        # # Zero-pad up to the sequence length.
        padding_length = self.max_seq_length - len(input_ids)

        input_ids = input_ids + ([pad_token] * padding_length)
        input_mask = input_mask + ([0 if mask_padding_with_zero else 1] * padding_length)
        segment_ids = segment_ids + ([pad_token_segment_id] * padding_length)

        assert len(input_ids) == self.max_seq_length
        assert len(input_mask) == self.max_seq_length
        assert len(segment_ids) == self.max_seq_length

        input_ids = torch.tensor([input_ids], dtype=torch.long).to(self.device)
        input_mask = torch.tensor([input_mask], dtype=torch.long).to(self.device)
        segment_ids = torch.tensor([segment_ids], dtype=torch.long).to(self.device)

        return input_ids, input_mask, segment_ids

    def predictor(self, text):

        examples = []
        print(text)
        for example in text:
            examples.append(self.convert_text_to_features(example))

        results = []
        for example in examples:

            with torch.no_grad():
                outputs = self.model(example[0], example[1], example[2])
            logits = outputs[0]
            logits = F.softmax(logits, dim = 1)
            results.append(logits.cpu().detach().numpy()[0])

        results_array = np.array(results)

        return results_array

if __name__ == '__main__':

    model_path = "models/mrpc"
    bert_model_class = "bert"
    prediction = Prediction(bert_model_class, model_path,
                                lower_case = True, seq_length = 512)
    label_names = [0, 1]
    explainer = LimeTextExplainer(class_names=label_names)
    train_df = pd.read_csv("data/train.tsv", sep = '\t')

    train_ls = train_df["string"].tolist()

    for example in train_ls:

        exp = explainer.explain_instance(example, prediction.predictor)
        words = exp.as_list()

Hello Ramesh,
Thank you for your answer. I have a question, what is the processor doing in the init method?

    self.processor = MrpcProcessor()

Thank you,
J.

H @jusugac1 , I was using that to process my dataset. But, here it is not needed. So i edited that now :)

I'm interested too. Have you solved it?

Hi Ramesh,
I wonder how you handle an example with 2 sentences for the MRPC dataset. It has 2 inputs so the input for BERT should be [CLS] text_a [SEP] text_b [SEP], right? However, LIME does not support this since it takes in a list of sentences instead of sentence-pair inputs. Do you have any idea about this problem?
Thank you very much!

what is "MODEL_CLASSES" in your code?

How about applying LIME on deep model? is it possible

@Elizabithi1-dev did you get the solution for 'MODEL_CLASSES' ?

Thanks for your reply. I figured it out, if anyone is interested in interpreting BERT using LIME. Here is the correct example :)
class Prediction:

    def __init__(self, bert_model_class, model_path, lower_case, seq_length):

        self.model, self.tokenizer, self.model_config = \
                    self.load_model(bert_model_class, model_path, lower_case)
        self.max_seq_length = seq_length
        self.device = "cpu"
        self.model.to("cpu")

    def load_model(self, bert_model_class, model_path, lower_case):

        config_class, model_class, tokenizer_class = MODEL_CLASSES[bert_model_class]
        config = config_class.from_pretrained(model_path)
        tokenizer = tokenizer_class.from_pretrained(model_path, do_lower_case=lower_case)
        model = model_class.from_pretrained(model_path, config=config)

        return model, tokenizer, config

    def predict_label(self, text_a, text_b):

        self.model.to(self.device)

        input_ids, input_mask, segment_ids = self.convert_text_to_features(text_a, text_b)
        with torch.no_grad():
            outputs = self.model(input_ids, segment_ids, input_mask)

        logits = outputs[0]
        logits = F.softmax(logits, dim=1)
        # print(logits)
        logits_label = torch.argmax(logits, dim=1)
        label = logits_label.detach().cpu().numpy()

        # print("logits label ", logits_label)
        logits_confidence = logits[0][logits_label]
        label_confidence_ = logits_confidence.detach().cpu().numpy()
        # print("logits confidence ", label_confidence_)

        return label, label_confidence_

    def _truncate_seq_pair(self, tokens_a, max_length):
        """Truncates a sequence pair in place to the maximum length."""

        # This is a simple heuristic which will always truncate the longer sequence
        # one token at a time. This makes more sense than truncating an equal percent
        # of tokens from each, since if one sequence is very short then each token
        # that's truncated likely contains more information than a longer sequence.
        while True:
            total_length = len(tokens_a)
            if total_length <= max_length:
                break
            if len(tokens_a) > max_length:
                tokens_a.pop()

    def convert_text_to_features(self, text_a, text_b=None):

        features = []
        cls_token = self.tokenizer.cls_token
        sep_token = self.tokenizer.sep_token
        cls_token_at_end = False
        sequence_a_segment_id = 0
        sequence_b_segment_id = 1
        cls_token_segment_id = 1
        pad_token_segment_id = 0
        mask_padding_with_zero = True
        pad_token = 0
        tokens_a = self.tokenizer.tokenize(text_a)
        tokens_b = None

        self._truncate_seq_pair(tokens_a, self.max_seq_length - 2)

        tokens = tokens_a + [sep_token]
        segment_ids = [sequence_a_segment_id] * len(tokens)

        if tokens_b:
            tokens += tokens_b + [sep_token]
            segment_ids += [sequence_b_segment_id] * (len(tokens_b) + 1)

        tokens = [cls_token] + tokens
        segment_ids = [cls_token_segment_id] + segment_ids

        input_ids = self.tokenizer.convert_tokens_to_ids(tokens)

        # The mask has 1 for real tokens and 0 for padding tokens. Only real
        # tokens are attended to.
        input_mask = [1 if mask_padding_with_zero else 0] * len(input_ids)
        #
        # # Zero-pad up to the sequence length.
        padding_length = self.max_seq_length - len(input_ids)

        input_ids = input_ids + ([pad_token] * padding_length)
        input_mask = input_mask + ([0 if mask_padding_with_zero else 1] * padding_length)
        segment_ids = segment_ids + ([pad_token_segment_id] * padding_length)

        assert len(input_ids) == self.max_seq_length
        assert len(input_mask) == self.max_seq_length
        assert len(segment_ids) == self.max_seq_length

        input_ids = torch.tensor([input_ids], dtype=torch.long).to(self.device)
        input_mask = torch.tensor([input_mask], dtype=torch.long).to(self.device)
        segment_ids = torch.tensor([segment_ids], dtype=torch.long).to(self.device)

        return input_ids, input_mask, segment_ids

    def predictor(self, text):

        examples = []
        print(text)
        for example in text:
            examples.append(self.convert_text_to_features(example))

        results = []
        for example in examples:

            with torch.no_grad():
                outputs = self.model(example[0], example[1], example[2])
            logits = outputs[0]
            logits = F.softmax(logits, dim = 1)
            results.append(logits.cpu().detach().numpy()[0])

        results_array = np.array(results)

        return results_array

if __name__ == '__main__':

    model_path = "models/mrpc"
    bert_model_class = "bert"
    prediction = Prediction(bert_model_class, model_path,
                                lower_case = True, seq_length = 512)
    label_names = [0, 1]
    explainer = LimeTextExplainer(class_names=label_names)
    train_df = pd.read_csv("data/train.tsv", sep = '\t')

    train_ls = train_df["string"].tolist()

    for example in train_ls:

        exp = explainer.explain_instance(example, prediction.predictor)
        words = exp.as_list()

Hello, I run your code and the following error occurred.
---> 12         config_class, model_class, tokenizer_class = MODEL_CLASSES[bert_model_class]
13         config = config_class.from_pretrained(model_path)
14         tokenizer = tokenizer_class.from_pretrained(model_path)
NameError: name 'MODEL_CLASSES' is not defined.
What does MODEL_CLASSES mean?

what is "MODEL_CLASSES" in your code?

Hello, have you solved this problem? I encountered the same problem.

what is "MODEL_CLASSES" in your code?

Hello, have you solved this problem? I encountered the same problem.

Hello, rameshjes ！ I run your code and the following error occurred.
---> 12 config_class, model_class, tokenizer_class = MODEL_CLASSES[bert_model_class]
13 config = config_class.from_pretrained(model_path)
14 tokenizer = tokenizer_class.from_pretrained(model_path)
NameError: name 'MODEL_CLASSES' is not defined.
how to solve this problem？Thank you very much. @rameshjes

I'm interested too. Have you solved it?

Hi Ramesh,
I wonder how you handle an example with 2 sentences for the MRPC dataset. It has 2 inputs so the input for BERT should be [CLS] text_a [SEP] text_b [SEP], right? However, LIME does not support this since it takes in a list of sentences instead of sentence-pair inputs. Do you have any idea about this problem?
Thank you very much!

Hi, Did you manage to find any solution for this?

@Elizabithi1-dev @Tingsie You guys must have solved it by now but MODEL_CLASSES will be (BertConfig, BertForSequenceClassification, BertTokenizer).


The LastCommitDateProbe implementation is registering the date of the last commit on the main branch of the plugin repository into the ProbeContext.
Even if this probe is logically related to the source code, because this probe needs to be executed all the time and to prevent the ProbeEngine to skip it, its isSourceCodeRelated method implementation needs to return false. Otherwise, the date of the latest commit will never be updated.

Submitter checklist

[x] If the issue exists, it is well described and linked in the description
[x] The description of this pull request is detailed and explain why this pull request is needed
[x] The changeset is on a specific branch

feature/ for new feature, or improvements
fix/ for bug fixes
docs/ for any documentation changes

[x] If required, the documentation has been updated
[x] There is automated tests to cover the code change / addition

If there is no test, include an explanation why in the description

[x] Run mvn verify locally and all tests are passing successfully

It is OK to create a pull request which has failing tests if it is created as a draft, is to fix a bug and the first commit is the test to prove the existence of the bug.

[x] There is no new warnings (checkstyle nor spotbugs) on the code

There is another but that I can see thanks to https://github.com/jenkins-infra/plugin-health-scoring/pull/261/commits/e491c20e21e416cbef68f70bb4036b350683dbd9 but it should be addressed in another pull request.


bug: duplicate words conflict with mnemonic UI

The React list needs to use a sequential key, not the word name

Where exactly is words used as keys?

@tomicvladan sent via DM


TTL is unitless in the display

Could the TTL display be updated to include the units? I know from experience that the numbers represent hours, but the UI does not make that clear, and coming from a DNS background, my brain keeps wanting it to be seconds.

Hey @CtrlZvi , this displays the units now. Please feel free to reopen if you think this is not addressed.

TL;DR This is the WebUI for Keyconjurer displaying just an integer without units associated with it.

Closing out, @CtrlZvi , please reopen if you have issues.


Implement formatter

It'll deserialize -> serialize immediately.
It should provide in-place rewrite as well by using temp file.

Now it's implemented.


PDF: Change rendering of ASSP references?

@JackWilton1594 suggests:
"Rather than "ScX SpY" for internal citations, can we not use "X.SpY"? I'm just thinking ahead to other editions where they use acts as well as scenes, and "AcX ScY SpZ" looks especially clunky (as opposed to "X.Y.SpZ")"
We've had quite a lot of discussion over how to render these pointers, and made some changes very recently, so I think this is a policy decision. Any changes should also provide guidance for the alternative system which we still maintain just in case, which uses act/scene/line numbering.

@JackWilton1594:  I'm agnostic. There's some logic to expanding the act/scene reference in the running header (if we can make room) and being more economical in the prose.

Consensus achieved. We will leave things as they are. Stand down red alert.


Add tooltips for important terms and concepts

Need to work with creative/marketing - short tooltips with a ? hover icon with links to terms in the GitBook glossary https://docs.klimadao.finance/references/glossary

@theprofessora a reference issue for you to consider in the new carbon dashboard design


[docs] Added Spain Videos

Added two Spanish Video
What is it?

[ ] Feature / enhancement
[ ] Bug
[ x] Docs / tests

Description
Added two videos Spanish
Use cases and why

One use case

Another use case

Checklist:

[ ] My code follows the developer guidelines of this project
[ ] I have performed a self-review of my own code
[ ] I have made corresponding changes to the documentation
[ ] Added new tests to cover the fix / functionality

Muchas gracias Leifer!!


Implement running as service as well as standalone exe

Organize source files
Separate syscall wrappers and code
Prepare for implementing service
Add placeholder service management functions
Implement service (un)install
Implement Service Runner
Add compiled resource support
Implement Service Error reporter
Strip output by default
Update Status messages and formatting

Thanks for the PR! Most of this looks ok, although there's an issue I've found. After a game closes but before the service is stopped, the process uses a lot of CPU (~50-70%). I'm pretty sure this is caused by the lack of cleanup in the original code, so the original pipe handle is never closed and the iServerLoop fails to create the pipe, causing an infinite loop, although I'm not sure how to view logs so not certain.
Basically, iServerLoop needs cleanup code.

On Thu, Jan 12 2023 at 09:19:47 PM -08:00:00, 0e4ef622
@.***> wrote:

Basically, iServerLoop needs cleanup code.

On it.
Mubashshir

What does running this as a service mean and how can I do that?

What does running this as a service mean and how can I do that? I've compiled it but it appears to just do the same thing as the regular exe.
If you run ./bridge.exe install once, then afterwards it should start/stop automatically. It should also be able to accept another connection once the first one closes, although that part doesn't seem to quite work.

./bridge.exe install doesn't work because bridge.exe is not a command and the compiler outputs winediscordipcbridge.exe, not bridge.exe. Trying wine winediscordipcbridge.exe install appears to do nothing and has the same exact result as running the .exe with no arguments.

./bridge.exe install doesn't work because bridge.exe is not a command and the compiler outputs winediscordipcbridge.exe, not bridge.exe.

is this part supposed to be sarcasm?

Even though the .exe closes when the first connection closes, if the part where it's supposed to take another connection is supposedly broken then unfortunately as far as what I am looking for, we're back to square one.

wine ./wdipcbridge.exe install for the first time should add the IPC bridge to services of the wineprefix... next time you run something in that WINEPREFIX it'll be able to communicate with discord.
You can test whether it works by using examples/send-presence.exe from this.
Remember, you need to run wine ./wdipcbridge.exe install for each WINEPREFIX you want to have this on.

@0e4ef622 btw, I don't know much about how M$ pipes work, and how can I make it behave like unix sockets (multiple streams). If we can implement multi-stream support in iListenPipe, every client will be able to talk to discord, currently the first one does all the talking afair.

how can I make it behave like unix sockets (multiple streams).

You can set the nMaxInstances parameter in CreateNamedPipe, but also I believe https://github.com/openglfreak/winestreamproxy is a project which already does that.

I think I may know why I got confused earlier. The repo for this PR does not include the main.c file, causing the compile instructions to fail so I copied it from the main repository instead, could that cause issues?

wine ./wdipcbridge.exe install for the first time should add the IPC bridge to services of the wineprefix... next time you run something in that WINEPREFIX it'll be able to communicate with discord.
You can test whether it works by using examples/send-presence.exe from this.
Remember, you need to run wine ./wdipcbridge.exe install for each WINEPREFIX you want to have this on.

It does not. I build the .exe from your repository and even with the "install" argument the exe does the exact same thing as the one from master.

edit: Did you apply this patch before building it?

What do you mean

this unfortunately no longer compiles with GCC 14:
In file included from src/main.c:2:
src/main.c: In function 'main':
src/main.c:15:25: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   15 |                 return (_tprintf(
      |                         ^~~~~~~~
src/main.c:6:1: note: include '<stdio.h>' or provide a declaration of 'printf'
    5 | #include "service-manager.h"
  +++ |+#include <stdio.h>
    6 | #define ARGV1(X) (argc > 1 && lstrcmpi( argv[1], TEXT(X)) == 0)

the following patch should fix the error and also several warnings:
diff --git a/src/ipc.c b/src/ipc.c
index 17533d0..dca3b2b 100644
--- a/src/ipc.c
+++ b/src/ipc.c
@@ -43,7 +43,7 @@ int iServerMain(BOOL bStandaloneArg)

 	if (hPipe == INVALID_HANDLE_VALUE)
 	{
-		INFO("CreateNamedPipe failed, GLE=%d.\n", GetLastError());
+		INFO("CreateNamedPipe failed, GLE=%lu.\n", GetLastError());
 		return -1;
 	}

@@ -122,7 +122,7 @@ PRIVATE int iListenPipe()

 	if (hThread == NULL)
 	{
-		INFO("CreateThread failed, GLE=%d.\n", GetLastError());
+		INFO("CreateThread failed, GLE=%lu.\n", GetLastError());
 		return 1;
 	}

@@ -149,7 +149,7 @@ PRIVATE int iListenPipe()
 			return 1;
 		}

-		INFO("%d bytes w->l\n", bytes_read);
+		INFO("%lu bytes w->l\n", bytes_read);
 		/* pass -D__WDBRIDGE_DUMP_PIPE to gcc
 		* to dump the actual data being passed
 		* from the pipe to the socket */
diff --git a/src/main.c b/src/main.c
index b5fe2e8..68dee71 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,6 +1,7 @@
 #include <windows.h>
 #include <tchar.h>
 #include <shlwapi.h>
+#include <stdio.h>
 #include "server.h"
 #include "service-manager.h"
 #define ARGV1(X) (argc > 1 && lstrcmpi( argv[1], TEXT(X)) == 0)


Are auto instrumentations synced into splunk-otel-js

For example https://github.com/open-telemetry/opentelemetry-js-contrib/pull/1951 is part of the autoinstrumentations of the open source, but it does not appear to be listed under the readme or packages here?

Added in https://github.com/signalfx/splunk-otel-js/pull/934


User defined Pose

Hello Author,
I am trying to implement hybrid of 1st order model and One shot neural talking head (Nvidia's one).
The idea is to have a user defined pose and the source should adapt to the given pose. One shot paper is doing the same but I want to modify 1st order pipeline to incorporate this.
Any tips and suggestion would be helpful :)
Best,
Vinayak

I don't understand what is user defined pose, how to it is resented and how the user should get one?

Thanks for the quick reply.
Here is the screenshot of one shot paper. Pose can be extracted by Head pose estimator network which gives yaw, pitch and roll.
Ru, Tu (Rotation and Translation) is user defined whereas Rd, Td is from the estimator network.
Image Ref: https://arxiv.org/pdf/2011.15126.pdf

The user can modify the yaw, pitch and roll with respect to camera.
Looking forward to your reply :)
Best, Vinayak

Why not to use the same architecture than?

From your paper: The purpose of the motion estimation module is to predict a dense motion field from a frame D of the driving video D to the source frame S. The dense motion field is later used to align the feature maps computed from S with the object pose in D
I was thinking if Driving video could adapt to the pose of the Source frame. For an example if the the person looks up in the driving video, the pose in the source frame remains constant except for the expression part. Expression should can be of the driving video.

Yes, so why can't you use their same architecture? In one of their ablation studies they do like this.

Thank you for your reply :) It simply takes too much of GPU power to train them. If I remember correctly they trained on cluster of GPUs with 32 GB memory. But Again, they can :)


Deploy failing due to too-large file in interm_tesscut_requests

I just noticed this: the deploy machinery stopped working at some point because of this error (see an example log of this by going to the deploy stage of https://circleci.com/gh/spacetelescope/notebooks/146?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link):
remote: error: File notebooks/MAST/TESS/interm_tesscut_requests/astrocut.zip is 216.03 MB; this exceeds GitHub’s file size limit of 100.00 MB

I'm not sure why this appeared now when it didn't before, but the short-term fix is simply to prevent that file from getting sent to github pages.  This may be as simple as adding it to the gitignore, but might require manually deleting it at the end of the notebook.
Just to confirm, though @mustaric, this file is not critical for people viewing the notebook, right?  Rather it's just there as a side effect of the notebook?
(Potentially related to #103 although maybe not because this could be a genuine desirable artifact as opposed to "unneeded" parts.)
cc @ceb8 @mustaric

My guess about why this wasn't appearing originally is that it looks like the result of a cutout, so probably it’s a spot that’s in the continuous viewing zone, so more are being returned than when the notebook was first written and some sector pushed it over the edge.
If I am right, one solution is to specify the sector in the notbook so it's only getting one fits file returned.  However, you are correct, this isn't critical for viewing the notebook once the cutouts are rendered, so adding it to the gitignore should be fine (unless I am missing something @mustaric).

OK I am less sure about my guess after Susan pointed out that in that case the size would have masked out with sector 13 4 months ago..... But I still stand by the gitignore as a reasonable fix.

Looked at the notebook and it's asking for all sectors, which turns out to be 6.  Each cutout file is ~40MB. The notebook only uses one of the output files, so I will put in a PR for that and this problem will go away.


Add ssh-am

NOTE: Each discrete (stand-alone) request should be in its own issue.
Put "Add ____" as Title
[x] Done
Provide a link to the proposed addition.
https://github.com/gengxiankun/ssh-am
Explain why it should be added
ssh-am 是一款 macOS Command Line Tools，用于管理服务器的账户信息，内置ssh和scp命令。并支持多种登陆方式的自动化授权（包括google二次认证的授权方式）。
Additional context

Issue Checklist

[x] I have checked for other similar issues
[x] I have explained why this change is important
[x] I have added necessary documentation (if appropriate)

This functionality is covered by the ~/.ssh/config file. This project is entirely redundant imo.


Build fails on self-hosted mac runner if unity hub has custom install location

I am running unity-builder on self-hosted mac and my machine doesn't have that much storage space so I added external hard drive and pointed unity hub to install unity editors to that drive which cause unity-builder to fail because it is looking at default install location for unity editor executable.
Is there any work around to this issue, it would be nice to give unity-builder the path of the unity editors folder in the yaml file

Here it says unity editor is already installed

Generated version 0.0.13 (no version tags found).
Using android versionCode 13
Building locally
/Applications/Unity Hub.app/Contents/MacOS/Unity Hub -- --headless install --version 2023.2.16f1 --changeset > 7f45223012db --module ios --architecture arm64 --childModules
2024-04-25 21:16:12.182 Unity Hub[48832:1330170] WARNING: Secure coding is not enabled for restorable state! Enable > secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES.
Error while installing an editor or a module from changeset. Error: Editor already installed in this location.

And later on the pipeline it says it is not able to find unity editor because unity hub has custom install location

###########################
Building project
###########################
/Volumes/Mac/gh-runner/_work/_actions/game-ci/unity-builder/v4/dist/platforms/mac/steps/build.sh: line 131: > /Applications/Unity/Hub/Editor/2023.2.16f1/Unity.app/Contents/MacOS/Unity: No such file or directory

any solution?

found a solution, remove unity installed via hub and run build, it will download it back
after that you can add unity back to hub, but you will have to do it manually and you will no longer be able to add modules from the hub, but you can add them using console (https://docs.unity3d.com/hub/manual/HubCLI.html)
also make sure that the editor is installed in the default directory (/Applications/Unity/Hub/Editor)


[Feature Request] Addition of Divide and Conquer Algorithm

🚀 Feature Request
Is your feature request related to a problem? Please describe.
Divide and conquer is an algorithmic paradigm that breaks a problem into smaller subproblems, solves each subproblem independently, and then combines their solutions to solve the original problem. It is widely used in various algorithms, including sorting, searching, and matrix multiplication.
Describe the solution you'd like
Add divide and conquuer algo in arrays.
Would you like to work on this feature?

[I want to work on the feature ] Yes
[ ] No

Thanks
On Fri, 11 Oct, 2024, 10:06 pm शिवाय, @.***> wrote:

Assigned #516 https://github.com/ajay-dhangar/algo/issues/516 to
@Bhumika-00 https://github.com/Bhumika-00.
—
Reply to this email directly, view it on GitHub
https://github.com/ajay-dhangar/algo/issues/516#event-14611796005, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/BKOHTVUTECIMF6DVEFL6LCDZ275BBAVCNFSM6AAAAABPZDSR5SVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJUGYYTCNZZGYYDANI
.
You are receiving this because you were assigned.Message ID:
@.***>

Can you please allow me delete the GitHub repo actually there is a issue
with my github desktop
On Fri, 11 Oct, 2024, 10:06 pm Bhumika Sharma, @.***>
wrote:

Thanks
On Fri, 11 Oct, 2024, 10:06 pm शिवाय, @.***> wrote:

Assigned #516 https://github.com/ajay-dhangar/algo/issues/516 to
@Bhumika-00 https://github.com/Bhumika-00.
—
Reply to this email directly, view it on GitHub
https://github.com/ajay-dhangar/algo/issues/516#event-14611796005, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/BKOHTVUTECIMF6DVEFL6LCDZ275BBAVCNFSM6AAAAABPZDSR5SVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJUGYYTCNZZGYYDANI
.
You are receiving this because you were assigned.Message ID:
@.***>


Error in Documentation

As I was working through it I noticed:
'guards' => [
    'web' => [
        'driver' => 'session',
        'provider' => 'adldap',
    ],
    'api' => [
        'driver' => 'token',
        'provider' => 'users',
    ],
],

Which then follows into changing the providers:
'providers' => [
    'users' => [
        'driver' => 'adldap', // Changed from 'eloquent'
        'model' => App\User::class,
    ],
    // 'users' => [
    //     'driver' => 'database',
    //     'table' => 'users',
    // ],
],

But if you do that the provider won't be found as the key should be adldap as in the guards definition
So it should be:
'providers' => [
    'adldap' => [  // Changed to adldap
        'driver' => 'adldap', // Changed from 'eloquent'
        'model' => App\User::class,
    ],
    // 'users' => [
    //     'driver' => 'database',
    //     'table' => 'users',
    // ],
],

Or you could simply leave the guards definition unchanged. Which would probably be best as then you don't interfere with the api guard

Actually this appears correct in the quick-start.md but the initial page readme.md is incorrect.


feat(process): add cli parameters for importing directly to sphere

Coverage increased (+0.3%) to 87.821% when pulling 66b0dee737facc2142985796b8840c149111d635 on TOOM-2130-product-type-import into cd9050df4e5b96784fd13bd67b0bca49794fec05 on master.

Integration tests don't work because of missing sphere.io credentials in travis env variables.

Coverage increased (+0.3%) to 87.821% when pulling 253d716a782a9fb09b316b6aee3d0e4b627470ec on TOOM-2130-product-type-import into cd9050df4e5b96784fd13bd67b0bca49794fec05 on master.

Coverage increased (+0.3%) to 87.821% when pulling 253d716a782a9fb09b316b6aee3d0e4b627470ec on TOOM-2130-product-type-import into cd9050df4e5b96784fd13bd67b0bca49794fec05 on master.

Coverage increased (+0.3%) to 87.821% when pulling 9f20130e54905558942a3363819a1d6ad3169cdb on TOOM-2130-product-type-import into cd9050df4e5b96784fd13bd67b0bca49794fec05 on master.

Coverage increased (+0.3%) to 87.821% when pulling ed574c79f926d49da4691d6aa7cf22bc2d7d57b2 on TOOM-2130-product-type-import into cd9050df4e5b96784fd13bd67b0bca49794fec05 on master.

Coverage increased (+0.3%) to 87.821% when pulling ed574c79f926d49da4691d6aa7cf22bc2d7d57b2 on TOOM-2130-product-type-import into cd9050df4e5b96784fd13bd67b0bca49794fec05 on master.

Coverage increased (+0.3%) to 87.821% when pulling fde65e2391be24958306a8c391a1395376d78c2f on TOOM-2130-product-type-import into cd9050df4e5b96784fd13bd67b0bca49794fec05 on master.

Coverage increased (+0.3%) to 87.821% when pulling 6c34f70ce36a3b043fb0fa41b9917a8b88b180de on TOOM-2130-product-type-import into cd9050df4e5b96784fd13bd67b0bca49794fec05 on master.

@junajan can you fix the breaking test also? Would be awesome 😊

Coverage increased (+0.3%) to 87.821% when pulling 1571e165a9c44479e67fa01ca0efd7c0ce3afdf2 on TOOM-2130-product-type-import into cd9050df4e5b96784fd13bd67b0bca49794fec05 on master.

Coverage increased (+0.3%) to 87.821% when pulling 1571e165a9c44479e67fa01ca0efd7c0ce3afdf2 on TOOM-2130-product-type-import into cd9050df4e5b96784fd13bd67b0bca49794fec05 on master.

Coverage increased (+0.3%) to 87.821% when pulling 63d72c1e4816f7b1b647b9380e0b5dffaf5b8e49 on TOOM-2130-product-type-import into cd9050df4e5b96784fd13bd67b0bca49794fec05 on master.

Coverage decreased (-0.08%) to 87.417% when pulling 48667754b6b00ab0ffaad77fd6e5621e27189450 on TOOM-2130-product-type-import into cd9050df4e5b96784fd13bd67b0bca49794fec05 on master.

Coverage increased (+0.4%) to 87.898% when pulling 631bdd8eee6bac7c274338afa83dfe30c34a5366 on TOOM-2130-product-type-import into cd9050df4e5b96784fd13bd67b0bca49794fec05 on master.

Coverage decreased (-0.9%) to 86.624% when pulling 8a42cf59efdfb725fc7f0395cd78f1e68d6886c5 on TOOM-2130-product-type-import into cd9050df4e5b96784fd13bd67b0bca49794fec05 on master.

Coverage decreased (-0.9%) to 86.624% when pulling 8a42cf59efdfb725fc7f0395cd78f1e68d6886c5 on TOOM-2130-product-type-import into cd9050df4e5b96784fd13bd67b0bca49794fec05 on master.

Coverage decreased (-1.3%) to 86.164% when pulling 5fcb461a633825db138cc05922c6fbd9a6a3503d on TOOM-2130-product-type-import into cd9050df4e5b96784fd13bd67b0bca49794fec05 on master.

Coverage decreased (-1.3%) to 86.164% when pulling e866a9d6fcb04a70c2a603b7698d4ebf893d3def on TOOM-2130-product-type-import into cd9050df4e5b96784fd13bd67b0bca49794fec05 on master.

Coverage decreased (-1.08%) to 86.42% when pulling 09fdc1bd0a911351162e95ea08071bc3eeeca51f on TOOM-2130-product-type-import into cd9050df4e5b96784fd13bd67b0bca49794fec05 on master.

OK LGTM now 👍


Flutter Blue classes need their constructors for fixed devices

A few versions back the constructors of BluetoothDevice, BluetoothCharacteristic and BluetoothDescriptor where removed: https://github.com/pauldemarco/flutter_blue/pull/277/commits/01cd27f80d798717604c25ebbd8fa088777fa0ec
I don't really know why this was done as there are many case where you don't need to scan for a device and you know its MAC address beforehand.
You might even imagine cases where Bluetooth Devices are not advertising themselves to be found when scanning, but are open for connect requests.
Changes proposed:
bluetooth_device.dart
BluetoothDevice(
   {@required this.id,
         @required this.name,
         @required this.type,});

bluetooth_characteristic.dart
BehaviorSubject<List<int>> _value = BehaviorSubject.seeded([]);

BluetoothCharacteristic(
   {@required this.uuid,
      @required this.deviceId,
      @required this.serviceUuid,
      this.secondaryServiceUuid,
      @required this.descriptors,
      @required this.properties});

bluetooth_descriptor.dart
BluetoothDescriptor(
   {@required this.uuid,
      @required this.deviceId,
      @required this.serviceUuid,
      @required this.characteristicUuid});

You can use /gen/flutterblue.pb.dart BluetoothDevice.fromJson to construct a protos device, then BluetoothDevice.fromProto(protos.BluetoothDevice p) construct your device. Others are similar, I think.

Sure you could use that, but is that the proper way? Wouldn't a constructor which matches the fromProto (in terms of parameters) be more logical? And what is the reason to omit a constructor for these classes?

I absolutely agree with @Fleximex! There is even more scenarios where the default constructors are needed! 01cd27f is a really bad idea! There should be an easy way to construct BluetoothDevice for fixed devices, and not just ugly work around...

In my case I need to be able to serialise and deserialise a DeviceModel to a database.
@louwy001 proto. BluetoothDevice.fromJson not work properly, but this is what I found instead:
import 'package:flutter_blue/flutter_blue.dart';
import 'package:flutter_blue/gen/flutterblue.pb.dart' as proto;

...

 BluetoothDevice toBluetoothDevice() {
   proto.BluetoothDevice p = proto.BluetoothDevice.create();

   p.name = name;
   p.type = proto.BluetoothDevice_Type.LE;
   p.remoteId = bleno;

   return BluetoothDevice.fromProto(p);
 }

The fields name and bleno are part of the DeviceModel stored to the DB.  The deserialization method toBluetoothDevice ... kind of ugly but works for me.

I would like to be able to save the connected device and auto connect after the first connect.


Counter component needs very long to be rendered

Hi,
I tried this example because I need to render some Blazor components inside my Angular app.
I choose this example because I think it was an overkill to load the whole webassembly stuff and therefore I want to use serverside rendering.
The example is working but it took several minutes to show the counter component. In the meantime the page is completely empty.
After the component was rendered the first time and refreshing the browser tab it renders faster (about 1s)
What causes this reeeeaaaly long delay?
cc: @guardrex

You should cross-link the article section, and I think they're going to ask you to put a GH repro app up so that they can see how you have your code structured.

Oh ... and I didn't mean here on this repo. Sorry. Open the issue here ...
https://github.com/dotnet/aspnetcore/issues
... and close this issue.


Vernemq Crashing

To help us save time and help you faster
Hi, I am trying to evaluate vmq and trying to setup two clients one will publish a message and another will receive/superscribed it, both clients and broker are on localhost. I am below in crash log. I made below two changes in config file
allow_anonymous = on
plugins.vmq_passwd = off
As soon as I connect from my first client (for publishing) I get crash message in log.
I am using mqtt client from
https://github.com/emqtt/qmqtt/tree/master/src/mqtt
Please suggest what I might be missing?
############## /var/log/vernemq/console.log  #######################
2018-11-12 23:07:31.570 [info] <0.33.0> Application plumtree started on node<EMAIL_ADDRESS>2018-11-12 23:07:31.580 [info] <0.33.0> Application vmq_plumtree started on node<EMAIL_ADDRESS>2018-11-12 23:07:31.616 [info] <0.188.0>@vmq_metadata:start:27 Try to start vmq_plumtree: ok
2018-11-12 23:07:33.585 [info] <0.319.0>@vmq_reg_trie:handle_info:204 loaded 0 subscriptions into vmq_reg_trie
2018-11-12 23:07:33.593 [info] <0.217.0>@vmq_cluster:init:121 cluster event handler 'vmq_cluster' registered
2018-11-12 23:07:34.322 [info] <0.33.0> Application vmq_acl started on node<EMAIL_ADDRESS>2018-11-12 23:07:34.402 [info] <0.33.0> Application vmq_server started on node<EMAIL_ADDRESS>2018-11-12 23:07:34.402 [info] <0.33.0> Application eldap started on node<EMAIL_ADDRESS>2018-11-12 23:07:34.402 [info] <0.33.0> Application poolboy started on node<EMAIL_ADDRESS>2018-11-12 23:07:34.436 [info] <0.33.0> Application luerl started on node<EMAIL_ADDRESS>2018-11-12 23:07:34.462 [info] <0.33.0> Application emysql started on node<EMAIL_ADDRESS>2018-11-12 23:07:34.462 [info] <0.33.0> Application epgsql started on node<EMAIL_ADDRESS>2018-11-12 23:07:34.462 [info] <0.33.0> Application bson started on node<EMAIL_ADDRESS>2018-11-12 23:07:34.468 [info] <0.33.0> Application mongodb started on node<EMAIL_ADDRESS>2018-11-12 23:07:34.469 [info] <0.33.0> Application pbkdf2 started on node<EMAIL_ADDRESS>2018-11-12 23:07:34.469 [info] <0.33.0> Application eredis started on node<EMAIL_ADDRESS>2018-11-12 23:07:34.469 [info] <0.33.0> Application unicode_util_compat started on node<EMAIL_ADDRESS>2018-11-12 23:07:34.469 [info] <0.33.0> Application idna started on node<EMAIL_ADDRESS>2018-11-12 23:07:34.469 [info] <0.33.0> Application mimerl started on node<EMAIL_ADDRESS>2018-11-12 23:07:34.469 [info] <0.33.0> Application certifi started on node<EMAIL_ADDRESS>2018-11-12 23:07:34.469 [info] <0.33.0> Application ssl_verify_fun started on node<EMAIL_ADDRESS>2018-11-12 23:07:34.469 [info] <0.33.0> Application metrics started on node<EMAIL_ADDRESS>2018-11-12 23:07:34.490 [info] <0.33.0> Application hackney started on node<EMAIL_ADDRESS>2018-11-12 23:07:34.533 [info] <0.33.0> Application bcrypt started on node<EMAIL_ADDRESS>2018-11-12 23:07:34.533 [info] <0.33.0> Application dht_ring started on node<EMAIL_ADDRESS>2018-11-12 23:07:45.431 [error] <0.430.0>@vmq_mqtt_pre_init:determine_protocol_version:83 CRASH REPORT Process <0.430.0> with 0 neighbours crashed with reason: no function clause matching vmq_mqtt_pre_init:determine_protocol_version(<<18,33,0,6,77,81,73,115,100,112,4,192,1,44,0,3,49,50,51,0,5,103,97,116,101,49,0,7,103,97,116,101,...>>) line 83
2018-11-12 23:07:45.431 [error] <0.430.0>@vmq_mqtt_pre_init:determine_protocol_version:83 Ranch listener {{127,0,0,1},1883} terminated with reason: no function clause matching vmq_mqtt_pre_init:determine_protocol_version(<<18,33,0,6,77,81,73,115,100,112,4,192,1,44,0,3,49,50,51,0,5,103,97,116,101,49,0,7,103,97,116,101,...>>) line 83
2018-11-12 23:11:35.929 [error] <0.479.0>@vmq_mqtt_pre_init:determine_protocol_version:83 CRASH REPORT Process <0.479.0> with 0 neighbours crashed with reason: no function clause matching vmq_mqtt_pre_init:determine_protocol_version(<<18,33,0,6,77,81,73,115,100,112,4,192,1,44,0,3,49,50,51,0,5,103,97,116,101,49,0,7,103,97,116,101,...>>) line 83
2018-11-12 23:11:35.930 [error] <0.479.0>@vmq_mqtt_pre_init:determine_protocol_version:83 Ranch listener {{127,0,0,1},1883} terminated with reason: no function clause matching vmq_mqtt_pre_init:determine_protocol_version(<<18,33,0,6,77,81,73,115,100,112,4,192,1,44,0,3,49,50,51,0,5,103,97,116,101,49,0,7,103,97,116,101,...>>) line 83
2018-11-12 23:15:32.367 [error] <0.529.0>@vmq_mqtt_pre_init:determine_protocol_version:83 CRASH REPORT Process <0.529.0> with 0 neighbours crashed with reason: no function clause matching vmq_mqtt_pre_init:determine_protocol_version(<<18,33,0,6,77,81,73,115,100,112,4,192,1,44,0,3,49,50,51,0,5,103,97,116,101,49,0,7,103,97,116,101,...>>) line 83
2018-11-12 23:15:32.368 [error] <0.529.0>@vmq_mqtt_pre_init:determine_protocol_version:83 Ranch listener {{127,0,0,1},1883} terminated with reason: no function clause matching vmq_mqtt_pre_init:determine_protocol_version(<<18,33,0,6,77,81,73,115,100,112,4,192,1,44,0,3,49,50,51,0,5,103,97,116,101,49,0,7,103,97,116,101,...>>) line 83
2018-11-12 23:33:43.431 [error] <0.773.0>@vmq_mqtt_pre_init:determine_protocol_version:83 CRASH REPORT Process <0.773.0> with 0 neighbours crashed with reason: no function clause matching vmq_mqtt_pre_init:determine_protocol_version(<<18,33,0,6,77,81,73,115,100,112,4,192,1,44,0,3,49,50,51,0,5,103,97,116,101,49,0,7,103,97,116,101,...>>) line 83
2018-11-12 23:33:43.432 [error] <0.773.0>@vmq_mqtt_pre_init:determine_protocol_version:83 Ranch listener {{127,0,0,1},1883} terminated with reason: no function clause matching vmq_mqtt_pre_init:determine_protocol_version(<<18,33,0,6,77,81,73,115,100,112,4,192,1,44,0,3,49,50,51,0,5,103,97,116,101,49,0,7,103,97,116,101,...>>) line 83
##########################################################
Environment

VerneMQ Version:
vernemq_1.6.1-1_amd64.deb

OS:
NAME="Ubuntu"
VERSION="16.04.3 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.3 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial

Erlang/OTP version (if building from source):

VerneMQ configuration (vernemq.conf) or the changes from the default

Expected behavior
I am not expecting any crashes.

Please describe the expected behaviour.

Actual behaviour

Please include minimal steps to reproduce the issue, if possible.

@motif007 thanks, this is not VerneMQ crashing.
It's the session process closing due to the client probably sending an incorrect packet. Tellingly the session process crashes in the determine_protocol_version function, so look into that and check for what protocols (4 and 5) you have configured the listener in vernemq.conf

As @ioolkos says this is only the session erroring out. Looking at the data the first byte is 18 / 0x12. According to the MQTT specs (3.1/3.1.1) this first byte should be 16 / 0x10, that is, the first 4 bits are 0001 which specifies the command (connect) and the last 4 bits are unused/zero. The client you're using seem to be sending 0010 in the last 4 bits which is not defined.
So to me it looks like a bad client - VerneMQ is pretty strict about following the spec. That said, it shouldn't show an ugly error like that and I'll create a PR to make it return a more sensible errors for this case.
Can you try with another client to see if you have the same issue?

@ioolkos/@larshesel, Thanks for the comments, considering your feedback I upgraded my client to latest and the error went away. I had least suspension on my client as I got it working with mosquito broker but it was long back. More clear error message will surely help. Thanks for the help!


HIVE-28193: Skip CBO fallback when EXCEPT/INTERSECT/QUALIFY are used

What changes were proposed in this pull request?
Skip hive.cbo.fallback.strategy=CONSERVATIVE|ALWAYS when EXCEPT, INTERSECT, or QUALIFY are used.
https://issues.apache.org/jira/browse/HIVE-28193
Why are the changes needed?
Users see a confusing error message on hitting this problem. They are asked to enable CBO even though they enable CBO.
Does this PR introduce any user-facing change?
Practically, no.
Is the change a dependency upgrade?
No.
How was this patch tested?
I added negative tests to check error messages.

just 1 thing, maybe a new check should be moved to HiveCalciteUtil

Thanks. I looked at the file and I am sure that it is the right place

@okumin FYI, something similar is done in https://github.com/apache/hive/pull/5307

I think @zabetak 's proposal is further better, and the last revision follows it. I tested some cases by hand and verified the approach would likely work in all known cases. I didn't add them to qtest because it sounds overkilling to test all the cases.
0: jdbc:hive2://hive-hiveserver2:10000/defaul> select cast(0 as bigint) = '1' except select cast(1 as bigint) = '1';
Error: Error while compiling statement: FAILED: SemanticException Line 0:-1 Wrong arguments ''1'': Unsafe compares between different types are disabled for safety reasons. If you know what you are doing, please set hive.strict.checks.type.safety to false and make sure that hive.mapred.mode is not set to 'strict' to proceed. Note that you may get errors or incorrect results if you make a mistake while using some of the unsafe features. (state=42000,code=40000)

0: jdbc:hive2://hive-hiveserver2:10000/defaul> select count(*) from (select cast(0 as bigint) = '1' except select cast(1 as bigint) = '1') x;
Error: Error while compiling statement: FAILED: SemanticException Line 0:-1 Wrong arguments ''1'': Unsafe compares between different types are disabled for safety reasons. If you know what you are doing, please set hive.strict.checks.type.safety to false and make sure that hive.mapred.mode is not set to 'strict' to proceed. Note that you may get errors or incorrect results if you make a mistake while using some of the unsafe features. (state=42000,code=40000)

0: jdbc:hive2://hive-hiveserver2:10000/defaul> with x as (select cast(0 as bigint) = '1' except select cast(1 as bigint) = '1') select count(*) from x;
Error: Error while compiling statement: FAILED: SemanticException Line 0:-1 Wrong arguments ''1'': Unsafe compares between different types are disabled for safety reasons. If you know what you are doing, please set hive.strict.checks.type.safety to false and make sure that hive.mapred.mode is not set to 'strict' to proceed. Note that you may get errors or incorrect results if you make a mistake while using some of the unsafe features. (state=42000,code=40000)

0: jdbc:hive2://hive-hiveserver2:10000/defaul> set hive.optimize.cte.materialize.threshold=1;
No rows affected (0.005 seconds)
0: jdbc:hive2://hive-hiveserver2:10000/defaul> set hive.optimize.cte.materialize.full.aggregate.only=false;
No rows affected (0.006 seconds)
0: jdbc:hive2://hive-hiveserver2:10000/defaul> with x as (select cast(0 as bigint) = '1' except select cast(1 as bigint) = '1') select count(*) from x;
Error: Error while compiling statement: FAILED: SemanticException Line 0:-1 Wrong arguments ''1'': Unsafe compares between different types are disabled for safety reasons. If you know what you are doing, please set hive.strict.checks.type.safety to false and make sure that hive.mapred.mode is not set to 'strict' to proceed. Note that you may get errors or incorrect results if you make a mistake while using some of the unsafe features. (state=42000,code=40000)

0: jdbc:hive2://hive-hiveserver2:10000/defaul> select cast(key as bigint) = '1' from src qualify row_number() over (partition by key order by value) = 1;
Error: Error while compiling statement: FAILED: SemanticException Line 0:-1 Wrong arguments ''1'': Unsafe compares between different types are disabled for safety reasons. If you know what you are doing, please set hive.strict.checks.type.safety to false and make sure that hive.mapred.mode is not set to 'strict' to proceed. Note that you may get errors or incorrect results if you make a mistake while using some of the unsafe features. (state=42000,code=40000)

0: jdbc:hive2://hive-hiveserver2:10000/defaul> select count(*) from (select cast(key as bigint) = '1' from src qualify row_number() over (partition by key order by value) = 1) x;
Error: Error while compiling statement: FAILED: SemanticException Line 0:-1 Wrong arguments ''1'': Unsafe compares between different types are disabled for safety reasons. If you know what you are doing, please set hive.strict.checks.type.safety to false and make sure that hive.mapred.mode is not set to 'strict' to proceed. Note that you may get errors or incorrect results if you make a mistake while using some of the unsafe features. (state=42000,code=40000)

0: jdbc:hive2://hive-hiveserver2:10000/defaul> with x as (select cast(key as bigint) = '1' from src qualify row_number() over (partition by key order by value) = 1) select count(*) from x;
Error: Error while compiling statement: FAILED: SemanticException Line 0:-1 Wrong arguments ''1'': Unsafe compares between different types are disabled for safety reasons. If you know what you are doing, please set hive.strict.checks.type.safety to false and make sure that hive.mapred.mode is not set to 'strict' to proceed. Note that you may get errors or incorrect results if you make a mistake while using some of the unsafe features. (state=42000,code=40000)

0: jdbc:hive2://hive-hiveserver2:10000/defaul> set hive.optimize.cte.materialize.threshold=1;
No rows affected (0.006 seconds)
0: jdbc:hive2://hive-hiveserver2:10000/defaul> set hive.optimize.cte.materialize.full.aggregate.only=false;
No rows affected (0.006 seconds)
0: jdbc:hive2://hive-hiveserver2:10000/defaul> with x as (select cast(key as bigint) = '1' from src qualify row_number() over (partition by key order by value) = 1) select count(*) from x;
Error: Error while compiling statement: FAILED: SemanticException Line 0:-1 Wrong arguments ''1'': Unsafe compares between different types are disabled for safety reasons. If you know what you are doing, please set hive.strict.checks.type.safety to false and make sure that hive.mapred.mode is not set to 'strict' to proceed. Note that you may get errors or incorrect results if you make a mistake while using some of the unsafe features. (state=42000,code=40000)

Thanks a lot!


Active menu is wrong

The active menu of backpack is wrong if you have an external link.
For example:
If you have 3 menu (Plans, Users, Google)
Google menu is active by default (its wrong).
If you enter  in Plans and edit an item the Google menu is active with Plan.
Image of example.

In the image only "Planes" need be active.

Hello @maganius thanks for the report.
Unfortunatelly I could not reproduce your issue:

 {{ trans('backpack::base.dashboard') }}

 Bazingas

 external

I see you changed sidebard css so I guess is something wrong with your code.
If not, please help me here to reproduce it :)
Thanks again,
Pedro

@pxpm you need edit an entry not in the list, try it

I am sorry @maganius but that does not allow to reproduce it too.

Anything else I should try ?
Thanks,
Pedro

its strange, I have this versions:
PHP 7.4.16 (cli) (built: Mar 25 2021 12:56:19) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.16, Copyright (c), by Zend Technologies
LARAVEL VERSION:
v8.48.1@edc138060a13c9e5f15c005fad5f6a39b4ccf5fa
BACKPACK VERSION:
4.1.48@53bc6028f445f9b2ecfb8893283f6b6087539353
This is my menu

 Usuarios

 Empresas

 Planes

 Dispositivos

 Visitar sitio

I don't know exactly why when I edit any entry my external link is set as active also.
I don't edited any css.

@maganius maybe the output of route('home') and backpack_url('plan') is similar - indeed if too much of the resulting URLs is similar, the JS might make two menus active instead of one. What's their output?
Cheers!

@pxpm if you make two crud operation or suppose two side bar has prefix same name like
 {{ trans('backpack::base.dashboard') }}
 Bazingas
I mean two sidebars' url prefix are same and after the hyphen has a different name, then this issue has arisen.


ULTRA Add west-south traffic in cross intersections

To expose the ego vehicle to oncoming cars once it has completed the left turn and it is going westbound.
More details to come.
Side tasks:

[x] Add traffic density based levels to taskX

Changes proposed in PR are outdated and some are not required. Closing this PR