Adapter

Should we be using the npm version of adapter.js? https://www.npmjs.com/package/webrtc-adapter

As discussed on slack, this is done this way so it can include custom changes to adapterjs, but let's prefer the workaround for separating constraints, or better yet this fix for adapterjs.

Yes @aullman.  But we had to make 3 patches for adapter.js for Edge support (now merged in the repo but not yet included in the official npm package) + there is an open issue with the way we use gUM constrains being incompatible with adapter.js.
At this point these are the options we have IMO:

We wait until they change the way they manage gUM constrains and they generate a new version of adapter.js.
We deploy our custom adapter version until 1 happens.
We change the way we configure constraints and we use the the adapter.js version in github (not the one in npm because it doesn't have all the patches).

I'm in favor on doing 2 and then 1 when they are ready (my estimation is at least 1 month).    But let me know how do you prefer to proceed (@aiham @voltrevo @aullman)

@ggarber I'd have a chat with @aiham about the constraint changes that are landing soon. I think Firefox stopped respecting the advanced constraints anyway. If we still need adapter changes beyond what's been merged into the official version, then I'd still use npm for our fork via a github link in package.json like this: https://github.com/opentok/webrtc-js/blob/1d547e5/package.json#L96.

@voltrevo @aullman The changes to advanced constraints will be released in opentok.js 2.11. Should we still include adapter from npm to support current versions of Edge or close this ticket and wait for the Windows 10 Creator's Update: https://blogs.windows.com/msedgedev/2017/01/31/introducing-webrtc-microsoft-edge/#rBsFtMMUxEXx92v3.97

Closing this. We have actually included Adapter.js in opentok now.


Group undo (One step to doing undo "Replace All" action)

When replacing, if there are many "Search text" (100 items) and then I want to revert the editor to the point before replacing, I need do undo 100 times. Need do undo by one step.

Is the Undo.Options => uoGroupUndo = True?

Oh, It was my mistake. You can close this issue! Thanks :-)


Inference with Mandelli models fails here (Google Colab Pro)

I am evaluating the pre-trained models on my dataset, and I finished with wang and gragnaniello. But for mandelli, the inference begins - runs till 36th epoch then throws this error:
File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/_utils/collate.py", line 212, in collate_tensor_fn
    out = elem.new(storage).resize_(len(batch), *list(elem.size()))
RuntimeError: Trying to resize storage that is not resizable

Did some google search and found a variation of collate_fn for the DataLoader:
def collate_fn(batch):
  return {
      'pixel_values': torch.stack([x['pixel_values'] for x in batch]),
      'labels': torch.tensor([x['labels'] for x in batch])
}

DataLoader(..., collate_fn=collate_fn)

Put this in wrappers.py, while calling dataloader, but now getting another error:
  File "/content/diffusion-model-deepfake-detection/src/wrappers.py", line 54, in <listcomp>
    return  { 'pixel_values': torch.stack([x['pixel_values'] for x in batch]), 'labels': torch.tensor([x['labels'] for x in batch]) }
TypeError: tuple indices must be integers or slices, not str

Pls help! Also, do all my images have to be of the same size?

If the error only occurs later I could imagine that it has to do something with the image dimensions. Usually having images with different dimensions in a single batch leads to problems. You could set the batch size to 1.
Please note that in this repository we simply adapted the models from their original repositories, so you could also use their repositories directly or open an issue there: https://github.com/polimi-ispl/gan-image-detection (for Mandelli2022).


Proper HTTP upload with NodeJS & highland

Given the new release, with some nice fixes, I'm trying to port some of my RxJS & Nodejs Streams code over to highland.
This is the original code:
const progress$ = Observable
  .create(o => {
    const fileStream = fs.createWriteStream(filePath, { flags: 'wx' })
    const hasher = crypto.createHash('md5')

    req.on('data', buf => {
      hasher.update(buf)
      if (!fileStream.write(buf)) {
        req.pause()
      }
      o.next({
        position: fileStream.bytesWritten
      })
    })
    req.on('error', err => {
      fileStream.destroy()
      o.error(err)
    })
    req.on('end', ::fileStream.end)
    req.on('close', () => {
      fileStream.destroy()
      o.error(new Error('upload cancelled'))
    })
    fileStream.on('drain', ::req.resume)
    fileStream.on('error', ::o.error)
    fileStream.on('close', () => {
      o.next({
        md5: hasher.digest('hex'),
        position: fileStream.bytesWritten
      })
      o.complete()
    })
  })

This is my highland code so far...
const req$ = _(req, onFinished)
const progress$ = _([
  req$
    .fork()
    .through(crypto.createHash('md5'))
    .map(md5 => ({ md5 }))
  req$
    .fork()
    .through(fs.createWriteStream(filePath, { flags: 'wx' }))
]).merge()

My highland implementation is missing a few things:

{ position } updates and final position.
req.on('close') should be an error.
fs.writeStream can emit 'error' after finish. Is this properly propagated?
Not sure whether I have any missed resource leaks? i.e. is the file descriptor inside the  fs.writeStream always properly closed?

Any comments or suggestions?

{ position } updates

If you just need it to be periodic, implement some sort of timer that checks bytesWritten and add it as one of the streams you're merging. Maybe
var ended = false;
fileStream.once('close', () => ended = true);
_((push, next) => {
    push(null, { position: fileStream.bytesWritten });
    if (ended) {
        push(null, _.nil);
    } else {
        // For simplicity, this can take up to 100ms to detect that the write has finished.
        // You can do something more complicated to make the `close` handler
        // directly call `push(null, _nil)` and cancel the `setTimeout`.
        setTimeout(next, 100); // Or however long you want.
    }
});

and final position

If you don't need it to be in the same status object as the md5, the above works. If you do, implement a custom transform (probably via consume) after the merge that forwards all of the { position }, but holds back the { md5 } until it detects the end of stream. Then push an object with both the final position and the md5.

req.on('close') should be an error.

You'd need to implement this manually. using theonFinish handler. I don't know what the current onFinished does, but you'll need to put it there. Alternatively, you can probably create a stream that emits an error on close and a nil on end. Though this is a bit tricky to do. You can't just call req.once('error') in the generator function since that only gets called lazily, and there's no way to emit an error outside of the generator right now.

fs.writeStream can emit 'error' after finish. Is this properly propagated?

through only works with Duplex streams. Does fs.writeStream even implement pipe? And if so, can it emit error after the pipe finishes? If the answer is yes, then the error won't be propagated.
I don't know how you would properly detect the case where there is no error if errors can be thrown after finish though. You'd need something to tell you, "there won't be any more errors now".

is the file descriptor inside the fs.writeStream always properly closed?

through uses pipe, so If req.pipe(fs.createStream) works, then you're probably fine. Otherwise, you'll probably need to manually destroy the fs stream.

I don't know how you would properly detect the case where there is no error if errors can be thrown after finish though. You'd need something to tell you, "there won't be any more errors now".

fs.writeStream always emits close if { autoClose: true }.

Ah, ok. The rest of my comment still applies though.

Thanks!


Game crashes when cutting a tree

Right now there is the list of resources in too many places (in InventoryResource, in Entity etc...). I think we should remade all the inventory logic by creating a unique file where there is the full list and then all the other methods refer to it, in this way we can add resources much easier and avoid these problems.

That does not precise in which case the game crashes, nor the full traceback you get when said crash happens


Add documentation about login

I don't think it's immediately obvious that this is how the applications are split up.  Also add documentation about nginx configuration for supplier frontend.  I realise this is in digital marketplace manual too, but this is in a private repo so I think it's useful to have it here in the readme too.

Yep makes sense :+1:


VS code keeps asking for password

Hi,
My work flow get's disturbed by this message on my iMac after every save I do in a Bootstrap gulp/pug project: "localhost Enter your password (Press 'Enter' to confirm or 'Escape' to cancel".
I have no clue if it's a bug or how to stop it, it's my first time I use VS code.
Regards & Thanks,
David

Have you installed any additional extensions?


Documentation for tryCatch is not correct.

Running this code returns an undefined not false.
console.log(R.tryCatch(R.prop('x'), R.F)(null))

I have run this on both local, your repl and inline repl all of which are returning undefined.
Using ramda: "^0.25.0"

Hi @mrpotatoes! Nice catch!
This is because the behavior of R.prop has changed to be in line with R.path, so the example will no longer throw an error.  Would you be interested in open a PR with a better example?

Interesting.  I swear I sent the same answer minutes after the issue was raised.  This happens every now and then; perhaps I leave something in Preview mode thinking I've sent it.  Damn, I'm getting old!

This PR fixes the issue: https://github.com/ramda/ramda/pull/2520
And it is already merged.

Is this issue still open?

Not any more.  :smile:


ng-switch optimization

ng-switch in taskresult template inserts/removes subtrees in DOM => reloading the taskresult table takes therefore longer than it should.
solution: create an alternative directive to the built-in one 'ng-switch'.

Duplicates #185 .


DX: cleanup - AbstractFunctionReferenceFixer - use FunctionsAnalyzer

This is the last place to change for FunctionsAnalyzer::isGlobalFunctionCall unification.

Clean up looks good!
However I would like some tests for the AbstractFunctionReferenceFixer::find method (currently there are no dedicated tests for it). as to show what supports (global/no-global, namespaced/global, calling function/method, function signatures, stuff like that ;) )

Are you sure we want to have tests dedicated to this function? Now it is covered by 132 tests from different fixers. Also, we don't test other abstract classes.
To test it I'd have to create a dummy fixer in PhpCsFixer\Tests\Fixtures extending AbstractFunctionReferenceFixer and proxy find function, right?

