testnet11 DbError Corruption:block checksum mismatch

Describe the bug
testnet11 DbError Corruption:block checksum mismatch
To Reproduce
Steps to reproduce the behavior:
cargo run --bin kaspad --release -- --testnet --netsuffix=11 --utxoindex
Screenshots

Desktop

OS:  Ubuntu 20.04
Kaspad version: 0.14.1

Additional context
I tried deleting ~/.rust-kaspa/kaspa-testnet-11 and the same thing happened.
There will be no errors when running mainnet.

It sounds like you have a hardware problem that exhibits itself under pressure / hardware stress. tn11 is very demanding on IO, while currently the mainnet isn’t. I have previously experienced this on physical hardware (glitchy IO chipset) and on virtualization platforms like VirtualBox.  Hardware problems like RAM corruption and IO are typically exhibited under high utilization.
Actual db corruptions can occur (extremely rarely as a consequence of an ungraceful application termination or an ungraceful system restart). No other users are reporting this so the issue most likely lays with IO in your system (that you otherwise don’t see unless you heavily stress random writes).

It sounds like you have a hardware problem that exhibits itself under pressure / hardware stress. tn11 is very demanding on IO, while currently the mainnet isn’t. I have previously experienced this on physical hardware (glitchy IO chipset) and on virtualization platforms like VirtualBox. Hardware problems like RAM corruption and IO are typically exhibited under high utilization.
Actual db corruptions can occur (extremely rarely as a consequence of an ungraceful application termination or an ungraceful system restart). No other users are reporting this so the issue most likely lays with IO in your system (that you otherwise don’t see unless you heavily stress random writes).

This system uses an M2 SSD, it is not a virtual machine, and it is a newly installed system. After installation, the only program running is the KAS node. This is the only program where I encounter errors in the KAS node, and I am quite puzzled by it.

You need to try some sort of an IO stress test. Especially if this is new system. I am 99% certain this is due to high IO throughout.
Going to close this if you don’t mind since as I mentioned, you are the only person experiencing this.  Feel free to hop on Discord in #development to get further feedback from different devs.


Add support to limit the affine scope

Krnl loop may not are affine wrt the function region. This PR provide the support to limit the affine scope.

KrnlRegionOp is introduced. The region of this op has AffineScope trait and all the symbol defined at top of this region will be valid symbol for affine.for inside this region.
KrnlRegionOp is added to the body of LoopOp and the dynamic accumulation of loop result. Previously, verifier of affine.for failed for those loops.
A pass is added to remove KrnlRegionOp after the Affine.for has been converted to scf.for.
Models, test_loop11 (added into check-onnx-backend) and ccf model can be successfully compiled with this PR.

Future work:

Modify create.krnl.iterate to add a KrnlRegionOp outside controlled by a parameter or command line option.

@chentong319 a recent commit changed Pass to mlir::Pass, it should be done also for the new pass in this patch.

Future work:
Modify create.krnl.iterate to add a KrnlRegionOp outside controlled by a parameter or command line option.

Whether we can do this automatically, e.g. by checking whether a symbol is valid or not, if not, wrapping the loop inside AffineScope-traited KrnlRegionOp to make it valid. Not prefer to expose KrnlRegionOp to users, because it's not straightforward to know when we should use KrnlRegionOp or not, given that intermediate generated code may be edited somehow.
Just for my learning: is there a situation where an invalid symbol becomes valid after some optimizations?

@tungld We can analyze whether a symbol is valid or not. It should be the same code of affine.for verifier. I do not know how to reuse that code for our purpose. We may try to apply KrnlToAffine to each krnl.iterate, and if it failed, we add krnl.region and try again, instead of signalPassFailure(). Do you think the approach feasible?
For your second question: yes, optimization may turn an invalid symbol into valid one. For examples:

Constant folding turns a symbol into constant
Aggressive code motion may move SSA definition out of IF or Loop to become a definition at the top of FuncOp
Control flow optimization may remove the outside loop or if.

Therefore, the best solution is what I mentioned previously: add krnl.region when it is really needed in converting krnl.iterate to affine.for (after all the possible optimizations)

I called verifier explicitly after Krnl.iterate is converted to affine.for. The error can be caught. So it is possible that we can add krnl.region there.  I guess we need to handle affine.load too. The current code has some data structure for loop nest, which I need to understand before I can change the code.
Another task is to intercept the output of emitError coming from the verifier.

@chentong319 thank you for answering my questions!

We may try to apply KrnlToAffine to each krnl.iterate, and if it failed, we add krnl.region and try again, instead of signalPassFailure(). Do you think the approach feasible in MLIR?

It looks possible if we do not return signalPassFailure(), but I am not 100% sure. My concern is that it is quite expensive. Instead, I see some passes in MLIR do a quick analysis to decide what to do next, e.g. affine-loop-fusion builds a graph of affine.for, affine.load and affine.store, and computes costs before fusion.
Anyway, I think this patch is good to go. Please check backend tests again to make sure it actually runs.

@tungld We may reuse the code of the analysis to build affine.for nest.

Jenkins Linux s390x Build #4957 [push] Add support to limit the... started at 10:25

Jenkins Linux s390x Build #4957 [push] Add support to limit the... passed after 48 min

Jenkins Linux ppc64le Build #4078 [push] Add support to limit the... passed after 57 min

Jenkins Linux amd64 Build #4941 [push] Add support to limit the... passed after 1 hr 2 min


Suggestion: add Datomic

If you're not already familiar with Datomic, then you wouldn't necessarily know how the options presented in the site stack up against it. I think it would be a valuable addition, and might highlight the strenghts and weaknesses of the alternative models presented by tools like Asami and XTDB.

