Custom functions

This is a refactor of #530 (custom importers) to also support #332 (custom functions).
The mechanism to synchronize the worker thread that runs libsass and the main v8 loop has been centralized and abstracted into an object called CallbackBridge that has two specializations: CustomImporterBridge and CustomFunctionBridge. The former supports the existing functionality (#530) while the other makes it possible to register custom functions that are backed up by v8 functions and takes care of translating Sass_Values to something that makes sense to the JS runtime and vice versa.
The function arguments are relayed to the JS callback by means of wrapping Sass_Value* pointers into v8 objects. Those objects mimic the API offered by libsass and as such could be a bit cumbersome to work with on the javascript side. This problem could however be largely mitigated by translating those wrapper objects into JS primitives upon entering the JS callback and back into wrapper objects upon return. The only edge cases that I can think of is that of SASS_NUMBER values when they carry units and SASS_COLOR where we could parse strings and detect patterns like \d+(px|em|%) and rgba?\(...)\ or resolve to use more JS friendly facades.
This is a quick example demonstrating how compass' headings function may be implemented:
sass.render({
  data: '#{headings(2,5)} { color: #08c; }',
  functions: {
    'headings($from: 0, $to: 6)': function(from, to) {
      var i, f = from.getValue(), t = to.getValue(),
          list = new sass.types.List(t - f + 1);

      for (i = f; i <= t; i++) {
        list.setValue(i - f, new sass.types.String('h' + i));
      }

      return list;
    }
  }
});

Coverage increased (+0.63%) to 92.94% when pulling 3311b4fb4afdeddcb3064dc9f8cb1495c42ae922 on matryo:custom_functions into 98f300e45211a4a87a422dc19a2ac4b7c340524e on sass:master.

@matryo, first of all thanks for the effort.  :+1:
Welcome to GitHub!  I would have split it into more commits so to make it easy to manage.
You are aiming to fix https://github.com/sass/node-sass/issues/332, which is in our 2.1 milestone. Therefore, we will consider this after v2.0.0 is shipped. I would have discussed it before going through this kind of major change.
Regarding the implementation, we decided to implement this format:

sass.render({
  data: '#{headings(2,5)} { color: #08c; }',
  functions: {   // the idea is to make these definitions least complicated

    headings: function (from, to) {
      return process(from, to);
    },

    anotherHeadings: function (from, to, done) {
      done(process(from, to));
    }

  }
});

which is achievable if you keep the custom functions definition in C++ keeping JS usage syntax flexible (the way we did for custom importer).
Thirdly, I am not sure about the new Sass types you added (new sass.types.String('h' + i))). Are these arbitrary types? In general we do not add additional syntaxes in node-sass beyond what libsass has to offer. Especially not to solely meet the requirement of a separate framework such as Compass, which is beyond the scope of this project.
@mgreter, @xzyfer, any thoughts on this?

Looks pretty ok to me :+1: Also the new types are pretty much expected from my side, since they represent the values possbile in libsass (https://github.com/sass/libsass/wiki/API-Sass-Value). I personally also implemented/overloaded "toString" for each type, which could solve some "issues" @matryo mentioned when handling such types in node (maybe take a look at how I did it for [perl-libsass] 1).
I also like the config part by @matryo better, since the snippet @am11 posted is not taking advantage of the "possibilities" libsass offers here. There is no way to define default values for arguments, if you do not explicitly include the function signature somewhere. And I also do it that way in perl-libsass!

@am1 I understand that this PR's approach is pretty unusual and I am really sorry about that. I did not realize any one had already started a draft in that direction. Just to give you some context this was a major road block for us and I needed to get this completed in a couple of days, which unfortunately did not leave me much opportunity to consult the maintainers team. That said I am totally eager to take all the time necessary to make sure this code is in line with what you guys envisioned for 2.1 if you think this is a solid base for #332.

@mgreter, now that you have described it, the syntax looks pretty OK to me too. :smile:
Would it make sense to have both syntaxes for function descriptor? Mostly the function definition lack default values. So, when we have this special need for default parameter:
'headings($from: 0, $to: 6)': function (from, to) {
  return processIt(from, to);
},

otherwise:
headings: function (from, to) {
  return processIt(from, to);
},

@matryo, we may need to refine it and this will take some time to digest the whole PR.

Btw. I find it pretty cool that @matryo was able to pull off this implementation without asking anybody about the internals directly! I hope that the time I've put into the libsass wiki was worth it! @matryo : If you have anything to add to the Wiki, please do so!!

I agree. This proves two things: 1) libsass documentation is very reliable and 2) @matryo is an excellent C++ developer!

Coverage increased (+0.69%) to 93.0% when pulling d6ce2d475348a68e2f032f6b52faa663cf584f0d on matryo:custom_functions into 98f300e45211a4a87a422dc19a2ac4b7c340524e on sass:master.

I pushed a few commits that should cover all of the recommendations made thus far, namely:

Removed the importer wrap in renderSync()
Reorganized binding.gyp
Split sass types into separate modules
Use of constexpr static variables in CoreValue subclasses in lieu of a static function
Added support for potentially omitting function signature, used @mgreter's suggestion of using fn(...)

Also made some improvements on the following points:

Made the sass types' constructors more flexible so they can be called without the new keyword
Errors not caught by custom functions are now properly bubbled up to libsass by returning SASS_ERROR values.

As far as the API doc for libsass is concerned, I concur it is really nice! Unlike a lot of API docs it does not beat around the bush and goes straight to the point, I found it very useful during this exercise. So great job!

Excellent job there @matryo! And thanks for adding the alternative syntax . I will test it and give you further feedback. By it looks, it seems very promising as is. :)

@am11

Thirdly, I am not sure about the new Sass types you added (new sass.types.String('h' + i))). Are these arbitrary types? In general we do not add additional syntaxes in node-sass beyond what libsass has to offer. Especially not to solely meet the requirement of a separate framework such as Compass, which is beyond the scope of this project.

New types are very much in the scope of node-sass. Without them, how would you return a sass value? Some js types could be auto-boxed into Sass values but many can not. In ruby sass, these types are part of the core sass project. E.g. https://github.com/sass/sass/blob/stable/lib/sass/script/value/number.rb

Without them, how would you return a sass value?

I thought these will return cstrings from our binding and LibSass will take care of the rest. Unlike ruby-sass, node-sass is only a wrapper around libsass. Besides, I do not know about the use-case when the custom functions are required to return anything but the stringly typed value, which LibSass will eventually stamp out to resultant CSS as is?

@am11 From what I understood of the API, custom functions registered with sass_option_set_c_functions() are expected to return a pointer to a Sass_Value struct, which has to be of the adequate type. Meaning if the function advertises that it returns a color, it should return a Sass_Value that was created with sass_make_color(). If it were to return a string (i.e. a Sass_Value that was created with sass_make_string()), the return value could not be re-injected into a function that expects a color as its argument (e.g. lighten()) making our custom functions hardly composable, i.e. it would be impossible to do something like:
div {
    color: lighten(foo(), 30%);
}

...if foo returned a string.
As I said earlier we could however let the end developer return strings and have a post-processing stage (either in index.js or in binding land) that detects patterns (length literals, color literals, etc.) and automagically transform them into the adequate type.

@matryo, that makes sense. :)
I was wondering if we can make custom functions implementer underlying sass-type agnostic, unless it is utterly necessary (which it is), so to avoid learning curve overhead.

that detects patterns (length literals, color literals, etc.) and automagically transform them into the adequate type.

I think that won't be necessary. With the proper documentation and tests cases to exemplify the usage (as you have already added both :+1: ), the implementers of node-sass API shall be able to define custom functions without much of a hassle. Since the main advantage of node-sass is performance; I am afraid pattern sniffing with regex will have a negative affect on perf ?

As one of the heaviest users of the Ruby function api that is provided by Sass, this patch is exactly what I was expecting. returning javascript objects that are converted to Sass_Values is exactly what any developer coming from the Ruby environment would have expected.

I can only support @chriseppstein words! This is exactly as we did it in perl-libsass. As others and I already have mentioned, there is some room for further improvements to i.e. make maps (objects), list (arrays) and other types (strings) feel more native in a js environment.
And this patch is IMO a good starting point for that!

A few other things I was expecting to see here:

Sass options

I would expect this.options to be an object containing the current sass compilation options. Additionally, it should contain some runtime values like the current css output file and the current sass file and the top level sass file. These are critical to writing functions that can interact with the filesystem and handle URL generation correctly.

Sass environment

In ruby, you can access the current selector context I would expect this.environment.selector to be accessible as long as libsass has the script-parent feature.
You can also access the current variables defined in the global scope this.globalVariables is essential to being able to re-use sass configuration in the javascript language just like a sass-defined function can.

Calling to other Sass functions

It is very useful to be able to invoke sass builtin functions from within a custom function. It's also nice to be able to invoke functions defined in sass. For example, the global-variable-exists function that is a built-in in Sass should be able to tell us if some global is defined. I would expect this.environment.call('global-variable-exists', sass.types.String("foo")) or something similar to work.
Obviously what we have is a good first step, and I wouldn't block landing this PR because these features are missing (Ruby Sass didn't have them at first either)

@chriseppstein, (sorry for this getting stretched and GH has zero comment threading/nesting) here:

As one of the heaviest users of the Ruby function api that is provided by Sass, this patch is exactly what I was expecting. returning javascript objects that are converted to  Sass_Value s is exactly what any developer coming from the Ruby environment would have expected.

do you mean return value's type of custom function should be specified by user as @matryo's solution (sass.types.blah) or should the type be programatically inferred from returned regular JS object by our API or binding code?

@chriseppstein You raised three very interesting points. At the moment it unfortunately looks like libsass' public API cannot provide what we would need to implement something like this. After looking at libsass' internals I can see that there would be a rather straight forward way to implement those features, but that would be using a private API, which is a bit questionable I guess.
I will take some time this week to augment the JS binding objects so as to provide a more user friendly API.

@matryo feel free to PR Libsass with the additional information you require. I'm sure @mgreter will happily assist you with anything you need.

@am11

do you mean return value's type of custom function should be specified by user as @matryo's solution (sass.types.blah) or should the type be programatically inferred from returned regular JS object by our API or binding code?

I meant that it should be sass.types.Blah.

FYI: I've built a project that depends on this. It makes it trivial to use npm to download sass extensions containing sass files and custom sass functions written in javascript.
https://github.com/sass-eyeglass/eyeglass
I am waiting for this patch to land and be released before I can release this project.

@matryo, v2.0.0 (and then v2.0.1) is out. Please rebase this so we can continue.
cd into/node-sass