yeah I was thinking of something like; https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/4128/commits/a38dca7683e96bb0d16aaf66ba1c442c86e715d6
(feel free to push out again if you don't like it)

Thank you @kubawerlos.

Thank you @SpacePossum


Unable to clone repo on Windows

Has there been any testing of this on Windows at all? I can't even clone this repository on Windows due to some files containing a colon
error: invalid path 'src/test/resources/gpu_test/gpus/0000:41:00.0/information'
error: invalid path 'src/test/resources/gpu_test/gpus/0000:c1:00.0/information'

Being honest, we don't plan to support Windows as a first-level target apart from public docker builds: there's llamacpp and onnx native libraries inside, and it's a mess to support an extra windows build for these.
But yes I agree, the git clone issue seems to be weird, will take a look on this.

Seems to be fixed, @TaylorN15 feel free to reopen if you find any issues with the build. But here be dragons.


Only route registered routes

Note: Using Riot 2.3.1
So I was rewriting my webapp which used:
http://example.com#media/id
In the new version the base by default is '#' but it affects every link in the webpage, using or not using '#' so I couldn't click any links because it didn't do anything at all. I really needed to get it working so I finally changed the base to '/' and then the url in the adressbar started to change as I clicked the links but, It does nothing, just works with registered routes, in my case '/media...' after changing the base.
To get it working I needed to register '/..' and then redirect by javascript if the destiny was different from the origin. Here is the code (Which right now doesn't think in queries) I used to get this working If it is of any help:
getUrl = ->
  "#{window.location.protocol}//#{window.location.host}#{window.location.pathname}"

oldMediaId = null
baseUrlForRouter = getUrl()

$(document).ready ->
  riot.route.base('/')

  riot.route 'media/*', (mediaid)->
    if mediaid? and oldMediaId != mediaid
      mediaPopupExec(mediaid)
      oldMediaId = mediaid

  riot.route '/..', () ->
    tUrl = getUrl()
    if tUrl != baseUrlForRouter
      window.location.replace(tUrl)

  riot.route.start(true)

So I can't find anything to solve it in a more official way. Usually in ExpressJS (Node.js) routes are like (req, res, next), and the next param is to call the next registered route which fits the actual route with his filter. If it doesn't have any other, it makes the default move, which in Express usually would be 404 because It doen't find any route, but here would be to send it to the clicked url.
In less words: When any route doesn't satisfy the asked route, it ""shouldn't  do event.preventDefault()"" (Just as an example XD)
Sorry if there is an official way to do this, but I couldn't find it :S

We have exactly the same problem, we stuck on this just couple minutes after you post this issue. Desired outcome for us is that router will hande only routes which passes filter (or are registered by router).

Oh, that's a bug. We got to fix it.
A temporal work-around is using absolute path:

some/path/ --> http://example.com/#some/path/

Hi @Ldiab @shamotj
I'm working on this issue today. It's not so simpler than what I thought first. Possible strategies here:

A. if not match base
B. if not match routes and has no default route
C. if not match routes and all default routes returns false
D. if all routes returns false

As my understanding riot.observable is design to not return the value to the event emitter, so C / D would be complex.
Is it enough A or B? Thoughts?

Hi, I think B would be the best option, If a route dont satisfy any registered filter it should be ignored by the Route and the browse should take the default option (If I have understand it). So an app who only uses Riot routes if he wants to show  a 404 whenever the user enter in a invalid url, he just needs to use '/..', and in server based urls, the server will handle the 404.
Returning false is an interesting option which allows more complex routing and behave, but it can be avoided for now, it can be a "feature request".
Thanks for working in this :)

El 14 nov 2015, a las 7:00, Tsutomu Kawamura<EMAIL_ADDRESS>escribió:
Hi @Ldiab @shamotj
I'm working on this issue today. It's not so simpler than what I thought first. Possible strategies here:
A. if not match base
B. if not match routes and has no default route
C. if not match routes and all default routes returns false
D. if all routes returns false
As my understanding riot.observable is design to not return the value to the event emitter, so C / D would be complex.
Is it enough A or B? Thoughts?
—
Reply to this email directly or view it on GitHub.

@Ldiab thanks for your quick feedback. If we use /.. as a filter, all url will be caught. It seems not an expected behaviour, doesn't it?
 Even if there's existing static page, not found route will fire. Does it make sense..?

Mmmm yes, because you have explicitly registered every route to trough that if you haven't registered it before, so to solve this the user has two options, manage every url in the webapp with this route, non on the server, or not to register '/..' and handle all other request on the server.
Alternatively maybe could be added a parameter like a callback to go to the next filter, and if there isn't any other filter execute the expected behavior something like this:
riot.route.base('/app')
riot.route('/', function() { /* home */ })
riot.route('/news/*', function(id, next) { /* news */
checkByAjaxId(function(newsWithId){
if (!!newsWithId){
/*whatever*/
}else{
next()
}
}) })
riot.route('/..', function() { /* not found OR EXECUTED IF ANY NEWS FOUND */ })
riot.route.start(true)

You know? So It would be always the last argument, and it is executed only if the user wants it, this is how Express.js handle this.
Like I said if the user executes the calback in the last valid filter, then is saying to the route It needs to handle it by server, maybe a next(true) for a direct 'to server' action could be also very interesting.

Yeah, sounds good. But I have some concern...

next() fits in async, but riot.route doesn't support it. (at least at this point)
one route could have multiple callbacks. The order of evaluation would be too complex.

How about just returning false or true from callbacks? The basic concept is almost same, but it doesn't mean that it pass the process to next.

Just to point out that Express' use of next is restricted to applying middleware after a unique route has been chosen. In Express the first route that matches is the only one that gets used. Once the route is selected, then middleware application starts, and that's where next comes into play. (You can't switch to a different route's callback by using next, in other words. You can only skip to the next middleware in the stack for a given route.)
If I understand properly it doesn't seem that riot's router does things differently in terms of route selection: a typical router (Express, Component) loops through the routes, and riot does the same thing as far as I can tell.
(On the other hand, riot uses an observable to dispatch the callbacks, while Express uses a stack of middlewares.)
If I understand properly, what we are trying to achieve here is for a callback to be able to tell the router that it picked the wrong route, and would it please continue to iterate through the list of routes (something Express or other common routers do not support).
We're also trying to tell click that it should not preventDefault if no route was found, or the route callbacks that were tried all requested to pass.
I think the solution with a simple boolean answers both of these but I'm not sure it's feasible with an observable dispatch, nor that dispatching in random order through an observable is something we want -- if A and B are both callbacks for a given route and A decides that the router should skip the route but B decides to apply changes based on the route, the outcome will be unpredictable.
@cognitom in terms of API, instead of a true/false return value I'd suggest using a context method like this.pass() which would be used to indicate that the router should skip. This would make the behavior backward-compatible for those of us using CoffeeScript.

@shimaore thanks a lot for your clarification! I have a bit confused about Express. (I'm totally front-end guy in JavaScript...)
I like your idea this.pass(). I'll update the PR #26 tonight ;-)

@shimaore Hi, Yes, It is used by middleware, but, ExpressJs, has as a Coding Standard (Or something like that, sorry my english level isn't high enough) to use Next in every route you register, as they say:

You can provide multiple callback functions that behave just like middleware, except that these callbacks can invoke next('route') to bypass the remaining route callback(s). You can use this mechanism to impose pre-conditions on a route, then pass control to subsequent routes if there is no reason to proceed with the current route.

So you can do something like this:
Register in this order:
'/', '/admin', '/admin/destroyAllData', '/admin/giveAllMoneyToDogsONG'
And then you in '/admin' take control over the user perms:
if (user.isAdmin){next()}else{sendToJail()}
I think is the cleanest way, but yeah, I use a lot Node.js so all my thoughts are async...

@Ldiab I stand corrected, I missed the introduction of next('route') in Express 4.0, which does what we're trying to do here (i.e. in Express skip the remainder of the middleware stack and process the next route). Your example should read
if (user.isAdmin){next('route')}else{sendToJail()}

to use that feature. (In previous versions one would have used that middleware in the stack for /admin, /admin/destroyAllData, /admin/giveAllMoneyToDogsONG etc.)
Also edited my answer above to correct this.

@shimaore No, by adding 'route' you are doing the opposite:

except that these callbacks can invoke next('route') to bypass the remaining route callback(s)

Executing next() will get to the next route. I use it all the time. Thats why I found it so interesting to insert it here or a similar.

But I think we are messing here, there is two things in this Github issue, so I think It should be splitted:

Not registered urls should not preventDefault()
Hit more than one registered url (Which is my suggestion)

A list in the context with the registered urls that will be hit if you keep doing next() or whatever

So here would be only the first item. Any thoughts?

Yeah, at this time, I'd like to merge #26 without next(), once. And keep this issue open.

Alright, apparently I've been spending too much time in middleware and didn't really understand how Express behaves wrt the last callback in a route stack.
I tested this and things inside the last callback of the route stack (which is the only one most people use, and the only case riot really cares about today) behave as described by @Ldiab with the exception that /admin won't catch the requests below its path, you would need to use /admin/* for that.
In the order things are processed:

Middleware are the functions registered with app.use. They are "mounted" under a given path (by default /) and are executed for all requests that use that path as a prefix. They get executed in order, and inside a middleware function next() will pass control to the next middleware, or to the callback stack if the last middleware was reached. next('route') inside middleware has no special handling, it sends 'route' back to the client.
Routes are processed in the order they are registered using app.get, app.post, ... and the first route that matches will execute its callback stack. The callback stack are the functions registered for a specific verb (method) and route pattern.

In callbacks except the last callback, next() will pass control to the next callback in the stack (same as in middleware). next('route') will skip the remainder of the callback stack and try the next route.
In the last callback of the callback stack for a given route, next() will try the next route. next('route') behaves the same way as next().

In all cases, next(new Error(...)) will reject the request and stop processing.
Not calling next() in a middleware or callback will stop processing of the middleware/callback chain.

Hi, I think the fix isn't working... I still get the url changed but nothing happens and I have only one url registered like this:
var oldMediaId;

oldMediaId = null;

$(document).ready(function() {
  riot.route.base('/');
  riot.route('/media/*', function(mediaid) {
    if ((mediaid != null) && oldMediaId !== mediaid) {
      mediaPopupExec(mediaid);
      return oldMediaId = mediaid;
    }
  });
  return riot.route.start(true);
});

Its the compiled version of my coffeescript, am I doing something wrong? Thanks!

Fix works for me, here's a snippet from my code, maybe it'll help:
function changePage(id){
    if (id){
        self.pagenum = id-1;
    } else {
        self.pagenum = 0;
    }
    self.page = paginate(self.pagenum);
    self.update();
}
riot.route.base('/admin/user-list');
riot.route.start(true);
riot.route('#*',changePage);
riot.route('',changePage);

Would something like angular does be unacceptable in terms of clicking on links? Any link that specifies a target attribute is not handled by the history API (i.e. <a href="/test" target="_self" />).  I think I'll add this exception for my own project as I only have two hard links in my app — login and logout.

@Ldiab @cognitom I posted about a similar issue in the Riot Forum today but maybe I should have filed an issue about it here instead. Well, since this one is still open I thought I could share my experience (and solution).
What I experienced was that links with relative paths like /some/folder/file.jpg triggered the Router if I was standing on a route like #profile, but not if I was standing in the app root /#. To me it seemed as if I had to tell the router to disregard from "routes" that didn't begin with #.
My solution was to define a base route riot.route.base('/#') - the only thing different from the default base is the forward slash /. With this solution I have no problems linking to files using relative paths.
A side note: using target="_blank" on links also solved my problem, but sometimes you want to be able to link to files in either way.

Closing this issue because it's related to an old router version. Please update to the latest @riotjs/route version if you can.


Move books from PHP to Symfony in free-programming-books-es.md

Also add metadata to another book in the PHP section
What does this PR do?
Add info
For resources
Description
Why is this valuable (or not)?
The symfony section was already created, but there were books about that framework in the general PHP section that had not been placed there.
I have also added information about the author of the other Symfony book that was already in the subsection.
How do we know it's really free?
For book lists, is it a book? For course lists, is it a course? etc.
Checklist:

[X] Read our contributing guidelines.
[X] Search for duplicates.
[X] Include author(s) and platform where appropriate.
[X] Put lists in alphabetical order, correct spacing.
[X] Add needed indications (PDF, access notes, under construction).
[X] Used an informative name for this pull request.

Follow-up

Check the status of GitHub Actions and resolve any reported warnings!

Thanks, and welcome to free-programming-books!


Youtube not playing in UWP

Hello,
I am using the exact code:
try
{
    var url = await YouTube.GetVideoUriAsync(
            youTubeId, YouTubeQuality.Quality720P);

    player.Source = url.Uri;
    player.Play();
}
catch (Exception exception)
{
    // TODO show error (video uri not found)
}

It worked for about 1 or 2 months for me, but now it just doesn't play anymore. It gets an uri, sets the player source (where player is a mediaelement), but when i call player.Play() nothing happens. No error, no nothing.
Did something change with their API? Is the uri not good? I can't figure it out why it just suddently doesn't play. Happens on multiple devices, multiple connection, tested it anywhere.

Also, takes way longer now for GetVideoUriAsync() to execute. Like 2-3 seconds. Used to be almost instant.

Maybe they changed the "API" again...

Yeah, i think so. This is the only way i can play a youtube video in a media element. I need to get that mp4 streaming link :(

The alternative is to use an embedded youtube player, but that kinda sucks, i already tested it and i get ads, i can't fullscreen it (or maybe i can if i struggle a little) and most important, i can't play it in a background audio task -.-

@darksody, Unless Microsoft fixed it, I'm pretty sure WPF MediaElement won't play HTTPS (secure http) links. Youtube changed to https in early 2016 timeframe (I think).


Can I read a savefile from Python?

Hello,
First of all, many thanks for the work you have done. It's a great project, thank you for supporting it!
I am not familiar with TypeScript, but out of curiosity, I have been trying to play around with the savefiles (sandbox*) using Python.
I managed to decompress a test savefile into a proper JSON object:
{
    "m_InternalName": "sandbox11",
    "m_DisplayName": "TestH",
    "m_Timestamp": "2023-02-01 23:33:42",
    "m_GameMode": "SANDBOX",
    "m_GameId": 11,
    "m_InstalledOptionalContent": [
        "DLC01"
    ],
    "m_Version": 100,
    "m_Changelist": 106075,
    "m_Dict": {
        "boot": "H3sibV9TY2VuZU5hbWUiOiJRdW9uc2V0R2FzU3RhdGlvAm4ifQ==",
        "global": "H3sibV9WZXJzaW9uIjo0LCJtX0dhbWVNYW5hZ2VyU2VyH2lhbGl6ZWQi ... =",
        ...
    }
}

It looks good except for the m_Dict field, which contains quite readable keys (such as global) but unreadable values (all values start from H3sibV9 for some reason and end with =). Can I ask you a question, what are these values and how can I de-code them into something meaningful?

Sure, here's the steps to decode the m_Dict items:

Convert it from base64 to binary data
Decompress the binary data with the same algorithm you decompressed the save file
Parse the resulting JSON string

Let me know if you have more questions! :)

Thank you so much for your super quick response!
I just followed your advice, and it worked!
It's very interesting, I didn't expect it was compressed twice :)

It's very interesting, I didn't expect it was compressed twice :)

Yeah the format isn't that smart to be honest. There's also multiple layers of JSON serialization which results in wasted space because JSON.stringify(JSON.stringify(JSON.stringify({foo: 'bar'}))) is '"\\"{\\\\\\"foo\\\\\\":\\\\\\"bar\\\\\\"}\\""' instead of just {"foo":"bar"}. I once tested it out and managed to reduce the save file size to just 19% of the original by just getting rid of the nested serialization.

Yeah, I noticed a ridiculous amount of \ in the output too. Not sure how they end up with that. It must be a pain to write this file back after making changes.
The fact that a proper non-nested and non-compressed JSON was smaller than this double-compressed save is funny indeed :)
The devs had a perfect chance to improve the saves when they released the DLC recently. Old saves became incompatible with the new game anyway.
Well, but at least the saves are readable, thanks to you and your project! 👍

