OSLCode node

This allows the direct entry of OSL source code within the UI, compiling and loading it on the fly. The inputs/outputs are specified simply by declaring them within the OSL source, but we may well want to add some custom UI elements to make that easier for people who only want to worry about writing the body of the code. I'm mostly making this PR so @danieldresser and @andrewkaufman can get a little preview and formulate some thoughts on what the UI should look like.

I think you mentioned this already, but it'd be much nicer if the Arnold ShaderView tolerated these sorts of ad-hoc osl shaders. Have we mentioned that to them yet?

First bit of UI I'd like (considering I have no idea how to write an OSL shader) is a Load button so I can browse and populate the code plug with an existing shader.

I was trying to make a UI mockup using a Box and I realized that the "code" isn't stored on a StringPlug. Any reason for that? I don't know if it'd be useful in the real world, but right now I'd like to drive the code with an expression.

Here's my version of the OSL Noise shader using a OSLCode node with a Box-like UI. What do you think?
import Gaffer
import GafferOSL
import IECore

__children = {}

__children["SnippetMockup"] = Gaffer.Box( "SnippetMockup" )
parent.addChild( __children["SnippetMockup"] )
__children["SnippetMockup"].addChild( GafferOSL.OSLCode( "OSLCode" ) )
__children["SnippetMockup"]["OSLCode"]["name"].setValue( '/tmp/gafferOSLCode/6a3e4f57/71745ce1/93915543/7098a138/oslCode6a3e4f5771745ce1939155437098a138' )
__children["SnippetMockup"]["OSLCode"]["type"].setValue( 'osl:shader' )
__children["SnippetMockup"]["OSLCode"]["parameters"].addChild( Gaffer.StringPlug( "type", defaultValue = 'uperlin', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["SnippetMockup"]["OSLCode"]["parameters"].addChild( Gaffer.FloatPlug( "scale", defaultValue = 1.0, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["SnippetMockup"]["OSLCode"]["parameters"].addChild( Gaffer.IntPlug( "dimensions", defaultValue = 3, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["SnippetMockup"]["OSLCode"]["parameters"].addChild( Gaffer.V3fPlug( "p", defaultValue = IECore.V3f( 0, 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["SnippetMockup"]["OSLCode"]["parameters"].addChild( Gaffer.FloatPlug( "t", defaultValue = 0.0, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["SnippetMockup"]["OSLCode"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = IECore.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["SnippetMockup"]["OSLCode"]["__uiPosition"].setValue( IECore.V2f( -7.99999905, 8.74999809 ) )
__children["SnippetMockup"]["OSLCode"].addChild( Gaffer.Plug( "out", direction = Gaffer.Plug.Direction.Out, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["SnippetMockup"]["OSLCode"]["out"].addChild( Gaffer.FloatPlug( "n", direction = Gaffer.Plug.Direction.Out, defaultValue = 0.0, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["SnippetMockup"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = IECore.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["SnippetMockup"]["__uiPosition"].setValue( IECore.V2f( -8.10617352, 5.64999914 ) )
__children["SnippetMockup"].addChild( Gaffer.StringPlug( "shader", defaultValue = '', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["SnippetMockup"]["shader"].setValue( 'point pp = isconnected( p ) ? p : P;\npp /= scale;\n\nif( dimensions == 1 )\n{\n\tn = noise( type, pp[0] );\n}\nelse if( dimensions == 2 )\n{\n\tn = noise( type, pp[0], pp[1] );\n}\nelse if( dimensions == 3 )\n{\n\tn = noise( type, pp );\n}\nelse\n{\n\tn = noise( type, pp, t );\n}' )
__children["SnippetMockup"].addChild( Gaffer.StringPlug( "type", defaultValue = 'uperlin', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["SnippetMockup"].addChild( Gaffer.FloatPlug( "scale", defaultValue = 1.0, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["SnippetMockup"]["scale"].setValue( 0.09000000357627869 )
__children["SnippetMockup"].addChild( Gaffer.IntPlug( "dimensions", defaultValue = 3, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["SnippetMockup"].addChild( Gaffer.V3fPlug( "p", defaultValue = IECore.V3f( 0, 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["SnippetMockup"].addChild( Gaffer.FloatPlug( "t", defaultValue = 0.0, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["SnippetMockup"]["t"].setValue( 1.8899999856948853 )
__children["SnippetMockup"].addChild( Gaffer.FloatPlug( "out", direction = Gaffer.Plug.Direction.Out, defaultValue = 0.0, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["SnippetMockup"].addChild( Gaffer.StringPlug( "result", defaultValue = '', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["SnippetMockup"].addChild( Gaffer.Expression( "ResultExpression" ) )
__children["SnippetMockup"]["ResultExpression"]["__in"].addChild( Gaffer.StringPlug( "p0", defaultValue = '', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["SnippetMockup"]["ResultExpression"]["__out"].addChild( Gaffer.StringPlug( "p0", direction = Gaffer.Plug.Direction.Out, defaultValue = '', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["SnippetMockup"]["ResultExpression"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = IECore.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["SnippetMockup"]["ResultExpression"]["__uiPosition"].setValue( IECore.V2f( -8.09999657, -0.299999237 ) )
Gaffer.Metadata.registerNodeValue( __children["SnippetMockup"], 'description', 'This seems like a nice way of making OSLCode on the fly' )
Gaffer.Metadata.registerNodeValue( __children["SnippetMockup"], 'uiEditor:emptySections', IECore.StringVectorData( [  ] ) )
Gaffer.Metadata.registerNodeValue( __children["SnippetMockup"], 'uiEditor:emptySectionIndices', IECore.IntVectorData( [  ] ) )
Gaffer.Metadata.registerNodeValue( __children["SnippetMockup"], 'layout:section:Body:summary', '' )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["user"], 'layout:section', 'User' )
__children["SnippetMockup"]["OSLCode"]["parameters"]["type"].setInput( __children["SnippetMockup"]["type"] )
__children["SnippetMockup"]["OSLCode"]["parameters"]["scale"].setInput( __children["SnippetMockup"]["scale"] )
__children["SnippetMockup"]["OSLCode"]["parameters"]["dimensions"].setInput( __children["SnippetMockup"]["dimensions"] )
__children["SnippetMockup"]["OSLCode"]["parameters"]["p"].setInput( __children["SnippetMockup"]["p"] )
__children["SnippetMockup"]["OSLCode"]["parameters"]["p"]["x"].setInput( __children["SnippetMockup"]["p"]["x"] )
__children["SnippetMockup"]["OSLCode"]["parameters"]["p"]["y"].setInput( __children["SnippetMockup"]["p"]["y"] )
__children["SnippetMockup"]["OSLCode"]["parameters"]["p"]["z"].setInput( __children["SnippetMockup"]["p"]["z"] )
__children["SnippetMockup"]["OSLCode"]["parameters"]["t"].setInput( __children["SnippetMockup"]["t"] )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["__uiPosition"], 'layout:section', 'Settings' )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["shader"], 'nodule:type', '' )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["shader"], 'layout:section', 'Settings.Body' )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["shader"], 'layout:index', 6 )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["shader"], 'plugValueWidget:type', 'GafferUI.MultiLineStringPlugValueWidget' )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["type"], 'nodule:color', None )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["type"], 'connectionGadget:color', None )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["type"], 'nodeGadget:nodulePosition', 'left' )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["type"], 'description', 'The type of noise. See OSL documentation for more details.' )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["type"], 'label', None )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["type"], 'presetNames', IECore.StringVectorData( [ 'Signed Perlin', 'Unsigned Perlin', 'Cell', 'Signed Simplex', 'Unsigned Simplex', 'Gabor' ] ) )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["type"], 'presetValues', IECore.StringVectorData( [ 'perlin', 'uperlin', 'cell', 'simplex', 'usimplex', 'gabor' ] ) )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["type"], 'plugValueWidget:type', 'GafferUI.PresetsPlugValueWidget' )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["type"], 'layout:section', 'Settings' )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["type"], 'layout:index', 0 )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["scale"], 'nodule:color', IECore.Color3f( 0.246700004, 0.376199991, 0.469999999 ) )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["scale"], 'connectionGadget:color', None )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["scale"], 'nodeGadget:nodulePosition', 'left' )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["scale"], 'description', '' )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["scale"], 'label', None )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["scale"], 'presetNames', None )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["scale"], 'presetValues', None )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["scale"], 'plugValueWidget:type', None )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["scale"], 'layout:section', 'Settings' )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["scale"], 'layout:index', 1 )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["dimensions"], 'nodule:color', None )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["dimensions"], 'connectionGadget:color', None )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["dimensions"], 'nodeGadget:nodulePosition', 'left' )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["dimensions"], 'description', '' )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["dimensions"], 'label', None )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["dimensions"], 'presetNames', None )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["dimensions"], 'presetValues', None )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["dimensions"], 'plugValueWidget:type', None )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["dimensions"], 'layout:section', 'Settings' )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["dimensions"], 'layout:index', 2 )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["p"], 'nodule:color', IECore.Color3f( 0.469999999, 0.180999994, 0.180999994 ) )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["p"], 'connectionGadget:color', None )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["p"], 'nodeGadget:nodulePosition', 'left' )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["p"], 'description', '' )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["p"], 'label', None )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["p"], 'presetNames', None )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["p"], 'presetValues', None )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["p"], 'plugValueWidget:type', None )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["p"], 'layout:section', 'Settings' )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["p"], 'layout:index', 3 )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["p"]["x"], 'nodule:color', IECore.Color3f( 0.246700004, 0.376199991, 0.469999999 ) )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["p"]["x"], 'connectionGadget:color', None )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["p"]["x"], 'nodeGadget:nodulePosition', 'left' )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["p"]["x"], 'description', '' )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["p"]["x"], 'label', None )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["p"]["x"], 'presetNames', None )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["p"]["x"], 'presetValues', None )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["p"]["x"], 'plugValueWidget:type', None )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["p"]["y"], 'nodule:color', IECore.Color3f( 0.246700004, 0.376199991, 0.469999999 ) )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["p"]["y"], 'connectionGadget:color', None )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["p"]["y"], 'nodeGadget:nodulePosition', 'left' )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["p"]["y"], 'description', '' )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["p"]["y"], 'label', None )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["p"]["y"], 'presetNames', None )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["p"]["y"], 'presetValues', None )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["p"]["y"], 'plugValueWidget:type', None )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["p"]["z"], 'nodule:color', IECore.Color3f( 0.246700004, 0.376199991, 0.469999999 ) )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["p"]["z"], 'connectionGadget:color', None )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["p"]["z"], 'nodeGadget:nodulePosition', 'left' )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["p"]["z"], 'description', '' )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["p"]["z"], 'label', None )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["p"]["z"], 'presetNames', None )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["p"]["z"], 'presetValues', None )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["p"]["z"], 'plugValueWidget:type', None )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["t"], 'nodule:color', IECore.Color3f( 0.246700004, 0.376199991, 0.469999999 ) )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["t"], 'connectionGadget:color', None )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["t"], 'nodeGadget:nodulePosition', 'left' )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["t"], 'description', '' )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["t"], 'label', None )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["t"], 'presetNames', None )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["t"], 'presetValues', None )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["t"], 'plugValueWidget:type', None )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["t"], 'layout:section', 'Settings' )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["t"], 'layout:index', 4 )
__children["SnippetMockup"]["out"].setInput( __children["SnippetMockup"]["OSLCode"]["out"]["n"] )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["out"], 'nodule:color', IECore.Color3f( 0.246700004, 0.376199991, 0.469999999 ) )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["out"], 'connectionGadget:color', None )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["out"], 'nodeGadget:nodulePosition', 'right' )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["out"], 'layout:section', 'Settings' )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["out"], 'layout:index', 5 )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["out"], 'plugValueWidget:type', '' )
__children["SnippetMockup"]["result"].setInput( __children["SnippetMockup"]["ResultExpression"]["__out"]["p0"] )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["result"], 'nodule:type', '' )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["result"], 'layout:section', 'Code' )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["result"], 'layout:index', 7 )
Gaffer.Metadata.registerPlugValue( __children["SnippetMockup"]["result"], 'plugValueWidget:type', 'GafferUI.MultiLineStringPlugValueWidget' )
__children["SnippetMockup"]["ResultExpression"]["__in"]["p0"].setInput( __children["SnippetMockup"]["shader"] )
__children["SnippetMockup"]["OSLCode"].setCode( 'shader Noise\n(\n\tstring type = "uperlin" [[\n\t\tstring help = "The type of noise. See OSL documentation for more details.",\n\t\tstring widget = "popup",\n\t\tstring options = "Signed Perlin:perlin|Unsigned Perlin:uperlin|Cell:cell|Signed Simplex:simplex|Unsigned Simplex:usimplex|Gabor:gabor"\n\t]],\n\tfloat scale = 1,\n\tint dimensions = 3,\n\tpoint p = 0,\n\tfloat t = 0,\n\toutput float n = 0\n)\n{\n\tpoint pp = isconnected( p ) ? p : P;\n\tpp /= scale;\n\n\tif( dimensions == 1 )\n\t{\n\t\tn = noise( type, pp[0] );\n\t}\n\telse if( dimensions == 2 )\n\t{\n\t\tn = noise( type, pp[0], pp[1] );\n\t}\n\telse if( dimensions == 3 )\n\t{\n\t\tn = noise( type, pp );\n\t}\n\telse\n\t{\n\t\tn = noise( type, pp, t );\n\t}\n}' )
__children["SnippetMockup"]["ResultExpression"].setExpression( 'indentShader = "\\n".join( [ "\\t"+x for x in parent["shader"].split( "\\n" ) ] )\n\nparent["result"] = """shader %s\n(\n\t## \\\\todo: generate this automagically from the plugs in the Settings section\n)\n{\n%s\n}""" % (\n\t"RenameMe",\n\t"\\n".join( [ "\\t"+x for x in parent["shader"].split( "\\n" ) ] ),\n)', "python" )