Hello! I would also like to throw my hat in the pile and say it would be helpful to have datomic listed there.  This table is the first thing (from a beginner's perspective) that allowed me to understand the full scope of these datalog databases, and it would be helpful to know if any of these open source implementations can do anything that datomic can't.
Would Datomic simply have a "yes" to each of the current features?

it would be helpful to know if any of these open source implementations can do anything that datomic can't

Hey @nikonikoniko - on this point specifically, vs. XT, I would say 'no' for:

Valid-Time history
Lazy queries
Ad-hoc "document" storage (i.e. maps of arbitrary types)
Low-latency commits (asynchronous indexing)


Add pre-commit and lint

Thank you for your contribution to the MindOCR repo.
Before submitting this PR, please make sure:

[ ] You have read the Contributing Guidelines on pull requests
[ ] Your code builds clean without any errors or warnings
[ ] You are using approved terminology
[ ] You have added unit tests

Motivation
add pre-commit，implement incremental file scanning;
remove runtime/references for cpplint.
(Write your motivation for proposed changes here.)
Test Plan
(How should this PR be tested? Do you require special setup to run the test or repro the fixed bug?)
Related Issues and PRs
(Is this PR part of a group of changes? Link the other relevant PRs and Issues here. Use https://help.github.com/en/articles/closing-issues-using-keywords for help on GitHub syntax)

Please add contributing guideline  CONTRIBUTING.md for the changes (pre-commit).


Investigate if HeapPointer should inherit from CobolExpressionNode

Assumption: To simplify things, HeapPointer should be a CobolExpressionNode.
Should a HeapPointer, if it is set return a value?
If yes, the new value or the old one?
How does SimpleLanguage handle mutable variables?

It may be required for display and other nodes (if/perform/...)

Implemented for https://github.com/LoPoHa/CobolTruffle/pull/7, but needs more investigation.

Since it is used in generic code and simplifies things, i'll close this issue.
Result: yes, it should be a CobolExpressionNode.


Adding our own covariates

First of all thank you for this very interesting model and paper! However I was a bit confused does the model solely used the lags predefined as covariates or we can add our own covariates ie : seasons/day of the week/ holiday or not etc.. ? If not, is there a simple way to implement this possibility on my own ? Thanks in advance.

Hi, thanks for the kind words!
You could add your own covariates, but you would have to pre-train the model from scratch with the covariates.
In order to adapt the codebase to use covariates, you'd have to implement having covariates in several functions such as this one. This requires a bit of looking into GluonTS documentation. Are you looking to do that? in that case, I can try to point you to some other GluonTS model implementations where covariates are implemented.

Hi, thanks for the kind words!
You could add your own covariates, but you would have to pre-train the model from scratch with the covariates.
In order to adapt the codebase to use covariates, you'd have to implement having covariates in several functions such as this one. This requires a bit of looking into GluonTS documentation. Are you looking to do that? in that case, I can try to point you to some other GluonTS model implementations where covariates are implemented.

Hello Arjun, I have a similar requirement. My variable is measured in days, while my additional covariates are measured in months. Could you provide a brief demonstration on how to finetune the model accordingly?

Hi, thanks for the kind words!
You could add your own covariates, but you would have to pre-train the model from scratch with the covariates.
In order to adapt the codebase to use covariates, you'd have to implement having covariates in several functions such as this one. This requires a bit of looking into GluonTS documentation. Are you looking to do that? in that case, I can try to point you to some other GluonTS model implementations where covariates are implemented.

Hello Arjun, I have a similar requirement. My variable is measured in days, while my additional covariates are measured in months. Could you provide a brief demonstration on how to finetune the model accordingly?

@ashok-arjun Just following up to ensure you have seen this.

Hi @Sigurd-git apologies for the delays!!
The model cannot be finetuned with covariates. You'd have to pretrain from scratch. The code for pretraining with covariates is also not available now, but as I point out earlier in this issue, the GluonTS documentation will be useful to code up the covariates option. I can review your PR if you're interested to implement this, but we don't have plans to work on it.


Update README.md

I think postgresql should have high availability on in primary. based on the terraform: https://github.com/stephen-sumner/reliable-web-app-pattern-java/blob/42c2728a47e0c45720e5949c6523a6773596f3d6/terraform/modules/postresql/main.tf#L57

@KSchlobohm - this link is currently live in AAC. Let's merge this PR today. And open another one if we need to update. I just want to have parity across AAC and the repo.


[review only] Add a "Container Panel" instead of having multiple panels on top of each other.

The patch is still a WIP but I wanted some feedbacks: naming, code conventions, anything.
In this version I changed the createBottomPanel to work already with the extensions and to see how far I could get.
In the future I think I need two API, the old one untouched and a new fresh one.
In the toolbar the is a new button to toggle the container. I need an icon...
As for the UI is not my strong point...

I added a new API to create panels and converted the Code Hint and the Find in Files to use it.
There are still some bugs to resolve before it is ready to be reviewed but feedbacks are welcome.

I have added a reviw only tag, please remove this once this is ready to be merged in.
Could you comment some screenshots or gif's of the workflow so that it would be eazy to track the feature by other reviewrs?

@ficristo It looks like this is your first contribution to brackets. Thanks for helping us make brackets.
You would have to sign the brackets contributor license agreement at http://dev.brackets.io/brackets-contributor-license-agreement.html .
Also join the brackets dev forum at https://groups.google.com/forum/#!forum/brackets-dev and our slack channel at https://brackets.slack.com/

I think it is ready to be reviewed.
There are still some issues with the UI / UX but I need some help with them.
I need an icon for the toggle of the container and one for clear the search results, and I'm not sure if the UX is good enough.
For the UI of the panels I've reused the bootstrap tab plugin there was already there.
Here some screenshots.
Search before:

Search after:

Code Hint before:

Code Hint after:

:cool: change.
@larz0 @ryanstewart @nethip @MarcelGerber @zaggino

:+1: nice, I always hated how panel stack on top of each other when I have opened search and code hints at the same time

+1 nice!

Awesome! :+1:

@ficristo this is great, could you use the same tab style as the Extension Manager tabs? Let me know if you have any questions.

It is not exactly like the extension manager: I reduced the height to 36px, it seemed good enough to me.

:cool: This is awesome.

@petetnt If the space is small the tabs go on a second line and so on. AFAIK this is the behavior of the bootstrap tab component and can not easily changed (at least I don't know how, but it would be nice if possible).
I needed a title to show on the tab, so the extensions have to use the new API, unfortunately.

@ficristo Thanks for your reply. I think the tabs collapsing to another line is fine.
One idea of enabling old extensions for the new container could be checking for the .toolbar > .title value first, then falling back to the name field in the extensions package.json file and throwing a warning to the console about missing the title. So in worst case a panel-using extension would show up as petetnt-panel-using-extension on the tab. Not sure if that's worth the trouble though.

I had some time so I gave a try.

Thanks to the new style the result is better of what I remembered.
But it arise a couple of problems: not all extensions use the title class (the Notes extension), not all extensions have a title (the Git one), in this cases I used their id (I didn't try to read the package, and I already had the id).
Plus the icon in the toolbar were used to show/hide the panel (and the icon changed the color based if the extension was shown or not); with the new API the extensions are always shown, but only one is on the foreground. This causes some visual errors: if you click on the toolbar icon (of the extension) the tab is hidden with the panel, but if you click again you see the panel in the container but not the tab. Some times you don't see the extension anymore.
While i don't like to force the extensions to change, I think the last problem is better solved by the extensions' authors, so I think having a new API is the better route going forward.

@ficristo that doesn't look bad at all, but I also understand how not all of those problems can be solved (like syncing the active extensions) without a new API

:cool: The multiple, stacked panels have often gotten in my way and putting them in tabs is a very nice way to handle them. Good job. :D :+1:

As this is a major change, There won't be enough testing window to accommodate this for 1.5. pushing this to 1.6 release.

@larz0 Could you provide me an icon to put in the toolbar to open/hide the container?
in the screenshot above Search after: there are two X one to hide the container and one to clear the results: do you think is better an icon or to simply write Clear results?
Thank you.

I don't work on this anymore.


Missing steps in the description? Are we supposed to install comfy with env or conda, instead of using the installer?

Inside the "Web App Use" description, I followed every step (starting comfy, loading a desired worflow, save it a script dot py, moving it into ComfyUI directory.
then I opened a terminal inside the ComfyUI path, and started the py script:

All libraries are mising of course because I am not in the env.
But installation has an embedded python, it is impossible to go inside that embedded python, is it?
What am I missing again?

You need to create a virtual environment and install all requirements for comfyui.

Oh I see thanks!
I really thought it was straitghforward. That should be written in the description:)


When unmarshaling, check the payload's type even if no ID is included

As of now, request.unmarshalNode only checks the payload's type field if the id field is set. This doesn't make sense when unmarshalling a POST payload, as per jsonapi spec the client is not required to set an id, but is required to set the correct type for the resource they're creating.
This PR addresses this issue by simply moving the type check before the check for an empty id field.

Signed it.

Any update on this PR?


ngf-drag-over-class always applies 'reject' class

When passing an object to ngf-drag-over-class as follows:
ngf-drag-over-class="{ accept:'dragover', reject:'dragover-err', delay:100}"
and with
ngf-accept="'.jpg,.png'"
The `reject' class is applied on dragover in all cases, regardless of whether the dragged files are accepted.
If ngf-drag-over-class is set to the string 'dragover' instead of using the object syntax then this does work and the dragover class is added.
AngularJS v1.3.15
Chrome 43.0.2357.65
OS X 10.10.3
JS Fiddle: https://jsfiddle.net/m9kyubty/

It works only on file type, it was in the docs I made it more clear.

Apologies - I don't understand.
I want it to work on file type. e.g. I drag and drop an mp3: turn red, I drag and drop an image: turn green.
Right now I can't get it to show the 'accept' class at all. It always adds the 'reject' class on dragover.

Thanks,
Updated the example and readme to be more clear.


NaN handled differently between GHC and Haste

module Main where
main = putStrLn $ show (round (0/0) :: Int)

The output produced by GHC is 0 and the output produced by Node.js after compiling with Haste is NaN. Even though this is about NaN, shouldn't the result be the same in both cases?
This difference (bug?) was found when using the quickcheck generated testing data on my fork https://github.com/profil/haste-compiler/tree/tests

NaN isn't a valid Int value. This is clearly a bug.

Fixed on master.


Filters and bitmap memory leak ?

Hello !
Firstly, thank for this library ! :-)
I have some trouble with the memory management of my application and the filter. When I perform a filter change the memory (the Graphics part) increase at every occurence and the app crash after 25/40m of stream.
Use case : every X seconde, filters are changed on the stream.
Here is my code :
private var logos: List<Bitmap> = mutableListOf()

private fun showPartners() {
	val delayMillis = delay * 1000L
	Observable.interval(0, delayMillis, TimeUnit.MILLISECONDS)
		.map {
			getBitmap() // retrieve the right Bitmap object from logos array
		}
	.autoDispose(this, Lifecycle.Event.ON_DESTROY)
	.subscribe { bitmapToDisplay ->
				withCamera {
					val imageObjectFilterRender = ImageObjectFilterRender()
                    it.glInterface.setFilter(1, imageObjectFilterRender)
                    imageObjectFilterRender.apply {
                    	setImage(bitmapToDisplay.copy(bitmapToDisplay.config, true))
                        setPosition(TranslateTo.CENTER)
					}
				}
			   }
}

In the memory profiler I can see the increase number of Bitmap staying in memory.
It is possible that the setFilter is not release the older filter and keep it in memory ?
Or do you think it's not related to the filters ?
Thanks !

The filter should be released automatically when you set a filter in the same position:
https://github.com/pedroSG94/rtmp-rtsp-stream-client-java/blob/master/encoder/src/main/java/com/pedro/encoder/input/gl/render/ManagerRender.java#L97
It seems a bug. I will check it

I'm not sure about it but this look the problem.
bitmapToDisplay.copy(bitmapToDisplay.config, true)

You are doing a copy of the original bitmap but I can't see a release of the original bitmap

The original bitmap are stored into an array private var logos: List<Bitmap> = mutableListOf() . If I don't make a copy the stream crash with the reason that the bitmap are already recycled.
I tried to store the bitmap copy into a variable and recycle it but the leak is remaining.
                    withCamera {
                        val imageObjectFilterRender = ImageObjectFilterRender()
                        it.glInterface.setFilter(1, imageObjectFilterRender)
                        val bitmap = bitmapToDisplay.copy(bitmapToDisplay.config, true)
                        imageObjectFilterRender.apply {
                            setImage(bitmap)
                            setPosition(TranslateTo.CENTER)
                        }
                        previousBitmapFilter?.recycle()
                        previousBitmapFilter = bitmap
                    }

Ok. I can confirm that memory increase if you set multiple times bitmaps but recycled bitmap is called.
Can you tell me where are you getting number of bitmap in memory?

I double checked, the number of bitmap seems to be ok (even it's a big number).
You can check it in the profile + click on the heap dump button.

So, the increase of memory is the normal behavior when we are set multiple times bitmaps ? :(
Is there any way to purge or optimise this ?
Actually we can't stream more than 30 min with some device (like Huawei). It seems to be different accross devices (Nexus or Pixel seems to be less impacted).

This seems to be an OpenGL problem. Maybe in release texture or program.

Ok, many thanks 🤞🏻

I did a fix for it:
https://github.com/pedroSG94/rtmp-rtsp-stream-client-java/commit/87da9d4ce5ec17626e3d2d3cf652b906a7e02c30
I did a test of 45min with this result:

To discard problems with my library clone last commit, go to OpenGl RTMP or OpenGl RTSP and replace:
https://github.com/pedroSG94/rtmp-rtsp-stream-client-java/blob/master/app/src/main/java/com/pedro/rtpstreamer/openglexample/OpenGlRtmpActivity.java#L293
with (This code is similar to your code):
  private void setImageToStream() {
    final ImageObjectFilterRender imageObjectFilterRender = new ImageObjectFilterRender();
    final Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.mipmap.ic_launcher);
    rtmpCamera1.getGlInterface().setFilter(imageObjectFilterRender);
    new Thread(new Runnable() {
      @Override
      public void run() {
        while (true) {
          imageObjectFilterRender.setImage(bitmap.copy(bitmap.getConfig(), true));
          imageObjectFilterRender.setPosition(TranslateTo.RIGHT);
          imageObjectFilterRender.setScale(50, 50);
          //spriteGestureController.setBaseObjectFilterRender(imageObjectFilterRender); //Optional
          //spriteGestureController.setPreventMoveOutside(false); //Optional
          try {
            Thread.sleep(1000);
          } catch (InterruptedException e) {
            e.printStackTrace();
          }
        }
      }
    }).start();
  }

Wow thanks ! I will try this asap, thanks !

I just tried and it's ok, the memory leak seems to be gone !
Thanks for your fix :)

Hello,
It work ! Thanks :-)

Hello !
Since I updated the library with this commit I have a new crash only in this version :

Do you think it can be related with your fix ?
Thanks !

This was related with this commit:
https://github.com/pedroSG94/rtmp-rtsp-stream-client-java/commit/d3a899c9e52beca11739da8259ec3d2d46442b0d
Fixed here:
https://github.com/pedroSG94/rtmp-rtsp-stream-client-java/commit/6b99514ea8674f358787f1631ab7d99f42d8a02b

Ok thanks !!

Are you sure this commit is fixing this crash ?

This is ok now :)

Can you tell steps to reproduce it?
I only detected this error on camera switch with openglview.

It's ok, it was my mistake, I pointed the wrong commit in my gradle file ! Thanks


I get the error "ERROR hub-virus doesn't exist" when trying to import into local keychain

Keybase GUI Version: 4.2.0-20190710181120+e7c0bdc4a2
This is the output I get when i run keybase pgp pull-private <fingerprint>:
❯ keybase pgp pull-private <fingerprint>
PLEASE READ THIS CAREFULLY -- PRIVATE KEYS ARE AT STAKE!

  This command will import PGP private keys from KBFS
  (found in .keys/pgp), and export them to the local GnuPG keychain. They might have been
  put there via keybase pgp push-private. After this
  operation, these keys will be available for local GnuPG operations.

Really pull your PGP private key from KBFS? (type 'YES' to confirm): YES
▶ ERROR hub-virus doesn't exist

Interesting, can you navigate to that folder on KBFS?
/keybase/private/<you>/.keys/pgp

(cc @strib)

(And BTW hub-virus is an obfuscated path name, seems like it made it all the way up to the terminal)

(And BTW hub-virus is an obfuscated path name, seems like it made it all the way up to the terminal)

OK, that explains why I didn't get any hits when searching similar errors!

Interesting, can you navigate to that folder on KBFS?
/keybase/private/<you>/.keys/pgp

I don't have a .keys folder there. (First I didn't have a /keybase either, but I got it after enabling browsing with Finder. I assume this is the same as KBFS).
FWIW, I just recently reinstalled the Keybase.app (yes, I'm on macOS), and then imported one of my keys manually with keybase pgp export + gpg --import. After this I noticed the pull-private sub command.

Aha. Did you ever run keybase pgp push-private?

@maxtaco Re: hub-virus yeah it's tricky with errors because they're printed in the logs, so I erred on the side of obfuscation there.  If this is going to be a common thing we can fix it for this case, but seems like it would be better for the CLI command to catch this case and print something a little better there.

Aha. Did you ever run keybase pgp push-private?

Probably not!

Nope, you need to opt in after ready a scary warning, we would never move your private PGP keys without explicitly asking and warning you first!

I see. I guess the only issue then is the content of the error message. Do you want me to close this issue, or should I leave it open so it can be closed when the error message is improved?

Sure, we'll make a ticket to fix the error message.

I've hesitated to close this as I haven't seen any matching issues being created. Anyway, I'll close it now, and assume you have everything under control @maxtaco  😎


The bot should automatically detect topics and react accordingly

Using nltk the bot could automatically detect topics ( https://towardsdatascience.com/topic-modelling-in-python-with-nltk-and-gensim-4ef03213cd21 for a comprehensive intro) and either automatically suggest to move to a topical/ot channel or it could suggest to check a specific resource that might relate to the topic at hand. Of course there should be a timer (maybe 2 minutes) to avoid spamming.

I'm not completely against this, but I think there are a few fairly major issues, such as:

I'm not sure how accurate this could be. False positives would be pretty annoying and could just end up making the channel even more cluttered.
Sometimes pygen is a fine place to ask a question. It's not really clear what it's purpose would be otherwise (although yes, a topical channel would usually be preferred).
People will likely ignore it anyway - it's hard enough for a human to redirect someone, people to tend to ignore bots.

After a discussion within the mod team we have decided that, at the moment, we don't need such feature at the moment. Thanks for the suggestion.


website: correct the spelling of paremeter

The Generic Types page has a minor spelling mistake.
Fixes golang/tour#1327

Updated per comments in review


TypeError BBCIDataset

I have a TypeError when loading BBCIDatasets for the high-gamma-datset.
It was reported and fixed in the TNTLFreiburg/braindecode repo but not in this one
Here is the fix:
https://github.com/TNTLFreiburg/braindecode/commit/fab1e24a627e81fd4445c78997bfde625a260383

Fixed here as well through https://github.com/braindecode/braindecode/commit/38b5402ebb1efb66296f93343fff1ac9626a0030#diff-8ad72d10e5b9d8fa69cad3f9c6494022af3c44ff2f864fcb250f914f98da9028

Thanks again for notice


Fix/msstats one condition

fixes #6

wait I will add a param to completely skip msstats

If you're using print statements in the scripts to give the user feedback you should add
echo true
in the process definition. Else, stdout won't be printed to the console.

Hmm true, but it will have a lot of other std output as well.

While testing for the phospho data I just realized there is a small bug in the decoy database generation step.


@defer support

👋
At Apollo we are currently working on implementing @defer support in our Web Client I wanted to check in to see if there was any questions we can answer to help this library leverage the use of @defer once we release it.
https://github.com/apollographql/apollo-client/issues/8184

👋  Just a follow up to my comment above: @defer is now supported in Apollo Web Client. You can see our docs for more information.


Join issue with generated models

When having a model query like:
account, err := model.AccountDetails.Query(
		ctx,
		db,
		model.SelectJoins(ctx).AccountDetails.LeftJoin.AccountBan,
		model.SelectWhere.AccountDetails.AccountID.EQ(accountId),
	).One()

it will lead to nothing from the other table (AccountBan) to be selected.
When running MustBuild() and taking a look at it produces this:
Query: SELECT
*
FROM "account"."details" AS "account.details"
LEFT JOIN "account"."details" AS "account.details" ON ("account.details"."account_id" = "account.ban"."account_id")
WHERE ("account.details"."account_id" = $1)

but when having a bob debug executor the following will be executed, most columns have been removed but the point is that it doesn't select the "account.ban" table anywhere.
SELECT
"account.details"."account_id" AS "account_id", "account.details"."apps" AS "apps"
FROM "account"."details" AS "account.details"
LEFT JOIN "account"."ban" AS "account.ban" ON ("account.ban"."account_id" = "account.details"."account_id")
WHERE ("account.details"."account_id" = $1)
LIMIT 1

Is this a bug or am I using the joins incorrect?

This is expected.
The idea of the JoinHelpers is that if you want to filter by a condition on the other table, it saves the stress of writing the join query manually.
	account, err := model.AccountDetails.Query(
		ctx,
		db,
		model.SelectJoins(ctx).AccountDetails.LeftJoin.AccountBan,
		model.SelectWhere.AccountDetails.AccountID.EQ(accountId),
		model.SelectWhere.AccountBan.Status.EQ("banned"), // for example
	).One()

However, this does not automatically select rows from that table, because it also has to consider where to scan the columns into, and since the query is from the AccountDetails model, it will only return the columns to scan into the AccountDetails.
Now, if you want to select the account.ban relationships, then you can use ThenLoad (or Preload for to_one relationships) query mods, which will load those relationships.


System properties specified as environment variables throw unhelpful ArgumentException

System properties are supposed to be prefixed with lucene: when using environment variables. And when you do, it works.
However, if you forget and specify them like you would in a configuration file or NUnit property, incorrectly using something like tests:crashmode instead of lucene:tests:crashmode, it throws the exception:
System.ArgumentException : Value does not fall within the expected range.

Clearly, this message doesn't lead you to the correct solution. This message should be fixed to clearly spell out that the "lucene:" prefix is missing.

@NightOwl888 I would like to take this up. Please assign it to me.

@jeme - thanks for assigning this one.
@farQtech - thanks for volunteering.

@farQtech - Are you still interested in doing this? If not, please let us know so we can assign it to someone else. Thanks.

@NightOwl888 Can you provide more information on how to reproduce this one? As written, I inferred this to mean that if you have an environment variable named tests:crashmode that it would throw an exception, and I don't experience that behavior. The environment variable is just ignored, since it doesn't have the lucene: prefix. It also doesn't seem to be an issue if you accidentally request a SystemProperties key with the prefix (where it should not have the prefix in code), it just won't have the value. Can you provide a stack trace of where this is coming from, or steps to reproduce? Maybe I'm just not understanding something.

@NightOwl888 Can you provide more information on how to reproduce this one? As written, I inferred this to mean that if you have an environment variable named tests:crashmode that it would throw an exception, and I don't experience that behavior. The environment variable is just ignored, since it doesn't have the lucene: prefix. It also doesn't seem to be an issue if you accidentally request a SystemProperties key with the prefix (where it should not have the prefix in code), it just won't have the value. Can you provide a stack trace of where this is coming from, or steps to reproduce? Maybe I'm just not understanding something.

I took a look at this before, but I couldn't figure out how to reproduce it again.
But do note that the environment variables were being specified as part of the ProcessStartInfo for System.Process when I was doing the testing in the TestIndexWriterOnJRECrash test. This would be retrieved using SystemProperties.GetPropertyAsBoolean() inside of Lucene.Net.

NOTE: System properties are currently being passed on the command line, which would need to be removed to add them as environment variables in the ProcessStartInfo instance.

The production IConfigurationFactory setup is to use a custom environment variables provider (which I think works), but during testing it injects the TestConfigurationFactory which uses the stock Microsoft.Extensions.Configuration.EnvironmentVariables implementation, which in turn may have led to this error.
However, feel free to close this if the error is not reproducible.

I changed the ProcessStartInfo in TestIndexWriterOnJRECrash to pass the test parameters as environment variables instead of via the command-line arguments, and the test passed. I'm going to close this for now as not reproducible. Thanks for the info!


class _StrWrap unsupported python2

class _StrWrap():
    """Wrap a FFI Cdata object

    This class is a proxy class which auto-convert FFI string to Python
    string. It must be used only on object containing string data.
    Original CFFI string can always be accessed by prefixing the property with
    an underscore.
    """
    def __init__(self, obj):
        self.obj = obj

    def __setattr__(self, key, value):
        if key == 'obj':
            return super().__setattr__(key, value)

        setattr(self.obj, key, value)

    def __getattr__(self, key):
        try:
            attr = getattr(self.obj, key)
        except AttributeError as origin_exc:
            # Remove the first underscore if exists
            if key.startswith('_'):
                try:
                    return getattr(self.obj, key[1:])
                except AttributeError:
                    raise origin_exc
            raise origin_exc

        return _cstr(attr)

This is not supported on python2
    def __setattr__(self, key, value):
        if key == 'obj':
            return super().__setattr__(key, value)

If you run on python2 will get this error.
return super().setattr(key, value)
TypeError: super() takes at least 1 argument (0 given)
Exception TypeError: "'NoneType' object is not callable" in <bound method HelloTriangleApplication.del of <main.HelloTriangleApplication object at 0x000000000306F888>> ignored

Hello @mackst. Thanks for the report.
You are right, I didn't test on Python2 after adding this class.

Fixed here https://github.com/realitix/vulkan/commit/da62f4a2d14fb3fa03fdaa69e4173cdef526a57d
Thanks !


New Page where the user can find the club without using the map

Design new search club site, ( in the place of old club list) we need to design a new page for user to chose club without using the map

I have an idea:
Create two buttons: Show all club list or search by name.
Every button do action. Show all, displays a list and search displays a search bar


🐛 Bug Report: TechDocs search missing from Catalog Docs tab

📜 Description
At some point the search bar has gone missing from the Catalog Docs tab 🤔
Example Catalog Docs tab: https://demo.backstage.io/catalog/default/component/backstage-demo/docs
Docs view outside Catalog: https://demo.backstage.io/docs/default/component/backstage-demo
I believe this is caused by the withSearch={false} here:
https://github.com/backstage/backstage/blob/dcf9eb531e0ed0594809e6486656c156155328a2/plugins/techdocs/src/EntityPageDocs.tsx#L48
👍 Expected behavior
It should have the same search bar like the Docs view outside of the catalog: https://demo.backstage.io/docs/default/component/backstage-demo
👎 Actual Behavior with Screenshots
The search bar is missing in the Catalog Docs tab: https://demo.backstage.io/catalog/default/component/backstage-demo/docs
👟 Reproduction steps

Create a Backstage instance with: npx @backstage/create-app@latest
Setup TechDocs: https://backstage.io/docs/features/techdocs/getting-started
Got to an entity with TechDocs setup in the Catalog

Notice: there is no search bar on the Docs tab
📃 Provide the context for the Bug.
The search bar is handy to be able to quickly search for something in a longer document.
🖥 Your Environment
OS:   Darwin 23.3.0 - darwin/arm64
node: v18.18.2
yarn: 3.5.0
cli:  0.25.2-next.3 (installed)
backstage:  1.23.0-next.3

Dependencies:
  @backstage/app-defaults                                          1.5.0-next.3
  @backstage/backend-app-api                                       0.5.10, 0.5.11-next.3
  @backstage/backend-common                                        0.19.9, 0.20.1, 0.21.0-next.3
  @backstage/backend-defaults                                      0.2.10-next.3
  @backstage/backend-dev-utils                                     0.1.3, 0.1.4-next.0
  @backstage/backend-openapi-utils                                 0.1.3-next.3
  @backstage/backend-plugin-api                                    0.6.10-next.3, 0.6.9
  @backstage/backend-tasks                                         0.5.14, 0.5.15-next.3
  @backstage/catalog-client                                        1.5.2, 1.6.0-next.1
  @backstage/catalog-model                                         1.4.3, 1.4.4-next.0
  @backstage/cli-common                                            0.1.13
  @backstage/cli-node                                              0.2.2, 0.2.3-next.0
  @backstage/cli                                                   0.25.2-next.3
  @backstage/config-loader                                         1.6.1, 1.6.2-next.0
  @backstage/config                                                1.1.1
  @backstage/core-app-api                                          1.12.0-next.1
  @backstage/core-compat-api                                       0.2.0-next.3
  @backstage/core-components                                       0.14.0-next.2
  @backstage/core-plugin-api                                       1.9.0-next.1
  @backstage/e2e-test-utils                                        0.1.1-next.0
  @backstage/errors                                                1.2.3
  @backstage/eslint-plugin                                         0.1.5-next.0
  @backstage/frontend-plugin-api                                   0.6.0-next.3
  @backstage/integration-aws-node                                  0.1.8, 0.1.9-next.0
  @backstage/integration-react                                     1.1.24-next.2
  @backstage/integration                                           1.8.0, 1.9.0-next.1
  @backstage/plugin-api-docs                                       0.11.0-next.3
  @backstage/plugin-app-backend                                    0.3.58-next.3
  @backstage/plugin-app-node                                       0.1.10-next.3
  @backstage/plugin-auth-backend-module-atlassian-provider         0.1.2-next.3
  @backstage/plugin-auth-backend-module-aws-alb-provider           0.1.0-next.2
  @backstage/plugin-auth-backend-module-gcp-iap-provider           0.2.4-next.3
  @backstage/plugin-auth-backend-module-github-provider            0.1.7-next.3
  @backstage/plugin-auth-backend-module-gitlab-provider            0.1.7-next.3
  @backstage/plugin-auth-backend-module-google-provider            0.1.7-next.3
  @backstage/plugin-auth-backend-module-microsoft-provider         0.1.5-next.3
  @backstage/plugin-auth-backend-module-oauth2-provider            0.1.7-next.3
  @backstage/plugin-auth-backend-module-oauth2-proxy-provider      0.1.2-next.3
  @backstage/plugin-auth-backend-module-oidc-provider              0.1.0-next.3
  @backstage/plugin-auth-backend-module-okta-provider              0.0.3-next.3
  @backstage/plugin-auth-backend                                   0.21.0-next.3
  @backstage/plugin-auth-node                                      0.4.3, 0.4.4-next.3
  @backstage/plugin-badges-backend                                 0.3.7-next.3
  @backstage/plugin-badges                                         0.2.54-next.3
  @backstage/plugin-catalog-backend-module-scaffolder-entity-model 0.1.7-next.3
  @backstage/plugin-catalog-backend                                1.17.0-next.3
  @backstage/plugin-catalog-common                                 1.0.20, 1.0.21-next.0
  @backstage/plugin-catalog-graph                                  0.4.0-next.3
  @backstage/plugin-catalog-node                                   1.6.1, 1.6.2-next.3
  @backstage/plugin-catalog-react                                  1.10.0-next.3
  @backstage/plugin-catalog                                        1.17.0-next.3
  @backstage/plugin-cost-insights-common                           0.1.2
  @backstage/plugin-cost-insights                                  0.12.19-next.3
  @backstage/plugin-events-node                                    0.2.19-next.3
  @backstage/plugin-explore-backend                                0.0.20-next.3
  @backstage/plugin-explore-common                                 0.0.2
  @backstage/plugin-explore-react                                  0.0.36-next.1
  @backstage/plugin-explore                                        0.4.16-next.3
  @backstage/plugin-github-actions                                 0.6.11-next.3
  @backstage/plugin-graphiql                                       0.3.3-next.3
  @backstage/plugin-home-react                                     0.1.8-next.3
  @backstage/plugin-home                                           0.6.2-next.3
  @backstage/plugin-kubernetes-backend                             0.15.0-next.3
  @backstage/plugin-kubernetes-common                              0.7.4-next.2
  @backstage/plugin-kubernetes-node                                0.1.4-next.3
  @backstage/plugin-kubernetes-react                               0.3.0-next.3
  @backstage/plugin-kubernetes                                     0.11.5-next.3
  @backstage/plugin-org                                            0.6.20-next.3
  @backstage/plugin-permission-common                              0.7.12
  @backstage/plugin-permission-node                                0.7.20, 0.7.21-next.3
  @backstage/plugin-permission-react                               0.4.20-next.1
  @backstage/plugin-proxy-backend                                  0.4.8-next.3
  @backstage/plugin-scaffolder-backend-module-azure                0.1.2-next.3
  @backstage/plugin-scaffolder-backend-module-bitbucket-cloud      0.1.0-next.1
  @backstage/plugin-scaffolder-backend-module-bitbucket-server     0.1.0-next.1
  @backstage/plugin-scaffolder-backend-module-bitbucket            0.2.0-next.3
  @backstage/plugin-scaffolder-backend-module-gerrit               0.1.2-next.3
  @backstage/plugin-scaffolder-backend-module-github               0.2.0-next.3
  @backstage/plugin-scaffolder-backend-module-gitlab               0.2.13-next.3
  @backstage/plugin-scaffolder-backend                             1.21.0-next.3
  @backstage/plugin-scaffolder-common                              1.5.0-next.1
  @backstage/plugin-scaffolder-node                                0.3.0-next.3
  @backstage/plugin-scaffolder-react                               1.8.0-next.3
  @backstage/plugin-scaffolder                                     1.18.0-next.3
  @backstage/plugin-search-backend-module-catalog                  0.1.14-next.3
  @backstage/plugin-search-backend-module-explore                  0.1.14-next.3
  @backstage/plugin-search-backend-module-techdocs                 0.1.14-next.3
  @backstage/plugin-search-backend-node                            1.2.14-next.3
  @backstage/plugin-search-backend                                 1.5.0-next.3
  @backstage/plugin-search-common                                  1.2.10
  @backstage/plugin-search-react                                   1.7.6-next.3
  @backstage/plugin-search                                         1.4.6-next.3
  @backstage/plugin-tech-radar                                     0.6.13-next.3
  @backstage/plugin-techdocs-backend                               1.9.3-next.3
  @backstage/plugin-techdocs-node                                  1.11.2-next.3
  @backstage/plugin-techdocs-react                                 1.1.16-next.2
  @backstage/plugin-techdocs                                       1.10.0-next.3
  @backstage/plugin-todo-backend                                   0.3.8-next.3
  @backstage/plugin-todo                                           0.2.34-next.3
  @backstage/plugin-user-settings                                  0.8.1-next.3
  @backstage/release-manifests                                     0.0.11
  @backstage/repo-tools                                            0.6.0-next.3
  @backstage/theme                                                 0.5.1-next.1
  @backstage/types                                                 1.1.1
  @backstage/version-bridge                                        1.0.7

👀 Have you spent some time to check if this bug has been raised before?

[X] I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

[X] I have read the Code of Conduct

Are you willing to submit PR?
No, but I'm happy to collaborate on a PR with someone else

Related Discord thread: https://discord.com/channels/687207715902193673/1206955846836158494

My assumption was that this was intentionally left out of the entity tab view since results in the search bar will link you to the full techdocs reader page (ie. navigates to the full page techdocs plugin pages) which leads to a UI confusion due to the context switch. Not sure if a workaround was ever implemented so that search result routing stays within the context of the entity tab parent route. Maybe @camilaibs can confirm here?

Yes, what @kuangp said is correct, after removing the withSearch={false} here:
https://github.com/backstage/backstage/blob/dcf9eb531e0ed0594809e6486656c156155328a2/plugins/techdocs/src/EntityPageDocs.tsx#L48
Then trying out the Documented Component example, searching does bring me to the TechDocs view outside of the Catalog Entity view which is for sure a confusing context change. Looks like this is by design then but I'm wondering if this should be documented further? 🤔

Hi @kuangp and @awanlin, sorry for the late response, I haven't been working with TechDocs for a while now, but it seems that the search bar was hidden even before the introduction of the TechDocs add-ons as per this change. I think it was intentional not to show the search bar there. Let me ping @emmaindal to see if she remembers why.

No worries @camilaibs, I actually did reach out to @emmaindal about this as well, and she wasn't sure, which is fair this was from two years ago ;)
The reality is that as @kuangp it's not a great UX/DX having it turned on. Now we can make it work or document this somehow. Not totally sure. I'll admit I was looking for an "easy button" on this one and though "oh, we can just make a prop" but it's a bit more than that now

It would be great to hear what @backstage/techdocs-maintainers think 🙂 .
One thing that came to mind is that the location used here comes from the search results, so a solution could be modifying the location before passing it to the search result in case the component is rendered in the context of the entity page and adding a config so people can decide if they want to show the search bar or not (hand it over to the adopter to decide if the search bar on the docs tabs makes sense for them or not).

I'm willing to put some time into this, if @kuangp's thoughts are the reasoning behind not showing the search. It makes much sense to me that searching in the docs tab would redirect you to the /docs page being bad UI, and that being the reasoning.
I can look into redirecting the search results to the corresponding docs tab url's if search is performed in that context. It would be a similar UI as in the /docs pages.
@camilaibs would this approach work for you? I can start working on it if so.

It sounds a good approach to me, thank you in advance for the contribution 🙏. Let me just ping @backstage/techdocs-maintainers to hear their final recommendation 🙂

Hey, just finished reading these comments and it sounds like the search bar + search result item modification would be a welcome addition in techdocs through the entity page! Thank you for looking into it 😄!


Heapster Doc corrections

Minor corrections in the documentation .

This change is

@rohitsardesai83
Thanks for your contribution!
Please add some description in the PR message it is empty for now.
Overall looks good to me. Please resolve the cla, firstly. :)

signed the cla

@andyxning, please review and merge the PR.

@roberthbailey Could you please squash commits.

@roberthbailey , @andyxning , is there anything I need to do here ?

Sorry for the error @. Could you please squash the commits.

@rohitsardesai83

/ok-to-test

Friendly Ping @rohitsardesai83 :-)

seems flakes.
/test pull-heapster-e2e

Since PR lgtm except commits not squashed. Multi commits does not impact the correctness.
/lgtm

@DirectXMan12 Could you please merge this PR since it lgtm.

Closing as there is not progress for 2+ months. Please reopen if you want to continue working on this.


How to set a constant array in a symbol ?  ndarray seems not to work. mxnet version is 0.9.4.

a simple sym code like this:
import mxnet as mx
data = mx.sym.Variable(name='data', shape=(4,3,20,20))
b_sub = mx.sym.broadcast_sub(lhs=data, rhs=mx.nd.array([1,2,3]).reshape((1,3,1,1)))
arg_shapes,out_shapes,aux_shapes = b_sub.infer_shape()
print (type(out_shapes),type(arg_shapes),type(aux_shapes))
it can run, but all shapes are NoneType
but when i change b_sub to
b_sub = mx.sym.broadcast_sub(lhs=data, rhs=mx.sym.ones((1,3,1,1)))
everything works fine.
Is this normal ?  @tqchen

This issue is closed due to lack of activity in the last 90 days. Feel free to ping me to reopen if this is still an active issue. Thanks!


Fix bug in which seed for UniformRandom cannot be null

Fixes https://github.com/tensorflow/tfjs/issues/1687
BUG

This change is

@nsthorat I hope this bug fix can be included in 1.2.2. Without it, tf.layers.dropout() won't work.


how to use codes from bukkit.yml in server.properties？

Basically I want to use spawn limitation code from bukkit.yml below
spawn-limits:
monsters: 70
animals: 10
water-animals: 4
water-ambient: 4
ambient: 1
I tried to add “spawn-limits-monsters=1” in server.properties but not working.
Is it possible? Or I just can’t use it.
Please help.

Your question has nothing to do with MCSManager. Please go to the Spigot forum to ask.

Thank you so much.

Is it possible to add bukkit.yml file to mcsmanager under the same route as server.properties file?

Forget about that question, thank you for your answer .


Fix the initialization of host endpoint labels

To properly initialize the host endpoint with labels added before the agent starts, we need to watch for k8s Node ADD events and use the new set of labels to update the restored host endpoint. See commits for details.
I tested this patch set in https://github.com/cilium/cilium/pull/15714, with an extension to the tests. That extension to the test can't be backported so I'll submit it in a separate PR to ease backporting of the present fix.
Fixes: https://github.com/cilium/cilium/issues/13676.

test-me-please

test-me-please

test-only --focus="K8sServicesTest Checks service across nodes Tests NodePort BPF Tests with direct routing Tests LoadBalancer Connectivity to endpoint via LB" --k8s_version=1.16 --kernel_version=netnext

All team reviews are covered and the test-only for the test that failed in k8s-1.16-kernel-netnext passed. Merging.


Add 5 last missing endpoints in User API

Our project has a folder, where all API related stuff is located, (/lib). Your task is to add 5 missing endpoints listed below

All of these could be found in the following docs
Add these endpoints as methods on User class

Also u could read up on axios docs

The task is already done by @Ak1yamaKiyoshi


Sort by category and family

On the search page you can only sort by Genus and Species as of now. Let's add the ability to sort by family and category.

Looking through the website more it looks like it would only be relevant to add the sorting for family


Replace the unavailable linked test-case for issue 3263 with a reduced test-case

Re: issue #3263 and PR #3265.

/botio test

/botio makeref

Nice work!


Feature request: Externalize ArrowKeyStepper state

I would like to manage the scrollToColumn/scrollToRow state in Redux. I see that I can set the ArrowKeyStepper's scrollToColumn/scrollToRow via its props. In addition, I would like an onChange function to capture scrollToColumn/scrollToRow changes.
I think ReactMeasure is a good example of a component that provides both options (function child vs onMeasure).

ArrowKeyStepper works with a child function, so you already have access to the scrolled-to row and column.
  <ArrowKeyStepper
    columnCount={columnCount}
    rowCount={rowCount}
  >
    {({ onSectionRendered, scrollToColumn, scrollToRow }) => {
      // Do whatever you want with scrollToColumn and scrollToRow here
      return (
        <Grid
          scrollToColumn={scrollToColumn}
          scrollToRow={scrollToRow}
          onSectionRendered={onSectionRendered}
          {...otherGridProps}
        />
      );
    }}
  </ArrowKeyStepper>

If I call a Redux action there, that causes a setState function to be called within render, which results in a React warning. I'll create an example repo to show it

Here is the issue (let me know if you know a better way to transfer the child args to Redux).

Repo: https://github.com/mking-clari/stepper-warning

If I call a Redux action there, that causes a setState function to be called within render, which results in a React warning. I'll create an example repo to show it

You could dispatch your action on the next tick to avoid this.

Anyway, I'm pretty swamped at the moment so I haven't been taking on feature requests for this lib. Happy to review a PR if you'd like to submit one though. 😄

I'll close this for now. If I have time I'll open a PR. Thanks for taking the time to review!

Sounds reasonable. Thanks for understanding!


Networking tests are noisy and flaky

See e.g. https://travis-ci.org/Zarel/Pokemon-Showdown/builds/198710235 [Gist]

Let's disable them?

I'll make them get skipped until I work out a way to make the workers both shut up while the tests are running. I think closing workers' stdout pipes might work. I'll look into why the tests that require IPC for eval are crashing so the crashlogger can shut up as well.

Fixed in #3235

It seems like this is related to what version of Node's being run. Using v6.2.2 like Travis was, the messages finally showed up, but I haven't been able to get them to appear on v7.5.0. I'll need to look into what changes have been made between those versions to find out what's causing this.

That explains it; I was on Node 6.0.0


postal_smtp_1 Exit 1 on

Describe the bug
i was trying installing postal then I encountered this error when I run the postal status command
error -
postal_smtp_1      /docker-entrypoint.sh post   Exit 1

Screenshot link (in case above doesn't work) - https://prnt.sc/26j9ue9
Environment details
OS - Ubuntu 20

This doesn't sound like a bug. Check the logs for it. Post a Discussion if you still need help.

This doesn't sound like a bug. Check the logs for it. Post a Discussion if you still need help.

I have created a Discussion  - https://github.com/postalserver/postal/discussions/1832


Cookie documentation

I need to set a incorporate a set of cookies into the call, and the only thing related I saw is
var opt = {headers:{Cookie:"abc=123"}, uri:"https://www.google.com"}
Witch works, but I find no way to properly send a set of cookies.
``var opt = {headers:{Cookie:"abc=123&xyz=987"}, uri:"https://www.google.com"}
`
Doesn't work, how can I send more than one cookie?

Hi,
Just put the whole cookie in 'headers:{"Cookie": your cookie}. I'm sure it will work.

Can I have an example of how to send more than one? I'm not able to make it work.

If you have any further questions, refer to stackoverflow.com , thank you.


Old Documents never die

This is a doozy. Working with some conversion code, I noticed that I was getting memory leaks. Tracing it, I find that Document is never being deleted even though I've only got one document variable and I'm overwriting it with a new document. That means none of the inputs or nodes are being deleted, so all the data from old documents is kept when we create a new one.
Turns out, each XFormType keeps a list of all its instance nodes - and these are static singletons. Although explicitly deleting nodes removes them from this list, they don't ever get removed otherwise. Why do we do this? Because currently macros are shared across all documents, and when a macro type is deleted all its instances in all documents must be deleted.
Temporary fix: add a clear() method to Document that can be called to explicitly delete all nodes, which means the document will go away when dereferenced. That's done.
Proper fix needs doing: fold macro types into Documents. Macro types being shared by all open documents is a potential nightmare because they are loaded/saved as part of Document. I have no idea how that actually works - are they merged in? What happens when a different macro of the same name as an existing one is loaded in? Argh.
The solution is to put macro types into the document. Each doc then has a Dict[XFormType,List[XForm]] to store the instances, keeping the instance lists inside the doc. We then treat xformtype macros differently from normal xformtypes, and store them in the doc. This will be a big change.

Fixed, I think - the types no longer keep a list of their instances, instead the document keeps a dict of lists - as described in the opening comment. Also, docs have owned macros for some time.
Fixing this involved looking at macros again, which opened cans of worms. Palette rebuilding needed rewriting, for one thing, otherwise I was getting an individual tiny window for each palette group!


Is there any part of this project that embodies cloud-edge collaboration

I'm a beginner. Is there any part of this project that embodies cloud-edge collaboration?The existing code seems to run natively.

At present, ianvs is used to develop and test cloud-edge collaborative algorithm in a local server. The issue has been discussed in https://github.com/kubeedge/sedna/issues/275. A simulator with multiple nodes is available last year with ianvs (https://github.com/kubeedge/ianvs/pull/35, https://github.com/kubeedge/ianvs/pull/39).


Parameters to tweek for crown segmentation

Thank you for publishing this nice piece of software, I am triing to segment a forest patch with beech trees, scanned leafs-off, with a Rigel VZ400. Most parts of the algorithem work well untill the point of crown segmentation segmentcrown [14 - 16] 0 ../beech.volume.*.pcd. The results show strongly undersegmented crowns for all trees. Do you have any hint how to obtain a stronger segmentation? I already found out that the second parameter of the function turns on wood-leaf-segemntation but what is the first one '[14 - 16]' doing? Thanks for your help!

The first parameter is smoothness, it is a single number not a range.
smoothness refers to the angle threshold between surface normals to join anew point onto an existing segment.
smoothness is the main variable to tune the segmentation in treeseg. I suspect Andy wrote it as [14-16] to encourage users try a range of values in that region.
I would suggest running at 14, then if results still look like shown reducing it further

Hi both, apologies for the slow response. Probably far too late now, but I've been tinkering with the regionSegmentation function recently. JulFrey - if you are not familar with region growing segmentation there is a good primer here: https://pcl.readthedocs.io/projects/tutorials/en/latest/region_growing_segmentation.html. The newer tweaks consider consider a larger neighbourhood of points, than the version you were using. If you are using high-quality VZ-400 data, then I would suggest trying a value in the region of 5. This should do a better job of breaking the cloud into its underlying surfaces than it did in your image.
I hope to have some better documentation and a tutorial up this month.
Cheers,
Andy


Extend the README with more information

Adds extra information about another step needed when rendering Buildamic.

Thanks Jelle,
I'm going to leave this out for now, as it isn't our intention to define the frontend grid layout, as we want to leave that to the end developer as they might want a specific layout, which might also involve any or no particular css framework.

Hi Jelle,
We have added a some directives, tags and helpers for this now, as under the assumption that most Statamic sites will probably be using TailWind, we can provide an optional grid/starting css for some cases.
https://github.com/HandmadeWeb/buildamic#frontend


refactor: replace sanitize-filename with filenamify

[x] I have read the contribution documentation for this project.
[x] I agree to follow the code of conduct that this project follows, as appropriate.
[x] The changes are appropriately documented (if applicable).
[x] The changes have sufficient test coverage (if applicable).
[x] The testsuite passes successfully on my local machine (if applicable).

Summarize your changes:
Related to https://github.com/electron/get/pull/162

CI needs a kick:
#!/bin/bash -eo pipefail
test/ci/_before_script.js
Downloading Electron v1.4.13 before running tests...
Error: dest already exists.
    at pathExists (/home/circleci/project/node_modules/@electron/get/node_modules/fs-extra/lib/move/move.js:41:31)
    at fn.apply.then.r (/home/circleci/project/node_modules/universalify/index.js:23:46)

Exited with code exit status 1
CircleCI received exit code 1

Yeah, I need to figure out why that happens.


fix: update dependencies

:tada: This PR is included in version 1.0.3 :tada:
The release is available on:

v1.0.3
npm package (@latest dist-tag)
GitHub release
v1.0.3
v1.0.3

Your semantic-release bot :package::rocket:


ninja_test: Fix Visual C++ 2015 warnings/errors about name hiding.

Visual C++ 2015 warns if a local variable hides visibility of another variable
in a higher scope.  Since this project declares warnings as errors, ninja_test
simply won't build on Visual C++ 2015.
The variables have been renamed and scope limited as appropriate, so that
ninja_test will build without error now on Visual C++ 2015.

Thanks!


Console Errors for invalid colors

While looking into #69 I saw this error in the console logs.
manifest.json:1  Manifest: property 'theme_color' ignored, 'var(--lcars-ui-app-header-background-color, var(--lcars-ui-primary))' is not a valid color.

And now this isn't happening any more.


Providing flows to PresentationActivity that the user can progress on…

…e after the other such as ConsentPrompt, Biometrics, and future Passphrase
The user can progress from one flow to another based on the return state of the previous or current flow. This helps direct the flows in a sequence as desired.

[ ] Tests pass
[ ] Appropriate changes to README are included in PR

Closing PR - different approach discussed.


Get data

The data can be kept outside this repo, but have code to index some existing repos on GitHub. Need one or more indexer inside this repo.

Use Zapier-recipe on GitHub events for search-index.
Food recipes
Reuters data set

search-index-indexer fixes this now, together with recipes-klikk-dataset


Init psylib, init Gstreamer automatically, start timer thread

Currently, one can get in to trouble. E.g. piplines don't start running as gstreamer isn't initialized yet.
Currently, one has to do that manually, this could be confusing for the client.
Perhaps we should enable a psy_lib_init function and do all initialization there.

start gstreamer
start the timer thread
gtk
and perhaps more

This was merged in #125, there are however remaining issues.
This merge made two different function to
You can call the function psy_init() to initialize and psy_deinit() to do the reverse.
Additionally one can create a Psy.Initializer() object, which will init psylib on construction and do the reverse when it is deinitialized.
This last one allows to initialized specific subsystems, such as gstreamer and portaudio, via construct_only properties.
This is where the remaining issue is. I've used the Psy.Initializer:all property, to set all libraries (the other properties) to init to TRUE. However, I feel it makes more sense to opt out subsystems, but initialize them by default. So you can turn of e.g. Portaudio if you don't do any SoundStimuli. This saves one property and does the right thing for most people.


added physIO batching tutorial

Hey team,
Here is a tutorial that gives an example of batch scripting use of the PhysIO toolbox. Let me know if anything is not clear or if you think I should amend anything.
Couple of things:

I still have not solved images not displaying in my forked website. Let me know if the images are displaying ok or not.
There are a couple of instances where I have made reference to a currently private repo. I have flagged in the text directly next to the links that the info is coming soon, and I have sought to make the info within the tutorial as complete as possible. The links will just connect to some functions I wrote to wrangle motion regressor data and create lists of files relevant for PhysIO. I will release them into the wild once I make the whole repo public. Let me know if you are ok with this situ for now.

Byeeeeee :)
Kel

fantastic :)


[Flutter 2.0 Android] DartExecutor.isExecutingDart() returns unexpected result

Steps

call FlutterEngineGroup createAndRunDefaultEngine twice or more
check the result engine.dartExecutor.isExecutingDart

val group = FlutterEngineGroup(context)
repeat(3) {
  val engine = group.createAndRunDefaultEngine(context)
  Log.i("flutter", "isExecutingDart: ${engine.dartExecutor.isExecutingDart}")
}

Actual result:
 I/flutter: isExecutingDart: true
 I/flutter: isExecutingDart: false
 I/flutter: isExecutingDart: false

Expected result:
 I/flutter: isExecutingDart: true
 I/flutter: isExecutingDart: true
 I/flutter: isExecutingDart: true

I'm not sure if I misunderstood...
[✓] Flutter (Channel stable, 2.0.1, on Mac OS X 10.15.7 19H512 darwin-x64, locale zh-Hans-CN)
    • Flutter version 2.0.1 at /Users/wangyongrong/Library/flutter-2.0
    • Framework revision c5a4b4029c (6 days ago), 2021-03-04 09:47:48 -0800
    • Engine revision 40441def69
    • Dart version 2.12.0
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn

@xster Does a spawned FlutterEngine need to set the isApplicationRunning flag on its DartExecutor?
This would usually be done when DartExecutor.executeDartEntrypoint is called, but that is not done for FlutterEngineGroup spawned engines.

Thanks fro reporting the issue @yrom. Thanks for checking @jason-simmons


[AUTH-388] set pod security admission labels for namespaces

This sets pod security admission labels. Currently, none are set and starting with OpenShift 4.13 this generates warnings in Telemetry. This fixes it.
Refer to https://kubernetes.io/docs/concepts/security/pod-security-standards/ to further tighten the labels potentially to the recommended restricted level.
The labels were determined by using the https://github.com/stlaz/psachecker tool.

/retest


Update README.md

Edited README.md to include a short note about performance increase on Windows for AMD GPU's and lower end CPU's.

New joiners wanting to use it may be confused and think this is only for Linux when that is not the case.

New joiners wanting to use it may be confused and think this is only for Linux when that is not the case.

It is only meant to be used for Linux as that is the only use case that this repo only really have official support for.
As the wiki says it may in general work on Windows, and it's cool when it does (and sometimes we do assist Windows users in issues), but we don't want to officially encourage it as it is outside our scope.
Both Nvidia and Intel use or will use dxvk in some capacity on Windows, but that is separate projects from what this repository offers.

New joiners wanting to use it may be confused and think this is only for Linux when that is not the case.

It is only for Linux. It working on Windows is a byproduct and not officially supported.
https://github.com/doitsujin/dxvk/wiki/Windows

Spelling aside, this isn't even true anymore, AMD's driver outperforms DXVK in most games on RDNA2 onwards.


Idea: changing the profile matrix editor to something more useable considering large topologies

Whenever I try to create a LES with a really big topology my browser hangs some time and eventually it will render the really big profile matrix editor, which is than unmanageable due to it's slowness.
However, fear not, I have an idea that might solve this.

What if after hitting continue on the import screen, you'll go to a page where you'll see your selected topology with all but the end-nodes 'clickable'.  When clicking an end-node you can edit the technologies that are attached to that single node.
The only problem with this setup is enabling/disabling your concurrency settings. Maybe we can still change them but it's not clear than that you also changed the technologies which are under other nodes.

Related: https://github.com/quintel/etmoses/issues/747


Not able to export traces to OTLP exporter via AWS managed Lambda layer

We are trying to auto instrument our java lambda (using micronaut framework) using the lambda layer "arn:aws:lambda:<region>:901920570463:layer:aws-otel-java-wrapper-amd64-ver-1-10-1:1" as specified in https://aws-otel.github.io/docs/getting-started/lambda/lambda-java.
We have configured the following environment variables for the OTLP exporter,
AWS_LAMBDA_EXEC_WRAPPER |  /opt/otel-handler
OTEL_EXPORTER_OTLP_ENDPOINT |https::20443
OTEL_EXPORTER_OTLP_HEADERS | Authorization=Bearer
OTEL_EXPORTER_OTLP_TIMEOUT | 30000
OTEL_INSTRUMENTATION_AWS_LAMBDA_FLUSH_TIMEOUT | 30000
OTEL_INSTRUMENTATION_AWS_LAMBDA_HANDLER | io.micronaut.function.aws.MicronautRequestHandler::handleRequest
OTEL_LOG_LEVEL | debug
OTEL_METRICS_EXPORTER | otlp
OTEL_PROPAGATORS | tracecontext,b3,b3multi,ottrace,xray,jaeger
OTEL_RESOURCE_ATTRIBUTES | service.name=service,service.namespace=namespace,service.version=LATEST
OTEL_SERVICE_NAME | serviceName
OTEL_TRACES_EXPORTER | otlp
OTEL_TRACES_SAMPLER | always_on
The traces are pushed to the AWS x-ray when we enabled the active tracing but its not pushing to the OTLP endpoint.
From the cloudwatch logs, we could see there are only two exporters displayed - logging and awsxray but no exporter for OLTP.
Sample logs:
builder/exporters_builder.go:255	Exporter was built.
{     "kind": "exporter",     "name": "logging" }
builder/exporters_builder.go:255	Exporter was built.
{
"kind": "exporter",
"name": "awsxray"
}
Do we need additional configurations or a separate collector and exporter for the OTLP?
As per the documentation the lambda layer has the java agent as well the collector inbuilt for OTLP from https://github.com/aws-observability/aws-otel-collector/blob/main/pkg/lambdacomponents/defaults.go#L23-L26

Hi @NithyaAhila! Thanks for posting this issue and sorry for the delay.
I think the issue for why you may not be seeing logs indicating that an oltp exporter has started is because you have to provide your own custom configuration file. This config files is for the ADOT Collector that is included in the Java Lambda Layer. In the same guide you posted, there is a section about Configuring the ADOT Collector in the Lambda Layer with different components.
If you include a custom configuration, you'll end up with the default ADOT Collector configuration which only includes the logging and awsxray exporters.
Let me know if that makes sense!
Also just want to clarify this comment:

We have configured the following environment variables for the OTLP exporter,
...
OTEL_EXPORTER_OTLP_ENDPOINT |https::20443
OTEL_EXPORTER_OTLP_HEADERS | Authorization=Bearer
OTEL_EXPORTER_OTLP_TIMEOUT | 30000
...
OTEL_TRACES_EXPORTER | otlp

You cannot configure the OTLP Exporter on the Collector like this. This is for the OTLP exporter on the Java Lambda App you are trying to instrument.
You have to use the configuration file I mentioned above for this. Check out this OTel Collector documentation to learn how to configure the otlp Collector Exporter.

Thanks for the inputs @NathanielRN . Will check with the custom configurations.

We tried with the environment variables. We could see the startup logs getting pushed but we are not able to send the custom span/traces.


build: Generate AUTHORS file from git history.

Automating this is the only way to keep it up to date. The script generates
the list of authors from the git history while removing duplicates and
sorting the whole thing by frequency with the most frequent strings at the
top. It also filters out github 'noreply' email addresses.
Signed-off-by: Philip Tricca<EMAIL_ADDRESS>

this resolves #567


node-gyp rebuild error

I'm running into the following error when running npm install with the latest version of node (v0.6.19)
info it worked if it ends with ok
<EMAIL_ADDRESS>./node_modules/express/node_modules/connect/node_modules/qs
info downloading: http://nodejs.org/dist/v0.6.19/node-v0.6.19.tar.gz
ERR! Error: incorrect header check
at Zlib.onerror (zlib.js:293:17)
ERR! not ok
npm ERR<EMAIL_ADDRESS>install: node-gyp rebuild
npm ERR! sh "-c" "node-gyp rebuild" failed with 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>install script.
npm ERR! This is most likely a problem with the weak package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls weak
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Darwin 11.4.2
npm ERR! command "node" "/usr/local/bin/npm" "update"
npm ERR! cwd /Users/jcann/Documents/workspace/fly_swatter
npm ERR! node -v v0.6.19
npm ERR! npm -v 1.1.24
npm ERR! code ELIFECYCLE
npm ERR! message<EMAIL_ADDRESS>install: node-gyp rebuild
npm ERR! message sh "-c" "node-gyp rebuild" failed with 1
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/jcann/Documents/workspace/fly_swatter/npm-debug.log
npm not ok
npm not ok
Setup:
Python 2.7.3
Mac OSX Lion 10.7.4
Node v0.6.19
Npm 1.1.24

our build server is behind a firewall and don't have internet access. the solution we use is to host the node header files internally (e.g. http://:/nodejs/dist/<node_version>), then pre-install these headers by calling
$ node-gyp install --disturl=http://:/nodejs/dist
In this case "node-gyp rebuild" shouldn't try to download headers from nodejs.org again.


[MWPW-140776] - [Express mobile beta] SEO CTA adjustments to fit loc copy

Resolves: MWPW-140776
Description:

Added code to change font size according to number of lines as making it dependent according to the number of characters is not advisable due to the Japanese and Chinese characters being wider than the English alphabet, so it takes more space even if it has less characters.

Test URLs:
(Mobile Ver)
Other environments are in the ticket comment.
Before:

https://stage--express--adobecom.hlx.page/jp/express/feature/video/editor?martech=off
https://stage--express--adobecom.hlx.page/nl/express/feature/video/editor?martech=off
https://stage--express--adobecom.hlx.page/fr/express/feature/video/editor?martech=off
https://stage--express--adobecom.hlx.page/tw/express/feature/video/editor?martech=off

After:

https://mwpw-140776--express--adobecom.hlx.page/jp/express/feature/video/editor?martech=off
https://mwpw-140776--express--adobecom.hlx.page/nl/express/feature/video/editor?martech=off
https://mwpw-140776--express--adobecom.hlx.page/fr/express/feature/video/editor?martech=off
https://mwpw-140776--express--adobecom.hlx.page/tw/express/feature/video/editor?martech=off

Codecov Report
Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (b3b881f) 32.12% compared to head (667b128) 31.82%.
Report is 6 commits behind head on stage.

Files
Patch %
Lines

express/blocks/shared/floating-cta.js
90.47%
2 Missing :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##            stage     #557      +/-   ##
==========================================
- Coverage   32.12%   31.82%   -0.30%
==========================================
  Files         127      128       +1
  Lines       24185    24221      +36
==========================================
- Hits         7769     7708      -61
- Misses      16416    16513      +97

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Bump v3.1.0-beta

Support the distributed backup and restore feature #5532
Support the Follower Read feature #5562

/run-integration-tests

DNM for this PR


Link to InChI is missing

As far as I know http://www.inchi-trust.org/download/105/INCHI-1-API.zip is needed for compiling RDKIT. Sadly the link is offline and I've couldn't find replacement.
May you please tell me the current link?

It looks like they changed the url to:
https://www.inchi-trust.org/download/105/INCHI-1-SRC.zip
I won’t be able to test this until this evening.
If so that’s particularly annoying.
Brian Kelley

On Apr 22, 2019, at 1:23 PM, chazanov<EMAIL_ADDRESS>wrote:
As far as I know http://www.inchi-trust.org/download/105/INCHI-1-API.zip is needed for compiling RDKIT. Sadly the link is offline and I've couldn't find replacement.
May you please tell me the current link?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.


User sees an indication of those patients already cloned when looking at list of patients for cloning

Story
https://www.pivotaltracker.com/story/show/81520184
Notes

When a patient gets cloned from the patient bank, that patient gets an origin_data attribute containing some data about the patient it was cloned from. Now it actually persists to the back end!
The template simply swaps in a different icon if an origin_data attribute is present
Had to update FontAwesome to get the favored icon.

I'm not sure this does quite everything we want; it lists a users own patients that happen to be shared in the patient bank, but what I think we want is an indication of other patients that have already been cloned into this measure. For example:
User X shares patient BOB
User Y clones patient BOB into measure ABC
User Y visits the patient bank again for measure ABC
User Y should see some indication that they've already cloned patient BOB

Fair points. I've just added an indicator on the clone 'parents'  based on the patient ID from the first entry in each patient's origin_data. I thought about using all entries in origin_data but I don't think it makes much sense to show the clone of a clone of a clone, though I'm open to hearing alternative views.

I think just showing first-clones is the right call.


[5274] Bulk recommend - adding counts, dealing with errors in the summary

Context
https://trello.com/c/iu3RcVxw/5274-s-bulk-qts-upload-summary-with-errors
https://trello.com/c/ojAaPej5/5298-s-replace-all-the-count-placeholders-with-actual-counts
Changes proposed in this pull request
upload-summary page

Added counts
Added conditional logic around which bullet points to show
Don't show bullets if only one is applicable
Show different button text and extra para if there are errors

check-pending-updates page

Added count to button

confirmation page

Added count to green confirmation box and page title

Guidance to review
Some recommendable, some with no dates:

Some recommendable, some with errors:

All with no dates:

Some with no dates, some with errors:

With all dates:

With all errors:

Confirmation page:

Important business

[ ] ~Does this PR introduce any PII fields that need to be overwritten or deleted in db/scripts/sanitise.sql?~
[ ] ~Does this PR change the database schema? If so, have you updated the config/analytics.yml file and considered whether you need to send 'import_entity' events?~
[ ] ~Do we need to send any updates to DQT as part of the work in this PR?~
[ ] ~Does this PR need an ADR?~

NB: Please notify the #twd_data_insights team and ask for a review if new fields are being added to analytics.yml

 [S] Bulk QTS: Upload summary with errors

Looks good to me!
I could only test a bit as it flagged all trainees I tried to recommend with a legit date with errors, but I assume that's because we're still working on that part :)


proposal: math/bits: need an arbitrary bit shifter for byte slices

While working with hashing tools, I found there is a lack of good shifting tools to operate on arbitrary byte slices. These two functions, Lsh and Rsh, would allow for any slice to be shifted 0 to N number of bits without copying the whole array.
See pull request:
https://github.com/golang/go/pull/43550
Relates to the proposal:
https://go-review.googlesource.com/c/go/+/281832
@mundaym  This would make future Rsh and Lsh calls trivial.  :)