The devs had a perfect chance to improve the saves when they released the DLC recently. Old saves became incompatible with the new game anyway.

Yeah the changes to the same format were very minor in that update. The did do one improvement though, they finally started using Base64 for the binary data. Earlier they user number arrays. So for example "Old saves became incompatible with the new" in base64:
T2xkIHNhdmVzIGJlY2FtZSBpbmNvbXBhdGlibGUgd2l0aCB0aGUgbmV3
was saved as
[84,50,120,107,73,72,78,104,100,109,86,122,73,71,74,108,89,50,70,116,90,83,66,112,98,109,78,118,98,88,66,104,100,71,108,105,98,71,85,103,100,50,108,48,97,67,66,48,97,71,85,103,98,109,86,51] in the JSON. That's +175% to the file size right there :smile:

I'll close this issue to cleanup open issues


use null-safe string conversion

Allows field values to be null. This is required if an exception with a null message is added using addThrowableWithStacktrace but may be useful in general.

Thanks @mbachl!


Compatibile with Pyodide, Error: pure Python 3 wheel for 'datasketches'.

Hello,
i am trying to import the python library in the Pyodide with a custom build, but when i try to install i receive this error
`running build_ext
-- The CXX compiler identification is GNU 8.3.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /src/tools/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning (dev) at /usr/local/lib/python3.9/site-packages/cmake/data/share/cmake-3.22/Modules/GNUInstallDirs.cmake:239 (message):
Unable to determine default CMAKE_INSTALL_LIBDIR directory because no
target architecture is known.  Please enable at least one language before
including GNUInstallDirs.
Call Stack (most recent call first):
CMakeLists.txt:23 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.
-- Found Python3: /usr/local/bin/python (found version "3.9.5") found components: Interpreter Development Development.Module Development.Embed
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- Found pybind11: /usr/local/include (found version "2.9.1")
-- Configuring done
-- Generating done
-- Build files have been written to: /src/packages/datasketches/build/datasketches-<IP_ADDRESS>/build/temp.emscripten_wasm32-3.9
[ 20%] Building CXX object python/CMakeFiles/python.dir/src/datasketches.cpp.o
[ 20%] Building CXX object python/CMakeFiles/python.dir/src/hll_wrapper.cpp.o
[ 30%] Building CXX object python/CMakeFiles/python.dir/src/kll_wrapper.cpp.o
[ 40%] Building CXX object python/CMakeFiles/python.dir/src/cpc_wrapper.cpp.o
[ 50%] Building CXX object python/CMakeFiles/python.dir/src/fi_wrapper.cpp.o
[ 60%] Building CXX object python/CMakeFiles/python.dir/src/theta_wrapper.cpp.o
[ 70%] Building CXX object python/CMakeFiles/python.dir/src/vo_wrapper.cpp.o
[ 80%] Building CXX object python/CMakeFiles/python.dir/src/req_wrapper.cpp.o
[ 90%] Building CXX object python/CMakeFiles/python.dir/src/vector_of_kll.cpp.o
[100%] Linking CXX shared module ../../lib.emscripten_wasm32-3.9/datasketches.cpython-39-x86_64-linux-gnu.so
make[3]: *** [python/CMakeFiles/python.dir/build.make:226: ../lib.emscripten_wasm32-3.9/datasketches.cpython-39-x86_64-linux-gnu.so] Error 1
make[3]: *** Deleting file '../lib.emscripten_wasm32-3.9/datasketches.cpython-39-x86_64-linux-gnu.so'
make[2]: *** [CMakeFiles/Makefile2:657: python/CMakeFiles/python.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:664: python/CMakeFiles/python.dir/rule] Error 2
make: *** [Makefile:309: python] Error 2
Traceback (most recent call last):
File "/src/packages/datasketches/build/datasketches-<IP_ADDRESS>/setup.py", line 82, in
setup(
File "/usr/local/lib/python3.9/site-packages/setuptools/init.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/usr/local/lib/python3.9/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/lib/python3.9/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/local/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.9/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/local/lib/python3.9/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/src/packages/datasketches/build/datasketches-<IP_ADDRESS>/setup.py", line 45, in run
self.build_extension(ext)
File "/src/packages/datasketches/build/datasketches-<IP_ADDRESS>/setup.py", line 78, in build_extension
subprocess.check_call(['cmake', '--build', '.', '--target', 'python'] + build_args,
File "/usr/local/lib/python3.9/subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', 'python', '--config', 'Release', '--', '-j2']' returned non-zero exit status 2.
[2022-02-09 21:23:39] Failed building package datasketches in 47.0 seconds.
Traceback (most recent call last):
File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/src/pyodide-build/pyodide_build/main.py", line 62, in
main()
File "/src/pyodide-build/pyodide_build/main.py", line 56, in main
args.func(args)
File "/src/pyodide-build/pyodide_build/buildpkg.py", line 821, in main
build_package(
File "/src/pyodide-build/pyodide_build/buildpkg.py", line 655, in build_package
compile(
File "/src/pyodide-build/pyodide_build/buildpkg.py", line 385, in compile
pywasmcross.capture_compile(
File "/src/pyodide-build/pyodide_build/pywasmcross.py", line 163, in capture_compile
result.check_returncode()
File "/usr/local/lib/python3.9/subprocess.py", line 460, in check_returncode
raise CalledProcessError(self.returncode, self.args, self.stdout,
subprocess.CalledProcessError: Command '['/usr/local/bin/python', 'setup.py', 'build']' returned non-zero exit status 1.`
who can help me to build an pure python package?

