datastore: Struct tag to Omit Empty

So there doesn't seem to be a way to omit keys from a struct that are being saved to Datastore if the values are empty. The json.Unmarshal has the tag "omitempty" I am wondering if there is a way we can add this to the SDK for datastore:"keyName,omitempty".
We have a use case where we will have millions of records that may or may not have a certain key on them. I'd hate to see there be all of these empty keys be indexed if they do not exist. Maybe I am going about this wrong, but I could see this being a valuable concept to save storage and memory.
Example
type MyStruct struct {
	SomeID string                 `datastore:"someId,omitempty" json:"someId,omitempty"`
}

Current Solution:
I believe a current solution is the use the PropertyLoadSaver to omit the keys, but in the long run it could be much simpler to just do through tags.

/cc @okdave @zombiezen

very useful, when it will be added?

@patrickml just to clarify before I start implementation, you are hoping to use the omitempty tag option to completely omit empty struct fields from the Entity on creation. Not to partially-update an Entity, as is often the use-case for omitempty with the JSON package for an HTTP-based REST API.
Is that correct?

@adams-sarah sounds right to me... this is the comment from JSON package:
// The "omitempty" option specifies that the field should be omitted // from the encoding if the field has an empty value, defined as // false, 0, a nil pointer, a nil interface value, and any empty array, // slice, map, or string.

@adams-sarah correct for example
If given this struct
type MyStruct struct {
	ID string                            `datastore:"id" json:"id"`,
        NickName string             `datastore:"nickName,omitempty" json:"nickName,omitempty"`,
        Name string                    `datastore:"name" json:"name"`,
}

When I initialize it without NickName
m := MyStruct{
   Name: "John"
}

Then I should expect that ID and Name are stored with a key, but NickName should not exist as a key on the document
{
   id: "",
   name: "John"
}

Excellent. Thanks for clarifying. I will start on this today.

Sounds like a good feature – you'll just need to be really clear what effect it has on sub-structs. I'm guessing something like noindex would work well there?

@okdave Well, that would definitely make life simpler. But I am not sure the same behavior of propagating the tag down to substructs makes sense logically. That would mean that if you had an omitempty tag on one parent struct field, all fields of all substructs and their substructs would be omitted if empty. Do you think that's the right behavior?

Yeah, I'm not sure. Seems like the alternatives are:

all sub-fields are omitted if empty – easy to implement, consistent with noindex
the sub-struct is only omitted if all its fields are zero – seems difficult to implement, and tough to understand (maybe easier with pointers-to-structs though)?
omitempty is not supported at all on sub-structs – sounds good, but I'd fail hard so you can change your mind later

Either (1) or (3) seem sensible. I can't think of any other possible behaviours, but I'm sure there are other options.

tl;dr: (3)
I now think that the right question to ask when dealing with struct mapping issues like this is: "What would json do?" encoding/json, that is. We should strive to match its behavior, since it's a heavily used package in the standard library.
https://play.golang.org/p/1XF9MP8wC0 shows encoding/json's "omitempty" behavior on:

a field of type slice of structs
a field of type struct
an embedded struct without a name tag
an embedded struct with a name tag

(The last two are different because encoding/json treats an embedded struct with a name tag just like an ordinary named field of struct type.)
omitempty doesn't apply to a one-element slice even if that one element is an empty struct. It also doesn't apply in the other three cases.
This behavior is consistent with the documentation of Unmarshal, which says:

Each exported struct field becomes a member of the object unless...the field is empty and its tag specifies the "omitempty" option. ... The empty values are false, 0, any nil pointer or interface value, and any array, slice, map, or string of length zero.

It doesn't talk about structs in that list, so we can assume they're never "empty". (I wish the doc was more explicit about that, though.)
The implementation is in the isEmptyValue function if you're curious.

By the way, I agree with @okdave that we should return an error if omitempty is used for a type that can never be empty, rather than just ignoring it.

@jba returning an error if the type could never be empty is not the behavior of encoding/json.
I agree that we should keep the behavior of the two identical, and thus I do not think we should return an error.
I have documented the types which can be empty in doc.go, and that the behavior is identical to encoding/json.


Unhandled error during execution of scheduler flush

Vue version
3.3.4
Link to minimal reproduction
https://stackblitz.com/edit/vitejs-vite-2prrdk?file=src%2Fcomponents%2FDashboard.vue,src%2Fcomponents%2FInventoryTable.vue,src%2Fcomponents%2FProductTable.vue&terminal=dev
Steps to reproduce
I have two files the first file name "InventoryTable" and the other one file name is "ProductTable this two file are already link in my dashboard and I am in the dashbord page and when I click the Inventory button which is the ProductTable file
What is expected?
The table column should displayed as well as the dynamic column name
What is actually happening?
console error throw message: runtime-core.esm-bundler.js:41 [Vue warn]: Unhandled error during execution of scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core and shared.esm-bundler.js:81 Uncaught (in promise) RangeError: Maximum call stack size exceeded at Function.defineProperty () at def (shared.esm-bundler.js:81:1) at markRaw (reactivity.esm-bundler.js:949:1) at setupStatefulComponent (runtime-core.esm-bundler.js:7227:1) at setupComponent (runtime-core.esm-bundler.js:7197:1) at mountComponent (runtime-core.esm-bundler.js:5599:1) at processComponent (runtime-core.esm-bundler.js:5565:1) at patch (runtime-core.esm-bundler.js:5040:1) at mountChildren (runtime-core.esm-bundler.js:5284:1) at mountElement (runtime-core.esm-bundler.js:5191:1)
System Info
No response
Any additional comments?
No response

Please ensure your reproduction can reproduce your problem.

I have a similiar issue:  https://github.com/nuxt/nuxt/issues/22552
Here is a minimal reproduction:
https://play.vuejs.org/#__SSR__eNp9Ustu2zAQ/JUFL5IBWTrkZsgp2iCHFugDbdATL4JE20wokiBXqgtB/94lKStCUORka3d2OLOzE/tobTkOgh1YjaK3qkFxzzVA3ckx/AKM+5NxR87ysVGDKEA3vdiB1OCEHxRylmCHF/GXUKGbSpGGiMZ927huj+KKSwlgmiCywTwvqOotrK5IAf2rq40u+vStkxbBCxxsBMreGofw+4HGn2gaTs70kJXVWimffRZmV+wERn81g0bRFWSjaVGOpGWZpHUQHKA12uPiEo4rLp+SZPJ7gCwrwte8S/wrbZ7v4HgPCzRxlDRBPFl0Hl8IY3WVHJEXVjD09OpJnkmy0RRKJOCsNb2VSrjvFiWp4uxwo+asUcr8+RJr6CigW729iPblP/Vnfw01zn6QLOFGimvtYePOgiIN7cdf32h3m2ZvukER+p3mT+GNGoLGBPs06I5kb3BR7ecYg9TnJ/94RaH9zVQQGhcT8ZxRFA/vWH+Ve1fexTmuZ9riNnla4pp6J05SR0ajhcYCLrfQ41PhbrkW14gmbBOCfzOT0o/XB7l1xvqCiL0y6CnO18BxcBrSEVzyjE45C7hWNd7T1WyOPSOzab5cnvxQ5js6jORmx+Z/QyQyPw==

@DiscreteTom
I don't think this is similar to this issue and your problem is a duplicate of https://github.com/vuejs/core/issues/7215

same issue has been warn in console.

@SATHISH099
please provide a minimal runnable reproduction.

Closing as no reproduction has been provided for the supposed problem

Is it solved ？ I'm having the same issue

There is nothing to solve as no reproduction of thr issue was provided. So - no.


docs: update the readme's "Developer Toolkit" and Roadmap links

This PR updates the links to https://newrelic.github.io/developer-toolkit/ which is no longer wokring.
This includes:

The link at the top of the readme leading to the "Developer Toolkit"
The link to the roadmap

The former was replaced by the same link to Developer ToolKit found in the readme. under the section Community Support.
The latter was hard to find and the closest that I could come up was with RFC: Developer Toolkit Roadmap - 2020.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

Thanks for making these changes @emo-slido I need to spend some time updating these posts and website. I will edit and merge this once I've made those changes.

Thanks for making these changes @emo-slido I need to spend some time updating these posts and website. I will edit and merge this once I've made those changes.

Thanks, I'm still waiting for my company's Legal Department to give me the green-light to sign the CLA. I don't know how long it will take.
If you do make the fix yourself, feel free to close the PR.

Hi @emo-slido, we ended up getting this updated in another PR, but we really appreciate you posting about it and attempting a fix.


TypeError: a is null

The map is not showing when i load the site. When inspected, i get this error.
Tried using the example
Head:
<%= render 'layouts/gmaps' %>
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
<%= yield :javascripts %>
<%= csrf_meta_tags %>
<%= render 'layouts/shim' %>
JS:
handler = Gmaps.build('Google');
handler.buildMap({ internal: {id: 'one_marker'}}, function(){
markers = handler.addMarkers([
{
lat: 0,
lng: 0,
picture: {
url: "https://addons.cdn.mozilla.net/img/uploads/addon_icons/13/13028-64.png",
width:  36,
height: 36
},
infowindow: "hello!"
}
]);
});
view:

Sorry I cant help with so little information.
All examples work fine on the live version here: http://apneadiving.github.io/
So I bet there is a rails config you missed but its not really part of the gem so I have to close the issue


ColorFilter doesn't handle transparency of images

Scenario
Using ColorFilter to increase the brightness of an image when receiving focus from the user. For example a button.
Issue

Color is a required field.
Transparent areas are filled with the color.

Desired
ColorFilter should ignore transparent bits.

Does it work if you set the blend mode to BlendMode.dstIn ?

Well we either need to fix it, or explain it better, certainly.

For example, if there is an image, for example some sort of shape that isn't a rectangle, any BlendMode will make the transparent area the color as well. The issue I'm having is that the transparent areas should stay transparent, or at least for some BlendMode.

If you have the opportunity to post some sample code here that shows the issue, that would help us in improving the feature and/or the documentation.

@Hixie This should be easy to reproduce. Try:
Image.network(
                "https://raw.githubusercontent.com/rockingdice/mhw_main/master/images/icon_monster_33.png",
                color: Colors.red,
                colorBlendMode: BlendMode.multiply)

or replace the image URL to one with a transparent channel.
You should see the background is blended to red color, which should be transparent.
I'm looking for a way to fix it because my app heavily relies on this feature, all the icons should be blended with a color by BlendMode.multiply.

Maybe @chinmaygarde or @abarth can help too?
Really a blocker for my project.

Need more love here...
I think the blend mode is a basic function for manipulating images. It's quite common to use in images
process applications.

I got this issue too.
Seems ColorFilter.matrix(List matrix) is ready in flutter.
Why not modify Image Widget to fix it?

This is really common and very much needed. It seems we can change the colour of icons no problem, and transparent images are basically the same thing. Images in UIs pretty much always have transparency too.

FYI, you can use BlendMode.modulate to change the color of an image while keeping its' alpha unchanged.

Hmm yeah that does appear to work. Not sure why nobody mentioned that here before.

I have to say the blend modes are not quite equivalent to the ones from OpenGL.

This is an essential feature, basically we can't greyscale a transparent widget... You should do something about it

BlendMode.modulate works and respects transparency.  Thanks!