del __children

For those without a custom Gaffer build, here's the main tab of the node:

And here's the second tab which can be copy/pasted into a .osl file on disk. Maybe we could even have an "Export" button on that tab?

Coooool, I'm liking it! Can we remove plugs easily from the UI as well?
I can imagine a great use-case of a very particular asset I had the pleasure of doing R&D lookdev for at a previous company that involved plugging many different matrix projections where this would be excellent to have to achieve the right look.

I was hoping it would work just like making a Box, so you can delete inputs from the rmb menu or from the Edit UI menu. Same for outputs.

I was trying to make a UI mockup using a Box and I realized that the "code" isn't stored on a StringPlug. Any reason for that? I don't know if it'd be useful in the real world, but right now I'd like to drive the code with an expression.

It's not on a plug because having a plug value affect the structure of the graph doesn't really make sense - because plugs can have different values in different contexts, but the graph has the same structure in all contexts. So the "drive the code with an expression" thing wouldn't work anyway.

I was hoping it would work just like making a Box, so you can delete inputs from the rmb menu or from the Edit UI menu. Same for outputs.

That mockup looks pretty good to me, but there are a few further considerations :

We need a way of adding #include statements. These are outside of the body of the shader, so only showing the body isn't going to be sufficient at all times.
The underlying principle we discussed previously was to not allow the user to do anything in the UI which couldn't be expressed directly in OSL code itself. But :

The regular + button for plugs allows the addition of types that OSL doesn't support.
The regular UIEditor allows the addition of plugs that OSL doesn't support, and the use of metadata that OSL doesn't support.
Both those mechanisms edit the graph/metadata rather than the code, and even if we constrained them to only make OSL-compatible edits, I'm concerned about having a two-way coupling so that graph edits have to be automatically reflected in the code (currently the graph is defined by the code, not vice versa).

I was thinking one of these options might work :

Have a toggle to switch the parameter UI between the plug widgets (as in your mockup) and an editable code representation of them. You could use that to add #includes etc, and also switch back and forth to learn what it is your UI actions are actually doing to the code. Personally I think there are a bunch of things I'd rather edit in the code anyway - lists of presets being one.
Only ever allow edits via the code. The + button for plugs could be a right click "add parameter" menu item, and edits to the created parameters could be made by right clicking on them and choosing from menu items to add the right OSL metadata to specify the UI. Personally I quite like this option because it's true to the underlying implementation (the code is the source for everything, including the UI), and I'd like to think it would let users learn to be a bit more comfortable with coding,

I guess the concern with 1) is that it's potentially a huge amount of work trying to reproduce all the things we can already do via the UIEditor. And the concern with 2) is that it'll be intimidating and ultimately not friendly enough.  I don't know how well this might work in practice.

Yeah, it sounds like a LOT of work to make a 2nd UIEditor. Would it be possible to make use of the existing UIEditor with some extra hints/metadata to disable the non-OSL features? We already grey out certain things depending on the type of plug you're making, so maybe we could grey out other things depending on the type of node? I guess that still leads to the constrained 2-way coupling you're worried about though...
Regarding includes, maybe we could have a header section that's all code like the body section? Or maybe we could even have a browser widget so you can find out what headers are on the OSL_SHADER_PATHS?
The toggle from UI inputs to code inputs seems like a bit of trickery that isn't uber helpful to users. I think in the mockup you can already do the "code learning" you're after by switching to the Code tab to see what your UI edits did. And if typing presets in the code is simpler than in the UI, then I think that demonstrates a problem with the UI, not a need to expose the code for direct edits. Maybe I'm wrong though and users would like the toggling ability... @boberfly ? @thiasbxl ?
Or maybe we can simplify it all a bit, and give 4 open string sections: headers, inputs, outputs, body. People can fill those in and we add all the annoying syntax around it (brackets and whatnot). The plug widgets only get generated from the inputs/outputs code (so you can't make incompatibly types) but then we still need the UIEditor to monkey with their style/presets/etc... so maybe this idea doesn't solve the key issues?

Yeah, it sounds like a LOT of work to make a 2nd UIEditor. Would it be possible to make use of the existing UIEditor with some extra hints/metadata to disable the non-OSL features?

I'm sure we could figure out something. Might not be pretty, but should be doable.

I guess that still leads to the constrained 2-way coupling you're worried about though

Yeah, I think this is the crux of it for me - whether or not this is doable and/or a good idea seems to drive the decision about the UIEditor.

The toggle from UI inputs to code inputs seems like a bit of trickery that isn't uber helpful to users. I think in the mockup you can already do the "code learning" you're after by switching to the Code tab to see what your UI edits did.

I won't speak for everyone, but a read-only "all the code" section will drive me crazy. If I can see it, I want to edit it. I don't see this as trickery, just a natural way of making the duality of the UI/code obvious, and allowing people to edit in the way that suits them best. And learning might be facilitated more easily if the equivalent forms share the same space rather than one being hidden on a different tab.

And if typing presets in the code is simpler than in the UI, then I think that demonstrates a problem with the UI.

Presets are encoded as a single string in OSL - for anyone who knows the format, entering that string is always going to be quicker than clicking a bunch of buttons. I wouldn't be surprised if someone who first learned the ropes via the UI then wanted to start working with the code once they'd got the hang of things. For putting things in sections and reordering etc, the UI will be better for sure, but for some things, code wins. That's the reason there's a desire for an OSLCode node in the first place - some things are clearer as text than they are as UI (node graphs).

Or maybe we can simplify it all a bit, and give 4 open string sections: headers, inputs, outputs, body.

Maybe we can simplify that a bit, and give a single open string section with the headers, inputs, outputs and body in it :) I'm only partly tongue in cheek here - I do aspire to have a plain old editable code view, as long as it doesn't get in the way of useability for folks who'd rather use an alternative UI.
How fancy do we expect people to get with this thing? Are people going to write big monolithic things like alSurface and need a full UIEditor, or are they going to chuck snippets together into a bigger network, and then promote bits and only then need the full UIEditor? I guess we shouldn't really preclude either workflow, but it'd be interesting to have a sense...

I feel pretty strongly that the use case we should focus most on making convenient is a single line expression, and that this case should only require seeing a single line of code.  This feels most user friendly doing it Andrew's way, with UI for the parameters:  the user should be able to add some vector and float inputs and a vector output, and then just type a single line like:
"out = inPos + vector( 0, rippleHeight * sin( ( inPos - rippleCenter ) * rippleFrequency + ripplePhase ), 0 );"
More complex things feel secondary to me - might be nice to have a mode for advanced users, but on the other hand it's not that hard to create a shader on disk somewhere if you want to do anything really big.