# first add the remote for original repo namely node-sass
git remote add node-sass https://github.com/sass/node-sass

# rebase with node-sass master branch
git pull --rebase node-sass master

# solve the merge conflicts and then:
git add .
git rebase --continue

# force push; to rewrite the history
git push -f

We noticed that importers seem to only be supported for async rendering. How should we support them for renderSync()?

The functions signature allows for async functions, but it seems that in order for a function to support renderSync() we'd have to have a synchronous version for each function.
It seems to me that renderSync is evil, but if we're going to support it we probably need to allow options to have a functions property that expects async compatible functions and a functionsSync property that specifies functions to be used in synchronous mode.
At the very least it seems like we should give an error if an async function is passed to renderSync.

Some notes regarding renderSync, we initially added support for sync callbacks in renderSync importers. It worked for most part unless the snag was found; libuv does not let you live with it and presents unanticipated issues. I spent quite sometime on libuv channel to figure that one out. @txdv helped me a lot in building importers and suggested not to improvise asynchrony with renderSync (which is pure synchronous on all accounts).
Currently, importers allow both async cb and synchronous return for render and only return for renderSync.

@matryo, ping.

@am11 Thanks for the background on renderSync. If someone is writing functions for use by a third-party, they won't know if that function is going to be passed to render or renderSync so they need to make two versions of their function, yes? Is there no way in synchronous invocation to handle async functions so that users could write just one version?

@chriseppstein aside from a node-fibers solution not really.
Two possible ideas:

With promises coming perhaps we can deprecate renderSync
If we need renderSync perhaps we can use the options proposal to tell the importer / custom function the intended rendering mode (and allow async-only functions to pass through gracefully and warn)

@chriseppstein If third party libraries want to be sync-friendly they would have to test for the presence of the done callback as the second argument to decide on the best course of action (or as @Jakobo suggested using the option context from #681)
@am11 I unfortunately did not finish the improved type bindings although I made some good progress last week. I will definitely take some time during the next couple of days to wrap this up.

test for the presence of the done callback.

This makes sense, thanks!

@matryo is there a place I can pull your branch in progress so I can test the #681 changes or should I wait for changes to land in your custom_functions branch?

@matryo, please take your time. This is one of the major most feature coming node-sass, since the inception of node-sass. I was just pinging to know if there is anything we can help with. But seems like everything is under control! :smiley:  :+1:
@Jakobo,
We used to have renderSync, renderFileSync, render and renderFile. Those were squashed to render and renderSync. We now detect file / data context based on the provided options.
It is a separate discussion that how the API will look in future, but having a sync variant around is better IMO.
Regarding promises, apparently that pattern might not land as folks are in agreement to adapt node-style callbacks over promises or reactive-extensions. See the related issue.
Moreover, you can consider your PR decoupled from this one and we can proceed. We will make sure all existing tests pass on merging this one. Meanwhile, we can continue our development flow; improving other aspects of node-sass.
@chriseppstein, render is the most popular usage of node-sass API. If you are using render, you can consume third parameter (the callback) in importer function like @matryo mentioned as well as you can return immediately. In case of renderSync, importer can only return as it is not equipped to accept cb by design.

I can only repeat that it's a pitty that perl-libsass has all these nice features already implemented, while most people are waiting for node-sass to catch up! So a little tease to hopefully close https://github.com/sass/node-sass/issues/332. And be sure I will push the node-sassAPI to the limit once it is merged. I want to see even more js integration (as perl-libsass already has) for like compare or native coerce toString in the future! :wink: :+1:

Hi guys, I realize it's been quite some time since my last update. Something unexpected came up in my schedule. I am essentially in the same state as last time, except I should actually be able to free up some time during the next few days.
I also just wanted to throw an idea out there. It all goes back to the discoverability aspect of custom functions and the confusion that those SassTypes  could occasion for some developers. Looking back at  @am11 's comment on Feb 3 about having custom functions return strings that would then be interpolated into the right type. This grew on me quite a bit as I think many developers would be naturally tempted to do this rather than instantiating one of the SassTypes object, especially for simple literals such as strings, colors, numbers. And this wouldn't be too difficult to implement as we could just ask libsass to evaluate whatever string we get back from a custom function (if the function does not already return a SassTypes::Value already of course). I actually built a quick proof of concept, if you guys are interested. Let me know.
Lastly @chriseppstein, I did not get a chance to catch you at EmberConf, but that was a very nice closing talk! And eyeglass definitely looks like something I want to use :wink:

@matryo, that will be perfect! This way, for the node-sass API implementer, we will provide both signature and signature-less functions as well as typed and type-less returns and callbacks!  :+1:
I am bit busy with build related stuff at the moment, but I will keep an eye on your commits.

@matryo I think this string idea is of dubious value and it's something we can add later without breaking any compatability. My suggestion is to wait on it and just land the important stuff now and then iterate.

@matryo eyeglass depends on this patch landing in 3.0, so that's why I'm hoping to land this sooner than later :)

@matryo, v3.0.0-pre is released. We would like to merge this feature for beta.
I agree with @chriseppstein that we can always iterate over once the basic functionality has arrived. Also, this way we will get sometime to act upon the feedback by the consumers (beta-testers).
If you are still busy, would you like us to take it from here?

I think this one is a blocker for 3.0

@chriseppstein I think you're right, string interpretation is not critical and we can go piecemeal on this.
For the purpose of 3.0 do you guys think that what we have so far is good? The only thing I would personally suggest to add is @chriseppstein 's recommendation of mapping true, false and null to immutable singleton instances. Adding this later on could indeed break users' code. I have a commit ready for this, so just let me know.

@matryo, normally the workflow that follow is: we commit the code and then ask for the review
In worse case scenario, if one commit turned out to be a fiasco in a PR, you can always rebase it out while keeping the others.
I will take care of CLI, which (on second thought) is not urgent for v3 either. IMO, advanced user relying on functionality like custom function, don't normally rely on CLI for their workflow. So CLI support (which is already a spaghetti) can wait until after v3 is RTW'd.

ok. so let's land the singleton instances and merge this baby. This is getting time critical for me at work for an internal release -- I may need to do a custom build to our internal npm repo if we can't land this soon. :sob:

I have some issue compiling this with clang an node-0.12:
https://gist.github.com/saper/304a1750c0e822e29083
first error:
gmake: Entering directory `/home/saper/sw/test/node_modules/node-sass/build'
clang++ '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/home/saper/.node-gyp/0.12.0/src -I/home/saper/.node-gyp/0.12.0/deps/uv/include -I/home/saper/.node-gyp/0.12.0/deps/v8/include -I../node_modules/nan  -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -ffunction-sections -fdata-sections -fno-omit-frame-pointer -fno-rtti -std=c++0x -fexceptions -frtti -MMD -MF ./Release/.deps/Release/obj.target/binding/src/binding.o.d.raw  -c -o Release/obj.target/binding/src/binding.o ../src/binding.cpp
In file included from ../src/binding.cpp:3:
In file included from ../src/sass_context_wrapper.h:8:
In file included from ../src/custom_function_bridge.h:5:
../src/callback_bridge.h:154:57: error: cannot initialize a parameter of type 'v8::Isolate *'
      with an lvalue of type 'void (const v8::FunctionCallbackInfo<v8::Value> &)'
    Local<FunctionTemplate> tpl = FunctionTemplate::New(New);

@matryo, at this point, could you just rebase and merge the conflicts?
@chriseppstein, we will definitely land it into v3.0.0-beta.0. :sunglasses:
Either we have custom functions or there would be no beta! :zap:

When I return an error from a custom js function I get the following output:
error in C function eyeglass-asset-uri: Asset not found: fake.png
Backtrace:
	sass/assets.scss:2, in function `eyeglass-asset-uri`
	sass/assets.scss:2, in function `asset-url`
	stdin:1

Which seems bad, because it's not a C function. I assume this is libsass? Maybe we can get them to generalize their error message?

@chriseppstein we would need more info to debug this. I'm not sure if the message or the backtrace is the concern. IMO this is how libsass currently reports errors that are "thrown" in custom c functions. I actually have started to implement error reporting like ruby sass does, but that whole part is a lot of work in itself (and will not really be doable, before we have error spec tests in libsass).
OK, by re-reading it I guess the C should be replaced by a custom or whatever seems fit, correct? This is due to the implementation, as custom function are in fact always C functions (that's how the implementor calls libsass). Not sure how we could improve that other than just calling them custom, but I'm open for suggestions!

@mgreter Right. It's just that it's called a C function. If the user wrote a javascript or perl function, this error message seems kind of silly, but I'm sure it wouldn't trip them up too much. I think custom functions might be confused with the functions declared with @function. Perhaps native function or host language function. Or libsass could let the function registration tell it what kind of function it is.

Ok, I am in the middle of rebasing that stuff. Let me tell you it's not the most fun I've had ;)
Right now I am running into an issue where the build script can't build Release/sass.a. I am hoping upgrading XCode will solve it, I will keep you posted!

@matryo I have just finished rebasing it. ;)
Let me push some stuff.

@matryo, except for binding.cpp, the rest is in accord with node.js v0.10, v0.12 and io.js v1-v1.5. https://github.com/am11/node-sass/commit/ae70faeeb710f9a2a120f25de94e8c12d8eed414
Since this PR is started, there have been a lot of development in node.js and nan worlds. So let keep collaborating and get this thing done. I am available on gitter chat: https://gitter.im/sass/node-sass.

You can just take the changes from this commit, basically its all your changes, I have just fixed some stuff which is new in Nan (and yet v8).

@matryo see #783.

:tada:
It is official now!! :sunny: :star2: :star: :spades: :100:
Brilliant work @matryo :+1:

👍👍👍 awesome

@matryo, do we need Boolean and Null exported twice: separately as types exports.FALSE, exports.TRUE, exports.NULL and then exports.types.Boolean.TRUE, exports.types.Boolean.FALSE, exports.types.NULL?

:heart: You guys rock my socks off.

I second his :heart:

:tada: Awesome! :heart:

@am11 They indeed do not necessarily have to be on both and we could refactor the code to have those singleton references exported just once. It just felt easier to instantiate those singletons within Boolean::get_constructor and Null::get_constructor and attach them to the constructor object, and copy those references to module.exports in a second pass for convenience. I guess we could also just leave it as is and just not advertise the exports.types.Boolean.TRUE, exports.types.Boolean.FALSE, exports.types.NULL references.


fix(fn.generate_stylesheet): only return with valid widths

With responsive layouts, on window resize, colWidth and
this.$wrapper.width() can be <= 0. This causes widget widths to be set
as <= 0. I think it is fair to assume that both the colWidth and
$wrapper.width() must be greater than 0 in order to generate a valid
stylesheet.

just noticed this fix only works right after the v0.6.10 release commit at https://github.com/dsmorse/gridster.js/commit/c5da395c531298e7ee8b5cea2f7c25510d86e70c.


Changes not being saved while updating local info

Subject: Changes not being saved while updating local info
Description:
I updated the local info page once, and then saved it. It worked fine. A second time I tried to update during the same session, the green banner saying it was saved successful was displayed, but the changes were gone.
Results:
Should have saved my changes. I'm depressed now, cuz I wrote a lot. I hope what I wrote can be recovered.
Backend version: develop-7291678f
Frontend version: develop-7291678f
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36
Page: https://app.couchers.org/community/48/istanbul/info
User: emily (135)

@aapeliv Are you able to see if this was an actual bug or an issue with the browser (maybe the session expired if she took a really long time before submitting the changes?)

Dupe of #1635


Only User Namespaces filter inactive

Setup

Rancher version: 2.6.2
Browser type & version: Google Chrome 89.0.4389.90 (Official Build) (64-bit)

Describe the bug
After SUSE Rancher 2.6.2 deployment Only User Namespaces filter for workloads did not work.
To Reproduce
Result
Workloads in all namespaces are listed.
Expected Result
Filter should be active.
I deleted the filter and reset, it then worked as intended.
Screenshots

Additional context

Detailed Description

Context

This has been fixed, I can't find the specific PR but there were some changes / improvements within this area. I've also tested this locally on the current 2.6-head and the Deployments page updates correctly when changing to Only User Namespaces

On 2.6-head commit id: 2a7857d
This is seen fixed.


item_param_dict and last_item_param_dict

Hi Junchen Feng,
I'm not sure if my comment is a real problem. I just want to contribute your code.
In the file: solver/model.py, in the lines: 256 and 269, you 'change' the values of the variables 'last_item_param_dict' and 'item_param_dict'.
https://github.com/17zuoye/pyirt/blob/c8f8c8e0c722b223e5900d932ac7fdba5934b5d8/pyirt/solver/model.py#L256
https://github.com/17zuoye/pyirt/blob/c8f8c8e0c722b223e5900d932ac7fdba5934b5d8/pyirt/solver/model.py#L269
However, the way the code is written, python will keep the same memory region being accessed by these two variables.
If you run
id(last_item_param_dict) == id(item_param_dict)
..the answer will be: True.
I am in doubt whether this is a bug, or if you would like to keep these two variables pointing to the same structure in memory?
I did some testing and found that if I make an explicit copy of the dictionaries the result will be (a little) different.
The lines below show my test:
line 256: self.item_param_dict = self.last_item_param_dict.copy()
line 269: self.last_item_param_dict = self.item_param_dict.copy()
Thank you.

I believe you are right! A deep copy is called for here. That is probably the reason I never stopped out by the epsilon! Thanks a ton


WFUtil: show execution result/summary after trace/steps log

Done: e.g.:
✖  19   13:05:13 13:05:13 ERROR        55  Business Process Exception [BPExceptionService]    [762,58]                       1   onfault 766
Result: ERROR [WF_ID: 2078609, WFD: A0_TEST_BP/183, 20 steps executed, 2 errors.


error when using with Homebridge and Simplisafe

Describe The Bug:

I get an error in Homebridge ui
21 errors were received from the SimpliSafe API while refereshing sensors in the last 5 minutes. Enable debug logging for detailed output. It does not let me set away or home in HomeKit app.
To Reproduce:

I do not have to do anything it happens and pull sup every five minutes
Expected behavior:

Stay connected with Homebridge and home kit to allow me to change alarm statuses in HomeKit
Environment:

Plugin version:
homebridge-simplisafe3 v1.8.8
Node.js Version:

NPM Version:
Homebridge Version:
Operating System: <!-- Raspbian GNU/Linux Bullseye (11)

Homebridge Config:

Paste the relevant section of your homebridge config.json here

Screenshots:

Logs:

Link to logs
Paste Homebridge Logs here

Hey @chenchaso you need to restart after enabling debug so that it will show the errors. But a lot of those errors from the API are just the API not being reliable eg nothing to really worry about. But from the sound of it something may be up. Please post after restarting with debug enabled and include up through attempting to use the alarm in HomeKit.
thabks
Ps. Please post the actual text or even a link to text file rather than screenshots of the logs.

Thanks for that sorry I am new to this whole thing it seems like its working off and on  if it continues to be an issue I will try my best to do this correctly next time. Would I do it via the create an issue or in a forum? Thank you

On Dec 23, 2021, at 1:11 PM, Michael Shamoon @.***> wrote:
Hey @chenchaso https://github.com/chenchaso you need to restart after enabling debug so that it will show the errors. But a lot of those errors from the API are just the API not being reliable eg nothing to really worry about. But from the sound of it something may be up. Please post after restarting with debug enabled and include up through attempting to use the alarm in HomeKit.
thabks
Ps. Please post the actual text or even a link to text file rather than screenshots of the logs.
—
Reply to this email directly, view it on GitHub https://github.com/homebridge-simplisafe3/homebridge-simplisafe3/issues/268#issuecomment-1000458255, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEFCYK2OHHRAZIATFLY2IWLUSNQ6FANCNFSM5KVF642A.
Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.

No problem at all.
Either one is fine but issues should generally be a bug, something you think is wrong with the plug-in that you can reproduce. If you think it’s just an issue you’re having discussion might make more sense. I can always convert one into the other after-the-fact anyway.


Getting Permission Error

Q
A

Issue Type
Question

Deployer Version
3.3.0

Local Machine OS
Windows 10

Remote Machine OS
N/A

Description
I have created a folder .ssh/id_rsa in my directory D:/home/Abdul Ovais
Now directory looks like: D:/home/Abdul Ovais/.ssh/id_rsa
and also added id_rsa.pub file in .ssh folder which is D:/home/Abdul Ovais/.ssh/id_rsa.pub
but when I am trying to run command on Cygwin terminal it shows me permission error
Content of deploy.php
user('dev1') // Defind SSH username
    //->password('') // Define SSH user's password
	->identityFile('(D:/home/Abdul Ovais/.ssh/id_rsa.pub', 'D:/home/Abdul Ovais/.ssh/id_rsa', 'pass phrase')
    ->stage('staging') // Define stage name
    ->env('deploy_path', '/var/www/abdulovais.com'); // Define the base path to deploy your project to.

// Specify the repository from which to download your project's code.
set('repository', 'https://ovaiskhan@bitbucket.org/abdulovais/ok-web-app.git');
?>
Output log
Abdul Ovais@DESKTOP-31UBAGF /xampp/htdocs/abdulovais
$ dep deploy:staging
➤ Executing task deploy:staging
Deploying...
Upload file catalog/controller/api/product.php to /var/www/abdulovais.com/catalog/controller/api/product.php
Warning: file_get_contents(D:/home/Abdul Ovais/.ssh/id_rsa): failed to open stream: Permission denied in phar://D:/usr/local/bin/dep/src/Server/Remote/PhpSecLib.php on line 62
[RuntimeException]
Unable to login with the provided credentials.
deploy:staging [-p|--parallel]
PHP Warning:  file_get_contents(D:/home/Abdul Ovais/.ssh/id_rsa): failed to open stream: Permission denied in phar://D:/usr/local/bin/dep/src/Server/Remote/PhpSecLib.php on line 62

This is error about read your key file. Please fix permission of path to file.


Cleanup of Espresso class

Summary of Changes
Ask says to instantiate a GenericFileIOCalculator directly in such scenarios rather than inherit from the base class. Indeed, it seems like this is a slightly more compact way to go.
Checklist

[X] I have read the "Guidelines" section of the contributing guide. Don't lie! 😉
[X] My PR is on a custom branch and is not named main.
[X] I have added relevant, comprehensive unit tests.

Notes

Your PR will likely not be merged without proper and thorough tests.
If you are an external contributor, you will see a comment from @buildbot-princeton. This is solely for the maintainers.
When your code is ready for review, ping one of the active maintainers.

There is no functional change here, @tomdemeyere, but I just wanted to let you know.

@Andrew-S-Rosen
I highly suspect passing parallel_info to the calc absolutely does nothing , it has to be passed to the profile.
if profile is None:
    if template.name not in self.cfg.parser:
        raise EnvironmentError(f'No configuration of {template.name}')
    try:
        profile = template.load_profile(
            self.cfg, parallel_info=parallel_info, parallel=parallel # <<<  parallel_info is only used there.
        )
    except Exception as err:
        configvars = self.cfg.as_dict()
        raise EnvironmentError(
            f'Failed to load section [{template.name}] '
            f'from configuration: {configvars}'
        ) from err
self.profile = profile

That's the GenericFileIO constructor, in our case profile is not None, parallel_info will never be used.

Thanks for the head's up! Patched in https://github.com/Quantum-Accelerators/quacc/pull/2069 hopefully.


If queue ends and start a music again it delays and bugs out

If queue ends and start a music again it delays and bugs out

👋 Needs a more detailed explanation, since as far as my test setup is concerned, playing a new track after a queue ends works fine. 🤷♂
Are you running a stock MPD server, or a derivative?

I have a MPD server with httpd broadcasting, when i join the server with music playing everything works fine but after pausing it and start it a bit of the music what was in the queue plays and after that with a long delay starts to play the music. My httpd config is this
audio_output { 	type		"httpd" 	name		"My HTTP Stream" 	encoder		"flac" 	port		"8000" 	compression 	"0" 	quality		"9.0"			# do not define if bitrate is defined 	format		"48000:32:2" 	always_on       "yes"			# prevent MPD from disconnecting all listeners when playback is stopped 	max_clients	"0"			# optional 0=no limit }

Oh, you meant http stream playback is laggy? Shouldve specified that first 😅
Stream playback is mostly handled by libVLC and will always lag a bit behind the "real" playback, but we might not be resetting the stream correctly when hitting end of queue - - Worth investigating.

I think you could implement it if the mpd sends signal that the music is started refresh the httpd stream and that could fix it i think

Hey, I

Hey, I didnt wanted to close this, i tried to figure out how to implement it but i dont know how to write c# and i dont know what style should it be written in. Can you please make a patch for when the queue ends the local player resets and when starts the local player starts?

This'll be fixed in the next update. Thanks for the report!


[BEAM-1539]: Support unkown length iterables for IterableCoder in python SDK

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

[ ] Make sure the PR title is formatted like:
[BEAM-<Jira issue #>] Description of pull request
[ ] Make sure tests pass via mvn clean verify. (Even better, enable
Travis-CI on your fork and ensure the whole test matrix passes).
[ ] Replace <Jira issue #> in the title with the actual Jira issue
number, if there is one.
[ ] If this contribution is large, please file an Apache
Individual Contributor License Agreement.

R: @dhalperi @robertwb
CC: @aaltay @charlesccychen

Coverage increased (+0.05%) to 69.366% when pulling a157fc319b8ffeba089b070c56cc75ac2fc884d7 on vikkyrk:it_cdr into 0806183c468a1409bbdf66fbb8badbb25023b7d5 on apache:master.

Coverage increased (+0.05%) to 69.37% when pulling<PHONE_NUMBER>7604e74a90d3e2a4fae76aadd60b77 on vikkyrk:it_cdr into 0806183c468a1409bbdf66fbb8badbb25023b7d5 on apache:master.

Coverage increased (+0.04%) to 69.36% when pulling 2f60a939a5bac731124919cb50f355af444f44e1 on vikkyrk:it_cdr into 0806183c468a1409bbdf66fbb8badbb25023b7d5 on apache:master.

(Assuming @robertwb will look at the Python parts)

R: @robertwb addressed comments.

LGTM, thanks.

Coverage increased (+0.05%) to 69.197% when pulling af4d443a27de8adab4c1eb31d1ed6c68fb484058 on vikkyrk:it_cdr into c8dfb851cdcb24a9afb01416598d2881e449f079 on apache:master.

Coverage increased (+0.05%) to 69.194% when pulling af4d443a27de8adab4c1eb31d1ed6c68fb484058 on vikkyrk:it_cdr into c8dfb851cdcb24a9afb01416598d2881e449f079 on apache:master.

Coverage increased (+0.05%) to 69.197% when pulling af4d443a27de8adab4c1eb31d1ed6c68fb484058 on vikkyrk:it_cdr into c8dfb851cdcb24a9afb01416598d2881e449f079 on apache:master.

Coverage increased (+0.05%) to 69.201% when pulling af4d443a27de8adab4c1eb31d1ed6c68fb484058 on vikkyrk:it_cdr into c8dfb851cdcb24a9afb01416598d2881e449f079 on apache:master.


Save bools as bytes in netCDF format

Bools are not supported in netCDF, and attempting to save a cube with with boolean data raises and error. This PR causes them to be saved as bytes instead.

I think #2099 is a relevant discussion around the changes proposed in this PR.  In that, a cube with boolean type data, if converted to a int8 dtype on save, needs a way of recording the fact the the fields represent logical fields.

Thanks @djkirkham for looking at this!  I raised it quite a while ago (#1920) but it gained no traction at that time.  We override the iris NetCDF fileformats module with our own for this very purpose to perform type coercion on save.  It would be great to do away with our module.
Regarding valid_min and valid_max.  On save, this is great as a means to 'indicate' datatypes which are otherwise not supported by the NetCDF saver (whether NetCDF classic or otherwise).  However, since as valid_min and valid_max can also indicate missing data, I'm not 100% that this can give a definitive answer to the intended type.  Sorry, it's been quite a while since I looked at these things.  I'll see if I can fish out some more information if I can.

Looks like netcdf-python interprets valid_min/max now for determining mask:
"6/10/2017: Version 1.2.9 released. Fixes for auto-scaling and masking when _Unsigned and/or valid_min, valid_max attributes present."

@djkirkham - needs a what's new and a test, and its good to go.
I do agree with @cpelley, in that this change will result in the round trip of the dtype not being preserved, but I also know that you don't have that context in the function you have modified. Are you in a position to look into the options on that front?
If we were to break the problem into two stories:

I want to save boolean Iris data to netcdf
I want to save boolean data to netcdf and preserve its boolean dtype on load

Then clearly you have done the first, and I'm reasonably happy to start with that. The second I think we should be looking at though, medium-term.

I discussed this with @cpelley and we thought a case could be made that it's sensible to save booleans as byte data with a valid_min of 0 and a valid_max of 1, and interpret this as boolean on load.

I think the recent change in the netcdf4-python library is relevant in the context of this change:
https://github.com/Unidata/netcdf4-python#news
"6/10/2017: Version 1.2.9 released. Fixes for auto-scaling and masking when _Unsigned and/or valid_min, valid_max attributes present. ..."
This seems to confirm my concerns highlighted in my above comment, that is: "However, since as valid_min and valid_max can also indicate missing data, I'm not 100% that this can give a definitive answer to the intended type."
Cheers

I'm not sure I understand the problem. It seems to me we can take the practical decision to interpret byte data with valid_range [0,1] to be boolean on load (perhaps we could also take scale_factor into account). It seems unlikely to me that anyone would ever want a byte/int8 dataset with only zeros and ones.

Hi @djkirkham, sorry my comment wasn't very helpful.  If there is no opposition to this I should confirm that I am personally happy.  As you say, its the most common usecase of a byte array with valid range [0, 1] to be represented as a logical field I think rather than as a masked field.
However, In my experience, people are reluctant to get into a discussion around a specifications especially when there is ambiguity present.  @pelson may have been hinting toward this issue by encouraging this to be split into two with the first change being straight forward (sorry Phil if I have taken the wrong message).  I'm more than happy to review this for you though I feel we need another @SciTools/iris-devs to confirm that they are on board with our top-level approach?
@marqh may be best placed to help in this regards with his familiarity and involvement of the NetCDF specifications?
Thanks @djkirkham

@djkirkham - I'm in favour of the 0-1 range interpretation at load-time, if you want to go ahead and implement it. Would need a what's new, and some tests.

@djkirkham Just a check again; if you don't reply to this by the time I look at it again I'm taking it over.  Thanks for your work on this.


dropdown direction

Does this support dropdown direction auto?
Seems to always opens "down" even if the screen cuts it off. Would expect this to open "up" in that situation.

I solved this problem by adding floating-ui. Maybe you can try it.

Related: https://github.com/orchidjs/tom-select/issues/6


feat: add fetchProductionYearByFrameNumber

References CAR-7872
Motivation and context
We should use the production year from the VIN API response to populate the field.

Looks good to me!
Thank you 🌈
Is it possible to add a test?

This API is already covered by a unit test


First documentation pages

As a first set of documentation pages for potential users of HeFQUIN (users != developers who want to work on HeFQUIN itself), we need the following pages.

[ ] How to start the Web service via Docker, change the federation description that it uses, and how to issue queries to the service.
[ ] How to start the Web service from the latest release package, change the federation description that it uses, and how to issue queries to the service.
[ ] How to run queries using the CLI tool in the latest release package, including a detailed description of the arguments of the CLI tool.
[ ] How to run queries using the latest source code version of the CLI tool or the Web service.
[ ] How to specify the federation to be queried, including a documentation of the most important parts of the RDF vocabulary defined for this purpose.
[ ] Additionally, we need to create a README.txt file that we put in the top-level directory of the release packages and that contains a short version of these points above, including pointers to the respective documentation pages.
[ ] A similar summary of these points needs to be added to the README.md of the repo.

/cc @keski

I've added a first version of the usage summary to the README.md in the issue branch.
@hartig Is this on a good level of detail or did you have anything else in mind?

For the detailed instructions I assume we will be using the wiki?

I've added a first version of the usage summary to the README.md in the issue branch.

Which branch exactly? Is (or was) this in a PR?

For the detailed instructions I assume we will be using the wiki?

This question is related to one of the two proposals that I wanted you to work out (see my Malaga follow-up email).

Okay, I viewed the two as separate issues but now I see your point. I'll respond by email.
The branch I referred to with updated README is 346-first-documentation-pages.

I've copied and updated the instructions from the wiki and added them to the web page. Instead of linking to the source code, the class references are now linked to the Javadoc. I've also added some simplified user documentation: https://liusemweb.github.io/HeFQUIN/doc/
I've assumed that a release will look as described in https://github.com/LiUSemWeb/HeFQUIN/wiki/Release-Logistics

I've copied and updated the instructions from the wiki and added them to the web page. Instead of linking to the source code, the class and package references are now linked to the Javadoc.

Great. Thanks!
Yet, I understand all of these pages that have been in the wiki as documentation for contributors, not for users. Therefore, if we understand the "Docs" menu item on the Website as the entry point for the user documentation, then the links to these pages shouldn't show up there. Instead, we would need another menu item called, say, "Get Involved" (as on the Jena site) which is the entry point to the documentation pages for contributors.

I've also added some simplified user documentation: https://liusemweb.github.io/HeFQUIN/doc/

Thanks for that one as well! I haven't looked at it yet and understand that this is a first step towards a more comprehensive documentation for users (covering at least the points listed above). In this sense, we will have to think about how we are going to organize all these (user) documentation pages; in other words, we need some form of a table of contents for the user documentation.

I've assumed that a release will look as described in https://github.com/LiUSemWeb/HeFQUIN/wiki/Release-Logistics

Not sure what you wanted to say with this sentence ;-)
I understand that wiki page as another one of the pages that should be part of the contributors documentation.


Blank Page

I am trying to setup the admin for my existing instance but all I get is a blank page and some JS errors. Not sure if there is something I might have missed.

This was probably due to incorrect configuration. Getting the latest version and running quickstart script solved the issue.


org.xml.sax.SAXException: Error updating 'CVE-2018-17481'

### Issue
Last week I upgraded the dependency-check plugin version to 4.0.1 in my maven project and everything was okay. But today Jenkins failed to build the same project with below error:
01:00:43 [ERROR] Failed to execute goal org.owasp:dependency-check-maven:4.0.1:check (default-cli) on project account: One or more exceptions occurred during dependency-check analysis: One or more exceptions occurred during dependency-check analysis
01:00:43 [ERROR] org.xml.sax.SAXException: Error updating 'CVE-2018-17481'
01:00:43 [ERROR] org.owasp.dependencycheck.data.nvdcve.DatabaseException: Error updating 'CVE-2018-17481'
01:00:43 [ERROR] -> [Help 1]
01:00:43 [ERROR]
01:00:43 [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
01:00:43 [ERROR] Re-run Maven using the -X switch to enable full debug logging.
Nothing was changed, not sure why the build fails for 'CVE-2018-17481'.
I suppressed this vulnerability and again built the project, but the error persists.
Any thing changed with the dependency-check plugin recently?

try deleting the database under: ~/.m2/repository/org/owasp/dependency-check-data/3.0

Hi, I'm getting the same issue. I'm using the Jenkins plugin "Invoke OWASP Dependency-Check analysis" which is using dependency-check v4.0.2. When running a dependency check scan against a PHP project, it returned an error as per link below :
https://gist.github.com/aidanadia/e948d9593e8716d32053f60438619b66
Is there anything that I can do to fix this error?


AnkiConnect Issues When Game2Text Lightning is Minimized

This isn't really anything major but it is a slight inconvenience not being able to minimize the black box with scrolling text.
Flashcards cannot be created unless the Game2Text Lightning box is selected, and also if the Game2Text.exe is not visible.  Otherwise, it seems to be working fine.  I am using a window capture method targeting the game itself.

By black box you mean the window that holds the text?
Indeed it is a bug that the controller does not receive responses when the main application is hidden. I'm not sure why that's the case.

Oh sorry, I don't know much technical jargon. The "black box" I referred to meant the command prompt that runs alongside the main screen


Html not interpreted

Hello,
i don't know if it's a bug or if it's intended.
i have an action column inside my datatables, with a bunch of  elements.
in v6.24.1 it works but in v7.3.0 it doesn't work anymore, it shows plain html.
I suppose that my code is escaped somewhere, but i dont find where.
here is my code
return Datatables::of($clips)
            ->addColumn('action', function ($clip)
        {
            return view('client.clip._action', compact('clip'));
        })->make();

id) }}" class="btn btn-success btn-xs" title="View clip">
id. '/edit') }}" class="btn btn-primary btn-xs" title="Edit clip">

thanks

Duplicate of #1031. Use rawColumns. Thanks!

Hi yajra,
I trying to use rawColumns but doesn't work:
return Datatables::of($objects)
    ->addColumn('edit', function($object) {
        return '<button class="btn btn-sm">edit </button>';
    })
    ->editColumn('active', function($object) {
           if ($object->active) {
               return 'active';
           }
           return 'inactive';
})
->rawColumns(['active', 'edit', 'name'])
->make();

When I use ->escapeColumns([]) works well, but for all the columns and I want this only for three columns. I tried with ->escapeColumns(['active', 'edit', 'name']) but doesn't work either.
there is any way to do what i need?
thank you for your amazing workd :))


Metadata with keys starting with org_

To be compatible with Yoda servers we do not show metadata entries with keys starting with org_. However, one can create such metadata entries with iBridges, which then in turn are not listed in the meta object.
@qubixes  What shall we do about that?
I am not in favour of "blacklisting" keys, since that should happen on the iRODS server. But for now I would suggest to also throw at least a warning when someone creates such a blacklisted metadata item to be consistent in our software package. To be very consistent we can also throw an Exception "NotAllowed" ...

I don't think there are good solutions here on our side. I think throwing an exception will be the most consistent way indeed.

How does a Yoda system handle iCommands being able to create keys starting with _org?  Whatever the server policy, it should be client agnostic (or specific, if whitelisting)...

With the icommands you can create such metadata as a user. We excluded listing metadata with keys starting with "org_" since the Yoda system uses those keys to trigger certain behaviour on the server like replication. So it is not save for users to mingle with those metadata.
I think in a later version those keys will be protected by the Yoda system, but for now, we had to implement that into iBridges for our upload and download including metadata.
https://github.com/UtrechtUniversity/yoda/discussions/434

Makes sense.
Server should protect those (perhaps with https://github.com/irods/irods_rule_engine_plugin_metadata_guard/).


Revalidation queue for transaction pool

Probably last patch for transaction pool before major refactoring.
This changes how chain tip is processed in the transaction pool. For full pool, all pending transactions are sent to the revalidation queue and revalidated in background - oldest first. This should allow purge invalid transaction much faster and maintain more actual chain tip.
Revalidation queue is always async, but for light client it does not spawn background worker.

Ideally no background thread would be used, all the background tasks would be spawned by the service in order to be given names and to be diagnosable by the futures-diagnose library.

lgtm! @NikVolf did you have a chance to make sure it works correctly on a local chain or sth? Might be good to use @shawntabrizi script to populate the pool and see how it performs.

Yep, will do

lgtm! @NikVolf did you have a chance to make sure it works correctly on a local chain or sth? Might be good to use @shawntabrizi script to populate the pool and see how it performs.

I've checked intermediate versions with bench tool, will also check final one

Checked with highload of 10000tx again, all ok!


avr 328p, crystal and leds

If a crystal is used, this does make DDRB unusable for using it for the LEDs, as in the book? Or is there a trick to make it work?
The crystal is covering up the PB6 and PB7 pins.
Related:
https://github.com/hexagon5un/AVR-Programming/issues/24

Hi,
Yes it does -- those two pins are dedicated to the crystal oscillator amplifier internally, so if you use a crystal you can't use them as GPIOs.
For learning, I thought it was useful to have a full 8-bit block of GPIOs available.  It makes the whole "write to a register, and corresponding LEDs light up" much more intuitive.
But when you need more speed, you can get it by using those two pins for a crystal.


Fix Group Add to Lookup Users in Order to Get Necessary Properties

This allows us to insert users from a group query while retaining their name property. The group API returns data in this form: https://developers.google.com/admin-sdk/directory/v1/reference/members/list#response
However, that format only lists members with kind, etag, id, email, role, and type fields (no name). So since we now have an easy method to get a user, I just supply the id tag since it is another unique identifier.
In the future, we could look at doing a batch operation to get all users in the domain and then diff between the domain users and group users to select the ones we need with all necessary properties. This would cut down on the amount of calls being made in the event of a group having lots of users. That requires more logic on our part, so for now I'm avoiding it, but it is something that can be improved upon.
I also changed how the users are displayed in the add user flow to use a table. Seems to be a bit cleaner and makes it easier to quickly find whatever user an admin may be looking for.
Also I separated out the GetUser method into a regular version that just returns the user (for the group method to call) and a list version (for the template render to consume).

  :+1:

Reviewed 4 of 4 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from the review on Reviewable.io


Add missing RFC3339 to response, add tests

Description
An earlier PR was merged to add RFC3339 timestamps. I opened a corresponding PR to the google/jsonapi to add exactly what I had merged here. That got merged, then reverted because it looks like I had missed the Marshalling portion. That was then added to a followup PR.
This PR adds the marshalling of the RFC3339 timestamp tag, and also refactors some of the tests to use the table tests that this PR had.

Closing this in favor of reverting #6 and then merging upstream


Can modules use/mimic modules?

Hi Stefan,
Based on the documentation regarding modules and bundles, these appear to be very distinct separate pieces of functionality and the only way they interoperate is by bundles including modules. However bundles aren’t packaged up as OCI images (that I can see) so they’re not stored and version in a repository, so I suppose source control would be the only place to store these for reusability.
Essentially what I’m wondering is, can a module not have a dependency on another module along with its own resource, similar to how one might author a helm chart that includes a dependent chart plus other resources? This is of particular interest where you might have a reusable chart with some common pieces in which is included by a lot of other charts.
Understand this is the purpose of bundles but as these distinct from published and versioned modules, there’s no really good way to distribute these.
Is this a design decision or just something that’s not been considered so far?

Understand this is the purpose of bundles but as these distinct from published and versioned modules, there’s no really good way to distribute these.

Currently Bundles must be kept in Git and applied in CI. The Timoni Bundles/Modules relationship is similar to Docker compose files/container images, Terraform scripts/providers, Helmfile/charts, etc.
Distributing Bundles as OCI artifacts was problematic due to the embedded values, that in many cases would contain secrets. But now with the introduction of the Runtime API, where secret values could come from the cluster or from env vars (CI secrets) makes me comfortable with idea of packaging Bundles with their Runtime and distribute them somehow.

Can a module not have a dependency on another module along with its own resource, similar to how one might author a helm chart that includes a dependent chart plus other resources?

Thanks for the info, this all makes sense, I just wasn't sure of what the reasoning was.
I was specifically curious about how one might distribute a larger solution of multiple components as a single package that end-users can simply consume and provide values. I suppose an example could be something like a couple of service applications, and an optional set of data store components. Specifically so me as the author of the service can include the option of something like mysql or postgres and simply providing the option in the values to select which one but having authored the module, can ensure that the version and configuration for the data store would be compatible with the applications in the module. I suppose this could be considered an anti-pattern in some regards and should instead provide the requirements for the data store to the end-users rather than bundling, but that is commonplace with a lot of Helm charts and would certainly be useful for in-house things.

IMO Timoni Bundles are better suited to express complex applications than Helm umbrella charts as Timoni Bundles offer a clean separation between individual components (modules) and how they interact with each other. Unlike Helm values, a Timoni Bundle is a program, you take inputs from the runtime and you can configure the various interactions between the app components.
For example:

bundle: {
	_profile:  "dev"  @timoni(runtime:string:ENV)
	_password: string @timoni(runtime:string:REDISPASS)

	apiVersion: "v1alpha1"
	name:       "podinfo"
	instances: {
		//deploy redis only on dev, on prod use Amazon ElastiCache
		if _profile == "dev" {
			redis: {
				module: {
					url:     "oci://ghcr.io/stefanprodan/modules/redis"
					version: "7.0.11"
					digest:  "sha256:0e0f40e7824ff8c59e309d9b8bf19e235c6e779c93aafeeeaa86cbca49989950"
				}
				namespace: "podinfo"
				values: {
					maxmemory: 256
					readonly: replicas: 1
					password: _password
				}
			}
		}
		podinfo: {
			module: {
				url:     "oci://ghcr.io/stefanprodan/modules/podinfo"
				version: "6.3.6"
				digest:  "sha256:b317bc7e4736287af10cbf52f9c0f1e8cd1f8c180bba29bc563fe697bfa2dd3d"
			}
			namespace: "podinfo"
			values: {
				caching: {
					enabled: true
					// In-cluster Redis in dev
					if _profile == "dev" {
						redisURL: "tcp://:\(_password)@redis:6379"
					}

					// Amazon ElastiCache in production
					if _profile == "prod" {
						redisURL: "tcp://redis-01.7abc2d.0001.usw2.cache.amazonaws.com:6379"
					}
				}
				// HPA in production
				if _profile == "prod" {
					autoscaling: {
						enabled:     true
						minReplicas: 2
						maxReplicas: 10
						cpu:         90
					}
				}
			}
		}
	}
}

I think this makes a lot of sense, and having it more opinionated will likely lead to less abuse of capabilities like you see with Helm charts. I do like the clear separation, even if a bundle isn't packaged up.
As part of a bundle, can you also include resources as you would in a module? For example if you had a bundle to include some component but you then also needed to create something like a TargetGroupBinding resource for the AWS Load Balancer Controller, or perhaps an Istio VirtualService?

As part of a bundle, can you also include resources as you would in a module?

No, but as with the HPA example about, you could expose the some feature inside the module that you enable in the bundle and you set things like AWS Account ID, IAM Role, etc from the runtime.

Anyway I'm not dismissing the possibility in the future to allow an ad hoc resource set to be define inside Bundles.

Sure, appreciate its very early days. I'm very fond of things so far and curious how things develop over time so I've just been thinking about things I do currently with Helm or Kustomise and how those kinds of things will work with Timoni.
Currently I have a lot of clusters that use a lot of common off the shelf helm charts for things you'd expect like Prometheus, Grafana, cert manager and all that kind of stuff. So what I was wondering is should these be ported to Timoni modules, you wouldn't expect the module authors to cater for every kind of ingress solution that exists. I could use a bundle to install all my cluster dependencies, but I'd then have to create a distinct module to tie in the ingress. Current solution would be a wrapper chart that pulls in the component, and then includes say an Istio manifest to expose the service, or whatever kind of ingress controller you're using.
Perhaps having a dedicated module to tie all these things together isn't bad, it would be more clear in some ways, just a little more verbose.

Currently I have a lot of clusters that use a lot of common off the shelf helm charts for things you'd expect like Prometheus, Grafana, cert manager and all that kind of stuff.

How I would deploy these off the shelf Helm charts is by creating a Timoni module containing Flux HelmRelease definitions.
In the future I plan to create a Timoni controller for Flux, the Bundles would be fetched from Git or OCI by Flux source-controller and reconciled by timoni-controller.

How I would deploy these off the shelf Helm charts is by creating a Timoni module containing Flux HelmRelease definitions.

Sorry, I was meaning in a Timoni world where software creators offer native Timoni modules :)

Ah Ok I understand now, you would want to supply resources directly in the Bundle, instead of having some Module for the ingress or other glue material. Not sure if this doesn't blur the line too much, as Bundles then have to import Kubernetes schemas and CRDs... it gets fast really messy.

Yes that's what I was thinking exactly, and again I'm essentially transposing existing patterns here and just figuring out what the Timoni way would be.
I hadn't thought about the issues with the schemas for bundles. That would certainly over complicate things and make the whole experience worse. As you said before, if a Bundle is to Timoni what a compose file is to Docker, then you would want to keep that as clean and declarative as possible.

Anyway, thanks for taking the time to discuss, much appreciated. Happy if you want to close this issue off.

Hey @m13t today I've released Timoni v0.14.0 which comes with support for distributing bundles & runtimes. Please see https://timoni.sh/bundle-distribution/ and let me know if that helps.

Brilliant, I'll definitely take a look - thank you.


Parameterize dataproxy_url and timeout

The dataproxy url and timeout are hard-coded in recline.js
The dataproxy that everyone uses is unreliable: http://jsonpdataproxy.appspot.com/
I would like to be able to set the url and timout from a JSON file or some other method.

This works for me.
[/etc/ckan/default/production.ini]
[app:main]
...
ckan.recline.dataproxy_url = <<dataproxy url>>

I guess it's about CKAN. This works for me.
[/etc/ckan/default/production.ini]
[app:main]
...
ckan.recline.dataproxy_url = <<dataproxy url>>

based on this do I need to just add and leave it empty? as in 2.9 version there is no more that setting


[Question?] Mekanism metallurgic infuser Infusion material addition.

Now we can use infusion materials from only limited materials.
Is it possible technically to add more materials to infuse?
and if it's possible, do this become operation on ModTweaker side or other?

If you mean materials that get filled in the left bar (in the Infuser GUI) then no,
I don't think that this can done meaningful via ZenScript because you have to specify parameters like a texture name.

I see. why are you regard as no mean?
and I also think this suggestion may be in Content Tweaker field, Do I have to re-post for there?

Welll ContentTweaker is ZenScript and Voidi just said that it cannot be done easily with that :p

What is going on here?

Use your eyes to read Jared ;)

Ok so, if you are asking if it is possible to create an item in zenscript, then yes.
If you are asking for it to go on the side of the infuser to be turned into liquid (or whatever the infuser does with the stuff on the side), then no.


[BUG]  dubbo plugin:   requestBody parameters can not match the dubbo method parameters by names

Is there an existing issue for this?

[X] I have searched the existing issues

Current Behavior
dubbo method
@ShenyuDubboClient(path = "/batchSaveAndNameAndId", desc = "batchSaveAndNameAndId") public DubboTest batchSaveAndNameAndId(List<DubboTest> list, String id, String name) {     DubboTest test = new DubboTest();     test.setId(id);     test.setName("hello world shenyu alibaba dubbo param batchSaveAndNameAndId :" + name + ":" + dubboTestList.stream().map(DubboTest::getName).collect(Collectors.joining("-")));     return test; }
request body1
{"k1":[{"id":"1","name":"n1"},{"id":"2","name":"n2"}],"k11":"1","k2":"xxx"}
this will request success
request body2
{"id":"1","name":"xxx","list":[{"id":"1","name":"n1"},{"id":"2","name":"n2"}]}
this will request failed
Expected Behavior
I want requestBody parameters match the dubbo method parameters by names，not by order
Steps To Reproduce
No response
Environment
ShenYu version(s):

Debug logs
No response
Anything else?
No response

can you provide pr to fix it ？

Hi， @dongxl123
Dubbo Plugin already supports matching based on parameter names.
Plz see here : Dubbo Plugin#metadata

@ttttangzhen Tell it how to use annotations

We currently only support configuring name mapping through the page. If you need to configure name mapping through annotations, welcome to submit a PR to fix this.


go test the enh/shim branch

As title

Using this to manually test https://github.com/numba/texasbbq/pull/11

this is complete.


Boring resource names generated by the converter

What happened?
@thomas11 points out that rolling out the converter to providers generated diffs such as this one:
  - ///     var exampleGit = new AzureDevOps.Git("exampleGit", new()
  + ///     var exampleGit = new AzureDevOps.Git("example", new()

Notice that the name selected the resource is now "example" which is more boring than "exampleGit", and several resources are now all named "example". Granted, the original HCL also has lots of resources named "example", but we use to provide this little enhancement and now do not anymore.
There is no impact on validity, only aesthetics.
Example
resource "azuredevops_project" "example" {
  name = "Example Project"
}

resource "azuredevops_git_repository" "example" {
  project_id = azuredevops_project.example.id
  name       = "Example Repository"
  initialization {
    init_type = "Clean"
  }
}

resource "azuredevops_build_definition" "example" {
  project_id = azuredevops_project.example.id
  name       = "Example Build Definition"

  repository {
    repo_type = "TfsGit"
    repo_id   = azuredevops_git_repository.example.id
    yml_path  = "azure-pipelines.yml"
  }
}

resource "azuredevops_branch_policy_build_validation" "example" {
  project_id = azuredevops_project.example.id

  enabled  = true
  blocking = true

  settings {
    display_name        = "Example build validation policy"
    build_definition_id = azuredevops_build_definition.example.id
    valid_duration      = 720
    filename_patterns = [
      "/WebApp/*",
      "!/WebApp/Tests/*",
      "*.cs"
    ]

    scope {
      repository_id  = azuredevops_git_repository.example.id
      repository_ref = azuredevops_git_repository.example.default_branch
      match_type     = "Exact"
    }

    scope {
      repository_id  = azuredevops_git_repository.example.id
      repository_ref = "refs/heads/releases"
      match_type     = "Prefix"
    }

    scope {
      match_type     = "DefaultBranch"
    }
  }
}

Output of pulumi about
N/A
Additional context
N/A
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

I'd argue this is by design. We make the resource logical name match the terraform name.

Yeah. Feel free to close.

By aesthetics I just mean it doesn't affect pulumi up breaking. I see your POV but TF could do this as well (where examples are coming from). I get a sense that if you want to put time in to contribute a fix here Justin's team may be amenable - I'm sorry for writing "feel free to close" I guess I just don't feel as strongly about this one, should have let you write the ticket.

Yeah this kind of feature if we did it would need to be opt-in for documentation use case only.


Better test coverage

This aims to get the gem to 100% unit test coverage, as part of the final step before I feel comfortable putting it in production.

Note: more or less 100% coverage, achieving actually 100% by the metrics is sort of hard because part of the testing for this comes in the example app.


A working example with TypeScript?

Hey,
Can anyone provide a working TypeScript implementation with these packages?
    "storybook-addon-jsx": "7.0.1",
    "@types/storybook-addon-jsx": "5.4.2",
    "@storybook/react": "^5.0.3",

It's a game of whack-a-mole with all the errors this produces, ultimately I cannot make this work:
import React from 'react';
import { storiesOf } from '@storybook/react';
import { withKnobs, text } from '@storybook/addon-knobs';
import { jsxDecorator } from 'storybook-addon-jsx';

storiesOf('Chrome', module)
  .addDecorator(jsxDecorator) // error here
  .addDecorator(withKnobs)
  .add('Default', () => <Story />);

TS2345: Argument of type '(storyFn: RenderFunction, parameters: JSXParameters) => (ComponentClass<{}, any> & VueComponent) | (FunctionComponent<{}> & VueComponent) | (Element & VueComponent) | (Renderable[] & VueComponent)' is not assignable to parameter of type 'StoryDecorator'.
  Types of parameters 'parameters' and 'context' are incompatible.
    Type '{ kind: string; story: string; }' is missing the following properties from type 'JSXParameters': id, parameters```