No follow-up from original poster. No plans to re-implement sketches from scratch. Closing.


feat: add when parameter to all commands

Brought from https://github.com/CircleCI-Public/github-cli-orb/pull/50

Your orb has been published to the CircleCI Orb Registry.
You can view your published orb on the CircleCI Orb Registry at the following link:
https://circleci.com/developer/orbs/orb/circleci/github-cli?version=2.4.0


Options class update

Adds

types.pxd to allow use in Options
advanced_options  which allow class inheritance for ColumnFamilyOptions
statistics class

Updates options.pxd classes to match the header in rocksdb 6.11.4
Does not add additional classes needed by options which are defined in other header files (eg. CompactionFilter, ConcurrentTaskLimiter, RateLimiter,  etc) but are added here with a TODO tag.

The options and advanced options files need a lot of classes that are defined in other files. Should I add them all to this PR or do you prefer that I add those in newer PRs? In the current one the missing options are commented out (with TODO tag).

I will look at this tomorrow morning, thank you

Added all the new options properties that are added in this PR to the python api and added basic get/set unit tests to check that they work.

I've addressed the comments here and it is ready for review again.


Add a kernel parameter to enable Pro mode (AKA Neo mode)

Default should be false if it is not specified.

Wait, is it finally happening?

Is Settings finally getting a purpose?


[WIP] Update mobile code and add badger-ds support

Got some questions here for @cpacia.
We can't merge this immediately because it changes the datastore config, but I need to figure out how to best do this. Should I create a mobile config go file and reference that from node.go? Would that be best so as not to conflict with the desktop server? Or would you like to do something else? Also the dsync pass for the compiler is only relevant for mobile and doesn't need to be skipped on desktop so we'll need to think about that perhaps in the future.

Coverage remained the same at 27.266% when pulling 39d5e867e017fe47bbb7bc8ce8036b10ca7280f9 on bds into a711844650ca58dd6d8f4ca72e48580a6e25aed5 on master.

Doesn't look like this helped that much. Also needs a major rebase.


Trailing 0 stripped from value

Hi,
I'd like to include 2 decimal places in the label of the chart I'm creating. The problem is that if the value is something like 9.60, the trailing 0 gets removed, which won't work for my purposes because the values for my project are all dollar amounts. Is there any way to include the trailing 0s?
For example,
http://codepen.io/anon/pen/BzxrrL
If you click on the bar, the values are shown with the trailing 0s removed.
Thanks!

You can pass a referenceValue to the axis configuration.

var config = {
  axisY: {
    referenceValue: 0
  }
};

Thank you for the quick response, but I was not able to get the values to show both decimals if there's a 0 at the end. Could you elaborate on how I could use referenceValue for my purpose?
I added referenceValue: 0 to the y-axis, but I don't see a difference?
http://codepen.io/anon/pen/BzxrrL

Ah sorry I guess I didnt get your initial question. You can use the labelInterpolationFnc open to pass a function wich will receive every label value. You can then return a tranformed label value. You can search google on how to format numbers in javascript.

Thanks again for your response. I tried using:
labelInterpolationFnc: function(value) {     return value.toFixed(2);   }
For the y-axis, but now the chart is completely broken. Please let me know what I am doing incorrectly.
http://codepen.io/anon/pen/BzxrrL

Well, on horizontal bar charts it needs to go to the xAxis ;-)

Oops haha. My bad.
I added it to the x-axis, but I still don't see the trailing 0 though :(

This has been resolved right? I can see trailing 0 in your codepen. Please re-open if this is still an issue.


fix: bitwise shift with different left/right types

Which issue does this PR close?

Closes #134.
Rationale for this change

What changes are included in this PR?

How are these changes tested?

Merged. Thanks.


Fix json schema occurrences for creators

From recent conversations and the Datamodel draft pdf (2020-01-20 Version 0.1), there can be 0 creators. The current schema is:
creators = fields.List(Nested(CreatorSchemaV1), required=True)

which seems to require creators.
... but that translates to only requiring "creators": [] in the API. That is, POST'ing a record json without the "creators" field returns a Validation Error, but should not. Passing "creators": [] is accepted. Passing "creators": [] and not passing it at all should be the same.

We're allowing 0 creators? That will break DataCite compatibility and mess up citations.

This is what I thought originally, but Datacite allows an "Unknown" value to be passed in.
I am sorry the data model is very hard to communicate; there are a lot of layers and phases with a lot of details.

Yeah, technically. But I would handle that situation by putting Unknown in the the field (there is still a creator, just one called unknown). There are 10 special codes for unknown information in DataCite. I'd want a user to select why they aren't providing a creator, versus just leaving the field out and have the repository fill in a default.

That's a good thing to know. I will move your comment to an issue at the deposit page level.

Made a new issue for this since code has changed so much since it was made + will bring more attention to it: https://github.com/inveniosoftware/invenio-rdm-records/issues/427


<EMAIL_ADDRESS>remove extract_dir

Closes #10295

[x] I have read the Contributing Guide.

lol

terrible timing

terrible timing

Are any other issue here?

Nope, that was just a nit cause the package had some other extra things not useful to most people like a pdb debug file, and some txt files


[Bug] [JDBC] Oracle source The current field is DecimalType containing decimals: 18 Unable to support

Search before asking

[X] I had searched in the issues and found no similar issues.

What happened
Oracle version: 11.2
1.数据库设置number，报错The current field is DecimalType containing decimals: 18 Unable to support。debug如下所示：

2.数据库设置number(*,0)，报错The current field is DecimalType containing decimals: 18 Unable to support。debug如下所示：

3.数据库设置number(18)，成功执行。
SeaTunnel Version
DEV branch
SeaTunnel Config
env {
  # You can set flink configuration here
  job.mode = "BATCH"
}
source{
    Jdbc {
url = "jdbc:oracle:thin:@XXXX/XXXX"
driver = "oracle.jdbc.OracleDriver"
connection_check_timeout_sec = 100
user = "XXX"
password = "XXX"
        partition_column = "ID"
partition_num = 20
fetch_size = 5000
query = "select * from indicator_bigdata"
parallelism = 5
    }
}

sink {
    jdbc {
url = "jdbc:postgresql://XXX:5432/XXX"
driver = "org.postgresql.Driver"
user = "XXX"
password = "XXX"
batch_size = 5000
batch_inteval_ms = 0
database = public
table = indicator_bigdata
generate_sink_sql = true
}
}

Running Command
./bin/seatunnel.sh --config oracle2pg.template -e local

Error Exception
The current field is DecimalType containing decimals: 18 Unable to support

Zeta or Flink or Spark Version
No response
Java or Scala Version
No response
Screenshots
No response
Are you willing to submit PR?

[ ] Yes I am willing to submit a PR!

Code of Conduct

[X] I agree to follow this project's Code of Conduct

Your partition key cannot be a decimal place, we want it to be a positive integer

I understand that it's a positive integer，when scale is zero，there are two judgments。
when basicType is long，the range of long value is between -9223372036854775808 and<PHONE_NUMBER>854775807，it's length is 19，as to unsigned， the length is 20。
I am curious that the judgment of precision less than or equal to 18。when it's length is 19 or 20，partitionColumn is invalid，Because it would be set DecimalType(38,18)。

I will try to fix what seems, to be a type judgment issue

I will try to fix what seems, to be a type judgment issue

ok，thanks。

@ic4y @liugddx close current issues thks CC @junmingliu fix issues

OK

junmingliu

@ic4y @liugddx close current issues thks CC @junmingliu fix issues

Thanks for the bug fix, @zhilinli123 ! Your contribution is greatly appreciated. 👍

And a special shoutout to @junmingliu for reporting this bug.


Use tolerance for SingleVariable dual checks

Any ideas for how to test this in a numerically stable way?
Closes #250

Any ideas for how to test this in a numerically stable way?

How about solving a simple model, say
min x
s.t. l <= x <= u

once written with variable bounds (MOI.SingleVariable), the other written with general linear constraints (MOI.ScalarAffineFunction). The duals of both models should be identical (up to numerical tolerances).

See: https://github.com/JuliaOpt/MathOptInterface.jl/pull/883


QA remove lower case match

Remove to lower case when accessing map keys as some have multi-word keys that then don't work. Example parentId key can not be accesses as it is converted to parentid

You could also try both.
if value := jsonResult[filter] returns nothing
try value := jsonResult[strings.ToLower(filter)] as well

You could also try both.
if value := jsonResult[filter] returns nothing
try value := jsonResult[strings.ToLower(filter)] as well

ohhh right, smart


Expose option to use all compute threads

Have an option in aria-tools to say all for number of threads. This step would include a check to see how much is available on ones system and set it to that number.

This has previously been added in ariaExtract and ariaDownload


TIC-53 Back-end implementation of Active/Inactive/All Events for Showings

Description
Completed the back-end implementation to the new group toggle button for showings using the new prisma api. Results in being able to filter the events based on active/inactive/all events to be displayed.
Risks
Unsure if there is, settings are strict to the 3 options.
Validation
Manual Testing:

Issue
Link to corresponding issue
Operating System
Win10/Chrome

Retesting for results was done:


Deflake proc_test by adding a sleep

@alainjobart
Just tested this w/ and w/o the sleep with 1000s of iterations.
With the sleep: ~1/1000 failures.
Without the sleep: ~140/1000 failures.
This won't completely fix the problem but is a temporary solution.

lgtm


Test: delete "diff manifests" test case

This is not adding any value any more, since all image definitions are defined in the osbuild/images repository and just vendored in this one.
This pull request includes:

[ ] adequate testing for the new functionality or fixed issue
[ ] adequate documentation informing people about the change such as

[ ] submit a PR for the guides repository if this PR changed any behavior described there: https://www.osbuild.org/guides/

I wasn't sure if the diff test was providing any value after all, but let's add it there now and see if we can make it more useful after.


Enhanced game details view

The Chore
This page needs to be enhanced with a few things:

A restyle that Joelle has done where we will echo the reward detail view here
Core have provided new intra-epoch metrics here and we will want to expand that game details page to include these
A bug has been raised indicating that the rank table if longer than say 15 doesnt all appear on hover and you cant scroll, so we want to add this to this page too as part of the detailed view

Starting from this page: https://vegaprotocol.eth.limo/#/competitions/games/c99f3210f7d481e0dbfa36de2bf327b02e9a1bedd1302eb012c890f8a9314f13
Acceptance criteria

[ ] Replace the existing game details view (when you click on a card) with the new sketches shown below
[x] Add the fee cap to the top banner if a capRewardFeeMultiple is provided on the transfers API
[ ] Seperate the page into two (or three) tabs;

[x] "Live scores" will take data from the new APIs given below
[x] "Score history" will use the existing games API
[ ] "Payout structure" will display ONLY if the game is of dispatch strategy type RANK and should use the same formatting as those shown but include the data from the current tooltip table (not included in figma sketches)

[x] Live scores page:

[x] Show the team, avatar, and score from the new API
[x] Order the list by score and use that list to derive the rank
[x] Add to banner "Your cap" = totalFeesPaid (from second API) * capRewardFeeMultiple
[x] Add a tooltip which says "Your fees paid for this epoch are currently totalFeesPaid so your rewards will be capped at capRewardFeeMultiple times this amount"
[x] Derive the estimated reward as:

[x] For RANK game; order all teams on the API by score to find their rank and look up the expected payout using the same logic we use in the rank table (which should be taken from the existing tooltip as above)
[x] For PRORATA game: estimated reward = amount (transfers API) * team score / sum of all team scores

[x] Score history page (uses legacy games API)

[x] Show the team name, avatar, epoch, and reward earned as per current implementation
[x] Query the new game score history API provided here for the full history of epochs up to 30
[ ] Join the data based on epoch + partyId to the games API so you can retrieve the rewardEarned and add to the data set (adjust for decimals)
[ ] ~Use the same logic as above to estimate the reward that teams should have got based on their game scores in that epoch~
[ ] ~If the reward is more than 10% different to the estimated reward display a warning icon and tooltip "As a result of fee multiple caps your team's rewards have been lowered"~

Additional details / background info
Ticket we're dependent on
https://github.com/vegaprotocol/vega/issues/11357
Query to get the live game scores
query liveGameScoresByGame {
  gameTeamScores(filter:{gameIds:["aca1d31b5155626d719d885a4b1b71f87297ae3721dfecc7f529ed2d08c988bb"]}){
    edges{
      node{
        gameId
        teamId
        epochId
        time
        score
      }
    }
  }
}

Query to get the fees paid
query livePartyStatsByParty {
  gamePartyScores(filter:{partyIds:["0c2f43d6cddf12071cc6b7ec220c1f79e62b77ef517c48886c77788981bc6cb7"]}){
    edges{
      node{
        gameId
        teamId
        epochId
        partyId
        time
        score
        stakingBalance
        openVolume
        totalFeesPaid
        isEligible
        rank
      }
    }
  }
}

Sketches
Far right under "Game Details" at the below address:
https://www.figma.com/design/ywcCZvXdvG28bg0AmCY9mF/Console-v3?node-id=6326-49064&t=ycbq8JgXVMbgAhpO-0

This is broadly working and anything else is captured on #6694


Kul Tiras' Flagship didn't spawn at the Balor shipyards

https://discord.com/channels/553888327103807491/1070031557500358696
Have not tried replicating this yet. Not even completely sure it's a bug.

Can't replicate. Will have to await some kind of screenshot or video.


Swift4 warnings fixed

Summary of Changes
Swift 4 and xcode9 showed warnings about redundant protocol conformance which made unable to build code with -weverything.
I've fixed these warning and migrated all code and project settings to swift 4.
Podspec is updated accordingly

Thank you! I'd appreciate if you push podspec to public repo


Cap'n Proto should be on the binary protocols list

The Rust library has all its features: it allows serialization, deserialization and asynchronous RPCs.

Website
Repo
Docs

Thank you!


401 Unauthorized for All Tokens

Steps to reproduce:
List the minimal actions needed to reproduce the behavior.

Install InfluxDB
Walk through initial setup
Reboot

Expected behavior:
You can still access the database via API/Influx CLI
Actual behavior:
Consistently get 401 Unauthorized for all requests via Telegraf and Influx CLI
Environment info:

System info: Linux 5.4.0-96-generic x86_64
InfluxDB version: InfluxDB 2.1.1 (git: 657e1839de) build_date: 2021-11-09T03:03:48Z
Other relevant environment details:
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.3 LTS
Release:        20.04
Codename:       focal

Config:
tls-cert = "/etc/ssl/*.squirrelworks.org.chain_rsa"
tls-key = "/etc/ssl/*.squirrelworks.org.key_rsa"
tls-min-version = "1.2"
tls-strict-ciphers = true
log-level = "debug"
tracing-type = "log"

Logs:
Feb 01 17:06:14 influx1 influxd-systemd-start.sh[16190]: ts=2022-02-01T17:06:14.139426Z lvl=info msg=Unauthorized log_id=0ZPZr1d0000 error="authorization not found"

root@influx1:~# influxd recovery auth list --bolt-path /var/lib/influxdb/influxd.bolt
2022-02-01T17:08:21.159609Z     info    Resources opened        {"log_id": "0ZPZzW9l000", "system": "bolt-kvstore", "path": "/var/lib/influxdb/influxd.bolt"}
ID                      User Name       User ID                 Description     Token                                                                                Permissions
08d9854dc8554000        jason           08d9854db1154000        operator        Dv_wzBhipMpE7CvxRBbA3mV72QnYckyDIdGCRvvD2jibQcBYmqDywDQ2o5vgNgsNDZExLylA3dOvPw2C-XXPUQ==        [read:authorizations write:authorizations read:buckets write:buckets read:dashboards write:dashboards read:orgs write:orgs read:sources write:sources read:tasks write:tasks read:telegrafs write:telegrafs read:users write:users read:variables write:variables read:scrapers write:scrapers read:secrets write:secrets read:labels write:labels read:views write:views read:documents write:documents read:notificationRules write:notificationRules read:notificationEndpoints write:notificationEndpoints read:checks write:checks read:dbrp write:dbrp read:notebooks write:notebooks read:annotations write:annotations]
08d985717d554000        jason           08d9854db1154000        telegraf        -TXIPZMB3IyaUE9UBsNZqDL1SUUENubmhrI6sGC7LXhBMFG9LNzpL5X9ehXB8nKRzTtezsV0lNuex6SGjEty9A==        [write:orgs/f83460a73749d1cd/buckets/16941be2ddd229a3]

For anyone else running into this, be aware that if the environment variable INFLUX_TOKEN is set, the InfluxCLI will override whatever is in the configuration file with the contents of the environment variable.
For Telegraf, this was an issue with the instance not using the system environment variables (systemctl show telegraf shows that it should be in /etc/default/telegraf).
The documentation could be much clearer on these points, considering environment variables is the chosen direction InfluxData has chosen to push into for the sake of containers.


fix: route all traffic through proxy

I found that if I pass socks5 string to the builder the proxy won't be used. I created a fork, tested with reqwest::Proxy::all and confirmed that reqwest::Proxy::http was the problem.


[internal]: Suggestions to https://github.com/inspektor-gadget/inspektor-gadget/pull/1281

@flyth what do you think about these changes?

Looks good to me!
Perhaps an additional (u)int64Slice would be useful - if one needs another int type, then that would be big enough to hold all possible values for manual casting.

Perhaps an additional (u)int64Slice would be useful - if one needs another int type, then that would be big enough to hold all possible values for manual casting.

Done!


Ensure main jvm.options file is in place

Fixes https://github.com/elastic/puppet-elasticsearch/issues/928

Pull request acceptance prerequisites:

[ ] Signed the CLA (if not already signed)
[ ] Rebased/up-to-date with base branch
[ ] Tests pass
[ ] Updated CHANGELOG.md with patch notes (if necessary)
[ ] Updated CONTRIBUTORS (if attribution is requested)

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?


Design an option that users can set to rerun a task if it fails

Tasks can fail for reasons beyond the control of the user. For example:

The task could try to access an external service that is unavailable.
InfluxDB itself returns an internal error.

In general, it is not safe to retry all tasks, because a task could have a side effect. However, users should be able to decide on a case by case basis if they want a task to retry automatically.
When tasks retry, they should use the original time window from when they first ran to ensure that downsampling tasks run effectively.

clarify:  this is a case where we only want to retry if we get a report that queryd itself fails with a 500

Goal is to have a design for this to be implemented in a future sprint