Have you seen https://golang.org/doc/faq#x_in_std?

Have you seen https://golang.org/doc/faq#x_in_std?

Thank you comment and pointer @mvdan.  I really appreciate the logic behind Go, and am perfectly fine with these suggestions being rejected.  I'd like to read the reasons why or why not, and if not for anything else but to see where people are coming from and the logic.  I value the thought experiment greatly!
Rsh and Lsh are very common in crypto, and given they may not be a trivial thing to code by hand-- I'm all for making this something that anyone could use with ease.  :)
All the best!

Thank you comment and pointer @mvdan.  I really appreciate the logic behind Go, and am perfectly fine with these suggestions being rejected.  I'd like to read the reasons why or why not, and if not for anything else but to see where people are coming from and the logic.  I value the thought experiment greatly!
Rsh and Lsh are very common in crypto, and given they may not be a trivial thing to code by hand-- I'm all for making this something that anyone could use with ease.  :)
All the best!

If this is for crypto, is there a reason why you are using []byte instead of big.Int? That type already provides shift operations.

If this is for crypto, is there a reason why you are using []byte instead of big.Int? That type already provides shift operations.

@randall77 good point.  I was working the,
crypto/ecdsa: hashToBytes optimization,
and was surprised to find there was no in-place function call to shift bytes in a slice.  The Big.Int Set() works well, but the TODO asked to not call Big.Int
Hope this helps explain the logic.
All the best!