Turn an image to grayscale
Code Sample
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Material App',
      theme: ThemeData.dark(),
      home: Home(),
    );
  }
}

class Home extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Material App Bar'),
      ),
      body: Center(
        child: ColorFiltered(
          colorFilter: ColorFilter.mode(
            Colors.grey,
            BlendMode.saturation,
          ),
          child: Image.network(
            'https://i.imgur.com/C5xknx8.png',
          ),
        ),
      ),
      floatingActionButton: FloatingActionButton(
        child: Icon(Icons.add),
        onPressed: () {},
      ),
    );
  }
}

Preview

BlendMode.modulate doesn't work when aiming at a grayscale image, currently nothing handling transparency does.

I've recently looked at this problem as well and found that the answer is more deeply placed in the Flutter documentation.
Using the matrix transformation with the following magic numbers
  // a matrix definition of a greyscale filter
  // see https://api.flutter.dev/flutter/dart-ui/ColorFilter/ColorFilter.matrix.html
  // see https://www.w3.org/TR/filter-effects-1/#grayscaleEquivalent
  static const ColorFilter greyscale = ColorFilter.matrix(<double>[
    0.2126, 0.7152, 0.0722, 0, 0,
    0.2126, 0.7152, 0.0722, 0, 0,
    0.2126, 0.7152, 0.0722, 0, 0,
    0,      0,      0,      1, 0,
  ]);

and used as follows in the ColorFiltered widget:
ColorFiltered(colorFilter: greyscale, child: Image.asset('colour_wheel.png'))
will do the trick.
Image file:

Sample render:

Perhaps the docs need to be updated to make this "hidden" feature a bit more prominent? The matrix transformations are very powerful and respect transparency.

This works @Charybdis , thank you! It should be made more accessible tho.

Blending on top of a transparent layer is simply not something that is possible out of the box in any image processing solution for most blending modes. It is not something to be expected of BlendMode's in Flutter. You can see this by opening Photoshop, Gimp, or just the free online photo editing site Photopea and following these steps:

Add a png with transparent background to the canvas.

Use the Rectangle tool (U) to create a filled rectangle and make sure the layer is on top of the png.

Change the Blending Mode of the rectangle layer to literally anything and observe how the image is either obscured or no longer on a transparent background.

A common workaround (applicable only if masking is supported) is mentioned in this Adobe Community question. In any case this cannot be considered an issue with Flutter (or Dart). That being said I will keep this issue open due to the large amount of interest in better support for grayscale (saturation/hue transformations in general) and better documentation for ColorFilter and ColorFiltered.

Thanks @markusaksli-nc. An email notification has promted me to return to the thread.
With a bit more reading of Flutter documentation I've noticed the Porter/Duff compositing mode is mentioned in a few places, and this is a good primer on how it works: Porter/Duff compositing and blend modes. The lightbulb moment about why "blending" is the way it is comes from this sentence:

Despite being referred to as alpha blending and despite alpha often being used to model opacity, in concept Porter/Duff is not a way to blend the source and destination shapes. It is way to overlay, combine and trim them as if they were pieces of cardboard.

Rightly or wrongly folks often approach technical documentation as a means to solve their problem. It most cases it doesn't sound like it should be complex problem either, but the obvious attempts at solutions haven't worked.
I would suggest that a higher level primer on orienting oneself in the image processing pipeline in Flutter might be useful (pointing out what is industry standard, what is value add, and the conceptual model for colour processing), over and above asking folks to work out for themselves what happened from a series of examples?
So thank you for leaving this open as a documentation update.

@markusaksli-nc Blending a rectangle on top of a PNG indeed does not take the PNG into account. However, most image editors do have blending options for the layers themselves, which do take alpha into account.
To try this in Photopea:

Insert a transparent PNG
Right-click the layer with the PNG
Choose "Blending options"
Check "Color overlay"

It's also worth mentioning that the "setColorFilter" method in Android's ImageView DOES take the alpha of an image into account — I personally used it to successfully turn an image grayscale.
I would expect the same feature set from Flutter.
If Flutter's ColorFilter is not the right class to add this to, then I'd suggest to simply rename this issue to be a bit more generic. The core of the issue is still relevant and implementable — being able to set a color filter that takes the alpha channel into account.

@12people You are correct, there are any number of simpler transformations which do take the alpha of the PNG into account. My point was simply that the original discussion was a bit misguided, as this https://github.com/flutter/flutter/issues/12990#issuecomment-417942688 cannot be expected by default of BlendMode.multiply and that this is not a bug.
The focus here should rather be on grayscale and those other simpler transformations that do not need blending multiple layers which currently can only be done with blending layers or writing a custom matrix. The implementation of this is what people are actually confused/frustrated about. I would regard the grayscale matrix and your native Android solution as unnecessarily low-level workarounds.
I agree that this feature set should be expected of flutter and that the tools for it already exist. In my personal opinion, ColorFilter (more importantly the ColorFiltered widget) is the perfect place for this. The team can always retitle the issue as they see fit though.

I've recently looked at this problem as well and found that the answer is more deeply placed in the Flutter documentation.
Using the matrix transformation with the following magic numbers
  // a matrix definition of a greyscale filter
  // see https://api.flutter.dev/flutter/dart-ui/ColorFilter/ColorFilter.matrix.html
  // see https://www.w3.org/TR/filter-effects-1/#grayscaleEquivalent
  static const ColorFilter greyscale = ColorFilter.matrix(<double>[
    0.2126, 0.7152, 0.0722, 0, 0,
    0.2126, 0.7152, 0.0722, 0, 0,
    0.2126, 0.7152, 0.0722, 0, 0,
    0,      0,      0,      1, 0,
  ]);

and used as follows in the ColorFiltered widget:
ColorFiltered(colorFilter: greyscale, child: Image.asset('colour_wheel.png'))
will do the trick.
Image PNG file (note that there are white bars to the left/right of the colour wheel):

Sample render:

Perhaps the docs need to be updated to make this "hidden" feature a bit more prominent? The matrix transformations are very powerful and respect transparency.

Even for a feature like hue rotation (one line in SwiftUI), with BlendModes it was impossible to just change the color of an image without its container's background.
Now, there is a package for this specific use case that implements ColorFilter.matrix:
https://pub.dev/packages/hue_rotation
It would be nice for users to be able to use certain BlendModes (like hue) while keeping transparency transparent.

To expand on the suggestion by @Charybdis, which uses ColorFilter.matrix to turn the image into grayscale, here is a function that returns matrix which tints the image based on the input tintColor Color (and turns into monochrome).
// https://developer.squareup.com/blog/welcome-to-the-color-matrix/
ColorFilter tintMatrix ({
  Color tintColor = Colors.grey,
  double scale = 1,
}) {

  final int r = tintColor.red;
  final int g = tintColor.green;
  final int b = tintColor.blue;

  final double rTint = r / 255;
  final double gTint = g / 255;
  final double bTint = b / 255;

  final double rL = 0.2126;
  final double gL = 0.7152;
  final double bL = 0.0722;

  final double translate = 1 - scale * 0.5;

  return ColorFilter.matrix(<double>[
    (rL * rTint * scale), (gL * rTint * scale), (bL * rTint * scale), (0), (r * translate),
    (rL * gTint * scale), (gL * gTint * scale), (bL * gTint * scale), (0), (g * translate),
    (rL * bTint * scale), (gL * bTint * scale), (bL * bTint * scale), (0), (b * translate),
    (0                 ), (0                 ), (0                 ), (1), (0            ),
  ]);
}

Here is the widget -
ColorFiltered(colorFilter: tintMatrix(tintColor: Colors.red, scale: 0.5), child: Image.asset('your_image.png'))
tintColor is the desired color of the tint, and scale determines contrast between different values of colorTint. Where scale: 0.0 would result in an image totally coloured by tintColor, and scale: 10.0 would totally blow up the contrast.

For example, if there is an image, for example some sort of shape that isn't a rectangle, any BlendMode will make the transparent area the color as well. The issue I'm having is that the transparent areas should stay transparent, or at least for some BlendMode.
EDIT: Try BlendMode.modulate

very userful, this works very fine for me

Hue
Image.asset(
                "assets/adidas.png",
                color: Colors.green,
                width: double.infinity,
                height: double.infinity,
                colorBlendMode: BlendMode.hue,
              ),

Modulated
Image.asset(
                "assets/adidas.png",
                color: Colors.green,
                width: double.infinity,
                height: double.infinity,
                colorBlendMode: BlendMode. modulate,
              ),

I'm expecting hue result with no change on alpha layer..
which can't be met by using BlendMode.modulate

Little workaround for circular image with transparent background: You can clip the unwanted background by using ClipRRect.
Example:
ClipRRect(
  borderRadius: BorderRadius.circular(50),
    child: ColorFiltered(
      colorFilter: ColorFilter.mode(
        Colors.teal,
        BlendMode.values[index],
      ),
   child: Image.asset('assets/bead-2.png'),
  ),
),

Before:

After:

I am using this to greyscale a transparent widget:
class Greyscale extends StatelessWidget {

  static const ColorFilter identity =
      ColorFilter.matrix(<double>[1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0]);

  static const ColorFilter greyscale = ColorFilter.matrix(<double>[
    0.2126,    0.7152,    0.0722,    0,    0,    0.2126,    0.7152,    0.0722,    0,    0,    0.2126,    0.7152,    0.0722,    0,    0,    0,    0,    0,    1,    0
  ]);

  final Widget child;
  final bool apply;

  const Greyscale({Key? key, required this.child, this.apply= true}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return ColorFiltered(
      colorFilter: apply ? greyscale : identity,
      child: child,
    );
  }}

This is based on @nohli 's matrix above.

Hey guys, is there a matrix for color dodge which takes care of alpha channel?
Or is there a matrix just turn solid white into transparent?
I'm trying with this but have no luck.
//trying to modify alpha channel to change solid white color transparent.
ColorFilter.matrix([
        ...[1, 0, 0, 0, 0],
        ...[0, 1, 0, 0, 0],
        ...[0, 0, 1, 0, 0],
        ...[255, 255, 255, 0, -764],
      ]);

Original Image:
Hue
Image.asset(
                "assets/adidas.png",
                color: Colors.green,
                width: double.infinity,
                height: double.infinity,
                colorBlendMode: BlendMode.hue,
              ),

Modulated
Image.asset(
                "assets/adidas.png",
                color: Colors.green,
                width: double.infinity,
                height: double.infinity,
                colorBlendMode: BlendMode. modulate,
              ),

I'm expecting hue result with no change on alpha layer.. which can't be met by using BlendMode.modulate

Hi so I have currently the same Problem and I am getting nuts because I want to use Hue without the transparent bits to get colored and modulate isn't what I want. Also I need to use sth like modulate because I have a Stack of Images underneth so just adding a White container won't do the trick. I even gone so far to write a pixel based solution to remove after applying the hue filter the background but this is much much to inefficient. Help would be much appreciated.
https://stackoverflow.com/questions/77216619/colorfiltered-overflows-image?noredirect=1#


Untitled-1 File created after close folder

VSCode Version: Code 1.13.1 (379d2efb5539b09112c793d3d9a413017d736f89, 2017-06-14T18:21:47.485Z)
OS Version: Windows_NT ia32 10.0.14393
Extensions:

Extension
Author
Version

Go
lukehoban
0.6.62

Steps to Reproduce:
1.Open Folder...
2.Close Folder. New file "Untiled-1" created automatically.

