[Bug]: Ruby error on npm run dev after latest update

Please confirm that you have:

[X] Searched existing issues to see if your issue is a duplicate. (If you’ve found a duplicate issue, feel free to add additional information in a comment on it.)
[X] Reproduced the issue in the latest CLI version.

In which of these areas are you experiencing a problem?
Extension
Expected behavior
Npm run dev doesn't exit after being run.
Actual behavior
After issuing npm run dev, it will do everything just fine but it will eventually get stuck on bundle install (after instantiating ngrok tunnel and starting vite dev server).
Stack trace
2023-02-07 17:21:45 | backend    |
2023-02-07 17:21:45 | backend    | > dev
2023-02-07 17:21:45 | backend    | > cross-env NODE_ENV=development nodemon index.js --ignore ./frontend
2023-02-07 17:21:45 | backend    |
2023-02-07 17:21:45 | frontend   |
2023-02-07 17:21:45 | frontend   | > dev
2023-02-07 17:21:45 | frontend   | > vite
2023-02-07 17:21:45 | frontend   |
2023-02-07 17:21:46 | backend    | [nodemon] 2.0.20
2023-02-07 17:21:46 | backend    | [nodemon] to restart at any time, enter `rs`
2023-02-07 17:21:46 | backend    | [nodemon] watching path(s): *.*
2023-02-07 17:21:46 | backend    | [nodemon] watching extensions: js,mjs,json
2023-02-07 17:21:46 | backend    | [nodemon] starting `node index.js`
2023-02-07 17:21:46 | frontend   |
2023-02-07 17:21:46 | frontend   |   vite v2.9.15 dev server running at:
2023-02-07 17:21:46 | frontend   |
2023-02-07 17:21:46 | frontend   |   > Network:  http://<IP_ADDRESS>:50049/
2023-02-07 17:21:46 | frontend   |   > Local:    http://localhost:50049/
2023-02-07 17:21:46 | frontend   |
2023-02-07 17:21:46 | frontend   |   ready in 930ms.
2023-02-07 17:21:46 | frontend   |
2023-02-07 17:21:47 | backend    | [shopify-api/INFO] version 6.1.0, environment Node v18.13.0

── external error ─────────────────────────────────────────────────────────────────────────────────────────────────

Error coming from `bundle install`

Command failed with exit code 6: bundle install
Could not find compatible versions

Because the current Bundler version (2.4.5) does not satisfy bundler ~> 2.3.11
  and Gemfile depends on bundler ~> 2.3.11,
  version solving has failed.

Your bundle requires a different version of Bundler than the one you're running.
Install the necessary version with `gem install bundler:2.3.26` and rerun
bundler using `bundle _2.3.26_ install`
Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...

Reproduction steps

install latest shopify cli and themes version
run npm run dev

Operating System
Windows 11
Shopify CLI version (check your project's package.json if you're not sure)
3.40.2
Shell
No response
Node version (run node -v if you're not sure)
18.13
What language and version are you using in your application?
Node

Hi! Thanks for creating the issue.
We have just released a new version (3.42) that should fix this issue. Could you please upgrade and try again?

@gonzaloriestra hey! yeah, i'll try asap, i'll let you know if it's fixed or not.
Thank you for the work btw :)


Changed great-circle distance function

to a more numerically stable one (based on Vincenty formula).
Added references while doing so.
Edit: This is also the same method that geopy's great-circle distance is based off of:
distance.py

@mjziebarth Thanks for the PR.
Could you add another unit tests to check that we obtain the same results as in geopy? Say for some input, compute the result with geopy externally, and then write a test checking that PyKrige produces the same (hard-coded) value, then indicate in comments how that value was computed with geopy? What do you think?

@rth Yes, created some reference values and added them (including a comment how to recreate them) to the test routine.
Currently, that's 200 pseudorandom positions on a sphere created from a constant seed. Then, a distance matrix is created and some properties of that matrix are compared with the values obtained from a geopy-generated distance matrix.
Thoughts?

Everything looks good to me. Thanks for the PR!


Creating a new project makes the path with mixed slashes

Issue Report Checklist

[x] Searched the issues page for similar reports
[x] Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description
Happens when you select a different Location

What steps reproduce the problem?

Select a different Location from the project creation dialog
Type a name for the project

What is the expected output? What do you see instead?

Sure, please go ahead @vitoriahmc! It shouldn't be that hard to solve.

@vitoriahmc Do ask if you could use some help


Add a change function to change the existing properties of a schema

Feature request:
Similar to extend, but you are only allowed to change the existing properties of a schema, not extend it.
This is technically possible with .extend, but there is no typescript autocompletion for this.
const schema = z.object({
    name: z.string(),
    age: z.number().optional(),
});

// You are only allowed to change properties that already exist in the schema you are changing.
const changedScema = schema.change({
    age: z.number(),    // remove optional
});

const changedSchema2 = schema.change({
    occupation: z.string().optional(),    // typescript error, because this property does not exist on `schema`
});

This is very good for changing existing schemas for different use cases e.g. for my case, if I have comments for posts, under the hood they are the same schema, but have different restrictions to the schema e.g. min/max character counts etc

I found a way to get key autocompletion working inside .extend.

This doesn't ensure that you only specify known keys - you're still allowed to overwrite a key with a new schema.  But it does reduce the chance that you make typos. My plan is to add this to Zod 4.
I'm not convinced its worth adding a new method just for something like .change()...it's nice to have in some circumstances but the subtlety may be lost on new users. I'm trying to avoid having two nearly-identical methods.


Login by e-mail and/or username

Now it is only possible to use e-mail as ID string.
Can you allow users to input their login name, which is usually much shorter than e-mail?

Done in this commit


Reland - Introduce tone-based surfaces and accent color add-ons - Part 2

Reverts flutter/flutter#143973
This is a reland for #138521 with an updated g3fix(cl/605555997). Local test: cl/609608958.

When will flutter support the new Color Scheme tokens? Current color palette is different what material 3 has now on native. For example Google apps now has dimmed, more contrasting surface versus what we have.

This is breaking the tree with some un-approved golden file images. I am going to revert this until we can take a look.

Reason for revert: Failing goldens at the tip of tree

Oh I forget to update golden files! Thanks for helping revert this! Somehow the golden test alert doesn't show up.


Add more debug logging to show data load progress.

Add file load progress after every 10 GBs. 2) Print number of data points in the validation set(s) as well. Update the text for the log line with number train set data points to be consistent with it. 3) Fix printf format string in a label range error message.

 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.:x: ashok-ponnuswami-msft sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.


Exception: Unity process has exited - check ~/.config/unity3d/Allen\ Institute\ for\ Artificial\ Intelligence/AI2-THOR/Player.log for errors. Confirm that Vulkan is properly configured on this system using vulkaninfo from the vulkan-utils package. returncode=-11

I run the code in demo.ipynb
# the data will be saved under {data_path}/thor_tasks/makeCoffee/makeCoffee-1.
run_data_gen(data_path=os.getcwd(), task=task_info)

but there is error
Exception                                 Traceback (most recent call last)
Cell In[4], line 2
      1 # the data will be saved under {data_path}/thor_tasks/makeCoffee/makeCoffee-1.
----> 2 run_data_gen(data_path=os.getcwd(), task=task_info)

File ~/Desktop/robotLearning/reflect/main/gen_data.py:75, in run_data_gen(data_path, task)
     72     pickle.dump([], handle, protocol=pickle.HIGHEST_PROTOCOL)
     74 for i in range(int(task['num_samples'])):
---> 75     controller = Controller(
     76         agentMode="default",
     77         massThreshold=None,
     78         scene=task['scene'],
     79         visibilityDistance=1.5,
     80         gridSize=0.25,
     81         renderDepthImage=True,
     82         renderInstanceSegmentation=True,
     83         width=960,
     84         height=960,
     85         fieldOfView=60,
     86         platform=CloudRendering
     87     )
     88     # print("controller.last_event.metadata: ", controller.last_event.metadata['agent'])
     89     reachable_positions = controller.step(action="GetReachablePositions").metadata["actionReturn"]

File ~/anaconda3/envs/reflect_env/lib/python3.9/site-packages/ai2thor/controller.py:518, in Controller.__init__(self, quality, fullscreen, headless, port, start_unity, local_executable_path, local_build, commit_id, branch, width, height, x_display, host, scene, image_dir, save_image_per_frame, depth_format, add_depth_noise, download_only, include_private_scenes, server_class, gpu_device, platform, server_timeout, server_start_timeout, **unity_initialization_parameters)
    515 self._build.download()
    517 if not download_only:
--> 518     self.start(
    519         port=port,
    520         start_unity=start_unity,
    521         width=width,
    522         height=height,
    523         x_display=x_display,
    524         host=host,
    525     )
    527     self.initialization_parameters = unity_initialization_parameters
    529     if "continuous" in self.initialization_parameters:

File ~/anaconda3/envs/reflect_env/lib/python3.9/site-packages/ai2thor/controller.py:1436, in Controller.start(self, port, start_unity, width, height, x_display, host, player_screen_width, player_screen_height)
   1433     self.prune_releases()
   1435     unity_params = self.server.unity_params()
-> 1436     self._start_unity_thread(env, width, height, unity_params, image_name)
   1438 # receive the first request
   1439 self.last_event = self.server.receive(timeout=self.server_start_timeout)

File ~/anaconda3/envs/reflect_env/lib/python3.9/site-packages/ai2thor/controller.py:1153, in Controller._start_unity_thread(self, env, width, height, server_params, image_name)
   1144         if self.server.unity_proc.returncode is not None:
   1145             message = (
   1146                 "Unity process has exited - check "
   1147                 "~/.config/unity3d/Allen\ Institute\ for\ "
   (...)
   1151                 % (self.server.unity_proc.returncode,)
   1152             )
-> 1153             raise Exception(message)
   1155 except subprocess.TimeoutExpired:
   1156     pass

Exception: Unity process has exited - check ~/.config/unity3d/Allen\ Institute\ for\ Artificial\ Intelligence/AI2-THOR/Player.log for errors. Confirm that Vulkan is properly configured on this system using vulkaninfo from the vulkan-utils package. returncode=-11

My test and debug:
I have install unity, nvidia drive and CUDA in ubuntu20.04

