KHR materials

This PR will implement some official extensions about materials:

Import

KHR_materials_ior
KHR_materials_sheen
KHR_materials_specular
KHR_materials_transmission
KHR_materials_variants
KHR_materials_emissive_strength
KHR_materials_volume

Export

KHR_materials_ior
KHR_materials_sheen
KHR_materials_specular
KHR_materials_variants
KHR_materials_emissive_strength
KHR_materials_volume

See following comments for status update

Import

KHR_materials_ior

[ ] Basic Code
[ ] Code completed
[ ] Code cleanup
[ ] Test cases added
[ ] Documentation Updated

KHR_materials_sheen

[ ] Basic Code
[ ] Code completed
[ ] Code cleanup
[ ] Validation of approximation done
[ ] Test cases added
[ ] Documentation Updated

KHR_materials_specular

[ ] Basic Code
[ ] Code completed
[ ] Code cleanup
[ ] Validation of approximation done
[ ] Test cases added
[ ] Documentation Updated

KHR_materials_transmission

[ ] Basic Code
[ ] Code completed
[ ] Code cleanup
[ ] Test cases added
[ ] Documentation Updated

KHR_materials_variants

[ ] Basic Code
[ ] Code completed
[ ] Code cleanup
[ ] Test cases added
[ ] Documentation Updated

KHR_materials_emissive_strength

[ ] Basic Code
[ ] Code completed
[ ] Code cleanup
[ ] Test cases added
[ ] Documentation Updated

KHR_materials_volume

[ ] Basic Code
[ ] Code completed
[ ] Code cleanup
[ ] Test cases added
[ ] Documentation Updated

Export

KHR_materials_ior

[ ] Basic Code
[ ] Code completed
[ ] Code cleanup
[ ] Test cases added
[ ] Documentation Updated

KHR_materials_sheen

[ ] Basic Code
[ ] Code completed
[ ] Code cleanup
[ ] Validation of approximation done
[ ] Test cases added
[ ] Documentation Updated

KHR_materials_specular

[ ] Basic Code
[ ] Code completed
[ ] Code cleanup
[ ] Validation of approximation done
[ ] Test cases added
[ ] Documentation Updated

KHR_materials_variants

[ ] Basic Code
[ ] Code completed
[ ] Code cleanup
[ ] Test cases added
[ ] Documentation Updated

KHR_materials_emissive_strength

[ ] Basic Code
[ ] Code completed
[ ] Code cleanup
[ ] Test cases added
[ ] Documentation Updated

KHR_materials_volume

[ ] Basic Code
[ ] Code completed
[ ] Code cleanup
[ ] Test cases added
[ ] Documentation Updated

[ ] Technical Documentation import
[ ] Technical Documentation export

Principled Specular=0 doesn't roundtrip correctly.

Cleanup for emissive_factor import (not tested)

Patch
diff --git a/addons/io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_pbrSpecularGlossiness.py b/addons/io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_pbrSpecularGlossiness.py
index 0bcecdff..1ad6df22 100644
--- a/addons/io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_pbrSpecularGlossiness.py
+++ b/addons/io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_pbrSpecularGlossiness.py
@@ -43,11 +43,13 @@ def pbr_specular_glossiness(mh):
         make_volume_socket=None # No possible to have KHR_materials_volume with specular/glossiness
     )