You can enable the setting for viewing the welcome page, then this file isn't generated. Having a blank workspace is not supported, yet, but there's a feature request.

-- Sorry for the English, I used Google Translator --
@aliveit But in the next version (1.14.0), which is on the Insiders channel to an option "workbench.startupEditor", if you set "none" you can close the folder without having to open a blank file or the Welcome page !! I do not know if it solves your problem.

That should solve the issue, please give it a try in the upcoming release 1.14 or the insiders build. Thanks.

Oh... Totally missed that feature...


Some units are called "pixel" while others are called "pixels"

Suggested to either keep consistent naming, or modify transformTokens.js line 9 to read     return (token.unit === 'pixel' || token.unit === 'pixels') && token.value !== 0

Hey @mwargan thanks for raising this. Can you let me know which units are called 'pixels'? I have a hard time finding it in the code base. Thanks.

@lukasoppermann so far for me only lineHeight has been plural.

Hey @mwargan this should be fixed in the latest plugin release.


fix(argos): waiting for images decoding

Pre-flight checklist

[x] I have read the Contributing Guidelines on pull requests.
[ ] If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.
[ ] If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.

Motivation
Test Plan

Test links

Deploy preview: https://deploy-preview-_____--docusaurus-2.netlify.app/
Related issues/PRs
Fix https://github.com/facebook/docusaurus/issues/9805

Thanks
@gregberge wouldn't you want this to be included automatically in your Argos Playwright integration package?
https://github.com/argos-ci/argos-javascript/tree/main/packages/playwright

@axel7083 we'll probably add this on the Argos playwright integration, but in its current form, your code doesn't seem to fix the flakiness issue.

@axel7083 we'll probably add this on the Argos playwright integration, but in its current form, your code doesn't seem to fix the flakiness issue.

Yeah I thought it would, but apparently not - that's a bit annoying actually

Seems to be working, Argos only reports the expected visual diff in this PR now: https://github.com/facebook/docusaurus/pull/9868


Add support for custom settings

Similar to how #65 discusses the ability to add custom namespaces to support custom bind:: and body:: properties for questions, it would be very useful to be able to add custom global properties in the settings sheet.
e.g.  The column head::esri::somethingglobal in settings containing the value The Value might translate into the xml as
<?xml version="1.0"?>
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:esri="http://esri.com/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:orx="http://openrosa.org/xforms/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <h:head>
    <h:title>My Survey</h:title>
    <esri:somethingglobal>The value</esri:somethingglobal>

   ...

A feature like this make sense to me for use cases where the style column is not appropriate.
Commcare seems to have also looked into this as well. Their approach is to add secondary (external) instances. I think I like that approach better as the submitted record does not include these readonly variables. It's nicely separated.  A namespaced internal secondary instance or a jr://-uri-non-namespaced external secondary instance (like these) would both seem appropriate to me.
What do you think?
P.S. not immediately clear how to describe this in XLSForm, but we can figure that out after the XForm syntax.

Is this now addressed by external instance support #107?
I do think it would be nicer if instances could be generated from the choices sheet and internal secondary instances could be specified as I mentioned at https://github.com/XLSForm/pyxform/issues/107#issuecomment-353414375 Are those ready to file as issues or should there be more discussion around them?

Are those ready to file as issues or should there be more discussion around them?

I think so.
I also think this issue can be closed now.


Sign message error

step1:
open the opensea.io, and connect walletconnect
step2:
open  profile -> collected, and open the own collect.
step3:
click the sell button, to sell my collect.
step4:
set the price, click "Complete listing" button, then click "unlock" button
step5:
click "sign" button in walletconnect.
then error:
There was an error with your transaction. Please try again.

Check with https://github.com/Orange-Wallet/wallet-connect-dart/commit/aa1b2408f9c5789407b86039ccbff1c19dd07f9c

Fixed with https://github.com/wakumo/eth-sig-util/commit/0fd33b2e91b223ed547cae26779fb1fa7b32e8ce So eth_sig_util: ^0.0.6 onwards you won't have this issue.


MB-1947: PreconditionFailed Error More Descriptive

Description
What the title says.
Setup
make server_run

Using Postman, make a request to the update mto shipment endpoint with a bad eTag.
Code Review Verification Steps

[ ] Request review from a member of a different team.
[ ] Have the Jira acceptance criteria been met for this change?

References

Jira story for this change

Nice - I'll add this to the other endpoints as well.

@ralren would it be a lot more work to add this to the other endpoints in this PR? I think that would be within the scope of the story.

Shoot, @LeDeep , I saw your message after merging.

Shoot, @LeDeep , I saw your message after merging.

no worries. I'll leave it up to you and @garrettqmartin8 as to who wants to do the remaining endpoints.

@LeDeep I'll add them in #3732


Physiological processes

OGMS currently does not have a term for normal bodily processes. The term
BodilyProcess has only one child -  PathologicalBodilyProcess. We can add
PhysiologicalBodilyProcess as another child of BodilyProcess.
E.g: Hemoglobin oxygen binding, breathing, sleep process, swallowing, cardiac
cycle, etc.

Original issue reported on code.google.com by<EMAIL_ADDRESS>on 16 Sep 2009 at 6:32

Closed ticket because issues has not been acted upon in reasonable amount of time.


BCO_067092/1.0 Page fails to load

Describe the bug
A clear and concise description of what the bug is.
When navigating to https://www.biocomputeobject.org/objects/view/https/biocomputeobject.org/BCO_067092/1.0 on

safari v15.2
firefox v95.0.2
chrome v96.0.4664.110

the page does not load. The console shows the following error:
TypeError: null is not an object (evaluating 'o.apiinfo')

To Reproduce
Steps to reproduce the behavior:

Go to https://www.biocomputeobject.org/objects/view/https/biocomputeobject.org/BCO_067092/1.0
Note that the page doesn't load
Open devtools console
See error

Expected behavior
A clear and concise description of what you expected to happen.
page does indeed load
Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

OS: MacOS Monterey v12.1
Browser: safari v15.2 / firefox v95.0.2 / chrome v96.0.4664.110

Additional context
Add any other context about the problem here.
N/A

@Rosswell
Thanks for the detailed bug report! We have pushed a patch for this issue.


http: proxy error: malformed HTTP response ""

Hi
This might be more of an "FYI" than a bug - but I thought it was worth noting.
I've just had an issue pointing the proxy at Nginx (running mediawiki and php5-fpm).
On a small percentage of requests, I'd receive this error from oauth2_proxy. It mostly occurred on reloads (which probably meant that if-modified-since request was being sent - which might return a blank body):
http: proxy error: malformed HTTP response ""

After some debugging, I found that turning off keepalives on the "upstream" nginx solved the problem:
/etc/nginx/sites-available/whatever-upstream:
keepalive_timeout 0;

