Is there a grammatically way to execute Node.js scripts via the Context API

Hey there
Is it possible to execute/eval a Node.js script from the Context API? I can execute a hello world script via the GraalVM node binary:
const http = require('http');

const name = 'node-hello-world';
const port = '8888';

const app = new http.Server();

app.on('request', (req, res) => {
    res.writeHead(200, {'Content-Type': 'text/plain'});
    res.write('Hello World');
    res.end('\n');
});

app.listen(port, () => {
    console.log(`${name} is listening on port ${port}`);
});

But that doesn't work for the Java API:
import org.apache.commons.io.IOUtils;
import org.graalvm.polyglot.Context;

import java.io.InputStream;
import java.nio.charset.StandardCharsets;

public class NodeJsLauncher {

    public static void main(String[] args) throws Exception {
        new NodeJsLauncher();
    }

    public NodeJsLauncher() throws Exception {
        InputStream inputStream = getClass().getResourceAsStream("/HelloWorld.js");
        String helloWorldScript = IOUtils.toString(inputStream, StandardCharsets.UTF_8);

        Context context = Context.create();
        context.eval("js", helloWorldScript);
    }
}

Output:
Exception in thread "main" ReferenceError: require is not defined
	at <js> :program(Unnamed:1:13-19)
	at org.graalvm.polyglot.Context.eval(Context.java:336)
	at NodeJsLauncher.<init>(NodeJsLauncher.java:18)
	at NodeJsLauncher.main(NodeJsLauncher.java:10)

Process finished with exit code 1

Does the js language even support JavaScript with the Node.js module loading system? Or is it just not enabled:
Graal.js can execute Node.js applications. It provides high compatibility with existing npm packages, with high likelyhood that your application will run out of the box. This includes npm packages with native implementations. Note that you will need to re-compile from source with Graal.js if you want to run binaries that have beeen compiled for Node.js based on V8, or any other compatible engine.

Background: I am in the process of developing a Java solution that is able to server side render Angular SPA applications. The server side rendering requires some Node.js modules, so solutions like J2V8 (or maybe GraalVM) are required. For more information see https://github.com/swaechter/angularj-universal

Hi Simon,
thanks for your interested in our engine.
Yes, what you ask for makes sense of course. However, consider that Node.js is a native application. Our approach is to base on Node.js sources directly - with only the JavaScript engine replaced - without major changes in the Node.js source code or its build process. This implies that, for Node.js support, you currently need to start Node.js as main (native) application. From there, you are free to call into Java and start whatever you want. Starting from Java and only then calling into Node.js would mean to deprive Node.js of all native access to e.g. signals, and it's unclear how the event loop would be started this way - we would have to significantly interfere the way it is started and managed.
This limitation is the reason why the Polyglot feature gives you a "pure" JavaScript (ECMAScript) engine, and not Node.js. Note that you can use load to eval external files, although that will only work for code not depending on the event loop and other core Node.js features.
We are currently working on APIs and code examples to do this nicely without running into threading problems. We could already show in experiments how to submit entries back into the Node.js event loop from Java. You want to avoid a scenario where your interop call (e.g., your Java application) blocks the event loop. We will address this in one of our next blog posts on Graal.js.

Hey Christian
Thank you very much for the detailed explanation. This of course makes sense, so it's easier to keep up to date with the latest Node.js/V8 engine and profit from the work done there (Also you don't have to reinvent the wheel).
Best,
Simon

Hi,
Does enabling the v8-compat option when initialising a Context for JS execution bring any of the Node functionality (obviously not the core stuff like event loop, etc)?
I am wondering specifically about the require module. I have done a quick test:
Context ctx = Context.newBuilder().option("js.v8-compat", "true").build();
String jsCode = "const someLib = require('/someLib.js');";
ctx.eval("js", jsCode);
ctx.close();

But I get the same error that @swaechter was getting: require is not defined. Perhaps the require module is part of the native Node package and not the V8 engine?
Thanks
Edoardo.