I feel pretty strongly that the use case we should focus most on making convenient is a single line expression, and that this case should only require seeing a single line of code. This feels most user friendly doing it Andrew's way, with UI for the parameters.

That makes sense and is fine with me, I'd just like to retain the ability to edit the full code as well, and was proposing the toggle as a solution.
Given what you've said about the importance of the single line use case, do we still think the full on UIEditor stuff is necessary at this point? Is it something we could defer in the interest of getting something into the hands of some users (with basic add/rename/remove direct in the parameter UI as in Andrew's mockup)?

I feel like I would still kinda feel more comfortable with a one-way coupling ( basic parameter UI always drives code generation, copy the code to a file if you want to do something more complicated ), rather than the complexity of a two-way coupling.
Rather than having a toggle, should it just be two different nodes?  One that is always driven by the parameter UI, and one with bare code for advanced users?

More complex things feel secondary to me - might be nice to have a mode for advanced users, but on the other hand it's not that hard to create a shader on disk somewhere if you want to do anything really big.

Fair enough - I'll concentrate on the "snippety" end of the use cases for now then. I am keen to have Gaffer provide easy transitions from one level of tech-savviness to the next though, so I would like to put some time into helping write bigger shaders at some point.

I feel like I would still kinda feel more comfortable with a one-way coupling ( basic parameter UI always drives code generation, copy the code to a file if you want to do something more complicated ), rather than the complexity of a two-way coupling.

Yeah, me too. I'll stick to one way for now. Although once we've done the plugs->code generation we'll need, we will actually have all the pieces for a two way coupling. I'm just not convinced it'll be robust, or be able to cover all the transitions from Gaffer UI metadata to OSL metadata and back.

Rather than having a toggle, should it just be two different nodes? One that is always driven by the parameter UI, and one with bare code for advanced users?

I think it could even be two ways of using the same node. So at the API level the OSLCode::setCode() method would have an argument to say "I've given you the body, generate the rest from the plugs" or to say "I've given you the whole shebang - generate the plugs from it". If that was exposed in the UI it might facilitate the transition from "i write the odd snippet" to "oops, i seem to be the local shader writer now". I'll bear that in mind, but just focus on the snippet workflow, at least as far as the UI goes.
So, in terms of UI functionality :

We want the + icon from Andrew's mockup for adding parameters easily.
I presume we'll want "double click on label to rename", and that we'll want that to magically rejig the code to match, in the same way expressions do?
I was thinking it would be nice to drag and drop an external plug into the code (like you can with the expression node), and have it create the parameter, connect it as an input, and insert the parameter name into the code. In the same way you could drag and drop a parameter into the code to get its name.
Maybe we want a right click menu for inserting common OSL functions? Or a little menu bar with them in so they're more discoverable?
I'd like to get all the code editors actually using a sensible font.

Any other specifics anyone would like to add at this stage?

More complex things feel secondary to me - might be nice to have a mode for advanced users, but on the other hand it's not that hard to create a shader on disk somewhere if you want to do anything really big.

Fair enough - I'll concentrate on the "snippety" end of the use cases for now then. I am keen to have Gaffer provide easy transitions from one level of tech-savviness to the next though, so I would like to put some time into helping write bigger shaders at some point.

I feel like I would still kinda feel more comfortable with a one-way coupling ( basic parameter UI always drives code generation, copy the code to a file if you want to do something more complicated ), rather than the complexity of a two-way coupling.

Yeah, me too. I'll stick to one way for now. Although once we've done the plugs->code generation we'll need, we will actually have all the pieces for a two way coupling. I'm just not convinced it'll be robust, or be able to cover all the transitions from Gaffer UI metadata to OSL metadata and back.

Rather than having a toggle, should it just be two different nodes? One that is always driven by the parameter UI, and one with bare code for advanced users?

I think it could even be two ways of using the same node. So at the API level the OSLCode::setCode() method would have an argument to say "I've given you the body, generate the rest from the plugs" or to say "I've given you the whole shebang - generate the plugs from it". If that was exposed in the UI it might facilitate the transition from "i write the odd snippet" to "oops, i seem to be the local shader writer now". I'll bear that in mind, but just focus on the snippet workflow, at least as far as the UI goes.
So, in terms of UI functionality :

We want the + icon from Andrew's mockup for adding parameters easily.
I presume we'll want "double click on label to rename", and that we'll want that to magically rejig the code to match, in the same way expressions do?
I was thinking it would be nice to drag and drop an external plug into the code (like you can with the expression node), and have it create the parameter, connect it as an input, and insert the parameter name into the code. In the same way you could drag and drop a parameter into the code to get its name.
Maybe we want a right click menu for inserting common OSL functions? Or a little menu bar with them in so they're more discoverable?
I'd like to get all the code editors actually using a sensible font.

Any other specifics anyone would like to add at this stage?

So without UIEditor support, how do you add outputs? Or mark which inputs get nodules? Or did I misunderstand and we are planning to expose the UIEditor?

How do you add outputs?

I'm thinking you'd do it in the same way as inputs - with a button on the main NodeEditor UI.

Or mark which inputs get nodules?

Currently all OSL parameters get nodules, because typically they're used to build networks, and I expect that'll be a reasonable starting point for these snippets. I would like to add a "Show In NodeGraph" option on the NodeEditor plug context menu for other reasons though - perhaps that might also make sense here.

Or did I misunderstand and we are planning to expose the UIEditor?

I was planning to do it in such a way that it would be possible to use the UIEditor, yes. But if we're targeting one-liners and snippets as our primary use case, I would expect that the extra indirection of wandering off into another UI would be inefficient and unobvious, so it wasn't going to be the first thing I implemented. Or are you thinking of embedding a full blown UIEditor in the NodeEditor itself?

Or are you thinking of embedding a full blown UIEditor in the NodeEditor itself?

No no, just wondering about access to the nodule/widget/preset choices. Ok, so all inputs and outputs have both nodules and widgets at first.

Cool. Seems like we have a plan. I'm going to close this PR because it seems to have served its purpose. Feel free to continue to comment on it if you have other thoughts though.


Simplify flattening logic

This simplifies flattening logic for buffers and elements.  Now you can pass an arbitrarily deeply nested array into the buffer constructor and it should just work (tm).  This is nice when you are constructing a buffer from some arbitrary data source and avoids the hassle of concatenating arrays.
Fixes #248

This change is

lib/texture.js, line 784 [r2] (raw file):

        c = c || 1
      }
      var arrayShape = flattenUtils.shape(data)

but is the above if-else statement really necessary? You can do it in one line I think.  Because wouldn't just c be arrayShape[2], or something?

Comments from Reviewable

Reviewed 4 of 4 files at r1.
Review status: 3 of 5 files reviewed at latest revision, 2 unresolved discussions.

lib/texture.js, line 1277 [r2] (raw file):

      parseImage(imageData, image)
      imageData.width = imageData.width || ((texture.width >> level) - x)
      imageData.height = imageData.height || ((texture.height >> level) - x)

Err, shouldn't that 'x' be a 'y' here?

Comments from Reviewable

Review status: 3 of 5 files reviewed at latest revision, 2 unresolved discussions.

lib/texture.js, line 784 [r2] (raw file):
Previously, Erkaman (Eric Arnebäck) wrote…
> but is the above if-else statement really necessary? You can do it in one line I think.  Because wouldn't just c be `arrayShape[2]`, or something?

arrayShape might be 2D though.   This could be done using a ternary operator I guess, but doesn't matter much.

lib/texture.js, line 1277 [r2] (raw file):
Previously, Erkaman (Eric Arnebäck) wrote…
> Err, shouldn't that 'x' be a 'y' here?

good catch!

Comments from Reviewable

Review status: 3 of 5 files reviewed at latest revision, 2 unresolved discussions.

lib/texture.js, line 784 [r2] (raw file):
Previously, mikolalysenko (Mikola Lysenko) wrote…
> arrayShape might be 2D though.   This could be done using a ternary operator I guess, but doesn't matter much.

Done.

Comments from Reviewable

Reviewed 1 of 2 files at r2, 1 of 1 files at r3.
Review status: all files reviewed at latest revision, 2 unresolved discussions.

Comments from Reviewable

LGTM

Comments from Reviewable


Synapse managed private endpoint

https://learn.microsoft.com/en-us/azure/synapse-analytics/synapse-link/faq#can-i-select-managed-virtual-network-in-synapse-workspace-with-synapse-managed-private-endpoints-which-allow-the-link-connection-to-privately-connect-to-the-source-database-
Please confirm answer is correct.
My understanding is that running Azure Synapse Analytics in a managed virtual network isn't supported. Users need to check "Disable Managed virtual network" and "Allow connections from all IP addresses" when creating their workspace.
Ref:
https://learn.microsoft.com/en-us/azure/synapse-analytics/synapse-link/synapse-link-for-sql-known-issues?source=recommendations#azure-sql-db-and-sql-server-2022

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

ID: 7f1afa50-4e98-473c-8f97-48a6c2e76319
Version Independent ID: e4ed5993-8008-91a3-2aa9-2f75086db709
Content: FAQ - Azure Synapse Link for SQL - Azure Synapse Analytics
Content Source: articles/synapse-analytics/synapse-link/faq.yml
Service: synapse-analytics
Sub-service: synapse-link
GitHub Login: @dearandyxu
Microsoft Alias: yexu

@yang-jiayi
Thanks for your feedback! We will investigate and update as appropriate.

@Naveenommi-MSFT
Thanks for the confirmation. Looking forward to the fix.

@dearandyxu
Could you Please review, add your comments on this and update as appropriate.

Thanks for your dedication to our documentation. Unfortunately, at this time we have been unable to review your issue in a timely manner and we sincerely apologize for the delayed response. We are closing this issue for now, but if you feel that it's still a concern, please respond and let us know. If you determine another possible update to our documentation, please don't hesitate to reach out again. #please-close


Official build should produce both .NET Core and Full builds from a single definition

As a remnant of our multi-branch strategy, we have two separate build definitions that must both be run to produce a release that can be consumed into both the CLI and the VS repo. We have one branch now, and we should also have one build.

We've been inserting into VS and CLI from a single build def.


Add limited ordered list support to our markdown

Markdown has this cool ordered list feature where you can do this:
1. first item
1. second
1. third