I have tried using it as as addon instead, but that gives different errors.

Anyone got it working?

@types/storybook-addon-jsx doesn not reflect the 7.0 API. I'll get an example going

I've adjusted the types and it seem to work in my example project
https://github.com/storybooks/addon-jsx/pull/61
https://github.com/hipstersmoothie/addon-jsx-typescript-example

@hipstersmoothie — thank you, really appreciate the example. I now have it rendering the JSX.


Mention need to sign up for developer access in README

Just a pro account was not enough, I had to use this form as well
The custom block access seems to be a property of individual accounts, not organization's; my colleague and I both had to apply for access to get it to work.

Thanks for the clarification, fixed in the README already!


Improved Cornish translation of offline radar stations

Replacement for previous withdrawn pull request,

Thank you! Please hold off just a bit, we are going to be reworking this and adding a couple other error messages related to offline radar stations, so it might be best to do it all at once!

(Also, thanks for being super on top of maintaining the Cornish translation 😸)

It's a pleasure! And thank you for this great resource - your method of producing dynamic translations should be an inspiration to others.

OK, we have the English version ready! These are the lines needing translation: https://github.com/darkskyapp/translations/blob/master/lib/lang/en.js#L166-L171
And here are the new tests: https://github.com/darkskyapp/translations/blob/master/test_cases/en.json#L262-L267
Documentation can be found in the README! https://github.com/darkskyapp/translations#status-information