Hi Edoardo,
exactly, we don't implement require, that's provided by Node.js.
As an alternative, we offer load (https://github.com/graalvm/graaljs/blob/master/docs/user/JavaScriptCompatibility.md#loadsource), which might or might not work on npm modules.
Best,
Christian

@edopalmieri is there a way to run a command from within the context? such as node myJsFile.js --jvm ? So that we can pass the result of the command back into the Java application just as if it was normally run with context.eval("js", "....");

Hi @StephenOTT
From my understanding so far, what you are proposing is not possible. I think only two alternatives exist:

Use load() inside the JS code to execute your myJsFile.js
Execute myJsFile.js using ctx.eval() and then inject then result back into the ctx when running the code that needs it using the bindings.

Perhaps the Graal guys can suggest more approaches. I would be interested to know myself as I am trying to figure out a way to provide some sort of dependency importer/manager to my guest code.
Cheers
Edoardo.

@edopalmieri, I had been playing around for using something like Process Builder to execute a node command as a CLI command and execute the specific .js file and then read back the result into a stream.
Had mixed results depending on argument usage, but generally it worked.
would be nice if this was built into the gralljs usage rather than having to jump through the hoops of processbuilder and streams.  There is definitely the startup time factor of the node command, but if overall speed is not a concern and you are more concerned about specific usage of node modules, then this works well.

Hi @StephenOTT, I am guessing you mean java.lang.ProcessBuilder right?
That makes sense! It sounds like a nice work around to the problem, but I agree: it would be nice if it was offered as a feature of Graaljs. Perhaps it is in their roadmap ...
Thanks for sharing your solution
Edoardo.

@edopalmieri  yes Java lang processbuilder. 👍🏻

Hi @edopalmieri I am trying to load index.js from my java code
function prepareMessage(message) {     var str = "Hello ";     str += message;     return str; } exports.prepareMessage = prepareMessage;
var index = load('./message.js'); console.log("Display message:"+index.prepareMessage('World!!!!'));
Context context = Context.newBuilder("js").allowIO(true).build(); context.eval("js", "load('index.js');"); context.close();
I am getting Exception in thread "main" TypeError: Cannot load script: index.js 	at <js> :program(Unnamed:1:0-15) 	at org.graalvm.polyglot.Context.eval(Context.java:361) 	at com.ge.hac.test.main.IndexTest.callIndex(IndexTest.java:29) 	at com.ge.hac.test.main.IndexTest.main(IndexTest.java:18)
Does this work?
Basically I want to evaluate that If I can do 'require' (only which is Node JS feature) in javascript and can be invoked from java 11 or not?

Hi @mahesh-kharat
(thanks @edopalmieri for your answer)
It is working for me. As Edoardo wrote, most likely, the index.js file might not be found, it needs to be in the root of your java app (i.e. in the same directory as your java file, if this uses the default package).
But then, as Edoardo wrote, you need to use pure JavaScript syntax and cannot use Node.js concepts (like export). load will parse and evaluate the file; the prepareMessage function will then be in the global scope, you cannot put it in export (which does not exist - of course you could provide it from index.js).
index.js
var exports={};
load('./message.js');
console.log("Display message:"+exports.prepareMessage('World!!!!'));

Best,
Christian

Thank you for replying @edopalmieri @wirthi
@wirthi I was able to run above example after putting those index.js and message.js in project's default location. Thanks for pointing out.
I wanted to know if we can run "Node modules from jdk 11 using graalvm". In above example I have changed require to load to fetch dependency (as it's custom implementation). I have a requirement where I have to use third party dependencies like d3, d3-node and many other where I can't change require to load. In that case will it be possible to execute node modules from jdk 11 using graalvm?

Hi @mahesh-kharat
short answer: no, not possible.
long answer: Node.js is a binary application. It cannot trivially be started from within a running JVM. Longer-term, we are working towards enabling such a setup, but it will require some modifications in core Node.js code that we typically want to avoid in order not to break compatibility. The easiest way forward, if that is possible for you, is to use <GraalVM>/bin/node --jvm and start you Java code from there. https://medium.com/graalvm/multi-threaded-java-javascript-language-interoperability-in-graalvm-2f19c1f9c37b can give you some hints how to be do that.
Best,
Christian

IMO, being able to run Node modules from within a Java-based Graal application is likely to be a common request. I'm looking into it too. I'm wondering if a project is needed to create Javaised polyfills for the built-in Node modules. If they existed, anyone could run Node modules in their Java apps.

I had this issue before with Nashorn, and endup using Nodyn's package loader. I created a repo with an example of my approach. You can also see this working in a larger project.
I hope this helps someone!

Hi @wirthi ,
is there per chance any publicly accessible information about this longer-term work you mentioned? It would be great if it was tracked as a Github issue, so people can get notified on eventual progress :)
On a sidenote, in our particular case we'd just like to be able to require any npm modules from Java, which in turn should be able to use Node API like fs. If this was possible without spinning up a Node.js event loop, that would be even better!
I guess that in the case of a Java web server that wants to make use of npm modules, there probably is no need for a Node.js event loop?

hey  @wirthi .

We are currently working on APIs and code examples to do this nicely without running into threading problems. We could already show in experiments how to submit entries back into the Node.js event loop from Java. You want to avoid a scenario where your interop call (e.g., your Java application) blocks the event loop. We will address this in one of our next blog posts on Graal.js.

Is there any code example for  message passing from java back to node under  node --jvm mode ?
As you mentioned , submit entries back into the Node.js event loop from Java . node thread may receive message from java call as blocking async ,  but it's no a eligent style.
I still look for a postMessage style api for java side to pass new message into node event pool.
for example.
// node side

javaPort.on("message", handler)

//java side

nodeThread.getChannel().postMesasage("new message")

Is 'require' now supported in Graal Context as per this release -
https://github.com/graalvm/graaljs/blob/master/docs/user/NodeJSVSJavaScriptContext.md#commonjs-modules-cjs

It is as written in the docu you link:

The js.commonjs-require option provides a built-in require() function that can be used to load Npm-compatible CommonJS modules in a JavaScript Context. Currently, this is an experimental feature not for production usage.

It is available behind a flag, is experimental and provides only partial support (similar to what tools like browserify or webpack provide). E.g., you cannot access the Node.js eventloop that way.

Hi! I'm trying to do a Fetch request from js inside a java program. what is the best way to do this?

Hi! @wirthi, @swaechter, I don't understand why this ticket is closed. Without the possibility to call node.js functions and use npm packages from languages implemented on top of Truffle, the whole promise of GraalVM inter-language interoperability is fundamentally broken. JS runtime alone is not really useful for anything serious. The whole power of JS is in the npm ecosystem which bases on node.js functionality. What would we need interoperability with JS for if we cannot use npm and its server-side packages, so we cannot utilize the power of most useful js libs out there?
Also, I believe that the documentation on the official GraalVM website is confusing. There are a lot of fragments like these:

Or this one:

Our whole team and some people in our community were really surprised that we cannot use node.js modules from within our language after spending weeks on implementing the JS support, because the website is (at least for us) selling this idea, being very unclear that GraalVM doesn't support interoperability with JavaScript and Node. It only provides a special Node version that can be used to run JavaScript which can call other languages but not vice versa.
To sum this up, I believe this ticket should be open and we should consider calling node.js modules from within languages implemented on the Truffle framework as one of the top priorities of the JS interop, as without this functionality, the interop with JS from other languages is not very useful to anything serious.

Hi @wdanilo
You can execute Node.js application. node yourApplication.js will work.
You can interop from your Node.js application to Java and to all Polyglot Truffle languages we support (Ruby, Python, LLVM, etc.)
True, what you cannot do is to interop from a Java application to a Node.js application. Why? Because Node.js is a binary application, not a language. You cannot interop from, say, Ruby to Node.js for the same reason you cannot interop from Ruby to Eclipse, or vi, or Microsoft Word: those are applications that expect that their own launcher is executed, in order to set everything up. So in order to get the (full) support of Node.js - event loop, etc - your application needs to start from the node binary.
There are several workarounds for this limitation, quoted both here above in this ticket an in e.g. https://github.com/oracle/graaljs/issues/321, or in our documentation at https://github.com/oracle/graaljs/blob/master/docs/user/NodeJSVSJavaScriptContext.md You can package your Node.js application, you can use our experimental module loading support, and you can use the NodeJVM approach to wrap an existing Java Application with the Node launcher.
(Re-)Implementing Node.js in Java so you can REALLY call it as a language is a possibility. It requires some engineering effort, but it is technically feasible. The problem is that you will have to follow up all future changes and include them to this port to ensure compatibility. In our current approach, we take the Node.js source code (mostly) unmodified, which allows for more straightforward updates when a new Node.js version comes out. If anyone is up for this task, we are happy to support you and help you get it done. There are no efforts from our side in this respect currently, because we believe the current approach is good enough to support reasonable applications and the engineering effort of re-implementing the core of Node.js in Java is too high with too big a risk of having to maintain a still-not-fully-compatible port (been there, done that: Project Avatar).
The open ticket we have in this area is https://github.com/oracle/graaljs/issues/321 - but again, we are not actively working on this solution at the moment. Happy to receive reasonable external contributions, of course.
Best,
Christian

Hey @wdanilo Altough I understand your astonishment/frustration I want to share some of my own thoughts about one of your statements:
The possibility to use npm modules and call node.js functions from GraalVM / languages built on top of the Truffle framework is a fundamental promise of seamless languages interoperability
In theory language interoperability (Like using Node.js from a JVM and even vice versa) sounds great: You can share & design code/components in different languages so these components can interop with each other and code can be reused. But this flexibilty has its price: Mainly complexity. In the end I gave up on tools like J2V8 (https://github.com/eclipsesource/J2V8) or GraalVM not because of the tool itself, but because the developer experience suffers. In my Angular server side rendering project I had to develop an own hot reload mechanism for the JS code and the Java application that loads this code (If JS restarts, Java has to reload too). Debugging it accross the language barrier...let's just say difficult. I guess this is just the polyglot nature or in short: There is no 'seamless languages interoperability` as you say (Sorry Graal devs :( ).
To sum this up: Rethink if you really need language interoperability. In the case of Angular SSR I switched to a Java backend that communicates via pipe/gRPC mechanism with a standalone Node.js backend that does the SSR (A bit slower, but a lot more flexible). In other situations like Oracle DB with JS support, it helps a lot.

I have had some luck with PurpleJS to close this gap, https://github.com/purplejs/purplejs . I submitted the patches I needed to use to build it with OpenJDK8, along with a build script. They are in the issues tab.
Strong caveat : this is a very old (in computer years) project.
I am still working on creating a set of patches that will allow this to be built with GraalVM instead of Nashorn. Most of the hard work is just creating a ScriptObjectMirror compatibility object that relies on Value/Context.asValue with a HashMap backing it. Fortunately PurpleJS' author worked very hard to set up interface contracts in a way that everything is "paint by number" and flexible.
When I am either able to contact the author or set up a side repo with this work I will paste a comment here. I have this page bookmarked.
In my case there is a real need; I need the ability to allow other team members to write Cypress tests in a larger framework which uses java SDKs to communicate with several cloud services. Most API testers are familiar with JavaScript frameworks and most API test engines support JavaScript; it is the tool that is used and any professional will expect these tools be available and will be forced to reinvent several wheels if they are not.
In the general case, there are many real world cases where there is an expectation that JavaScript be a "lingua franca". Every year since 2018 there has been increasing demand and expectation for JavaScript to be supported in many more contexts than it ever has been for this reason. It is no accident that JSON has replaced XML as the default transport layer.
There is a very real need to at least adopt some concepts such as the ability to require modules from Node. GraalVM doesn't have to be a Node replacement. But currently Java has no scalable JavaScript support whatsoever, and it seems the shortest path to gaining scalability may well be to simply offer full node support as Sten Roger Sandvik has done with PurpleJS.
Many of us on the internet have been reinventing this wheel for decades. If GraalVM truly is meant to replace Nashorn, it may be time to pull this out of the backlog before a larger influx of developers comes to this board with exactly this complaint. Oracle won't do it. You are our best hope.

Ok so update,
This is mostly working. I do have access to Node-style require and it works great. But it is still buggy. Specifically, my compatibility ScriptObjectMirror implementation's executeMethod is busted.
Nonetheless since require is working and that resolves the immediate issue, I will post my work so far.
https://gitlab.com/jessica.d.pennell/purplejs-with-graalvm
CompatScriptObjectMirror is a complete interface exposing all of these
https://docs.oracle.com/javase/8/docs/jdk/api/nashorn/jdk/nashorn/api/scripting/ScriptObjectMirror.html#newObject-java.lang.Object...-
As per Oracle's recommendation, it is backed by PolyGlot Values,
https://www.graalvm.org/sdk/javadoc/org/graalvm/polyglot/Value.html#isMetaObject--
Contributions would be welcome, my username is my e-mail address. I will post here when it's actually working.

For those familiar with J2V8, there is an alternative called Javet, which provides the same features (and more) and is up to date with Node.js LTS. Allows you to embed a full node.js runtime with support for nodejs modules and nodejs event loop. I recenly found out about it and I can say so far it's been working pretty well and all of the features discussed above are possible. It allows language interoperability from java to node and node to java.

I'm the author of Javet. I'd like to share my 2 cents for your reference.
Javet is Beyond Java.type()
Javet comes with a different mindset from what GraalVM defines. In Javet, you may inject java.lang.Class.class in Node.js, then simply call Class.forName(...) in Node.js to load whatever you want to load. That's a native solution which allows you to even specify the classloader. Following the same way, you may inject File.class or whatever classes. Please refer to this doc for more details.
Why is Javet Designed That Way?
It's simply one word Security. Javet is being used by many applications in production, not a toy or buzzword for promotion. In real world, your application exposes the Node.js runtime to external users who are capable of sending arbitrary scripts and breaking past security boundaries. A built-in Java.type() would be a nightmare to server application developers. Javet gives granular control over any Java API exposed to the Node.js runtime.
Why did You Get That Crash?
If you were trying to load Node.js native modules in Javet without patching them properly, you would experience crashes like that. That's not a Javet problem but the whole Node.js ecosystem problem. E.g. Electron has a dedicated project electron-rebuild which is designed for patching the native modules. Javet has its own patching system as well. If you follow the Javet doc, you will be fine with loading native modules. @newk5 worked with me closing that gap a few months ago. Thank @newk5 for the help.
How is Node.js Embedded in JVM by Javet?
Javet embeds the Node.js itself in JVM instead of reinventing the wheels. So, the Node.js runtime in Javet is genuine. That means anything in Node.js ecosystem is out-of-box in Javet. require(), Promise, fs, vm, etc. all work well. In addition, Javet offers full capability of interoperating with Node.js runtime. Obviously, Javet is able to keep up with Node.js releasing cycle from time to time. In other solutions, you would have to file issues for new Node.js features, then wait months for the mercy from the maintainers. No, Javet keeps that awful experience away from you.
Javet Community Size
Javet has been alive for half a year. Its community is growing up. I always believe it is the right direction that makes a product go further, not the community size. For instance: Oracle Nashorn was branded as A Next-Generation JavaScript Engine for the JVM, but was abandoned. Many Nashorn users are migrating to Javet now. Regarding GraalVM, based on its current design, JavaScript and Java interoperability is not available in native image. I wonder once you were full in GraalVM and wanted to create native image, what would you think about the initial decision on getting onboard to GraalVM? If you have faith in the Javet way, come and join the community so that it won't be a depending-on-one-or-two-developers project.


Create a Public Hosted Zone in Workload Accounts

Describe the Issue
Recently a team was trying to setup an internal DNS for the services inside of a cluster in their Dev account to communicate within the account. The use case here is that one of the services was their database and they wanted to be able to communicate with it without transferring data over the internet. They cannot create this internal in-cluster DNS because it requires a hosted zone that admin users don't have the permissions to create.
Additional Context
Add any other context, attachments or screenshots
Acceptance Criteria

Write terraform module, this will be an extension of the existing DNS module to create a public hosted zone for all accounts on creation
the hosted zone should be called {license plate}-{environment}.public.nimbus.cloud.gov.bc.ca
Hosted zone created in the workload accounts
Set the NS records in the perimeter account route 53 for the sub domain

.
.
.
.
.
.
.
.
.
.
.
Extra Template Info
Definition of Ready
These set of conditions will need to be met in order to bring a ticket into the sprint and start work. Protects the team from unclear requirements.
Issues (Task/Story/Spike) aligned to an EPIC and linked appropriately.
Assigned to the appropriate CPF MEMBER (and is not left blank in ZenHub) at the start of sprint (1st day of the sprint)
Acceptance has been defined for the issue and has been reviewed with CPF team and approved by the necessary approver.
Has been sized and estimated by the delivery team.
Detailed breakdown of the steps required to complete the story in the additional context
Any additional specifications have been documented, reviewed with CPF and approved by the necessary approver.
Acceptance Criteria
A set of pre-defined requirement that need to be met in order to mark the user story as “done”.
It should be testable with no room for interpretation
It should be either “pass” or “fail”
It should be clear enough for business stake holders to understand
As part of the user story, it should be written from the user perspective
A well written acceptance criteria is great for

managing expectations
defining scope
reducing ambiguity
establishing testing criteria for QA
Given (Pre-condition)
When (Action)
Then (Outcome)

Definition of Done
These set of conditions are met for work to be considered as complete on an issue.
All acceptance criteria(s) have been validated.
All the necessary documentation for the issue has been uploaded to Teams.
Functionality has been tested when applicable.
Functionality has been demonstrated to the relevant stakeholders (where applicable).
Story has been scheduled for a Sprint Demo/community update and impacted teams invited to the Demo.
Stories accepted by PO and documented for potential sharing with impacted users.

Documented = Captured in Community Update (CU) deck
Release notes = aspirational goal of providing a bulleted list of features and changes that our users can touch. Was going to store them in our Cloud Pathfinder repo. Can also display to users in the CU

This is no longer something we intend on working on in the next 6 months, moving to closed


TreeView

Hi,
Great project! Are there any plans for supporting a TreeView component?
Thanks

https://github.com/SamProf/MatBlazor/pull/788


Cypress: Projects UI

User Story
As a Developer, I will use this work when I want to automate acceptance testing.
Definition of Done
The Projects UI scenarios from the Acceptance Testing Script are covered by automated Cypress tests.

[ ] List view
[ ] Details view
[ ] Create a project
[ ] Update a project
[ ] Delete a project
[ ] Details view
[ ] List project rules
[ ] Create a project rule
[ ] Update a project rule
[ ] Delete a project rule
[ ] Update Projects with latest rule edits

this work has been deprioritized.


Fragment viewbox off-center

The problem I am experience is that my SVG fragments are not centered around the icons in the sprite, and will include surrounding sprites in the final file.
Here is my final SVG sprite:
http://pastebin.com/p0RdNy3M
When I try either the #create-hunt or #create-poll sprite, this is the result:
http://i.imgur.com/mi2k3CJ.png
I am wondering if there's a problem with my configuration, or the sprites that I am using, that would cause the viewbox values to display this way in both Chrome and Firefox.
Here are the configuration options I'm using:
      "shape": {
        "dimension": {
          "maxWidth": 64,
          "maxHeight": 64
        },
        "spacing": {
          "padding": 5,
          "box": "border"
        }
      },
      "mode": {
        "view": {
            "dest": "./",
            "prefix": ".svg-icon-%s",
            "sprite": "sprite.svg",
            "bust": false,
            "render": {
                "scss": true
            }
        }
      }

Thanks!

@colepatrickturner Please provide the following resources as well:

The Sass resource created by svg-sprite
The final CSS resource (compiled by your toolchain)
The HTML markup you use for displaying the sprite

Thanks!

Here is the SASS sprite sheet that was created:
http://pastebin.com/gU0R8s8v
and the final sprite:
http://pastebin.com/p0RdNy3M
However the stylesheet is not relevant as I was using the #fragment method of embedding:

@colepatrickturner Yeah, you posted the sprite earlier, and it looks good to me. I am not sure if browser support for fragment identifiers is mature enough in the meantime. I will have to test with your markup ...

Majority support for <img> svg fragments is there - I've tested boilerplate sprite sheets.
I have a suspicion it has to do with the padding/margin around the sprites, because I know that the min-x coordinate of the viewBox for the fragment's view is 8px too far to the left.


Recognize Containerfile

The generic "Containerfile" is another name that uses the same syntax as Dockerfile. Thanks for making this syntax highlighting extension for Nova.

Thank you for merging!


Remove disabled pickups on applied filters on pickups page

Closes #2271
What does this PR do?
If filter "With free slots" or "Only empty" is applied, disabled pickups are filtered out.

No test has been added since there is no existing test setup for the page in quest. I'm not proficient enough with Vue testing to set one up by myself. But this is on the top of my todo list ;)
Links to related issues
https://github.com/yunity/karrot-frontend/issues/2271
Checklist

[x] added a test, or explain why one is not needed/possible...
[x] no unrelated changes
[ ] asked someone for a code review
[x] joined chat.foodsaving.world/channel/karrot-dev
[x] added an entry to CHANGELOG.md (description, pull request link, username(s))

@nicksellen Thanks https://www.youtube.com/watch?v=rR4n-0KYeKQ ;)

@nicksellen Thanks https://www.youtube.com/watch?v=rR4n-0KYeKQ ;)

Hope you didn't intend for it to be left open waiting until you learnt enough vue for writing a test? (if so, you can leave them as draft PRs). In this case seems fine... our frontend testing needs a bit more love in general I think...

Hope you didn't intend for it to be left open waiting until you learnt enough vue for writing a test? (if so, you can leave them as draft PRs). In this case seems fine... our frontend testing needs a bit more love in general I think...

No, but I'll try to get more familiar with vue testing and hope to be able to contribute some useful test for the frontend in the near future.

No, but I'll try to get more familiar with vue testing and hope to be able to contribute some useful test for the frontend in the near future.


An initial attempt to add NelsonSiegelSvensson and SmoothingSpline but may be discussed further

Approaches taken to estimate parameters may be discussed further.

Thanks for taking a shot at the interpolations! It's a bit mouthful to start with, so we'll probably have a good and long discussion about it 😄. I guess Alec will join as reviewer, but until then, I can give some immediate feedback to keep you going. I'll mostly focus on the Nelson-Siegel part, but my comments may apply to some of the others, also.

For all of the curves, you would want to implement the method for the zero-coupon rate, zero and the discount function discount. I will also make the fitting procedures more readable if you refer directly to those, e.g., instead of defining it in the spot function inside the Nelson-Siegel fitting.
The r^2 field on NelsonSiegel is not needed for zero or discount, so no need to keep it there. Not that it could not be interesting, but it's more a property of the fitting than of the result.
Looks like you're fitting the NS spot rate to the prices variable in input. That represents a bond price or a discount factor, so it should be converted back to an interest rate.
Just by googling, I can see that NS fitting is a big research topic, and there are probably many ways to go. Your method of using a fixed grid would probably work fine, but maybe it would be better to make the grid (and starting point?) inputs to the fitting function? That way, the user has more freedom.
We need to have tests added, and have the code integrated properly into the rest of the package, but let's take that down the line. You can use SmithWilson as an example of how to do this.

Thank you @kasperrisager for the comments! I agree with you on points 1, 2 and 4 and I have added zero and discount functions and made changes to the structs and functions by removing r square and by moving the fixed grid to the parameter list, but I did not fully get what point 3 means. I have checked the implementation of SmithWilson and found some variants also refer to prices, so it would be great if you can elaborate more on this?

Sure! What you have in line 65 is the formula for the (spot) interest rate for each maturity (given params and tau). However, when you do the fit in line 67, you adjust params so that the vector of interest rates is close to the vector prices. If prices comes from ZeroCouponQuote, they represent discount factors and not interest rates, so you're comparing two different things - either you have to transform the interest rates into discount factors or transform prices into interest rates before doing the fit.
I'm not an expert on Nelson-Siegel fitting, but it feels best to me to fit it to interest rates, in which case prices needs to be transformed. For the Smith-Wilson (where I do consider myself an expert 😄) the fit is done on discount factors, so that can naturally cause some confusion.

Looking forward to the next version, btw!

I have committed a change to a source file in this stream of pull request, but if any other steps i should also follow please advise. Thank you and look forward to discussing with you further.

Looks to be going in the right direction 😄. I added some specific comments inside the code. I think at this point, it would be good to add the Nelson Siegel (Svensson) curves into the actual package by including the file in the Yields.jl file, and exporting the methods that should be exported. Then, see if you can get the tests to run, and add some tests for the curves. In the first instance, just make some test examples that demonstrate that the code actually runs, and then you can improve them later.

Changed more and some tests added. Please review thanks.

(Just jumping into the discussion since I have the time tonight). Now would also be a good time to include your files in /src/Yields.jl and /test/runtests.jl in the same way that is done for the other files. That will allow the tests to be run automatically when you push changes. That will reveal if an error has sneaked in somewhere, and whether the tests cover the new code.

Can you advise how to include files into Yields and runtests? You mean push to the main branch, or? Thanks.

Can you advise how to include files into Yields and runtests? You mean push to the main branch, or? Thanks.

He means that currently the package doesn't actually know to grab the code you wrote. The main package needs to reference the code  like it does for the other parts of the package. Without include(...)ing the file, the code doesn't get loaded when the package does.
And the tests are also organized in a similar fashion.

Can you advise how to include files into Yields and runtests? You mean push to the main branch, or? Thanks.

He means that currently the package doesn't actually know to grab the code you wrote. The main package needs to reference the code  like it does for the other parts of the package. Without include(...)ing the file, the code doesn't get loaded when the package does.
And the tests are also organized in a similar fashion.

Essentially does this mean I have to modify and push an update of Yield.jl and runtests.jl to include all required files?

Essentially does this mean I have to modify and push an update of Yield.jl and runtests.jl to include all required files?

Yes, exactly. Before you push, you can run the whole test suite locally (some hints here). That will check exsisting functionality and the new functionality that you have made. Ideally, all the tests will pass before you push, of course, but it's not a strict requirement until the pull request is merged.

Thanks. I assume this does not mean to push into the main package but this fork which I have done. I actually included NelsonSiegelSvensson models into Yields and runtests. Please review and advise what else should be done at this stage.

I pushed a couple of commits to clean up a couple of things. A couple of comments on the changes:

The tests weren't running properly still and I made edits to allow for this

Add new LsqFit dependency to Project.toml
Some of the @tests were using the assignment operator (=) instead of comparison (e.g. == or ≈)
Qualify with the package name Yields.Nelson... since the names aren't exported

Before merging we need more tests for correctness using an external reference.  I added an example of testing the zero rates based on the data here:

However, the tests don't pass as the rates don't match. I'm not sure if I'm grabbing the wrong data or the model needs tweaking still.

I pushed the changes to the branch you are using for this pull request (. I think you can just git pull and you will see the commits appear in your history locally.

I pulled the rates from the link you left in the comments of the code: https://www.ecb.europa.eu/stats/financial_markets_and_interest_rates/euro_area_yield_curves/html/index.en.html
See the screenshot in this comment for what they looked like on the website:

I pulled the rates from the link you left in the comments of the code: https://www.ecb.europa.eu/stats/financial_markets_and_interest_rates/euro_area_yield_curves/html/index.en.html
See the screenshot in this comment for what they looked like on the website:

I made slight changes to the tests and found that the results could only generate close zero and par rates but not as close as the tolerances suggest. Are these tolerances industry standards? Can we somewhat loose a bit?

I agree with could potentially relax the tolerances (but on the order of basis points, not 10s of basis points). However is it possible that there's something still off with the mechanics? For example, in this test case, the fitted parameters for β₃, τ₁, and  τ₂ are very different from what the ECB site indicates (per the screenshot). Is there further tweaking of the fitting code needed?
euraaa_zeros = [-0.602009,-0.612954,-0.621543,-0.627864,-0.632655,-0.610565,-0.569424,-0.516078,-0.455969,-0.39315,-0.33047,-0.269814,-0.21234,-0.158674,-0.109075,-0.063552,-0.021963,0.015929,0.050407,0.081771,0.110319,0.136335,0.160083,0.181804,0.201715,0.220009,0.23686,0.252419,0.26682,0.280182,0.292608,0.304191,0.31501]
euraaa_pars = [-0.601861,-0.612808,-0.621403,-0.627731,-0.63251,-0.610271,-0.568825,-0.515067,-0.454526,-0.391338,-0.328412,-0.26767,-0.210277,-0.156851,-0.107632,-0.062605,-0.021601,0.015642,0.049427,0.080073,0.107892,0.133178,0.156206,0.17722,0.196444,0.214073,0.230281,0.245221,0.259027,0.271818,0.283696,0.294753,0.305069]
euraaa_maturities = vcat([0.25, 0.5, 0.75], 1:30)
nss_param = Yields.NelsonSiegelSvensson(0.6348554895516274, -1.2260341163477764, -2.1112390509907732, 0.2927644328902819, 3.0, 1.5)
nss = Yields.est_nss_params(euraaa_zeros, euraaa_maturities)

I also added a test set where it's not focused on fitting the rates, just calculating the output rates. This matches the zero rates but the par rates error. I will try to look into this.

This is getting very close! Most of the tests are passing now. I think that the NelsonSiegel tests aren't passing because the ECB rates are developed based on NelsonSiegelSvensson fit - is that your understanding @leeyuntien ?
I pushed some edits. A key thing with the tests/usage is that Yields.jl wants rates as rates, not percentages. So for example: for a 1.25% yield, the values should be given as 0.0125 whereas the values that were in the tests would use a value like 1.25).

I think I botched the rebase - let's continue on #113

This is getting very close! Most of the tests are passing now. I think that the NelsonSiegel tests aren't passing because the ECB rates are developed based on NelsonSiegelSvensson fit - is that your understanding @leeyuntien ?

Yes that is my understanding so you have to make sure which model you are using in order to match the parameters.

I pushed some edits. A key thing with the tests/usage is that Yields.jl wants rates as rates, not percentages. So for example: for a 1.25% yield, the values should be given as 0.0125 whereas the values that were in the tests would use a value like 1.25).
Here's what I think still needs to be done before merging:

[ ]  If my assertion above is correct: Figure out an alternative test set for the basic NelsonSielgel (ie something other than the ECB rates since it's not testing the same curve)

[ ]  Add more details to the docstring.

[x]  What are the tau parameters?
[x]  Do the beta parameters have a meaning
[ ]  Add constructor examples using rates/maturities

[x]  Resolve the case where the discount(curve,time) errors when time = 0  (I added a test for this)

[ ]  Delete the parameter comparisons if it's not testing an externally validating test or a property of the curve

[ ]  @alecloudenback to rebase onto master before merging and change <: AbstractYield to <: AbstractYieldCurve

[ ]  Include SmoothingSplines?

I saw in src probably we should remove SmoothingSplines and keep SmoothingSpline. You mean to create a separate pull request for this, right? Any others with higher priority to do before doing it?

I suggest splitting those out into a separate PR so that it can be tidied up and tested without blocking the merging of the NelsonSiegel curves


Add support for request URL randomization / shuffling

As requested in #35, the idea is to use regular expressions in various places, which will lead to different URLs being used when requests are spawned.
This current implementation only works with RegEx passed directly as part of the URL path or its parameters (wrapped within {{...}} ):
hey https://google.com/"{{[a-z]{10}}}"

Depending on your shell, the wrapping parentheses might or might not be needed.
Although this part can be merged, this is an ongoing effort and further changes would require the introduction of a local Request type first.

Any idea why this feature is pending merge? I can help if needed


[BEAM-13251][Playground] [Bugfix] Lint Fails on Playground Backend

[BEAM-13251]
fix all staticcheck issues

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Choose reviewer(s) and mention them in a comment (R: @username).
[ ] Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
[ ] Update CHANGES.md with noteworthy changes.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

GitHub Actions Tests Status (on master branch)

See CI.md for more information about GitHub Actions CI.

@pabloem

oops sorry I guess we need to fix conflicts here


Container exec should support environment variables

See docker exec --env
For interactive --tty execs, the CLI's TERM env should also be used for the exec, instead of the xterm default.

There are also other exec parameters that would be useful to support: user and privileged
kontena service exec --user root would be useful in particular, if the image uses an unprivileged user.


Ctrl+F on selection does rarely use selection as search term

Since january update, when I select some text and hit Ctrl+F, only very rarely does this selection get used as the search term. Instead, most of the time, the old value is still there and the "replace" input gets focused.

In the January release, Ctrl+F always seeds the search string from the selection, while Ctrl+H only seeds it if there was no search string.
We have fixed this in #2953


Support split processing with callable :only_process

This fixes a bug that was preventing something like this:
class User < ActiveRecord::Base
  has_attached_file :avatar, styles: { small: "25x25#", medium: "50x50x", large: "100x100x" }, only_process: [:small]

  process_in_background :avatar, only_process: lambda { |a| a.instance.large_supported? ? [:medium, :large] : [:medium] }
end

Also fixes a #processing_style? spec and adds coverage for #split_processing?

:+1:

@jrgifford could you merge this one?

@jrgifford this one is a crasher on Rails 4.2.1—could you please merge it? Thanks

I'll take a look here later tonight.
Sent from my iPhone

On Jun 18, 2015, at 17:56, Piers Mainwaring<EMAIL_ADDRESS>wrote:
@jrgifford this one is a crasher on Rails 4.2.1—could you please merge it? Thanks
—
Reply to this email directly or view it on GitHub.

Thanks!

@jrgifford thanks for the merge!

Thank you!

i'm hoping to get this out into a release here in a bit.

@jrgifford that would be fantastic, thanks!


Update version of SDK

What
Update version of SDK to v0.3.1.
Why
It's the new release.

Preview is available here:http://soroban-docs-pr236.previews.kube001.services.stellar-ops.com/

Preview is available here:http://soroban-docs-pr236.previews.kube001.services.stellar-ops.com/

Preview is available here:http://soroban-docs-pr236.previews.kube001.services.stellar-ops.com/


demo: Fix makefile target

The makefile target was incorrect and wouldn't build the rsa_encrypt demo.

[ ] documentation is added or updated
[ ] tests are added or updated

Merged, thanks.


logsumexp with zero scaling factor

>>> scipy.misc.logsumexp([-1000])
-1000.0
>>> scipy.misc.logsumexp([-1000, 0], b=[1, 0])
-inf

Could anyone point to the problem faced here. Isn't the output the expected one ?
It matches with the answer of
>>>a=[-1000,0]
>>>b=[1,0]
>>>np.log(np.sum(b*np.exp(a)))
-inf

This is due to taking the exponent of a - max(a). So the second element matters (because it's the largest value) even if b == 0 for that element.
I don't think that this is a bug though. Implementing a special case for b == 0 looks wrong, because b is expected to be floating point and comparing floating point zero to 0 is problematic. Also, the current code is consistent in that the answer is OK when taking the limit of b going to zero from above.
So closing.

@argriffing please reopen if I'm missing your point.

Thanks for the comments. I'm not trying to re-open this issue but I just thought I'd explain the rationale in a bit more detail. Maybe too much detail :) Also I'd thought the original motivation had been from a stackoverflow question but I can't seem to find it.

Could anyone point to the problem faced here. Isn't the output the expected one ?
It matches with the answer of
>>a=[-1000,0]
>>b=[1,0]
>>np.log(np.sum(b*np.exp(a)))

-inf

One of the purposes of `logsumexp` is to compute the solution more stably than using the naive evaluation.

> This is due to taking the exponent of `a - max(a)`. So the second element matters (because it's the largest value) even if `b == 0` for that element.

Yes this agrees with my understanding of the current implementation in scipy.

> I don't think that this is a bug though.

Right it's not necessarily a bug, just an opportunity to further improve the stability of the evaluation.

> Implementing a special case for `b == 0` looks wrong, because b is expected to be floating point and comparing floating point zero to 0 is problematic.

It is true that exact comparison of floating point numbers is often incorrect. On the other hand, in some cases it makes sense.  For example [`xlogy`](https://github.com/scipy/scipy/blob/maintenance/0.15.x/scipy/special/_xlogy.pxd) uses exact comparison of a floating point coefficient to zero.

> Also, the current code is consistent in that the answer is OK when taking the limit of b going to zero from above.

I'm not completely sure I understand this point, so I'll address two different interpretations.

1) Maybe you mean that `logsumexp([-1000, 0], b=[1, eps])` is OK (in the sense of mathematical correctness) when taking the limit `eps -> 0` from above.  This looks plausible from a plot, but it is not true. For example in the following code the top subplot looks like it is linearly decreasing towards negative infinity as the log of `eps` approaches negative infinity.

import numpy as np
import matplotlib.pyplot as plt
from scipy.misc import logsumexp
def mkplot(ax, k):
n = 41
x1 = np.logspace(-1, -k, num=n)
x0 = np.ones_like(x1)
b = np.vstack((x0, x1)).T
a = np.array([[-k, 0.0]]).repeat(n, axis=0)
y = logsumexp(a, axis=1, b=b)
line, = ax.plot(x1, y)
ax.set_xscale('log')
fig, (ax1, ax2) = plt.subplots(2)
mkplot(ax1, 1000)
mkplot(ax2, 20)
plt.savefig('logsumexp.png')
![logsumexp](https://cloud.githubusercontent.com/assets/101416/7350813/77011f34-eccf-11e4-93e2-5d745ad8a41f.png)

But in the bottom subplot (which uses a less numerically taxing value of `a`) you can see that this pattern doesn't hold for the whole domain, and that the limit of the `logsumexp` is finite as `eps -> 0` from above.

2) Maybe you mean that `logsumexp([-1000, 0], b=[1, eps])` is OK when taking the limit of `eps -> 0` from above, in the sense that it is numerically consistent with `logsumexp([-1000, 0], b=[1, 0])` because both give the value `-inf`, and that this consistency is good.

logsumexp([-1000.0, 0.0], b=[1.0, np.exp(-740)])
-739.99742066489091
logsumexp([-1000.0, 0.0], b=[1.0, np.exp(-760)])
-inf
logsumexp([-1000.0, 0.0], b=[1.0, 0.0])
-inf

The current implementation of the evaluation jumps from about -750 to `-inf` when `eps` becomes smaller than floating point numbers can handle, whereas an alternative implementation would jump from about -750 to the more accurate value of `-1000` when `eps` reaches this threshold. So the alternative implementation would not be less consistent, at least for this example.

Hmm, that is a quite elaborate description of what I meant (I was thinking mostly about 2) and how my interpretation was a bit too fast:)
I'm still not sure if it's worth making a change here, but it's at least worth thinking about it.

The real selling point is to be able to use b for signs. So normally it's just +1 or -1, but a zero can slip in there, and it shouldn't destroy the precision of all the other values unnecessarily.


Feature/highlight docs rc6

Description
Updated highlight module to use ngModule.
https://github.com/Teradata/covalent/issues/65
What's included?

Added own file for highlight.module + forRoot() method.
Updated docs ngModule setup.
Updated README.md

Test Steps

[x] ng serve
[x] Go to http://localhost:4200/#/components/syntax-highlighting

👍


New service GoogleAnalyticsClient for server-side analytics

Context
We want for the server to send us usage metrics to GA
Changes proposed in this pull request
Introduce a Service to send GA telemetry.
Use it to report the type of locality searched (post code, country, town, road, etc etc), as well as the county of search
Guidance to review
This commit perpetuates some tech debt: Really we should useenvironment
variables for our GA numbers, not hardcode them as we do currently.
We shouldn't resolve this right now though as this would add another moving part to the already
complicated terraform-restore (would require introducing a new environment variable)

 Google Analytics to show what type of location search people do


Q: Is it normal behavior to not show an event in the Day view under the following conditions...

I'm making use of your Bootstrap Calendar plugin (it's awesome, thanks!) and am running into a display issue. We're allowing individuals to schedule events up to 8 hours long from just about any start time. To give a specific example:
Start Time: 3:30 PM (15:30)
Duration: 8 hours
Calculated End Time: 11:30 (23:30)
The event does not show up in the Month or Day view, however it does show up in the Week view. To the best of my knowledge, we're running with a default install.
Is this normal behavior? Why would an event like that show up on a day in the Weekly view, but not in the Monthly or Daily views?
Thanks!

No, this is not normal. Perhaps some bug. I was accepting few PRs recently without actually testing everything myself. I can assume that there is very hi chance there is some bug.


Unable to DM specific user

Self hosting on CentOS 7.5
I'm running two seperate instances of the bot from two different directories.
One of my users is unable to receive direct messages from one of the bots. The other is still able to message her without issue and prior to this morning the bot in question was able to too.
Now when attempting to send a message to them either directly through .send or through them using .remind I receive the following error and exception.
0 14:37:19 CommandHandler | Discord.Net.HttpException: The server responded with error 50007: Cannot send messages to this user    at Discord.Net.Queue.RequestBucket.SendAsync(RestRequest request)    at Discord.Net.Queue.RequestQueue.SendAsync(RestRequest request)    at Discord.API.DiscordRestApiClient.SendInternalAsync(String method, String endpoint, RestRequest request)    at Discord.API.DiscordRestApiClient.SendJsonAsync[TResponse](String method, String endpoint, Object payload, String bucketId, ClientBucketType clientBucket, RequestOptions options)    at Discord.API.DiscordRestApiClient.CreateMessageAsync(UInt64 channelId, CreateMessageParams args, RequestOptions options)    at Discord.Rest.ChannelHelper.SendMessageAsync(IMessageChannel channel, BaseDiscordClient client, String text, Boolean isTTS, Embed embed, RequestOptions options)    at Discord.Rest.RestDMChannel.Discord.IMessageChannel.SendMessageAsync(String text, Boolean isTTS, Embed embed, RequestOptions options)    at NadekoBot.Modules.Administration.Administration.SelfCommands.Send(String where, String msg) in /home/Cafe/NadekoBot/NadekoBot.Core/Modules/Administration/SelfCommands.cs:line 470    at Discord.Commands.ModuleClassBuilder.<>c__DisplayClass6_0.<<BuildCommand>g__ExecuteCallback|0>d.MoveNext() --- End of stack trace from previous location where exception was thrown ---    at Discord.Commands.CommandInfo.ExecuteInternalAsync(ICommandContext context, Object[] args, IServiceProvider services)    at Discord.Commands.CommandInfo.ExecuteInternalAsync(ICommandContext context, Object[] args, IServiceProvider services)    at Discord.Commands.CommandInfo.ExecuteInternalAsync(ICommandContext context, Object[] args, IServiceProvider services)    at Discord.Commands.CommandInfo.ExecuteAsync(ICommandContext context, IEnumerable1 argList, IEnumerable1 paramList, IServiceProvider services) 0 14:37:19 CommandHandler | Command Executed after 0.000/0.249s 	User: Danda#1950 [109366290774241280] 	Server: Silver Lining ☁ [500620274270601216] 	Channel: bot-commands [501306720778321920] 	Message: .send<PHONE_NUMBER>70601216|u:385376021467234304 Testing

That's weird, because the other bot in the same server is able to send messages to that user.
Have you tried to restart the glitched one by typing .die on Discord?

So it's a discord error specific error, not 403. no idea why it could happen. Make sure you don't have any filters enabled, and let non-friends dm you.


Refactor tests to return Promises when possible

Throughout Ghost's test suite there are many places where the done() async callback is used to handle asynchronous behavior. There are also many places where the test function returns a promise.
As part of #7165 the test cases that returned promises explicitly were refactored to not use the done() callback to handle behavior. (Mocha 3 throws an exception if you use both).
However, there are still lots of places throughout the tests that still use the done() callback because the test function doesn't return a Promise when it should.
To close this issue, all of the tests cases need to be evaluated to see if they can return a Promise. If so, then they should be made to, and the done() callback should not be used in those instances.
Note: there still may be scenarios where the done callback needs to be used (for instance, if the test can't return a promise) However, because most of the test functions that have asynchronous behavior do deal with promises, the need for explicitly using done should be very little

Taking a stab at this, seems pretty straightforward.

@janvt there's already a PR open for this in #7254 - you might see if you can help out there :)

@acburdine Can I work on this?

Hey @Divya063,
I have been thinking about this a lot whilst working on our tests recently. Because we are so often testing the opposite case, e.g. checking that it correctly fails, I feel like there are too many cases where we still need to use done.
If you take a look at the previous attempt to do this: https://github.com/TryGhost/Ghost/pull/7254
You see there were some cases that needed to be left.
cc @kirrg001 I don't know what you prefer here?
I think it is really not a good use of time and that @Divya063 if you would like to get involved with contributing, a similar but perhaps more useful task would be to work on upgrading should and/or sinon, which have breaking changes to their APIs.

Also hey. Sorry for late response, @Divya063
First thanks so much for your interest.

I think it is really not a good use of time and that

I agree with @ErisDS. There are cases where we want to use done or where somebody prefers to use done. There is no need to go over ~2000 test cases and double check whether we use done or return a Promise.

if you would like to get involved with contributing, a similar but perhaps more useful task would be to work on upgrading should and/or sinon, which have breaking changes to their APIs.

If you are interested in upgrading sinon/mocha, please let us know by raising an issue with:

changes which were introduced in a newer major version
changes we have to adapt in our code base with one example code snippet

Another task i can think of is https://github.com/TryGhost/Ghost/issues/7696, which is a task to dive in into the codebase.
If you have any questions, let us know in the contributing channel in slack.
I am going to close this issue now.

@ErisDS @kirrg001 Thank you so much for the information, I would like to work on #7696 as well as on upgrading sinon/mocha.


Cargo install failed due to  interfering with git proxy in Ubuntu Linux

Problem
when a global git https/http proxy config is set.
cargo install will fail with the following errors:
    Updating crates.io index
warning: spurious network error (3 tries remaining): [35] SSL connect error (OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to index.crates.io:443 )
warning: spurious network error (2 tries remaining): [35] SSL connect error (OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to index.crates.io:443 )
warning: spurious network error (1 tries remaining): [35] SSL connect error (OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to index.crates.io:443 )
error: download of config.json failed

Caused by:
  failed to download from `https://index.crates.io/config.json`

Caused by:
  [35] SSL connect error (OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to index.crates.io:443 )

after removing git config, cargo install will be normal again.
Steps

create a git config file  in ~/.gitconfig
add the following config

[https]
	proxy = socks5://<IP_ADDRESS>:1080
[http]
	proxy = socks5://<IP_ADDRESS>:1080

execute cargo install

Possible Solution(s)
remove git proxy config for http/https.
Notes
No response
Version
cargo 1.85.0-nightly (769f622e1 2024-12-14)

Thank you for the issue report.
The config doc of http.proxy doesn't mention it respects git proxy settings. As far as I can tell, this is an undocumented behavior, which was implemented in 618137b41904d69cc84569fce264b4a68a2e71ee in #541, way earlier than Rust 1.0 release.
I am not seeing any reason of this design in #541. Maybe it was because crates.io registry index was mainly downloaded via Git from rust-lang/crates.io-index, or it was just a handy default to help people use Git dependencies out-of-the-box.
Cargo has sparse registry support since 1.68. If people are not using any git dependencies, it is surprising that git proxy settings affect HTTP requests for normal cargo operations.
Having some possible approaches here:

Completely remove the support of respecting HTTP proxy settings from git config. While this is an undocumented behavior, it might break someone's existing settings.
Only respect git config if an http handle is going to talk to git (like git dependencies or crates.io-index from git repo).
Keep the behavior as is and document it. It might still cause confusion like https://github.com/rust-lang/cargo/issues/12572.

To me, since we want to rely less on a specific external, I am a bit inclined to remove the support, though the middle ground solution is not bad at all, and is consistent when net.git-fetch-with-cli enabled.

should keep it only for git, not for crates.io.

it seems not all cargo install will cause this problem.

See also https://github.com/rust-lang/cargo/issues/8327.


Using Ok::new() in docs is confusing

You have a class for testing called Ok. While I think it's readable, I think it's not good to use it
as an example in the Readme.md.
A Symfony-User expects to return a Response - you could also use a @HttpApi-Object you showed
in the Readme.md.

hey @HellPat,
very good feedback. I'm gonna see what I can do about it. Or if you have already an Idea, feel free to send a little PR.


Download button

Description
Why download button is present at header we can remove it and put it in the end
Screenshots
No response
Additional information
No response

we don't have a design yet, that's why everything is this way.


[Docs] Tutorial: Exploring Kubernetes CronJobs with Meshery Playground

This child issue is related to "[Playground] Learning Paths: Cloud Native tutorials with Meshery Playground #9832". See this issue for more context.
Current State
Meshery Docs are in need of new tutorials with hands-on labs. In this tutorial, we will explore how to use Meshery Playground, an interactive live cluster environment, to perform hands-on labs for managing Kubernetes deployments. Meshery is a powerful tool that simplifies the adoption and operation of cloud and cloud native technologies. Meshery Playground provides a safe and isolated environment for learning and experimenting with these technologies.
Desired State

Take the following sample and refactor in context of Meshery Playground.
Instead of kubectl commands use Meshery UI and MeshMap as the primary mechanisms for users to perform tasks in the labs. Put CLI commands inside of  as an alternative reference.
Reference existing Meshery Designs from the Meshery Catalog both as starting point and/or as a finished example of the lab.
As needed, take screenshots or video recordings to enrich the content.

---
layout: default
title: Exploring Kubernetes CronJobs
abstract: Learn Kubernetes CronJobs with Meshery Playground
permalink: guides/tutorials/
redirect_from: guides/tutorials/
type: guide
category: tutorial
language: en
abstract: "In this tutorial, we will explore how to use Meshery Playground, an interactive live cluster environment, to perform hands-on labs for managing Kubernetes CronJobs."
list: include
abstract: Meshery is the self-service engineering platform, enabling collaborative design and operation of cloud and cloud native infrastructure.
---

Introduction:
In this tutorial, we will explore Kubernetes CronJobs, a resource that allows you to run jobs periodically at specified intervals. We will use Meshery Playground, an interactive live cluster environment, to perform hands-on labs for working with CronJobs in Kubernetes.

Prerequisites:
- Basic understanding of Kubernetes concepts.
- Meshery Playground access. If you don't have an account, you can sign up at [Meshery Playground](https://meshery.layer5.io/play).

Lab Scenario: Scheduled Backups using CronJobs

Objective:
Learn how to use Kubernetes CronJobs to schedule and automate periodic backups of a sample application.

### Steps:

#### 1. **Accessing Meshery Playground:**
   - Log in to the [Meshery Playground](https://meshery.layer5.io/play) using your credentials.
   - Once logged in, navigate to the Meshery Playground dashboard.

#### 2. **Deploying a Sample Application:**
   - Deploy a simple application that needs periodic backups. You can use a sample web application or any other application of your choice.

\```bash
# Deploying a sample web application
mesheryctl pattern apply -f https://raw.githubusercontent.com/kubernetes/website/master/content/en/examples/application/deploying-wordpress/mysql-deployment.yaml
mesheryctl pattern apply -f https://raw.githubusercontent.com/kubernetes/website/master/content/en/examples/application/deploying-wordpress/wordpress-deployment.yaml
\```

#### 3. **Creating a CronJob for Backups:**

- Create a CronJob that runs a backup script at a specified interval to back up the application data.

Alternate: Command line instructions

\```yaml
# backup-cronjob.yaml
apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: backup-cronjob
spec:
  schedule: "0 * * * *"  # Run every hour
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: backup-container
            image: backup-image:latest  # Replace with your backup script image
            # Add volume mounts and commands as needed for backup
          restartPolicy: OnFailure
\```

Apply the CronJob configuration:

\```bash
mesheryctl pattern apply -f backup-cronjob.yaml
\```

#### 4. **Verifying CronJob Execution:**
   - Monitor the execution of the CronJob and verify that backups are created at the specified intervals.

#### 5. **Scaling and Updating CronJobs:**
   - Explore how to scale the CronJob or update its schedule by modifying the CronJob configuration.

\```bash
kubectl edit cronjob backup-cronjob
\```

Use Meshery Playground to visualize the changes and observe the impact on the scheduled backups.

#### 6. **Clean-Up:**
   - Delete the CronJob and application resources after completing the lab.

\```bash
kubectl delete cronjob backup-cronjob
kubectl delete -f https://raw.githubusercontent.com/kubernetes/website/master/content/en/examples/application/deploying-wordpress/mysql-deployment.yaml
kubectl delete -f https://raw.githubusercontent.com/kubernetes/website/master/content/en/examples/application/deploying-wordpress/wordpress-deployment.yaml
\```

#### 7. **Saving and Sharing**
   - Save your scenario in Meshery Playground for future reference.
   - Invite friends to collaborate in your design.

Share your scenario with other Meshery users or the community for collaborative learning.

### Conclusion
Congratulations! You've successfully completed the lab on exploring Kubernetes CronJobs using Meshery Playground. This hands-on experience has provided valuable insights into scheduling and automating tasks in Kubernetes using CronJobs. Explore more scenarios in the Meshery Playground to enhance your skills in cloud-native technologies.

{% include related-content.html type="tutorials" %}

Contributor Guides and Handbook

📚 Instructions for contributing to documentation

Meshery documentation site and source

🛠 Meshery Build & Release Strategy
🎨 Wireframes and designs for Meshery UI in Figma (open invite)
🙋🏾🙋🏼 Questions: Discussion Forum and Community Slack

Hi, can I have this issue assigned to me, please?


Cannot run m3u_gen_acestream.py

Hi.
Ubuntu 16.04.5 LTS
Python 2.7.12
$ python m3u_gen_acestream.py
File "m3u_gen_acestream.py", line 20
def main() -> None:
^
SyntaxError: invalid syntax
Python 3.5.2
$ python3 m3u_gen_acestream.py
File "m3u_gen_acestream.py", line 21
channel_handler: ChannelHandler = ChannelHandler()
^
SyntaxError: invalid syntax

sorry after install python 3.7 it worked.
You can specify the minimum version python in the first line )))

Yep. Thanks for this issue. I will add a note about it :+1:

Done with https://github.com/SCP002/m3u-gen-acestream/commit/882aeb46d66dbba6b2b91e205cbb7b1b94905789


Update archive.json

added China National Center for Bioinformatics (https://www.cncb.ac.cn/?lang=en) in the archive enums
Pull Request
This PR is for a

[ ] New Publication(s)
[ ] Correction

For the following list(s):

[ ] ancientmetagenome-environmental (README)
[ ] ancientmetagenome-hostassociated (README)
[ ] ancientsinglegenome-hostassociated (README)

This is to close
PR Workflow

Open this PR with sample metadata on the samples metadata sheet (:tada: you're already here!)
Wait for checks for sample metdata to pass
(If checks fail) make corrections, and push changes to this branch (no need to open a new PR!)
(Once passed) comment on this PR @spaam-bot please autofill <table_name> <project_id> to get a half-filled template! (may take a minute or so to get the comment with the file)
Fill in the template, and verify autofilled data correct!
Once filled in, append(!) the new rows from the TEMPLATE file to the end of the corresponding library metadata file, and update this PR
Wait for checks for library metadata to pass
Request review!

Pre-review checklist (new publications)

[ ] Publication is published

Preprints currently not accepted?

[ ] Checked the publication is not already in the database?
[ ] Checked samples in this publication are not previously published data?

Newly re-sequenced metagenomes are OK!

[ ] Samples are shotgun metagenomes and not amplicon data

Note: hostassociated-singlegenome may also contain whole-genome enriched data

[ ] Checked the list follows conventions as described in the corresponding sample type's README file (e.g. using ERS/SRS accession codes for ENA/SRA)?
[ ] Once sample table validation completed Library metadata has been added

Use @spaam-bot please autofill <table_name> <project_id> to get a half-filled template! May take a minute or so to get the comment with the file
Fill in template, and verify autofill data correct!
Once filled in, append(!) the new rows to the end of the corresponding library metadata file

[ ] Changelog is updated to include the publication under 'Added'?

Changed it to CNCB to CNCB-NGDC (https://ngdc.cncb.ac.cn/) to be more precise in where the data is stored rather than the bigger institution

Fair enough, I changed the enums @jfy133


Add support for iOS 12.5 ( iPhone 5s, 6, and 6 Plus)

Apple has released iOS 12.5 which includes the Exposure Notifications framework.
https://9to5mac.com/2020/12/14/apple-releases-ios-12-5-for-older-iphones-with-support-for-covid-19-exposure-notifications/
Once updated the app should be able to run on iPhone 5s, 6, and 6 Plus.
High level updates needed:
[ ] Set the Deployment Target and Link the Framework
[ ] Perform API and iOS Version Checks
[ ] Set Background Task Interval and Request Runtime to support older iPhones
Details:
https://developer.apple.com/documentation/exposurenotification/supporting_exposure_notifications_in_ios_12_5
Ref:
https://github.com/cds-snc/covid-alert-app/issues/1099
https://github.com/cds-snc/covid-alert-app/issues/985
Notes:

BGTaskScheduler isn’t available in iOS 12.5, Bluetooth explicitly grants apps with the Exposure Notifications entitlement 3.5 minutes at least once a day.

https://github.com/cds-snc/covid-alert-app/issues/1099
https://github.com/cds-snc/covid-alert-app/issues/985

Had our first successful exposure test on an iPhone 5S today 🎉

Multiple iPhones test 🎉

Further testing has been completed on v6 devices.
A few items remain:

Finish testing with a second 5s device
Error handling for 13.0 -  13.4 devices

Although iOS 13.0 to 13.4 doesn’t support Exposure Notifications, your app might still download onto devices with those versions of iOS. If that happens, present a dialog to let the user know Exposure Notifications isn’t available for their device.

Merged
https://github.com/cds-snc/covid-alert-app/pull/1306

Merged
https://github.com/cds-snc/covid-alert-app/pull/1306


can you fix it?

ERROR: Something went wrong, please post an issue about it on github

Look in: https://github.com/ConsoleTVs/Laralum/issues/6


pdf page size

Hello!
I've been playing with goosepaper last week, it's great -- fiddling a bit with it to read less on computer in front of kids and it looks like I'll be able to work some nice workflows.
One problem I've run into is page size; I'm not sure how it used to render on older versions but with the latest 3.0 update I find the remarkable is pretty bad at handling A4 pdf (default paper size) -- there's often some text left over at the bottom, requiring to scroll, which is horrible UX.
I'm sure we could muck up with margins, but it's just as simple to get page size right: just add size: x y; to the style in @page you use and it'll come out alright (for the remarkable2, the screen size is supposed to be 188mm by 246mm, with a resolution of 1404 by 1872px (ratio doesn't match, eh).
Doing full 1404x1872 px makes the font too small, but I've had good results with size: 184.5 246mm; and size: 702pt 936pt; (fits more text, mm gets converted to something in the 500s px)
I've also made the middle colon slightly wider with column-gap: 2rem; in the last .row of the FifhtAvenue stylesheet.css.
Papers with these changes look fairly good for me (also made the header smaller as so much blank space feels weird without weather; it's probably safe to ignore that part; margins are also mostly personal taste and you might be better with the original values this is just an example you'll probably want to fiddle with hence not a PR)
diff --git a/styles/FifthAvenue/stylesheet.css b/styles/FifthAvenue/stylesheet.css
index 181d56ff1505..87b400917954 100644
--- a/styles/FifthAvenue/stylesheet.css
+++ b/styles/FifthAvenue/stylesheet.css
@@ -1,15 +1,16 @@
 @page {
-    margin-top: 0.5in;
-    margin-right: 0.2in;
-    margin-left: 0.65in;
-    margin-bottom: 0.2in;
+    size: 702pt 936pt;
+    margin-top: 30mm;
+    margin-bottom: 20mm;
+    margin-left: 20mm;
+    margin-right: 10mm;
 }
 body {
     font-family: "Open Sans";
 }
 .header {
-    padding: 1em;
-    height: 10em;
+    padding: -6em;
+    height: 6em;
 }
 .header div {
     float: left;
@@ -93,4 +94,5 @@ figure>span {
 }
 .row {
     column-count: 2;
-}
\ No newline at end of file
+    column-gap: 2rem;
+}

@martinetd — so sorry for the delay; have been traveling and lost track of things :)
This is a great fix and renders more nicely on my device as well; would you be willing to PR this so you can collect the associated internet-points? :)


[TASK] Reusable CI/CD Pipeline for Semantic Versioning

Description of task
Implement a reusable CI/CD pipeline to automate the process of semantic versioning. @Hallfred has already implemented a similar pipeline here. The main task will be to adapt this workflow to make it reusable, enabling it to run on workflow_call from any of our repositories.
Suggested Workflow
No response
Specifications

[ ] The workflow must be triggered on workflow_call, allowing it to be reused by other repositories.
[ ] It should be customizable through meaningful inputs (e.g., ref, Ubuntu version).

Contacts
@kluge7
@Hallfred
Code Quality

[ ] Every function in header files are documented (inputs/returns/exceptions)
[ ] The project has automated tests that cover MOST of the functions and branches in functions (pytest/gtest)
[ ] The code is documented on the wiki (provide link)

The inputs you can have include: os_name (ubuntu version), ref (which branch) and secrets


Contact Info

You might want to add some contact info in the README. Currently the issue tracker is the only way to contact.
Just wanted to let you know you might be interested that we have a similar solution:
https://github.com/gromacs/gromacs/tree/master/src/gromacs/simd
https://gerrit.gromacs.org/#/c/4524/

Based on some internet search results, this code base may have been related to:
(Book chapter)
Chapter 24: Portable Explicit Vectorization Intrinsics
Authors: P Souza, L Borges, C Andreolli, P Thierry.
(This book chapter is part of this publication)
High Performance Parallelism Pearls Volume Two: Multicore and Many-core Programming Approaches
Editors: Jim Jeffers, James Reinders
Publisher: Morgan Kaufmann,
Year 2015


Issue view is broken in Redmine version 3.2.0

I've upgraded my Redmine installation from 3.1.1 to 3.2.0. After the upgrade the display of issues was broken with the PurpleMine2 theme (see attachment).
I was able to reproduce this with a second installation.

I'm seeing the same thing on Redmine 3.2.0. Thanks for all your work on this theme @mrliptontea!

We were able to reproduce the same issue, it seems that the problem is that Redmine 3.2.0 uses div's for laying out the Issue while previous versions used tables.

Oh, that's actually good news, it seems the whole Redmine went responsive!
I will prepare some quick fix for this, but I see there's more changes that require attention.


Google Meet Clone

Description
As we all know about the google meet app, one of the best app for online meetings and video conferencing. Hence as an gssoc'22 contributor, i want to work on this app clone.
Code of Conduct

[X] I follow Contributing Guidelines of this project.

Assigned u @Priyanshi136

@Priyanshi136 update?

Sorry, for the delay. My exams were going on. So not able to give the time. I will raise it agian once i am ready. Thank you.


Reboot loop when cloud disabled?

I have y211ga_0.27 installed onto the following device:
Model Suffix | y211ga
Serial Number | QFUSY62FNZEK8E230310
Base version <IP_ADDRESS>_202111291330
All seems to work - except that if I disable cloud entirely, the unit resets every ~60 seconds
Is this some kind of watchdog kicking in on the camera? I can achieve the same results by blocking the camera from the world on my firewall - and that seems to avoid the reboot issue entirely....but it also means that recordings do not work

Please, try to run ps and top commands while the cam is running.

Here you are - this is in the stable config (cloud enabled)
Getting the same with cloudd disabled is tricky because of the restarts, but I'll see what I can get
ps_cloud_disabled.log
top_cloud_enabled.log

It's not the first time I've encountered this problem.
If you compare the logs, the difference is the rmm process.
I don't know why but it dies and the wathcdog restarts the cam.
If you want to try, you could increase the sleep time from 6 to 10 in system.sh (line 203).

Unfortunately changing that sleep to 10 didn't change the behaviour:
64 bytes from <IP_ADDRESS>: icmp_seq=11 ttl=64 time=17.5 ms
64 bytes from <IP_ADDRESS>: icmp_seq=12 ttl=64 time=8.01 ms
64 bytes from <IP_ADDRESS>: icmp_seq=13 ttl=64 time=10.8 ms
64 bytes from <IP_ADDRESS>: icmp_seq=14 ttl=64 time=11.5 ms
64 bytes from <IP_ADDRESS>: icmp_seq=15 ttl=64 time=8.47 ms
64 bytes from <IP_ADDRESS>: icmp_seq=16 ttl=64 time=8.40 ms
64 bytes from <IP_ADDRESS>: icmp_seq=17 ttl=64 time=6.33 ms
64 bytes from <IP_ADDRESS>: icmp_seq=18 ttl=64 time=15.1 ms
64 bytes from <IP_ADDRESS>: icmp_seq=19 ttl=64 time=9.71 ms
64 bytes from <IP_ADDRESS>: icmp_seq=20 ttl=64 time=11.4 ms
64 bytes from <IP_ADDRESS>: icmp_seq=21 ttl=64 time=7.00 ms
64 bytes from <IP_ADDRESS>: icmp_seq=22 ttl=64 time=9.45 ms
64 bytes from <IP_ADDRESS>: icmp_seq=23 ttl=64 time=4.79 ms
64 bytes from <IP_ADDRESS>: icmp_seq=24 ttl=64 time=9.32 ms
64 bytes from <IP_ADDRESS>: icmp_seq=25 ttl=64 time=11.0 ms
64 bytes from <IP_ADDRESS>: icmp_seq=26 ttl=64 time=12.6 ms
64 bytes from <IP_ADDRESS>: icmp_seq=27 ttl=64 time=12.6 ms
64 bytes from <IP_ADDRESS>: icmp_seq=28 ttl=64 time=8.39 ms
64 bytes from <IP_ADDRESS>: icmp_seq=29 ttl=64 time=11.1 ms
64 bytes from <IP_ADDRESS>: icmp_seq=30 ttl=64 time=9.18 ms
64 bytes from <IP_ADDRESS>: icmp_seq=31 ttl=64 time=18.1 ms
64 bytes from <IP_ADDRESS>: icmp_seq=32 ttl=64 time=10.7 ms
64 bytes from <IP_ADDRESS>: icmp_seq=33 ttl=64 time=6.77 ms
64 bytes from <IP_ADDRESS>: icmp_seq=34 ttl=64 time=8.52 ms
64 bytes from <IP_ADDRESS>: icmp_seq=35 ttl=64 time=12.0 ms
64 bytes from <IP_ADDRESS>: icmp_seq=36 ttl=64 time=8.35 ms
64 bytes from <IP_ADDRESS>: icmp_seq=37 ttl=64 time=7.65 ms
64 bytes from <IP_ADDRESS>: icmp_seq=38 ttl=64 time=15.0 ms
64 bytes from <IP_ADDRESS>: icmp_seq=39 ttl=64 time=25.0 ms
64 bytes from <IP_ADDRESS>: icmp_seq=40 ttl=64 time=12.3 ms
RESTARTS
64 bytes from <IP_ADDRESS>: icmp_seq=61 ttl=64 time=115 ms
64 bytes from <IP_ADDRESS>: icmp_seq=62 ttl=64 time=8.32 ms
64 bytes from <IP_ADDRESS>: icmp_seq=63 ttl=64 time=8.18 ms
64 bytes from <IP_ADDRESS>: icmp_seq=64 ttl=64 time=7.29 ms
64 bytes from <IP_ADDRESS>: icmp_seq=65 ttl=64 time=6.05 ms
64 bytes from <IP_ADDRESS>: icmp_seq=66 ttl=64 time=6.76 ms
64 bytes from <IP_ADDRESS>: icmp_seq=67 ttl=64 time=9.15 ms
64 bytes from <IP_ADDRESS>: icmp_seq=68 ttl=64 time=8.38 ms
64 bytes from <IP_ADDRESS>: icmp_seq=69 ttl=64 time=6.30 ms
64 bytes from <IP_ADDRESS>: icmp_seq=70 ttl=64 time=16.5 ms
64 bytes from <IP_ADDRESS>: icmp_seq=71 ttl=64 time=6.61 ms
64 bytes from <IP_ADDRESS>: icmp_seq=72 ttl=64 time=8.24 ms
64 bytes from <IP_ADDRESS>: icmp_seq=73 ttl=64 time=7.35 ms
64 bytes from <IP_ADDRESS>: icmp_seq=74 ttl=64 time=9.32 ms
64 bytes from <IP_ADDRESS>: icmp_seq=75 ttl=64 time=8.77 ms
64 bytes from <IP_ADDRESS>: icmp_seq=76 ttl=64 time=8.76 ms
64 bytes from <IP_ADDRESS>: icmp_seq=77 ttl=64 time=10.3 ms
64 bytes from <IP_ADDRESS>: icmp_seq=78 ttl=64 time=10.9 ms
64 bytes from <IP_ADDRESS>: icmp_seq=79 ttl=64 time=12.5 ms
64 bytes from <IP_ADDRESS>: icmp_seq=80 ttl=64 time=7.50 ms
64 bytes from <IP_ADDRESS>: icmp_seq=81 ttl=64 time=6.19 ms
64 bytes from <IP_ADDRESS>: icmp_seq=82 ttl=64 time=8.78 ms
64 bytes from <IP_ADDRESS>: icmp_seq=83 ttl=64 time=6.25 ms
64 bytes from <IP_ADDRESS>: icmp_seq=84 ttl=64 time=17.9 ms
64 bytes from <IP_ADDRESS>: icmp_seq=85 ttl=64 time=8.39 ms
64 bytes from <IP_ADDRESS>: icmp_seq=86 ttl=64 time=9.37 ms
64 bytes from <IP_ADDRESS>: icmp_seq=87 ttl=64 time=8.02 ms
64 bytes from <IP_ADDRESS>: icmp_seq=88 ttl=64 time=12.4 ms
64 bytes from <IP_ADDRESS>: icmp_seq=89 ttl=64 time=6.45 ms
RESTARTS
On Sun, Jul 16, 2023 at 2:17 PM roleo @.***> wrote:

It's not the first time I've encountered this problem.
If you compare the logs, the difference is the rmm process.
I don't know why but it dies and the wathcdog restarts the cam.
If you want to try, you could increase the sleep time from 6 to 10 in
system.sh (line 203).
—
Reply to this email directly, view it on GitHub
https://github.com/roleoroleo/yi-hack-Allwinner-v2/issues/670#issuecomment-1637082528,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AABFQ45AUCSC7SMQFMMGO4TXQPSWLANCNFSM6AAAAAA2LPMSK4
.
You are receiving this because you authored the thread.Message ID:
@.***>

I'm having the same issue but i've seen it's been marked as completed by @roleoroleo ... anything else i can provide to help debug?


Version number

It would be nice to have the version number somewhere, maybe on the middle button,  like top right or bottom right, or maybe even separate menu that also contains release notes, or both.

Done. Added version to menu .. and under  BLE not connected message. It will work from next version.  Release notes is in readme.txt.

Just innstalled Evdash, but the version number says 1.8.3b? Should it not be 2.2.0?


Adjust quoting due to TF CLI change

See
https://docs.testing-farm.io/Testing Farm/0.1/cli.html#_breaking_change_for_strings_with_whitespaces

tested, works fine


creating calendar entry on event date still doesn't work

although I thought to have it fixed in 611db0e18b55b0758aef0295cb2bb1a8ed8f057d.

Hello
I'm not sure that this fix really works. I tried to add an event today, but menu option was not visible. Nightly build was used.

I've debugged that with an event at the date of the commit, so I know it worked for me. Please give me the cache info and the time (of yesterday) when you tried to add it, so I can debug that again.

Gc362xx. I was trying to add it around 10 pm.

You are right. Who would have thought that you set the 12 hours part of the calendar, when using Calendar.HOUR...


Is there a patch to support SPIKE generate trace log?

I now have an immediate need for this and willing to do some of the work with some guidance.


deb: Disable dh_dwz which can cause issues for go

debbuild will automatically execute this dh_dwz target which, for some go builds, will error out like:
0.69 dwz: debian/msft-golang/usr/lib/msft-golang/bin/go: Found compressed .debug_abbrev section, not attempting dwz compression
40.69 dwz: debian/msft-golang/usr/lib/msft-golang/bin/gofmt: Found compressed .debug_abbrev section, not attempting dwz compression
40.69 dwz: Too few files for multifile optimization

This does what dh_golang does and overrides this so the target doesn't do anything.
We may want to make this opt-in in the future somehow (or scope it down to just go builds?).
Not really sure what a good approach will be here, but for now this is blocking being able to build certain packages.

Also affected by this.
https://github.com/Azure/dalec-build-defs/actions/runs/11688802257/job/32550164925?pr=532

Noticed that CI was not triggering on this due to filter rules in the github actions yaml.
I pushed a commit to resolve this.


[FEATURE] Is there any way to apply "the same" transformation on two images?

Issue Description:
Sometimes, we need to apply consistent transformations to multiple images, particularly in tasks like semantic segmentation. In such cases, both the input image and its corresponding GT map (which possibly has more or less than three channels) require identical augmentation. However, existing transformations are tailored for a single three-channel RGB PIL image, leading to the need for complex random number generator (RNG) control and manually adjusting the number of channels, to ensure consistent augmentation across the image and GT map.
To simplify this process, it would be advantageous to extend geometrical augmentations—such as random cropping or shearing—to accommodate multiple maps as supplementary inputs. Of course, these maps should share the same dimensions (height and width) as the input image but can have arbitrary numbers of channel. Consequently, all maps can undergo augmentation in unison with the input image.
Furthermore, addressing scenarios involving combined photometric and geometrical augmentations, such as auto_augmentation, is essential. When inputting an image and corresponding maps, geometrical augmentations should apply to both images and maps, while photometric augmentations should affect only the image.
While I'm not certain about the technical difficulty of adding this feature, it has the potential to greatly increase the convenience of the augmentation process.
Proposed Changes:
Extended Geometrical Augmentations: Modify the augmentation process to support multiple maps in addition to the input image. Maps should share the same dimensions as the input image, while the number of channels can vary.
Mixed Augmentations Handling: Implement support for scenarios involving both photometric and geometrical augmentations, such as auto_augmentation. Apply geometrical augmentations to both images and maps, while photometric augmentations should be limited to the input image.
Benefits:
Simplified Workflow: Eliminate the need for intricate RNG control when applying consistent transformations to multiple images and maps.
Enhanced Data Consistency: Geometrical augmentations will be synchronized across images and maps, maintaining data integrity for tasks like semantic segmentation.
Flexibility: Support various map channel configurations, accommodating diverse applications beyond RGB images.

torchvision default augmentation wasn't great for this, v2 is improved in that you can pass masks, bbox, etc through. I'm working on obj detection, segm and there will be torchision transforms v2 and probably albumentations support, but likely not a full custom timm aug API.


Pressing the right arrow key in a textfield leads to error if deployed in a simulator

Steps to Reproduce

Use the app like given below and deploy it to the simulator (needed because otherwise there are no arrow keys on the keyboard .. )
click into the textfield and type some text using the hardware keyboard of your computer
press the right-arrow key on your hardware keyboard of your computer
see stacktrace below

Stacktrace:
I/flutter ( 3978): ══╡ EXCEPTION CAUGHT BY SERVICES LIBRARY ╞══════════════════════════════════════════════════════════
I/flutter ( 3978): The following NoSuchMethodError was thrown during a platform message callback:
I/flutter ( 3978): The getter 'length' was called on null.
I/flutter ( 3978): Receiver: null
I/flutter ( 3978): Tried calling: length
I/flutter ( 3978):
I/flutter ( 3978): When the exception was thrown, this was the stack:
I/flutter ( 3978): #0      Object.noSuchMethod (dart:core-patch/object_patch.dart:50:5)
I/flutter ( 3978): #1      RenderEditable._handleHorizontalArrows (package:flutter/src/rendering/editable.dart:431:49)
I/flutter ( 3978): #2      RenderEditable._handleKeyEvent (package:flutter/src/rendering/editable.dart:400:19)
I/flutter ( 3978): #3      RawKeyboard._handleKeyEvent (package:flutter/src/services/raw_keyboard.dart:494:17)
I/flutter ( 3978): <asynchronous suspension>
I/flutter ( 3978): #4      BasicMessageChannel.setMessageHandler.<anonymous closure> (package:flutter/src/services/platform_channel.dart:65:49)
I/flutter ( 3978): <asynchronous suspension>
I/flutter ( 3978): #5      BinaryMessages.handlePlatformMessage (package:flutter/src/services/platform_messages.dart:76:33)
I/flutter ( 3978): <asynchronous suspension>
I/flutter ( 3978): #6      _invoke3.<anonymous closure> (dart:ui/hooks.dart:263:15)
I/flutter ( 3978): #10     _invoke3 (dart:ui/hooks.dart:262:10)
I/flutter ( 3978): #11     _dispatchPlatformMessage (dart:ui/hooks.dart:136:5)
I/flutter ( 3978): (elided 3 frames from package dart:async)
I/flutter ( 3978): ════════════════════════════════════════════════════════════════════════════════════════════════════

App:
import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      home: Scaffold(
        body: Center(
          child: TextFormField(),
        ),
      )
    );
  }
}

Logs
flutter doctor -v:
C:\Users\xx\textfield>flutter doctor -v
[√] Flutter (Channel stable, v1.5.4-hotfix.2, on Microsoft Windows [Version 10.0.17763.557], locale de-DE)
    • Flutter version 1.5.4-hotfix.2 at C:\Dev\flutter
    • Framework revision 7a4c33425d (9 weeks ago), 2019-04-29 11:05:24 -0700
    • Engine revision 52c7a1e849
    • Dart version 2.3.0 (build 2.3.0-dev.0.5 a1668566e5)

[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at C:\Users\x\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    • All Android licenses accepted.

[√] Android Studio (version 3.4)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 36.1.1
    • Dart plugin version 183.6270
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[!] IntelliJ IDEA Ultimate Edition (version 2017.3)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2017.3.4
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
    • For information about installing plugins, see
      https://flutter.dev/intellij-setup/#installing-the-plugins

[√] IntelliJ IDEA Ultimate Edition (version 2019.1)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2018.2.1
    • Flutter plugin version 36.1.4
    • Dart plugin version 191.7830

[√] Connected device (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 8.1.0 (API 27) (emulator)

! Doctor found issues in 1 category.

CC @gspencergoog

Hi @ehhc
This issue doesn't reproduce on latest dev

`flutter doctor -v`
[✓] Flutter (Channel dev, v1.18.0, on Mac OS X 10.15.4 19E266, locale en-GB)
    • Flutter version 1.18.0 at /Users/taha/Code/flutter_dev
    • Framework revision 8f7327f83a (31 hours ago), 2020-04-06 22:11:01 -0400
    • Engine revision 49891e0653
    • Dart version 2.8.0 (build 2.8.0-dev.20.0 1210d27678)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at /Users/taha/Code/sdk
    • Platform android-29, build-tools 29.0.3
    • ANDROID_HOME = /Users/taha/Code/sdk
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_212-release-1586-b4-5784211)
    • All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.4, Build version 11E146
    • CocoaPods version 1.9.1
[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 3.6)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 45.0.1
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build
      1.8.0_212-release-1586-b4-5784211)
[✓] VS Code (version 1.43.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.9.1
[✓] Connected device (4 available)
    • SM M305F   • 32003c30dc19668f • android-arm64  • Android 10 (API 29)
    • macOS      • macOS            • darwin-x64     • Mac OS X 10.15.4 19E266
    • Chrome     • chrome           • web-javascript • Google Chrome
      80.0.3987.149
    • Web Server • web-server       • web-javascript • Flutter Tools
• No issues found!

if you disagree please write in the comments and I will reopen it
Thank you


Small objects intersection is not detected.

A triangle fully inside box clipper. The 'Intersect' result is empty, but expected to be equal to the triangle.
Paths64 subj = new Paths64();
Paths64 clip = new Paths64();
subj.Add(Clipper.MakePath(new int[] { 1, 1, 2, 2, 1, 4 }));
clip.Add(Clipper.MakePath(new int[] { 0, 0, 5, 0, 5, 5, 0, 5 }));
Paths64 solution = Clipper.Intersect(subj, clip, FillRule.NonZero);

Given that integer imprecision is ±1 unit, it's important to note that you shouldn't expect solutions to contain polygons with near zero areas. For example, a triangle in a solution with an edge that's only 1 unit in length will be considered within a rounding adjustment of having zero area, and these will be removed from solutions. So it's important to scale paths in clipping operations when you would normally expect polygons with these very small areas. (Alternatively, use PathsD, since clipping these structures will manage any scaling internally.

https://www.angusj.com/clipper2/Docs/Robustness.htm

Thanks!


DeviceInputSystem: Add configure/removeEvents to be called by DeviceSourceManager

This PR contains a few fixes.  First, the contract for DeviceInputSystem has been changed to add configureEvents and removeEvents as public functions.  These functions will now also be called by the DeviceSourceManager, in order to enable and disable event handling.  The DeviceSourceManager will also have enableEvents and disableEvents.  These functions will call configure and remove respectively.  The enable and disableEvents functions should only be called by the InputManager but can tehcnically be called by other classes or the user.  Finally, the default max number of touch points if navigator.maxTouchPoints doesn't exist is now 2 to support the usage of device that may be interpreted as touch but aren't touch.  2 was also picked because we only really support up to 2 finger gestures.

@bghgary - I leave it to you to resolve the conversations and approve


error after install on osx 10.11.3

After installing heroku-toolbelt under osx 10.11.3 I got error
sugiartos-MacBook-Pro:~ sugiarto$ heroku
heroku-cli: Adding dependencies...
 ▸    Get https://cli-assets.heroku.com/node/v5.4.1/node-v5.4.1-darwin-x64.tar.gz: dial tcp: lookup cli-assets.heroku.com on <IP_ADDRESS>:53: read udp <IP_ADDRESS>:64869-><IP_ADDRESS>:53: read: connection refused
 done
heroku-cli: Installing core plugins...
 ▸

 ▸    fork/exec bin/node: no such file or directory
heroku-cli: Installing core plugins (retrying)...
 ▸    Error installing package.
 ▸
 ▸    Try running again with GODE_DEBUG=info to see more output.
heroku-cli: Adding dependencies...
 ▸    Get https://cli-assets.heroku.com/node/v5.4.1/node-v5.4.1-darwin-x64.tar.gz: dial tcp: lookup cli-assets.heroku.com on <IP_ADDRESS>:53: read udp <IP_ADDRESS>:52310-><IP_ADDRESS>:53: read: connection refused
 done
heroku-cli: Installing core plugins...
 ▸

 ▸    fork/exec bin/node: no such file or directory
heroku-cli: Installing core plugins (retrying)...
 ▸    Error installing package.
 ▸
 ▸    Try running again with GODE_DEBUG=info to see more output.
 !    error getting commands pid 2459 exit 1

running the CLI directly got:
sugiartos-MacBook-Pro:heroku sugiarto$ /Users/sugiarto/.heroku/heroku-cli
heroku-cli: Adding dependencies...
 ▸    Get https://cli-assets.heroku.com/node/v5.4.1/node-v5.4.1-darwin-x64.tar.gz: dial tcp: lookup cli-assets.heroku.com on <IP_ADDRESS>:53: read udp <IP_ADDRESS>:51637-><IP_ADDRESS>:53: read: connection refused
 done
heroku-cli: Installing core plugins...
 ▸

 ▸    fork/exec bin/node: no such file or directory
heroku-cli: Installing core plugins (retrying)...
 ▸    Error installing package.
 ▸
 ▸    Try running again with GODE_DEBUG=info to see more output.

@ugifractal Sorry for the delayed response, I had to upgrade a machine to El Capitan to see if I could reproduce your issue.  I was not able to reproduce your issue and now that I am looking at it again, it seems that you have misconfigured DNS setup.  It is trying to get DNS from <IP_ADDRESS> and is not able to make a connection.  Unless you are running a special DNS server locally, that should be the DNS server provided by DHCP or some other value provided by your ISP.

@ransombriggs thanks, I just changed DNS setting, and all working fine