And it'll auto-renumber them for you to 1/2/3.
We can't use existing markdown ordered lists implementations, because they will also turn a solo 2. into a 1., which really sucks if you're splitting a list across multiple messages.  But I think we could do something where if you do several of the same number, it does turn it into an ordered list, counting from that number.
https://zulip.readthedocs.io/en/latest/markdown.html is a helpful resource for anyone interested in working on this.

@zulipbot claim

I'm still working on this issue.


detect redefinition of table key

would be nice to detect if a key is defined more than once in a static table declaration
local colors = {
    RED = 1,
    BLUE = 2,
    YELLOW = 3,
    RED = 4,
}

in this case it would be good for it to detect that the key RED is redefined within the table declaration

This is detected since 0.14.0:
luacheck - <<< 'local colors = {
     RED = 1,
     BLUE = 2,
     YELLOW = 3,
     RED = 4,
 }'

Checking stdin                                    2 warnings
stdin:1:7: unused variable colors
stdin:2:6: value assigned to field RED is unused

Total: 2 warnings / 0 errors in 1 file

It's reported as an unused value of the first key rather than a redefinition because in general redefining keys with several assignments is fine as long as the value is used in between.

ah sorry i was just reading through the docs at the warning error codes. Looks like this is covered by W314 "Value of a field in a table literal is unused."?
I interpreted that as no one is accessing that value programatically, not that the value is replaced in the table literal definition

I interpreted that as no one is accessing that value programatically, not that the value is replaced in the table literal definition

Yes, the former is sort of subset of the latter. If generic unused field detection will ever be implemented (relatively difficult to do in a flow-sensitive way) it will use the same warning.


Rename Router.apply to Router.run

This is a small step towards cats.

I would vote for changing migrating from trait to final case class Router(run: Input => ...) so we could easily provide all the methods via type-classes from Cats.

This relates to #384.

That's not quite possible to do that while keeping lazines. We should probably use something different than "Magnet Patten". I recall @travisbrown had some ideas about that.

I'd like to us to keep Endpoint.apply in place and, instead, change the way Mapper works. My current thought is:

It should be defined outside of Endpoint as a syntax extension
It should be "enabled" explictly: import io.finch.syntax._


add continuous deployment with github actions

Just generate and add an NPM_TOKEN to the project settings.
When you run your npm run release task, a build will run and release to npm automatically.

Hey @antony - does this improve upon the existing release process at all?  Currently, when I run this task it publishes automatically via travis-ci.  I'm happy to experiment with github actions instead of travis ci but the main pain point with the current system is that a merged PR does not automatically publish a new version (a manual run of this script is required).

Ah yeah - I forgot that you had travis. It isn't really an improvement on that per-se. I was just conscious that you hadn't released after the last merge and I wondered if the process could be improved.
Feel free to close this if Travis is working for you - it's literally a 5 second copy paste job from other repos I have :)

Hey @antony - I've published a new version that incorporates your recent PR.  I appreciate seeing what CI with gitlab actions would look like.  I'll keep this open for now so I can keep improving the CI/CD of this package at top of mind.  Ideally, I'd like any commit to master to automate the tagging, changelog generation, and publishing of the module.

FYI github now supports manual workflows so you can automate the deploy workflow from master.
I would however strongly advise against automating tagging. I would suggest the flow I use which is npm version <increment> && git push --tags to trigger an automated tag build + release to npm instead.


Before I start killing switches and lights

I currently have 16 Tuya lights, dimmers and switches that I’m controlling via the Tuya API that I connected to Domoticz. The main reason for wanting to cut away from Tuya is to not have to rely on internet. When I’m done “cloud cutting” how would I control my devices? Will every device have the same API/webserver that I can connect to (with my browser at first) to switch devices on/off, set brightness levels and colors?

If you choose to just cut, you retain the stock firmware, but it's ability to connect to Tuya will be removed by changing their host to something that can never connect, and you would need to use either LocalTuya or TinyTuya along with the secrets provided by CloudCutter to control them locally.
If you choose to install 3rd party firmware, you are responsible for configuring the functionality with the firmware platform you choose.
https://github.com/tuya-cloudcutter/tuya-cloudcutter/wiki/FAQ#what-is-the-difference-between-cutting-and-flashing
https://github.com/tuya-cloudcutter/tuya-cloudcutter/wiki/FAQ#can-i-use-my-device-in-home-assistant-after-cutting-without-custom-firmware
https://github.com/tuya-cloudcutter/tuya-cloudcutter/wiki/FAQ#i-have-flashed-a-3rd-party-firmware-how-can-i-configure-my-device


Laravel 5.5

Coverage decreased (-0.7%) to 87.845% when pulling b456ba6a3e4056f4efe7490c92ada8a1c8548ee9 on laravel-5.5 into 91bbb8d73109584e0166df58a8e7621528e0660b on master.


What is the AP Password

Hi,
when I launch ./nm-wifi-webui.py --debug, a new wireless network appear.

When I select "PERSONAL-WLAN" I'm asked for a password

What is the password?
Thanks

Either:

a correlation
your wifi setup (I'd suspect NM or driver) is working weirdly and creating (maybe illusion of -) AP or adhoc network
wifi thing you're using in that screenshot misinterpreting management frames from STA as separate network

In any case, don't think anything this UI does can have much effect on that, beyond just waking up or maybe starting NetworkManager (if it auto-starts from dbus, which is unlikely).
From options above I'd think second one is more likely - maybe driver is configured to send adhoc frames and NM doesn't disable this when bringing interface up, or some other daemon running in parallel (e.g. hostapd), configuring same interface for different thing separately from NM.

Sorry but I don't understand.
What should happen ?
The name of AP Network (PERSONAL-WLAN) is correct ?
Is it just that you ask me for the password ?

I don't know what this PERSONAL-WLAN is, code in this repo does not create it and has nothing to do with it. Certainly doesn't ask for any password :)

What should happen ?

When you run script like you did - web server created on port 8080 (controlled by -p/--port option), where simple WebUI page like shown in the README is served to anyone connecting.
WebUI allows to control which wifi network NetworkManager connects to, enter password for it, enable/disable wifi interface, and shows some connection parameters.
That's it, it's not intended to create any AP, and should not configure NM to do so, does not have code for it.
The fact that you have one created when you start the WebUI is likely due to something else doing that once wifi interface gets enabled, as I've mentioned in the first comment above.

I understand!
Thank you


Configure basic Sphinx/travis stuff

My plan is to have Sphinx documentation that makes understanding what the repository contains a little easier, but still have all the configuration snippets in separate files (which Sphinx pulls in) so they are also easy to consume in automation/copy-paste.

On 14/03/17 13:19, josvazg wrote:

Not very familiar with Sphinx, so I just have some doubts:
To make this work (generate an HTML site) I had to:
$ mkvirtualenv somename
(somename) $ pip install sphinx
(somename) $ make html

pip install -r requirements.txt would be better, but this is broadly
correct.

Shouldn't we have that in the Readme?
Or are we going to auto generate the site somehow on a later commit?

This is how Sphinx works in its default configuration[0], so I would
expect people to either know that, or be able to work that out (as you
did) without a README guide.  If we diverge from standard Sphinx
behaviour, then I'd be happy to consider it.  (I'm a little more
resistant than I might otherwise be, because the target audience for
this repo is not the developers of the repo, but our partners.)
I expect we will start auto-generating the site, but that is really
orthogonal; people will still want to test their changes locally.
[0] http://www.sphinx-doc.org/en/stable/tutorial.html#running-the-build


xds-k8s kokoro buildscripts: exclude from tests suites

Do not run expensive and time-consuming Portability Tests when changing xds-k8s kokoro buildscripts themselves. There's no benefit from running them.
Ideally, we should execute xds-k8s themselves when this is changes. We can implement this once xds-k8s driver supports multiple concurrent runs per project.
Similar to xds-k8s test driver.

@sanjaypujare FYI


"Drăghescu", "Putina" are listed in the drop-down menu

Description:
When user writes "Drăghescu" and "Putina" the locations appear in the drop-down menu next to the comune and the county witch is a part according to the law
Precondition:
The website is up an running.

Step 1
Write in the search bar "Drăghescu"

Expected results
The location appears in the drop-down menu as "Sat Drăghescu, ARGEȘ (Vlădești)"

Step 2
Press "x" button.

Expected results
The location was deleted from the search bar.

Step 3
Write in the search bar "Putina"

Expected results
The location appears in the drop-down menu as "Sat Putina, ARGEȘ (Vlădești)"


Option to use CF + Modrinth/Github for packwiz

Related to #2 but basically when packwiz will support the new Curseforge API, the Modrinth/Github search method should be used to "fill the gaps", aka try to find the mods that do not allow downloads via the Curseforge API. If not found, fall back to giving the CF ID so that packwiz will prompt the user for manual download.

So, just make CF preferred for packwiz?

try to find the mods that do not allow downloads via the Curseforge API.

What do you mean? That new allowModDistribution key?

Yes.
The idea is that most mods are more updated on Curseforge, so it should still be preferred, but mods that cannot be conveniently downloaded from there will use a different source.

I changed priority, but packwiz doesn't support "giving CF ID to prompt manual download" yet.


Fuzzy field-based search with multiple terms

Reading through the docs and the source code it seems like you can specify which fields you can search a specific term for, so you can issue a query like:
{
    "query": [
         {"term": {"ctx": "Harry Potter", "fields": ["role"]}, "occur": "must"},
         {"term": {"ctx": "Daniel Radcliffe", "fields": ["actor"]}, "occur": "must"}
     ]
}

It would be really neat if it were possible to do the same for fuzzy queries so that something like this would be possible:
{
   "query": [
        {"fuzzy": {"ctx": "Barry Potter", "fields": ["role"]}, "occur": "must"},
        {"fuzzy": {"ctx": "Daniel Radclif", "fields": ["actor"]}, "occur": "must"}
    ]
}

To put this in a little more perspective in terms of a use case, suppose documents of movies, actors, and roles. I might have heard that the lead character of a movie is called Harry Potter but have no idea what movie this character belongs in, but I do want to know who the actor is.
If I were to create an index with the fuzzy method, I could create an index across all 3 fields, but when I search for Harry Potter I will get a bunch of results of actors on account of the movie being called Harry potter and the ...
Alternatively I could create separate indexes for each of these and search the individual index, but then I run into the problem that once I do have more information (like say movie name or actor name), I would have to compute a likelihood score myself from results of searching multiple indexes.