I also run the minimal example in ai2thor
the result look good.

But I have the same error show above. please tell me how to solve.

Thanks for your interest in the project! Looks like the error is specific to the CloudRendering option in order to run unity headless.
https://github.com/allenai/ai2thor/blob/8ae7f49d1524c0854e6555dfb58711221f0c3402/ai2thor/controller.py#L1162

A quick fix would be to remove platform=CloudRendering since you seem to be running it on a desktop.
If you do want to run it headless, you can look into Player.log and post the error message in this thread. I can help check! I also do not have unity installed on my system, I believe when you call controller, ai2thor will download the unity package and store it under ~/.ai2thor. Not sure there's any incompatibility between the two and cause the crash.

请问如何解决的


Several Minor Fixes to various pages

Proposed changes

Fixed a typo in kuber-primer.md where the name of the file was incorrectly written as k8-app1.yml when it should be k8-app.yml

Restructured a sentence in docker-overview.md because of grammatical issues.

Fixed incorrect link when clicking the Open an Issue hyperlink to redirect to the correct GitHub Issue template.

Related issues (optional)
Refer to issues: #6742, #6699, and #6686 respectively for the above mentioned changes.

Had to recreate PR since I made the changes from GitHub website and there is no revert functionality yet. Please see new PR #6748.


[WIP] Fix Arrow conversion for TokenSpanArray with multi-doc

This fixes Arrow conversion of a TokenSpanArray that possibly uses multiple SpanArrays with multiple documents. The conversion follows these steps:

Get SpanArrays used in the TokenSpanArray and convert these to arrow, each is a struct with begins, ends, and dictionary array with the document
Concat the arrow SpanArrays together to make an arrow list of them
Build an arrow dictionary array that maps the index of the SpanArray used by each element of the TokenSpanArray to the SpanArray in the arrow list
create a struct array with token begins, token ends, and the token dictionary array

@frreiss this is still a bit of a WIP, need to add some tests like actual multi-doc array. Please have a look at the implementation when you can. It's a little complicated since we have dictionary arrays that point to other dictionary arrays, but overall I think it's a better approach than before.
Some areas are rough due to some issues in pyarrow, that probably could be made into a JIRA to be improved upstream, but I'll have to look into it more. Also, it seems this only works with pyarrow >= 2.0.0, so we might want to bump up the minimum version.

Merging this in its current form, as we need to have at least a semi-functional version of serialization in master so we can cut another release. @BryanCutler can you make a second PR with those testing improvements when they're ready?

Thanks @frreiss . Yeah, I'll do a followup with testing requirements. What do you think of bumping the minimum pyarrow to 2.0.0? Alternatively, we could just raise an error if the user tries to serialize with a lesser version.


[Feature] Can the current chart be displayed like this?

What problem does this feature solve?
displayed

What does the proposed API look like?
R demo

@helgasoft  Hahaha, how to solve it?

oops, ECharts editor ate my comments... Fixed, now ECharts Demo above has the R-code.
As I said, Javascript may have similar solutions. Here is one  with d3.beeswarm.

@helgasoft  Will you include beeswarm plots in ECharts in the future?

An interesting thing is that I was just implementing jittering effect for scatter series but I have no idea how to make scatters avoid being overlapped. I shall probably see how d3.beeswarm can inspire me.

@helgasoft Thank you very much for letting me know the term. :D

@helgasoft Thank you very much for letting me know the term. :D

This is great! When will it be released?


ClearScript execution of VBS code does not support ByRef parameter passing

VBS CODE:
Option Explicit
Sub Main
dim reftest
reftest=0
zp.testRef 5,reftest
zp.print reftest
End Sub
Main
VB.NET CODE:
Public Class VBClass
Public Sub Print(ByVal OutStr As Object, ByVal Optional iShow As Integer = 1)
Console.WriteLine("OutStr: " & OutStr & "!")
End Sub
Public Sub testRef(ByVal OutStr As Integer, Optional ByRef iShow As Object = Nothing)
    iShow = iShow + OutStr
    Console.WriteLine("testRef: " & iShow & "!")
End Sub

End Class
C# Code:
private void button10_Click(object sender, EventArgs e)
{
var VBscript = new VBClass();
using (var engine = new VBScriptEngine())
{
engine.AddHostObject("zp", VBscript);
var scriptCode = File.ReadAllText("D:/Script/abc.vbs");
engine.Execute(scriptCode);
        }

    }