I've been thinking about these retries and talking with @aanthony1243. Here are some thoughts:
Task Query execution is currently a push-based model. The Task Query Executor sends requests to Gateway, which forwards requests to a load-balanced fleet of Query Pods. The Query Pods themselves execute up to 100 concurrent queries from many different users.
Reduced Query Pod availability is a failure scenario of Tasks that has been quite common lately. In this situation, all Tasks being scheduled will likely run into problems issuing query requests to Gateway which will cause pressure within the Task Scheduler/Execution system.
Retrying good Task queries—while still not free of gotchas in how Scheduling/Execution works—isn't the main concern. I'm worried about Tasks containing Flux that can crash a Query Pod. When a Task sends request to Gateway, and the Query Pod it's routed to crashes, the Task Run will receive an upstream disconnect error (503). If we were to retry these, we would multiply the rate of Pod crashes and push us into CrashLoopBackoff state more quickly.
Coupled with the way the Scheduler produces Task runs, things get worse the shorter the interval between this Task's Runs and how long the back-off period in retrying is. Due to the concurrent nature of the executor worker pool [1], we could potentially have many Task Runs for a single Task schedule consuming a significant number of outstanding workers—all of which are retrying the bad query. I haven't done a lot of research into it, but I suspect this could increase load on etcd as well.
Due to this failure state, and how often we've run into it over the last few months, I don't think it's safe to pursue general Task retry behavior yet. Recent discussions of one query per-pod behavior and restricting the number of query-induced Pod failures that a single Task can cause will open the door to retries.
With that said, it's more reasonable to retry 500 (exact) codes. They don't imply infrastructural problems like unreachable Pods. These error codes happen less often, but they mean there is something on the other side giving you that code—not Kubernetes/Istio reporting it. This is much less useful though and isn't really the reason we want these retries.
Another option, which seems expensive, is the isolate customers that have some sort of retrying enabled to their own Query Pod groups and Task scheduling. Task scheduling isolation would be necessary to protect the schedules of other customers from becoming starved for resources by a feedback loop caused by retrying.
[1] The Task Query Executor currently runs a pool of up to 100 concurrent workers that feed from a queue that has a maximum capacity of 1000 in-flight Task triggers (instances of a scheduled Task).


(Fix) tokens reservation in % for multiple tiers crowdsale; update smart contracts test

Relates to https://github.com/poanetwork/ico/pull/25

smart-contracts unit tests for multiple tiers crowdsale are added (2 tiers)

Pull Request Test Coverage Report for Build 1498

0 of 0 (NaN%) changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 8.735%

Totals

Change from base Build 1492:
0.0%

Covered Lines:
253

Relevant Lines:
1964

💛  - Coveralls


Use proxy for fetching link meta

Overview
This PR:

Fixes link embeds (thank you @Jacob2161 for making this possible ❤ )
Removes the package he, which is no longer used

Looks like:

Known issues:
Twitter links are currently failing. There may be other instances as well, so in those cases, we forward the error from the proxy to the composer:

Yeah, there will be some availability/anti-bot issues to deal with. We're just extracting the metadata that they publish explicitly for the purpose of card-like summaries but :man_shrugging:

@Jacob2161 If you set the User-Agent header to Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html) if the URL hitting your proxy contains the hostname twitter.com, the error above will go away. 😄


New icon request, figma icon

Icon Request

Icon name: Figma
Tags of this icon: figma
Use case: need to use figma icon in my website
Screenshots of similar icons:

https://remixicon.com/icon/figma-line
https://remixicon.com/icon/figma-fill


[Chef-16] Disable caching for s3 and git to successfully build aritifacts using ruby31

Signed-off-by: Neha Pansare<EMAIL_ADDRESS>
Description
Chef16 is now built using ruby31. By disabling the caching for s3 and git we are able to build artificats successfully.
Related Issue

Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Chore (non-breaking change that does not add functionality or fix an issue)

Checklist:

[ ] I have read the CONTRIBUTING document.
[ ] I have run the pre-merge tests locally and they pass.
[ ] I have updated the documentation accordingly.
[ ] I have added tests to cover my changes.
[ ] All new and existing tests passed.
[ ] All commits have been signed-off for the Developer Certificate of Origin.

Adhoc build testing the change: https://buildkite.com/chef/chef-chef-chef-16-omnibus-adhoc/builds/59


Problem with Shelly Pro1 not reporting back it's status to Domoticz

I used shellyteacher4domo to discover my Pro1, and it seems to be added fine to Domoticz.
If I look at the MQTT explorer, I can see its status being updated if I toggle the relay.
However, this status is not displayed/updated in Domoticz the switch stays off. If it's Off, I can switch it On through the Domoticz UI, however, as the status is not updated I can only do this once. I can do it again if I turn it Off trough the web UI.
Here are some topics and their content:
domoticz/switch/shellypro1-30c6f782d324-0/config:

{"name": "shellypro1-30c6f782d324 Relay 0", "cmd_t": "~rpc", "pl_off": "{\"id\":1,\"src\":\"shellypro1-30c6f782d324\",\"method\":\"Switch.Set\",\"params\":{\"id\":0,\"on\":false}}", "pl_on": "{\"id\":1,\"src\":\"shellypro1-30c6f782d324\",\"method\":\"Switch.Set\",\"params\":{\"id\":0,\"on\":true}}", "stat_t": "~status/switch:0", "val_tpl": "{{ value_json.output }}","stat_off": "false","stat_on": "true","avty_t": "~online", "pl_avail": "true", "pl_not_avail": "false", "uniq_id": "shellypro1-30c6f782d324-0", "qos": 0, "device": {"identifiers": ["30C6F782D324-0"],"manufacturer": "Shelly","model": "shellypro1","name": "shellypro1-30c6f782d324-0"}, "~": "shellypro1-30c6f782d324/"}

shellypro1-30c6f782d324/events/rpc:
{"src":"shellypro1-30c6f782d324","dst":"shellypro1-30c6f782d324/events","method":"NotifyStatus","params":{"ts":1693604153.11,"switch:0":{"id":0,"timer_duration":14400.00,"timer_started_at":1693604153.11}}}

shellypro1-30c6f782d324/rpc:

{"id":1,"src":"shellypro1-30c6f782d324","dst":"shellypro1-30c6f782d324","result":{"was_on":true}}

Closing this, as it turned out I had to enable 'Generic status update over MQTT' which I forgot :(


Calculation based on altitude

Is altitude / elevation a parameter in calculating the prayer times?

This library does not use altitude for calculations. Altitude is tricky as it only has an effect when the altitude of the observer differs from the altitude of the horizon, for example being on mountain peak. But if the city you live in has a high altitude in all locations it has no effect.
Here is a good explanation of the apparent effects of altitude on sunrise https://astronomy.stackexchange.com/questions/24632/how-do-i-adjust-the-sunrise-equation-to-account-for-elevation
I think knowing the difference in altitude between the observer and the horizon is going to be extremely difficult for any application to know.

This makes sense - thanks for the swift response!

Alsalam Alikom,
@z3bi , i beleive it might be good to have Altitude as an option to adjust the calculation. people who is in high rise towers differes in maghrib and fajr by 2 minites. for such reason, i knew that Awqaf in some cities start put their calculations to have Altitude of around 200 feets (not sure from sea level, elevation or from city land level). this result in maybe few seconds (or a minute) from the normal caluclation.
another point is the mountain as you mentioned. third one is when you are in airplane. it might be good option for those who enable your library in their phone app to get the altitude from their phone GPS.

@Abu-Abdullah My biggest concern with this is if developers always supply the altitude to the library regardless of the situation. This can cause a big issue in cities like Denver. Even though Denver is at an altitude of 5,000 ft, that altitude is consistent in the whole city so it doesn't affect sunrise/sunset times.
One feature the library needs is a function that recommends calculation parameters given a set of coordinates and city and country. Perhaps there's a good way for that function to identify true needs for altitude adjustment. I'm open to suggestions on how to make that clear in the design of the library's interface.

i would agree on your point but still this is a library not the final app, there is a responsbility on the developer to understand this feature and develop wht is suitable to make sure that this parameter is correct.
i beleive any suggestion will end up with the need to have internet connection to check the altitude of the city compared to the sea level. i have the following code to get the Altitude:
        // Only for US !!!!
	private double getAltitude(Double longitude, Double latitude)
	{
		double result = Double.NaN;
		final String url = "https://nationalmap.gov/epqs/"
				+ "pqs.php?x=" + longitude
				+ "&y=" + latitude
				+ "&units=Feet&output=xml";

		// Require API key and an account for google maps and 25000 hits limit per day
		String url_google = "https://maps.googleapis.com/maps/api/elevation/"
				+ "xml?locations=" + latitude
				+ "," + longitude
				+ "&sensor=true";

		try
		{
			final DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
			final DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
			final Document doc = docBuilder.parse(url);

			// normalize text representation
			doc.getDocumentElement().normalize();

			// The results are contained in a single <double> node
			final NodeList listOfDoubles = doc.getElementsByTagName("Elevation");

			if (listOfDoubles.getLength() > 0)
			{
				Node elevationNode = listOfDoubles.item(0);
				Element elevationElement = (Element) elevationNode;
				return Double.parseDouble(elevationElement.getFirstChild().getNodeValue());
			}
		}
		catch (IOException | SAXException | ParserConfigurationException e)
		{
			e.printStackTrace();
		}
		return result;
	}

this is really an issue in a city like dubai:
https://www.khaleejtimes.com/ramadan-2019/late-iftar-for-burj-khalifa-dubai-skyscraper-residents

I would probably not add an external API dependency. Perhaps in the example app we could show an external API being used to get the correct values.

ok, i meant we just need to understand how to use the api to take into account the altitude variable (not to include external API).
getting the altitude is the responsibility of the developer. even letting the end user himself adjust this value is one way of doing it (with good explanation).
getting an example is more than enough (with thanks)
i believe we need to understand what is the altitude that affects the calculation:

from sea level
horizon level from sea level
from horizon level

Yeah and in fact we can be more precise by adjusting sunrise and sunset differently by asking for:

altitude of the observer
altitude of the Eastern horizon
altitude of the Western horizon

This could provide additional accuracy for people living at the base of a mountain range.

Re-opening this issue as we find a way to offer this functionality in a way that makes it clear how the feature is meant to work and what the limitations are.

Has this feature been included in the library, or has any guide been added?


Receiving a "Cannot GET /apipath" error when trying to list objects

Note: If your issue/bug is regarding the AWS Amplify Console service, please log it in the
Amplify Console GitHub Issue Tracker

Describe the bug
I created a test project by adding dynamodb storage with just one column called "fqdn".  I created a REST API and a Lambda function using the CRUD template.
When I try to do a GET /domains (my api path), I get the following:
<!DOCTYPE html>

	<meta charset="utf-8">
	<title>Error</title>

Cannot GET /domains/

it looks like there is no way to get the list of all objects in the db?
Amplify CLI Version
You can use amplify -v to check the amplify cli version on your system
To Reproduce
Steps to reproduce the behavior or terminal output if applicable
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):