-    emission(
-        mh,
-        location=(-200, 860),
-        color_socket=emission_socket,
-    )
+    if emission_socket:
+        emission(
+            mh,
+            location=(-200, 860),
+            color_socket=emission_socket,
+            strength_socket=emission_socket.node.inputs['Strength'],
+        )

     base_color(
         mh,
diff --git a/addons/io_scene_gltf2/blender/imp/gltf2_blender_pbrMetallicRoughness.py b/addons/io_scene_gltf2/blender/imp/gltf2_blender_pbrMetallicRoughness.py
index a96b4e66..f6b9a61a 100644
--- a/addons/io_scene_gltf2/blender/imp/gltf2_blender_pbrMetallicRoughness.py
+++ b/addons/io_scene_gltf2/blender/imp/gltf2_blender_pbrMetallicRoughness.py
@@ -68,7 +68,7 @@ def pbr_metallic_roughness(mh: MaterialHelper):
             mh.settings_node = make_settings_node(mh)
             mh.settings_node.location = additional_location
             mh.settings_node.width = 180
-            additional_location = additional_location[0], additional_location[1] - 150
+            additional_location = additional_location[0], additional_location[1] - 150

     _, _, volume_socket = make_output_nodes(
         mh,
@@ -157,7 +157,7 @@ def pbr_metallic_roughness(mh: MaterialHelper):
     )

     specular(
-        mh,
+        mh,
         location_specular=locs['specularTexture'],
         location_specular_tint=locs['specularColorTexture'],
         specular_socket=pbr_node.inputs['Specular'],
@@ -252,31 +252,28 @@ def calc_locations(mh):

 # [Texture] => [Emissive Factor] =>
-def emission(mh: MaterialHelper, location, color_socket, strength_socket=None):
+def emission(mh: MaterialHelper, location, color_socket, strength_socket):
     x, y = location
     emissive_factor = mh.pymat.emissive_factor or [0, 0, 0]

+    strength = 1
+    try:
+        strength = mh.pymat.extensions['KHR_materials_emissive_strength']['emissiveStrength']
+    except Exception:
+        pass
+
     if color_socket is None:
         return

     if mh.pymat.emissive_texture is None:
         color_socket.default_value = emissive_factor + [1]
-
-        # KHR_materials_emissive_strength if needed
-        if mh.pymat.extensions and mh.pymat.extensions.get('KHR_materials_emissive_strength'):
-            emission_strength = mh.pymat.extensions['KHR_materials_emissive_strength']['emissiveStrength']
-            strength_socket.default_value = emission_strength
+        strength_socket.default_value = strength
         return

     # Put grayscale emissive factors into the Emission Strength
     e0, e1, e2 = emissive_factor
-    if strength_socket and e0 == e1 == e2:
-        # Set emission strength if extension KHR_materials_emissive_strength
-        if mh.pymat.extensions and mh.pymat.extensions['KHR_materials_emissive_strength']:
-            emission_strength = mh.pymat.extensions['KHR_materials_emissive_strength']['emissiveStrength']
-            strength_socket.default_value = e0 * emission_strength
-        else:
-            strength_socket.default_value = e0
+    if e0 == e1 == e2:
+        strength_socket.default_value = e0 * strength

     # Otherwise, use a multiply node for it
     else:
@@ -294,10 +291,7 @@ def emission(mh: MaterialHelper, location, color_socket, strength_socket=None):

             x -= 200

-        # Set emission strength if extension KHR_materials_emissive_strength
-        if strength_socket and mh.pymat.extensions and mh.pymat.extensions['KHR_materials_emissive_strength']:
-            emission_strength = mh.pymat.extensions['KHR_materials_emissive_strength']['emissiveStrength']
-            strength_socket.default_value = emission_strength
+        strength_socket.default_value = strength

     texture(
         mh,

Seems KHR_materials_emissive_strength is now ready for review

Seems KHR_materials_transmission is now ready for review

Is there a reason emissive strength is marked as required?

Is there a reason emissive strength is marked as required?

Somehow I still don't have everyone in the 3D Formats WG on board with my views on this one, but I strongly believe that extensionsRequired is only for loading / parsing, not for controlling visual appearance.  As such, none of the PBR extensions should ever be placed in the extensionsRequired field, only extensionsUsed.
The reasoning is easier to grok if you imagine glTF loaders that don't do PBR at all, or only a subset.  Some CAD systems will import geometry from glTF with only solid-color materials, for example.  The point of extensionsRequired is only to warn the parser if it's about to ingest something that it potentially can't handle, like meshopt or Draco or something.  But if the parser doesn't know what "clearcoat" or "emissive strength" is, it can safely ignore it and still retrieve any and all relevant data from the core glTF with no problem.  Therefore, these extensions are not "required."

As such, none of the PBR extensions should ever be placed in the extensionsRequired field, only extensionsUsed.

Ok, thanks for this feedback

Seems something is wrong with github CI.
I don't have issue when running these tests locally

File "/opt/blender/3.3/scripts/addons/io_scene_gltf2/blender/exp/gltf2_blender_image.py", line 213, in __encode_from_numpy_array
return _encode_temp_image(tmp_image, self.file_format)
File "/opt/blender/3.3/scripts/addons/io_scene_gltf2/blender/exp/gltf2_blender_image.py", line 249, in _encode_temp_image
tmp_image.save()
RuntimeError: Error: Could not write image: No such file or directory
Error: Image '##gltf-export:tmp-image##' could not be saved to '/tmp/tmp92yop4ka/img'

Looks like it died trying to write a temp image.  Has anything changed recently with temp image names, or temp folder permissions etc?

No change on addon side.
I ran again tests on master. It was OK, it's now KO, without any new commit.
Seems the change is from github.
Maybe it's currently down, or maybe there are some config changes

Seems like it could be a fluke.  I'd recommend continuing development on this branch regardless of the test issues for now.

We now have confirmation that the issue comes from blender,  on recent builds
See https://developer.blender.org/T98305

CI tests issue solved!

Thanks @scurest, looks like your reproduce script on the upstream ticket was exactly what the Blender folks needed.

Some tests on Material Variants: https://youtu.be/7dS2waG_ccM

Seems there is a bug in Blender, not saving addon preferences when they are set by code.
See https://developer.blender.org/T98503
This impact us, because we currently auto enable Variant UI when importing a gltf file with variant. Not a blocking bug, but when we reopen the file, the UI is not more displayed.

About planning.
We will have to choose between Blender 3.3 : https://developer.blender.org/project/manage/142/

LTS version
Merge before July 27th (But I will be out of office starting July 13th)
Release on September 7th

And Blender 3.4 https://developer.blender.org/project/view/144/

Merge before October 26th
Release on December 7th

@julienduroure Do you think it's realistic to target 3.3 and July 12th?  It would need to be nice to have by then, if it's in good enough shape at that point.

Seems KHR_materials_variants is now ready for review. Documentation is not done, but you can see in youtube link above how to manage variants).

Hi, I've found an issue with this patch.
Importing TransmissionRoughnessTest.gltf from glTF-Sample-Models/2.0/TransmissionRoughnessTest/glTF/ and then trying to export the blend file back to gltf (or glb) results in a crash with the stack trace below. The cause seems to be the Volume Absorption nodes added for materials with transmission, upon removing them everything seems to work fine.
Tested on the latest blender 3.3 alpha.
Python: Traceback (most recent call last):
  File "E:\Program Files\Blender Foundation\blender-3.3.0-alpha+master.9531eb24b317-windows.amd64-release\3.3\scripts\addons\io_scene_gltf2\__init__.py", line 639, in execute
    return gltf2_blender_export.save(context, export_settings)
  File "E:\Program Files\Blender Foundation\blender-3.3.0-alpha+master.9531eb24b317-windows.amd64-release\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_export.py", line 46, in save
    json, buffer = __export(export_settings)
  File "E:\Program Files\Blender Foundation\blender-3.3.0-alpha+master.9531eb24b317-windows.amd64-release\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_export.py", line 63, in __export
    __gather_gltf(exporter, export_settings)
  File "E:\Program Files\Blender Foundation\blender-3.3.0-alpha+master.9531eb24b317-windows.amd64-release\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_export.py", line 77, in __gather_gltf
    active_scene_idx, scenes, animations = gltf2_blender_gather.gather_gltf2(export_settings)
  File "E:\Program Files\Blender Foundation\blender-3.3.0-alpha+master.9531eb24b317-windows.amd64-release\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather.py", line 41, in gather_gltf2
    scenes.append(__gather_scene(blender_scene, export_settings))
  File "E:\Program Files\Blender Foundation\blender-3.3.0-alpha+master.9531eb24b317-windows.amd64-release\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_cache.py", line 49, in wrapper_cached
    result = func(*args, **kwargs)
  File "E:\Program Files\Blender Foundation\blender-3.3.0-alpha+master.9531eb24b317-windows.amd64-release\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather.py", line 80, in __gather_scene
    node = gltf2_blender_gather_nodes.gather_node(
  File "E:\Program Files\Blender Foundation\blender-3.3.0-alpha+master.9531eb24b317-windows.amd64-release\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_nodes.py", line 42, in gather_node
    children=__gather_children(vnode, blender_object, export_settings),
  File "E:\Program Files\Blender Foundation\blender-3.3.0-alpha+master.9531eb24b317-windows.amd64-release\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_nodes.py", line 84, in __gather_children
    node = gather_node(c, export_settings)
  File "E:\Program Files\Blender Foundation\blender-3.3.0-alpha+master.9531eb24b317-windows.amd64-release\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_nodes.py", line 46, in gather_node
    mesh=__gather_mesh(vnode, blender_object, export_settings),
  File "E:\Program Files\Blender Foundation\blender-3.3.0-alpha+master.9531eb24b317-windows.amd64-release\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_nodes.py", line 257, in __gather_mesh
    result = gltf2_blender_gather_mesh.gather_mesh(blender_mesh,
  File "E:\Program Files\Blender Foundation\blender-3.3.0-alpha+master.9531eb24b317-windows.amd64-release\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_cache.py", line 49, in wrapper_cached
    result = func(*args, **kwargs)
  File "E:\Program Files\Blender Foundation\blender-3.3.0-alpha+master.9531eb24b317-windows.amd64-release\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_mesh.py", line 72, in gather_mesh
    primitives=__gather_primitives(blender_mesh, uuid_for_skined_data, vertex_groups, modifiers, materials, export_settings),
  File "E:\Program Files\Blender Foundation\blender-3.3.0-alpha+master.9531eb24b317-windows.amd64-release\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_mesh.py", line 158, in __gather_primitives
    return gltf2_blender_gather_primitives.gather_primitives(blender_mesh,
  File "E:\Program Files\Blender Foundation\blender-3.3.0-alpha+master.9531eb24b317-windows.amd64-release\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_cache.py", line 49, in wrapper_cached
    result = func(*args, **kwargs)
  File "E:\Program Files\Blender Foundation\blender-3.3.0-alpha+master.9531eb24b317-windows.amd64-release\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_primitives.py", line 94, in gather_primitives
    material = gltf2_blender_gather_materials.gather_material(
  File "E:\Program Files\Blender Foundation\blender-3.3.0-alpha+master.9531eb24b317-windows.amd64-release\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_cache.py", line 49, in wrapper_cached
    result = func(*args, **kwargs)
  File "E:\Program Files\Blender Foundation\blender-3.3.0-alpha+master.9531eb24b317-windows.amd64-release\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_materials.py", line 69, in gather_material
    extensions, uvmap_actives_extensions = __gather_extensions(blender_material, emissive_factor, export_settings)
  File "E:\Program Files\Blender Foundation\blender-3.3.0-alpha+master.9531eb24b317-windows.amd64-release\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_materials.py", line 254, in __gather_extensions
    volume_extension, use_actives_uvmap_volume_thickness  = export_volume(blender_material, export_settings)
  File "E:\Program Files\Blender Foundation\blender-3.3.0-alpha+master.9531eb24b317-windows.amd64-release\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_materials_volume.py", line 54, in export_volume
    volume_extension['attenuationDistance'] = 1.0 / density if density != 0 else maxsize
NameError: name 'maxsize' is not defined

@nbvdkamp

Hi, I've found an issue with this patch.

Fixed, thanks!

Great, thanks for working on this!

Why is maxsize used at all? Export shouldn't depend on the platform's pointer size. If it's just supposed to be a "really big number", suggest using some sufficient fixed constant (like infinite projection does) instead.

Actually looking at the spec, the default attenuationDistance when not specified is +Infinity, so can you just put None there?

Import CesiumMan, set materials' Specular to 0, export, reimport => error.

I don't think base_color() or texture() in the importer should change, if specular() needs eg. the base color texture, it can get it from the pymaterial on its own without having to change stuff to pass the name around.

Seems KHR_materials_specular can be tested.
Be careful, there is no 100% conversion possible for specular, so there is no perfect roundtrip possible

About sheen: Seems there is no way to get conversion from and to glTF, as described here : https://github.com/KhronosGroup/glTF-Blender-IO/pull/1344#issuecomment-1154117477
So, we now have to have a discussion about what can be done for this extension?

@emackey You should probably have a talk about sheen, and how to manage it.
Seems (https://github.com/KhronosGroup/glTF-Blender-IO/pull/1344#issuecomment-1154117477) there is no simple way to convert. How to manage it?
Some ways:

Using a (possibly bad) approximation, see investigation in #1344  ?
Do not use Blender sheen data, but use custom socket to import/export glTF sheen data, as Occlusion ?
Other ?

I implemented way to manage original data when there is no 100% compatibility between glTF and Blender (so for specular and sheen).
At import:

Data are converted to use as best as possible principled Shader socket (already implemented for specular, pending for sheen)
Original data are also plugged to a new custom node

At export

New option to choose to export from Blender data or from original ones.
By default, Blender principled shader data are used
You can activate an option at export (geomtry > material > PBR non converted extension), to use original data instead of Blender ones.

This way, people that want to roundtrip are able to do, including specular and sheen. Same thing for people that want to create knowing what they are doing regarding these 2 extensions.

On Windows 10 x64, I downloaded blender-3.2.1-candidate+v32.b6c5763b8eae-windows.amd64-release.zip and paired it with this branch.  Then I tried to import "AttenuationTest.glb" (and various other GLBs that separate color channels, including WaterBottle.glb).
I get the following stack trace:
Data are loaded, start creating Blender stuff
Traceback (most recent call last):
  File "C:\Users\emackey\Documents\Git\glTF-Blender-IO\addons\io_scene_gltf2\__init__.py", line 1182, in execute
    return self.import_gltf2(context)
  File "C:\Users\emackey\Documents\Git\glTF-Blender-IO\addons\io_scene_gltf2\__init__.py", line 1210, in import_gltf2
    if self.unit_import(path, import_settings) == {'FINISHED'}:
  File "C:\Users\emackey\Documents\Git\glTF-Blender-IO\addons\io_scene_gltf2\__init__.py", line 1230, in unit_import
    BlenderGlTF.create(gltf_importer)
  File "C:\Users\emackey\Documents\Git\glTF-Blender-IO\addons\io_scene_gltf2\blender\imp\gltf2_blender_gltf.py", line 44, in create
    BlenderGlTF._create(gltf)
  File "C:\Users\emackey\Documents\Git\glTF-Blender-IO\addons\io_scene_gltf2\blender\imp\gltf2_blender_gltf.py", line 51, in _create
    BlenderScene.create(gltf)
  File "C:\Users\emackey\Documents\Git\glTF-Blender-IO\addons\io_scene_gltf2\blender\imp\gltf2_blender_scene.py", line 47, in create
    BlenderNode.create_vnode(gltf, 'root')
  File "C:\Users\emackey\Documents\Git\glTF-Blender-IO\addons\io_scene_gltf2\blender\imp\gltf2_blender_node.py", line 55, in create_vnode
    BlenderNode.create_vnode(gltf, child)
  File "C:\Users\emackey\Documents\Git\glTF-Blender-IO\addons\io_scene_gltf2\blender\imp\gltf2_blender_node.py", line 41, in create_vnode
    obj = BlenderNode.create_object(gltf, vnode_id)
  File "C:\Users\emackey\Documents\Git\glTF-Blender-IO\addons\io_scene_gltf2\blender\imp\gltf2_blender_node.py", line 62, in create_object
    obj = BlenderNode.create_mesh_object(gltf, vnode)
  File "C:\Users\emackey\Documents\Git\glTF-Blender-IO\addons\io_scene_gltf2\blender\imp\gltf2_blender_node.py", line 234, in create_mesh_object
    mesh = BlenderMesh.create(gltf, pynode.mesh, pynode.skin)
  File "C:\Users\emackey\Documents\Git\glTF-Blender-IO\addons\io_scene_gltf2\blender\imp\gltf2_blender_mesh.py", line 36, in create
    return create_mesh(gltf, mesh_idx, skin_idx)
  File "C:\Users\emackey\Documents\Git\glTF-Blender-IO\addons\io_scene_gltf2\blender\imp\gltf2_blender_mesh.py", line 57, in create_mesh
    do_primitives(gltf, mesh_idx, skin_idx, mesh, tmp_ob)
  File "C:\Users\emackey\Documents\Git\glTF-Blender-IO\addons\io_scene_gltf2\blender\imp\gltf2_blender_mesh.py", line 376, in do_primitives
    BlenderMaterial.create(gltf, prim.material, vertex_color)
  File "C:\Users\emackey\Documents\Git\glTF-Blender-IO\addons\io_scene_gltf2\blender\imp\gltf2_blender_material.py", line 60, in create
    pbr_metallic_roughness(mh)
  File "C:\Users\emackey\Documents\Git\glTF-Blender-IO\addons\io_scene_gltf2\blender\imp\gltf2_blender_pbrMetallicRoughness.py", line 171, in pbr_metallic_roughness
    volume(
  File "C:\Users\emackey\Documents\Git\glTF-Blender-IO\addons\io_scene_gltf2\blender\imp\gltf2_blender_KHR_materials_volume.py", line 77, in volume
    node = mh.node_tree.nodes.new('ShaderNodeSeparateColor')
RuntimeError: Error: Node type ShaderNodeSeparateColor undefined

@emackey You have to test with 3.3 alpha, ShaderNodeSeparateColor is not yet existing in 3.2.1

For Sheen, it was discussed by Khronos PBR team, and was decided to use a Velvet Node to display sheen, even if this is not fully 100% energy conservative, as we are using a AddShader node.

Seems this PR is now feature complete.
Please free to test and review. My plan is to get it into master (and blender repo) next Friday, July 8th
Note: There are still some unit tests and documentation to be updated

Hi, nice work. That's great that the add-on supports glTF materials extensions.
I have a question. When we discussed the materials variants extension support last time in https://github.com/KhronosGroup/glTF-Blender-IO/issues/231, we thought that Blender doesn't really have a matching concept of material variants and the materials variants add-on needs an additional UI but we were not sure if additional glTF extension specific data
and UI can the glTF blender add-on concept. Then we decided to make a separate materials variants add-on https://github.com/takahirox/glTF-Blender-IO-materials-variants
So, question. Does the glTF blender add-on allow such additional UI now?

Hello,
About glTF importer/exporter:
There is no specific UI that is displayed by default in Blender. The rule is : No change in UI for people that are not using glTF importer/exporter.
The solution is to add some addon preferences, that enables new UI. There is currently, in master, only 1 preference, to add new glTF shader nodes. This PR adds a second preference, that adds Variant UI + specific data types.
About "User extension addons" : Because users decided to install a new Blender addon (that is a glTF User extension addon), these user extensions are free to add UI in Blender, using directly Blender API.

For information :
https://developer.blender.org/T99447
We have a chance to discuss with Blender devs to have better compatibility

More details documentation will come in next days/weeks

Thanks for the details so far, @julienduroure. Where will more documentation be available? Here, in this PR? Or is there another location where I might look to learn how to assign materials to variants and see them working?

Documentation is here:
https://docs.blender.org/manual/en/3.3/addons/import_export/scene_gltf2.html

Hi,
Is there a thread somewhere in which we are investigating the lossless conversion at import of the KHR_materials_specular of gltf to Blender's shaders?
I see that currently it is only imported as extra data and is not being used in the shaders.
My company needs this, I will implement it as an addon but will try my best to make it into the gltf importer. If there are some informations out there as to how to import it correctly that would be very helpfull !
Thanks !

Hello,
Importer already convert specular data and plug it into Principled Shader (with losses) (and also plug it into glTF Material node to be able to re-export without losses). You can see it, for example, importing this file https://github.com/KhronosGroup/glTF-Sample-Models/blob/master/2.0/SpecularTest/glTF-Binary/SpecularTest.glb
For more technical background, see the following discussions:

https://github.com/KhronosGroup/glTF-Blender-IO/pull/1158
https://github.com/KhronosGroup/glTF/pull/1719#issuecomment-608289714
https://colab.research.google.com/gist/proog128/d627c692a6bbe584d66789a5a6437a33

Some longer-term context on Principled BSDF v2 here:

https://developer.blender.org/T99447

Thanks both of you, I will investigate these links.
As for the SpecularTest.gdb yes I tested it and saw the loss of the specular color in the render. This is the missing property my company needs to be rendered.
I will keep you in the loop regarding my development !


Build a Continuous Deployment Pipeline

(1) Secrets need to be defined
(2) Build a workflow to run the following jobs:

Deploy a shared network
Deploy an application stack

One step to deploy the database stack
One step to deploy the app (REST API) stack

Deploy cognito stack

This is almost complete. But right now there are some issues with the AWS Lambda when processing the deployment requests: it always either sees another request to be processed or a pending job in the deployer repo to be completed, so the actual requests is either discarded or skipped to complete the (supposedly) next one


Adds unit tests for ParserTextRaw

Code coverage for ParserTextRaw prior to this PR is already quite reasonable:

statements:  90.48%
branches:  84.75%
functions:  100%
lines:  91.25%

The changes in this PR do not attempt to provide complete coverage, but rather add unit tests in hopes of catching changes in behavior if/as the implementation evolves over time.
Resolves #330
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Looks like a good start, I think theres alot of value in testing the machinery within the parser itself. checking the this._start, this._end, this._esc_len as well as the machinery around ops.

The machinery you mention is all private, and thereby not visible (or testable) outside of ParserTextRaw--am I missing something here?

I think the biggest source of bugs in the future will be our devs refactoring the lexing/parsing explicitly as we actually lex everything twice instead of tokenizing our inputs.

If we rewrite/refactor the internals, we want to know if the contract of this class changes--that's what these new tests are designed to catch, albeit incompletely (as Ion has so many edge cases).

Looks like a good start, I think theres alot of value in testing the machinery within the parser itself. checking the this._start, this._end, this._esc_len as well as the machinery around ops.

The machinery you mention is all private, and thereby not visible (or testable) outside of ParserTextRaw--am I missing something here?

I think the biggest source of bugs in the future will be our devs refactoring the lexing/parsing explicitly as we actually lex everything twice instead of tokenizing our inputs.

If we rewrite/refactor the internals, we want to know if the contract of this class changes--that's what these new tests are designed to catch, albeit incompletely (as Ion has so many edge cases).

Well you're saying that this pr solves the issue listed which is specific to unit tests. if we arent going to unit test it we shouldn't close the issue.

Well you're saying that this pr solves the issue listed which is specific to unit tests. if we arent going to unit test it we shouldn't close the issue.

Perhaps I've missed the intent of #330.  This PR adds unit tests of ParserTextRaw's API, but not its internals.  If the intent of #330 includes unit testing the internals, I wonder what doing so would look like due to the nature of the internal methods themselves (many of which appear to be highly interdependent and thereby difficult to isolate), and the private accessibility now enforced by TypeScript.
I've updated the description of this PR so #330 shouldn't auto-close with it.  Perhaps you could clarify the expectations of that issue and suggest how it might be accomplished.


Check pod version instead of using respondsToSelector:

Once if Google Analytics removes the deprecate method from it's header,
current implementation will be not compilable.

This PR is included in #184. (as part of it)


Rename new math comparison functions

leftIsLessThanRight -> lessThan
leftIsLessThanOrEqualToRight -> lessThanOrEquals
leftIsGreaterThanRight -> greaterThan
leftIsGreaterThanOrEqualToRight -> greaterThanOrEquals

This is consistent with our comparison functions in Check.js
This is consistent with how all of of our other math type functions work.  For example, we do Cartesian3.cross(left, right, result), not Cartesian3.leftCrossRight(left, right, result).

Thanks for the pull request @hpinkos!

:heavy_check_mark: Signed CLA found.
:grey_question: CHANGES.md was not updated.

If this change updates the public API in any way, please add a bullet point to CHANGES.md.

Reviewers, don't forget to make sure that:

[ ] Cesium Viewer works.
[ ] Works in 2D/CV.
[ ] Works (or fails gracefully) in IE11.

@mramato please review?

Thanks


"coarse and fine network"?

Hi,
I have take a look at your code and the original instant-ngp code, it seems there is a difference about coarse and fine network.
I'm not sure if my understanding is correct, so I want to ask and make sure.
The corse and fine network structures in the original nerf do not seem to be used in the instant-ngp. The instant-ngp uses "Occupancy Grids" (Appendix E.2) to sample points to avoid sampling points at empty positions.
Your code here is handled differently from instant-ngp, is this understanding correct?
Cheers,
Light

Hi @Misaliet, yes, that's correct.


[QUESTION]

Hi Daniel,
would you send me a video from Robocon where you were presenting RobotCode extension and test with Gherkin syntax please?
(You sent me the video with RobotCode debuuger, it helped a lot :) )
MM :)

Hi,
thank you.
Maybe answer for my question will be enough :-)
Did you present RobotCode with Gherin syntaxt (the "real" one, not the RF)????
You first replied to me that RobotCode does not know the Gherkin syntax but my collegues told me that you were showing that :-D
So, just need to confirm that RobotCode is not able to work with Gherkin syntax :-)

Yes in the moment there is no support for the real Gherkin Syntax in RobotCode ...
And Yes, at RoboCon I presented a very early proof of concept that was created during the sprints the day before: RobotFramework executes real Gherkin test cases, TestSteps implemented as RobotFramework library or resource keywords, with syntax highlighting, debugging, code analysis, and more. However, it was just a quick hack to demonstrate what's possible.
This resulted in a PR that Pekka and I are currently working on, and it will be included in the next RobotFramework version 6.1.
Once the so-called CustomParser API is ready, I will provide a first version of a parser that teaches RobotFramework the Gherkin/Cucumber syntax. Additionally, I am currently working on making RobotCode more extensible, so there will also be a RobotCode version or a RobotCode plugin/extension that will support the development of real Gherkin with RobotFramework in VSCode.
So stay tuned...

Great, thank you for explenation and I will pass it further :)
Good luck with RoboCode.


isOpenApiStr logger leaks to Gradle

https://www.kaggle.com/datasets/ruchi798/data-science-job-salaries
Try to generate a schema:
schema {
    sourceSet = "test"
    visibility = org.jetbrains.dataframe.gradle.DataSchemaVisibility.IMPLICIT_PUBLIC
    data = file("src/test/resources/ds_salaries.csv")
    name = "org.jetbrains.kotlinx.dataframe.testSets.DsSalaries"
}

It appears as an error, while code generation was in fact successful. Looks bad, i'd revisit why this needs logging and remove if possible
https://github.com/Kotlin/dataframe/blob/808e3d8c93c80c0cee89dd106bf7911ffd828545/dataframe-openapi/src/main/kotlin/org/jetbrains/kotlinx/dataframe/io/isOpenApi.kt#L15
logger.debug(e) { "Attempt to read input as YAML/JSON OpenAPI specification failed." }
false

Unfortunately, the logger.debug(e) line you point to is not the actual place the logging occurs. It's in the swagger-parser library, here. I haven't found a way yet to turn off the sl4j warning logs of io.swagger.v3.parser.

Well... That was a long journey. For some reason, the logger of io.swagger.v3.parser.OpenAPIV3Parser gets the name "i.swagger.v3.parser.OpenAPIV3Parser". So, to disable it, you need that exact name.
The logger of io.swagger.v3.parser.util.DeserializationUtils becomes "i.s.v.p.util.DeserializationUtils" for some reason... That explains why I couldn't disable it.


New plugin extension to add extra CSS to the base XHTML processing

We have an useful extension "dita.xsl.xhtml" which can add XSLT stylesheets to the base XHTML processing.
Ideally we could also have a "dita.xsl.xhtml.css" extension which would add a custom CSS to the XHTML-based outputs. The custom CSS would need to be automatically copied to the output folder + referenced correctly from all HTML output files.
This would allow a plugin which styles all XHTML-based outputs to contribute both XSLT templates and CSSs which match the new constructs it adds.

WRT implementation, this will require adding generating the stylesheet import in the XSLT as well as copying the CSS files to output.

Nice idea. We've (not exactly) done this in the past when creating overrides for a specialization; in that case, the CSS is only referenced when the specialization is used for a specific XHTML output chunk, so we used some hacks to try and only copy it out when needed. I'm assuming for a "dita.xsl.xhtml.css" extension, it would be imported to all XHTML output files / always copied to output folder.

Yes, the CSS could be imported all the time. I got this idea when looking at a learning training plugin Eliot Kimber is developing. The plugin has a CSS which matches certain spans added by the XSLT and styles them a certain way but users right now need to manually specify this CSS contributed by the plugin as a custom CSS in the DITA OT params.

Is it enough that the CSS URI in plugins.xml is either

relative to plugin directory (copied to output)
absolute (CDN URI, not retrieved by OT)

Right.

To be implemented in HTML5, but the CSS design for HTML5 has not been completed yet.


created a database and modified login and register logic

created a database using sql alchemy and modified the code for login and register code

The codes look good. Created database which store the user information. register() function which user can register by using username and password. Login() function where user can login using username and password. The code well structed and organized and the test cases are passed.


Refactor download strategies.

Let's try again. https://github.com/Homebrew/brew/pull/3018
Depends on and is depended on by https://github.com/Homebrew/homebrew-test-bot/pull/114.

This seems to have broken brew pull-bottle for Linuxbrew:
https://github.com/Homebrew/homebrew-science/pull/6088#issuecomment-321058836
Patch format detection failed.
fatal: Resolve operation not in progress, we are not resuming.
Error: Patch failed to apply: aborted.
Error: Failure while executing: /usr/local/bin/brew pull-linux --bottle https://github.com/Homebrew/homebrew-science/pull/6088


Fix off-by-one error when $treat_files_as_scoped is true

Fixes #1847.
I would have added a unit test, but it wasn't clear how to add a new case while setting $treat_files_as_scoped to true.

@jrfnl Thanks for the details on how to do that! I added 89bb9a8f to include the unit test. I also ran the test without 2f527772 in place, and confirmed that the test fails.

Thanks @jrfnl! I pushed a merged commit to replace the other 2 commits.

@JPry FYI: WPCS 2.2.1 has just been released.

Thanks so much @jrfnl!


payloadLength specification

https://github.com/harp-tech/reflex-generator/blob/9f055d286303284695668246d44eb5eb6249a184/schema/device.json#L130
@glopesdev
Should this not allow the user to enter, in addition to an int, a str or str[]? I thought this is what we were using to keep track of labels of the data?

@bruno-f-cruz the string functionality has now been moved into the payloadSpec field. I am uploading the example metadata with a case for this to demonstrate.


Update README with proper createTitle function

Relevant issue: https://github.com/powmedia/backbone-forms/issues/375
I'm not sure if this is the right way to do this, but it does work.

Thanks


feat: improve seo by adding important meta elements 🚀✨

Is your feature request related to a problem? Please describe.

This problem is related to the aspect of search engine optimization

Describe the solution you'd like

The  elements in HTML are used to provide metadata or additional information about an HTML document.
They help with specifying the character encoding, defining the viewport for responsive design, setting the page title, and providing page descriptions.
They assist search engines, browsers, and other web applications in understanding and processing the webpage's content effectively.
I want to add important Meta elements because in HTML they play a crucial role in providing information about the webpage to browsers and search engines and for the above mentioned reasons.

Describe alternatives you've considered

There's no alternative for  elements to improve the SEO

Additional context

I'm a Hacktoberfest23 Contributor

Hey there @c4coderandcreator 👋🏻,
Please make sure to assign this issue to me as soon as possible to make the work done quickly.
Thank you!

Assigned to you !! Create the PR with UI-Improvement branch


Dockerfile fails to create lib folder

Are you requesting a feature or reporting a bug?
reporting a bug
What is the current behavior?
git clone https://github.com/DevExpress/testcafe
cd testcafe
docker build -f ./docker/Dockerfile . -t mytag
docker run -v /mytests:/tests mytag firefox /tests/*.test.js
Error: Cannot find module '../lib/cli'
    at Function.Module._resolveFilename (module.js:538:15)
    at Function.Module._load (module.js:468:25)
    at Module.require (module.js:587:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/opt/testcafe/bin/testcafe.js:5:1)

docker run --rm -it --entrypoint /bin/sh mytag
ls
bin                docker             node_modules       package-lock.json  package.json

What is the expected behavior?
tests run without error
docker run --rm -it --entrypoint /bin/sh testcafe/testcafe
ls
bin                docker             node_modules      lib       package-lock.json  package.json

How would you reproduce the current behavior (if this is a bug)?
build the container directly from fresh clone of this repository
Provide the test code and the tested page URL (if applicable)
Tested page URL:
Test code

Specify your

operating system:

OSX 10.13.3

testcafe version:

master  285d5f3

node.js version:

as specified in the dockerfile

Hi @lucidtech, you should use the docker-build Gulp task for building the container.
npm i -g gulp
gulp docker-build

@AndreyBelym
thanks for the response. sorry I missed the gulpfile.


Players who try to enter either the nether or the end when they aren't enabled are invulnerable and cannot enter if they are enabled later

All is fixed if they rejoin
Spigot 1.9.4, commit https://github.com/Eluinhost/UHC/commit/7847ecea867ca015d2a59dfa04126bc92ef5132c

Hey, can you give us a list of plugins and your config and a list of instructions to trigger it? I'll take a look at it later when I get home

Only using the uhc plugin, default config.

Start the server
/uhc disable nether
Make a portal, try to enter
Done! You are now invulneable

Can confirm, on clean install of latest 1.9.4 spigot with latest commit.
I'm thinking this is a spigot bug as being in creative the message 'Nether is disabled' is sent but when not it doesn't send the message and you end up invincible. There isn't anything wrong with the related disable code it's very simple.

I've opened the bug with Spigot https://hub.spigotmc.org/jira/browse/SPIGOT-2311

Hi, this should be fixed as of Craftbukkit commit 042911fef46a2efd1fcc4266a01ede48e6e2948c, Spigot build rev 840


Two cursor misalignment problems

I begin selecting words with a ctrl-n on the first "hello", and then hit ctrl-n a few more times to select the rest.  Note how the cursor on the first "hello" is one column too far to the right and misaligned from the others:

You can correct this problem if you remember to correct the first element before selecting the rest.  That is, ctrl-n, then j to correct it, then the remaining ctrl-n:

Now that everything is even i can type v for normal mode, move to the beginning of the word, and insert the word "jonah" by doing ijonah :

Of course I have g:multi_cursor_exit_from_insert_mode=0 so that I can escape and keep using all my cursors.  But uh-oh, as soon as I hit escape, the bottom cursor gets misaligned from the others, going one space to the left:

The bottom-cursor misalignment was fixed in #109 - the top-cursors misalignment I have not been able to reproduce, so I am assuming it was fixed at some point in the past as well.

Loving the activity on this repo! Lazarus repo.

I'm a lot more motivated to add patches when I know they'll be widely used :)
Thanks for reviving the original repository, and thanks @terryma for letting us play in your plugin :)


NA in Table 32

"Remove age-1 index" catchability for age-1 index should be a dash --

Oh! It was a dash in mine but I didn't do a final fresh build or a proper compare. Good spot.


[BUG] Volume failed to create healthy replica after data locality and replica count changed and got stuck in degraded state forever

Describe the bug
In case 4 of test case test_data_locality_basic:

There are 3 nodes: node 0, node 1, node 2
Disable scheduling of node 2
Create a volume with replica count  = 1, data locality = best-effort
Attach the volume to node 2, and wait for the volume healthy
Update replica count to 3, and wait for the volume degraded
Update replica count to 2, and wait for the volume healthy
Update replica count to 1, and wait for the volume healthy
Update replica count to 2 and data locality = disabled`, although the volume is unable to create a replica on the same node of the volume attached, the volume should still be able to create 2 replicas and become healthy state, but it's possible that the volume failed to create healthy replica after data locality and replica count changed and got stuck in degraded state forever:

To Reproduce
Run test case test_data_locality_basic repeatedly.
The reproducibility could be less than 1/100.
Expected behavior

Support bundle for troubleshooting
supportbundle_8bf4c37f-96ac-4fcd-b75a-c62ac6b6e9ff_2024-05-08T10-58-10Z.zip
Environment

Longhorn version: master-head
Impacted volume (PV):
Installation method (e.g. Rancher Catalog App/Helm/Kubectl): helm
Kubernetes distro (e.g. RKE/K3s/EKS/OpenShift) and version: v1.29.3+k3s1

Number of control plane nodes in the cluster: 1
Number of worker nodes in the cluster: 3

Node config

OS type and version: sles 15-sp5
Kernel version:
CPU per node:
Memory per node:
Disk type (e.g. SSD/NVMe/HDD):
Network bandwidth between the nodes (Gbps):

Underlying Infrastructure (e.g. on AWS/GCE, EKS/GKE, VMWare/KVM, Baremetal): aws
Number of Longhorn volumes in the cluster:

Additional context
https://ci.longhorn.io/job/public/job/master/job/sles/job/amd64/job/longhorn-upgrade-tests-sles-amd64/830/testReport/tests/test_scheduling/test_data_locality_basic/

@yangchiu Do v1.5.5 and v1.6.1 hit the issue as well?

@yangchiu Do v1.5.5 and v1.6.1 hit the issue as well?

Please let me know if you are able to run a similar repeat test and hit the issue on a different version.
For now I don't quite understand how the test normally passes.
We disable dataLocality while we have 1 running replica and 1 failed to schedule local replica. Then we set the numberOfReplicas = 2.
        assert v4_node1_replica_count + v4_node2_replica_count == 1
        assert v4_failed_replica_count == 1

        volume4 = volume4.updateDataLocality(dataLocality="disabled")
        volume4 = volume4.updateReplicaCount(replicaCount=2)

Since dataLocality == disabled, we have to count the failed to schedule local replica as usable, meaning we have two "usable" replicas and return getReplenishCount == 0. So we can't create a new replica and we can't schedule the one we have, leading to the failure. Maybe we are normally saved by a race somehow?
https://github.com/longhorn/longhorn-manager/blob/f7e2d5363978081477cfa6ee46436c0244a1482a/controller/volume_controller.go#L2610-L2613
I will monitor the behavior when the test passes and see if I can understand what I am missing.

Currently I can't find the same error on other branches from the daily regression history. I only observed it once from recent master branch daily regression: https://ci.longhorn.io/job/public/job/master/job/sles/job/amd64/job/longhorn-tests-sles-amd64/907/testReport/tests/test_scheduling/test_data_locality_basic/ and reproduced it once after 500 repeatedly runs: https://ci.longhorn.io/job/private/job/longhorn-tests-regression/6815/.
It could be extremely difficult to reproduce ...

Thank you for the clarification! It looks like we normally delete the failed to schedule replica in https://github.com/longhorn/longhorn-manager/blob/f7e2d5363978081477cfa6ee46436c0244a1482a/controller/volume_controller.go#L1032-L1047 and get unstuck. In your test case, we didn't. I will investigate more.

Root cause
I have no particular reason to believe this is a regression, though it is possible recent changes made it more likely to occur.
At the moment preceding the failure, the volume has:

One healthy replica on the "wrong" node.
One local replica that failed to schedule (because the "right" node is disabled).
spec.numberOfReplicas = 1

The test does the following two operations in quick successtion:
volume4 = volume4.updateDataLocality(dataLocality="disabled")
volume4 = volume4.updateReplicaCount(replicaCount=2)

In the following reproduce scenarios, we find that either operation, if completed first, results in the desired behavior.
DataLocality first:

The volume is already healthy, because it has one healthy replica.
The (now) extra local replica is cleaned up in cleanupFailedToScheduleReplicas.
When ReplicaCount is scaled up, a new one is replenished.

ReplicaCount first:

An extra replica is needed, because the local replica that failed to schedule doesn't count while DataLocality == best-effort.
Another replica is created.
When DataLocality is disabled, the local replica is deleted.

If both fields are updated simultaneously, we cannot handle it correctly.

The local replica cannot be deleted because there aren't enough healthy replicas (1 < 2).
A new replica can't be replenished, because the local replica is only ignored when checking if replenishment is necessary if DataLocality is enabled.

Almost every time we run the test, the volume controller reconciles between the DataLocality update and the NumberOfReplicas update. However, this is not guaranteed. If it is busy, it may only reconcile after both changes have been made.
Reproduce

Create a volume with NumberOfReplicas == `` and DataLocality == best-effort` on a three node cluster.
Disable scheduling on a node.
Attach the volume to the disabled node.
Wait for the volume to have one healthy replica and one failed to schedule local replica.
In a single kubectl edit change NumberOfReplicas = 2 and DataLocality = disabled.
Observe that the failed to schedule local replica is never deleted and a new replica is never created.

I prefer to backport this to v1.6.3 instead of v1.6.2. The impact is very minor and it is very unlikely to be triggered in the wild. Better to give the fix time to soak in the end-to-end pipeline then to risk a short test cycle before the v1.6.2 release.

I prefer to backport this to v1.6.3 instead of v1.6.2. The impact is very minor and it is very unlikely to be triggered in the wild. Better to give the fix time to soak in the end-to-end pipeline then to risk a short test cycle before the v1.6.2 release.

@ejweber Sure! Let's put it in v1.6.3. Thank you.

Verified on master-head 20240528

longhorn master-head https://github.com/longhorn/longhorn/commit/cd4d7235de3547e74ef6aeb71c6ba2c97ac8a9ba
longhorn-manager master-head https://github.com/longhorn/longhorn-manager/commit/aebb5a8a1c5d5b9463c0c39b7ad4ae0766795477

The test steps
https://github.com/longhorn/longhorn/issues/8522#issuecomment-2105011487
Result Passed

[x] 1. manual : Repeat the steps in the comment at https://github.com/longhorn/longhorn/issues/8608#issuecomment-2123765968. After executing kubectl edit on the volume, change  numberOfReplicas: 2 and dataLocality: disabled. The failed local replica was deleted, and a new replica was subsequently created.

[x] 2. regression : Execute the failed test case 200 times. We didn't observer the issue in the regression test runs https://ci.longhorn.io/job/private/job/longhorn-tests-regression/6974/ & https://ci.longhorn.io/job/private/job/longhorn-tests-regression/6968/.


Headphones status

How to judge whether the headphones are plugged in, and the headphones are playing sound？？？

I don't know, I haven't even looked for those APIs on the platforms and the library doesn't support them. Have you searched on stackoverflow, or in the Android or iOS developer documentation to see if it is even possible?

Seems to be doable for Android, but a bit trickier for iOS.
https://forums.xamarin.com/discussion/105066/detecting-if-headphones-are-plugged-in-on-android-and-ios (these are xamarin docs but they do mention os based solutions)

okay - looks possible but it would need someone to implement, marking it as such

https://stackoverflow.com/questions/21292586/are-headphones-plugged-in-ios7
Not sure if this perhaps changed over time, but it looks usable. I'll be implementing this for my project (so not here) but I thought I'd share the link anyway.

I will take this issue over, PR soon!

Closed in #860


Disabled property is not propagated

Hi there,
if the disabled property is passed to a component, the value is ignored as only isSubmitting is taken into consideration.
See this snippet:
  ({ field, form: { isSubmitting }, ...props }) => ({
    disabled: isSubmitting,

Therefore it is impossible to disable a component by hand.

Thanks for this, I will be more careful in future with default props.
Release in 0.0.6

Sure, thanks for the quick merge!


fix default example to be a collection of entries

Hello!
This fixes linkml-validate issue that failed with Unknown arguments https://github.com/linkml/linkml/issues/1495
I hope this changes fits with the template philosophy, otherwise, please suggest some edits.
Best regards,
Charlie

Thanks @sierra-moxon for the quick merge!


Changes to let this code work with Kafka Connect 2.11-1.0.0

The updated Kafka Connect code expects that Connectors will implement config and validate functions, which this code does not.
If you want to run this kafka-connector-skeleton with recent versions of Kafka Connect (downloaded directly from Confluent, like the 2.11-1.0.0 package), you must use a JAR build from code that implements these functions.
This changeset adds these functions.

What testing did you do on this? Does it work properly when run with the latest kafka connect?

Can you update the README.md to use 1.0.0, and verify that the instructions work?


waves not work when I paly audio

waves not work  no matter with MediaPlayer or 3rd Players, it just calme down and nothing happened! even I run your WaveInApp example,  still not work.  i think you should check and update your code in the project.

Hi @flycumt!
Could you please describe, what the version of android do you have and what device? Also Did you setup waveInApp as wallpaper or just opened settings screen? Also what players did you try to play something? It will help us to fix the problem..
With best regards, Cleveroad team.


Visualize forward trajectory data for 6-7

[x] Load data into CartoDB
[x] Visualize in Torque
[x] Differentiate in colour between birds and wind
[x] Differentiate in colour between spawing hours
[x] Check if we need to change scope
[x] Polish visualization
[x] Describe visualization
[x] Store settings: SQL + CSS in gist or elsewhere
[x] Publish visualization
[x] Link to visualization

Blocked by https://github.com/enram/case-study/issues/23

Viz created. Keeping private for now.


Cannot deserialize session for anonymous users

Hi,
I have an issue regarding the anonymous users when using this library. When the user is not logged in yet,  I get the following exception :
java.lang.RuntimeException: Problem deserializing JSON to Authentication 	at au.gov.dto.springframework.security.web.context.JsonAuthenticationSerializer.deserialize(JsonAuthenticationSerializer.java:49) ~[spring-security-stateless-v1.2.3.jar:null] 	at au.gov.dto.springframework.security.web.context.CookieSecurityContextRepository.loadContext(CookieSecurityContextRepository.java:65) ~[spring-security-stateless-v1.2.3.jar:null] 	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:86) ~[spring-security-web-4.0.4.RELEASE.jar:4.0.4.RELEASE] 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) ~[spring-security-web-4.0.4.RELEASE.jar:4.0.4.RELEASE] Caused by: com.fasterxml.jackson.databind.JsonMappingException: No suitable constructor found for type [simple type, class org.springframework.security.authentication.AnonymousAuthenticationToken]: can not instantiate from JSON object (missing default constructor or creator, or perhaps need to add/enable type information?)  at [Source: {"@class":"org.springframework.security.authentication.AnonymousAuthenticationToken","details":{"@class":"org.springframework.security.web.authentication.WebAuthenticationDetails","remoteAddress":"0:0:0:0:0:0:0:1","sessionId":null},"authorities":["java.util.ArrayList",[{"@class":"org.springframework.security.core.authority.SimpleGrantedAuthority","role":"ROLE_ANONYMOUS"}]],"authenticated":true,"principal":"anonymousUser","keyHash":-2102752285,"credentials":"","name":"anonymousUser"}; line: 1, column: 85] 	at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:148) ~[jackson-databind-2.6.7.jar:2.6.7] 	at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1106) ~[jackson-databind-2.6.7.jar:2.6.7]
Seems like the AnonymousAuthenticationToken is not properly handled.
If I add .anonymous().disable(), I get another exception :
org.springframework.security.authentication.AuthenticationCredentialsNotFoundException: An Authentication object was not found in the SecurityContext 	at org.springframework.security.access.intercept.AbstractSecurityInterceptor.credentialsNotFound(AbstractSecurityInterceptor.java:378) 	at org.springframework.security.access.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:222) 	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:123) 	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:90) 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) 	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114) 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) 	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:122)

You're right that AnonymousAuthenticationToken isn't handled by this library.
You'll need to ensure that the paths/endpoints of your application that don't require authentication are ignored by Spring Security. The included sampleapp does this on line 63 of WebSecurityConfig.java
The challenge with AnonymousAuthenticationToken is that it contains a field called 'keyHash' that is verified on return visits by anonymous users. For this reason the 'key' used to calculate 'keyHash' on instantiation would also have to be synchronised across all servers involved.

Hi halvards,
Very good code!
Please excuse my poor english.
We are experimenting with your library as a posible cookie based solution in a load balancing architecture without sticky session (more scalable than spring session jdbc). Project is based on Oauth2 and security spring library.
We are working with a AnonymousAuthenticationTokenDeserializer and reflection (setKeyHash) to solve AnonymousAuthenticationToken constructor issue, this is ok for you?
I not understand AnonymousAuthenticationToken challenge, is this solvable?
Thanks very much
Gustavo


Code generated by main

It would be useful if the generated code had a more descriptive comment than "main".

Sorry, which generated code are you referring to?


Google OAuth Login Fails with "Invalid Flow State" on Production Server

Bug Report: Google OAuth Login Fails with "Invalid Flow State" on Production Server

[x] I confirm this is a bug with Supabase, not with my application.
[x] I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the Bug
I'm encountering an issue with Google OAuth login on my production server (Ubuntu). When users attempt to sign in, the process fails with the following error:
This issue only occurs in production. In my local development environment, everything works fine, including when using a custom tunneling URL (e.g., DevTunnels). I suspect the issue might be related to how the production server handles OAuth redirections or Supabase's flow state management.
Steps to Reproduce

Set up Google OAuth with Supabase, using the following configuration:

access_type: "offline"
prompt: "consent"
Redirect URL: /auth/callback

Deploy the app to an Ubuntu server.
Attempt to log in with Google.
The error occurs during the process of exchanging the authorization code for a session.

Code Example
Google login handler:
const handleGoogleLogin = async () => {
  const supabase = await createClient();
  const response = await supabase.auth.signInWithOAuth({
    provider: "google",
    options: {
      redirectTo: `${window.location.origin}/auth/callback`,
      queryParams: {
        access_type: "offline",
        prompt: "consent",
      },
    },
  });
};

OAuth Callback API (/auth/callback)
import { NextResponse } from "next/server";
import { createClient } from "@/utils/supabase/server";

export async function GET(request) {
  const { searchParams, origin } = new URL(request.url);
  const code = searchParams.get("code");
  const next = searchParams.get("next") ?? "/";

  if (code) {
    const supabase = createClient();
    const { error } = await supabase.auth.exchangeCodeForSession(code);
    if (!error) {
      const forwardedHost = request.headers.get("x-forwarded-host");
      const isLocalEnv = process.env.NODE_ENV === "development";
      if (isLocalEnv) {
        return NextResponse.redirect(`${origin}${next}`);
      } else if (forwardedHost) {
        return NextResponse.redirect(`https://${forwardedHost}${next}`);
      } else {
        return NextResponse.redirect(`${origin}${next}`);
      }
    }
  }

  return NextResponse.redirect(`${origin}/auth/auth-code-error`);
}

Expected Behavior
Users should be able to log in with Google OAuth on the production server, just like in the local development environment. The OAuth flow should correctly exchange the authorization code for a session without throwing the flow_state_not_found error.
Additional Context
The redirection settings in Supabase are correctly configured.
The issue does not occur locally, only on the production server.
I suspect the problem may be related to how OAuth states are managed on the server or how headers are being forwarded during redirection.

el problema se debe al límite de memoria para los headers que no permitió que toda la información se suministrase correctamente

How did you solve the memory limit in headers?


Add support for iterator errors

Purpose
$title
Fixes #20720
Approach
n/a
Samples
type Iterable object {
    public function __iterator() returns abstract object {public function next() returns record {|int value;|}|error?;
    } {
        object {
            int[] integers = [12, 34, 56, 34, 78, 21, 90];
            int cursorIndex = 0;
            public function next() returns
            record {|
                int value;
            |}|error? {
                self.cursorIndex += 1;
                if (self.cursorIndex <= 7) {
                    return {
                        value: self.integers[self.cursorIndex - 1]
                    };
                } else {
                    return ();
                }
            }
        } sample = new;
        return sample;
    }
};

public function main() {
    Iterable p = new Iterable();
    int[] integers = [];
    foreach int|error item in p {
        integers.push(<int>item);
    }

Remarks

List any other known issues, related PRs, TODO items, or any other notes related to the PR.

Check List

[x] Read the Contributing Guide
[ ] Updated Change Log
[ ] Checked Tooling Support (#)
[ ] Added necessary tests

[ ] Unit Tests
[ ] Spec Conformance Tests
[ ] Integration Tests
[ ] Ballerina By Example Tests

[ ] Increased Test Coverage
[ ] Added necessary documentation

[ ] API documentation
[ ] Module documentation in Module.md files
[ ] Ballerina By Examples

Codecov Report

Merging #21608 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master   #21608   +/-   ##
=======================================
  Coverage   14.72%   14.72%
=======================================
  Files          51       51
  Lines        1399     1399
  Branches      214      214
=======================================
  Hits          206      206
  Misses       1177     1177
  Partials       16       16

Continue to review full report at Codecov.

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


Feature request: Regex::replace expand escape sequences

I am writing an ed clone (as one does) and came across that escape sequences do not expand in the replacing text.
For example: replacing with pattern "\\n" and replacement "\\n" will replace all newlines with \n
Expanding the replacement for escape sequences is a generally expected part of regex replace and should be easy to add.

Could you please provide a sample Rust program along with expected output and actual output? I don't think I understand what you're asking for.

Expanding the replacement for escape sequences is a generally expected part of regex replace

Is it? What other orogramming language regex engines so this?

I might just be spoiled by running regex in scripting languages but standard sed does it.
let s = "test\nlines"; let r = regex::Regex::new("\\n").unwrap(); assert_eq!(s, &r.replace(s, "\\n"));
Since this replaces "\n" with "\n" no change should be made, but different treatment of "\n" causes all newlines ("\n") to be replaced with "\n".

sed isn't a programming language's regex engine though. It's a CLI tool. Writing a custom replacement syntax for a specialized tool seems completely reasonable to me.
I guess I understand your request, but:

I don't understand why you want it when one could just write \n instead.
It would be a breaking change with the current behavior.

So for (2) alone, I don't think this is happening. Sorry. I'd recommend implementing your own escaping syntax for replacements.

Fair enough. After looking you don't seem to currently do anything like that, so the work would be considerable.
Thank you for quick responses.

A simple parser for escape sequences is certainly not "considerable" work. Here is a function that is less than one hundred lines that not only handles newline escapes but also hex escapes. It would be very easy to expand or contract it to whatever use case you want: https://github.com/BurntSushi/ripgrep/blob/a2e6aec7a4d9382941932245e8854f0ae5703a5e/crates/cli/src/escape.rs#L91
After unescaping you could then just apply the result using the existing replacement routines in this crate.

Thank you. I'll do something along those lines.


vector: stop overriding default features

Things done
This removes the buildFeatures / buildNoDefaultFeatures overrides from vector.
So far, I think features were overridden to remove unix from the default feature set. However, e.g. oniguruma is in the dependency tree and only works on isUnix platforms, so the feature was always on anyways.
(Originally, I considered dealing with this by
diff --git a/pkgs/tools/misc/vector/default.nix b/pkgs/tools/misc/vector/default.nix
index e2282008ce8e..43c7bfa18b85 100644
--- a/pkgs/tools/misc/vector/default.nix
+++ b/pkgs/tools/misc/vector/default.nix
@@ -20,12 +20,7 @@
   cmake,
   perl,
   git,
-  # nix has a problem with the `?` in the feature list
-  # enabling kafka will produce a vector with no features at all
-  enableKafka ? false,
-  # TODO investigate adding various "vendor-*"
-  # "disk-buffer" is using leveldb TODO: investigate how useful
-  # it would be, perhaps only for massive scale?
+  # "unix" is in the default feature set which we don't want
   features ? (
     [
       "api"
@@ -36,10 +31,8 @@
       "sources-dnstap"
       "transforms"
       "component-validation-runner"
+      "rdkafka/gssapi-vendored" # vector uses rdkafka?/…, but we know that rdkafka is enabled
     ]
-    # the second feature flag is passed to the rdkafka dependency
-    # building on linux fails without this feature flag (both x86_64 and AArch64)
-    ++ lib.optionals enableKafka [ "rdkafka?/gssapi-vendored" ]
     ++ lib.optional stdenv.hostPlatform.isUnix "unix"
   ),
   nixosTests,

or by just setting features ? [ "default" ] in the package definition, but I think it's unnecessary. If you do want to mess with the features, you can just override:
vector.overrideAttrs {
  cargoBuildFeatures = [ … ];
  cargoBuildNoDefaultFeatures = true;
};

However, I think leaving the current situation has more cost (e.g. what if upstream changes the default feature set) than it's worth.)

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[x] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Its weird to me that we dont need additional dependencies, but im happy to give this a go. We will find out anyways pretty fast if something is amiss

nixpkgs-review result
Generated using nixpkgs-review.
Command: nixpkgs-review pr 351066

x86_64-linux

:white_check_mark: 1 package built:

vector


Custom entities: Validation

I think it should work using Validation lib and in-template validation rules.

I think it should work using Validation lib and in-template validation rules.


feat(ui): bring Create Beneficiary closer to the wireframe

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


Enable short positions by specifying the side and a default side (BUY or SELL) along with the strategy and a default strategy (LONG or SHORT)

Enable short positions by specifying the side and a default side (BUY or SELL) along with the strategy and a default strategy (LONG or SHORT)

@abstractguy done?


Active file does not persist across refreshes

https://vizhub.com/nitanagdeote/4f64bfb0bf9449068e6cf5f759c2bfdd?edit=files&file=index.js&tabs=index.js~viz.js
To reproduce:

Open two files
Switch between them
Refresh the page
Observe that the file open after the refresh is not the same file as was open before the refresh

This could be an issue with the way React Router is used.
Potentially related to #495


Question about paper

Hi, thanks for your awesome work on contrastive learning in UDA.
I have some questions about the T-SNE visualization in Figure 4 as follows:

It seems that the T-SNE visualization results are about pixels in the shown image but not the whole target domain dataset, is my understanding correct?
How can I apply the T-SNE visualization for the whole target domain dataset? Is it feasible to use feature prototype of each category in each target image?
Can you provide the code about T-SNE visualization, it's very grateful. :-)

Hello, @super233. Thank you for attention.

The T-SNE visualization results in Fig. 4 show the pixels in a single target image.
Using feature prototype of each class in each target image is practicable to apply the T-SNE on the whole target domain.
We greatly recommend the package of sklearn.manifold.TSNE. And we employ the following setting:

TSNE(n_components=2, init='pca', random_state=0)

You might also be interested in our recently released work at https://arxiv.org/abs/2105.05013 and please check this rep https://github.com/BIT-DA/SDCA.

Ok, thanks very much.

Hi, sorry to disturb you again.
This time the question is about the implementation details, for feature extraction, you modified DeepLab V2 as follows:

Following [32, 46, 68], sampling rates are fixed as {6, 12, 18, 24} and we modify the stride and dilation rate of the last layers to produce denser feature maps with larger field-of-views.

Counld you please provide a more detailed description of your network? Are the features extracted from the backbone, or the middle layer of ASPP? Have you designed a projector for feature extraction?
It will be very appreciated if the code snippets are available. :-)

One more question.
Compared with input images, the features extracted always have smaller resolutions, making a point in features corresponds to a region in the input image, but not a pixel.
Does it have a big impact on the computing and updating of category prototypes? If yes, how do you resolve it?
I'm a green hand in contrastive learning and unsupervised domain adaptation. I'm sorry to heavily disturb you.

Hi, @super233.

This code is heavily borrowed from FADA. Also, you can ref to https://github.com/BIT-DA/SDCA.
The feature representations for contrastive learning is exactly extracted from the backbone, i.e., shape [B, 2048, h, w]. Actually, an extract projector might be more efficient since the dimension of feature can be reduced via 1x1 Conv as standard contrastive learning.
Yes, a pixel (i, j) in the feature space relates to a region in an input. We down-sample the ground-truth labels to obtain the semantic label in the feature space.

Thanks a lot. :-)


Navigating into a quote-post is sometimes jumpy

This is a continuation of https://github.com/bluesky-social/social-app/issues/2728.
We've fixed most jumps on main. (Some are unavoidable due to FlatList bugs, but we'll be following up on that separately.)
The remaining jumps seem to happen when you press into a quote, the quoted post isn't already in the full post cache, and the quoted post has something that would shift its layout (e.g. it has no engagement OR it has an embed of its own). I believe fixing this case will require backend changes — specifically, including like counts and embed content for the quotes.
So I'm opening this to track that work separately, and will close https://github.com/bluesky-social/social-app/issues/2728.

Experimented with this again today with the new changes we made to caching. I think we might have actually solved this one, as seen here:
https://bsky.app/profile/sometestacc.bsky.social
If you go into the first post in the author feed (incase it changes, it is https://bsky.app/profile/sometestacc.bsky.social/post/3kmc35jevhi24) and then you open the quote, it looks like we do indeed have the engagement and embeds there now. Very well could have been some faulty cache logic that we cleaned up.
We need to keep watching though to see if this repros anywhere else. There could be a more specific case that's causing it.


magic.user.isLoggedIn() returns false for OAuth authentications after app is restarted

✅ Prerequisites

[X] Did you perform a cursory search of open issues? Is this bug already reported elsewhere?
[X] ~Are you running the latest SDK version?~ (See Description)
[X] Are you reporting to the correct repository (magic-sdk)?

🐛 Description
Since I am building a RN app without Expo, I need to run the following versions:
@magic-ext/react-native-oauth: 2.0.0
@magic-sdk/react-native: 8.0.0

Everything works find with the email link authentication.
With OAuth authentication (testing with google), the app authenticates fine initially. If I kill the app and re-launch it, the user is no longer signed in.
🧩 Steps to Reproduce

Run your app using the lib versions stated above
Login using google oauth
Kill and reopen app

🤔 Expected behavior
magic.user.isLoggedIn() === true
😮 Actual behavior
magic.user.isLoggedIn() === false
💻 Code Sample
N/A
🌎 Environment

Software
Version(s)

react-native
0.70.1

@magic-sdk/react-native
8.0.0

@magic-ext/react-native-oauth
2.0.0

Operating System
iOS 15.4.1

Hi @rcorrie, thank you for reporting this issue. This is a known issue that's been brought up in a previous GitHub issue #279 . We'll be posting updates on that issue's thread.


[CARBONDATA-2708][BloomDataMap]  clear index file in case of data load failure

Be sure to do all of the following checklist to help us incorporate
your contribution quickly and easily:

[ ] Any interfaces changed?

[ ] Any backward compatibility impacted?

[ ] Document update required?

[ ] Testing done
Please provide details on
- Whether new unit test cases have been added or why no new tests are required?
- How it is tested? Please attach test report.
- Is it a performance related change? Please attach the performance test report.
- Any additional information to help reviewers in testing this change.

[ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.

This PR depends on PR #2461

Build Success with Spark 2.1.0, Please check CI http://<IP_ADDRESS>:8080/job/ApacheCarbonPRBuilder1/6943/

Build Success with Spark 2.2.1, Please check CI http://<IP_ADDRESS>:8080/job/ApacheCarbonPRBuilder/5726/

Build Success with Spark 2.1.0, Please check CI http://<IP_ADDRESS>:8080/job/ApacheCarbonPRBuilder1/6954/

SDV Build Fail , Please check CI http://<IP_ADDRESS>:8080/job/ApacheSDVTests/5716/

retest this please

Build Success with Spark 2.1.0, Please check CI http://<IP_ADDRESS>:8080/job/ApacheCarbonPRBuilder1/6966/

Build Success with Spark 2.2.1, Please check CI http://<IP_ADDRESS>:8080/job/ApacheCarbonPRBuilder/5746/

retest sdv please

SDV Build Success , Please check CI http://<IP_ADDRESS>:8080/job/ApacheSDVTests/5750/

review comments are resolved

Build Success with Spark 2.1.0, Please check CI http://<IP_ADDRESS>:8080/job/ApacheCarbonPRBuilder1/7022/

Build Failed with Spark 2.2.1, Please check CI http://<IP_ADDRESS>:8080/job/ApacheCarbonPRBuilder/5801/

SDV Build Fail , Please check CI http://<IP_ADDRESS>:8080/job/ApacheSDVTests/5773/

retest this please

Build Success with Spark 2.1.0, Please check CI http://<IP_ADDRESS>:8080/job/ApacheCarbonPRBuilder1/7041/

Build Success with Spark 2.2.1, Please check CI http://<IP_ADDRESS>:8080/job/ApacheCarbonPRBuilder/5818/

retest sdv please

LGTM

Build Success with Spark 2.1.0, Please check CI http://<IP_ADDRESS>:8080/job/ApacheCarbonPRBuilder1/7095/

Build Success with Spark 2.2.1, Please check CI http://<IP_ADDRESS>:8080/job/ApacheCarbonPRBuilder/5871/


[Bug] Problem with raw audio output

Using Windows 10 64 bit, Piper 2023.9.9-1 prerelease.
When piping raw audio to for example lame i seem to get just some noise back with some audible talking in the background.
Normal output into wave files seem to be no problem.
tested with lame and ffmpeg.
Commands used:
With ffmpeg:
$ cat demo.txt | piper -m model.onnx --output_raw | ffmpeg -f s16le -ar 22050 -ac 1 -i - -ab 64k -ac 1 -ar 44100 demo.mp3
And with lame:
$ cat demo.txt | piper -m model.onnx --output_raw | lame -m mono -r -s 22050 -b 64 --resample 44100 - demo.mp3

For future me, I think I need to do this when in raw output mode:
#ifdef _WIN32
  #include <io.h>
  #include <fcntl.h>
#endif
...
#ifdef _WIN32
  setmode(fileno(stdout),O_BINARY);
  setmode(fileno(stdin),O_BINARY);
#endif

Hello,
Yes, most likelly this is windows specific as I am unable to reproduce it on linux.
I've tested with ffmpeg so far.

I also tried with NAudio using a sample rate of 22050, 16 bits and 1 channel, also sounds like garbled audio. So, same as lame and ffmpeg as far as I can tell.

Same issue here in Windows 10 - using ffmpeg. Distorted audio with speaking in the background.

Same here. Windows 11 + Piper 2023.9.27-1 + VLC. Intensive crackling and faint speech.
piper.exe --model en_US-lessac-high.onnx --output-raw < hello.txt | "C:\Program Files\VideoLAN\VLC\vlc.exe" -I dummy --demux=rawaud --rawaud-channels=1 --rawaud-samplerate=22050 --rawaud-fourcc=s16l -

Just tested with latest release 2023.11.14-2.
Works fine under Win 10 with Lame.
Can be closed I guess.
Thanks for fixing.


(feat): Add code into chaos scheduler to perform random, scheduled chaos

Required a random time scheduler to inject chaos
Required a random time scheduler in a specific interval to inject chaos

Doing it through the controller code has 2 ways -

Generating a seperate thread for the process and then letting it sleep for a random time.
This thread will create a job for the corresponding experiments.

Create a cron job and then suspend it after the first execution.

Note - These approaches are just for one time execution of a job


Popper doesn't stay positioned if reference moves

Am I misunderstanding the purpose of react-popper or am I doing something stupid here? I would expect that if the reference were to move, that the popper would follow it. But that doesn't seem to be the case - I have to call scheduleUpdate() to keep it positioned correctly. This means my tooltips need to be aware of everything that could possible happen that would move them, which is infeasible.
When I load one page where I'm using popper, some of the time, the popper will end up in the wrong spot (seemingly because the heights of things above change).
Correct:

Incorrect:

Very incorrect:

Reproduction demo
https://codesandbox.io/s/j7kzyqy089
Steps to reproduce the problem

Click "Expand".
Popper does not move until "Schedule update" is clicked

What is the expected behavior?
The popper should stay positioned with the reference element without having to call scheduleUpdate
What went wrong?
The popper does not move
Packages versions

Popper.js:
react-popper: 1.0.0-beta.6

Yeah the more I think about this the more it seems like this is impossible to handle generally.


rework getSearchValue() to take optional html param

Fixes a problem where a field that returns a string (say, getElementsForSearch()) is treated as a DBText and when it has ->getSearchValue() called on it, ->forTemplate() calls nl2br() on the value and inserts a whole pile of HTML into our lovely clean field.
Now will strip it all out if the include_page_html config var is set to false

Thanks @andrewandante! I'm torn on this. It doesn't feel clean, but I struggle to come up with a better way of doing the same thing. @unclecheese Any chance you could take a look and see what you think about this please 🙏🏼?

Interesting. I can definitely see how this would be an annoying issue.
I'm thinking that the whole shouldIncludeHTML use case on DBFields is a bit dubious to begin with. Who really wants to search HTML tags? I can only see it being useful in one situation, which is if you want to show a preview of the search result. This option was really more intended for the page crawler service, and even then, I wonder about its value.
In any case, it seems appropriate that only HTMLText fields should qualify for this option, if we're going to apply it to getSearchValue().
I would say:

DBField::getSearchValue() -> sanitise
DBHTMLText::getSearchValue() -> Check index configuration to determine whether to sanitise or not

It seems like HTML in your search content is a major edge case, and it would only be of value in the page crawler field(s). Is there a use case I'm missing?

I think I agree - I was thinking about this last night and trying to think of a scenario where HTML in your search is a good idea - the preview makes sense, but you're right, that only makes sense on a page-crawler level.
Will amend this PR to always sanitise TextFields, and optionally sanitise HTMLFields. And throw some extra tests in.
Thanks!

I'd also argue that the config var should probably default to false - given that the inclusion of HTML is an edge-case, as you say

Alright I feel better about this now. Feels like it's doing what it should be.

Yup, I'd prefer the singleton you've used here. Nice job.


Correct internal dimension of Dask's SVD

Previously the Dask Array SVD code had assumed the shared dimension would be equal to the column in the Dask Array matrix always. However the shared dimension in SVD is whichever is shortest (row or column) of the provided matrix. Computing the results actually provides NumPy Arrays of the expected shape. Meaning that the chunking is merely being misreported when constructing the Dask Arrays from the Dask graph. Hence this fixes how the shapes and chunks of the resulting Dask Arrays are determined.

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

Discovered this bug on my flight. Haven't had time to add a test to it. That said, the bug is real.
Basically the shape in the Dask Array metadata does not match the final NumPy array shape computed. It also doesn't match how numpy.linalg.svd would have generated the array shapes either. This fixes both of those issues.

Thanks for tracking this down.  This looks like it could use a small test, otherwise I'm +1

Alright, have added a test to ensure the Dask Arrays returned by svd report consistent metadata. Please let me know what you think.

As you like.  Feel free to merge
On Thu, Jun 7, 2018 at 4:47 PM, jakirkham<EMAIL_ADDRESS>wrote:

@jakirkham commented on this pull request.
In dask/array/tests/test_linalg.py
https://github.com/dask/dask/pull/3517#discussion_r193884171:

@@ -97,6 +97,23 @@ def test_linalg_consistent_names():
assert same_keys(v1, v2)

+@pytest.mark.parametrize("m,n", [

(10, 20),
(15, 15),
(20, 10),
+])
+def test_dask_svd_self_consistent(m, n):
a = np.random.rand(m, n)
d_a = da.from_array(a, chunks=(3, n), name='A')

d_u, d_s, d_vt = da.linalg.svd(d_a)
u, s, vt = da.compute(d_u, d_s, d_vt)

for d_e, e in zip([d_u, d_s, d_vt], [u, s, vt]):

   assert d_e.shape == e.shape

   assert d_e.dtype == e.dtype

So there is also an issue between NumPy and Dask implementations as well,
but let's save that discussion for issue ( #3576
https://github.com/dask/dask/issues/3576 ). While we figure that out,
it would be good if the Dask Arrays at least didn't misreport the data they
hold.
Had looked into including this in another test initially, but the other
tests seem to have some pretty niche concerns, which made it unnatural to
add this to them and convoluted the otherwise simple logic included here.
Plus we want to test several possible shapes, which may have slowed down
tests that were comparing results. Given this, opted to breakout the test
instead.
Since this test is pretty short, clean, and fast, not sure it is worth
spending time trying to stuff it into another test that is running
cross-purpose to this one.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/dask/dask/pull/3517#discussion_r193884171, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AASszHURlweMNGEbrphoIrQsM4IaNzC6ks5t6ZFHgaJpZM4UF6rW
.

Thanks Matt


emacsPackages.lua-mode fails to build (again)

Describe the bug
Cannot build lua-mode due to hash mismatch. This is similar to #54641 and #71948 but the hash mismatch is different.
Tried with both the latest unstable and 19.09 channels with the same result
To Reproduce
Build the below (substitue unstable or nixos-19_09 as needed.
let

  unstable = {
    name = "nixos-unstable-2019-12-05";
    url = https://github.com/nixos/nixpkgs/archive/3140fa89c51233397f496f49014f6b23216667c2.tar.gz;
    sha256 = "1gwp3ss1955rrldml53nbam7gb6dj1ng6k1linh1dw7a5z3yd8p1";
  };

  nixos-19_09 = {
    name = "nixos-19.09-2019-12-05";
    url = https://github.com/nixos/nixpkgs/archive/d85e435b7bded2596d7b201bcd938c94d8a921c1.tar.gz;
    sha256 = "0pqq5dp7k6qzwivpz4g5jxjzfx8cigagyabv86mwzg59af1mlxlg";
  };

in

with import (builtins.fetchTarball nixos-19_09) {};

  pkgs.emacsPackagesNg.emacsWithPackages (
    epkgs: (with epkgs.melpaStablePackages; [
      lua-mode
    ]))

unstable fails with

error: hash mismatch in file downloaded from 'https://github.com/nixos/nixpkgs/archive/3140fa89c51233397f496f49014f6b23216667c2.tar.gz':
wanted: sha256:1gwp3ss1955rrldml53nbam7gb6dj1ng6k1linh1dw7a5z3yd8p1
got:    sha256:18p0d5lnfvzsyfah02mf6bi249990pfwnylwhqdh8qi70ncrk3f8

nixos-19_09 fails with

error: hash mismatch in file downloaded from 'https://github.com/nixos/nixpkgs/archive/d85e435b7bded2596d7b201bcd938c94d8a921c1.tar.gz':
wanted: sha256:0pqq5dp7k6qzwivpz4g5jxjzfx8cigagyabv86mwzg59af1mlxlg
got:    sha256:1msjm4kx1z73v444i1iybvmc7z0kfkbn9nzr21rn5yc4ql1jwf99

Expected behavior
The package builds with no errors.
Screenshots
N/A
Additional context
N/A
Metadata

system: "x86_64-linux"
host os: Linux 4.19.80-hardened, NixOS, 19.03.173672.5f7eae4bbb1 (Koi)
multi-user?: yes
sandbox: yes
version: nix-env (Nix) 2.3.1
channels(root): "nixos-19.03.173672.5f7eae4bbb1"
channels(user): "nixos-latest-19.03.173670.3ead845da92, unstable-20.03pre203904.bb1013511e1"
nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

Maintainer information:
# a list of nixpkgs attributes affected by the problem
attribute:
- emacsPackagesNg.melpaStablePackages.lua-mode
# a list of nixos modules affected by the problem
module:

My bad :bowing_man: , it seems I did something wrong. Closing this for now.

Can you elaborate on the wrong that you did? I'm having trouble building lua-mode again.

@endgame I messed up with the hashes and that's why I had the failure in the code I posted.
Apparently I can build the package OK with the code posted in this issue (minus the wrong hashes) but it fails when I build it for my emacs environment (emacsWithPackages etc...), since at the moment I have the old nixos stable and the latest channels, there might be something wrong with my setup, but I haven't had time to look into that yet.

Updated https://github.com/NixOS/nixpkgs/issues/71948#issuecomment-572505840 rather than reopening this one.


wip - add docker compose intergration

Currently we are using a single Docker container to host all the components of Zulip - Postgres, memcached, rabbitmq, redis.
Problems with this approach:

Many devs already have containers of redis, postgres etc on their machine and we aren't leveraging them currently
The monolithic docker container breaks very often due to numerous reasons like improper order of starting the components,  timeouts in flushing memcached etc

This PR breaks the single docker container into 5 containers - postgres, memcached, rabbitmq, redis and zulip core.

@darshanime cool, thanks for working on this!  I posted some notes on things you'll need to change to make this work.
Have you been having issues with the existing Zulip dev docker file?  I'd be curious to see tracebacks, in case some of those are things with another soluiton.

@darshanime are you planning to revise this based on these suggestions?  It'd be greatly appreciated!

Sure! I was a little caught up with work, will push updates tonight.
Apologies for the delay.
On Nov 15, 2017 05:10, "Tim Abbott"<EMAIL_ADDRESS>wrote:

@darshanime https://github.com/darshanime are you planning to revise
this based on these suggestions? It'd be greatly appreciated!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/zulip/zulip/pull/7232#issuecomment-344437340, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AGoT7-GX-1R5GIz89bkqf5lxxXH1DZQkks5s2iUDgaJpZM4QMRIB
.

I'll make the changes this weekend. Thanks you for the patience.
On 04-Dec-2017 3:51 PM, "zulipbot"<EMAIL_ADDRESS>wrote:

Hello @darshanime https://github.com/darshanime, a Zulip maintainer
reviewed this pull request over 10 days ago, but you haven't updated your
pull request since. Please take a look at the requested changes and update
your pull request accordingly.
Thank you for your valuable contributions to Zulip!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/zulip/zulip/pull/7232#issuecomment-348919834, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AGoT78SAVSYWyMTy7eGivduRbqi6fAhMks5s88eugaJpZM4QMRIB
.

Closing in favor of #7861.


Separate APIs

resolves #194

Codecov Report

Merging #202 into master will decrease coverage by 0.77%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master     #202      +/-   ##
==========================================
- Coverage   65.85%   65.07%   -0.78%
==========================================
  Files          17       17
  Lines         735      713      -22
  Branches      123      119       -4
==========================================
- Hits          484      464      -20
- Misses        136      144       +8
+ Partials      115      105      -10

Impacted Files
Coverage Δ

atcoder-problems-backend/src/api/lambda.rs
0% <0%> (-33.9%)
:arrow_down:

Continue to review full report at Codecov.

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


[v3.0.0] Default option for appendTo is not document.body

Hello. I have updated to the latest version and expiriencing some issues with it.

By default <Tippy /> is now appending itself to reference parent while documentation says that default options is document.body. I need to set it explicitly in order to make it work.

Option interactive is getting ignored while appendTo is not document.body. hideOnClick={false} can fix that but console will be showing this warning:

Is this an expected behavior?

Documentation needs to be updated for this yeah.

If interactive: true, then the tippy is appended to the reference element's parent node unless you specify your own appendTo value – that way, interactive elements inside the tippy can be focused next once the reference element is blurred.
If it's appended to the body (as before), then any focusable elements in between the ref element and the end of the body will be next in focus order, so the popover is "disjoined" for keyboard use making it inaccessible.
You can disable this default behavior if you use your own appendTo, but you would need to create some kind of focus management solution to handle the popover for keyboard.

Not 100% sure what you mean here, is there a CodeSandbox repro?

Not 100% sure what you mean here

interactive: true has no effect while appendTo is not set to document.body

Works for me: https://codesandbox.io/s/pensive-villani-mdzcv

@atomiks well then I think there's something wrong with my code. I'll try to inspect it and reopen this issue if there's a bug.

This should be in the upgrade guide. One of my popups stopped showing after upgrading to v3, and I finally found out that it was because it had interactive: true
It started showing up again after adding appendTo: document.body

How was it invisible, due to overflow hidden? How are you handling keyboard nav?

I think it happens because the popper in question has preventOverflow: { enabled: false }
As for keyboard navigation, I simply ignore that. 8)


Added correct color temperature support for E12-N1E Sengled Bulb

E12-N1E bulb by Sengled previously failed to enumerate color temperature attribute even though the bulb is ct capable. This fix allows the bulb's color temperature to be correctly controlled (although existing bulbs must be removed and re-added in Deconz).

I don’t understand the need for this PR.  Homebridge Hue sets this.config.ct based on the presence of state.ct.  If you delete and re-add the light in deCONZ to get the missing state.ct, Homebridge Hue picks this up on the next restart.  If state.ct is missing, setting this.config.ct will only cause errors.

Well I'm not really sure what to say; I tried removing and re-adding the bulbs in question in Deconz, with no success. Everything was up to date. This fix works, and causes the color temperature functionality of the bulb correctly.

Did you restart Homebridge without this “fix” after re-adding the light to deCONZ?  Please attach the debug dump file and capture and attach a debug log file of Homebridge starting.

Here they are:
homebridge.log.txt
homebridge-hue.json.txt

deCONZ doesn't expose state.ct, but reports colormode as ct?!  There's definitely something fishy going on there.  This a ZHA Color Dimmable Light; these usually have issues with colour temperature.  deCONZ whitelists most of them, to expose them correctly.
       "13": {
          "etag": "656da2be2494dc800571beaaaba29c60",
          "hascolor": true,
          "lastannounced": null,
          "lastseen": "2022-01-09T15:07Z",
          "manufacturername": "sengled",
          "modelid": "E12-N1E",
          "name": "Color dimmable light 13",
          "state": {
            "alert": "none",
            "bri": 74,
            "colormode": "ct",
            "effect": "none",
            "hue": 0,
            "on": false,
            "reachable": true,
            "sat": 0,
            "xy": [
              0.3227,
              0.329
            ]
          },
          "swversion": "0x00000015",
          "type": "Color dimmable light",
          "uniqueid": "b0:ce:18:14:03:52:bb:5d-01"
        },

Typically, the deCONZ API will return an error, when trying to set state.ct on a light which doesn't expose that.  What does the log show when you change the color temperature from HomeKit?

Sure, here's me playing around with it a bit.
homebridge.log (2).txt
Yeah if they have to be whitelisted in Deconz that could be the issue; I don't think they explicitly support this model (though they do have official support for a couple of other devices from Sengled).

Indeed, deCONZ accepts the state change with ct and even seems to send the corresponding command to the light, but it doesn’t report back the actual ct value.
This definitely is a bug in deCONZ, albeit with a lucky effect.  I even fixed that at some time, long ago, but the fix wasn’t accepted, exactly for cases where (at that time) other API clients were bluntly updating ct without checking whether is was exposed.
Note the light does not update xy when it changes colour temperature (except for Hue lights, hardly any light does), so Homebridge Hue has no clue what the actual colour temperature of the light is.  In particular, when changing ct through another app, the state won’t be reflected in HomeKit.  This really needs to be fixed in deCONZ.  Please open an issue there.
I’m happy this fix works for you, but sorry, I’m not accepting a PR with half a workaround for something that should be fixed in deCONZ.
Btw, I still don’t understand why it only works after removing and re-adding the light to deCONZ.  Or did they change something in deCONZ for this light?

I suspect the reason I had to re-add the light in Deconz for the change to take effect is because that forcred the light to be re-added in homebridge, which is the only time (I understand) that the modified section of code runs


Issue with cluster setup

Hi there,
we are having difficulties getting the cluster setup to work. The cluster does not show up on the system.clusters table.
Preprocessed config: https://gist.github.com/Slind14/d52c0ee891e234d85cab703860fa3baa
Log: https://gist.github.com/Slind14/01bca0974d9dddf3fe5b18abf6335cab
Is there something wrong with the configuration? We are not getting any errors related to this.

looks like the include isn't working

include looks for corresponding section in substitutions file ( by default /etc/metrika.xml)

hmm, what is the reason behind this? I'm wondering because if I use the same xml key (not the include) it works fine no matter the file name in config.d

xml files in config.d / conf.d / user.d automatically included into config.
Just put your cluster description into any file.
For example into  conf.d/clusters.xml
Or into several conf.d/clusterX.xml conf.d/clusterY.xml
incl for multipal repetitions of like password https://gist.github.com/den-crane/d6e0f1c7849a0bc44c27eab2de51c911