@ironwallaby I've just read online that the API will be closed down at the end of 2021 following the acquisition of DarkSky by Apple - I'm sad to hear that. I understand the commercial decision of course, but the loss of the translations will be a big blow to several minority languages.
Are there any alternatives you can think of?
Thanks for all your support over the years! :)


Set Up Cardano Indonesia Zoom Account

Tasks:

[x] Set up Cardano Indonesia Zoom account
[x] Create meeting template from the "Cardano Ecosystem" workshop + Team Meeting

Done. Meeting template created and Zoom account set up.


Bluetooth: Controller: DTM: Fix timer rollover

It changes the behaviour of while loop in lll_test.c in isr_tx() . When bug happens and t<s is quite big it can hapen that while loop will take a long time. This leads to setting up start of a radio timer before current timer value. This then leads to invocation of a timer after rollout and this will lead to very large delay in sending packet.
Fixes #42534.
Signed-off-by: Piotr Parfeniuk<EMAIL_ADDRESS>

@piotrParf ping, can you take a look at the review comments please?

Why do i got .github/labeler.yml Error: HttpError ?

@KAGA164 could you please comment on this proposed change?

@KAGA164 could you please comment on this proposed change?

@carlescufi I will check timings with Anritsu

@piotrParf  Please rebase and align your PR due to changes made by #42300. I included CTE time in the transmit time calculation.