@randall77 good point.  I was working the,
crypto/ecdsa: hashToBytes optimization,
and was surprised to find there was no in-place function call to shift bytes in a slice.  The Big.Int Set() works well, but the TODO asked to not call Big.Int
Hope this helps explain the logic.
All the best!

This could be reduced down to a single func Shift(data []byte, bits n)  function which can accept positive and negative values.

This could be reduced down to a single func Shift(data []byte, bits n)  function which can accept positive and negative values.

@icholy Thank you for the comment.  I really appreciate your input here and I fully understand and am sure I have exploited this type of logic before to simplify code.
The biggest question that plagues me here is this:  which direction should be positive?  I ask this as cartesian coordinates imply that the right is positive, however, when dealing with big-endian numbers the left is positive.

@icholy Thank you for the comment.  I really appreciate your input here and I fully understand and am sure I have exploited this type of logic before to simplify code.
The biggest question that plagues me here is this:  which direction should be positive?  I ask this as cartesian coordinates imply that the right is positive, however, when dealing with big-endian numbers the left is positive.

I'd assume negative would be left and positive would be right.

I'd assume negative would be left and positive would be right.

In math/bits, we chose left=positive. We should probably do the same here. https://golang.org/pkg/math/bits/#RotateLeft
(But this proposal seems unlikely to make the cut, see @mvdan 's comment.)

In math/bits, we chose left=positive. We should probably do the same here. https://golang.org/pkg/math/bits/#RotateLeft
(But this proposal seems unlikely to make the cut, see @mvdan 's comment.)

This is something that I've needed to re-implement more than once when parsing annoying binary formats. It's tricky to get right, and I think it would be a great addition to the encoding/binary package.

This is something that I've needed to re-implement more than once when parsing annoying binary formats. It's tricky to get right, and I think it would be a great addition to the encoding/binary package.

I completely understand, @icholy your frustrations of having to re-implement it each time.  I thought, "maybe others would also value this," so I greatly appreciate your agreement here.  I found this utility is missing when working on some crypto/encoding libraries.
Yes, and thank you for that valuable shout-out, @randall77.  I agree that staying consistent is very important for lowering the learning curve for new and experienced developers.

I completely understand, @icholy your frustrations of having to re-implement it each time.  I thought, "maybe others would also value this," so I greatly appreciate your agreement here.  I found this utility is missing when working on some crypto/encoding libraries.
Yes, and thank you for that valuable shout-out, @randall77.  I agree that staying consistent is very important for lowering the learning curve for new and experienced developers.

This is something that I've needed to re-implement more than once when parsing annoying (not byte aligned) binary formats. It's tricky to get right, and I think it would be a great addition to the encoding/binary package.
edit: here's an example implementation:
// ShiftLeft performs a left bit shift operation on the provided bytes.
// If the bits count is negative, a right bit shift is performed.
func ShiftLeft(data []byte, bits int) {
	n := len(data)
	if bits < 0 {
		bits = -bits
		for i := n - 1; i > 0; i-- {
			data[i] = data[i]>>bits | data[i-1]<<(8-bits)
		}
		data[0] >>= bits
	} else {
		for i := 0; i < n-1; i++ {
			data[i] = data[i]<<bits | data[i+1]>>(8-bits)
		}
		data[n-1] <<= bits
	}
}

It's large/finicky enough that I don't want to rewrite it in each project, but it's not big enough to live in its own module either.

This implementation does exactly what you suggest, though it grabs the value from the array to a variable and encourages the compiler to hold it in a register, so as to avoid pulling from memory twice.

This is something that I've needed to re-implement more than once when parsing annoying (not byte aligned) binary formats. It's tricky to get right, and I think it would be a great addition to the encoding/binary package.
edit: here's an example implementation:
// ShiftLeft performs a left bit shift operation on the provided bytes.
// If the bits count is negative, a right bit shift is performed.
func ShiftLeft(data []byte, bits int) {
	n := len(data)
	if bits < 0 {
		bits = -bits
		for i := n - 1; i > 0; i-- {
			data[i] = data[i]>>bits | data[i-1]<<(8-bits)
		}
		data[0] >>= bits
	} else {
		for i := 0; i < n-1; i++ {
			data[i] = data[i]<<bits | data[i+1]>>(8-bits)
		}
		data[n-1] <<= bits
	}
}

It's large/finicky enough that I don't want to rewrite it in each project, but it's not big enough to live in its own module either.

This implementation does exactly what you suggest, though it grabs the value from the array to a variable and encourages the compiler to hold it in a register, so as to avoid pulling from memory twice.

This function is inappropriate for package bytes, which is primarily about text, not math on uint8 values.
It is also almost certainly too special for the Go standard library.
But it looks like you have an implementation you are happy with.
I encourage publishing it as a package that others can use.

This function is inappropriate for package bytes, which is primarily about text, not math on uint8 values.
It is also almost certainly too special for the Go standard library.
But it looks like you have an implementation you are happy with.
I encourage publishing it as a package that others can use.

@rsc : Thank you for your valuable feedback, and yes it is something that I am proud of.  On this subject, and before I take any more of your valuable time, would this be something to consider in any other go package (like for example the suggested encoding/binary)?

@rsc : Thank you for your valuable feedback, and yes it is something that I am proud of.  On this subject, and before I take any more of your valuable time, would this be something to consider in any other go package (like for example the suggested encoding/binary)?

Unfortunately, the combine function is too complex to be inlined (in 1.16) https://pkg.go.dev/github.com/icholy/bitshift

Unfortunately, the combine function is too complex to be inlined (in 1.16) https://pkg.go.dev/github.com/icholy/bitshift

@icholy please excuse my ignorance, I don't follow what you mean by too complex to be in-lined fully.  What I think you are saying is that there are many lines of code.  The link to your repo is very much the same thing, but here I was hoping to add the ability to handle shifts greater than 8, even up to 8*len(src).  What do you think, crazy?

@icholy please excuse my ignorance, I don't follow what you mean by too complex to be in-lined fully.  What I think you are saying is that there are many lines of code.  The link to your repo is very much the same thing, but here I was hoping to add the ability to handle shifts greater than 8, even up to 8*len(src).  What do you think, crazy?

Each function has a complexity budget of 80 units, use go build -gcflags=-m=2 to see what the compiler things of each function

Each function has a complexity budget of 80 units, use go build -gcflags=-m=2 to see what the compiler things of each function

@pschou https://www.ibm.com/support/pages/what-does-it-mean-inline-function-and-how-does-it-affect-program

@pschou https://www.ibm.com/support/pages/what-does-it-mean-inline-function-and-how-does-it-affect-program

@pschou Ive never needed to shift more than 8 bits. I wanted to add a panic if bits was greater than 8, but that also prevents inlining.

@pschou Ive never needed to shift more than 8 bits. I wanted to add a panic if bits was greater than 8, but that also prevents inlining.

@davecheney Thank you for the heads up on this and even more the ability the budget check!  I very much appreciate and respect this limit.
@icholy Your implementation is really nice!  I very much appreciate it and I wonder if one could squeeze in an & operator, at the top to limit / mod the bits down to 0-7 along with allow alternate src and dst, aka *in and *out...

@davecheney Thank you for the heads up on this and even more the ability the budget check!  I very much appreciate and respect this limit.
@icholy Your implementation is really nice!  I very much appreciate it and I wonder if one could squeeze in an & operator, at the top to limit / mod the bits down to 0-7 along with allow alternate src and dst, aka *in and *out...

This function seems inappropriate for the standard library generally.
It is not (apparently) something people need frequently, nor is it
something where the compiler can cut it down to a single instruction
(like most things in math/bits).

This function seems inappropriate for the standard library generally.
It is not (apparently) something people need frequently, nor is it
something where the compiler can cut it down to a single instruction
(like most things in math/bits).

This function seems inappropriate for the standard library generally.
It is not (apparently) something people need frequently, nor is it
something where the compiler can cut it down to a single instruction
(like most things in math/bits).

Thank you for the reply.  This makes perfect sense and I appreciate your insight and oversight in this matter.  Feel free to close this request as desired.
All the best!

This function seems inappropriate for the standard library generally.
It is not (apparently) something people need frequently, nor is it
something where the compiler can cut it down to a single instruction
(like most things in math/bits).

Thank you for the reply.  This makes perfect sense and I appreciate your insight and oversight in this matter.  Feel free to close this request as desired.
All the best!

No change in consensus, so declined.
— rsc for the proposal review group


[NOD-641] Upgrade to github.com/pkg/errors v0.9.1 and use errors.As where needed

Rebuild after update in master

Rebuild after update in master

Rebuild after update in master

Rebuild after update in master

Rebuild after update in master


[lease] opening a new lease should let the customer limit the borrowed amount

Currently, the process of opening a new lease borrows the maximum amount as configured with the initial liability percent. There is a requirement for providing the customer the flexibility to enter the lease with less liability than the pre-configured.
For example, if the init liability is set to 60% then for a downpayment of 100 USDC we provide a loan of 150 USDC, which is 60% of the total value of 100 + 150.
On opening a new lease, the customer should be able to provide an amount to borrow called max_loan. It is an optional argument. When provided, the actual amount to borrow should be equal to the min of max_loan and calculated per the initial liability configuration. If not, the existing algorithm applies.
For example, the customer may want to take only 100 USDC turning its lease into one with a 50% liability, or LTV ratio.

Design hints: (1) supply it as an attribute of the NewLeaseForm and (2) consume it in OpenLoanReq to calculate borrow_lpn


Original desktop resolution doesn't get reset after program terminated (fullscreen window)

When making a fullscreen window, after closing said window, the desktop resolution stays the same as the window resolution. The resolution does not get reset. I know this is a duplicate of #371, but this is happening on Ubuntu 14.10 now.
According to #371, the issue was fixed by calling glfwTerminate, but this does not fix the issue and I had been doing this since the beginning.
The way I'm initializing a window is by using this
window = glfwCreateWindow(WINDOW_WIDTH, WINDOW_HEIGHT, WINDOW_TITLE, glfwGetPrimaryMonitor(), NULL);

Is this still an issue? Does 3.1 build on your machine?

I apologize. I should have closed this a long time ago. The issue has since been resolved.

Thank you for following up!