OS: [e.g. Mac/Windows/Ubuntu]
Node Version. You can use node -v to check the node version on your system

Additional context
Add any other context about the problem here.

At a minimum, maybe this can be a feature request to have a scan operation as the default?

It is dynamodb which means scan operation is expensive. GET on dynamodb would always imply that you are passing in a primary key. Even on REST API terms you would also pass in an id.

Hi @pendraggon87
Can you mail your amplify folder at<EMAIL_ADDRESS>with the issue no. as subject?

Closing this, don't hesitate to reopen if you are still facing this issue


Restructure tests

Currently each test method calls into RunTest, which takes the expression + 3 parameters, one for each current formatter.
This is good, because the compiler enforces running the test against all the formatters.
However, as a consequence, adding new formatters means adding a new parameter to RunTest, which means rewriting every call to RunTest.
An alternative might be to define the expressions to be tested as static readonly members of a globally-available class. Then, those expressions could be used to create a TheoryData.

Something like this.
We'd check the generated TheoryData ensuring that all possible combinations of test expressions and formatters are being tested.
If C# supports partial static class we could split the expressions into multiple files, with one large class.
Question: where would the expected test results for each formatter go? Ideally in the same file as the test expressions; but this has to be usable by extended formatters.

The final design looks like this:

A set of test objects (expressions and others) in the namespace ExpressionToString.Tests.Objects, in three static classes:

CSCompiler
VBCompiler
FactoryMethods

Each test method has a corresponding object, and uses that object in tests
Tests.DotNetCore project

a given test method, and its' object, will be tested against all formatters
formatter data is stored in text files in the executable directory

Remaining work:

[ ] Finish defining objects for corresponding methods
[ ] Modify existing tests to call PreRunTest(); nothing more is needed
[ ] Currently, expected data is loaded using a Lazy in a static constructor. Implement this using ICollectionFixture so the time spent loading the data isn't included in the test


Market wont accept any buy or sell orders

Hi,
What can be the reason for market not accept any buy sell order, also there is no possibility to put price lower than 0.001 (I have currencies on balance), see image

Also what can be the reason for deposits not showing on funds page but coins get to main wallet and address is generated