Hello @Rison-Hub,
When a script invokes managed code, ClearScript uses the C# compiler to select the correct method – or construct a suitable generic method – based on the call signature. Unlike Visual Basic and VBScript, C# forces the caller to specify the passing mechanism for each argument.
Because script languages usually give you no way to do that, ClearScript provides its own solution. To pass something by reference to a managed method, you must use a host variable. Here's an example based on your code above:
using (var engine = new VBScriptEngine()) {
    engine.AddHostObject("zp", new VBClass());
    engine.AddHostObject("host", new HostFunctions());
    engine.Execute(@"
        Option Explicit
        Sub Main
            dim reftest
            reftest = host.newVar(clng(0))
            zp.testRef 5, reftest.ref
            zp.print reftest
        End Sub
        Main
    ");
}

Good luck!

Executing the code snippet you provided will result in an exception: "The most suitable overload method for 'VBLibrary.VBClass.testRef(int, ref object)' has some invalid arguments."

Executing the code snippet you provided will result in an exception: "The most suitable overload method for 'VBLibrary.VBClass.testRef(int, ref object)' has some invalid arguments."

Oops, sorry. We had modified testRef slightly. The following should work with your original definition:
using (var engine = new VBScriptEngine()) {
    engine.AddHostObject("zp", new VBClass());
    engine.AddHostObject("host", new HostFunctions());
    engine.AddHostType(typeof(object));
    engine.Execute(@"
        Option Explicit
        Sub Main
            dim reftest
            reftest = host.newVar(object, clng(0))
            zp.testRef 5, reftest.ref
            zp.print reftest
        End Sub
        Main
    ");
}

Thank you for your suggestion, but there is another question. My second parameter in the VB.NET method is an optional parameter. If I want to pass only one argument, how can I achieve a ByRef parameter that is not specified and request the method?

Hi again,

Error message: Microsoft.ClearScript.ScriptEngineException: "The method 'testRef' does not have an overload that takes '1' parameter."

Yes, unfortunately, C# doesn't support optional by-reference parameters, and, as we discussed above, ClearScript uses C#'s invocation semantics.
One workaround is to add an overload without the optional parameter:
Public Sub testRef(ByVal OutStr As Integer)
    testRef(OutStr, 0)
End Sub
Public Sub testRef(ByVal OutStr As Integer, Optional ByRef iShow As Integer = 0)
    iShow = iShow + OutStr
    Console.WriteLine("testRef: " & iShow & "!")
End Sub

Cheers!

Thank you very much for your guidance

Please reopen this issue if you have additional questions about this topic. Thank you!

Please reopen this issue if you have additional questions about this topic. Thank you!

I have encountered another issue. I want to pass a two-dimensional array and process it in VB.NET. How can I call and output the processed result values in VBS?
VBS code
`Option Explicit
dim timeGap(1,1)
timeGap(0,0)=37
timeGap(0,1)=1
timeGap(1,0)=39
timeGap(1,1)=2
Sub Main
dim ByReftest
ByReftest = host.newVar(object,timeGap)
zp.testArr 5, ByReftest.ref
zp.print ByReftest(0,0)
End Sub
Main`
VB.NET Code
Public Sub Print(ByVal strInfo As Object)         Console.WriteLine("strInfo : " & strInfo & "!")     End Sub Public Sub testArr(ByVal Ipar As Integer, ByRef arr As Object)        arr(0, 0)=arr(0, 0)+Ipar          Console.WriteLine("testRef: " & arr(0, 0) & "!")     End Sub
C# Code
using (var engine = new VBScriptEngine())
{
engine.AddHostObject("host", new HostFunctions());
engine.AddHostObject("zp", VBscript);
engine.AddHostType(typeof(object));
var scriptCode = File.ReadAllText("D:/Script/abc.vbs");
engine.Execute(scriptCode);
        }

Executing zp.print ByReftest(0,0) throws an error: Microsoft.ClearScript.ScriptEngineException: "The object does not support the requested invocation operation."

Hi @Rison-Hub,

Executing zp.print ByReftest(0,0) throws an error: Microsoft.ClearScript.ScriptEngineException: "The object does not support the requested invocation operation."

Hmm. ByRefTest is a host variable holding a .NET array (converted from a VBScript array). So, it's essentially a .NET array. Sadly, ClearScript doesn't support multidimensional indexing for .NET arrays via native VBScript syntax. It's a scenario that hasn't come up before, probably because most ClearScript users work with JavaScript, which has no native support for multidimensional arrays. We'll take a closer look at this for a future release. Thanks!
In the meantime, in this particular case, there's no need to use a host variable at all. Here's a working sample:
Public Sub Print(strInfo As Object)
    Console.WriteLine("strInfo : " & strInfo & "!")
End Sub
Public Sub testArr(Ipar As Integer, arr As Object)
    arr(0, 0) = arr(0, 0) + Ipar
    Console.WriteLine("testRef: " & arr(0, 0) & "!")
End Sub

C# code:
engine.AddHostObject("zp", new VBClass());
engine.Execute(@"
    Option Explicit
    dim timeGap(1,1)
        timeGap(0,0)=37
        timeGap(0,1)=1
        timeGap(1,0)=39
        timeGap(1,1)=2
    Sub Main
        zp.testArr 5, timeGap
        zp.print timeGap(0,0)
    End Sub
    Main
");

Please let us know if this solution works for you.
Thanks again!

Hi @Rison-Hub,

Executing zp.print ByReftest(0,0) throws an error: Microsoft.ClearScript.ScriptEngineException: "The object does not support the requested invocation operation."

Hmm. ByRefTest is a host variable holding a .NET array (converted from a VBScript array). So, it's essentially a .NET array. Sadly, ClearScript doesn't support multidimensional indexing for .NET arrays via native VBScript syntax. It's a scenario that hasn't come up before, probably because most ClearScript users work with JavaScript, which has no native support for multidimensional arrays. We'll take a closer look at this for a future release. Thanks!
In the meantime, in this particular case, there's no need to use a host variable at all. Here's a working sample:
Public Sub Print(strInfo As Object)
    Console.WriteLine("strInfo : " & strInfo & "!")
End Sub
Public Sub testArr(Ipar As Integer, arr As Object)
    arr(0, 0) = arr(0, 0) + Ipar
    Console.WriteLine("testRef: " & arr(0, 0) & "!")
End Sub

C# code:
engine.AddHostObject("zp", new VBClass());
engine.Execute(@"
    Option Explicit
    dim timeGap(1,1)
        timeGap(0,0)=37
        timeGap(0,1)=1
        timeGap(1,0)=39
        timeGap(1,1)=2
    Sub Main
        zp.testArr 5, timeGap
        zp.print timeGap(0,0)
    End Sub
    Main
");

Please let us know if this solution works for you.
Thanks again!

Thank you again for your guidance.

Hi @Rison-Hub,
Because iShow is a by-value parameter, testByVal can't change the external variable that provides iShow's argument. For that, you must use a by-reference parameter:
Public Sub testByRef(ByVal OutStr As Integer, ByRef iShow As Object)
    iShow = iShow + 5
    Console.WriteLine("testByRef: " & iShow & "!")
End Sub

And then:
engine.Execute(@"
    Option Explicit
    dim ByReftest
    ByReftest = host.newVar(object, 3)
    Sub Main
        zp.testByRef 5, ByReftest.ref
        zp.print ByReftest
    End Sub
    Main
");

Output:
testByRef: 8!
strInfo : 8!

Note that the situation above with the array is different because .NET arrays are reference types, meaning that you can modify the contents of a .NET array without modifying the variable that holds a reference to it.
In this case, even though the Object type forces the integer argument to be boxed and passed by reference, boxed values are immutable, so iShow = iShow + 5 creates a new boxed value instead of modifying the one referenced by ByValtest.
Good luck!

engine.AddHostObject("host", new HostFunctions());

@ClearScriptLib  I need to integrate with HALCON, where HObject is a reference type.
VB Code

Public Function EmptyHObj() As Object
        Dim image As HObject = Nothing
        HOperatorSet.GenEmptyObj(image)
        Return image
End Function

'Read Image
Public Sub New_ReadImage(ByVal Template_path As String, ByVal image As Object)
        Dim ho_Image As HObject = Nothing
        Dim hv_Template_path As HTuple = Nothing
        hv_Template_path = New HTuple(Template_path)
        HOperatorSet.ReadImage(image , hv_Template_path)
End Sub

'Display  Image
Public Sub display_open(ByVal Image As Object)
        Dim HWindow As HWindowControl = frm_open.HWindowControl1
        Dim Window As HTuple = HWindow.HalconWindow
        HWindow.HalconWindow.ClearWindow()
        Dim hv_Width As HTuple = Nothing
        Dim hv_Height As HTuple = Nothing
        If IsNothing(ho_Image) = False AndAlso ho_Image.IsInitialized Then
            HOperatorSet.GetImageSize(ho_Image, hv_Width, hv_Height)
            HOperatorSet.SetPart(Window, 0, 0, hv_Height, hv_Width)
            HOperatorSet.DispObj(ho_Image, Window)
        End If
        hv_Width = Nothing
        hv_Height = Nothing
End Sub

C# Code

engine.AddHostObject("host", new HostFunctions());
engine.AddHostObject("zp", VBscript);
engine.AddHostType(typeof(object));
engine.Execute(@"
    Option Explicit
Sub Main
	dim Image_Path,Image
	Image_Path="D:\AUTO Test System\Write\Image_Correction\MB2701-A1 - 副本\Image\0.bmp"
	Image=zp.EmptyHObj()
	call zp.New_ReadImage(Image_Path,Image)
	call zp.display_open(Image)
End Sub
Main
");

The value passed to display_open is the return value of EmptyHObj, not the value read from New_ReadImage.
However, if you use the following code, the value passed is correct.
VB Code

Public Function EmptyHObj() As Object
        Dim image As HObject = Nothing
        HOperatorSet.GenEmptyObj(image)
        Return image
End Function

'Read Image
Public Sub New_ReadImage(ByVal Template_path As String, ByRef image As Object)
        Dim ho_Image As HObject = Nothing
        Dim hv_Template_path As HTuple = Nothing
        hv_Template_path = New HTuple(Template_path)
        HOperatorSet.ReadImage(image , hv_Template_path)
End Sub

'Display  Image
Public Sub display_open(ByVal Image As Object)
        Dim HWindow As HWindowControl = frm_open.HWindowControl1
        Dim Window As HTuple = HWindow.HalconWindow
        HWindow.HalconWindow.ClearWindow()
        Dim hv_Width As HTuple = Nothing
        Dim hv_Height As HTuple = Nothing
        If IsNothing(ho_Image) = False AndAlso ho_Image.IsInitialized Then
            HOperatorSet.GetImageSize(ho_Image, hv_Width, hv_Height)
            HOperatorSet.SetPart(Window, 0, 0, hv_Height, hv_Width)
            HOperatorSet.DispObj(ho_Image, Window)
        End If
        hv_Width = Nothing
        hv_Height = Nothing
End Sub

C# Code

engine.AddHostObject("host", new HostFunctions());
engine.AddHostObject("zp", VBscript);
engine.AddHostType(typeof(object));
engine.Execute(@"
    Option Explicit
Sub Main
	dim Image_Path,Image
	Image_Path="D:\AUTO Test System\Write\Image_Correction\MB2701-A1 - 副本\Image\0.bmp"
	Image=host.newVar(object, zp.EmptyHObj())
	call zp.New_ReadImage(Image_Path,Image.ref)
	call zp.display_open(Image)
End Sub
Main
");

Hi @ClearScriptLib,
The behavior you're seeing is correct.
According to the HALCON documentation, the ReadImage method looks like this (in C#):
static void ReadImage(out HObject image, HTuple fileName)

Note that image is an out – or output – parameter. At the .NET level, that's just a by-reference parameter. However, in C#, out – unlike ref – additionally specifies that the method ignores any passed-in value and replaces it on successful return.
In this case, ReadImage creates a new object and stores a reference to it in image. If some other object is passed in, the method ignores it. It does not modify it or operate on it in any way.
Therefore, you don't have to call GenEmptyObj. However, because Main needs the new object, New_ReadImage must either store it in a by-reference parameter or simply return it.
Cheers!

Hi @ClearScriptLib,
The behavior you're seeing is correct.
According to the HALCON documentation, the ReadImage method looks like this (in C#):
static void ReadImage(out HObject image, HTuple fileName)

Note that image is an out – or output – parameter. At the .NET level, that's just a by-reference parameter. However, in C#, out – unlike ref – additionally specifies that the method ignores any passed-in value and replaces it on successful return.
In this case, ReadImage creates a new object and stores a reference to it in image. If some other object is passed in, the method ignores it. It does not modify it or operate on it in any way.
Therefore, you don't have to call GenEmptyObj. However, because Main needs the new object, New_ReadImage must either store it in a by-reference parameter or simply return it.
Cheers!
Thank you again for your guidance.


Add files via upload

Adding this as I saw it being requested on other PRs.
the school official website URL: https://www.srednjasolaravne.si/
an URL of a page on the official website where the school offers an IT-related long-term (>1 year) course: https://www.srednjasolaravne.si/racunalniski-tehnik/
a proof, which shows that the school recognizes the domain you are submitting as an official email domain for the students: https://www.srednjasolaravne.si/ucitelji/

@landmining Pull request merged. Thank you!


Extract setting of lora modulation params

This commit suggests extracting the lora modulation parameters into a
separate function which can then be called from both the do_tx, and
the do_rx functions.

LGTM :rocket:
bors r+

bors r+


Create CODE_OF_CONDUCT.md

Fixes #21
Checklist:

[x] I have performed a self-review of my code
[x] I have commented my code
[x] My changes generate no new warnings
[x] Have you successfully run tests with your changes locally?

LGTM! thanks for the work 💯


store default data in separate state property

right now, default data (fetched when new instances are created) is stored in state.components. This is messing up the validation, and complicating the pubsub system.
we should store this data in state.componentDefaults, so those two issues don't happen. (plus, if someone does actually use a default instance on their page, that should be validated and pubsubbed correctly)

fixed in commit 6120111


[CELEBORN-1527] Error prone plugin should exclude target/generated-sources/java of module

What changes were proposed in this pull request?
Error prone plugin excludes target/generated-sources/java of module.
Why are the changes needed?
Error prone plugin only excludes target/generated-sources/protobuf of module, which should also exclude target/generated-sources/java for openapi module.
$ mvn clean install -DskipTests -Dcheckstyle.skip=true -Drat.skip=true -Dspotless.check.skip=true|grep WARNING|grep java
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/master/WorkerApi.java:[59,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/master/WorkerApi.java:[75,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/master/WorkerApi.java:[95,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/master/WorkerApi.java:[110,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/master/WorkerApi.java:[130,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/master/WorkerApi.java:[145,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/master/WorkerApi.java:[166,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/master/WorkerApi.java:[182,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/master/invoker/ApiClient.java:[1107,28] [InlineMeSuggester] This deprecated API looks inlineable. If you'd like the body of the API to be inlined to its callers, please annotate it with @InlineMe.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/master/model/SendWorkerEventRequest.java:[59,19] [ImmutableEnumChecker] enums should be immutable: 'EventTypeEnum' has non-final field 'value'
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/worker/ApplicationApi.java:[55,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/worker/ApplicationApi.java:[70,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/worker/ApplicationApi.java:[90,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/worker/ApplicationApi.java:[105,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/worker/invoker/ApiClient.java:[1107,28] [InlineMeSuggester] This deprecated API looks inlineable. If you'd like the body of the API to be inlined to its callers, please annotate it with @InlineMe.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/worker/model/DynamicConfig.java:[54,19] [ImmutableEnumChecker] enums should be immutable: 'LevelEnum' has non-final field 'value'
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/worker/ShuffleApi.java:[55,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/worker/ShuffleApi.java:[70,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/worker/ShuffleApi.java:[90,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/worker/ShuffleApi.java:[105,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/worker/model/PartitionLocationData.java:[58,19] [ImmutableEnumChecker] enums should be immutable: 'ModeEnum' has non-final field 'value'
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/worker/model/PartitionLocationData.java:[107,19] [ImmutableEnumChecker] enums should be immutable: 'StorageEnum' has non-final field 'value'
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/worker/DefaultApi.java:[54,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/worker/DefaultApi.java:[69,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/master/model/DynamicConfig.java:[54,19] [ImmutableEnumChecker] enums should be immutable: 'LevelEnum' has non-final field 'value'
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/master/ApplicationApi.java:[56,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/master/ApplicationApi.java:[71,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/master/ApplicationApi.java:[91,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/master/ApplicationApi.java:[106,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/master/ApplicationApi.java:[126,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/master/ApplicationApi.java:[141,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/master/MasterApi.java:[54,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/master/MasterApi.java:[70,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/worker/ConfApi.java:[55,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/worker/ConfApi.java:[70,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/worker/ConfApi.java:[93,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/worker/ConfApi.java:[112,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/master/DefaultApi.java:[54,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/master/DefaultApi.java:[69,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/master/ShuffleApi.java:[54,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/master/ShuffleApi.java:[69,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/worker/WorkerApi.java:[57,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/worker/WorkerApi.java:[72,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/worker/WorkerApi.java:[92,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/worker/WorkerApi.java:[107,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/worker/WorkerApi.java:[128,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/worker/WorkerApi.java:[144,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/worker/model/WorkerExitRequest.java:[51,19] [ImmutableEnumChecker] enums should be immutable: 'TypeEnum' has non-final field 'value'
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/master/ConfApi.java:[55,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/master/ConfApi.java:[70,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/master/ConfApi.java:[93,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-client/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/master/ConfApi.java:[112,5] [InvalidBlockTag] Tag name `http.response.details` is unknown. If this is a commonly-used custom tag, please click 'not useful' and file a bug.
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-model/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/model/WorkerExitRequest.java:[51,19] [ImmutableEnumChecker] enums should be immutable: 'TypeEnum' has non-final field 'value'
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-model/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/model/SendWorkerEventRequest.java:[59,19] [ImmutableEnumChecker] enums should be immutable: 'EventTypeEnum' has non-final field 'value'
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-model/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/model/DynamicConfig.java:[54,19] [ImmutableEnumChecker] enums should be immutable: 'LevelEnum' has non-final field 'value'
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-model/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/model/PartitionLocationData.java:[58,19] [ImmutableEnumChecker] enums should be immutable: 'ModeEnum' has non-final field 'value'
[WARNING] /Users/nicholas/Github/celeborn/openapi/openapi-model/target/generated-sources/java/src/main/java/org/apache/celeborn/rest/v1/model/PartitionLocationData.java:[107,19] [ImmutableEnumChecker] enums should be immutable: 'StorageEnum' has non-final field 'value'

Does this PR introduce any user-facing change?
No.
How was this patch tested?
Local test.
$ mvn clean install -DskipTests -Dcheckstyle.skip=true -Drat.skip=true -Dspotless.check.skip=true|grep WARNING|grep java

Ping @pan3793, @mridulm.

do we need to tune the exclusion pattern for other cases? e.g. rat, fommatter

@pan3793, I have checked all exclusion pattern and all target directory patterns that only error prone plugin tune this pattern.


Json functions returns wrong value (null) when casting varchar to json is used.

Json functions returns null, while it is expected to return value. It happens only when casting from varchar to json is used. I noticed that for json_array_length and json_array_contains. See below example usage:
presto:default> SELECT json_array_length(JSON '[1, 2, 3]');
 _col0
-------
     3
(1 row)
presto:default> SELECT json_array_length('[1, 2, 3]');
 _col0
-------
     3
(1 row)
presto:default> SELECT json_array_length(CAST('[1, 2, 3]' AS JSON));
 _col0
-------
 NULL
(1 row)

We removed the old behavior of cast between JSON and VARCHAR. And replaced it with a system of CAST between JSON and primitive/structural types. The old behavior can be found in function JSON_PARSE and JSON_FORMAT.

CAST (JSON '5' as BIGINT)
CAST (JSON '1.23' as BIGINT)
CAST (JSON '"a"' as VARCHAR)
CAST (JSON '[1,2,3]' as ARRAY<BIGINT>)
CAST (JSON '["a", "b", "c"]' as ARRAY<VARCHAR>)
CAST (JSON '{"a": 1}' as MAP<VARCHAR, BIGINT>)

See #3197 (and related request for comments in mailing list), release 0.116, release 0.117, release 0.122, release 0.135.
Since release 0.117, new functions JSON_PARSE, JSON_FORMAT are introduced;
Since release 0.122, cast between JSON and VARCHAR throws exception instructing users to migrate.
Since release 0.136, new behavior of cast between JSON and VARCHAR is introduced along with other cast between JSON and primitive types.

Instead of using a cast, use the json_parse function.  For example:
presto:default> SELECT json_array_length(json_parse('[1, 2, 3]'));
 _col0
-------
     3
(1 row)

@haozhun, @dain Thanks, I am closing this issue.


Display missing lines in coverage

Coverage increased (+0.09%) to 37.376% when pulling 0add5e61c87b7e0183d26c78a378b61425cbb60f on viraptor:coverage_with_lines into 5763c13ceac83246c13bdf3e98414f176fb31f8e on HewlettPackard:master.

Coverage remained the same at 37.376% when pulling 4429be30ec6d0b9ca5b3e799d5340100853adb40 on viraptor:coverage_with_lines into 8a5a2542242e35d56e890f6aa891d2701be02f86 on HewlettPackard:master.


Enter/Return key does not close the pop-up modal

The Enter/Return key does not close the pop-up modal when submitting a pet name.  The user MUST click the "OK" button to close the modal.  I would like to add code to close the modal with either the Enter key or the "OK" button.

I will create a PR on branch front-end-updates that has fixed this issue.

Fixed with the latest front-end update merge.

Fixed for Chrome.  Issue still remains when using Safari.

fixed with latest PR.


elastic.NewTermQuery don't find result with capital letters

Version used
[X] elastic.v5 (for Elasticsearch 5.x)
Please describe the expected behavior
key := "title"
value := "Test"
termQuery := elastic.NewTermQuery(key, value)
searchResult, err := elClient.Search().
		Index("indexsample").
		Type("product").
		Query(termQuery).
		Do(context.Background())

This way of search in elastic search should enable me to search the given value for the given key whatever the case is.
Please describe the actual behavior
It does not work for value with an UpperCase.
Any steps to reproduce the behavior?
Insert any value with an uppercase and try to find it with elastic.NewTermQuery(key, value)
Current workaround
searchResult, err := elClient.Search().
		Index("indexsample").
		Type("product").
		Query(elastic.NewSimpleQueryStringQuery(value)).
		Do(context.Background())

It works doing so. What I don't like it is that by default we cannot filter to a specific term.
If you have any idea to enhance my workaround in the meantime ?

It all depends on the mapping. Maybe you're doing a fulltext query instead of a keyword query. What is the mapping of the title property?
See the "Why doesn’t the term query match my document?" in the term query docs.
If this doesn't solve your issue, let me know.

Indead standard analyzer drops most punctuation, breaks up text into individual words, and lower cases them.
That's the reason, thank you for the explanation. I was looking into your code and finding nothing about lowercase. In fact it comes from Elastic engine.
By the way, good job for this project!

You're welcome. Elastic is just a client. Elasticsearch is the thing you need to focus on.


'uipf -l' generates symbol lookup error on Debian 9.3 / Ubuntu 17.10

Hi,
I want to extend UIPF for my bachelor thesis. Therefore, I compiled UIPF successfully after removing a circular dependency. Unfortunately I encountered an error which I don't seem to be able to fix even after considerable time and effort. Maybe you can help me, @cebe ?
The problem
The modules are not loaded correctly when executing uipf -l. I think it may be a problem with Glibmm or a mistake by me. The concrete error seems to be: symbol lookup error resulting in GModule-CRITICAL **: g_module_name: assertion 'module != NULL' failed. (see attached logs for more)
Details
I could pinpoint the error to libModule->get_symbol or //UIPF_LOG_TRACE("Found Module: ", libModule->get_name()); (if you uncomment this log trace).
The module is instantiated correctly according to Glibmm as Glib::Module::bool() is overriden to check for success:
if(libModule) {
      // do something; e.g. UIPF_LOG_TRACE("SUCCESS");
      // this (would) get executed
}

How to reproduce the error:

fresh install of Ubuntu 17.10 or Debian 9.3 (I tried both with the same result)
sudo apt-get install libboost-serialization-dev libboost-program-options-dev libboost-filesystem-dev libboost-graph-dev libopencv-dev qtbase5-dev qtbase5-dev-tools libglibmm-2.4-dev build-essential cmake pkg-config clang libcgal-dev libcgal-qt5-dev
install Qt Creator as instructed in the readme
build as instructed (use the test branch of my fork as the master branch here seems to result in circular dependency issue. This may also be a mistake on my part! But it would not compile otherwise because of undefined references. )
sudo ldconfig
uipf -l

System and logs
OS: Ubuntu 17.10 / Debian 9.3
Glibmm: 2.4
Boost: 1.62

uipf-l--trace.log
uipf-l--trace--LD_DEBUG.log

The file paths mentioned in the logs do exist (e.g. "/usr/local/lib/uipf/libResizeModule.so").

I hope I could explain my problem properly and appreciate any help or thoughts on this matter.
Sincerely,
Dominik

use the test branch of my fork as the master branch here seems to result in circular dependency issue.

There seems to be a problem with some test file, which you can ignore if you compile with cmake option cmake .. -DWITH_TESTS=off
I tried to run a build in an lxc container using debian 9.3:
sudo lxc-create -n uipf-debian93 --template=debian -- -r stretch
sudo lxc-start -n uipf-debian93
sudo lxc-attach -n uipf-debian93
apt-get update
apt-get dist-upgrade
cat /etc/debian_version # this is 9.3 now
apt-get install libboost-serialization-dev libboost-program-options-dev libboost-filesystem-dev libboost-graph-dev libopencv-dev qtbase5-dev qtbase5-dev-tools libglibmm-2.4-dev build-essential cmake pkg-config clang libcgal-dev libcgal-qt5-dev
apt-get install git

build
git clone https://github.com/uipf/uipf /usr/local/src/uipf
cd /usr/local/src/uipf
mkdir code/build
cd code/build
cmake .. -DWITH_TESTS=off
make

after that running uipf -l works as expected:
# ./uipf -l
uipf.opencv.copy
uipf.opencv.imgproc.resize
uipf.opencv.load
uipf.opencv.load_images
uipf.opencv.store_image

Need to figure out whats wrong with the test, but the issue you described seems to be related to your changes as far as I can see.

I committed a fix, that should allow you to compile uipf with tests enabled. Tests seem to fail though.

:arrow_right: #3

Thanks for you fast reply!
The uipf master branch compiles successfully now (using a fresh debian 9.3 install on VirtualBox). However, I am still receiving the exact same error messages executing uipf -l after building according to your commands:

~$ ./uipf -l
(process:1528): GModule-CRITICAL **: g_module_symbol: assertion 'module != NULL' failed
Error: Failed to load module: /usr/local/lib/uipf/libLoadImageModule.so -
(process:1528): GModule-CRITICAL **: g_module_symbol: assertion 'module != NULL' failed
Error: Failed to load module: /usr/local/lib/uipf/libCopyImageModule.so -
(process:1528): GModule-CRITICAL **: g_module_symbol: assertion 'module != NULL' failed
Error: Failed to load module: /usr/local/lib/uipf/libStoreImageModule.so -
(process:1528): GModule-CRITICAL **: g_module_symbol: assertion 'module != NULL' failed
Error: Failed to load module: /usr/local/lib/uipf/libResizeModule.so -
(process:1528): GModule-CRITICAL **: g_module_symbol: assertion 'module != NULL' failed
Error: Failed to load module: /usr/local/lib/uipf/libLoadImagesModule.so -

that is weird, do your build steps differ from mine? If so, how?

I agree that it's weird. I just did it again to be sure and the only difference is the type of virtualization, I think.
All commands I executed after installing debian 9.3 (net install version):
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install libboost-serialization-dev libboost-program-options-dev libboost-filesystem-dev libboost-graph-dev libopencv-dev qtbase5-dev qtbase5-dev-tools libglibmm-2.4-dev build-essential cmake pkg-config clang libcgal-dev libcgal-qt5-dev
sudo apt-get install git

sudo git clone https://github.com/uipf/uipf /usr/local/src/uipf
cd /usr/local/src/uipf
sudo mkdir code/build
cd code/build
sudo cmake ..
sudo make
sudo make install

sudo ldconfig # has to be called to use the 'uipf -l' command, and not the local file
sudo uipf -l

I skipped the make install part. Will try again with make install.

# make install
# uipf -l
uipf: error while loading shared libraries: libuipf.so.2.0: cannot open shared object file: No such file or directory
# ldconfig
# uipf -l
uipf.opencv.copy
uipf.opencv.imgproc.resize
uipf.opencv.load
uipf.opencv.load_images
uipf.opencv.store_image

works fine.

Can you give the output of the following commands?
uname -a
cat /etc/debian_version
gcc --version
clang --version
dpkg -l | grep libglib

the only thing that differs between our environments is the kernel, but I do not see how a different kernel should influence loading of library symbols...

I just tried again with a live debian from a usb drive to check if my virtualization environment is buggy. (Though the current version now is debian 9.4, same libs as in my previous comment) I am still getting the same errors. Hence, VirtualBox shouldn't be the cause.

I'm out of ideas on this one, sorry.

does installing the binaries from .deb files work for you? https://github.com/uipf/uipf/releases/tag/2.0.0-alpha

This works fine on a fresh install. So something in my building process should be wrong.


Keyboard-state module not detecting capslock status correctly

I'm using a moonlander. Waybar does not seem to be detecting the capslock state correctly. Starting waybar with my user as a member of the input group and the keyboard-state module enabled yields:

But, the capslock state in the bar behaves a bit weirdly:

On bar start it's correct (shows the unlocked icon when capslock is off)
When pressing capslock it responds correctly as well (shows the lock icon when capslock is on)
But after that it no longer responds to capslock changes. So it keeps showing the lock icon, no matter if capslock is on or off (i.e. it no longer responds to the actual capslock state).

The following script (as a custom module, based on the suggestion here: https://github.com/swaywm/sway/issues/4512#issuecomment-526898845) does work correctly:
#!/bin/bash

capslock=$(cat /sys/class/leds/input17::capslock/brightness)

if [[ "${capslock}" == "1" ]]; then
  echo ''
  echo ''
  echo "locked"
  exit 0
fi

echo ''
echo ''
echo "unlocked"

This is the (truncated) output of swaymsg -t get_inputs:
[...]

Input device: ZSA Technology Labs Moonlander Mark I Keyboard
  Type: Keyboard
  Identifier: 12951:6505:ZSA_Technology_Labs_Moonlander_Mark_I_Keyboard
  Product ID: 6505
  Vendor ID: 12951
  Active Keyboard Layout: English (US)
  Libinput Send Events: enabled

Input device: ZSA Technology Labs Moonlander Mark I Consumer Control
  Type: Mouse
  Identifier: 12951:6505:ZSA_Technology_Labs_Moonlander_Mark_I_Consumer_Control
  Product ID: 6505
  Vendor ID: 12951
  Libinput Send Events: enabled

Input device: ZSA Technology Labs Moonlander Mark I Consumer Control
  Type: Keyboard
  Identifier: 12951:6505:ZSA_Technology_Labs_Moonlander_Mark_I_Consumer_Control
  Product ID: 6505
  Vendor ID: 12951
  Active Keyboard Layout: English (US)
  Libinput Send Events: enabled

Input device: ZSA Technology Labs Moonlander Mark I System Control
  Type: Keyboard
  Identifier: 12951:6505:ZSA_Technology_Labs_Moonlander_Mark_I_System_Control
  Product ID: 6505
  Vendor ID: 12951
  Active Keyboard Layout: English (US)
  Libinput Send Events: enabled

Input device: ZSA Technology Labs Moonlander Mark I
  Type: Keyboard
  Identifier: 12951:6505:ZSA_Technology_Labs_Moonlander_Mark_I
  Product ID: 6505
  Vendor ID: 12951
  Active Keyboard Layout: English (US)
  Libinput Send Events: enabled

[...]

As you see the moonlander is in there multiple times. I wonder if waybar is just listening to the wrong device. And if so, can we specify in the config what device it should listen to? It doesn't seem like it from the docs.

The keyboard-state module was invisible/broken until today, I just noticed that it isn't working correctly for me either; I detest the physical Caps Lock key because 99% of the time I hit it unintentionally, so I've remapped that key to be Left Control, and I toggle Caps Lock by pressing both Shift keys at the same time, using the Sway config input "type:keyboard" xkb_options "shift:both_capslock". The keyboard-state module does not respond when I toggle Caps Lock like this.

The keyboard-state module was invisible/broken until today, I just noticed that it isn't working correctly for me either; I detest the physical Caps Lock key because 99% of the time I hit it unintentionally, so I've remapped that key to be Left Control, and I toggle Caps Lock by pressing both Shift keys at the same time, using the Sway config input "type:keyboard" xkb_options "shift:both_capslock". The keyboard-state module does not respond when I toggle Caps Lock like this.

Same here, if you change using both shifts it will not update, unless you tap caps lock. So I guess the update is hardcoded to the capslock key

Hi all, I'm the one who changed the keyboard-state module recently, if you have any questions, please ask me.
In the last change, I introduced libinput for better interaction, but I didn't realize that it caused the bugs you encountered above.
First of all, I'm going to submit a patch to fix the problem that @krompus encountered.
And @ismay , can you provide me the result after running sudo libinput debug-events --show-keycodes with Caps Lock?

Hi @asas1asas200, sorry I can't, I'm no longer using waybar. I switched to i3blocks and swaybar a while back.

Hi @asas1asas200, yeah as long as it's not waybar specific I'd be happy to help (I'm no longer using waybar). This is the output:
-event2   DEVICE_ADDED            Power Button                      seat0 default group1  cap:k
-event1   DEVICE_ADDED            Power Button                      seat0 default group2  cap:k
-event0   DEVICE_ADDED            Sleep Button                      seat0 default group3  cap:k
-event3   DEVICE_ADDED            ZSA Technology Labs Moonlander Mark I seat0 default group4  cap:k
-event4   DEVICE_ADDED            ZSA Technology Labs Moonlander Mark I System Control seat0 default group4  cap:k
-event5   DEVICE_ADDED            ZSA Technology Labs Moonlander Mark I Consumer Control seat0 default group4  cap:kp scroll-nat
-event6   DEVICE_ADDED            ZSA Technology Labs Moonlander Mark I Keyboard seat0 default group4  cap:k
-event7   DEVICE_ADDED            Logitech MX Vertical              seat0 default group5  cap:kp left scroll-nat scroll-button
-event9   DEVICE_ADDED            Eee PC WMI hotkeys                seat0 default group7  cap:k
-event3   KEYBOARD_KEY            +0.000s	KEY_CAPSLOCK (58) pressed
 event3   KEYBOARD_KEY            +0.125s	KEY_CAPSLOCK (58) released
 event3   KEYBOARD_KEY            +1.225s	KEY_CAPSLOCK (58) pressed
 event3   KEYBOARD_KEY            +1.337s	KEY_CAPSLOCK (58) released

@ismay The results from libinput don't seem to have any problems, I can't troubleshoot your problem at the moment, if you still want to try to fix it then contact me.
Sincerely,

@asas1asas200 Exactly same problem as OP describes. Vanilla waybar config, no keys being swapped. An update broke something.

I introduced libinput for better interaction

Maybe this is  the issue, given that:
$ libinput
Command 'libinput' not found, but can be installed with:
sudo apt install libinput-tools

Using latest Ubuntu.

@Friptick Which WM does you use.
Most wayland compositors use libinput backend, such as wlroots and weston, but it is not required.
The libinput command in shell cannot indicate your compositor doesn't use libinput, the command is just a client tool of libinput.

OK thanks for the explanation @asas1asas200. Using sway. What should I try?

You can install libinput-tools or goto /usr/include/linux/input-event-codes.h to find event code.
And build waybar from source or wait for the update then change the config to customize your num/caps/scroll lock trigger key.

-event4   KEYBOARD_KEY            +0.000s	KEY_CAPSLOCK (58) pressed
 event4   KEYBOARD_KEY            +0.168s	KEY_CAPSLOCK (58) released

Using Wayfire, and this happens periodically. Restarting my session doesn't seem to fix it. It seems to stick at least until I reboot. Also using uwsm to launch my session.

@Alexays I think it's fair to reopen this. Several people have confirmed that this is an issue for them as well.

I am facing the same issue, but I am using https://github.com/k0kubun/xremap to remap certain keys. However, no function is assigned to the caps lock key.
Without xremap (it works):
-event6   KEYBOARD_KEY            +8.881s	KEY_CAPSLOCK (58) pressed
 event6   KEYBOARD_KEY            +8.934s	KEY_CAPSLOCK (58) released

With xremap (doesn't):
 event11  KEYBOARD_KEY            +0.000s	KEY_CAPSLOCK (58) pressed
 event11  KEYBOARD_KEY            +0.069s	KEY_CAPSLOCK (58) released

I'm having a similar Issue, for me it's never updating the state, no matter what I do.
libinput output:
-event1   DEVICE_ADDED            Power Button                      seat0 default group1  cap:k
-event0   DEVICE_ADDED            Power Button                      seat0 default group2  cap:k
-event4   DEVICE_ADDED            Razer Razer Ornata V3             seat0 default group3  cap:k
-event14  DEVICE_ADDED            Razer Razer Ornata V3             seat0 default group3  cap:kp scroll-nat
-event16  DEVICE_ADDED            Razer Razer Ornata V3             seat0 default group3  cap:kp left scroll-nat scroll-button
-event7   DEVICE_ADDED            Razer Razer Viper Ultimate Dongle seat0 default group4  cap:p left scroll-nat scroll-button
-event13  DEVICE_ADDED            Razer Razer Viper Ultimate Dongle seat0 default group4  cap:kp scroll-nat
-event19  DEVICE_ADDED            Razer Razer Viper Ultimate Dongle seat0 default group4  cap:k
-event4   KEYBOARD_KEY            +0.000s	KEY_CAPSLOCK (58) pressed
 event4   KEYBOARD_KEY            +0.067s	KEY_CAPSLOCK (58) released
 event4   KEYBOARD_KEY            +0.179s	KEY_CAPSLOCK (58) pressed
 event4   KEYBOARD_KEY            +0.242s	KEY_CAPSLOCK (58) released
 event4   KEYBOARD_KEY            +1.306s	KEY_NUMLOCK (69) pressed
 event4   KEYBOARD_KEY            +1.367s	KEY_NUMLOCK (69) released
 event4   KEYBOARD_KEY            +1.495s	KEY_NUMLOCK (69) pressed
 event4   KEYBOARD_KEY            +1.561s	KEY_NUMLOCK (69) released
 event4   KEYBOARD_KEY            +1.931s	KEY_SCROLLLOCK (70) pressed
 event4   KEYBOARD_KEY            +1.979s	KEY_SCROLLLOCK (70) released
 event4   KEYBOARD_KEY            +2.086s	KEY_SCROLLLOCK (70) pressed
 event4   KEYBOARD_KEY            +2.149s	KEY_SCROLLLOCK (70) released

I guess following is what is happening (at least with me).
Working

The trigger for the module is CAPS-LOCK.
Waybar infers CAPS LOCK state from the /sys/class/led/ (I guessed this from the behaviour: see below).
Now I have mapped CAPS-LOCK LED's state to secondary input language (Marathi in my case).

So,
Behaviour

When CAPS-LOCK is pressed with primay output (English), the module is triggerred, but said LED OFF because I am still using English.

When I switch to secondary input language (mapping: both shifts together), the LED turns ON, but the module is NOT triggerred, since CAPS-LOCK was never pressed for switching to the secondary input language.

When I switch to the secondary input language (using both shifts together), the LED turns ON. Now, when I press the CAPS-LOCK, the module is correctly triggerred and the icon changes to LOCKED icon state.

Reciprocally, when I switch back from secondary to English (hence, turn OFF the CAPS LOCK LED) and then hit CAPS-LOCK, the state icon state gets UNLOCKED.

Solution?
I guess a solution would be for waybar to infer CAPS LOCK's state from the system rather than inferring from LED STATE.
I found that under X11, one would achieve that by running xset q. I couldn't find an equivalent for wayland though.

Chiming in to say that I'm seeing this behavior as well. The module correctly detects the state of numlock/capslock when launching, but does not react to key further key activations.
Key press is indeed detected by the system:
sudo libinput debug-events --show-keycodes
-event1   DEVICE_ADDED            Power Button                      seat0 default group1  cap:k
-event0   DEVICE_ADDED            Power Button                      seat0 default group2  cap:k
-event15  DEVICE_ADDED            BenQ ZOWIE BenQ ZOWIE Gaming Mouse seat0 default group3  cap:p left scroll-nat scroll-button
-event16  DEVICE_ADDED            BenQ ZOWIE BenQ ZOWIE Gaming Mouse seat0 default group3  cap:k
-event17  DEVICE_ADDED            ATEN ATEN 2/4-PORT 4K HDMI KVM SWITCH seat0 default group4  cap:k
-event18  DEVICE_ADDED            ATEN ATEN 2/4-PORT 4K HDMI KVM SWITCH seat0 default group4  cap:p left scroll-nat scroll-button
-event19  DEVICE_ADDED            ATEN ATEN 2/4-PORT 4K HDMI KVM SWITCH Keyboard seat0 default group4  cap:kp scroll-nat
-event20  DEVICE_ADDED            ATEN ATEN 2/4-PORT 4K HDMI KVM SWITCH seat0 default group4  cap:p left scroll-nat calib
-event19  KEYBOARD_KEY            +0.000s	KEY_CAPSLOCK (58) pressed
 event19  KEYBOARD_KEY            +0.123s	KEY_CAPSLOCK (58) released

This is the module configuration, showing the the correct device is expliticly listed under device-path:
   "keyboard-state": {
       "numlock": true,
       "capslock": true,
       "format": "{name} {icon}",
       "format-icons": {
           "locked": "",
           "unlocked": ""
       },
       "device-path": "/dev/input/event19"
   },


Add basic VR movement for Oculus Quest

This PR adds support for oculus quest to the StandardEnvironment, enabled with the vr property, which is enabled in the example. Not enabling vr keeps the environment as it was before, using the regular canvas and movement.
I've tried to follow the project structure by adding VRController and VRControllerMovement components.
Users can look around in VR and move around using the control sticks on the oculus quest. Right now it is just basic movement on a plane but perhaps this can be extended in the future to include alternative movement methods such as flying or teleport movement.
The VR flag disables effects as they seem to break VR mode. Perhaps there's a specific effect causing this, but for now I've just disabled them all.
I had to wrap the camera inside a group that was attached to the player object in order to allow the camera to have a base rotation as well as the rotation from head movement, and I pass this down to the VR component to rotate.
If you have any suggestions for better ways to implement this, I'm happy to contribute further. Otherwise, I hope this serves as a reference for implementing VR support and I will continue testing this implementation.

While the logic for movement I think works well, I think the vr flag should probably re-considered and maybe made default, otherwise there are unsightly checks for vr dotted around. Thoughts?

sorry should be able to get to it tonight, but yes i agree, vr should be the default. as such, components that add functionality that would interface with vr (such as the Interactable modifier) would know to handle the vr vs. non-vr case.

copied some of the code to #24, closing now


Project version texts causing rpm builds fail with 'Unknown tag: x.x.x.x' (x are version numbers)

I am facing this issue since our first rpm package i've built.
I am building a .NET Core project on my Windows machine, and then copying the built project onto the CentOS machine and then wrapping it up in an RPM.
I have a spec file which kind'a automates rpm builds. To specify rpm's version info, this spec file reads my dll's version (file version). I set this version information using "project properties -> package -> Assembly version & Assembly file version & Package version" inputs over visual studio (2017-windows).
Sometimes, not always but quite frequently, those version numbers are causing rpm builds fail with 'Unknown tag: x.x.x.x' message (x-es are version numbers). I found a turnaround for that which is ridiculous but works great.
I am opening a web browser, searching for the version number i want to use. Once the search is complete, i copy the text from one of search results and paste that text into "assembly version", "assembly file version" and "package version" inputs.
For example: current version is '<IP_ADDRESS>' and i want to change it as '<IP_ADDRESS>'. Then i google '2', copy another '2' from one of the search results and paste it into the last inputs of "assembly version", "assembly file version" and "package version".
And this solution never fails. The text i copy from a google search result works, buy my keyboard's input doesn't...
I don't even know where this issue belongs but it doesn't make one's life easy.

I don't quite understand what is the problem - it seems that you cannot edit fields in package properties inside Visual Studio. Is that correct?
Does it happen on more than 1 machine?
Did you try latest VS build?

@karelz i know you don't like reading, it's hard or whatever but, can you at least read the title?
Your question is really so irrelevant, so absurd.
Details (including examples) are below the title.
Those properties, are making, my rpm builds, to fail, if i use my keybord, to write, those version numbers.

@ahmedowsky no need to get angry here ... I am just trying to help you here. Personal attacks won't speed things up.
The fact is I never heard about rpm builds. The title may be self-explanatory for you, but sadly it is not clear to me. And while I read all your text, it was not clear to me either. Otherwise I would not ask the questions above.
For example, it is still not clear to me if you are unable to type anything in the text boxes (from keyboard), or if the values are just not being respected when typed from keyboard.
BTW: That's why clear step-by-step repro steps (starting with new project) help clarify things. If you don't know where the issue is (which component), it is GREAT help and usually makes routing to the right place much faster.

I'm sorry, i really am. I didn't mean to upset you. I was assuming that someone commenting under this issue would know about rpm builds.
I can edit package inputs over VS no problem there. I can build the project, no problem there. Published dll's are also has the right version information on them. All cool on windows / VS part.
Here's a step-by-step example

open a dotnet core console app / web api (doesn't matter)

build it & publish it & copy them inside a centos7 machine

create a spec file (this file is something like a rpm build instruction)

modify that spec file so it would be able to read rpm package's version information directly from the published dll (by doing so you won't have to edit spec file for every new version)

build rpm package for that published output inside the centos7 machine

build passes, rpm package is ready (all cool)

open project properties -> package

change "assembly version", "assembly file version" and "package version" as you wish, using numbers on your keyboard (lets say <IP_ADDRESS>)

build it & publish it & copy them inside a centos7 machine

build rpm package for that published output inside the centos7 machine

build fails (usually)

open project properties -> package

change "assembly version", "assembly file version" and "package version" as you wish, by copy-paste-ing numbers from a google search result (lets say <IP_ADDRESS>)

build it & publish it & copy them inside a centos7 machine

build rpm package for that published output inside the centos7 machine

build always succeeds

Thanks for the steps! That will (hopefully) help me help you! ;)

build fails (usually)

Why did you say "usually"? Is it intermittent? (as in repeating builds sometime fail) Or is it just random if the problem will be hit or not and once it is, then it is persistent? How often does it happen? (in either case)
Is the error the one from title? "Unknown tag: x.x.x.x' (x are version numbers)" ... so in this case it would be "... <IP_ADDRESS>"?
This is overall very weird (and interesting ;)). It sounds like VS in the "bad" case does not save some files. Can you please compare the project and its output between the "working case" and the "broken case" (ideally both changing to the same version number from the same original number) to observe if there is any difference.
Once we track down which file is different (i.e. it was not saved), maybe we can figure out which component is to blame (and to be routed to).

BTW: I updated your steps to add numbers and bad/good case titles for easier references during further discussion.

Why did you say "usually"? Is it intermittent? (as in repeating builds sometime fail) Or is it just random if the problem will be hit or not and once it is, then it is persistent?

Random, if it's a fail, it always fails, doesn't matter how many times i repeat rpm build process after that

How often does it happen?

Quite often, i just prefer copy-paste-ing approach all the time

Is the error the one from title? "Unknown tag: x.x.x.x' (x are version numbers)" ... so in this case it would be "... <IP_ADDRESS>"?

Yes, rpm build error will be "Unknown tag: <IP_ADDRESS>" in this case

This is overall very weird (and interesting ;))

Watching your teammates faces right after explaining this situation is also funny

It sounds like VS in the "bad case" does not save some files

I'm not sure about that. All i do is reading the dll's version information. And spec file actually can read that, even in the 'bad case'.
On Spec file i have those two lines below.
%define assemblyFileVersion %(strings /bla/bla/app.dll | egrep '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$')
Version:        %{assemblyFileVersion}

An error of the type Unknown tag: Foo generally means rpmbuild thinks the file contains this line:
Foo:  Bar
As a test, I did:
%define assemblyFileVersion %(echo -e '1.\\n2.3\n4')
Version: %{assemblyFileVersion}

And the rpmbuild error is:
error: line 6: Unknown tag: 2.3n4

So, I can't help but wonder what assemblyFileVersion actually evaluates to. Can you print it out in hex form? I suspect newlines are somehow sneaking in.

@ahmedowsky it seems that @omajid is waiting on your response here - or did I miss something?

No response, closing. Feel free to reopen when there's more info. Thanks!


Create SSRFOnGraphQL.yaml

Resolve issue #142

@avneesh-akto

@arjun-akto Can you please provide me the details about CVE or CWE related to this ?
It will be really helpful if you can !

You can refer to the following article for the same . Link
CVE for reference: Link
CWE: CWE-918

Hey @arjun-akto, I make the necessary changes !
Kindly take a look.


changed readme of the mockwerserver to point to parent readme

There are two copies of download instructions for mockwebserver. In the MockWebServer folder and in a parent folder.
The one in parent folder has latest version, the one in server's folder asks to use last version for version number, which confuses me (where can I get one?).
Added reference to parent readme, to have single point of truth and up to date version in one place and avoid confusion.

I think I prefer the current structure.


cilium start failed on master node

Bug report

General Information

Cilium version (run cilium version)
no cilium found

Kernel version (run uname -a)

Linux srv0 4.15.0-52-generic #56-Ubuntu SMP Tue Jun 4 22:49:08 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux\

Orchestration system version in use (e.g. kubectl version, Mesos, ...)

Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.0", GitCommit:"e8462b5b5dc2584fdcd18e6bcfe9f1e4d970a529", GitTreeState:"clean", BuildDate:"2019-06-19T16:40:16Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.0", GitCommit:"e8462b5b5dc2584fdcd18e6bcfe9f1e4d970a529", GitTreeState:"clean", BuildDate:"2019-06-19T16:32:14Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}

Link to relevant artifacts (policies, deployments scripts, ...)
Upload a system dump (run curl -sLO releases.cilium.io/tools/cluster-diagnosis.zip && python cluster-diagnosis.zip sysdump and then attach the generated zip file)

How to reproduce the issue
In master, cilium status is CrashLoopBackOff, in other node, status is running:
root@srv0:~# kubectl get pods -A -o wide
NAMESPACE     NAME                                    READY   STATUS             RESTARTS   AGE     IP             NODE   NOMINATED NODE   READINESS GATES
kube-system   cilium-etcd-46gx24g568                  1/1     Running            0          3h45m   <IP_ADDRESS>   srv5   <none>           <none>
kube-system   cilium-etcd-6hlkb79cdv                  1/1     Running            0          3h49m   <IP_ADDRESS>   srv5   <none>           <none>
kube-system   cilium-etcd-operator-8c775864b-nf7cw    1/1     Running            0          4h35m   <IP_ADDRESS>   srv0   <none>           <none>
kube-system   cilium-etcd-p6pd88fx7g                  1/1     Running            0          3h45m   <IP_ADDRESS>   srv4   <none>           <none>
kube-system   cilium-kv2xg                            1/1     Running            4          4h5m    <IP_ADDRESS>   srv4   <none>           <none>
kube-system   cilium-ldvmm                            0/1     CrashLoopBackOff   41         4h35m   <IP_ADDRESS>   srv0   <none>           <none>
kube-system   cilium-operator-6497458fdb-2nbjz        1/1     Running            44         4h35m   <IP_ADDRESS>      srv4   <none>           <none>
kube-system   cilium-tzdw9                            1/1     Running            2          3h56m   <IP_ADDRESS>   srv5   <none>           <none>
kube-system   coredns-bccdc95cf-8pn8n                 1/1     Running            48         19h     <IP_ADDRESS>    srv0   <none>           <none>
kube-system   coredns-bccdc95cf-rmpjd                 1/1     Running            51         19h     <IP_ADDRESS>    srv0   <none>           <none>
kube-system   etcd-operator-86ccfd897-qpcjw           1/1     Running            1          3h49m   <IP_ADDRESS>    srv5   <none>           <none>
kube-system   etcd-srv0                               1/1     Running            0          19h     <IP_ADDRESS>   srv0   <none>           <none>
kube-system   kube-apiserver-srv0                     1/1     Running            0          18h     <IP_ADDRESS>   srv0   <none>           <none>
kube-system   kube-controller-manager-srv0            1/1     Running            0          19h     <IP_ADDRESS>   srv0   <none>           <none>
kube-system   kube-proxy-2wscd                        1/1     Running            0          19h     <IP_ADDRESS>   srv0   <none>           <none>
kube-system   kube-proxy-f6mbw                        1/1     Running            0          4h5m    <IP_ADDRESS>   srv4   <none>           <none>
kube-system   kube-proxy-nkg6r                        1/1     Running            0          3h56m   <IP_ADDRESS>   srv5   <none>           <none>
kube-system   kube-scheduler-srv0                     1/1     Running            0          19h     <IP_ADDRESS>   srv0   <none>           <none>
kube-system   kubernetes-dashboard-7d75c474bb-x2hmd   0/1     ImagePullBackOff   0          178m    <IP_ADDRESS>    srv4   <none>           <none>

kubectl --namespace kube-system logs cilium-ldvmm
.....

level=info msg="Serving cilium health at unix:///var/run/cilium/health.sock" subsys=health-server
level=error msg="Unable to initialize local node. Retrying..." error="Time out while retrieving initial list of objects from kvstore" subsys=nodediscovery
level=fatal msg="Timeout while waiting for initial allocator state" subsys=allocator
level=fatal msg="Agent pipe unexpectedly closed, shutting down" subsys=cilium-node-monitor

@guotie Thanks for the issue, but with this little information it's difficult to know what went wrong. Please include the system dump as stated in the issue.

cilium-sysdump-20190626-082726.zip

Relevant, from cilium-4n8b6 logs:
2019-06-26T08:26:41.503870886Z level=error msg="Unable to initialize local node. Retrying..." error="Time out while retrieving initial list of objects from kvstore" subsys=nodediscovery
2019-06-26T08:26:41.510879671Z level=fatal msg="Timeout while waiting for initial allocator state" subsys=allocator
2019-06-26T08:26:41.520153144Z level=fatal msg="Agent pipe unexpectedly closed, shutting down" subsys=cilium-node-monitor

Seems like an etcd connectivity issue. Cluster is running cilium-etcd-operator.

@mrostecki @joestringer what's the status here? Do we know what the issue is?
@guotie does srv0 has connectivity with srv5 and srv4?

@mrostecki not yet, but I managed to reproduce the issue on one of my clusters and I'm trying to debug it.

What is the status here? Does this still occur with the latest release 1.8.1?

If this were not assigned to @mrostecki , it otherwise would have been closed "stale" several months ago. It's likely that this has been addressed in a subsequent release. If you observe similar behaviour, please file a new bug with reference to this bug, with full details of how you reproduce the issue.


[SDK generation pipeline] Fix for new changelog tool

Make sure pipeline could get changelog output from breaking change detector.
test link: https://github.com/test-repo-billy/azure-rest-api-specs/pull/3493

/check-enforcer override


 Once the Go client has stabilized we will guarantee not to make breaking changes in minor releases, similar to the API.
This is a non-exhaustive list of items before stabilization

[x] Move to go modules (All containerd repositories)
[x] Audit and remove unstable upstream dependencies (moby/moby, docker/distribution, etc)
[ ] Audit inconsistencies across package interfaces
[ ] Ensure interfaces with optional values use the options pattern

Related issues #3553

What do you want us to do with distribution reference and errcode packages?  Just a straight port over?

I think we can port over a simpler version of those packages

related discussion in https://github.com/containerd/containerd/issues/3031

Seems the first two are complete. Do we want to find someone willing to take on the last 2, targeting the 1.7 release?

Looking at Ensure interfaces with optional values use the options pattern (Item 4).  TLDR : I didn't find anything that required changes.

Methodology
To identify a list of types where this might be an issue I used the revive linter to identify functions with more then 5 arguments.
Added to .golangci.yml :
  revive:
    rules:
      - name: argument-limit
        severity: warning
        disabled: false
        arguments: [5]

This identified 43 functions (just for context there are 101 functions with 4+ arguments).  8 of those 43 were already using the option pattern.  Of the remaining 35 (link for more detail). I investigated the remaining 35 by hand, nothing looks egregious.


Fix typo

Changed thing to think

Thanks! Fixed in the source, not the generated files.

Great! Sorry i thought it was the source file. Nice plugin anyway


tweet.field text is truncated - how to get full text?

Hello,
I would like to know if it's possible to get full text when asking for the text?
Here is what I tried after googling a bit.
    const stream = client.tweets.searchStream({
        "tweet.fields": ["id", "text", "entities"],
    }, {
        params: {
            "tweet_mode": "extended",
        }
    });

I'm probably missing something.
Best regards,

tweet_mode is not a parameter in v2 of the API, since the API treats 280 characters as the default possible length for Tweet text.
It sounds like you may be getting Retweets or quoted Tweets? If so, you may need to request the referenced_tweets expansion. If you have the ID of a Tweet where you're seeing the truncated text, you could try using the API Playground to test out the various parameters.

That was a rt, thanks!


Download link is broken

The download link fails with a 404, showing this error:
<Error>
BlobNotFound
<Message>
The specified blob does not exist. RequestId:d444f303-301e-010a-67a9-df67b5000000 Time:2020-02-10T00:31:30.0971282Z
</Message>
</Error>

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

ID: 1300a10b-16f3-9185-af2a-67437bf428d2
Version Independent ID: 07fd7c5a-0ad5-a7b4-21ef-768f183076aa
Content: Azure Cosmos Emulator download and release notes
Content Source: articles/cosmos-db/local-emulator-release-notes.md
Service: cosmos-db
GitHub Login: @milismsft
Microsoft Alias: adrianmi

@umberbeard Thank you for the feedback.
This is being assigned to the content author to evaluate and update the documentation as appropriate.

@umberbeard the link has been fixed and it should be working now; sorry for the inconvenience

Thanks for the response!

#please-close


Add some options for the i18n feature

Currently the i18n feature expect the i18n module to be at the crate root, and also expect the translation key to be the column name. This works in most cases for the i18n module but for the key it totally breaks when using namespaces and constrain the user to a specific path.
This issue propose the introduction of a struct attribute #[i18n(path = path::to::i18n)] to give the path to the i18n module, defaulted to crate::i18n when not set, and a field attribute #[i18n(title_key = path.to.translation)]to give the path to the translation for the t! macro, defaulted to the name of the column.

I just started working in this, but there are still small things that bother me and want your opinion @maccesch.
The feature is all or nothing, there is no way to opt out when enabled, so I would like to also propose a #[i18n(disable)] for fields (or struct?) to get back to the "normal" behavior, not sure about the argument name too, maybe #[i18n(false)] ?

makes sense!
Let's do #[i18n(skip)] to be consistent.

Perfect!

It's been about an hour that I've been looking into darling docs, to the point I had to look at the macros source code and it seams they deal with multiple attrs by just considering them equivalent, so there is no way to differenciate beetween #[i18n(skip)] and #[table(skip)].


Multilingual

How to add multiple language support with this theme ?

I haven't tested it.
See https://regisphilibert.com/tags/multilingual/ if you're looking to learn how to add langages to a Hugo website.


tensorflow.keras MirroredStrategy hangs without error message

Unexpected hangs occurs, running adapted https://keras.io/guides/distributed_training/
System information

Have I written custom code : https://keras.io/guides/distributed_training/
OS Platform and Distribution : Windows 10 pro (build 19041)
CPU Intel: 2x Intel Xeon 6140 18 Cores (36 logical)
System Memory : 384 GB
TensorFlow installed from (source or binary): pip installed
TensorFlow version (use command below): v2.3.0-54-gfcc4b966f1 2.3.1
Python version: 3.8.5
CUDA/cuDNN version: CUDA 10.1 / cuDNN 7
GPU model and memory: 4 x Tesla V100-SXM2-32GB

Describe the current behavior
Training hangs without any message when starting the learning, when large dataset are used as inputs.
Describe the expected behavior
Training is expected to work in the same circumstances even with large dataset
Standalone code to reproduce the issue
Changing the get_dataset() to get a larger dataset from sample dataset following:
num_val_samples = 1000
and then adding the 2 lines:
x_train = x_train[:-num_val_samples]
y_train = y_train[:-num_val_samples]
x_train = np.concatenate([x_train for i in range(50)])
y_train = np.concatenate([y_train for i in range(50)])
return (
tf.data.Dataset.from_tensor_slices((x_train, y_train)).batch(batch_size),
tf.data.Dataset.from_tensor_slices((x_val, y_val)).batch(batch_size),
tf.data.Dataset.from_tensor_slices((x_test, y_test)).batch(batch_size),
)
When the oversize is 46 it runs flawlessly, when setting to 47 or higher it just hangs with no error messages
The stragegy is defined with, to work on our Windows HPC :
cross_tower_ops = tf.distribute. ReductionToOneDevice()
strategy = tf.distribute.MirroredStrategy(devices=['/gpu:0','/gpu:1','/gpu:2','gpu:3'],
cross_device_ops=cross_tower_ops)

We also tried changing the data set with the strategy.experimental_distribute_dataset(val_dataset)

Hi @WiestDaessle, to clarify, the training works okay when you run the tutorial? But it is hanging when you make these modifications? Is that correct?
Can you please provide the exact code you are running into issues with so I can reproduce it on my end. You can provide it in a colab notebook, or just paste it a comment, but the full code (properly indented and with import statements) greatly helps us to troubleshoot. Also please clarify what you mean by 'the oversize'.
Note that if you are using MirroredStrategy and model.fit then you should not need to use strategy.experimental_distribute_dataset. Distributing the dataset this way is only required when using a custom training loop.

Hi @nikitamaia,
The sample is working after changing the strategy to point on our 4 GPUs using:
cross_tower_ops = tf.distribute.HierarchicalCopyAllReduce(num_packs=4)
strategy = tf.distribute.MirroredStrategy(devices=['/gpu:0','/gpu:1','/gpu:2','gpu:3'],
cross_device_ops=cross_tower_ops)

import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '0'  # or any {'0', '1', '2'}
import tensorflow as tf
from tensorflow import keras
import numpy as np
tf.get_logger().setLevel('DEBUG')
def get_compiled_model():
# Make a simple 2-layer densely-connected neural network.
inputs = keras.Input(shape=(784,))
x = keras.layers.Dense(256, activation="relu")(inputs)
x = keras.layers.Dense(256, activation="relu")(x)
outputs = keras.layers.Dense(10)(x)
model = keras.Model(inputs, outputs)
model.compile(
optimizer=keras.optimizers.Adam(),
loss=keras.losses.SparseCategoricalCrossentropy(from_logits=True),
metrics=[keras.metrics.SparseCategoricalAccuracy()],
)
return model
def get_dataset():
batch_size = 10240
num_val_samples = 10000
# Return the MNIST dataset in the form of a `tf.data.Dataset`.
(x_train, y_train), (x_test, y_test) = keras.datasets.mnist.load_data()
x_train = np.concatenate([x_train for i in range(50)])
y_train = np.concatenate([y_train for i in range(50)])

# Preprocess the data (these are Numpy arrays)
x_train = x_train.reshape(-1, 784).astype("float32") / 255
x_test = x_test.reshape(-1, 784).astype("float32") / 255
y_train = y_train.astype("float32")
y_test = y_test.astype("float32")

# Reserve num_val_samples samples for validation
x_val = x_train[-num_val_samples:]
y_val = y_train[-num_val_samples:]
x_train = x_train[:-num_val_samples]
y_train = y_train[:-num_val_samples]

print(len(x_train), len(y_train),len(x_val),len(y_val))
return (
    tf.data.Dataset.from_tensor_slices((x_train, y_train)).batch(batch_size),
    tf.data.Dataset.from_tensor_slices((x_val, y_val)).batch(batch_size),
    tf.data.Dataset.from_tensor_slices((x_test, y_test)).batch(batch_size),
)

Create a MirroredStrategy.
#strategy = tf.distribute.MirroredStrategy()
cross_tower_ops = tf.distribute.ReductionToOneDevice()
cross_tower_ops = tf.distribute.HierarchicalCopyAllReduce(num_packs=4)
Reduce to CPU
#cross_tower_ops = tf.distribute. ReductionToOneDevice(reduce_to_device="/device:CPU:0")
strategy = tf.distribute.MirroredStrategy(devices=['/gpu:0','/gpu:1','/gpu:2','gpu:3'],
cross_device_ops=cross_tower_ops)
print("Number of devices: {}".format(strategy.num_replicas_in_sync))
Open a strategy scope.
with strategy.scope():
# Everything that creates variables should be under the strategy scope.
# In general this is only model construction & compile().
model = get_compiled_model()
# model.summary()
Train the model on all available devices.
train_dataset, val_dataset, test_dataset = get_dataset()
# train_dataset, val_dataset, test_dataset = (strategy.experimental_distribute_dataset(train_dataset),
#         strategy.experimental_distribute_dataset(val_dataset),
#         strategy.experimental_distribute_dataset(test_dataset))
# model.summary()
model.fit(train_dataset, epochs=200, validation_data=val_dataset)
Test the model on all available devices.
model.evaluate(test_dataset)

@WiestDaessle please provide the code with the proper indentation and formatting to help with the debugging process.  Can you just try and execute your get_datatset() function without a strategy and see if it still hangs? I seem to be hitting a memory issue with tf.data.Dataset.from_tensor_slices((x_train, y_train)).batch(batch_size)