The DTM Tx interval is incorrect with this fix because it doesn't follow the calculation from Core v5.3 Vol 6 Part F 4.1.6 where interval should follow basically pattern n*625us. I did a test on 1Mb PHY with payload length 37 bytes and I measured the 908us interval when it shall be 625us.

As I do not have proper tools for this what is your suggestion ?

@piotrParf I made PR with my proposal how to handle Tx timings in the DTM, Could you test it and give me a feedback ? https://github.com/zephyrproject-rtos/zephyr/pull/44735

@piotrParf I made PR with my proposal how to handle Tx timings in the DTM, Could you test it and give me a feedback ? #44735

For me it is many changes to 2.7.0 but it looks like it works when loaded with this controller to network core.


UPDATE!!!

pls update to dragonfly 0.2.0 :)

pls update to dragonfly 0.2.0 :)
I will have a look at it soon. :)


Update euler-angles.ipynb

Fixes #416, and some typos

thanks for fixing this eric!

Looks like I didn't actually commit the test, only the fix...


Add status to operator when it has trouble talking to GitHub

The Problem
GitHub Outage
Within the last day github had a significant outage: https://www.githubstatus.com/incidents/sksd097hm0y5?utm_ts=1647526099
While this outage occurred, github-actions-runner-operator experienced errors communicating with github.
While trying to debug this, I visited https://github.com/settings/tokens and tried to generate a token, the result of which was:

Runner Pod Logs

Http response code: InternalServerError from 'POST https://api.github.com/actions/runner-registration'

Operator Pod Logs

ERROR controller.githubactionrunner Reconciler error

{
   "reconciler group": "garo.tietoevry.com",
   "reconciler kind": "GithubActionRunner",
   "name": "basic-runner-pool",
   "namespace": "github",
   "error": "POST https://api.github.com/orgs/GarnerCorp/actions/runners/registration-token: 500  []"
}

DEBUG	events	Warning

{
  "object": {
    "kind": "GithubActionRunner",
    "namespace": "e2e-tests",
    "name": "e2e-runner-pool",
    "uid": "c855cc0e-a161-4673-b7ae-4c4e316f00bf",
    "apiVersion": "garo.tietoevry.com/v1alpha1",
    "resourceVersion": "533367216"
  },
  "reason": "ProcessingError",
  "message": "failed to get installation for owner \"GarnerCorp\": GET https://api.github.com/orgs/GarnerCorp/installation: 500  []"
}

Environment
I am using:
dependencies:
  - name: github-actions-runner-operator
    version: 2.5.5
    repository: https://evryfs.github.io/helm-charts/

I have since upgraded to 2.7.0 but the behavior persists.
Proposed Enhancements
When a github API call fails, it would be very useful to add a status to the GithubActionRunner saying that it is having an issue, especially in the case where it is a reconciler error

Thank you for the thorough report. This should already be the case. Example from our cluster:
k describe gar dts-default-pool|tail -27
  Reconciliation Period:  30s
Status:
  Conditions:
    Last Transition Time:  2022-03-17T20:19:30Z
    Message:
    Observed Generation:   50
    Reason:                LastReconcileCycleSucceded
    Status:                True
    Type:                  ReconcileSuccess
    Last Transition Time:  2022-03-17T15:22:43Z
    Message:               failed to get installation for owner "tietoevryfs": GET https://api.github.com/orgs/tietoevryfs/installation: 500  []
    Observed Generation:   50
    Reason:                LastReconcileCycleFailed
    Status:                True
    Type:                  ReconcileError
  Current Size:            1
Events:
  Type    Reason   Age   From                Message
  ----    ------   ----  ----                -------
  Normal  Scaling  151m  GithubActionRunner  Created pod garo-default-runner-pool/dts-default-pool-pod-cxdh9
  Normal  Scaling  150m  GithubActionRunner  garo-default-runner-pool/dts-default-pool-pod-52qvs
  Normal  Scaling  147m  GithubActionRunner  Created pod garo-default-runner-pool/dts-default-pool-pod-txgtr
  Normal  Scaling  146m  GithubActionRunner  Created pod garo-default-runner-pool/dts-default-pool-pod-r8gdk
  Normal  Scaling  146m  GithubActionRunner  Created pod garo-default-runner-pool/dts-default-pool-pod-7mnmv
  Normal  Scaling  120m  GithubActionRunner  garo-default-runner-pool/dts-default-pool-pod-cxdh9
  Normal  Scaling  114m  GithubActionRunner  garo-default-runner-pool/dts-default-pool-pod-txgtr
  Normal  Scaling  113m  GithubActionRunner  garo-default-runner-pool/dts-default-pool-pod-r8gdk

do you have the latest CRD applied in the cluster?

Closing since no activity and this is already supported. Feel free to re-open should there be anything else.


Remove virtual destructor since there are no virtual methods or subclasses

As stated in https://github.com/SRombauts/SQLiteCpp/pull/139, virtual destructors have (currently) no use case

Coverage remained the same at 96.312% when pulling ec8253236b44f2155e52e83a4401209b7bee9818 on fekir:clean_destructors into 5479cc09bfe43109b15219f3a5530b08c20ed0b0 on SRombauts:master.

I've already removed the comment when I removed the nothrow statement and throw() comment

Thanks again!


Naming-Conflict with Nested Classes or Structs

class TestOne {
    struct Item {
        let value: String
    }
}

class TestTwo {
    struct Item {
        let value: Int
    }
}

dataSource.sections = [Section(items: [TestOne.Item(value: "Hello"), TestTwo.Item(value: 5)])]