I've got a network dump that appears to include nginx responding with an extraneous blank line in the 304 not modified response. I'm not sure if there's anything oauth2 proxy can do to ignore this, or if I should be logging something with the nginx folk... :)
GET ...  HTTP/1.1
Host: ...
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/600.7.12 (KHTML, like Gecko) Version/8.0.7 Safari/600.7.12
Accept: */*
Accept-Encoding: gzip, deflate
Accept-Language: en-us
Authorization: Basic b3NrYXIucGVhcnNvbjo=
Cache-Control: max-age=0
Cookie: ...
Dnt: 1
If-Modified-Since: Sun, 19 Jul 2015 18:42:34 GMT
Referer: https://...
X-Forwarded-Email: ...
X-Forwarded-For: <IP_ADDRESS>
X-Forwarded-User: ...
X-Real-Ip: ...
X-Scheme: https

HTTP/1.1 304 Not Modified
Server: nginx/1.4.6 (Ubuntu)
Date: Sun, 19 Jul 2015 18:59:29 GMT
Connection: keep-alive
X-Powered-By: PHP/5.5.9-1ubuntu4.11
X-Content-Type-Options: nosniff

GET /skins/common/images/Unboxed_logo_wiki.gif HTTP/1.1

Version info:

oauth2_proxy-2.0.1.linux-amd64.go1.4.2
Ubuntu 14.04.2 LTS
1.4.6-1ubuntu3.2

@oskarpearson Thanks for taking the time to report this. It's also to me why this might be happening, but i'll try to do some investigating in case this is a problem on the oauth2_proxy side.


CI: Hard code Intel Classic compiler versions

During the github action workflow for the intel classic compilers, there appears to be a version mismatch between the intel C++ compilers and the intel fortran compilers. This was causing ifort to not be found after sourcing setvars.sh in the intel oneAPI directory. Hardcoding the package versions during installation from APT fixes the issue in my forked copy

@SamuelBrady maybe you could review this?

Ah yes, @julianakwan was working on this (#244). Since the Intel Classic Compilers are now deprecated, we were thinking of switching the workflow to use the new Intel LLVM compilers (icpx and ifx).
I guess we could keep the existing workflow with hardcoded versions (though I would make these the latest possible version e.g 2023.2.4) and add a new workflow for the llvm compilers.

Awesome, I updated the compiler versions to the latest (2023.2.4) per @mirenradia suggestion. The latest version of the math kernel library is 2023.1.0. I naively set it to 2023.2.4, but that package doesn't exist, so I made another commit with all packages hardcoded to their latest versions. With that, the tests successfully complete on my fork

I think there's a 2023.2.0 version of the intel-oneapi-mkl package.

Ah, didnt realize that one existed. Changed to that version in the latest commit. For reference, I've been using this list for the latest intel oneAPI packages:
https://oneapi-src.github.io/oneapi-ci/#linux-web-installer

Confusingly, intel-oneapi-mkl-2023.2.0 is there under "Linux,APT" but I don't think the list is completely ordered.

Hi Shaun, to get intel-classic-tests.yml to download ifort I used intel-oneapi-ifort, which confusingly isn't on the list (I think Miren found it actually) but now it complains about the debug flags. Since your version is working, I can create a new workflow with the intel-llvm compilers instead?
Would this be okay with you @mirenradia ?

Yes, let's use this hardcoded version of the classic compilers and create a separate workflow for the LLVM compilers.

Ok, so then if this works for @SamuelBrady I think we can merge it

For future reference, it probably would have made sense to squash the commits when merging.


first

Both this and #58 seem like spam PRs; if you're experimenting with how github works, you may want to try creating a new repository for yourself?


Add misspell to travis build

This can catch some of things like https://github.com/mholt/caddy/pull/1342 automatically

Thanks! Is there a way to get it to exit with a code other than 0 if there are misspellings?

Now it'll exit 2 upon finding an error, which Travis should catch

Alright, it's about the same file size and total word count. Hopefully it doesn't cause issues, but would make sense to treat it like golint.


There isn't a GitHub Pages site here.

Hi,
I am trying to download the data, but I get a 404 error saying 'There isn't a GitHub Pages site here.' Could you provide the data?

Hi, the links have been updated. Sorry for the inconvenience.


error.c: Fix typo

Fix typo in error.c
Not sure how this wasn't a link error

It's not a link error because the library itself doesn't use this function.
If you tried to link a program against libShake and you called this symbol, that's probably when the linker would complain about an undefined reference.
Thanks for catching that, merged.


i can't get this.state in events functions

Please share the source code and problem description. Unable to understand the issue that you are facing.

resolved, i do not bind funtion in constructor
it should be
this.youfunction=this.youfunction.bind(this)


setting fencing policy in cluster level for hc environment

BZ: #1638221

Hello contributor, thanks for submitting a PR for this project!
I am the bot who triggers "standard-CI" builds for this project.
As a security measure, I will not run automated tests on PRs that are not from white-listed contributors.
In order to allow automated tests to run, please ask one of the project maintainers to review the code and then do one of the following:

Type ci test please on this PR to trigger automated tests for it.
Type ci add to whitelist on this PR to trigger automated tests for it and also add you to the contributor white-list so that your future PRs will be tested automatically. ( keep in mind this list might be overwritten if the job XML is refreshed, for permanent whitelisting, please follow #3 option )
If you are planning to contribute to more than one project, maybe it's better to ask them to add you to the project organization, so you'll be able to run tests for all the organization's projects.

ci test please

@irosenzw I have verified from myside and it's working.Can you please merge this?


Couldn't parse PEM in ../tls/ca.pem file

Looks like there are no certificates written into the /tls directory but the terraform.tfstate has a few different certificates present. I copied the ca_cert into a separate file called ca.pem in /tls directory. And then tried

$ export VAULT_CAPATH="$(cd ../ && pwd)/tls/ca.pem"

(also set the VAULT_ADDR and VAULT_TOKEN)
When I try to connect to vault server,
I get the error

failed to read environment: Error loading CA Path: Couldn't parse PEM in: /terraform_scripts/vault-setup/tls/ca.pem

Any help would be appreciated! Thank you! This project has been very helpful!

It will be hard to help you debug this issue without seeing the content of the PEM you are referring to, however, I can tell you that when specifying a CA file, you should use VAULT_CACERT not VAULT_CAPATH. It might be trying to interpret that pem file as a directory.


npm ERR!  Error: No compatible version found<EMAIL_ADDRESS>npm ERR! Valid install targets:
npm ERR! ["0.0.1","0.1.0","0.2.0","0.3.0","0.4.0","0.4.1","0.5.0","0.6.0","0.7.0","0.7.1","0.7.2","0.7.3","0.7.4","0.8.0","0.8.1","1.0.0","1.0.1","1.0.2","1.0.3","1.0.4","2.0.0","2.1.0","2.1.1"]
npm ERR!     at installTargetsError (/usr/share/npm/lib/cache.js:488:10)
npm ERR!     at /usr/share/npm/lib/cache.js:375:15
npm ERR!     at saved (/usr/share/npm/lib/utils/npm-registry-client/get.js:147:7)
npm ERR!     at Object.oncomplete (/usr/lib/nodejs/graceful-fs.js:230:7)
npm ERR! You may report this log at:
npm ERR!     http://bugs.debian.org/npm
npm ERR! or use
npm ERR!     reportbug --attach /home/pi/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.12.28+
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "meshblu"
npm ERR! cwd /home/pi
npm ERR! node -v v0.6.19
npm ERR! npm -v 1.1.4
npm ERR! message No compatible version found<EMAIL_ADDRESS>npm ERR! message Valid install targets:
npm ERR! message ["0.0.1","0.1.0","0.2.0","0.3.0","0.4.0","0.4.1","0.5.0","0.6.0","0.7.0","0.7.1","0.7.2","0.7.3","0.7.4","0.8.0","0.8.1","1.0.0","1.0.1","1.0.2","1.0.3","1.0.4","2.0.0","2.1.0","2.1.1"]
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /home/pi/npm-debug.log
npm not ok

I am unable to reproduce this. It looks like NPM was able to find 2.1.1 as a valid install target, I wonder why that didn't satisfy the ^2.1.1 requirement. The current latest version of debug is 2.2.0, so that should work as well. Let me know if this is still an issue for you with some steps to reproduce and I'll take another look at it.


Errant asterisk being added to beginning of Description field

On occasion (seemingly random) an asterisk will be appended to the beginning of a description, which causes URLs not to be read by xchain. Examples of such instances can be found in the following:
https://dogeparty.xchain.io/asset/DKDOGEBOWL
https://dogeparty.xchain.io/asset/DKDOGEDUEL
https://dogeparty.xchain.io/asset/DOGENICKEZ
https://dogeparty.xchain.io/asset/DOGENICKEY
https://dogeparty.xchain.io/asset/DOGENICKET
https://dogeparty.xchain.io/asset/DOGENICKER
https://dogeparty.xchain.io/asset/DOGENICKEE
https://dogeparty.xchain.io/asset/DOGENICKED
https://dogeparty.xchain.io/asset/DOGENICKEC
https://dogeparty.xchain.io/asset/DOGENICKEB
https://dogeparty.xchain.io/asset/DOGEBLOCKD
https://dogeparty.xchain.io/asset/TWEETONE
For each example, the asterisk is not present in the Issuance tx, yet still appears in the Description field:
https://dogeparty.xchain.io/tx/144498 (Issuance tx for DOGENICKEB)
Example of the issue occurring in a non-URL description:
https://dogeparty.xchain.io/asset/SKBESCROW
https://dogeparty.xchain.io/tx/133158

this should be fixed in the latest dogeparty-lib release (v9.62.0) .. if you find this is still happening, please reopen this issue.


fix: fix request API key form description (Issue #494)

Issue: https://github.com/epam/ai-dial-chat/issues/494

/deploy-review


first line in code blocks in docs are slightly indented

Search for "vep.properties", for example.

Fixed: https://github.com/broadinstitute/hail/pull/652.


Production chart should be smoother

In addData you're changing the plotted values based on whether or not the player has notation set to Logarithm mode. But the non-Logarithm values are wrong and make the chart look wavy with a visible transition at each new exponent.
https://github.com/IvarK/IvarK.github.io/blob/master/javascripts/game.js#L524

How are they incorrect exactly? Non-logarithmic growth speeds as it approaches a full integer. For example, 1e1000 + 10% = 1.1e1000 (so adding an effective 0.1e1000) whereas 9e1000 + 10% = 9.90e1000 (adding an effective 0.9e1000). This is just a natural consequence of how the numbers work. Unless I'm missing something, and there's a very good chance I am.

The main problem is that the chart is always semi-log (linear on the time axis, logarithmic on the antimatter axis) regardless of the player's notation option, so the behavior shouldn't depend on that option anyway. The chart actually looks different based on the notation you've picked which IMO is a bug.
Plotting it as (exponent + 0.1 * mantissa) is incorrect because on a log scale larger mantissa values are plotted closer together than smaller values. You can see it on this semi-log graph paper, the delta for 0.0 to 0.1 is much larger than 0.9 to 1.0 within each decade. Ignoring this is what makes gives the plot ripples at each exponent.

That's a very reasonable point. Resolved in commit https://github.com/IvarK/IvarK.github.io/commit/c3e8d18c1e8bd0530befed5396db1108c0e052b7.


Create virtual nodes on a edge

The package is great.   Currently, I am simulating a vehicle traversal environment. Some edge is very long so that the vehicle can not finish traveling within a certain time slot.  I want to create virtual nodes or just markers on the long edge. In this way, I can see where the vehicle stop on the edge after a certain time slot. How to make this visualization? Thank you very much!

Yes, see this function: https://osmnx.readthedocs.io/en/stable/osmnx.html#osmnx.utils.redistribute_vertices
You'd use it via something like the following:
# transform graph into DataFrame
edges = ox.graph_to_gdfs(G, nodes=False, fill_edge_geometry=True)

# transform edges into evenly spaced points
edges['points'] = edges.apply(lambda x: redistribute_vertices(x.geometry, dist), axis=1)

# develop edges data for each created points
extended = edges['points'].apply([pd.Series]).stack().reset_index(level=1, drop=True).join(edges).reset_index()

Thanks, Prof. Boeing! I applied these functions but couldn't make it work. Could you help me check the code? I want to create some virtual nodes on the edge from node_1 to node_2. Thank you.
import networkx as nx
import osmnx as ox
import requests
import matplotlib.cm as cm
import matplotlib.colors as colors
import csv, sys
import numpy
import numpy as np
from shapely import wkt
from shapely.geometry import LineString
import pandas as pd
def redistribute_vertices(geom, distance):
if geom.geom_type == 'LineString':
num_vert = int(round(geom.length / distance))
if num_vert == 0:
num_vert = 1
return LineString(
[geom.interpolate(float(n) / num_vert, normalized=True)
for n in range(num_vert + 1)])
elif geom.geom_type == 'MultiLineString':
parts = [redistribute_vertices(part, distance)
for part in geom]
return type(geom)([p for p in parts if not p.is_empty])
else:
raise ValueError('unhandled geometry %s', (geom.geom_type,))
ox.config(use_cache=True, log_console=True)
ox.version
G = ox.graph_from_place('Blacksburg, Virginia, USA', network_type='drive')
edges = ox.graph_to_gdfs(G, nodes=False, fill_edge_geometry=True)
node_1 = ox.get_nearest_node(G, (37.2238, -80.4402)); #276308465
node_2 = ox.get_nearest_node(G, (37.2109, -80.43)); #5288322283
# route = nx.shortest_path(G, node_1, node_2, weight='length')
# route_length = nx.shortest_path_length(G, node_1, node_2, weight='length')
# print(route_length)
# ox.plot_graph_route(G, route, node_size=0)
u = list(edges.u)
v = list(edges.v)
#find index of node_1
node_1_inx = []
for i in range(0, len(u)) :
if u[i] == node_1 :
node_1_inx.append(i)
#find index of node_2
node_2_inx = []
for i in range(0, len(v)) :
if v[i] == node_2 :
node_2_inx.append(i)
find the row index of node_1 & node 2
inx = list(set(node_1_inx) & set(node_2_inx))
edge_string = edges.geometry[inx[0]]
print(edge_string)
transform edges into evenly spaced points
edges['points'] = edges.apply(lambda edge_string: redistribute_vertices(edge_string.geometry, 0.004), axis=1)
# develop edges data for each created points
extended = edges['points'].apply([pd.Series]).stack().reset_index(level=1, drop=True).join(edges).reset_index()
ox.plot_graph(G)

Thanks, Prof. Boeing! I was trying to create some virtual nodes on the edge from node_1 to node_2. I applied these functions but couldn't make it work. Could you help me check the code?  Thank you.
test_add_nodes.py.zip

The issue tracker is for documenting bugs or proposing new features. Best to ask how-to questions at the user community on StackOverflow, per the contributing guidelines.

OK. Thanks, Prof. Boeing.


OSX build failing

Package doesn't currently build for OSX:
See: https://github.com/chrisjbillington/desktop-app/actions/runs/459991070

Fixed in fda326aedd27a3e71a2d17cca84afa68f7685762 by setting xcode 11 when building on OSX. Anaconda recommends buiding with as old an SDK as possible, and we could download an even older SDK from the links they recommend, and configure our package to build using it, but for now we'll just use the oldest SDK available on GitHub actions by selecting the Xcode version.
This fix was also applied to labscript programs.


Phone Inputmask on iPhone 6 - ablility to start typing numbers wherever

Hello,
I'm using version 3.3.11 of Inputmask.
The issue: On iPhone 6 it is possible to click in different parts of the phone input field and start typing numbers there.
On Android and on different operating systems on desktop the behavior is as expected - the user is forced to type numbers from left to right (even if they click at the end of the input field).
I checked it on iPhone 6 both at the preview of the website I'm working on and at Chris Coyier's Codepen:
https://codepen.io/chriscoyier/pen/PbOEqL
Two print-screens are attached.
Is there an easy way to force typing numbers from left to right on iPhone?

@PaulaBarszcz ,
Did you have a try with a newer version of the inputmask?

Van you use these 4.0.1 beta xx
Op ma 30 jul. 2018 08:25 schreef Paula Barszcz<EMAIL_ADDRESS>
@RobinHerbots https://github.com/RobinHerbots ,
Yes, I tried with a version 4.0.0 and the problem was still present.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/RobinHerbots/Inputmask/issues/1948#issuecomment-408759673,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AATb75gWkMCBd3i-hf7xy2Ot4w7_AH9tks5uLqbrgaJpZM4VjipE
.

Oeps the predictive text correction made noncense of my sentence.  Can you
also try the latest from github.
Op ma 30 jul. 2018 11:58 schreef Robin Herbots<EMAIL_ADDRESS>
Van you use these 4.0.1 beta xx
Op ma 30 jul. 2018 08:25 schreef Paula Barszcz<EMAIL_ADDRESS>
@RobinHerbots https://github.com/RobinHerbots ,
Yes, I tried with a version 4.0.0 and the problem was still present.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/RobinHerbots/Inputmask/issues/1948#issuecomment-408759673,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AATb75gWkMCBd3i-hf7xy2Ot4w7_AH9tks5uLqbrgaJpZM4VjipE
.

When I use the latest Inputmask version (4.0.1-beta.7), the problem on iPhone 6 still persists. And another problem occurs:
on Chrome on iPhone and on Chrome on Mac it is impossible to type correct number of digits into the phone number field (it stops accepting the numbers after 7 digits - I need to type 9 numbers for correct phone number). In our markup we have +48 before the number (international phone code for Poland).
I attach print screens. Do you have any idea what I should change?

@PaulaBarszcz ,
By beta version I mean the latest from github 4.0.1-beta.23

Ah, I chose the latest Tag from the Tag tab (on github, in the menu where
you search branches & tags), I thought it was the latest one. Now I know
better than that, thank you:) I will check Inputmask’s version
4.0.1-beta.23 next week, when I will be back at the office.
Thank you for your suggestions so far:)
W dniu śr., 1.08.2018 o 11:57 Robin Herbots<EMAIL_ADDRESS>napisał(a):

@PaulaBarszcz https://github.com/PaulaBarszcz ,
By beta version I mean the latest from github 4.0.1-beta.23
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/RobinHerbots/Inputmask/issues/1948#issuecomment-409521127,
or mute the thread
https://github.com/notifications/unsubscribe-auth/Aeag28oRn1Q8jbsKJhK3IQT5suF37idBks5uMXuWgaJpZM4VjipE
.

Hello,
I used version 4.0.1-beta.24.
On Mac on Chrome the bug with allowing only 7 digits (instead of 9) still persists.
On iPhone both on Safari and on Chrome the bug allowing to start typing numbers in the middle of the field still persists. And additionally (on iPhone on Chrome) when I typed digit 2 on positions 7. and 8. and later I typed digit 1 on position 9. - digit 1 "jumped" before two digits "2" (so I ended up with "___ ___ 122" ). So unfortunately the behavior did not improve.
Any suggestions what should I try? :)
I attach print screens from Mac-Chrome, iPhone-Chrome and iPhone-Safari (Inputmask version 4.0.1-beta.24).

Hi @PaulaBarszcz ,
I will have a look.
Is this the correct mask you are using?
https://jsfiddle.net/n7h1r4pf/1/

Hi,
Thank you :)
No, our mask is different than "(999) 999-9999"; we are using:
$('[data-mask-telefon]').inputmask('+48 999 999 999', {
showMaskOnHover: false
});
in a separate js file, in addition to inputmask.js and jquery.inputmask.js.
Mobile numbers in Poland consist of 9 digits (often with a space inserted between every three digits), preceded by a +48 prefix  (to identify country as Poland) :)

Updated fiddle  https://jsfiddle.net/n7h1r4pf/2/

https://codepen.io/robinherbots/pen/PBBVGp

Yes, the mask in https://jsfiddle.net/n7h1r4pf/2/ is correct - and here on Mac on Chrome it allows to type 9 digits as expected. (As compared to allowing to type only 7 out of 9 digits on Mac on Chrome on the preview of my website.)
About the main bug: on iPhone both on Safari and on Chrome the bug allowing to start typing numbers in the middle of the field still persists (print screens from iPhone from https://jsfiddle.net/n7h1r4pf/2/ are attached)
iPhone Chrome

iPhone Safari

In https://jsfiddle.net/n7h1r4pf/2/ i are you using the same version 4.0.1-beta.23 as I did in my preview, or did you add some modifications? I'm wondering: if you didn't change anything between 4.0.1-beta.23 and version used in https://jsfiddle.net/n7h1r4pf/2/ , then it would probably mean the problem lays within my website and not within Inputmask.


homematic: add username and password to interface config schema

Description:
homematic: add username and password to interface config schema
The json-rpc name resolving method requires user account and password. The updated documentation for homematic next (#11156) also suggest that it should be set.
Related issue (if applicable): fixes #11191
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>
Checklist:
If user exposed functionality or configuration variables are added/changed:

[ ] Documentation added/updated in home-assistant.github.io
not needed, PR fixes a mismatch between code and document

If the code communicates with devices, web services, or third-party tools:

[x] Local tests with tox run successfully. Your PR cannot be merged unless tests pass

Looks good to me.


Fix array function format

As mentioned this issue, calling array function with other columns had been failed.
This is because formatted query has a FROM clause in line with zetasqlite_array.
Raw query:
SELECT
    ARRAY (SELECT 1) AS new_array,
    1 as new_column

Formatted query (current):
SELECT
    zetasqlite_array(`$col1#1`)
FROM (
    SELECT 1 AS `$col1#1`
) AS `new_array#2`,
1 AS `new_column#3` // syntax error

So I added additional SELECT statement.
Formatted query (fixed):
SELECT (
    SELECT
        zetasqlite_array(`$col1#1`)
    FROM (
        SELECT 1 AS `$col1#1`
    )
) AS `new_array#2`,
1 AS `new_column#3`

Could you please check this PR when you have time? @goccy

Thank you for your great PR !!! LGTM


Feature request vehicle actor sheet

Would it be possible to get a vehicle actor sheet please? I've had a number of occasions where the agents have been involved in car chases and would like a way vehicle sheets in Foundry.

Yeah, this is definitely doable. Might take me a little while to get around to it however, things are a bit busy for me right now. I may also choose to wait until Foundry v10 comes out, just so I have less that needs updated to the latest document model once the new changes in v10 are published.

Should be resolved with v1.1.0.


SofarSolar unknown data in entities

Hi @StephanJoubert and thanks for this nice integration. I have an SofarSolar  and it looks very similar as DEYE. It is now connected to solarman. But I have some problems with integration in HA. All the data are unknown

Can You support me in that case?  Thanks in advance

I have created a yaml file from the data I have. It was not possible to test at all so please expect problems :) See attached zipfile.
To test.

Make a copy of parameters.yaml  in the custom_components/solarman folder
Overwrite parameters.yaml with the file parameters_sofar.yaml. (Rename parameters_sofar.yaml to parameters.yaml)
See if you get any success, and if so, which parameters need tweaking.

I include the file I used as source to get the parameter definition SOFARMap.txt and the yaml file generated from it that you can use as starting point.
lookup_files.zip

Thank you very much Stephan. I will try to test it tomorrow morning (now my child's are going sleep)  and of course I will let you know. I really appreciate your help.

Hi @StephanJoubert. I just checked HA and I can see that some of the data are not correct like daily and  total production. I checked the paramaters.yaml and SofarMAE.txt and it looks like the registers are the same.  Some of entities are not neccesary in my inverter, but I cane remove them myself :) But I don't now what to do with wrong daily, total production and  time.
Other parameters are shown correctly like power/voltage.

Thanks in advance.

name: "Total Production"
class: "energy"
uom: "kWh"
scale: 1
rule: 3
registers: [0x0016,0x0015]
icon: 'mdi:solar-power'

- name: "Total generation time"
  class: ""
  uom: "h"
  scale: 1
  rule: 3
  registers: [0x0018,0x0017]
  icon: 'mdi:clock-outline'

requests:

start: 0x0000
end:  0x0027
start: 0x0105
end: 0x0114

parameters:

group: solar
items:

name: "PV1 Power"
class: "power"
uom: "W"
scale: 10
rule: 1
registers: [0x000A]
icon: 'mdi:solar-power'

name: "PV2 Power"
class: "power"
uom: "W"
scale: 10
rule: 1
registers: [0x000B]
icon: 'mdi:solar-power'

name: "PV1 Voltage"
class: "voltage"
uom: "V"
scale: 0.1
rule: 1
registers: [0x0006]
icon: 'mdi:solar-power'

name: "PV2 Voltage"
class: "voltage"
uom: "V"
scale: 0.1
rule: 1
registers: [0x0008]
icon: 'mdi:solar-power'

name: "PV1 Current"
class: "current"
uom: "A"
scale: 0.01
rule: 1
registers: [0x0007]
icon: 'mdi:solar-power'

name: "PV2 Current"
class: "current"
uom: "A"
scale: 0.01
rule: 1
registers: [0x0009]
icon: 'mdi:solar-power'

name: "Daily Production"
class: "energy"
uom: "kWh"
scale: 0.01
rule: 1
registers: [0x0019]
icon: 'mdi:solar-power'

name: "Total Production"
class: "energy"
uom: "kWh"
scale: 1
rule: 3
registers: [0x0016,0x0015]
icon: 'mdi:solar-power'

name: "Total generation time"
class: ""
uom: "h"
scale: 1
rule: 3
registers: [0x0018,0x0017]
icon: 'mdi:clock-outline'

name: "Today generation time"
class: ""
uom: "min"
scale: 1
rule: 1
registers: [0x001A]
icon: 'mdi:clock-outline'

group: Output
items:

name: "Output active power"
class: "power"
uom: "W"
scale: 10
rule: 1
registers: [0x000C]
icon: 'mdi:home-lightning-bolt'

name: "Output reactive power"
class: ""
uom: "kVar"
scale: 0.01
rule: 1
registers: [0x000D]
icon: 'mdi:home-lightning-bolt'

name: "Grid frequency"
class: "frequency"
uom: "Hz"
scale: 0.01
rule: 1
registers: [0x000E]
icon: 'mdi:home-lightning-bolt'

name: "L1 Voltage"
class: "voltage"
uom: "V"
scale: 0.1
rule: 1
registers: [0x000F]
icon: 'mdi:home-lightning-bolt'

name: "L1 Current"
class: "current"
uom: "A"
scale: 0.01
rule: 1
registers: [0x0010]
icon: 'mdi:home-lightning-bolt'

name: "L2 Voltage"
class: "voltage"
uom: "V"
scale: 0.1
rule: 1
registers: [0x0011]
icon: 'mdi:home-lightning-bolt'

name: "L2 Current"
class: "current"
uom: "A"
scale: 0.01
rule: 1
registers: [0x0012]
icon: 'mdi:home-lightning-bolt'

name: "L3 Voltage"
class: "voltage"
uom: "V"
scale: 0.1
rule: 1
registers: [0x0013]
icon: 'mdi:home-lightning-bolt'

name: "L3 Current"
class: "current"
uom: "A"
scale: 0.01
rule: 1
registers: [0x0014]
icon: 'mdi:home-lightning-bolt'

group: Inverter
items:

name: "Inverter status"
class: ""
uom: ""
scale: 1
rule: 1
registers: [0x0000]
lookup:

key: 0
value: "Stand-by"
key: 1
value: "Self-checking"
key: 2
value: "Normal"
key: 3
value: "FAULT"
key: 4
value: "Permanent"
icon: 'mdi:wrench'

name: "Inverter module temperature"
class: "temperature"
uom: "°C"
scale: 1
rule: 1
registers: [0x001B]
icon: 'mdi:thermometer'

name: "Inverter inner temperature"
class: "temperature"
uom: "°C"
scale: 1
rule: 1
registers: [0x001C]
icon: 'mdi:thermometer'

name: "Inverter bus voltage"
class: "voltage"
uom: "V"
scale: 0.1
rule: 1
registers: [0x001D]
icon: 'mdi:home-lightning-bolt'

name: "PV1 voltage sample by slave CPU"
class: "voltage"
uom: "V"
scale: 0.1
rule: 1
registers: [0x001E]
icon: 'mdi:home-lightning-bolt'

name: "PV1 current sample by slave CPU"
class: "current"
uom: "A"
scale: 0.1
rule: 1
registers: [0x001F]
icon: 'mdi:home-lightning-bolt'

name: "Countdown time"
class: ""
uom: "s"
scale: 1
rule: 1
registers: [0x0020]
icon: ''

name: "Inverter alert message"
class: ""
uom: ""
scale: 1
rule: 1
registers: [0x0021]
icon: ''

name: "Input mode"
class: ""
uom: ""
scale: 1
rule: 1
registers: [0x0022]
icon: ''

name: "Communication Board inner message"
class: ""
uom: ""
scale: 1
rule: 1
registers: [0x0023]
icon: ''

name: "Insulation of PV1+ to ground"
class: ""
uom: ""
scale: 1
rule: 1
registers: [0x0024]
icon: ''

name: "Insulation of PV2+ to ground"
class: ""
uom: ""
scale: 1
rule: 1
registers: [0x0025]
icon: ''

name: "Insulation of PV- to ground"
class: ""
uom: ""
scale: 1
rule: 1
registers: [0x0026]
icon: ''

name: "Country"
class: ""
uom: ""
scale: 1
rule: 1
registers: [0x0027]
lookup:

key: 0
value: "Germany"
key: 1
value: "CEI0-21 Internal"
key: 2
value: "Australia"
key: 3
value: "Spain RD1699"
key: 4
value: "Turkey"
key: 5
value: "Denmark"
key: 6
value: "Greece"
key: 7
value: "Netherland"
key: 8
value: "Belgium"
key: 9
value: "UK-G59"
key: 10
value: "China"
key: 11
value: "France"
key: 12
value: "Poland"
key: 13
value: "Germany BDEW"
key: 14
value: "Germany VDE0126"
key: 15
value: "Italy CEI0-16"
key: 16
value: "UK-G83"
key: 17
value: "Greece Islands"
key: 18
value: "EU EN50438"
key: 19
value: "EU EN61727"
key: 20
value: "Korea"
key: 21
value: "Sweden"
key: 22
value: "Europe General"
key: 23
value: "CEI0-21 External"
key: 24
value: "Cyprus"
key: 25
value: "India"
key: 26
value: "Philippines"
key: 27
value: "New Zeland"
key: 28
value: "Reserve"
key: 29
value: "Reserve"
icon: ''

group: Alert
items:

name: "Fault 1"
class: ""
uom: ""
scale: 1
rule: 1
registers: [0x0001]
lookup:

key: 0
value: "No error"
key: 1
value: "ID01 Grid Over Voltage Protection"
key: 2
value: "ID02 Grid Under Voltage Protection"
key: 4
value: "ID03 Grid Over Frequency Protection"
key: 8
value: "ID04 Grid Under Frequency Protection"
key: 16
value: "ID05 PV Under Voltage Protection"
key: 32
value: "ID06 Grid Low Voltage Ride through"
key: 64
value: "ID07"
key: 128
value: "ID08"
key: 256
value: "ID09 PV Over Voltage Protection"
key: 512
value: "ID10 PV Input Current Unbalanced"
key: 1024
value: "ID11 PV Input Mode wrong configuration"
key: 2048
value: "ID12 Ground-Fault circuit interrupters fault"
key: 4096
value: "ID13 Phase sequence fault"
key: 8192
value: "ID14 Hardware boost over current protection"
key: 16384
value: "ID15 Hardware AC over current protection"
key: 32768
value: "ID16 Grid current is too high"
icon: 'mdi:wrench'

name: "Fault 2"
class: ""
uom: ""
scale: 1
rule: 1
registers: [0x0002]
lookup:

key: 0
value: "No error"
key: 1
value: "ID17 Grid current sampling error"
key: 2
value: "ID18 DCI sampling error"
key: 4
value: "ID19 Grid voltage sampling error"
key: 8
value: "ID20 GFCI device sampling error"
key: 16
value: "ID21 Main chip fault"
key: 32
value: "ID22 Hardware auxiliary power fault"
key: 64
value: "ID23 Bus voltage zero fault"
key: 128
value: "ID24 Output current not balanced"
key: 256
value: "ID25 Bus under voltage protection"
key: 512
value: "ID26 Bus over voltage protection"
key: 1024
value: "ID27 Bus voltage unbalanced"
key: 2048
value: "ID28 DCI is too high"
key: 4096
value: "ID29 Grid current is too high"
key: 8192
value: "ID30 Input current is too high"
key: 16384
value: "ID31"
key: 32768
value: "ID32"
icon: 'mdi:wrench'

name: "Fault 3"
class: ""
uom: ""
scale: 1
rule: 1
registers: [0x0003]
lookup:

key: 0
value: "No error"
key: 1
value: "ID33 Reserved"
key: 2
value: "ID34 Reserved"
key: 4
value: "ID35 Reserved"
key: 8
value: "ID36 Reserved"
key: 16
value: "ID37 Reserved"
key: 32
value: "ID38 Reserved"
key: 64
value: "ID39 Reserved"
key: 128
value: "ID40 Reserved"
key: 256
value: "ID41 Reserved"
key: 512
value: "ID42 Reserved"
key: 1024
value: "ID43 Reserved"
key: 2048
value: "ID44 Reserved"
key: 4096
value: "ID45 Reserved"
key: 8192
value: "ID46 Reserved"
key: 16384
value: "ID47 Reserved"
key: 32768
value: "ID48 Reserved"
icon: 'mdi:wrench'

name: "Fault 4"
class: ""
uom: ""
scale: 1
rule: 1
registers: [0x0004]
lookup:

key: 0
value: "No error"
key: 1
value: "ID49 Grid voltage sampling value between master and slave DSP vary widely"
key: 2
value: "ID50 Grid frequency sampling value between master and slave DSP vary widely"
key: 4
value: "ID51 DCI sampling value between master and slave DSP vary widely"
key: 8
value: "ID52 GFCI sampling value between master and slave DSP vary widely"
key: 16
value: "ID53 Communication failure between master and slave DSP failure"
key: 32
value: "ID53 Communication failure between slave and communication board"
key: 64
value: "ID55 Relay fault"
key: 128
value: "ID56 Insulation resistance between PV array and the earth is too low"
key: 256
value: "ID57 Inverter temp is too high"
key: 512
value: "ID58 Boost temp is too high"
key: 1024
value: "ID59 Environment temp is too high"
key: 2048
value: "ID60 Brak podłączenie falownika do kabla PE"
key: 4096
value: "ID61 Reserved"
key: 8192
value: "ID62 Reserved"
key: 16384
value: "ID63 Reserved"
key: 32768
value: "ID64 Reserved"
icon: 'mdi:wrench'

name: "Fault 5"
class: ""
uom: ""
scale: 1
rule: 1
registers: [0x0005]
lookup:

key: 0
value: "No error"
key: 1
value: "ID65 Grid current is too high and causes unrecoverable fault"
key: 2
value: "ID66 Bus voltage is too high and causes unrecoverable fault"
key: 4
value: "ID67 Grid current is unbalanced and causes unrecoverable fault"
key: 8
value: "ID68 Input current is unbalanced and causes unrecoverable fault"
key: 16
value: "ID69 Bus voltage is unbalanced and causes unrecoverable fault"
key: 32
value: "ID70 Grid current is too high and causes unrecoverable fault"
key: 64
value: "ID65 PV Input Mode Configuration is wrong and causes unrecoverable fault"
key: 128
value: "ID72 Reserved"
key: 256
value: "ID73 Reserved"
key: 512
value: "ID74 Input current is too high and causes unrecoverable fault"
key: 1024
value: "ID75 Error reading from EEPROM"
key: 2048
value: "ID76 Error writing to EEPROM"
key: 4096
value: "ID77 Relay fauilure causes unrecoverable fault"
key: 8192
value: "ID78 Reserved"
key: 16384
value: "ID79 Reserved"
key: 32768
value: "ID80 Reserved"
icon: 'mdi:wrench'

Very good idea, "state_class" - ok,
I still have a problem with showing the status of history, you can take a look at it

Thanks

I have one more problem after restarting home assistant and when the inverter is turned off, most often at night, all entities are unknown

Hi @StephanJoubert  and @grzegorz189
I will try to check the new config for sofar tomorrow and I will let you know.  Thanks for update state class. Now I have to manually add this to daily and totally production. It will be easier to configure. Best regards

@grzegorz189 Yea the entities will do that if home assistant is restarted while the inverter was offline. However, if the entities has values and the inverter goes offline, the values will be maintained.
If you want to use these in automations and it presents a problem, you should be able to look at the status_connection or status_lastUpdate to determine if the values can be used.

Hi once again @StephanJoubert I confirm that after added sofar yaml to configuration.yaml some of the entities ar unavailable. However the most important for me as daily production, Power, Voltage are working ok.

Thank You very much for your help.

I have a 3Phase invertor (Sofar HYD 10KTL-3PH-A).  I have tested the code and integration in HA.  I see that the connection to my invertor works, but the values are unknown or Unavailable.  Would it be possible to create a parameters file for my invertor.   I'm happy to do myself but my modbus knowledge is non-existing.

@binoke Did You add the sofar_lsw3.yaml to Your config and do You have this file in config\custom_components\solarman?  I also have the KTL Sofar and most important entities are working correctly for me.

@kion666 What I did was as listed in the original discription:

Backup original parameters.yaml
copy sofar_lsw3.yaml to config\custom_components\solarman
deleted parameters.yaml and renamed sofar_lsw3.yaml to parameters.yaml

so when I look at the sensor.  I see it's connected and updating

but all other sensor values are Unknown or Unavailable.

I just set the lookup file as:

And downloaded all repo to solarman:

Hi does this help?
SOFARSOLAR ModBus-RTU Communication Protocol (1).pdf
p

Hi @kion666 , that is correct. You can now edit the sofar_lsw3 file to get it working as expected.

Thanks once again @StephanJoubert   I close the issue and going to buy you coffee :)


new component: BMW connected drive [WIP]

Description:
This is a basic implementation of a sensor for BMW Connected Drive vehicles. In the current version your're getting:

device tracker for your vehicle
current mileage, fuel and remaining range

I could only test this with one BMW model. So there might be changes necessary to make it work with other models...
Related issue (if applicable):  N/A
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#4617
Example entry for configuration.yaml (if applicable):
bmw_connected_drive:
  mycar:
    username: your_name
    password: your_password
    Country: country_of_your_connected_drive_account

Checklist:

[x] The code change is tested and works locally.

If user exposed functionality or configuration variables are added/changed:

[x] Documentation added/updated in home-assistant.github.io

If the code communicates with devices, web services, or third-party tools:

[x] Local tests with tox run successfully. Your PR cannot be merged unless tests pass
[x] New dependencies have been added to the REQUIREMENTS variable (example).
[x] New dependencies are only imported inside functions that use them (example).
[x] New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
[x] New files were added to .coveragerc.

What I noticed while looking at bimmer-connected: it uses the german API endpoint. Having followed the thread @gerard33 has mentioned it is actually required to be able to use different URLs so people from other countries can use this as well.

I tries to use the German url and that actually worked, but then I got errors using the BMW CD app, so using the local url is indeed the best solution.
These are all mentioned on www.bmw-connecteddrive.com.

@gerard33 just commented on the community page, lets discuss there how to proceed.
https://community.home-assistant.io/t/wip-bmw-connected-drive-custom-component/39569/65.

@danielperna84 the portal is now selected based on the country you define as config parameter.
@gerard33 I'm done with my major refactoring of the setup and update process. Now the update is triggered by a timer in the components/bmw_connected_drive.py and that then triggers the different sensors.

I ran the current implementation over the last 24 hours in my test setup and it worked fine. It does not yet contain all the values you could get from your BMW but I think we could start rolling it out and get some feedback from the users. I suspect there might be some issues with different BMW models and different countries.
There is a ton of more features available from the BMW portal, but we can add these later on.

close/open to trigger rebuild...

@MartinHjelmare thx for the extensive code review! I just uploaded the changes.
To be honest, I did not really understand how async works in Home Assistant. Is there a good documentation available?

Did you see https://home-assistant.io/developers/asyncio/?

@MartinHjelmare thx for your help! :+1: :smile:
@gerard33 good news, it's merged :clinking_glasses: So you can now add your additional sensors on top of the dev branch.

@ChristianKuehnel @gerard33  I have a i3 and I am interested in helping although I don't have too much experience in Python, I am pretty good at other languages.  How can I help make this better?

@robbz23
Do you happen to live in the US or Canada? Because there we're trying to figure out how to make it work there...

Sorry I'm an American living in Sweden. Both the component and extra work.

Sorry I'm an American living in Sweden. Both the component and extra work.


Firewall rules priority

Customer would like to add some rules within the TRE firewall that relates to its workflow, such as allowing connection to a SQL database.
Common practice is to define custom rules above system (TRE ones)  but we can't do that in TRE as the system ones starts as 100 priority and that is the minimal priority level one is able to use in the firewall.

Request would be to start TRE rules on a higher number.

@chboudry can you give an example of a rule that would need to be higher priority?
Why not add them at 5000?
Ideally this needs to be in the TRE state store too, otherwise the rules may get lost.

We have seen examples of customers using custom workspaces and adding the rules there. Isn't that an option?

@marrobi it is a security best practice to enforce a default deny strategy for firewall rules.
Default deny should be explicited (highest number == low priority), system rules come next (lower number == higher priority), and then customer rules.
TRE does not set up a deny rules, so yes, customer could create rules with a higher priority number and that would work, but it would be nice to stick to default security recommendations and having homogeneity across solutions as it is already done this way on NSGs.
"Ideally this needs to be in the TRE state store too, otherwise the rules may get lost." -> that's true, they will have to creat a new firewall template, but it will be more convenient then if they don't need to update all the rules :)
@tamirkamara not sure what you mean, intent is to edit firewall on Core so that customer can access database from any workspace vm.

This is what I had in mind: https://github.com/microsoft/AzureTRE/blob/main/templates/workspace_services/guacamole/template_schema.json#L69
Each workspace could potentially add their own rule to open what is needed.
If this is a system wide decision I think any number below 200 is valid as that is where we started the internally managed ones (maybe we should start higher...).
Anyway, the first few in the 100 range are core ones we setup for the system. Since this seem to be relevant for workspaces only I think 195 is a good number to pick for that one rule to all db access to all workspace.

With the move to firewall policy I belive this issue is now kind of obsolete. Do you agree @chboudry?

okay


Add a colormaps module

This will allow users to create colormaps easily and add them to the map easily.

This feature has been implemented. See notebook example https://leafmap.org/notebooks/23_colormaps


STT : respond with a 400 instead of 401 if the language parameter is not provided

The documents describes the behavior as below :

Note
The language parameter must be appended to the URL to avoid receiving an HTTP 401 error. For example, the language set to US English using the West US endpoint is: https://westus.stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?language=en-US.

Actually, if I test the stt service without the language parameter :
POST https://eastus.stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1? HTTP/1.1
Accept: application/json
Ocp-Apim-Subscription-Key: <my_subscription_key>
Transfer-Encoding: chunked
Content-Type: audio/wav; codecs=audio/pcm; samplerate=16000

< ./Response-zh.wav

The server will respond with a message of 400 :
HTTP/1.1 400 Bad Request
Date: Mon, 28 Jan 2019 08:12:24 GMT
Content-Type: application/json; charset=utf-8
Server: Kestrel
Transfer-Encoding: chunked
Strict-Transport-Security: max-age=31536000; includeSubDomains

{
  "Message": "Invalid CID or language"
}

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

ID: d6021ebc-4b2a-fbb3-84a4-1753b80442c3
Version Independent ID: 4af2b683-7cc6-3aa4-eeb5-cf5a087094d1
Content: Speech Services REST APIs - Speech Services - Azure Cognitive Services
Content Source: articles/cognitive-services/Speech-Service/rest-apis.md
Service: cognitive-services
GitHub Login: @erhopf
Microsoft Alias: erhopf

how to solve this? i'm getting 400: bad request for url https://westus.stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?language=en-US
I set the ff headers:
con.addRequestProperty("Content-type", "audio/wav; codec="audio/pcm"; samplerate=16000");
con.addRequestProperty("Ocp-Apim-Subscription-Key", subscriptionkey);

is there a prerequisite to build your own custom model, or can we just send audio file and it will be converted to text?

@wilsonchua20 - A custom model isn't required. You should be able to send an audio file and receive a text response. Can you send us the full code block so that we can help to unblock you.

File file = new File("filepath", "filename.wav");
URIBuilder uribuilder = new URIBuilder("https://westus.stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1");
uribuilder.setParameter("language", "en-US");
uribuilder.setParameter("format", "detailed");
URI uri = uribuilder.build();
URL url = uri.toURL();
        HttpURLConnection con =(HttpURLConnection)url.openConnection();
        con.setDoOutput(true);
        con.setRequestMethod("POST");
        con.setRequestProperty("Accept", "application/json");

        con.addRequestProperty("Content-type", "audio/wav; codec=\"audio/pcm\"; samplerate=16000");
        con.addRequestProperty("Ocp-Apim-Subscription-Key", Key);

        byte[] bytes = ReadFully(file);
        DataOutputStream wr = new DataOutputStream(con.getOutputStream());

        wr.write(stream);
        Scanner scanner = new Scanner(con.getInputStream());
        String responseBody = scanner.useDelimiter("\\A").next();
        System.out.println(responseBody);

public byte[] ReadFully(File file){
ByteArrayOutputStream out = new ByteArrayOutputStream();
try{
    BufferedInputStream in = new BufferedInputStream(new FileInputStream(file));
    byte[] buffer = new byte[16*1024];
        int bytesRead;
        OutputStream outputstream ;
        while ((bytesRead = in.read(buffer)) != -1){
        out.write(buffer, 0, bytesRead);
    }
    }
    catch (Exception e){
        e.printStackTrace();
    }
   return out.toByteArray();
}

sorry, it should be wr.write(bytes) not stream

any findings?

@PanosPeriorellis @wolfma61 - Can you help unblock @wilsonchua20?

i either get bad request or Response contained no data

@wilsonchua20 - While I wasn't able to get the code to read chunked audio. I do have working code for you that reads the audio file directly to a FileStream. Please note, this assumes the audio file is in the root of you working directory. Hope this helps.
using System;
using System.IO;
using System.Net.Http;

namespace stt_troubleshoot
{
    class Program
    {
        public static void SpeechToText()
        {
            string host = "https://westus.stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1";
            string qs = "?language=en-US&format=simple";
            string subscriptionKey = "YOUR_KEY_HERE";

            using (var client = new HttpClient())
            using (var request = new HttpRequestMessage())
            {
                request.Method = HttpMethod.Post;
                request.RequestUri = new Uri(host + qs);
                //request.Headers.Add("Accept", "application/json");
                request.Headers.Add("Ocp-Apim-Subscription-Key", subscriptionKey);
                request.Headers.Add("ContentType", @"audio/wav; codecs=audio/pcm; samplerate=16000");
                FileStream fs = System.IO.File.OpenRead(@"whatstheweatherlike.wav");
                request.Content = new StreamContent(fs);
                var response = client.SendAsync(request).Result;
                var jsonResponse = response.Content.ReadAsStringAsync().Result;
                Console.WriteLine(jsonResponse);
            }
        }
        static void Main(string[] args)
        {
            SpeechToText();
        }
    }
}

I think this is for c#, is there one for java? i can't use the org apache httpclient as well because it always return unknown host, i think because of network/firewall settings in work..i am using the code i gave above since it worked for the microsoft speaker recognition api. thanks

Hey @wilsonchua20 - I've put together a quick sample using the OKHTTP library for requests. I'm hacking this together based on my knowledge of C# and Python -- so while not pretty, it works and should give you an idea of how the request needs to be structured.
import java.io.*;
import com.google.gson.*;
import com.squareup.okhttp.*;

public class SpeechToText {
    private String subscriptionKey = "YOUR_KEY_HERE";
    private String url = "https://westus.stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?language=en-US&format=simple";

    private OkHttpClient client = new OkHttpClient();

    public String post() throws IOException {
        File audioFile = new File("whatstheweatherlike.wav");
        MediaType mediaType = MediaType.parse("audio/wav");
        RequestBody body = RequestBody.create(mediaType, audioFile);
        Request request = new Request.Builder()
                .url(url).post(body)
                .addHeader("Ocp-Apim-Subscription-Key", subscriptionKey)
                .addHeader("Content-type", "audio/wav; codecs=audio/pcm; samplerate=16000")
                .build();
        Response response = client.newCall(request).execute();
        return response.body().string();
    }

    public static String prettify(String json_text) {
        JsonParser parser = new JsonParser();
        JsonElement json = parser.parse(json_text);
        Gson gson = new GsonBuilder().setPrettyPrinting().create();
        return gson.toJson(json);
    }

    public static void main(String[] args) {
        try {
            SpeechToText sampleRequest = new SpeechToText();
            String response = sampleRequest.post();
            System.out.println(prettify(response));
        } catch (Exception e) {
            System.out.println(e);
        }
    }
}

@wilsonchua20 - Any luck or are you still having issues?

It got stuck at Response response = client.newCall(request).execute(); error was 500 internal server error. btw, i am using oracle jdeveloper

Are there updates on this?

@wilsonchua20 - Have you tried again since the first error? Can you provide the complete error response along with your complete updated code.

@newbienewbie We will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.

@erhopf the code i used:
@WebMethod
public void speechToText (){
     String subscriptionKey = "mysubscriptionkey";
     String url = "https://westus.stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?langauge=en-US&format=simple";
    OkHttpClient client = new OkHttpClient();
    try{
        File file = new File("filepath", "whatstheweatherlike.wav");
        MediaType mediaType = MediaType.parse("audio/wav");
        RequestBody body = RequestBody.create(mediaType, file);

        Request request = new Request.Builder()
                        .url(url).post(body)
                        .addHeader("Ocp-Apim-Subscription-Key", subscriptionKey)
                        .addHeader("Content-type", "audio/wav; codec=audio/pcm; samplerate=16000")
                        .build();
        Response response = client.newCall(request).execute();
        System.out.println(response);
    }
    catch (Exception e){
            e.printStackTrace();
    }
}

the error is as follows:
fault code S:Server
fault string: okio/Okio
Detail elements: Array
Detail elements: <ns2 : frame class="com.squareup.okhttp.internal.http.HttpConnection" file="HttpConnection.java" line="89" method="<init>"
and so on...

@wilsonchua20 We'd like to work with you further on this issue. Can you please email us at<EMAIL_ADDRESS>Please provide us with your subscription ID and the URL for this thread.


OK

The ** and __

The a

The a and __ a __

And * d * or ’ok’

‘09‘

_bar___baz

bar baz

foo

wgaa

ok

__ ok __ vs ok vs ok ok
_ ok _ vs ok vs ok
~~ ok ~~ vs ok vs ok
ok vs __ok__

__ ok__
__ok __


'vue-cli-service serve --port' does not work as advertised

Version
3.10.0
Environment info
 System:
    OS: Linux 4.15 Ubuntu 18.04.3 LTS (Bionic Beaver)
    CPU: (12) x64 AMD Ryzen 5 1600X Six-Core Processor
  Binaries:
    Node: 10.14.1 - ~/.nvm/versions/node/v10.14.1/bin/node
    Yarn: 1.15.2 - ~/.yarn/bin/yarn
    npm: 6.4.1 - ~/.nvm/versions/node/v10.14.1/bin/npm
  Browsers:
    Chrome: 76.0.3809.100
    Firefox: 68.0.2
  npmPackages:
    @vue/babel-helper-vue-jsx-merge-props:  1.0.0
    @vue/babel-plugin-transform-vue-jsx:  1.0.0
    @vue/babel-preset-app:  3.10.0
    @vue/babel-preset-jsx:  1.1.0
    @vue/babel-sugar-functional-vue:  1.0.0
    @vue/babel-sugar-inject-h:  1.0.0
    @vue/babel-sugar-v-model:  1.0.0
    @vue/babel-sugar-v-on:  1.1.0
    @vue/cli-overlay:  3.10.0
    @vue/cli-plugin-babel: ^3.10.0 => 3.10.0
    @vue/cli-plugin-typescript: ^3.10.0 => 3.10.0
    @vue/cli-plugin-unit-mocha: ^3.10.0 => 3.10.0
    @vue/cli-service: ^3.10.0 => 3.10.0
    @vue/cli-shared-utils:  3.10.0
    @vue/component-compiler-utils:  2.6.0 (3.0.0)
    @vue/preload-webpack-plugin:  1.1.1
    @vue/test-utils: 1.0.0-beta.29 => 1.0.0-beta.29
    @vue/web-component-wrapper:  1.2.0
    typescript: ^3.4.3 => 3.5.3
    vue: ^2.6.10 => 2.6.10
    vue-class-component: ^7.0.2 => 7.1.0
    vue-hot-reload-api:  2.3.3
    vue-loader:  15.7.1
    vue-property-decorator: ^8.1.0 => 8.2.1
    vue-style-loader:  4.1.2
    vue-template-compiler: ^2.6.10 => 2.6.10
    vue-template-es2015-compiler:  1.9.1
    vuex: ^3.0.1 => 3.1.1
  npmGlobalPackages:
    @vue/cli: 3.10.0

Steps to reproduce
run 'npm serve --port ' or 'vue-cli-service serve --port ' in terminal.
What is expected?
i expect the server to listen on the declared port argument or print an error
What is actually happening?
a random port is selected between the declared port argument and portfinder's default max safe port number 40000

i found the code in<EMAIL_ADDRESS>leveraging portfinder line 80 & 81. it appears portfinder.basePort is set to the port argument, then portfinder.getPortPromise is called, which returns a random port number.

I have same question.
version: 3.10.0
I want change the port of project. but it not works.
vue.config.js module.exports = {   devServer: {     port: 8091,     open: true   },   lintOnSave: false };
cll --port  also not works.

Hi,
This problem is reported in https://stackoverflow.com/questions/57536785/vue-npm-run-serve-starts-on-random-port and I submit the PR to avoid this problem https://github.com/vuejs/vue-cli/pull/4451
This PR change a little the behaviour when the port is used, before the next port was use with this modification it will failed.
Best Regards,
Michel.

Was just about to report the same. I'm using 4.0.0-beta.3 release and have the same issue.
  devServer: {
    port: 8080
  },

doesn't do anything, the port is still a random one.

Well, yes. I spent last night trying all 4 methods I could think of but neither worked.

Writing port argument in serve script in package.json
"serve": "vue-cli-service serve --port 8080"
Using .env, .env.*, .env.*.local files with variable
PORT=8080
Using vue.config.js
devServer: { port: 8080 }
By passing an argument in cli command e.g.
npm run serve -- --port 8080 or npx vue-cli-service serve --port 8080

Hi @imaginarny @vkaracic ,
The PR is not merged, you could try patching<EMAIL_ADDRESS>Best Regards,
Michel.

Yeah. The previous two days, it still worked. But today, I create a new project, vue.config.js is not worked. What happened.

Yeah. The previous two days, it still worked. But today, I create a new project, vue.config.js is not worked. What happened.

https://github.com/http-party/node-portfinder/ released a breaking change as a minor bugfix release, that's what happened...

Yes, same problem here. The vue.config.js in my project is loading fine but the port 8080 or other port number will not be replaced

--port option does not work.
node 10.16.3
yarn 1.17.3
<EMAIL_ADDRESS>

@bokub Why should I have to use vue serve when vue-cli asked me what gonna be used yarn or npm? yarn was selected already.
/frontend directory was created by $ vue create frontend as project with base files pack. In settings i selected yarn to use. So project could be started by $ yarn serve.

$ vue serve --port 3000 from terminal:

@pravosleva The message is pretty explicit, it says that a valid entry file has not been found.
An entry file is required for instant prototyping, as explained here
Again, you confuse vue-cli-service serve (which is what this thread is about)  with vue serve, a completely different command.

Hi @imaginarny @vkaracic ,
The PR is not merged, you could try patching<EMAIL_ADDRESS>A way to workaround the problem is to install old portfinder with:
   npm install<EMAIL_ADDRESS>
Best Regards,
Michel.

If you use yarn, here's the corresponding workaround.
Add this to your package.json then run yarn install.
"resolutions": {
  "@vue/cli-service/portfinder": "1.0.21"
},

Also want to inform that I started a new vue cli project with portfinder resolved to 1.0.22 and encounter this issue.
specificy resolution portfinder to 1.0.21 solves the problem.
Thanks  @mpromonet @ThibaultVlacich

Also want to inform that I started a new vue cli project with portfinder resolved to 1.0.22 and encounter this issue.
specificying portfinder to 1.0.21 solves the problem.
Thanks @mpromonet @ThibaultVlacich

It does not solve the problem, it is a nasty workaround for a problem that should not exist.

When I run vue create my-app and after cd my-app && npm run serve then I get it run on random port.

@ThibaultVlacich Ok. Could you please help me wit this:

删了，整个项目，重新拉了个项目，我就解决了这个问题

我安装了electron-cli插件，不知道项目那里被改动了，估计是这个插件导致的问题

Thank you, @ThibaultVlacich. I looked for a solution akin to yarn resolutions, but using pnpm. The answer was to use pnpm hooks.
If anyone is interested, this is the tentative workaround I am currently using. It works for me, but use on your own responsibility:

Create pnpmfile.js in the project's root with the code below
Delete or rename pnpm-lock.yaml
Run pnpm install.

// pnpmfile.js

module.exports = {
    hooks: {
        readPackage
    }
};

function readPackage (pkg, context) {
    if (pkg.name === '@vue/cli-service') {
        pkg.dependencies = { portfinder: '1.0.21' };
        context.log(`${pkg.name}_${pkg.version}/portfinder 1.0.22 => 1.0.21`);
    }

    return pkg;
}

The hook could check for @vue/cli-service version, not only the name. But since this is a workaround until a patch is merged, I don't think it is much of a problem. Once this issue is fixed, this workaround will no longer be necessary.

same issue, last update of vue-cli didnt fix the issue if problem is solved

You can update your apps and remove workarounds. Faulty node-portfinder v1.0.22 was reverted, v1.0.23 is now the same as previously working v1.0.21  #84

Fixed in portfinder v1.0.23, please delete your lockfile and try install the dependencies again.

Fixed in portfinder v1.0.23, please delete your lockfile and try install the dependencies again.

In case you want to leave the other project dependendcies locked you can also only delete the lockfinder part in the package-lock :)
"portfinder": {
      "version": "1.0.22",
     ...
},

Fixed in portfinder v1.0.23, please delete your lockfile and try install the dependencies again.

Worked for me

"resolutions": {
"@vue/cli-service/portfinder": "1.0.21"
},

Worked for me...using "@vue/cli-service/portfinder": "1.0.23"
"resolutions": {
"@vue/cli-service/portfinder": "1.0.23"
},


Shiny Tree Hunt Program

Looks good so far. Can you try rebasing to eliminate all the line-ending diffs?

I think I managed to rebase, the big reds scared me in the diffs but I believe everything is in order!


add a full bash dependency solver option

In some very rare case, bash dependency solving used when carchmagic is enabled might fail.
The (partial)  bash solver implemented in pacaur handles case where $CARCH magic bash is used in first-level dependency, while subsequent dependency level are handle by cower.
This partial bash solver implementation might fail when

the user install an AUR package that has an AUR dependency that uses $CARCH bash magic, and
that AUR dependency isn't correctly handled by cower.

Also, there is no $CARCH bash magic check done on subsequent dependency level. If an error occurs, the user won't know what's happening.
This is a theoretical problem, as I'm yet to find a real user case (but I guess it surely exist in a practical point of view).
Find a real user case, and find a nice way to integer it in pacaur without complexifying too much the interface.

Fixed in c443a5d8f379a56a2ee6babc7c4f019f6106b373.
The implementation is only marginally slower than using cower's internal parser, so I've just replaced the partial bash solver with a better, complete solver that covers 100% of the $CARCH magic cases. Yeah!
I'm not enabling that option by default yet, in order to release it in the 2.4.x branch (no config file change). It might become default later once I'm sure there's no bug left.


xxo: :technologist: Add hygen template

Codecov Report

Merging #861 (bcb956b) into main (7e883c2) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##              main      #861   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files           11        11
  Lines           55        55
  Branches         9         9
=========================================
  Hits            55        55

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