This is a good idea, I'll probably mark this as something to target for 0.10 as I want to stabilize stuff for the 0.9 release.
I plan on making the query system a bit more configurable and more intuitive but right now the current query system makes it a little bit limiting to do without creating a mess in the code base.

I forgot to close this when merging the PR, but this has been added to master now 👍


Migrate camel source to genreconciler, drop reconciler.Base

Proposed Changes

Migrate camel source to genreconciler
drop reconciler.Base

Release Note

Camel-k source is no longer using Controller Runtime.

/retest

/lgtm


Silently change toggle value

Is there anyway to programmatically update the toggle using bootstrapToggle("on")/bootstrapToggle("off") and not have it trigger the 'change' event on the checkbox?
I see in-code there is a 'silent' that determines if 'trigger()' should be called, but I'm not sure how to utilise it.
Basically I display a bootstrap modal window, the window has a series of toggles on it, on the 'show.bs.modal' event I make an AJAX request to find out what states they should be set to and then utilise one of the 2 above bootstrapToggle functions, however I don't want it to trigger the change event in that instance, only if a person physically changes the toggle.

Ahh, after much searching have found an issue that asked this exact question, issue #31, don't suppose there is an easier way than having to do this?

+1


NTR: tachykinin maturation

Hi,
Would you consider adding please:
GO:NEW tachykinin maturation
Is_a GO:0061837 neuropeptide processing
“The process leading to the attainment of the full functional capacity of tachykinin by post-translational proteolytic processing of its neuropeptide precursor.”
PMID:2422168
https://en.wikipedia.org/wiki/Tachykinin_peptides
Synonyms (all exact I think): tachykinin processing, tachykinin biosynthesis, tachykinin peptide maturation, tachykinin peptide processing
GO already has other tachykinin-related terms, as well as ‘maturation’ terms (see e.g. children of ‘peptide hormone processing‘. Thanks.

Hi @paolaroncaglia
Is this a specific process ? A more recent paper, PMID:33382413, starts with "The kexin-like proprotein convertases perform the initial proteolytic cleavages that ultimately generate a variety of different mature peptide and proteins, ranging from brain neuropeptides, to endocrine peptide hormones, to structural proteins, among others."
So, it doesn't seem like this is a specific process ? We would recommend using GO:0061837 neuropeptide processing and an extension for tachykinin CHEBI:140482 ?
Thanks, Pascale

Hi @pgaudet ,
Thanks. My request stemmed from text search, not from annotation needs. The older paper I was looking at, and the precedents of other "maturation" terms in GO, led me to think that the request may be in scope for GO. No problem then - feel free to close this ticket.
Best,
Paola

Thanks for your reply @paolaroncaglia


http:// images in code samples

Summary
On https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout/Auto-placement_in_CSS_Grid_Layout images such as http://placehold.it/200x300 are used making the page look insecure

Steps To Reproduce (STR)

Go to https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout/Auto-placement_in_CSS_Grid_Layout
Look at Network panel in devtools

Actual behavior
http://placehold.it/200x300 loaded inside the iframe.
Expected behavior
httpS://placehold.it/200x300 loaded inside the iframe.
Additional context
https://placehold.it/200x300 is a perfectly working URL.

Done w/ https://wiki.developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout/Auto-placement_in_CSS_Grid_Layout$compare?locale=en-US&to=1595089&from=1545965


Enhanced the ui of terms and condition page

issue title :  Term and condition page enhancement
issue #231

✅ Checklist
Before submitting the PR, please make sure you have completed the following:

[ X] My code follows the style guidelines of this project.
[X ] I have performed a self-review of my own code.
[X ] I have commented my code, particularly in hard-to-understand areas.
[X ] I have made corresponding changes to the documentation (if applicable).
[X ] My changes generate no new warnings.
[X ] I have tested it locally and it works fine.
[X ] Any dependent changes have been merged and published in downstream modules.

🏷 Types of Changes
What type of changes does your code introduce? (Check all that apply)

[ ] Bug fix (non-breaking change which fixes an issue) 🐛
[ ] New feature (non-breaking change which adds functionality) ✨
[ X] UI enhancement (non-breaking change which enhances UI) 🎨
[ ] Documentation update 📚

🤝 Related Issues

Fixes #231

Thank you for contributing to Truth-Tunnel! We look forward to reviewing your PR and getting it merged!

when i click on terms and condition link this gives me this

and these are server logs

'


Change array inputs that are specified as single number to single value array inputs in ssc precheck

Per 10/25/2022 meeting and SAM issue https://github.com/NREL/SAM/issues/1038
Change all ssc array inputs that are passed into ssc as single number to a single value array and log message.

In addition to the SSC changes proposed here, we will need to update PySAM, the function here fails when provided a number https://github.com/NREL/pysam/blob/master/files/PySSC.py#L70
Generally all of these functions could use a try-except which gives the name of the variable when there is an error, but that's a separate issue.


PrayerAction- added Ensouled Hellhound Head

Ensouled Hellhound Head added to the Prayer Action Skill Calculator
fixes #15261

Added in #15064


How to get query_hash?

I would like to get query hash, any helpful info for me, thanks.

Hi! Here you have the specification: /docs/setup.md#how-to-get-your-query-hash-old-query-id
Into the docs/ directory you will see some examples and specifications of the library.

@alexhoma Thanks for your replay, I read the docs, but I want to generate query hash by myself.
Instagram how to generate "42323d64886122307be10013ad2dcc44"?

@alexhoma  query_hash does not change forever?

what is the point of query_hash? I would expect it would be a way from instagram to confirm the query is coming from an informed sender. But if the hash is consistent, (i.e. doesn't have a parameter like time of day) then what is the point?

I would expect it would be a way from instagram to confirm the query is coming from an informed sender.
It is not, it's just a way for them to cache the query params so that they can store and return the response faster.
Read more here: https://stackoverflow.com/questions/54238696/what-is-query-hash-in-instagram

Hi @hexadeciman. I don't think the answer in the Stack Overflow thread is correct as the query_hash is always the same for every request but the query params are differents everytime.

I just checked and it is different for every query

Hmm, weird.
For example, I'm loading @mileycyrus and @instagram.
First request for both accounts has the following query hashes (the same):
Miley: aec5501414615eca36a9acf075655b1e
Instagram: aec5501414615eca36a9acf075655b1e

In successive requests, for pagination, again the same:
Miley: query_hash: f2405b236d85e8296cf30347c9f08c2a
Instagram: query_hash: f2405b236d85e8296cf30347c9f08c2a

Also, they send all the data instead of first the query_hash. So this defeats the concept of the automated persisted queries

Hello, @Kingson, query hash you can find in browser dev tools (https://github.com/mineur/instagram-parser/blob/master/docs/setup.md#how-to-get-your-query-hash-old-query-id) and then in neighbor tab JS you can find it in one many loaded JS files, by Ctrl + F. Then before each request you can get content of this JS file from the link in html and parse generated query hash by regex.

Need help for stories?how can i get stories now?

Does the query hash ever expire? or does it have a query limit?

Hello,
So there is no way to automatically get the query hash ?

query_hash hardcoded in one of *.js files on instagram. If u want to get hash, u should parse js files.

Yes, I actually found out. Thanks !

Yes, I actually found out. Thanks !

how?? plzz help... I am stuck in a long time active project...plz help as soon as possble...thanku

Have a look at this.

I did not understand...
and i have to do it in python...please guide..plz

Have a look at this.
i have to learn to create a query to get followers from end_cursor value that we get in the first and the following page
plz help me out

@meshchaninov thanks, really it is in the static JS files.
Exactly the path: /static/bundles/metro/ConsumerLibCommons.js/gEnErTeD_sTr.js

@meshchaninov谢谢，真的是在静态 JS 文件中。 具体路径：/static/bundles/metro/ConsumerLibCommons.js/gEnEraTeD_sTr.js

i do not kown why my queryId as same as yourself ! but the  name of  the .js filepath was different, and i can not access your .js filepath url

hash_query does not hash the variables or the parameters, it hashes the path.
Lets say your actual path is /graphql and your payload is
{
    user: {
        profile: [username, user_id, profile_picture],
        feed: {
            posts: {
                data: [image_url],
                page_size: "{{variables.max_count}}"
            }
        }
    }
}

Then this graphql payload will be hashed and it becomes d4d88dc1500312af6f937f7b804c68c3. Now instead of doing that on /graphql you do /graphql?query_hash=d4d88dc1500312af6f937f7b804c68c3. This way you hashed the payload, as in you hashed the "keys" that are required from the graphql. So when you pass variables as a param then the payload does not actually change, because the variables are constant as well, and you are changing them on the backend, and not in the payload.

Any thoughts how to get query hash now days? Seems it changed and we can't get it in same way anymore

you know what i am add this query_hash = "d4d88dc1500312af6f937f7b804c68c3" but not get data in Instagram reels
add this values
$variables = '{"child_comment_count":3,"fetch_comment_count":40,"has_threaded_comments":true,"parent_comment_count":24,"shortcode":"' . $reelId . '"}';
can you help how to get a query_hash value


Compilation error with Fragment parent

Hello,
I followed this example : https://github.com/soundcloud/lightcycle/blob/master/lightcycle-lib/src/main/java/com/soundcloud/lightcycle/LightCycleSupportFragment.java
to build my parent class wich will be inherited by all fragments :
public abstract class M360LightCycleSupportFragment<FragmentType extends M360Fragment> extends M360Fragment implements LightCycleDispatcher<SupportFragmentLightCycle<FragmentType>> {

    private final SupportFragmentLightCycleDispatcher<FragmentType> lifeCycleDispatcher;
    private boolean bound;

    public M360LightCycleSupportFragment() {
        lifeCycleDispatcher = new SupportFragmentLightCycleDispatcher<>();
    }

    @Override
    public void bind(SupportFragmentLightCycle<FragmentType> lifeCycleComponent) {
        Preconditions.checkBindingTarget(lifeCycleComponent);
        lifeCycleDispatcher.bind(lifeCycleComponent);
    }

    @Override
    public void onAttach(Activity activity) {
        super.onAttach(activity);
        bindIfNecessary();
        lifeCycleDispatcher.onAttach(fragment(), activity);
    }

    private void bindIfNecessary() {
        if (!bound) {
            LightCycles.bind(this);
            bound = true;
        }
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        lifeCycleDispatcher.onCreate(fragment(), savedInstanceState);
    }

    @Override
    public void onViewCreated(View view, Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        lifeCycleDispatcher.onViewCreated(fragment(), view, savedInstanceState);
    }

    @Override
    public void onActivityCreated(Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        lifeCycleDispatcher.onActivityCreated(fragment(), savedInstanceState);
    }

    @Override
    public void onStart() {
        super.onStart();
        lifeCycleDispatcher.onStart(fragment());
    }

    @Override
    public void onResume() {
        super.onResume();
        lifeCycleDispatcher.onResume(fragment());
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        return lifeCycleDispatcher.onOptionsItemSelected(fragment(), item);
    }

    @Override
    public void onPause() {
        lifeCycleDispatcher.onPause(fragment());
        super.onPause();
    }

    @Override
    public void onStop() {
        lifeCycleDispatcher.onStop(fragment());
        super.onStop();
    }

    @Override
    public void onSaveInstanceState(Bundle outState) {
        lifeCycleDispatcher.onSaveInstanceState(fragment(), outState);
        super.onSaveInstanceState(outState);
    }

    @Override
    public void onDestroyView() {
        lifeCycleDispatcher.onDestroyView(fragment());
        super.onDestroyView();
    }

    @Override
    public void onDestroy() {
        lifeCycleDispatcher.onDestroy(fragment());
        super.onDestroy();
    }

    @Override
    public void onDetach() {
        lifeCycleDispatcher.onDetach(fragment());
        super.onDetach();
    }

    @SuppressWarnings("unchecked")
    private FragmentType fragment() {
        return (FragmentType) this;
    }
}

Then my Fragment :
public class ProgramDetailsFragment extends M360LightCycleSupportFragment<ProgramDetailsFragment> {

    @LightCycle
    final ProgramPresenter programPresenter = new ProgramPresenter();

 [...]

my Controller :
public class ProgramPresenter extends DefaultSupportFragmentLightCycle<ProgramDetailsFragment> {

    private static final String TAG = "ProgramPresenter";

    @Override
    public void onAttach(ProgramDetailsFragment fragment, Activity activity) {
        Log.i(TAG, "onAttach");
        super.onAttach(fragment, activity);
    }

[...]

when I extends this class in my code I obtain the following error at compilation :
Error:(5, 63) error: cannot find symbol class FragmentType
Is there something I didn't understand ? It feels like it won't be possible
A gist of a working 'parent fragment dispatcher' - 'inherited fragment' - 'controller' would be the perfect resource for me, maybe it already exists.
Thank you all,

Hello,
Looks like I had to add implements LightCycleDispatcher<SupportFragmentLightCycle<ProgramDetailsFragment>> to my child fragment :
public class ProgramDetailsFragment extends M360LightCycleSupportFragment<ProgramDetailsFragment> implements LightCycleDispatcher<SupportFragmentLightCycle<ProgramDetailsFragment>> {

    @LightCycle
    final ProgramPresenter programPresenter = new ProgramPresenter();

 [...]

I think it's what you were refering in the doc :

Implement the LightCycleDispatcher interface. Note: The processor needs to know the exact type being dispatched, so if your base activity is templated then the activities inheriting from it must explicitly implements LightCycleDispatcher<ActivityLightCycle> (for more details, refer to https://github.com/soundcloud/lightcycle/issues/49)

@renaudfavier Yes unfortunately it's one of the current processor limitation and we're trying to fix it in the next 2.0 release!
As you already noticed you need to add
implements LightCycleDispatcher<SupportFragmentLightCycle<ProgramDetailsFragment>>
So the processor can know what type will be dispatched. Currently the processor only recognize these types


consider to support multiCapabilities

Please consider to support multiCapabilities, thanks

@josephlaw ,
Can you explain what the problem and or question is exactly? I'm using PixDiff with multiple browsers and it works fine on my local machine and from Jenkins.

sorry, i make mistake myself. pix-diff support multiCapabilities. thanks.

@josephlaw, no probs
@koola , can you close this issue? Or give me te rights to do it in the future?


Fixed Issue: Save/Load the Profile Image

Used multer middleware to set up a file upload/access system. Now, User profile images set to the image they registered with.

PS: Most of my changes on the Register.js file seem to be indentation changes (I have an extension that may have autoformatted the document to look cleaner).

Okay @ArcaneWizard thanks man 😃


Variable first payment amount

Is there a way we could change the first payment amount when we start a subscription with a trial (mandate upfront)?
I know there were some open issues about this in the V1 repo, but I couldn't really find any documentation about this, or an example on how to use the FirstPaymentBuilder manually.

Hi!
Let me try to understand your use case. With mandate upfront, do you mean you already have a mandate for the billable model?

Hi :)
No, not really. I was referencing the documentation.
It's the first payment (that starts the trial) that we would want to be variable.

It's possible to override the first payment amount per plan in the plan config. Would that help you?

@sandervanhooft Thank you, for this use case the first payment per plan in the config worked fine :) I've just created a couple of extra plans.

Great, enjoy!


MNT: Re-rendered with conda-smithy 3.1.12 and pinning 2018.10.11

R 3.5.1

Checklist

[x] Used a fork of the feedstock to propose changes
[ ] Bumped the build number (if the version is unchanged)
[ ] Reset the build number to 0 (if the version changed)
[x] Re-rendered with the latest conda-smithy
[ ] Ensured the license file is being packaged.

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

Travis build is at https://travis-ci.org/conda-forge/r-demerelate-feedstock/builds/442210956 (not linked above for some reason).


[efr32] disable OT software CSMA backoff and energy scan

Closes #5684
CC: @romacdon

@jwhui - something is up with this PR.  I reviewed this PR and approved it several times but it still seems like is expecting a review. Am I interpreting "At least 1 approving review is required to merge this pull request" correctly?  Maybe that just means you.

@jwhui - something is up with this PR. I reviewed this PR and approved it several times but it still seems like it is still expecting a review. Am I interpreting "At least 1 approving review is required to merge this pull request" correctly? Maybe that just means you.

@romacdon , it's all good - it means someone with GitHub Write permissions on this repo must approve before merging. Thanks for your continued reviews and contributions!


Add @ JsonCreator to Partition class construtor to be able to parse it using jackson deserializer

Add @ JsonCreator to Partition class construtor to be able to parse it using jackson deserializer

:+1:


[WIP] add initial dockerfile for building tb3 packages

Signed-off-by: Mikael Arguedas<EMAIL_ADDRESS>

@mikaelarguedas ros-planning/navigation2#860 has been merged

Great! thanks @crdelsey for the update!

Note to self about current status:
Currently released version of navigation (0.2.2) does not work for the demo because of map issues.
Release candidate 0.2.3 seems to fix the issue.
With the repos listed in this PR as of https://github.com/mikaelarguedas/tb3_demo/pull/1/commits/56711e0752276204ad43e58f4fde9a4a00341993 allow to run the turtlebot3 demo using Gazebo and the navigation stack (without SROS2).
Currently unable to get the demo working with SROS2.
https://github.com/mikaelarguedas/tb3_demo/pull/1/commits/d11964b1b19439f8ced5224701b994db5cac967b adds a policy file with most of the policies necessary to get it to launch without issue. A couple of wildcards have been put as I haven't been able to figure out yet the missing permissions for amcl / amcl_rclcpp_node
Even using wildcards for all nodes / all topics / all services, the demo doesn't work as amcl never receives the map when running with security. Need to check if it's related to QoS or the overhead of adding security on top of a pretty heavy system.

Failure was due to temporary nodes created by the nav stack. Took a bit of time to track them down but here is the list of nodes that need to be allowed on the network for the demo to run:
/_client_node
/_ros2cli  # this one is for my debugging and not required
/amcl
/amcl_rclcpp_node
/bt_navigator
/bt_navigator_client_node
/bt_navigator_global_localization_client
/bt_navigator_rclcpp_node
/dwb_controller
/dwb_controller_rclcpp_node
/gazebo
/global_costmap
/global_costmap/global_costmap
/global_costmap/global_costmap_rclcpp_node
/global_costmap_client
/global_localization
/launch_ros
/lifecycle_manager
/lifecycle_managerservice_client
/local_costmap
/local_costmap/local_costmap
/local_costmap/local_costmap_rclcpp_node
/local_costmap_client
/map_server
/navfn_planner
/navfn_planner_GetCostmap_client
/navfn_planner_GetRobotPose_client
/navfn_planner_rclcpp_node
/navigation_dialog_action_client
/recoveries
/recovery_GetRobotPose_client
/robot_state_publisher
/rviz2
/transform_listener_impl
/turtlebot3_diff_drive
/turtlebot3_imu
/turtlebot3_joint_state
/turtlebot3_laserscan
/world_model

I used this command to create them with wildcards:
ros2 security generate_artifacts -k keystore -n /lifecycle_manager /navigation_dialog_action_client /navfn_planner_rclcpp_node /navfn_planner /global_costmap_client /gazebo /lifecycle_managerservice_client /dwb_controller_rclcpp_node /recovery_GetRobotPose_client /launch_ros /dwb_controller /turtlebot3_diff_drive /amcl_rclcpp_node /bt_navigator_rclcpp_node /robot_state_publisher /global_costmap /global_costmap/global_costmap_rclcpp_node /global_costmap/global_costmap /turtlebot3_laserscan /bt_navigator /map_server /world_model /local_costmap_client /transform_listener_impl /local_costmap /local_costmap/local_costmap_rclcpp_node /local_costmap/local_costmap /navfn_planner_GetRobotPose_client /recoveries /navfn_planner_GetCostmap_client /amcl /rviz2 /turtlebot3_imu /_ros2cli /turtlebot3_joint_state /bt_navigator_client_node /_client_node /global_localization /bt_navigator_global_localization_client

As @ruffsl was able to reproduce this demo with encryption enabled, I will merge this first version.
Improvements to the policy files and documentation will be done in follow-up PRs
FYI @thomas-moulard  @olaldiko


Enable automatic compaction of key revisions in ETCD

Description
Currently, etcd is storing all key history and the database can grow indefinitely. To avoid this:

Revision auto compaction shall be enabled for etcd pods
Defragmentation shall be done on a scheduled basis

Additional Context
No response
Logs
No response
Expected Behavior
Only latest key revisions shall be stored.
Steps To Reproduce
No response
The version of this project/repo, if applicable
main
The version/edition of the Eiffel Protocol used, if applicable
latest

Released in ETOS 6.6.2.


Added NPQ test functions

@callumrollo

Very true with the function starting with test, my bad. Changed now


Docs inaccurate for overriding user auth with AuthMethods.Password

The user authentication doc uses the wrong signature for overriding authentication with AuthMethods.Password. The correct signature is the one here:
// Email and password
af.auth.login(
{
  email<EMAIL_ADDRESS>  password: 'password'
},
{
  provider: AuthProviders.Password,
  method: AuthMethods.Password,
})

The docs use this:
// Email and password
af.auth.login({
  provider: AuthProviders.Password,
  method: AuthMethods.Password,
})

which throws Error: Uncaught (in promise): You must include credentials to use this auth method.

@buoyad Can you provide a plnkr?

Yep, here. Is the behavior in the doc even desirable for overriding auth in this case? Shouldn't credentials always be supplied for AuthMethod.Password?

Excuse me buoyad  I get :
 EXCEPTION: Error: Uncaught (in promise): Error: There is no user record corresponding to this identifier. The user may have been deleted.
when I call this function:
  // Email and password
  emailLogin2() {
    this.af.auth.login(
      {
        email<EMAIL_ADDRESS>        password: 'password'
      },
      {
        provider: AuthProviders.Password,
        method: AuthMethods.Password,
      })
  }

¿How you implement the loggin? Thanks

@buoyad @GerardoLSJ
You need to properly configure in the bootstrap phase. Your app specifies Anonymous and then later tries to override using Password, without providing any credentials to the login() method.
Instead,  pass creds to auth.login(), and there's no need to wrap the call in a promise because it returns a promise.
  login(email: string, password: string): Promise<any> {
    var creds: any = {email: email, password: password};
     return this.auth.login(creds, {
          method: AuthMethods.Password,
          provider: AuthProviders.Password
        });
  }

@davideast
I know that, I have no issue with signing in using AuthMethods.Password. This issue is about correcting the user authentication documentation, which attempts to override without passing credentials, code I've seen people try to run and get errors.
@GerardoLSJ
It looks like your firebase instance doesn't have a user record that matches the information you're trying to log in with. Did you first create a user by using signup?

@buoyad Yes thanks, I thought that if the user doesn't exist it automatically creates it


Could this regex be changed to pass theme check ?

Our theme is failing WordPress theme check because of this regex
https://github.com/erusev/parsedown/blob/master/Parsedown.php#L772
theme check dev suggested this change
https://github.com/WordPress/theme-check/issues/64
do you think that change is ok and if yes could you make the change in the class itself?
We can change it but we might forget it on future parsedown updates.

The change would be fine in terms of it being functionally the same, though this strikes me as more of a bug in Theme Check than Parsedown? As in, the contents of a string should be able to contain PHP language constructs without being interpreted as a literal language construct.
Looks like that issue was raised almost 2 years ago now, might be worth raising the issue again and seeing if they're more receptive to fixing? (I mention fixing it there, as I'd guess that this going unfixed will likely cause issues other than this particular one).

strikes me as more of a bug in Theme Check than Parsedow

I agree , Il try again with them but I doubt they will change it since their  check looks for shortcode instances so seems like they would need to more changes, and in parsedown the change is very minor. Will close for now.

Asked there lets see what we get. https://github.com/WordPress/theme-check/issues/186
It would be great  if either one of you would make the change.


NIX_CXXSTDLIB_COMPILE missing in stdenv

Describe the bug
stdenv environments do not contain NIX_CXXSTDLIB_COMPILE  variable unlike NIX_CFLAGS_COMPILE. Having this variable would be useful for say, having clangd see LLVM's libcxx which is not present under include/ but include/c++/v1. cc-wrapper already adds this under NIX_CXXSTDLIB_COMPILE@saltSuffix@ in add-flags.sh so adding this in setup-hook.sh shouldn't be a huge issue but doing this the straightforward way would cause entire nixpkgs to be rebuilt from what I understand. Please correct me if I am wrong or missing something.
@Artturin @Ericson2314 @Mic92
Do you have any insights on this?
Note that my specific case can be solved by just adding the path by myself in a shellHook or something but I am not sure if there can be a more elegant approach.

Now that I see more, setup-hook.sh seems to be independently setting NIX_CFLAGS_COMPILE. I am not sure how we can add libcxx here

I recently also learned that clangd is leaked unwrapped in the clang package.
Does the wrapper for clangd in clang-tools work for you?
$ cat /nix/store/f6ksjvjcxi039yf62109h5xg91ybxbg6-clang-tools-14.0.6/bin/clangd
#!/nix/store/vqvj60h076bhqj6977caz0pfxs6543nb-bash-5.2-p15/bin/sh

buildcpath() {
  local path after
  while (( $# )); do
    case $1 in
        -isystem)
            shift
            path=$path${path:+':'}$1
            ;;
        -idirafter)
            shift
            after=$after${after:+':'}$1
            ;;
    esac
    shift
  done
  echo $path${after:+':'}$after
}

export CPATH=${CPATH}${CPATH:+':'}$(buildcpath ${NIX_CFLAGS_COMPILE} \
                                               $(</nix/store/3dbhq59c8xpkhsypksmcd2ras9ydpj0p-clang-wrapper-14.0.6/nix-support/libc-cflags)):/nix/store/3dbhq59c8xpkhsypksmcd2ras9ydpj0p-clang-wrapper-14.0.6/resource-root/include
export CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH}${CPLUS_INCLUDE_PATH:+':'}$(buildcpath ${NIX_CFLAGS_COMPILE} \
                                                                                $(</nix/store/3dbhq59c8xpkhsypksmcd2ras9ydpj0p-clang-wrapper-14.0.6/nix-support/libcxx-cxxflags) \
                                                                                $(</nix/store/3dbhq59c8xpkhsypksmcd2ras9ydpj0p-clang-wrapper-14.0.6/nix-support/libc-cflags)):/nix/store/3dbhq59c8xpkhsypksmcd2ras9ydpj0p-clang-wrapper-14.0.6/resource-root/include

This also takes care of c++ stdlib headers.

OH, I completely overlooked where you add flags from libcxx-cxxflags. So, yes, the issue I originally addressed is resolved. But the problems remains with clangd since we use llvmPackages.clang and not llvmPackages.libcxxClang. Using the latter solves the issue. At least the problem is now much more simpler. Will create a separate issue for this, apologies to everyone.

https://github.com/NixOS/nixpkgs/pull/257060


Fixes #4589 :- The empty screen while no images found in custom picture selector

The empty screen while no images found in custom picture selector #4589 is fixed now

Just tested it and it works. But I don't think this is the best way to handle such exceptions. It would be better if the logic is added in folder and image fragments. There is a handleResult function in both fragments which could be all you need.
Let me know if you think otherwise.

@Rishavgupta12345

Just tested it and it works. But I don't think this is the best way to handle such exceptions. It would be better if the logic is added in folder and image fragments. There is a handleResult function in both fragments which could be all you need.
Let me know if you think otherwise.

@Rishavgupta12345

@4D17Y4 @nicolas-raoul  done in a simpler way as you have said me to do, also the localization issue is also solved, and according to me this is the best possible version of this code

a problem occured in this brach so I am closing this pull request and creating a fresh one , Sorry for the Inconvenience


list (keys) method

We have no way of enumerating what is in the DB

MPS3 should be a better S3 client, so we need to fill in missing features like prefix querying.


08/19/2018 17:45 : Create Pull Request for branch master -> prTesting1_2018081917

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

split/updateTestRef1.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Add BKD/Blue kerbin dynamics Mk1 Fuel Tanks Plus from SpaceDock

This pull request was automatically generated by SpaceDock on behalf of jebheadmugkerman, to add BKD/Blue kerbin dynamics Mk1 Fuel Tanks Plus to CKAN.
Mod details:
name = /mod/909/BKD/Blue%20kerbin%20dynamics%20Mk1%20Fuel%20Tanks%20Plus
author = jebheadmugkerman
abstract = This mod adds some more mk1 fuel tanks MORE!
license = MIT
Homepage = On the forum
description = This is your mod listing! You can edit it as much as you like before you make it public.
To edit this text, you can click on the "Edit this Mod" button up there.
By the way, you have a lot of flexibility here. You can embed YouTube videos or screenshots. Be creative.
You can check out the SpaceDock markdown documentation for tips.
Thanks for hosting your mod on SpaceDock!
Please direct questions about this pull request to jebheadmugkerman.

This mod is not packaged correctly, I've asked the author to update it


Make configurable cluster_nodes and bind_addr

It would be useful
Used in https://github.com/brianshumate/ansible-consul/blob/master/templates/bootstrap_config.json.j2

Terribly sorry, I was not watching this project.
I'll have a look soon and see about getting those as configurable options.
Thanks for the feedback!


Spelling error in documentation - "Communitity"

You have a spelling error in your documentation here
In "First Steps" section
"Communitity - Connect with the VS Code community and check out other ways to learn VS Code."
// Community is not spelled correctly
Hope this helps!

Fixed. Thanks for spotting this!
cc @waderyan


Support for preload, prefetch,  & preconnect attributes for peformance

Hi! I love your package and have seen my build times drastically reduce. I was wondering if there's support for the preload . and prefetch attributes that help with  performance.

I think that it is a very good idea to put preload attribute in consideration of performance.
As I think it is important to keep in mind that it is important to be aware of performance, I will make a PR soon so that this can also function as the same option :)

@shirotech plz, close this issue.

As suggested by @konojunya I will be closing this issue, unless otherwise I'm happy to re-open.


feat: automatically set current screen

Is your feature request related to a problem? Please describe:
Not a problem but a nice to have add-on that would automatically set the screenName according to route path or name
Describe the solution you'd like:
 ionViewDidEnter() {
    FirebaseAnalytics.setCurrentScreen({
      screenName: 'FirebaseAnalyticsPage',
    });
 }

Instead of calling the above snippet on every page, we could call something like FirebaseAnalytics.trackPage({route: 'path'| 'name'}) on app load

I think this is out-of-scope of this plugin. If I understand your proposal correctly, then it also depends on which framework you use. The Angular router works differently than the VueJs router etc. And these should trigger the event in case of navigation.
For this reason, I am closing this issue.
Please let me know if I missed something.
If you listen to the router events in a service, then you usually don't need the code on each page but only in the service. You could define the method options via route parameters or a predefined hash map etc.


Add description for default_transformers attribute

taken from https://github.com/mila-udem/summerschool2015/blob/master/fuel_tutorial/fuel_tutorial.ipynb

Looks good, thanks!


Fixed typo, Azurite -> Azure

@MortyN : Thanks for your contribution! The author(s) have been notified to review your proposed change.


The output buffer is incomplete

Hi joonty,
I used your plugin but unfortunately I noticed that the output in the buffer DoProcess doesn't contain the complete output of the command.
I created a simple directory with 10 files (file1.txt to file10.txt) and ran in vim:
:Do ls

Here is what I get in the buffer DoProcess
======================
 [command] ls
  [status] exited <0>
    [time] 531.0ms
     [pid] 12259
======================
file1.txt

which obviously is not what I expect. Actually the result varies. Indeed if I run the same command I get:
======================
 [command] ls
  [status] exited <0>
    [time] 531.0ms
     [pid] 12403
======================
file1.txt
file10.txt

which makes me think that this issue is related to the thread. It may not run until the process finishes.
Just for information, I use:

Python 2.7.10
Vim 7.4.488

I'm also experiencing this with Vim 7.3, so it is probably in the Python code.

Fixed it, I think. Will upload later.


jib-maven-plugin does not offer a help goal

Environment:

Jib version: 2.7.1
Build tool: Maven
OS: N/A

Description of the issue:
Invoking mvn jib:help results in error
[ERROR] Could not find goal 'help' in plugin com.google.cloud.tools:jib-maven-plugin:2.7.1 among available goals _skaffold-fail-if-jib-out-of-date, _skaffold-files-v2, _skaffold-init, _skaffold-package-goals, _skaffold-sync-map, build, buildTar, dockerBuild -> [Help 1]

Expected behavior:
Printable information on all available goals provided by the jib plugin.
Steps to reproduce:

create a micronaut application using the command line tool
mn create-function-app myfunction --features oracle-function --build=maven --lang-java

jib-maven-plugin Configuration:
      <plugin>
        <groupId>com.google.cloud.tools</groupId>
        <artifactId>jib-maven-plugin</artifactId>
        <configuration>
          <to>
            <image>${jib.docker.image}:${jib.docker.tag}</image>
          </to>
          <container>
            <args>${exec.mainClass}::handleRequest</args>
            <mainClass>${exec.mainClass}</mainClass>
          </container>
        </configuration>
      </plugin>

Log output:
It's customary (but not mandated) to provide a help goal when writing Maven plugins.

@aalmiray Thanks for the feature request! This is a good issue for anyone willing to contribute.

Hello @meltsufin I would like to help with this issue

@NaitYoussef Sure, feel free to open a PR with the changes! Thanks!

I've been looking at this for a bit and while I'm not 100% sure (really the first time I've worked with Gradle) it looks like the underlying Gradle plugin: io.freefair.maven-plugin should already run the DescriptorGeneratorMojo Task. I expect this should generate the help Mojo during compilation.
As far as I can tell, the task is in the build cycle but the plugin isn't generating anything. We could create a HelpMojo that artificially patches this issue but I'm not sure if that's the intent of this Issue or if I'm just completely lost.

FWIW I use
plugins {
    id 'de.benediktritter.maven-plugin-development' version '0.3.1'
}

And it does create the help mojo.

I was able to take the Mojo generated by that plugin and do something similar. It's still a new Mojo, but it at least reads the generated plugin-help.xml then parses it into the help text. I'll pull together a unit test and send a push soon.

@meltsufin I added a PR request to address the issue it needs a review before it can be merged. Let me know if there's any issues.

One particular disadvantage of this approach is that any changes made to the mojos must be reflected on the HelpMojo, this is why it's preferred to generate the HelpMojo rather that having it as explicit source.

I tried to work around that thought process by reading the generated descriptor and generating the help text from the XML. So while it's not ideal compared to having the entire Mojo generate at compile time, the checkstyles and testing requirements of this repository prevent the generated Mojo from being accepted.

Then I’d suggest adding the generated sources to a skip list, after all those sources are generated from templates not by a developer. The only caveat would be if generated sources become part of the source release or source jar (that would be really weird).
I guess what I’m trying to say is, if the tooling/conventions get in the way and force you down a path that’s not optional then challenge the tooling/conventions.

Ok, I'll go back and hit it again.

I'm at loss for this one. Someone else can take this as I can't find a clear solution without creating a new plugin to perform the same task.

Thank you for giving this a try. I'll keep this issue open and see if anyone else is interested in trying to implement this feature.

close as not planned


In a directory with an override, display override after succesful default change

The problem I am trying to solve
I have some directories where I've set overrides and some directories where I haven't set overrides, and I don't remember which directories have overrides or not.
I'll be working on a project and want to change the Rust version I'm currently using, so I'll run:
$ rustup default beta

Which outputs:
info: using existing install for 'beta-x86_64-apple-darwin'
info: default toolchain set to 'beta-x86_64-apple-darwin'

  beta-x86_64-apple-darwin unchanged - rustc 1.33.0-beta.4 (635817b9d 2019-01-24)

So I say, "cool, I'm using beta now!" and go about cargo building, etc.
In a directory without an override, I am indeed using beta.
In a directory with an override, I get the same output, but I am not using beta (necessarily), I'm using the override. So I cargo build thinking I'm on beta, but I'm not.
The solution I'd like
If I'm in a directory without an override, I'd like the current behavior of rustup default to stay the same.
If I'm in a directory with an override, I'd like the output of rustup default to remind me that I have an override and that I'm not using the default that I just changed. Something like:
$ rustup default beta
info: using existing install for 'beta-x86_64-apple-darwin'
info: default toolchain set to 'beta-x86_64-apple-darwin'

  beta-x86_64-apple-darwin unchanged - rustc 1.33.0-beta.4 (635817b9d 2019-01-24)

(currently using 1.24.1-x86_64-apple-darwin, directory override for '/Users/carolnichols/rust/carol-test')

If this is a personal problem of mine, I can script my way around it, but I wanted to file this and see what others thought and then potentially submit a PR if other folks have this problem too.

Note we're about to make rustup default (without any arguments) more informative: https://github.com/rust-lang/rustup.rs/pull/1633, though I don't know how that behaves with overrides present (cc @lazorgator).
Advising the user that even after changing the default that an override is present sounds like a good idea to me.  I think it should do it for all methods that have precedence on the default, as described in https://github.com/rust-lang/rustup.rs/blob/1.16.0/README.md#override-precedence.  So if there is a rust-toolchain file or a RUSTUP_TOOLCHAIN env var.

@dwijnand At present, the rustup default only returns the global default toolchain. Maybe it should detect if there is an override and output that along with the default? Something like:
canis@latrans:~/rustup.rs$ rustup default
Default toolchain: stable-x86_64-unknown-linux-gnu
Current override: nightly-x86_64-unknown-linux-gnu

@carols10cents Opened a PR. I liked your idea better, so the change will result in some lines of logging being output to notify you of an override being set, and why it is set.

Awesome, thank you @lazorgator !!!!


How to schedule learning rate in pytorch_lightning

How to schedule learning rate in pytorch lightning
all i know is, learning rate is scheduled in configure_optimizer() function inside LightningModule

A couple of examples are shown here.
Basically, return two list: first is your optimizer(s) and the second is your schedulers.
def configure_optimizers(self):
    optimizer = Adam(self.parameters(), lr=1e-3)
    scheduler = ReduceLROnPlateau(optimizer, ...)
    return [optimizer], [scheduler]

lightning will call the scheduler internally.
Tip: you can use the LearningRateMonitor callback to log your learning rate during training.

I got it.
Thanks.

@SkafteNicki both links (https://pytorch-lightning.readthedocs.io/en/latest/optimizers.html#learning-rate-scheduling, https://pytorch-lightning.readthedocs.io/en/latest/callbacks.html#learning-rate-monitor) seem dead.

@bokutotu sorry the docs structure has been slightly changed since my original response, so here are the updated links:
https://pytorch-lightning.readthedocs.io/en/latest/common/optimizers.html#learning-rate-scheduling
https://pytorch-lightning.readthedocs.io/en/latest/extensions/generated/pytorch_lightning.callbacks.LearningRateMonitor.html#pytorch_lightning.callbacks.LearningRateMonitor

@SkafteNicki The links seem dead again.

@amansouri3476 here are the updated links:
Learning rate scheduler:
https://pytorch-lightning.readthedocs.io/en/latest/common/optimization.html#id5
Learning rate monitor callback:
https://pytorch-lightning.readthedocs.io/en/latest/api/pytorch_lightning.callbacks.LearningRateMonitor.html#pytorch_lightning.callbacks.LearningRateMonitor
In general i recommend to use the search field in the documentation if you are looking for something specific.

The latest Learning rate monitor callback is at
https://lightning.ai/docs/pytorch/stable/api/lightning.pytorch.callbacks.LearningRateMonitor.html


CustomConverter does not support parameterized types on subclasses

I have the following custom converter:
public class EntityToStringIdConverter<T extends BaseEntity<Long>> extends CustomConverter<T, String> {
...
}

Note that BaseEntity is a parameterized interface I have in my application.
I then register this converter as a custom converter, but it does not convert my fields. I have found out that the issue is that the CustomConverter code incorrectly detects the type T to be of type BaseEntity, and when it tries to match the type in the canConvert method it won't match for my concrete subclass (which implements BaseEntity).
The biggest problem is that I cannot customize the behavior of the CustomConverter class, since the sourceType field is final and set in the constructor. I was planning on simply passing along the actual class object for the concrete class, and set it in the sourceType. Is there a work around for this?

You can implement the Converter interface directly and put whatever condition you want in canConvert method

Yes that's what I ended up doing. But perhaps the fields sourceType and destinationType could be marked as non-final? This would enable subclasses to tweak them.

Actually, scratch that, I can see that on master this is already done. Thanks!


Add site "11ty Netlify Jumpstart"

Hey—this looks great! I think this should probably live in _data/starters/ instead?
I think we probably have too many things in _data/sites/ that should be starters instead, I’ll probably move some of them out at some point.

@zachleat sure, I'll update! I was not sure if that list was open to contributions or if you had another vetting process first 👍

Thank you! (note that I am just within the last few days moving to use individual json files for the starters to avoid conflicts—I’ve made that change here)