This will force a crash because String(describing: type(of: item) will always return Item instead of needed TestOne.Item, TestTwo.Item. So all Items do have the same identifier and cellDescriptor will fail.

String(reflecting: type(of: item)) could be used instead. It returns the full class name. Including Module though, e.g. MyApp.TestOne.Item
(if you try it in Playground it'll be something like __lldb_expr_77.TestOne.Item)


Install Barcode.h as it's used in the installed ReadBarcode.h

Fixes compilation for consumers using installed headers.

Ups... thx.


Could we move to go modules?

Currently, the instructions to fetch the repo, play with samples, and run the logs CLI are:
git clone https://github.com/pivotal/kpack \
   $GOPATH/src/github.com/pivotal/kpack
cd $GOPATH/src/github.com/pivotal/kpack
dep ensure
go run ./cmd/logs

If we move to go modules, then I think these instructions become nicer, and less dependent on old $GOPATH:
git clone https://github.com/pivotal/kpack
cd kpack
go run ./cmd/logs

We attempted this migration but encountered issues with codegen and the version of kubernetes that knative pulls in. So I'm going to reopen this issue until we have a path forward.

Probably the easiest path forward is to use kubebuilder 2. We started to use it for riff and I'm happy so far. The only downside I've encountered is that an api server and etcd are created to run the tests. Knative had a nice setup with fake clients.

I do ❤ our knative fake tests


CTC gives sequence length error in Tensorflow but works in Theano

Please make sure that the boxes below are checked before you submit your issue. If your issue is an implementation question, please ask your question on StackOverflow or join the Keras Slack channel and ask there instead of filing a GitHub issue.
Thank you!

[+ ] Check that you are up-to-date with the master branch of Keras. You can update with:
pip install git+git://github.com/keras-team/keras.git --upgrade --no-deps

[ +] If running on TensorFlow, check that you are up-to-date with the latest version. The installation instructions can be found here.

[ +] If running on Theano, check that you are up-to-date with the master branch of Theano. You can update with:
pip install git+git://github.com/Theano/Theano.git --upgrade --no-deps

[ +] Provide a link to a GitHub Gist of a Python script that can reproduce your issue (or just copy the script here if it is short).

I get a sequence length error when using ctc with tensorflow background but the same code runs while I am on theano background. I am using CTC to recognize online handwriting strokes and have modified the image_ocr.py example for this. My input shape is (1000,1586,4) and output shape (1000,56). All sequences a padded to 1586 length and I don't understand why sequence length error comes up and input sequence length is always greater than the output labels length. Following is the model and part of code:
inputs = Input(name='the_input', shape=x_train.shape[1:], dtype='float32')
rnn_encoded=Bidirectional(LSTM(64,return_sequences=True,kernel_initializer='lecun_normal'),name='bidirectional_1',merge_mode='concat',trainable=trainable)(inputs)
birnn_encoded=Bidirectional(LSTM(32,return_sequences=True,kernel_initializer='lecun_normal'),name='bidirectional_2',merge_mode='concat',trainable=trainable)(rnn_encoded)
output = TimeDistributed(Dense(28, name='dense',kernel_initializer='lecun_normal'))(birnn_encoded)
y_pred = Activation('softmax', name='softmax')(output)
model=Model(inputs=inputs,outputs=y_pred)
labels = Input(name='the_labels', shape=[max_len], dtype='int32')
input_length = Input(name='input_length', shape=[1], dtype='int64')
label_length = Input(name='label_length', shape=[1], dtype='int64')
loss_out = Lambda(ctc_lambda_func, output_shape=(1,), name='ctc')([y_pred, labels, input_length, label_length])
model = Model(inputs=[inputs, labels, input_length, label_length], outputs=loss_out)
batch_size=10
ada=RMSprop(lr=0.001,clipnorm=1.)
model.compile(loss={'ctc': lambda y_true, y_pred: y_pred}, optimizer=ada)
my_generator = generator(x_train,y_train,batch_size)
model.fit_generator(my_generator,steps_per_epoch=100,epochs=21,use_multiprocessing=False,shuffle=True)
The full code is here: [(https://github.com/aayushee/HWR/blob/master/CTC4D.py)]
If anyone can explain what's wrong while running the code on Tensorflow that would be great. This is the error I am getting:
InvalidArgumentErrorTraceback (most recent call last)
 in ()
56
57 my_generator = generator(x_train,y_train,batch_size)
---> 58 model.fit_generator(my_generator,steps_per_epoch=steps,epochs=epoch,shuffle=True)
59
60 test_func = K.function([inputs], [y_pred])
/usr/local/lib/python2.7/dist-packages/keras/legacy/interfaces.pyc in wrapper(*args, **kwargs)
89                 warnings.warn('Update your ' + object_name +      90                               ' call to the Keras 2 API: ' + signature, stacklevel=2)
---> 91             return func(*args, **kwargs)
92         wrapper._original_function = func
93         return wrapper
/usr/local/lib/python2.7/dist-packages/keras/engine/training.pyc in fit_generator(self, generator, steps_per_epoch, epochs, verbose, callbacks, validation_data, validation_steps, class_weight, max_queue_size, workers, use_multiprocessing, shuffle, initial_epoch)
2228                     outs = self.train_on_batch(x, y,
2229                                                sample_weight=sample_weight,
-> 2230                                                class_weight=class_weight)
2231
2232                     if not isinstance(outs, list):
/usr/local/lib/python2.7/dist-packages/keras/engine/training.pyc in train_on_batch(self, x, y, sample_weight, class_weight)
1881             ins = x + y + sample_weights
1882         self._make_train_function()
-> 1883         outputs = self.train_function(ins)
1884         if len(outputs) == 1:
1885             return outputs[0]
/usr/local/lib/python2.7/dist-packages/keras/backend/tensorflow_backend.pyc in call(self, inputs)
2480         session = get_session()
2481         updated = session.run(fetches=fetches, feed_dict=feed_dict,
-> 2482                               **self.session_kwargs)
2483         return updated[:len(self.outputs)]
2484
/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.pyc in run(self, fetches, feed_dict, options, run_metadata)
898     try:
899       result = self._run(None, fetches, feed_dict, options_ptr,
--> 900                          run_metadata_ptr)
901       if run_metadata:
902         proto_data = tf_session.TF_GetBuffer(run_metadata_ptr)
/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.pyc in _run(self, handle, fetches, feed_dict, options, run_metadata)
1133     if final_fetches or final_targets or (handle and feed_dict_tensor):
1134       results = self._do_run(handle, final_targets, final_fetches,
-> 1135                              feed_dict_tensor, options, run_metadata)
1136     else:
1137       results = []
/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.pyc in _do_run(self, handle, target_list, fetch_list, feed_dict, options, run_metadata)
1314     if handle is None:
1315       return self._do_call(_run_fn, feeds, fetches, targets, options,
-> 1316                            run_metadata)
1317     else:
1318       return self._do_call(_prun_fn, handle, feeds, fetches)
/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.pyc in _do_call(self, fn, *args)
1333         except KeyError:
1334           pass
-> 1335       raise type(e)(node_def, op, message)
1336
1337   def _extend_graph(self):
InvalidArgumentError: sequence_length(0) <= 1584
[[Node: ctc_1/CTCLoss = CTCLoss[_class=["loc:@training_1/RMSprop/gradients/ctc_1/CTCLoss_grad/mul"], ctc_merge_repeated=true, ignore_longer_outputs_than_inputs=false, preprocess_collapse_repeated=false, _device="/job:localhost/replica:0/task:0/device:CPU:0"](ctc_1/Log, ctc_1/ToInt64, ctc_1/GatherNd, ctc_1/ToInt32_1)]]
Thanks!

Hi ! I have the same issue here, does anyone have any info on this ? Did you eventually make it work on Tensorflow ?
Thanks !


Feature request: PayPal Billing Solution in CaptivePortal

Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
[+] I have read the contributing guide lines at https://github.com/opnsense/core/blob/master/CONTRIBUTING.md
[+] I have searched the existing issues and I'm convinced that mine is new.
Is your feature request related to a problem? Please describe.
Describe the solution you'd like
I would like to ask for a PayPal billing solution on the portal-site.
So that you can enter a voucher on the portal-site or have the opportunity to buy one via PayPal.
Describe alternatives you've considered
Additional context

I agree with the request

Hi i did something similar with stripe and a raspberry running flask(python). you could do something like this easily with php by following a tutorial on youtube.
for exemple assuming you sell a voucher for $5, the user connect to your captive portal click on buy and he is redirected on the checkout page of stripe Be sure to add this to work with webview
Now you can charge his card and give him his voucher.
and because its a captive portal you need to enter the checkout.stripe.com, api.stripe.com, js.stripe.com,
m.stripe.network and q.stripe.com ips in the bypass section of the captive portal and in the acl of squid (the proxy). to make the stripe ips static you can specify them in the override section of unbound or dnsmask :smiley: good luck lol

This issue has been automatically timed-out (after 180 days of inactivity).
For more information about the policies for this repository,
please read https://github.com/opnsense/core/blob/master/CONTRIBUTING.md for further details.
If someone wants to step up and work on this issue,
just let us know, so we can reopen the issue and assign an owner to it.

Actually I made my own solution using Stripe and Flask on a VPS https://github.com/RomanJos/CaptivePortalStripe


realm: Allow setting notification settings to unsubscribed private streams.

We previously did not allow setting signup_notifications_stream and notifications_stream
settings to private streams that admin is not subscribed to, even when admins have access
to metadata of all the streams in the realm and can see them in the dropdown options as well.
This commit fixes it to allow admins to set these settings to private streams that the admin is not subscribed to.

Fixes: https://chat.zulip.org/#narrow/stream/9-issues/topic/.F0.9F.8E.AF.20private.20stream.20for.20announcements

Screenshots and screen captures:

Self-review checklist

[ ] Self-reviewed the changes for clarity and maintainability
(variable names, code reuse, readability, etc.).

Communicate decisions, questions, and potential concerns.

[ ] Explains differences from previous plans (e.g., issue description).
[ ] Highlights technical choices and bugs encountered.
[ ] Calls out remaining decisions and concerns.
[ ] Automated tests verify logic where appropriate.

Individual commits are ready for review (see commit discipline).

[ ] Each commit is a coherent idea.
[ ] Commit message(s) explain reasoning and motivation for changes.

Completed manual review and testing of the following:

[ ] Visual appearance of the changes.
[ ] Responsiveness and internationalization.
[ ] Strings and tooltips.
[ ] End-to-end functionality of buttons, interactions and flows.
[ ] Corner cases, error conditions, and easily imagined bugs.

Merged, thanks @sahil839!


Allow user values to override drop-determined values

Via https://github.com/jekyll/github-metadata/pull/108#issuecomment-325817689, it appears user-supplied site.github values are being overwritten by drop-supplied values.
It appears in https://github.com/jekyll/github-metadata/commit/54942a488f493a346d709c208799558afc012a5a#diff-165b64b2f6bce98447b6c550f3205ad9L26, the order of the arguements passed to Jekyll::Utils.deep_merge_hashes were reversed since the right overrides the left value.
This PR adds failing tests via a7d2b4b to ensure site.github is set to the expected value given different user-supplied inputs for site.github with d36d1af reversing the order of the arguments.
/cc @DirtyF

@benbalter FWIW I just did a test with this branch and it does still output the drop value from GitHub, not the one from the local config file, even with the switch of the arguments of deep_merge_hashes. 🤔

@DirtyF backported (forward-ported?) https://github.com/jekyll/jekyll/pull/6338 via 7a97ed0. Let me know if things work as expected now?

@benbalter  the issue is not resolved in my case{{ site.github.source.branch }} still output gh-pages  😞

@DirtyF see https://github.com/jekyll/jekyll/pull/6338#issuecomment-327234319. Mind giving it one more try? (I tested locally with a test site and it worked as expected).

Test: DirtyF/frank.taillandier.me@85987a8

Tested locally and go the following (expected) output:

Une correction à apporter ? Éditez cet article.

@jekyllbot: merge +minor.


Options to integrate with Lit

Hi @gordonbrander, I really like spellcaster’s api design 👌. I wondered if you wanted to include options/examples for Lit integration if like me you don’t want to use your custom hyperscript. I’ve converted how withWatch, watch() directive and signal watcher works for preact-signals Lit integration to make it work with Spellcaster. Here is the codepen. What do you think?

@woodcox can you say more about what you're looking to accomplish?
Lit is in the process of integrating native signals. Since Spellcaster's APIs also use native signals/the same polyfill, it should work with Lit's signals integration.

@gordonbrander as I said I really like the api design and I was looking at straight forward/standards aligned options for sharing state in a small web based game. I was looking at lit or uhtml/reactive along with Spellcaster. The TC39 proposal for signals seems to be really well thought out and I wanted to use a signals library that was built on top of it.
Thanks for sharing the news that Lit is shipping the watch directive for TC39 signals. I had not realised lit was in the process of supporting signals. I’ll give that a go with Spellcaster and make sure it works as expected and will fit my use case.


Property 'MAX_SAFE_INTEGER' does not exist on type 'NumberConstructor'

TypeScript Version:  1.8.10
Code
let smallestDistance = Number.MAX_SAFE_INTEGER;

Expected behavior: smallestDistance equals the biggest possible integer value.
Actual behavior: Compiler error:

Property 'MAX_SAFE_INTEGER' does not exist on type 'NumberConstructor'

I discovered that there exists Number.MAX_VALUE but should not TS be backwards compatible with JS?

This should be in the ES6 lib

Number.MAX_SAFE_INTEGER had been implimented in ts2.0.0 beta (see here).
If you want to use this, upgrade ts version and set "lib": ["es2015"] for compilerOptions.
Or make .d.ts file, and write following code:
interface NumberConstructor {     readonly MAX_SAFE_INTEGER: number; }

Thanks for the heads up @YuichiNukiyama!

Use MAX_VALUE or POSITIVE_INFINITY instead of MAX_SAFE_INTEGER
lib.es5.d.ts
interface NumberConstructor {
    new (value?: any): Number;
    (value?: any): number;
    readonly prototype: Number;
    readonly MAX_VALUE: number;
    readonly MIN_VALUE: number;
    readonly NaN: number;
    readonly NEGATIVE_INFINITY: number;
    readonly POSITIVE_INFINITY: number;
}