I get this when running trading
activesupport (5.1.5) lib/active_support/cache/strategy/local_cache_middleware.rb:27:in call'
actionpack (5.1.5) lib/action_dispatch/middleware/executor.rb:12:in call' rack (2.0.4) lib/rack/sendfile.rb:111:in call'
railties (5.1.5) lib/rails/engine.rb:522:in call' puma (3.11.3) lib/puma/configuration.rb:225:in call'
puma (3.11.3) lib/puma/server.rb:624:in handle_request' puma (3.11.3) lib/puma/server.rb:438:in process_client'
puma (3.11.3) lib/puma/server.rb:302:in block in run' puma (3.11.3) lib/puma/thread_pool.rb:120:in block in spawn_thread'
`

@tzman89 Hi. Please, send us all the configs you have. Also clear sprockets cache and use dev env for RAILS_ENV. There many tricks for getting it up. Better try workbench.

@yivo
since channel keys are out how can we setup wallet notify from bitcoind
Current:

walletnotify=/usr/local/sbin/rabbitmqadmin publish routing_key=peatio.deposit.coin payload='{"txid":"%s", "channel_key":"satoshi"}'

@tzman89 Exactly.

i have tried this but still get message published but NOT routed.. is there another way?

It's hard to find information, I suggest you see this https://bitcointalk.org/index.php?topic=5202005.new#new


Uploading on a Uno board fails

Describe the bug
Using ArduinoUpload to upload code to a Uno board whit AVR ISP programmer being chosen registers the following command:
"/home/s4/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/bin/avrdude -C/home/s4/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf -v -patmega328p -cstk500v1 -P/dev/ttyACM0 -Uflash:w:/home/s4/Arduino/sketches/AS5048A_tester/build/AS5048A_tester.ino.hex:i"

which fails and this is the output:
"avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/home/s4/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
         User configuration file is "/home/s4/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyACM0
         Using Programmer              : stk500v1
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500 Version 1.x firmware
         Hardware Version: 3
         Firmware Version: 4.4
         Vtarget         : 0.3 V
         Varef           : 0.3 V
         Oscillator      : 28.800 kHz
         SCK period      : 3.3 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.

avrdude done.  Thank you.

Error during Upload: Failed programming: uploading error: exit status 1

doing the exact same thing with arduino-cli or the Arduino IDE registers this command:
"/home/s4/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/bin/avrdude -C/home/s4/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf -v -patmega328p -carduino -P/dev/ttyACM0 -b115200 -D -Uflash:w:/tmp/arduino_build_521661/AS5048A_tester.ino.hex:i "

which succeeds and this is the output:
"avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/home/s4/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
         User configuration file is "/home/s4/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyACM0
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : Arduino
         Description     : Arduino
         Hardware Version: 3
         Firmware Version: 4.4
         Vtarget         : 0.3 V
         Varef           : 0.3 V
         Oscillator      : 28.800 kHz
         SCK period      : 3.3 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file "/tmp/arduino_build_521661/AS5048A_tester.ino.hex"
avrdude: writing flash (4120 bytes):

Writing | ################################################## | 100% 0.73s

avrdude: 4120 bytes of flash written
avrdude: verifying flash memory against /tmp/arduino_build_521661/AS5048A_tester.ino.hex:
avrdude: load data flash data from input file /tmp/arduino_build_521661/AS5048A_tester.ino.hex:
avrdude: input file /tmp/arduino_build_521661/AS5048A_tester.ino.hex contains 4120 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.57s

avrdude: verifying ...
avrdude: 4120 bytes of flash verified

avrdude done.  Thank you."

the commands that each produces and the results are different, I have tested other programmer options of the plugin but none of them worked for me. I have also tested using the plugin with g:arduino_use_cli being set and without it
.
System information

OS: [linux]
Vim: [neovim v0.6.1]
Arduino: [Arduino: 1.8.19]
CLI version: [0.19.3-arch]
ArduinoInfo: [
Board         : arduino:avr:uno
Programmer    : avrisp
Port          : /dev/ttyACM0
Baud rate     : 9600
Hardware dirs : /home/s4/.arduino15/packages/arduino/hardware/avr/1.8.4, /home/s4/.arduino15/packages/stm32duino/hardware/STM32F1/2021.5.31, /home/s4/.arduino15/packages/STMicroelectronics/hardware/stm32/2.1.0
Verify command: arduino-cli compile -b arduino:avr:uno -p /dev/ttyACM0 -P avrisp --build-path "/home/s4/Arduino/sketches/AS5048A_tester/build" -v "/home/s4/Arduino/sketches/AS5048A_tester/AS5048A_tester.ino"
]

To Reproduce
Steps to reproduce the behavior:

open a simple arduino sketch in neovim: $ nvim [sketch].ino
use AruinoChooseBoard: Arduino Uno, ArduinoChoosePort: [your system port], ArduinoChooseProgrammer: AVR ISP.
use ArduinoUpload

Expected behavior
Working command

$ cd /path/to/sketch
$ arduino-cli board attach arduino:avr:uno [sketch].ino
$ arduino-cli board attach serial://[port]
$ arduino-cli compile [sketch].ino
$ arduino-cli upload -v

alternatively Arduino IDE application also works and produces the same result.
output:
"/home/s4/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/bin/avrdude" "-C/home/s4/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf" -v -V -patmega328p -carduino "-P/dev/ttyACM0" -b115200 -D "-Uflash:w:/tmp/arduino-sketch-5C77E717031944FF3B6B05CEF0DD445F/AS5048A_tester.ino.hex:i"

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/home/s4/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
         User configuration file is "/home/s4/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyACM0
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : Arduino
         Description     : Arduino
         Hardware Version: 3
         Firmware Version: 4.4
         Vtarget         : 0.3 V
         Varef           : 0.3 V
         Oscillator      : 28.800 kHz
         SCK period      : 3.3 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file "/tmp/arduino-sketch-5C77E717031944FF3B6B05CEF0DD445F/AS5048A_tester.ino.hex"
avrdude: writing flash (4120 bytes):

Writing | ################################################## | 100% 0.69s

avrdude: 4120 bytes of flash written

avrdude done.  Thank you.

There's probably some subtle difference in the command that's being run from
vim. I don't have any way to test this locally, so the best I can do is give you
the general debugging steps that I would follow.
Try running the upload command vim-arduino is using (by adding a -u to the compile command)
arduino-cli compile -b arduino:avr:uno -p /dev/ttyACM0 -P avrisp \
  --build-path "/home/s4/Arduino/sketches/AS5048A_tester/build" \
  -v -u "/home/s4/Arduino/sketches/AS5048A_tester/AS5048A_tester.ino"

It should fail. Then see if you can gradually update your working compile &
upload into a single line command. Doing this one step at a time should make it
easy to spot problems. At this point you should have a working one-line
compile & upload, and a non-working one. From there you should be able to change
one thing at a time until the command starts working. Once we know what triggers
the failure we can reason better about the potential root cause and create a fix
or workaround.
The only differences I see at the moment are specifying the programmer and the
build-path. Of those, I suspect the programmer argument.

This is all that is different
failing command:         ... -cstk500v1 -P/dev/ttyACM0 -Uflash...
succeeding command: ... -carduino -P/dev/ttyACM0 -b115200 -D -Uflash...
I figured out that choosing the None option for programmer with ArduinoChooseProgrammer command lets Arduino-IDE or arduino-cli (both the same) falls back on its default which is the succeeding command and it resolved the problem for me.
Not sure if it's intended to be this way but coming from Arduino-IDE I'm used to have AVR ISP selected as programmer.

Not an arduino IDE expert, but I believe that the IDE always has a programmer selected, but only actually uses it if you select "Upload Using Programmer". If this is the case then that would explain why manually passing it in causes the upload to fail.


Remove unncesessary deps from agency client

Signed-off-by: Miroslav Kovar<EMAIL_ADDRESS>

Codecov Report

Merging #312 (766b5fa) into master (42e8038) will decrease coverage by 4.17%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #312      +/-   ##
==========================================
- Coverage   49.72%   45.55%   -4.18%
==========================================
  Files         155      153       -2
  Lines       19639    18783     -856
  Branches     6202     5888     -314
==========================================
- Hits         9766     8556    -1210
- Misses       5072     6114    +1042
+ Partials     4801     4113     -688

Flag
Coverage Δ

integration
?

unittests
45.55% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

libvcx/src/libindy/utils/pool.rs
14.58% <0.00%> (-52.42%)
:arrow_down:

libvcx/src/libindy/utils/anoncreds.rs
17.81% <0.00%> (-47.02%)
:arrow_down:

libvcx/src/utils/plugins.rs
0.00% <0.00%> (-33.34%)
:arrow_down:

libvcx/src/libindy/utils/ledger.rs
12.00% <0.00%> (-27.24%)
:arrow_down:

libvcx/src/utils/random.rs
75.00% <0.00%> (-25.00%)
:arrow_down:

libvcx/src/utils/devsetup.rs
41.63% <0.00%> (-21.04%)
:arrow_down:

libvcx/src/init.rs
25.80% <0.00%> (-20.97%)
:arrow_down:

libvcx/src/utils/devsetup_agent.rs
0.00% <0.00%> (-20.33%)
:arrow_down:

libvcx/src/libindy/utils/payments.rs
38.88% <0.00%> (-13.20%)
:arrow_down:

libvcx/src/libindy/proofs/verifier/verifier.rs
55.55% <0.00%> (-12.22%)
:arrow_down:

... and 25 more

Continue to review full report at Codecov.

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


Update README

Add:

instructions on how to run cypress tests
link to CONTRIBUTING.MD
link to about page (when it is added)
remove version numbers from document

Instructions for running cypress tests do not work with current main branch but will work when #127 is merged.

About link will not work until #159 is complete


Docs: Buf::chunk should have more restrictions.

This issue could also be a sub-issue of #178.
According to the docs of Buf::chunk:
https://github.com/tokio-rs/bytes/blob/8cc940779fd6a489a2d7ca53fbbc44f84210083e/src/buf/buf_impl.rs#L142-L150
It only requires the implementer to return an empty slice when Buf::remaining returns 0, but a non-continuous implementation of Buf::chunk can return an empty slice even if Buf::remaining > 0.
For example:
pub struct BufVecDeque<B> {
    inner: VecDeque<B>
}

impl<B> Buf for BufVecDeque<B> where B: Buf {
    fn remaining(&self) -> usize {
        self.inner.iter().map(|b| b.remaining()).sum()
    }

    fn chunk(&self) -> &[u8] {
        self.inner.front().map_or(b"", |b| b.chunk())
    }

    fn advance(&mut self, mut cnt: usize) {
        while cnt > 0 {
            let Some(front) = self.inner.front_mut() else {
                return;
            };
            let min = std::cmp::min(front.remaining(), cnt);

            front.advance(min);
            cnt -= min;

            if !front.has_remaining() {
                self.inner.pop_front();
            }
        }
    }
}

impl<B> BufVecDeque<B> {
    pub fn new() -> Self {
        Self {
            inner: VecDeque::new(),
        }
    }

    pub fn push_back(&mut self, buf: B) {
        self.inner.push_back(buf)
    }
}

The problem is when you call some methods like Buf::copy_to_slice or Buf::copy_to_bytes, it will cause an infinite loop.
Let's see the default implementations of Buf::copy_to_slice:
https://github.com/tokio-rs/bytes/blob/8cc940779fd6a489a2d7ca53fbbc44f84210083e/src/buf/buf_impl.rs#L268-L282
The let src = self.chunk(); causes the problem, and its docs does not remind the implementer to override its behavior:
https://github.com/tokio-rs/bytes/blob/8cc940779fd6a489a2d7ca53fbbc44f84210083e/src/buf/buf_impl.rs#L247-L268
The Buf::copy_to_bytes has the same problem.
As for some methods like Buf::get_u8, they panic:
https://github.com/tokio-rs/bytes/blob/8cc940779fd6a489a2d7ca53fbbc44f84210083e/src/buf/buf_impl.rs#L300-L307
let ret = self.chunk()[0]; cause panic, and its docs only says: "This function panics if there is no more remaining data in self.":
https://github.com/tokio-rs/bytes/blob/8cc940779fd6a489a2d7ca53fbbc44f84210083e/src/buf/buf_impl.rs#L284-L300
But it also panics when Buf::remaining > 0.
In fact, the problem is already mentioned in https://github.com/tokio-rs/bytes/issues/178#issuecomment-458213222.
These are all because the Buf::chunk can return an empty slice even if Buf::remaining > 0.
Solutions
A quick fix is restricting the Buf::chunk to return an empty slice if and only if Buf::remaining returns 0, but it also changes the semantics of Buf::chunk, should it be considered a breaking change? I can open a PR if the change is acceptable.
Any more ideas?

I think we already de-facto have this requirement, if it's not already specified.

Oh, I just found the BufMut::chunk_mut already had the restrictions.
https://github.com/tokio-rs/bytes/blob/8cc940779fd6a489a2d7ca53fbbc44f84210083e/src/buf/buf_mut.rs#L166-L179
I will open a PR to fix this issue.


Support Serialize/Deserialize of new Schema.org Objects

New objects that don't exist in the Schema.NET library should still deserialize to a Thing successfully.

Write a unit test to confirm that this does or doesn't happen already.
Fix it if the unit test confirms that it is not working.
Think about how you could write your own custom objects and provide them to the Schema.NET serializer.

I can try to provide this for the deserialization, given that I had input before. But can you clarify what you mean with Serialize new Schema.org objects? We wouldn't have types for those objects, right?

Correct, we won't have a class for any custom objects but we could still deserialize such JSON to a Thing object.

Deserialization actually works. I'll submit a PR with the passing test.

Fixed by https://github.com/RehanSaeed/Schema.NET/pull/11 thanks to https://github.com/psampaio


Update README.md

Id-507-799-3811/D7UD9-GKQHL-4UAD

Looks like this was created by accident, closing. If needed, feel free to reopen with more details, thank you!


UN-378: Spacing between Featured Records and Image components

Ticket URL: https://national-archives.atlassian.net/browse/UN-378
About these changes
Added margin-bottom to the featured-records element in the SASS.
How to check these changes
Go on a Stories/Article page, add a featured records block to the page.
I would suggest William Cuffey, an example here:

Then view the page and ensure there is a gap between the featured-records component, and the content below it
Before assigning to reviewer, please make sure you have

[x] Checked things thoroughly before handing over to reviewer.
[x] Checked PR title starts with ticket number as per project conventions to help us keep track of changes.
[x] Ensured that PR includes only commits relevant to the ticket.
[x] Waited for all CI jobs to pass before requesting a review.
[x] Added/updated tests and documentation where relevant.

Merging PR guidance
Follow docs\developer-guide\contributing.md
Deployment guidance
Follow docs\infra\environments.md

Hey @jamesbiggs,
I can see why you've chosen this approach but as this component is used in a lot of places this likely breaks the design else where. I have also indirectly solved this in this PR here. It's better practice (IMO) to use wrappers here instead of adding padding to the component itself to allow greater flexibility in use of the component.

Actually, sorry, @William-Blackie, this component isn't used anywhere else outside of the articles pages as far as I can see - my CSS/SASS understanding isn't too good but I'm not sure if your PR covers this component?


Freezing

Issue Type: Performance Issue
When editing a simple Plain text document Visual Studio Code keeps stalling. Cant interact with app for like 4-5seconds. Happens all the time.
 All relatively small, no log files or large data dumps. I click on a file, click on a paragraph and it freezes. Works fine for a bit then click somewhere else and it freezes again.
VS Code version: Code 1.37.1 (f06011ac164ae4dc8e753a3fe7f9549844d15e35, 2019-08-15T16:16:34.800Z)
OS version: Darwin x64 18.5.0

System Info

Item
Value

CPUs
Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz (12 x 2900)

GPU Status
2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onnative_gpu_memory_buffers: enabledoop_rasterization: disabled_offprotected_video_decode: unavailable_offrasterization: enabledskia_deferred_display_list: disabled_offskia_renderer: disabled_offsurface_synchronization: enabled_onvideo_decode: enabledviz_display_compositor: disabled_offwebgl: enabledwebgl2: enabled

Load (avg)
3, 4, 3

Memory (System)
16.00GB (3.37GB free)

Process Argv
-psn_0_3670912

Screen Reader
no

VM
0%

Process Info
CPU %	Mem MB	   PID	Process
   15	    82	 76390	code main
    3	    16	 76392	   gpu-process
    9	    33	 76426	   shared-process

Workspace Info
|  Window (week34.txt — manager)
|  Window (client)
|    Folder (manager): 37 files
|      File types: txt(23) pptx(5) DS_Store(2) code-workspace(2) pdf(2) doc(2)
|                  pages(1)
|      Conf files:
|    Folder (client): more than 24823 files
|      File types: png(7638) h(6225) json(2617) pcm(1998) swift(1790) m(1161)
|                  timestamp(825) plist(281) mobileprovision(181)
|                  bcsymbolmap(134)
|      Conf files:;

Extensions (3)

Extension
Author (truncated)
Version

plantuml
jeb
2.11.2

language-plantuml
qho
0.0.3

pretty-json
sup
0.0.3

Hey @simnon, thanks for reporting this. When you see this issue again, can you try opening the Process Explorer as described here and see if there's a process using a high amount of CPU?