TaskQueue.php Memory Limit

Guzzle version(s) affected: 6.5.3
PHP version: 7.1.33
cURL version: 7.69.1
Description
I have a recursive function that runs an http call several times until a row is empty, but I think that the guzzle is not emptying the memory
Fatal error: Allowed memory size of 58720256 bytes exhausted (tried to allocate 20480 bytes) in vendor/guzzlehttp/promises/src/TaskQueue.php on line 24.
function in a simplified way
public function updateProduct($page = 0, $limit = 100)
    {
        try {
            $response = $this->client->request('GET', "/products?page={$page}&per_page={$limit}");
            if ($response->getStatusCode() === 200) {
                $body = json_decode($response->getBody()->getContents());
                if ($page <= ceil($body->total / $limit)) {
                    $this->updateProduct($page + 1);
                }
            }
        } catch (Exception $e) {
            echo $e->getMessage() . PHP_EOL;;
        }
  }

Try with guzzle/promises:dev-master. I just fixed a memory leak there.

It is now released as guzzle/promises: 1.4


Please add "pf2e" to module.json as it has been tested and works

Except that on the very first time applying damage to a token after placing it, there is no pop-up, but I don't know if this is only on pf2e. Even if it is, the module still works aside from this.

Hey there! I am able to re-create exactly what you mentioned. As this looks like low-hanging fruit, I'll try to get PF2E added soon. :)

This has now been addressed in the latest release, v0.1.4. I also managed to fix the bug where a new token placed on the scene wouldn't have the combat numbers displayed on the first HP change.
Enjoy!


Focus must stay on the link/button

Steps to reproduce

Run the sample app
Focus on the text field
Now tab to the "Copy Text" button

Expected result
Keyboard focus stays on "Copy Text"
Actual result
Focus moves to the next field.
Version
Happens on vue-clipboard2 git master 8a542c558c6857212d06f6fc1929384a5b5104cc and also on version 0.3.1
Further notes
If you remove the "v-clipboard:copy" attribute and retest you can see that the focus stays.
The problem also happens when using $copyText.

I have the same issue, a workaround is to reset the focus on the text field after copy.
  this.$copyText('my content').then(() => {
    this.$refs.mytextFieldInput.focus();
  });


please know I Am Loyal

https://github.com/chinothaloc/chrome-extensions/blob/master/browser-clock/chrome/css/chrome_shared.css#L14

please describe your problem


X axis line width

Hello, is it possible to change the X axis width/thickness, somewhere?
It's important for my graph to show a distinct line between positive and negative values. I've search everywhere but didn't find any information. Thanks.

Huzzah! The first alpha of Chart.js 2.0 has landed and should fix this issue. Check out the release and try it out! We've got a lot of momentum right now, so please help us test so we can launch 2.0 Gold by the end of the month. If you have implementation questions or find bugs, please create a jsfiddle and post the link here and we'll get right on it.
https://github.com/nnnick/Chart.js/releases/tag/v2.0-alpha

Please explain, how to change the x-axis and y-axis line thickness in chart.js, I think I am using the version 2.7.1 and I searched every where for this solution but I still cannot change the x, y axes border width.
It looks like only the chart data/series/line/bar border thickness are changeable.

yAxes: [{                gridLines: {        zeroLineWidth:2     }            }], xAxes: [{     gridLines: {        zeroLineWidth:2     } }]

I couldn't find this option in chartjs v3.9. Is there any alternative for it?

Have a look to migration doc: https://www.chartjs.org/docs/3.9.1/getting-started/v3-migration.html#specific-changes
scales.[x/y]Axes.zeroLine options of axes were removed. Use scriptable scale options instead.*
grid: {
  lineWidth: (ctx) => ....
}

@stockiNail Thanks.


Recent "An error has occurred. Please try again later" errors on Chrome

For the last ~month or so I've noticed YouTube videos would stop working if I seeked position too aggressively (eg, if I tap around on the playback bar to seek around to a different part in the video).
I'm running—
h264ify 1.0.4
Chrome 52.0.2739.2 dev (64-bit)
Disabling h264ify fixes the problem entirely... But it's something I'm reluctant to do since I really like the extension!

Does this also happen in the stable version of Chrome?

Problem also happening in beta channel (Version 52.0.2743.33 beta (64-bit)). Looks to be something in Chrome 52. Works in stable 51 though.

What OS and video reproduces this? Version 52.0.2743.33 beta (64-bit) on OSX 10.11.5 works ok for me.

Also having a problem. Every video that isn't a livestream is giving me problems. Disabling h264ify on 53.0.2763.0 dev (64-bit) solves it for me (OS X).
It should be noted that for me, these issues only began occuring after I cleared my browsing data (cache and cookies).

I'm getting this for about a week now. Some videos work, but looks like newer videos do not. Sometimes I've got the feeling that it's about every 4 minutes, but some videos throw more of them.
Toshiba Chromebook 2
Version 53.0.2785.55 beta (64-bit)
Plattform 8530.49.0 (Official Build) beta-channel swanky
Firmware Google_Swanky.5216.238.5

Does this also happen in the stable version of chrome (version 52)?


perf: read modified file in buffer format

Description
content is not used if the modified file is empty, we can transform to string after.
Additional context

What is the purpose of this pull request?

[ ] Bug fix
[ ] New Feature
[ ] Documentation update
[x] Other

Before submitting the PR, please make sure you do the following

[x] Read the Contributing Guidelines, especially the Pull Request Guidelines.
[x] Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
[x] Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
[x] Update the corresponding documentation if needed.
[x] Ideally, include relevant tests that fail without this PR but pass with it.

If the content is an empty buffer, then I guess the conversion to '' won't take time.
If the content has a non-empty buffer, then I guess fs.readFile(, 'utf8') is faster as Node 20.5.0+ has a fast path (https://github.com/nodejs/node/pull/48658).

So I think the current implementation is faster in both cases.

If the content is an empty buffer, then I guess the conversion to '' won't take time.
If the content has a non-empty buffer, then I guess fs.readFile(, 'utf8') is faster as Node 20.5.0+ has a fast path (fs: add a fast-path for readFileSync utf-8 nodejs/node#48658).

So I think the current implementation is faster.

I see, i will close this pr


More example

Could you provide more examples on model building? For example, what are the codes you guys used to provide result in the paper? The current one in the ipynb is too simple and in general the codes are not readable (because they are lacking comments).
Thanks a lot!

The existing example shows the entire train + predict workflow, it doesn't need to be any more complicated than that!
To reproduce the paper results, you would add the full set of features from nel.features to featurisation by extending the featurisation pipeline:
feature_extraction = [
    EntityProbability('wikipedia'),
    NameProbability('wikipedia'),
    ...
]


IndexDefinition: renamed async arg

What are we doing here?

@ashtul Cancelling the async/async_indexing arg until FT.CREATE supports ASYNC.


Fixed Issue: 69 | Get In Touch Section Has added to the Footer!!!

Description:

Get in touch section (forms) in footer have been added.
icons of social media has ben added
All the element are from material ui

Fixes #(69):
By Project admin(Sir)
1.update the social media link ,currently mine added.
2.update the code for handleSend() , all values of forms will be there.
3.I have used simple html validation of form, because i dont know much about it.
**Sir, i also want to contribute to Header section ... if you let me , just give me logo/icon of website sir **
Screenshots:

@ASHISH-GITHUB2495 can you send me the screenshots for mobile version and @kunaljain0212 and @Sanyam2000-dot can you both review the codes.

You have used the withStyles hoc instead use the the already used makeStyles hook. And you can use the Formik library for handling forms.

Sir, it's only 1-2 moths i have learned about MERN technology... Formik library, material Ui , withStyke... are much harder for me for now... and I am preparing for my wipro internship exam on 3rd April.. after this i will give my full time to this open source.

This event is also about to get familiar with different tools and technology.
We are here to help and teach you.
Ask any doubt in discord group
@ASHISH-GITHUB2495 No problem.
Prepare for the exam.
Best of Luck
We are waiting for you and expecting from to contribute as much as possible.

This event is also about to get familiar with different tools and technology.
We are here to help and teach you.
Ask any doubt in discord group
@ASHISH-GITHUB2495 No problem.
Prepare for the exam.
Best of Luck
We are waiting for you and expecting from to contribute as much as possible.

Thank you sir.. trying to get back as soon as possible.

Sir, can you please merge this pull request... i have not any sucessfull merge of my pull request. Later i will create one more issue for  you above task...for adding more feature...


CSharp: Correct exception serialization

See https://github.com/NJsonSchema/NJsonSchema/blob/master/src/NJsonSchema/JsonExceptionConverter.cs

Also support discriminator

Todo: New package with web api filter.


ENOMEM checks: consistently check wl_array_add return

Not quite perfect, but arguably better than nothing.

Sorry, doesn't build, will force push something in a min.

Thanks!


Column does not exist when inheriting non-abstract models

Codecov Report

Merging #26 (808873c) into master (5060453) will decrease coverage by 1.08%.
The diff coverage is 95.45%.

@@             Coverage Diff             @@
##            master      #26      +/-   ##
===========================================
- Coverage   100.00%   98.91%   -1.09%
===========================================
  Files            3        3
  Lines           76       92      +16
===========================================
+ Hits            76       91      +15
- Misses           0        1       +1

Impacted Files
Coverage Δ

django_hashids/field.py
98.86% <95.45%> (-1.14%)
:arrow_down:

Continue to review full report at Codecov.

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


add 793 and 794 solution

475808650131120
8.146681749623

Or maybe you can give me the auth to create a pull request?

Thanks, added.
You don't need any permissions to create a pull request on Github.


fix: Use root path when building full destination

What is the purpose of this pull request?

[X] Bug fix
[ ] New Feature
[ ] Documentation
[ ] Other

Description
Previously this plugin would not do anything when you put your project's site files under a folder. See the root shared option. With this change, the user now can have source files in a folder that is not at the project root.
This may also fix FatehAK/vite-plugin-image-optimizer#30, since I am also using Vite 5.x.
Checks

[X] PR adheres to the code style of this project
[X] Related issues linked using fixes #number
[X] Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
[ ] Lint and build have passed locally by running pnpm lint && pnpm build
[X] Code changes have been verified in local
[X] Documentation added/updated if necessary

Additional Context

I think this is a small but very useful change. Would be cool if you could merge this, @FatehAK! I can confirm that this works for my project.

Sure, @jonasgeiler! I'll make a release with this shortly. It's been a hectic few months at work, and I apologize for not getting to this sooner.

@FatehAK wrote:
Sure, (at)jonasgeiler! I'll make a release with this shortly. It's been a hectic few months at work, and I apologize for not getting to this sooner.

Sure! No worries.

Thanks for the support @fidian and @jonasgeiler this change is now available in v1.1.8.

Thanks for the support @fidian and @jonasgeiler this change is now available in v1.1.8.

Thank you! Fork is deleted now :)

@FatehAK wrote:
Thanks for the support (at)fidian and (at)jonasgeiler this change is now available in v1.1.8.

Thank you! Fork is deleted now :)


CAMEL-10792: Allow Registry to bind beans.

This PR adds a fallback writeable bean registry where you can bind new beans to the registry.
See CAMEL-10792 for more details.

Also removed the old OSGi stuff in camel-cdi which has been deprecated in 2.x.
Future work is to make camel-test and its createRegistry api to use this writeable registry out of the box that are not tied to JndiContext which it was on 2.x.


Summary table

add an optional cost param to plot_returns.  if present, total_returns less cost is plotted.

@jzhang18 mind taking a quick look?

@vikram-narayan Sure. I will read it asap.

@vikram-narayan It looks good to me! Thanks!

Gotcha - @gusgordon should I add that to other plots, and the main perf attrib tearsheet? In a different PR @twiecki said

As such, we don't need to push that logic to perf_attrib but can just slice the output data as we need it. As such, we should hold off on this PR and wait for the tear-sheet to be pushed where we can add this functionality.

@vikram-narayan Right, so we just run the perf_attrib function as normal, then whatever it outputs we slice on the live_start_date to break the data out.
Definitely want it broken out in the summary table (All, In-sample, Out-of-sample), but I'm not sure about the plots. Might be nice to have some sort of marker for the live start date, like a vertical line? I would say whatever you guys think is useful and looks ok.

would it be good on PRs that involve new (or changed) charts and tables in pyfolio (and alphalens) to include screenshots of them in the PR like we do for UI work?

Yes it would :)


Receiver cable orientation

Hello, I have a question about the cable orientation in the final build.
The pictures in the build show the original 2 channel + B receiver, however it's unclear where the cables are supposed to be connected in the final build.
I can get the car running in Jupyter Lab, but when running the Basic Motion file, steering seems to control the car's throttle, and vice versa for throttle controlling the steering. In manual mode, the car controls as you would expect, this is only a problem for "Nvidia" mode.
Do you have any photos of the updated final build that would make the cable orientation more obvious? I feel like I must simply have wires in the wrong place or something.
Thanks a bunch!

Hello ctye85,
Given that you can correctly operate the vehicle in Manual mode, it sounds like you just need to flip the cables between your PCA9685 board and MUX board.
This shows the connection, and please note the channel 0 of the PCA9685 goes to S1 of MUX board, and channel1 of the PCA9685 goes to S2 of MUX board.
https://user-images.githubusercontent.com/25759564/62125310-a1684000-b281-11e9-99de-f458e6ca6b06.png

Thanks for clarifying. I actually tried this shortly after posting my original message and it worked like a charm. Cheers!

Thanks for your advice. Strangely enough, I had the cables in the orientation in your picture, but when I switched them to what's in my picture right now it actually works correctly! Even though it's reversed from what the instructions say.
Very curious...I wonder why that's the case. Anyway, your advice for flipping the cables still worked!

Hello again, I have a quick question about overall cable orientation.
It seems several things in my setup only work when they are done in reverse of what the GitHub page says.
For example, the above-mentioned channel 0 going to S2 and channel 1 going to S1 on the MUX. This is strange but it works, so I can't complain too much I guess.
Additionally though, Ch3 on the RC receiver goes to SEL on the MUX as usual. However, it works correctly if I connect CH2 on the RC receiver to M1 on the MUX, and CH1 to M2 on the MUX. Can you provide any insight as to why this may be the case? If it works then I'll keep it that way of course, I am just very confused about why that's the case.
Could it possibly be a hardware update issue, like since you made the build the MUX from the manufacturer has been slightly changed or something?
Thanks for any additional info you can provide!


bearer token help

I had done this in the past but currently have issues. Could anybody share a US bearer token or a detailed guide? it's all I need.

Download Charles proxy on your laptop and get an ssl certificate downloaded on to your device and verify it. Then hop onto the HQ app and intercept the packets going from your phone to HQ. The bearer token and userID should be somewhere in there.

Thank you. I had actually done it successfully before but on my last attempt I struggled to find it in my sniffed traffic. Could anybody share one? I have a uk one but it's not ideal

here is a US one:
bearer=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjkxOTM4NzYsInVzZXJuYW1lIjoicG90YXRvMjUyIiwiYXZhdGFyVXJsIjoiczM6Ly9oeXBlc3BhY2UtcXVpei9kZWZhdWx0X2F2YXRhcnMvVW50aXRsZWQtMV8wMDAzX3JlZC5wbmciLCJ0b2tlbiI6Ik02VURIaCIsInJvbGVzIjpbXSwiY2xpZW50IjoiIiwiZ3Vlc3RJZCI6bnVsbCwidiI6MSwiaWF0IjoxNTIzNDc1MjUyLCJleHAiOjE1MzEyNTEyNTIsImlzcyI6Imh5cGVxdWl6LzEifQ.xAfoFWg_LQy8xSL_meaOHm5YjWFLdh8yZusPVYKX_S4


How to make zoom center as the focalPoint?

At this moment, When I zoom in the image, it just zooms in, and the zoom center is the center of the image.Can we make center of our two fingers(see focalPoint) as the zoom center.
Just as Instagrm, when we zoom in the image only(DO NOT scale), the overlay image will also change it's position to make out finger cenrer of the screen.

No one answers here! No support anywhere.
Incredible!


restart cortile may take random few seconds

with two monitors ,I replace zentile with cortile, its a good choice.
tiling after drag window between two monitors  may not work, need to place window back and drag again which is mentioned as another issue.I use systemd service to auto restart , but restart may take few seconds, same as killall cortile and run cortile.
I rebuild cortile ,get rid of socket. but it did not work. sometimes tiling windows as soon as cortile run, but not always.
`[Unit]
Description=autotile window manager
Wants=cortile.timer
[Service]
Restart=always
RestartSec=0
RemainAfterExit=yes
ExecStart=/usr/local/bin/cortile
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=default.target`

Please try the latest release and let me know if the problem still occurs.

good work! I am surprised to get notification about new realease by systray. check the realease history I'm sure cortile is under your active development.thanks for your effort.
I try the 2.3.1 version,it starts in 1-2 secs,and can work with quicktile,drag window quickly fit in.now it is very powerful tool in many environment.though I embrace bspwm lately to feel full power of tile window. But back in xfce, I will enjoy cortile.
Last time I comment func (tr *Tracker) handleMaximizedClient(c *store.Client) ... to disable auto fullscreen mode, usually I just to enlarge window temporarily, after that I foundd bspwm have a monocle mode .
my service file is not accurate, put timer in service is not necessary ,and did not need a timer to delay launch.


Dietpi/RPi Kernel not matching udev rule

OS: dietpi v8.12 (which is a debian distro, kernal v 5.15.76), 64bit version on RPi4.
The udev rule for the SD drive is set to sd[a-z]*[0-9], but on this system, the USB drive is detected as sda and therefore doesn't match and the USB mounting doesn't happen.
I haven't gone back to check, but I am 99% sure this was working with the 32bit version of the OS.
Changing the match to sd* resolved my problem.  Note that changing it to sd[a-z]*[0-9]* did not solve the problem.

@sistemicorp if you need to ignore the numeric at the end, the regex modifer for zero or more is a question mark. E.g
Something like:
sd[a-z]*[0-9]?

The above is untested, but if this works for you you could manual patch.
If it doesn't break my use case I could add to my fork https://github.com/clach04/automount-usb/blob/mine/99-local.rules.usb-mount which has some other bug fixes.


Undo / Redo shortcuts

It would be nice to be able to undo / redo modifications.
I tried to use cmd+z to undo my last modification but it closed the app.
I'm using an azerty keyboard so there might be an issue there (cmd+w == cmd+z).

There is undo and redo support, they're mapped to ctrl/cmd+z and shift+ctrl/cmd+z, independent of your keyboard. Could it be your keyboard is azerty but your keyboard settings are qwerty?

Oh right, i didn't saw it in the Edit menu.
This is probably a shortcut problem then.
I'm using it on Mac OS X 10.10.5 and my keyboard is azerty and the settings are set to azerty (french).
Shortcut results (Edit menu) :
cmd+Z -> close
shift+cmd+Z -> nothing
cmd+X -> cut
cmd+C -> copy
cmd+V -> paste
cmd+A -> close
Other :
cmd+Q -> close
cmd+R -> refresh ?
cmd+U -> undo
shift+cmd+U -> redo
cmd+D -> delete line

Could be related to #5. keyboard shortcuts, especially on OSX, turned out to be a PITA.
If you switch your keyboard layout to qwerty, does it behave as expected?

If i switch to qwerty, undo / redo works with cmd+Z (cmd+W on my keyboard) and cmd+W (cmd+Z on my keyboard) close the app.

There are some other problems with the undo/redo.
Shortcut action and menu item action seems incompatible :

Write "something"
cmd+U  (undo)
Edit / Redo
=> Nothing is displayed

There is a problem with undo/redo in the edit menu :

write "something"
Edit / Undo
Move the cursor
Edit / Redo
=> "something" is written at the new cursor's location

I've renamed the issue, it seems that the shortcuts are not correctly transposed for alternative keyboard layouts. To be honest I probably won't look into this any further than seeing if Electron has a solution for this, as I feel this should be handled on that level, and not in FromScratch.

If you have any ways of getting an ""Azerty-cmd qwerty"" keyboard layout I would be really interested... I would love to be able to switch keyboards while maintaining the shortcuts on the same keys: when you hit a shortcut, your fingers instinctively go somewhere, and I don't want that somewhere to be changed everytime I switch keyboards.

With FromScratch 1.2.0 this should be fixed, as it uses a version of Electron that should have fixes for this. Can someone verify this?

No it doesnt work for me. I'm on electron 1.4.10 and fromscratch 1.2.0.
Do you need anything to help debuging ?
And nice deduction btw ;)

Caused by https://github.com/electron/electron/issues/8116, and applies to keystrokes in combination with ctrl. Should be fixed in Chrome 56. Current build of electron uses chrome 53, so this will be a while away :(


RESOLVE: fix specifying precedence between imported operators

fix https://github.com/aya-prover/aya-dev/issues/450

bors d=@imkiva

d96a58dec01a0b67a3544d30f1212b66eb92045f


AutoCompleteBox hints dropdownbox doesn't "follow" the TextBox movement.

Describe the bug
When using async populator, the hints popup doesn't follow the search field.
To Reproduce
Steps to reproduce the behavior:
Run the Avalonia Control Catalog, type some text in the async control and move the window, the popup will show at the old position.
Expected behavior
I think the popup should follow the TextBox.
Screenshots

Desktop (please complete the following information):

OS: Windows 10
Version: 0.10.3

Duplicate of https://github.com/AvaloniaUI/Avalonia/issues/4225 https://github.com/AvaloniaUI/Avalonia/issues/4630

If this issue (or any of its duplicates) is up for grabs, I'd like to take this on. A good reason for a dive into positioning and placement handling.

@simonhaines help is always welcomed, but not sure if this issue is easy for starters. As it seems Windows popups implementation specific (works on other OSs from what I remember). Basically popup is hosted in child window which position is not following parent. Though I haven't dive too deep and probably it's not that hard to fix.

For instance, if OverlayPopups are enabled (which means all popups will be hosted in the same parent window, just in top layer), then this issue is not reproducible on window move.

Agreed, an immediate workaround is to use overlay popups. I am working on a fix that subscribes to WindowPositionChanged events in this conditional branch and routes them to the HandlePositionChange method, and this seems to work, but I need to check the consequences of this change more thoroughly to ensure it doesn't break existing behaviour.

This issue is still being worked on. Fixing the overlay positioning on window resize/move is straightforward. Ensuring the correct behaviour for second- and third-level submenus, not so much.


Add documentation for CLI mode

Fixes #3703
Add documentation for CLI mode in OpenHands.

New Documentation: Add docs/modules/usage/how-to/cli-mode.md to document CLI mode.

Include instructions on starting an interactive OpenHands session via the command line.
Explain the difference between CLI mode and headless mode.
Provide examples of CLI commands and expected outputs.

Update Existing Documentation: Modify docs/modules/usage/how-to/headless-mode.md.

Clarify the difference between headless mode and CLI mode.
Add a reference to the new CLI mode documentation.

@defineprogramming thanks for the contribution!
It seems there are still a good amount of CLI-related docs in the headless file (e.g. on how to run with docker). Would you mind moving those to the cli file?
(And sorry if my merge messed up any of your work!)


Bamboo integration

Hi,
Is there any documentation how to integration the plugin with bamboo?
Regards,
Oleg

It should be like any other plugin.
We did not test it with bamboo but it probably depends on the build system (maven/ant/sonar-scanner) you are using inside bamboo.
You have to deploy the plugin to bamboo server and then provide the relevant properties, please read the documentation for the build system you are using.

I was able to integrate sonar, bitbucket and bamboo via https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket


Error in class DocREModel.forword() function

I make pretrain_distant = 0, and i want a file named "pretrain_state_dict.pth".
model2.py demo:
if labels is not None:
labels = [torch.tensor(label) for label in labels]
labels = torch.cat(labels, dim=0).to(self.args.device)
        for logits, loss_weight, m_tag in zip(logits_list, loss_weights_list, m_tags_list):

TypeError:
for logits, loss_weight, m_tag in zip(logits_list, loss_weights_list, m_tags_list):
UnboundLocalError: local variable 'logits_list' referenced before assignment

I have corrected this in the new version, marking this as closed. Let me know if there are further issues.


Json encoding parameters are being reordered - causing server issues. Custom Body Idea...

Hi - I am finding that lots of servers are respecting the order parameters that are added with json encoding.  This means that alamofire is breaking and causing issues that are difficult and time consuming to debug ( especially for us newbies to AF)
Suggest that we have a method of sending our own "pre-encoded" body would be the ideal way to resolve this. ( and letting the server owner which in this case is a big enterprise) to sort out their api
example:
> Alamofire.request(endpoint, method: .post, parameters: myPre-encodedJsonBody, encoding: RawBody, headers: headers)
Not sure if this is possible already - but its not immediately clear how to do it.

I'm not sure I understand what you want Alamofire to do here, @grantkemp. Swift has no order preserving dictionary type, and even if it did, JSONSerialization wouldn't understand it, so there's no way for Alamofire to preserve ordering in the parameters passed in. In that case, I would suggest creating your URLRequest ahead of time or creating your own request() function that operates on whatever order-preserving collection you come up with.

@grantkemp Anything more to add here? I'm still not sure what you're asking for Alamofire to provide here, as custom body encodings can already be done in a variety of ways.

@grantkemp If you have something more concrete to suggest or, better yet, a PR, feel free to comment. Otherwise I'm closing out this issue for now.

I think this could deserve a revisit. A few but very popular public APIs, like Wunderlist, expect parameters in a certain order or won't recognize them. Alamo (or Swift) seems to be "serializing" parameters in alphabetical order by the key.
If its not possible to easily preserve parameters order, I think at least a paragraph in parameters documentation could help others not to waste time trying to find what's going wrong.
I'm not a Swift developer (I use mostly Java and use Swift for few small things) but if you could briefly tell me where to find the code that encodes JSON I could give a fix a try or fix documentation whatever fits best.

@bfontana The issues I cited earlier still exist. There is no way to represent an ordered dictionary in Swift, natively, and even if there was, JSONSerialization wouldn't understand it. Things may or may not be different using JSONEncoder, but I wouldn't count on it (though investigation there would be appreciated). Here's the code that encodes parameters into JSON.

Ok. Thanks. I will look into it.

El 29 sep. 2017, a las 14:17, Jon Shier<EMAIL_ADDRESS>escribió:
@bfontana https://github.com/bfontana The issues I cited earlier still exist. There is no way to represent an ordered dictionary in Swift, natively, and even if there was, JSONSerialization wouldn't understand it. Things may or may not be different using JSONEncoder, but I wouldn't count on it (though investigation there would be appreciated). Here's the code https://github.com/Alamofire/Alamofire/blob/master/Source/ParameterEncoding.swift#L270 that encodes parameters into JSON.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/Alamofire/Alamofire/issues/1702#issuecomment-333185116, or mute the thread https://github.com/notifications/unsubscribe-auth/ALFKr2z2mr6iZt4S3TBKOh7-yYawBzekks5snSYTgaJpZM4KYe0T.

But the question still remains, is it possible to use AF with an API that wants parameters in a certain order? Obviously not with dictionaries, but is there some other way? My situation is that the API expects a signature that is based on the parameter string, so I need to know what it will look like before hand.

@GreatApe RequestAdapters sound like the perfect solution there. Implementing one would allow you to inspect requests before they're made and add whatever signature is necessary based on the parameter string.

Thank you for your reply @jshier, that sounds promising. Luckily the documentation for the API I was using was outdated, it is now expected that I send the parameters in the URL even for POSTs so it’s very simple and I didn’t even need to resort to RequestAdapters!


HapticPulse strength has a different intensity curve on Oculus SDK vs OpenVR

Environment

Source: Github
Version of VRTK: 3.2.1
Version of Unity3D: 2017.1.0.f3
Hardware used: Oculus
SDK used: OpenVR & Oculus SDK

Steps to reproduce
Use VRTK_SDK_Bridge.HapticPulse with a low strength like 0.2 with OpenVR. Switch to Oculus SDK and compare the physical strength of the haptic Feedback.
Expected behavior
For the same strength value the haptic feedack intensity should feel the same on both sdks.
Current behavior
The Oculus SDK feels a lot less intense for lower strength values. However for the max value of 1 it has the same intensity.
Possible fix
I did a workaround by using Mathf.Sqrt to intensify the low values and decrease the higher values.
For my quick Tests it worked out pretty well and makes the Oculus SDK strength feel a lot more like the OpenVR one.
It may not be exact however. One would have to either measure the physical intensity or take a look at the OpenVR code how they map their values to the rift touch controlers the get the proper curve.

They use different haptic methods and different motor setups.
It's probably not too realistic to expect the same value to yield the same result.
You even notice this on Oculus Touch between Oculus SDK and SteamVR with Oculus.

"You even notice this on Oculus Touch between Oculus SDK and SteamVR with Oculus."
Thats exactly the problem I have. Maybe I did not describe it well enough.
My Problem is not different intensities on different controlers but different intensities on the same (touch) controler with different SDKs.
I started to design the haptic feedback on SteamVR, but after switching to Oculus SDK its so weak you cant even feel it in some situations.
While developing a "multistore" game it is essential to get the same feeling on each SDK. So I could check for the active SDK and implement different haptics for each SDK but I think thats exactly what the abstraction layer (VRTK) is good for.
Thanks for this awesome framework btw! For 99% of the code the SDK switch did just work and thats great. The haptic feedback was the only real problem I encountered

The haptics on SteamVR for Oculus are a hack by valve in OpenVR. I recommend you raise a bug with the OpenVR github project as it's really their problem to fix.
If we put any fixes in VRTK and then they do fix OpenVR then that just breaks VRTK again (because it would then be too strong).

Ok I see. I'll take a look how they handle it. Thanks for your replies


Update UUIDs of Services

Process for updating the UUIDs of Services

[x] Thorsten to check categories of OperationServers and OperationClients in ServiceList
[x] Iswaryaa to review categories of OperationServers and OperationClients in ServiceList
[ ] Katharina to add new UUIDs based on category of operation (but not old UUID) in ServiceList
[ ] Iswaryaa to review new UUIDs in ServiceList
[ ] Katharina to CTRL+h for old UUIDs and replace them by new UUIDs in ForwardingList, CONFIGfile and OAS.
[ ] Katharina to step through ForwardingList, CONFIGfile and OAS and compare every UUID against new one in ServiceList
[ ] Iswaryaa to review new UUIDs in ForwardingList, CONFIGfile and OAS
If no errors found
[ ] Iswaryaa to delete old UUIDs in ServiceList
[ ] Iswaryaa to merge the feature branch into develop
[ ] Iswaryaa to close this issue and delete the feature branch on GitHub

OamLog+services.yaml file looks fine for categories of services

Talked to Thorsten about the fc uuids - those shall not be changed with this pull request.
Merged changes from develop branch
@IswaryaaS: you can continue with your part


Synthesized A4 not working on hardware

W2A4 and W4A4 synthesized from the given source files, work perfect in csim but on hardware gives random output (could this be a timing issue?) whereas the given bitstream works perfect on hardware. I synthesized using Vivado 2019.2 and also tried with 2017.4 (as it seems from the given .bit and .tcl files, that they are synthesized using 2017.4) but still no luck. Also when checking the 2017.4's synthesized bit file with the given bit file using diff, it says that they are different (whereas the .tcls are the same). So it seems that the given W2A4 and W4A4 bit files, are maybe not synthesized using the given sources.
Thanks,

The problem was solved when setting the simd_factor to 4 while exporting the weights for A4. The provided r_model_fw_bw.hpp files have been exported with simd_factor of 2 but the provided bitstreams are not synthesized with that.


Docs: add sidebar alphabetization toggle

Based on #1128 from @mminute with the following changes:

Move toggle to the header (where have have all the other toggles)
Save sort preference in localStorage (so it stays consistent between refreshes)
Don't exclude Getting Started (more scalable but does mean we don't only sort components / hooks)

Test Plan
Test on netlify:

Toggle the sort preference in the header
Refresh the site + see that sort preference stays the same

@mminute could you take a look and see if this also meets your use case?


search

Description of the new feature / enhancement
alt - tab and search i hope that add
Scenario when this would be used?
search
Supporting information
.

Could you please specify what you want exactly?


VSTest@2: Support for VS2019

Environment

Server - Azure Pipelines or TFS on-premises?
-> AzurePipelines

Agent - Hosted or Private:
-> Hosted: "Hosted Windows 2019 with VS2019"

Issue Description
I am updating a build definition to run on the hosted machine (posted above) and compile and run tests using VS2019. The task VSTest@2 won't let me choose "Visual Studio 2019" as test platform. When i choose "Latest" instead the task fails with error message Visual Studio 2015 is not found. Try again with a version that exists on your build agent machine. (I'll post full debug logs of failing vstest@2 task below)
9.txt

@ShreyasRmsft I remember you doing a fix for the same. do u know if fix is checked in?

@JohannesDrexler we have added VS2019 support and the deployment with the update has started. It might take a couple of more days to reach all accounts. Meanwhile please use the vstest platform tool installer task to acquire the latest test platform.
This is a better and recommend way to stay up to date with the testplatform as servicing is much easier. You will receive fixes immediately when we publish the changes and will not have to wait for the next VS release.

What a timing! Now i can select "VS2019" in VSTest@2 so the deployment already reached my account. I'll close this then. Thanks :)

Haha. Do consider using vstest platform tool installer task
That is the what we recommend going forward.

i updated some builds to use the platform-installer for tests now


Added domain kkkuk.edu.pk for Khushal Khan Khattak University Karak

@ahsanullah-8bit Thank you for your patience while waiting for a review and processing your request. Pull request merged. Please start applying for JetBrains educational subscription at https://www.jetbrains.com/shop/eform/students in an hour, to allow the changes to propagate through JetBrains systems.

Oh, Thanks @philipto
That was quicker than I thought. I'm sorry for not applying in an hour, I was asleep. I'll do it now.


⚠ Bofrost.at has degraded performance

In 6436a40, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 1989 ms

Resolved: Bofrost.at performance has improved in db3cce3 after 9 minutes.


Move To Test Aspect Encoding

Moves data source aspect encoding to a more traditional test aspect encoding. Relative to #40 we lose the ability to eliminate environmental requirements with data source aspects the implementation is significantly simpler. I think this is the way to go though open to feedback from others.

I realized that we never use the LowerR type parameter so I think we can remove it. Also, I think the ideal API is that you apply the data source aspects to the ZQuery. That way you can define your data source and constructors once and then modify the data source execution later.


BadRequestKeyError: 400 Bad Request: KeyError: 'data'

While posting the data as per your readme, I get the following error
BadRequestKeyError: 400 Bad Request: KeyError: 'data'
Let me know what i am doing wrong.

It seems that you post wrong data format.
On Sun, 30 Sep 2018 at 8:27 PM, Kronnork<EMAIL_ADDRESS>wrote:

While posting the data as per your readme, I get the following error
BadRequestKeyError: 400 Bad Request: KeyError: 'data'
Let me know what i am doing wrong.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/adamchinkc/blockchain_database/issues/3, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AfSchVc-BvbjPiLrNqHN-87ybT06OF73ks5ugLi1gaJpZM4XA8-r
.


Fix tag order when selecting existing tags

refs #5773

overrides ember-cli-selectize's _addSelection method to insert objects at the correct index instead of always adding at the end

:disappointed: as well as the build failure, this is still not quite getting it right. Here's how to reproduce:
First, using the tag manager, create 3 new tags in order, with an obvious order to them, e.g. tag1, tag2, tag3. It's important to use the tag manager and ensure that they are created in order.
Next, create a new post. Using whatever method comes naturally to you, add the 3 tags to the post in their correct order. Press save. Everything is fine.
Next, create another new post. This time, use the 'type & press enter' method to add the tags in the opposite order. Press save. Again, everything is fine.
Finally, create another new post. This time, use the 'start typing & click on the tag' method to add the tags in the opposite order. Press save. The tags flip back to their original order!!

FYI this is an edge case not massively important for the release

That's weird, I don't think the method actually makes any difference - I'm seeing the same switch around happening both with type-and-click and type-and-enter. When I see it happening the request payload has the tags in the correct order (3,2,1) but the server is responding with a different order (1,2,3) causing the input re-shuffle.

Ah you're correct.Tested this out in conjunction with the tag order changes, and it looks good :+1:


Add Reusable ECR Github Workflow

A reusable Github Workflow is added to handle the build of docker images
for GOV.UK apps.
Ref:

trello card
github docs

team decided to use starter workflow to add a "better" ability to customize the workflow.


Not opening editor (idea) on macos

I wanted to use it to open intellij idea on my macos using this tool, hovewer it doesnt work. I also directly put the executable path into the CODE_EDITOR in .env.local. Still doesnt do anything. No errors in the console as well.

I wanted to use it to open intellij idea on my macos using this tool, hovewer it doesnt work. I also directly put the executable path into the CODE_EDITOR in .env.local. Still doesnt do anything. No errors in the console as well.

Just can't open IDEA? Is there is a tip in your browser's console as following?:

我无法打开vscode，chrome控制台没有任何报错，vscode终端的报错如下。我按照提示进行了操作但是仍然无法正常使用

我无法打开vscode，chrome控制台没有任何报错，vscode终端的报错如下。我按照提示进行了操作但是仍然无法正常使用

你的问题可以通过 指定可执行路径 来解决试试

已解决，感谢


Add a setting to allow for custom tailwind source repo

#128

Sorry @oliverandrich  the commit history is messed up because of me, I though you were going to squash and merge 😅

This is fixable with an interactive rebase

Oh, I haven't noticed it and continued with a release. Well, may be the first day feeling better after Covid-19 is not the best day to fiddle around with git. :) But I can deal with a little mess.

Well, may be the first day feeling better after Covid-19 is not the best day to fiddle around with git.

Sorry to hear that :( I hope you recover quickly.

But I can deal with a little mess.
Ok then


Proposed changes in Python services samples

Windows 10
Python 3.6.1
Latest SDK
\service\samples\iothub_devicemethod_sample.py
\service\samples\iothub_devicetwin_sample.py
\service\samples\iothub_messaging_sample.py
\service\samples\iothub_registrymanager_sample.py
Description of the issue:
The services samples don't provide you with the full usage parameters. -d Device ID is missing and are not consistent over the files mentioned above.
def usage():     print ( "Usage: iothub_devicemethod_sample.py -c <connectionstring> " )     ....
and isn't consistent in iothub_registrymanager_sample.py
print ( "Usage: iothub_registrymanager_sample.py -c <connection_string> -d <device_id>" )
Propose to change this to
def usage():     print ( "Usage: iothub_devicemethod_sample.py -c <connectionstring> -d <deviceid>" ) ...

@FabianKLS
Thanks for the correction, we will update the samples in the next release.
Best Regards,
Zoltan

The samples have been update in the release:
https://github.com/Azure/azure-iot-sdk-python/releases/tag/release_2017_09_26
Best Regards,
Zoltan


List table: add link to dashboard

Summary
Adds a link from the WordPress list table screen to the Stories dashboard
Relevant Technical Choices
Chose admin_notices hook as it seemed like thee best fit.
Did not hide the page title because a) it cannot be done without JS (or CSS) and b) would be poor for accessibility.
Other than on the screenshot, this uses default WordPress styling to maintain visual consistency.
To-do

[ ] Add referrer check?

User-facing changes

Testing Instructions

Visit Stories -> All Stories
Verify that there's a link to the dashboard

See #1488
See #1832

Do we need unit tests for this?

@spacedmonkey A unit test seems a little bit pointless as it relies heavily on WP. An E2E test might be more suitable.

Agreed with the e2e tests. Same with the dashboard side. A lot would be just testing the framework rather than the flow as a whole.


Creating many wallets (wallet creation flow), till the end of finish screen

Video regression:
https://user-images.githubusercontent.com/54288612/182474471-c7bb5261-5c2d-421e-b78c-df2bd0180c2c.mov
Steps to reproduce

Check your wallets
Start to create a new Wallet type, not the Node
check after all steps, how many wallets do u have on the login screen?

right now on devnet 225 is working as expected, will fix many wallets list and will add a scroll

first part of this issue was fixed and merged, last one related to syles that will be merged soon


refactor(pushsync): change FailedCacheHit metric from CounterVec to Counter

During upgrade, we will see a lot of failures initially which may cause this metric to go out of hand.


add toc to content that previously had it

TOC is available in Netlify CMS as a shortcode.
Previously content had a parameter toc: true front matter. Now the TOC has to be added in Netlify CMS.

[ ] add TOC to content that previously had toc:true
[ ] remove toc:true from the contents front-matter

@andreasbalevik Why do we need to do this change? Doesn't Netlify support editing frontmatter parameters?
Using a parameter is simpler, shorter and doesn't "pollute" the markdown with shortcode-syntax.

Can add checkbox in Netlify to enable ToC or not.


Why extra dense layer for CDSSM

I'm a bit confused of the CDSSM model structure. The second last layer is the dot product with normalization being True, so i suppose the score is between [0,1]. Can't we just use this score for ranking, why there is one more dense layer with linear activation after dot product?
I notice that, if i use the current model with dense layer as last layer, when i do model.predict, the order is 0, 1, 2. However if I use "model.backend.layers[-2]" (the dot product score), it will be in the order of 1,2,0.

@sth4k you're correct, the original paper use cosine similarity to mearesure the similarity between query vector and document vector, the reason we add an extra dense layer is:

To keep model structure consistent.
To allow CDSSM working for ranking task as well as classification task.

Yeah that's what i am thinking. Thanks for your reply!


Fim delegations fix

Updates to reflect the change in delegations property format in FIM.

Changes to incorporate the new delegation format are needed in network_node_control.py as well.

network_node_inventory.py, line 243
if graph_node.capacity_delegations is None or len(graph_node.capacity_delegations) < 1 or reservation is None:

It currently checks for len of delegations i.e.  len(graph_node.capacity_delegations) which does not apply anymore and can be removed

fim_helper.py: update_node function which updates the graph node in ASM throws an exception if label_allocations are none due to the new assert statement.
   File "/usr/src/app/fabric_cf/actor/core/kernel/slice.py", line 292, in update_slice_graph
     FimHelper.update_node(graph_id=self.graph_id, sliver=sliver)
   File "/usr/src/app/fabric_cf/actor/fim/fim_helper.py", line 200, in update_node
     node.components[cname].set_properties(label_allocations=component.label_allocations,
   File "/usr/local/lib/python3.9/site-packages/fim/user/component.py", line 138, in set_properties
     comp_sliver.set_properties(**kwargs)
   File "/usr/local/lib/python3.9/site-packages/fim/slivers/base_sliver.py", line 159, in set_properties
     self.__getattribute__('set_' + k)(v)
   File "/usr/local/lib/python3.9/site-packages/fim/slivers/base_sliver.py", line 104, in set_label_allocations
     assert(lab is None or isinstance(lab, Labels))
 AssertionError

I fixed the problem in network_node_inventory.py, however the other problem is a bit of a mystery. You can see the assert statement allows for label to be None (or it has to be an instance of Labels). I could not fully trace the code where labels in the sliver are assigned, but something is happening there where these allocated labels aren't actually a Labels object.


Feature/#113 improvements proxyman

@dieter115  don't forget to create an entry in the Changelogs. Some entry like 'provided logging for Proxyman' or something can suffice.


Add less loader options support

Fixes #123

@timneutkens Would you look at this pull request? We really need the less loader options in our current project.

Looks good to me

Released as<EMAIL_ADDRESS>


Fix Item drops of Entites

When holding 8 Javelins in 1 stack and throw them, the Item Stack Size is reduced by 1, but the Entity drops 8 Javelins then.

I think I already had something like that, will look at it tomorrow.


Go path must be relative?

Hey folks, getting back into development today and I ran into the following issue. Thoughts?
Step to reproduce:

Update makefile to latest (see below for makefile)
Execute make build in project directory

Expected Result:

.zip file created as expected

Actual Result:

I get the following error:

go build -buildmode=plugin -ldflags='-w -s ' -o handler.so
go: GOPATH entry is relative; must be absolute path: "C/Users/hhjones/go".
For more details see: 'go help gopath'
make: *** [build] Error 2

Makefile:
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
#
# In jurisdictions that recognize copyright laws, the author or authors
# of this software dedicate any and all copyright interest in the
# software to the public domain. We make this dedication for the benefit
# of the public at large and to the detriment of our heirs and
# successors. We intend this dedication to be an overt act of
# relinquishment in perpetuity of all present and future rights to this
# software under copyright law.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
#
# For more information, please refer to <http://unlicense.org/>
#

HANDLER ?= handler
PACKAGE ?= $(HANDLER)

ifeq ($(OS),Windows_NT)
	GOPATH ?= $(USERPROFILE)/go
	GOPATH := $(subst ;,:/,$(subst \,/,$(subst :,,$(GOPATH))))
	CURDIR := /$(subst :,,$(CURDIR))
	RM := del /q
else
	GOPATH ?= $(HOME)/go
	RM := rm -f
endif

MAKEFILE = $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))

docker:
	docker run --rm\
		-e HANDLER=$(HANDLER)\
		-e PACKAGE=$(PACKAGE)\
		-e GOPATH=$(GOPATH)\
		-e LDFLAGS='$(LDFLAGS)'\
		-v $(CURDIR):$(CURDIR)\
		$(foreach GP,$(subst :, ,$(GOPATH)),-v $(GP):$(GP))\
		-w $(CURDIR)\
		eawsy/aws-lambda-go-shim:latest make -f $(MAKEFILE) all

.PHONY: docker

all: build pack perm

.PHONY: all

build:
	go build -buildmode=plugin -ldflags='-w -s $(LDFLAGS)' -o $(HANDLER).so

.PHONY: build

pack:
	pack $(HANDLER) $(HANDLER).so $(PACKAGE).zip

.PHONY: pack

perm:
	chown $(shell stat -c '%u:%g' .) $(HANDLER).so $(PACKAGE).zip

.PHONY: perm

clean:
	$(RM) $(HANDLER).so $(PACKAGE).zip

.PHONY: clean

@harrisonhjones can you please provide the content of these two variables in your system: HOMEPATH and GOPATH

HOMEPATH: \Users\hhjones
GOPATH: C:\Users\hhjones\go

Does the definition of your GOPATH something like GOPATH=%HOMEPATH%\go? What you've provided may be its expanded version after resolving the HOMEPATH. Because here you HOMEPATH is relative and if the definition of your GOPATH uses the HOMEPATH then the error is correct.

My GOPATH is defined as C:\Users\hhjones\go
Note, if I replace the GOPATH := $(subst ;,:/,$(subst \,/,$(subst :,,$(GOPATH)))) line with GOPATH := C:\Users\hhjones\go\ I get the following new error:
go build -buildmode=plugin -ldflags='-w -s ' -o handler.so
-buildmode=plugin not supported on windows/amd64
make: *** [build] Error 1

Do you use the docker target to run the build? It seems with this new error that your are building directly in your windows host!

That was it. Thanks for the help! Silly mistake on my part.


Support Pipelines

refactor code for better maintainability
use args and kwargs when possible
add support for pipelines

Pull Request Test Coverage Report for Build<PHONE_NUMBER>3
Details

81 of 129 (62.79%)  changed or added relevant lines in 3 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-6.6%) to 88.65%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

znsocket/server.py
54
64
84.38%

znsocket/client.py
21
59
35.59%

Totals

Change from base Build<PHONE_NUMBER>7:
-6.6%

Covered Lines:
578

Relevant Lines:
652

💛  - Coveralls


feat: add constructor to init options and colorful logger

Closes #2
Add a new type called GormOptions and associated constructor
type GormOptions struct {
	SlowThreshold time.Duration
	LogLevel      logger.LogLevel
	TruncateLen   uint
	LogLatency    bool
	Colorful      bool
}

func WithGormOptions(gormOpt GormOptions) Option {
	return newGormLogOption(func(o *options) {
		o.Colorful = gormOpt.Colorful
		o.logLatency = gormOpt.LogLatency
		o.LogLevel = gormOpt.LogLevel
		o.SlowThreshold = gormOpt.SlowThreshold
	})
}

Also Colorful option was already available, but never used to add colors to logs (the colors used are those provided by Gorm's default logger)

Nice changes! A few remarks:

You deleted .gitignore and .golangci by mistake!
you added postgresql dependency in go.mod and various require, why is that necessary?
it would be nice to edit the unit test and check that new method actually set the logger options

Thanks @nicobao for the remarks, the go.mod was rollback, and both deleted files re-added

Thank you both @FlorianRuen and @nicobao for PR and review 👌
I tested options and everything looks good to me so after merging this PR I'll do some dep check/lint and release a new version.


⚠ SolarOscp has degraded performance

In 00ec793, SolarOscp ($SOLAROSCP_URL) experienced degraded performance:

HTTP code: 200
Response time: 218 ms

Resolved: SolarOscp performance has improved in 560769a after 10 minutes.


Remove humbug_get_contents

PHP requirement is 5.6, there's no need for the transitional package at this point for earlier versions.

:+1:


StreamMap slow?

This is a WIP issue as I plan to investigate further.
I'm working on a swift-nio project that has an emphasis on large file transfers. Getting a stream of bytes out of the server is very fast, but uploading a stream is around 3x slower - even when the incoming buffers aren't handled/stored at all.
I've profiled in instruments and see a lot of traffic (around 15%) in StreamMap that's just trying to pick a struct out of a collection based on a stream ID. On first glance, it seems to me that we can probably do away with CircularBuffer, in favour of something more simple. I think the fact that stream IDs start at zero, and increment from there (but may arrive out of order), potentially opens up some optimisation opportunities.
Note that this performance bottleneck was noticed in debug builds. I'll report back with release build findings.

Thanks for filing this: I think the debug builds are vastly overestimating the cost of the StreamMap. CircularBuffer is an abstraction over Array, and so it provides extra layers of performance cost that are not optimised out in debug builds. In release builds, however, it vanishes.

I think the fact that stream IDs start at zero, and increment from there

Incidentally, this is why CircularBuffer is used: it allows the storage to be totally ordered, without needing to be frequently "compacted".

Just reading the header comment in StreamMap (which I should have done before posting this issue, sorry) - it notes that a tradeoff was made resulting in slower lookups, but it assumes number of streams is low. I think if you're totally blasting a server with many gigs/s in uploads over a fast connection, which is our use case, stream IDs per connection could actually wind up being quite substantial.
It also dismisses dictionaries, due to the computational load of computing hashes. But couldn't we just make HTTP2StreamID Hashable - and simply provide the underlying Int32 as the hashValue

Thanks for filing this: I think the debug builds are vastly overestimating the cost of the StreamMap. CircularBuffer is an abstraction over Array, and so it provides extra layers of performance cost that are not optimised out in debug builds. In release builds, however, it vanishes.

I've noticed release builds being way faster too, so maybe all of this is a non-issue. I'll check when I have time 👍

It also dismisses dictionaries, due to the computational load of computing hashes. But couldn't we just make HTTP2StreamID Hashable - and simply provide the underlying Int32 as the hashValue

This totally works, but the tradeoff isn't straightforward. For small dictionaries (in this case, fewer than 100 elements), it's cheaper to do a linear array scan to find the element than it is to hash the key and do a jump. This is fairly non-intuitive but comes down to the way branch predictors and cache preloaders work: the memory subsystem can observe and optimise this access pattern, meaning that we're never waiting for memory, in a way that it cannot do with hashing. The data structure is therefore optimised for small size. For larger sizes, we do binary search instead, which is still extremely cheap.

Thanks for the technical explanation! I'm glad a lot of thought went into this.
Diving a bit deeper, I'm seeing a lot of the work is actually coming from debugOnly calls - so yeah seems like a false alarm. Notably, setting _backingCheck. Now I'm wondering why _UInt24 is used, but that's a rabbit hole I should probably avoid for today!

Thanks for the technical explanation! I'm glad a lot of thought went into this.
Diving a bit deeper, I'm seeing a lot of the work is actually coming from debugOnly calls - so yeah seems like a false alarm. Notably, setting _backingCheck. Now I'm wondering why _UInt24 is used, but that's a rabbit hole I should probably avoid for today!

The _backingCheck is just doing some (as you noticed) debug-build-only checking that may help to catch bugs early. It uses _UInt24 because we happened to have 24 spare bits in the data structure. So I thought why not (in debug builds) make use of those bits and store some extra information that we can then verify all the time. If I had used a normal UInt32 then the data structure would've grown (in debug & release builds) and if I had used UInt16 then we'd still have wasted 8 bits.
Concretely, those 24 bits store the length of the buffer such that we can detect if some code illegally stores and reuses buffer offsets across resizes. That's illegal because (like other many other data structures) the actual indexes get invalidates if you add/remove elements.


Treat plugin fields like other sinsp fields (all evt types)

In #74 we pushed down some code from falco that determines the sinsp
event types that are applicable for a given filter. The set of event
types starts with "all events", and as the filter condition is parsed,
including logical operators like "and", "or", "not", etc, the set of
event types is changed, honoring the logical operators.
For example, for a condition proc.name=nginx, the filter is applicable
for all event types, as the condition does not include any evt.type
field. For a more complicated condition like evt.type=openat and
proc.name=nginx, the first field restricts the event types to openat,
which is logical anded against all event types from proc.name,
resulting in only the event type openat.
With the introduction of plugins, there's also a need to segregate
plugin-related filterchecks from non-plugin-related filterchecks by
event source, but that's handled at a higher level, using a notion of
filter factories and formatter factories (falcosecurity/libs#77).
The bug is that plugin filtercheck fields like ct.name, json.value
were mistakenly being restricted to only the plugin event
PPME_PLUGINEVENT_E. This was being mistakenly inverted when conditions
had a "not" operator, with the result being that they did not run on
any event types at all.
The fix is to treat plugin fields as working with all event types,
just like almost all other fields like proc.name, etc. are. This
allows the logical operators to combine event type sets properly.
This, along with other small changes in falco + plugins, fixes
https://github.com/falcosecurity/plugins/issues/56.
Signed-off-by: Mark Stemm<EMAIL_ADDRESS>
What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind design

/kind documentation

/kind failing-test

/kind feature

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area build

/area driver-kmod

/area driver-ebpf

/area libscap

/area libsinsp

/area tests

/area proposals

What this PR does / why we need it:
Which issue(s) this PR fixes:

Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?:

@mstemm: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: mstemm
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [mstemm]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

The bug is that plugin filtercheck fields like ct.name, json.value
were mistakenly being restricted to only the plugin event
PPME_PLUGINEVENT_E. This was being mistakenly inverted when conditions
had a "not" operator, with the result being that they did not run on
any event types at all.

IMHO, the root problem is that "inversion logic" driven by the "not" operator MAY make sense for the syscall case, but it's completely non-sense for other cases.
The whole mechanism just works because when evttypes() returns the default value then the "inversion logic" will be turned off. The k8s_audit case works so, and this PR is proposing the same workaround.
It seems to be a design problem. Likely, gen_event_filter_expression should not have the responsibility of computing the "inversion logic" because it has no knowledge of the set of available events types (for syscall the set is dynamic, in other case is a set with just one element). Moreover, I have also some doubts that the "inversion logic" is formally correct in all legit cases (is there a way to test it?).
That being said, since merging this workaround now would mean rebuilding all prebuilt drivers and likely delaying the release, I'd rather try another workaround directly in Falco. We can later rethink this PR (although I believe it does not worth merge it at all).
After studying the issue with @FedeDP and @jasondellaluce we have discovered a wrong behavior if Falco that is in some way correlated: https://github.com/falcosecurity/falco/blob/6a42f4a1333275dd43f844b326dae60316575a17/userspace/engine/ruleset.cpp#L122-L127
We are trying a fix on this PR 👉 falcosecurity/falco#1875 Incidentally, that solution ☝ is also a workaround for the same problem this PR is trying to fix and you described in this comment.

There are a lot of tests in https://github.com/falcosecurity/libs/blob/master/userspace/libsinsp/test/evttype_filter.ut.cpp so I think the logic has a fair amount of test coverage.
You're right that logical not is a weird thing to handle, but it does work well for expressions like not evt.type=xxx (See https://github.com/falcosecurity/libs/blob/master/userspace/libsinsp/test/evttype_filter.ut.cpp#L156, https://github.com/falcosecurity/libs/blob/master/userspace/libsinsp/test/evttype_filter.ut.cpp#L163). And it has a special case to not invert "all events" into "no events": https://github.com/falcosecurity/libs/blob/master/userspace/libsinsp/gen_filter.cpp#L221.
If you really want to make the change only in falco, temporarily, I think you would shortcut falco_engine::evttypes_for_ruleset (https://github.com/falcosecurity/falco/blob/master/userspace/engine/falco_engine.cpp#L263) for sources that are not "syscall".
I'd really suggest making the change to libs, though. It's very small and I'm pretty sure it will work well with the existing logic.

I'd really suggest making the change to libs, though. It's very small and I'm pretty sure it will work well with the existing logic.

I'm not totally against this fix, but we still want to postpone the decision after the Falco release (when we will not be in a rush :sweat_smile: )

I'd really suggest making the change to libs, though. It's very small and I'm pretty sure it will work well with the existing logic.

I am not sure; i mean sure it works, but i don't like the fact that we are "advertising" that plugins filter checks work on any event type only to use the same "workaround" that is used by k8s audit logs (

And it has a special case to not invert "all events" into "no events

)
While that works, i think that it somewhat builds upon some other workaround that IMHO should not exist (and hopefully will go away once k8s audit log will be ported to a plugin).
WDYT @mstemm ?
Is my flow of thoughts correct?

/hold

This is now superseded by 👉🏼  https://github.com/falcosecurity/falco/pull/1965

Yep, better fixes are already farther along, so closing this PR.


Using user secrets with dotnet cli requires publishing the project.json file

From @Tratcher on February 16, 2016 20:34
It needs to read userSecretsId from the project.json. We should find a different way to publish this value.
C:\git\Universe\Security\samples\SocialSample\bin\Debug\dnx451>SocialSample.exe
Application startup exception: System.InvalidOperationException: Unable to locate a project.json at 'C:\git\Universe\
Security\samples\SocialSample\bin\Debug\dnx451\project.json'.
   at Microsoft.Extensions.Configuration.UserSecrets.PathHelper.GetSecretsPath(String projectPath)
   at Microsoft.Extensions.Configuration.ConfigurationExtensions.AddUserSecrets(IConfigurationBuilder configuration)
   at SocialSample.Startup..ctor() in C:\git\Universe\Security\samples\SocialSample\Startup.cs:line 35
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider
provider)
   at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.GetServiceOrCreateInstance(IServiceProvider provide
r, Type type)
   at Microsoft.AspNetCore.Hosting.Startup.StartupLoader.LoadMethods(Type startupType, IList`1 diagnosticMessages)
   at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureStartup()
   at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureApplicationServices()
   at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()

Copied from original issue: aspnet/UserSecrets#62

From @muratg on February 29, 2016 22:1
Ugh, interesting. Yeah, we don't want to project.json be there just for userSecretsId...
@anurse @davidfowl any idea where we can store this for published applications?

From @muratg on March 16, 2016 17:7
Let's look into some options in the next milestone.

From @anurse on February 29, 2016 23:20
config.json? That is going to be a tricky one...

From @Bartmax on April 6, 2016 23:48
I'm currently hitting this bug. Is there any workaround ? this is a RC2 web app and running dotnet run. If i remove UserSecrets it works as expected.
Unhandled Exception: System.InvalidOperationException: Unable to locate a project.json at 'C:\xxx\bin\Debug\netcoreapp1.0\win10-x64\project.json'.
   at Microsoft.Extensions.Configuration.UserSecrets.PathHelper.GetSecretsPath(String projectPath)
   at Microsoft.Extensions.Configuration.ConfigurationExtensions.AddUserSecrets(IConfigurationBuilder configuration)
   at xxx.Web.Startup..ctor(IHostingEnvironment env)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.Extensions.Internal.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider)
   at Microsoft.AspNetCore.Hosting.Startup.StartupLoader.LoadMethods(Type startupType, IList`1 diagnosticMessages)
   at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureStartup()
   at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureApplicationServices()
   at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
   at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()
   at xxx.Web.Startup.Main(String[] args)

From @muratg on April 7, 2016 3:10
@Bartmax You can move project.json file manually to publish folder (or write a script to to this each time you build.)

From @Tratcher on April 7, 2016 3:23
It worked if I added project.json to the content section of project.json so it gets published.

From @Bartmax on April 7, 2016 13:41
one issue i find moving the file is that next restore will try to restore the bin folder.
this have the side effect of having more log/errors/warning when dotnet restore.
not sure if it breaks anything. just wanted to let you know.
first lines of dotnet restore, with and without project.json copied over.
dotnet restore -v minimal
log  : Restoring packages for C:\xxx\project.json...

dotnet restore -v minimal
log  : Restoring packages for C:\xxx\bin\Debug\netcoreapp1.0\win10-x64\project.json...
log  : Restoring packages for C:\xxx\project.json...

From @muratg on April 7, 2016 15:39
@Bartmax Yeah, that's unfortunately the case. I guess you can remove it before restore in your build script, and copy over after publish.

From @glennc on May 9, 2016 22:16
To be clear. Are people trying to use UserSecrets in production?

From @muratg on May 9, 2016 22:22
@glennc That's not supported. The scenario here is you're testing a published app on a dev box.

From @muratg on May 10, 2016 5:0
@glennc I agree. Let's talk about this. Perhaps making things more granular makes sense.

From @glennc on May 10, 2016 2:58
Yeah, I understand the issue when you want to turn on debug on the server to get some errors. It makes me think this whole setup isn't quite right. IsDevelopment has too many things hanging off it.

From @Tratcher on May 9, 2016 22:26
Or they're running in a staging environment and hit an error they want to debug. They enable Development to turn on the DeveloperExceptionPage, and also end up with UserSecrets being turned on.
https://github.com/aspnet/Templates/blob/dev/src/Rules/StarterWeb/IndividualAuth/Startup.cs#L65
https://github.com/aspnet/Templates/blob/dev/src/Rules/StarterWeb/IndividualAuth/Startup.cs#L30

From @Zoltu on May 31, 2016 6:43
I just spent about 4 hours troubleshooting my deploy to find out that in production (Azure App Service) I can't call .AddUserSecrets().
I believe that the AddUserSecrets() extension method should at least be made more resilient to working under adverse conditions, such as a project.json file not being available in the expected location.  Not only was this a very frustrating experience (particularly on Azure where startup exceptions are surprisingly hard to find) but also it negatively impacts the startup code readability because
_configuration = new ConfigurationBuilder()
	.SetBasePath(_hostingEnvironment.ContentRootPath)
	.AddUserSecrets()
	.Build();

has to turn into this:
var configurationBuilder = new ConfigurationBuilder()
	.SetBasePath(_hostingEnvironment.ContentRootPath);
if (hostingEnvironment.IsDevelopment())
	configurationBuilder.AddUserSecrets();
_configuration = configurationBuilder.Build();

A couple related issues:
https://github.com/aspnet/Home/issues/1458
https://github.com/aspnet/Home/issues/1508

Another related issue: https://github.com/aspnet/EntityFramework/issues/5726

From @Zoltu on May 31, 2016 6:48
Workaround: Create the following extension method and use it instead of the built-in one:
public static IConfigurationBuilder AddUserSecrets(this IConfigurationBuilder it, IHostingEnvironment hostingEnvironment) => hostingEnvironment.IsDevelopment() ? it.AddUserSecrets() : it;

This doesn't solve the problem of running Development environment in something like staging, just allows you to have a slightly simplified configuration setup.

From @asteffes on September 14, 2016 19:46
Does this error persist if you supply the UserSecretsId as a parameter to builder.AddUserSecrets("userSecretsId") extension method?
EDIT: I was able to recreate this bug using a "dotnet publish" command without including the project.json in the outputs and running the application.
Passing the UserSecretsId as a parameter to AddUserSecrets() method gets around this exception.
This is the work around I'll be using for deployment to our dev environment.

From @lcalabrese on July 15, 2016 8:45
If you are using the Development environment to test but do not need user secrets, you can use a workaround to test for project.json:
public Startup(IHostingEnvironment env)
{
    var builder = new ConfigurationBuilder()
        .SetBasePath(env.ContentRootPath)
        .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
        .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true, reloadOnChange: true);

    if (env.IsDevelopment() && builder.GetFileProvider().GetFileInfo("project.json").Exists)
    {
        builder.AddUserSecrets();
    }
}

Closing this, we can track the work here: https://github.com/aspnet/DotNetTools/issues/169


Add support for button_to

Current sweet alert is not triggered when a button_to tag is used. This should act in the same way a link_to or submit_tag works but the module doesn't define a function for button_to, only button_tag.
E.G.
<%= button_to "Click Me", root_path, data: { confirm: "Do it?" }, class: "ui button" %>

see #9


Fix Issue #3368:  Symbol.species.toString() shouldn't have bracket around the name

Looks like you need to update a few baselines to reflect this change as well.

@MSLaguana Nope.  The accessor function name needs to have the bracket.  toStringTag already have similar pattern and defined propertyId for the function name with [] for all the symbols..  So I updated it to create the accessor with the appropriate name

LGTM

LGTM


Black border of Windows icons removed

See https://dashtalk.org/threads/v0-11-2-x-testing.4202/page-27#post-49024
Using Gimp to convert the images to .ico fixed the problem.
Before:

After:

Sorry about this :-/

Merged into master, thanks!


CodeActions to return Command[]|WorkspaceEdit

In the vast majority of the use-cases of CodeActions, the action will be an edition. That would work for quick fix, code hints, generate related tests... Forcing the Command[] pattern here kinds of break the goal of being client-independent: the command are client-specific and it's the goal of the protocol to avoid such client-specific features.
So I would suggest that rather than returning a Command[], the code actions should be allowed to also return a WorkspaceEdit. That would cover much more nicely a lot of use-cases in a client-independent way.

@mickaelistria yes and no. The reason why we have commands is that at a specific position (problem) there can be more than one possible code action (e..g quick fix, ....). So you can provide command and postpone the actual computation of the edit until later.
However I think there is also value to return a WorkspaceEdit. But that would need a UI piece as well.

Ok, so it would be more something like (Command|WorkspaceEdit)[] that would match? In the Java/LSP4J world List<Either<Command, WorkspaceEdit>>?

Exactly, plus a way to name the WorkspaceEdit to present a label in the user interface.

Like completion, the WorkspaceEdit from CodeActions should allow some placeholders for variable substitutions/linked edit when applied.
That would allow to easily implement refactorings like "extract method", "extract local variable"... purely with LSP objects, in a portable way that's supposed to work with any client and server.
I believe this would be made easier when #236 is fixed so we can easily add "a posteriori" parameter capturing in any WorkspaceEdit.

Exactly, plus a way to name the WorkspaceEdit to present a label in the user interface.
This is #243

FWIW, at the moment, I believe this is the biggest limitation for the protocol, which prevents some of the common refactorings to be easily provided by language servers without tool-specific effort. I'd be delighted to know this gets considered for v4.

There is actually an easy workaround for this with the applyEdit request that can be send form the server to the client. The only downside is one more server roundtrip. So I don't think that this 'blocks' something. I am even tending towards closing this unless we figure out the applyEdit is not sufficient.

Agreed that this isn't necessary. I think this is because the workflow for using applyEdit to implement a code action is a bit tricky, and could be solved with a bit of documentation or some sugar in LSP libraries.
For others coming to this bug, here's how to apply a workspace edit in response to a code action. I can confirm that this is working with both vscode and atom-languageclient with no tool-specific code. The conversation between server and client looks as follows:
  <- publishDiagnostics
  -> getCodeActions  returns Command(myAppName/applyEdit)
  -> executeCommand(myAppName/applyEdit)
  <- workspace/applyEdit

And here are links within the commit that landed this into our server.
Declare executeCommand capabilities:
https://github.com/Polymer/polymer-editor-service/commit/a2f77a5abeddaca790c57652f9d27e0275697a3a#diff-bd6d4fe0d7e96ac0e708e87e1617eab6R130
Return a Command with the method name (myApp/applyEdits) that you registered the capability to execute, and your WorkspaceEdit as a parameter: https://github.com/Polymer/polymer-editor-service/commit/a2f77a5abeddaca790c57652f9d27e0275697a3a#diff-bd6d4fe0d7e96ac0e708e87e1617eab6R245
Execute that command by doing an ApplyWorkspaceEditRequest:
https://github.com/Polymer/polymer-editor-service/commit/a2f77a5abeddaca790c57652f9d27e0275697a3a#diff-bd6d4fe0d7e96ac0e708e87e1617eab6R236

The workflow with applyEdit seems overkill to me in most use-cases. I agree
there are workarounds, but I think we'd all prefer the LSP to be as simple
and powerful as possible. My proosal IMO matches those 2 goals better than
chaining several operations.
--
Mickael Istria
Eclipse IDE https://www.eclipse.org/downloads/eclipse-packages/
developer, at Red Hat Developers https://developers.redhat.com/ community
Elected Committer Representative at the Eclipse Foundation
https://www.eclipse.org/org/ board of directors

ApplyEdit as a server to client notification is horrible because it is so stateful and asynchronous.  Just send the edit on the command reply and editors can just apply it synchronously. I agree with @mickaelistria , returning a workspace edit which is he 99% case makes these commands much easier to implement in LSP clients.

I agree that applying edits should be simple but the API shouldn't foster wrong coding patterns. Computing these edits (for example for refactorings) is very expensive and if a code action request returns 3 possible refactorings then it would be wrong to compute the edits upfront. They should be computed as late as possible not as early as possible.
Adding another roundtrip to this doesn't make it more async. So instead of returning the edit the server could instruct the command if the client should auto register for the command execution so that the flow gets easier to be implemented.
This kind of flow is even used in IDEs where the refactoring are not provided using a server. Usually the ide populates a menu (commands received via code actions). If a menu item is selected to calls into the language API to compute a workspace operation (execute command) and then applies theses workspace operations.

As I understand it there is no limit to the number of unsolicited things the server can do in response to the execute command request. Is that correct? If it were a request/reply to execute command and it returned a workspace edit, then ok sure, but as it is an announced set of a sync notifications the editor has to know hat it is in the state of waiting for that to happen

Announced should say ‘unbounded’

@dbaeumer As per discussion about naming workspaceEdits at #243, would it make sense to rename this ticket as "CodeActions to return Command[]|ApplyWorkspaceEditParams" instead?

Computing these edits is very expensive

I think this should rather say "can be very expensive" as many actions can return very small edits that can easily be computed quickly at the same time as the parser/analyzer detects an issue. For example, an extra closing parenthesis, when detected by the parser, can immediately return the right text edit to remove it. It's not always an expensive operation.
It can also happen, in case for example of a remote LS, that the cost of a ping is too long and that it would perform much better to includes the edits directly with the codeactions instead of exchanging more messages.
I think the LSP should acknowledge that there are simple cases for code actions, and then allows for code actions to also return edits directly instead of forcing back and forth communication when there is no need for it.

As per discussion about naming workspaceEdits at #243, would it make sense to rename this ticket as "CodeActions to return Command[]|ApplyWorkspaceEditParams" instead?

Note that this change is backward compatible. I could make a PR for that. If so, should it include a client capability such as codeactions.allowsDirectEdits ?

@mickaelistria I agree that these can be cheap to compute.
A PR is very welcome here. In VS Code we added a type CodeAction as a possible result of a codeAction provider. May be we can take this as a blue print for the LSP changes.
And yes we would need to add a client capability since clients might not support this. Something like TextDocumentClientCapabilities.codeAction.codeActionSupport?: boolean


Phi-3.5-vision-instruct-bf16 fails

Running this script:
import mlx.core as mx
from mlx_vlm import load, generate

import os
from pathlib import Path

# model_path = "mlx-community/llava-1.5-7b-4bit"
#model_path = "mlx-community/llava-v1.6-mistral-7b-8bit"
#model_path = "mlx-community/llava-v1.6-34b-8bit"
model_path = "mlx-community/Phi-3.5-vision-instruct-bf16"
model, processor = load(model_path)

prompt = processor.tokenizer.apply_chat_template(
    [{"role": "user", "content": f"<image>\nProvide a formal caption and keywords for this image"}],
    tokenize=False,
    add_generation_prompt=True,
)

picpath = "/Users/jrp/Pictures/Processed"
pics = sorted(Path(picpath).iterdir(), key=os.path.getmtime, reverse=True)
pic = str(pics[0])
print(pic)

#output = generate(model, processor, "http://images.cocodataset.org/val2017/000000039769.jpg", prompt, verbose=True)
output = generate(model, processor, pic, prompt, max_tokens=200, verbose=True)

print(output)

... all's well with model_path = "mlx-community/llava-v1.6-mistral-7b-8bit", but with model_path = "mlx-community/Phi-3.5-vision-instruct-bf16" I get
python mytest.py
Fetching 13 files: 100%|████████████████████████| 13/13 [00:00<00:00, 173098.26it/s]
The repository for /Users/jrp/.cache/huggingface/hub/models--mlx-community--Phi-3.5-vision-instruct-bf16/snapshots/a2c307b346fcff186a6250ea4c0853688db7b633 contains custom code which must be executed to correctly load the model. You can inspect the repository content at https://hf.co//Users/jrp/.cache/huggingface/hub/models--mlx-community--Phi-3.5-vision-instruct-bf16/snapshots/a2c307b346fcff186a6250ea4c0853688db7b633.
You can avoid this prompt in future by passing the argument `trust_remote_code=True`.

Do you wish to run the custom code? [y/N] y
/opt/homebrew/Caskroom/miniconda/base/envs/mlx/lib/python3.12/site-packages/transformers/models/auto/image_processing_auto.py:513: FutureWarning: The image_processor_class argument is deprecated and will be removed in v4.42. Please use `slow_image_processor_class`, or `fast_image_processor_class` instead
  warnings.warn(
/Users/jrp/Pictures/Processed/20240826-153133_DSC02241.jpg
==========
Image: /Users/jrp/Pictures/Processed/20240826-153133_DSC02241.jpg

Prompt: <|user|>
<image>
Provide a formal caption and keywords for this image<|end|>
<|assistant|>

Traceback (most recent call last):
  File "/Users/jrp/Documents/AI/mlx/mlx-vlm/mlx_vlm/mytest.py", line 26, in <module>
    output = generate(model, processor, pic, prompt, max_tokens=200, verbose=True)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Caskroom/miniconda/base/envs/mlx/lib/python3.12/site-packages/mlx_vlm/utils.py", line 908, in generate
    input_ids, pixel_values, mask = prepare_inputs(
                                    ^^^^^^^^^^^^^^^
  File "/opt/homebrew/Caskroom/miniconda/base/envs/mlx/lib/python3.12/site-packages/mlx_vlm/utils.py", line 702, in prepare_inputs
    inputs = processor(prompt, image, return_tensors="np")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jrp/.cache/huggingface/modules/transformers_modules/a2c307b346fcff186a6250ea4c0853688db7b633/processing_phi3_v.py", line 377, in __call__
    inputs = self._convert_images_texts_to_inputs(image_inputs, text, padding=padding, truncation=truncation, max_length=max_length, return_tensors=return_tensors)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jrp/.cache/huggingface/modules/transformers_modules/a2c307b346fcff186a6250ea4c0853688db7b633/processing_phi3_v.py", line 435, in _convert_images_texts_to_inputs
    assert len(unique_image_ids) == len(images), f"total images must be the same as the number of image tags, got {len(unique_image_ids)} image tags and {len(images)} images"
AssertionError: total images must be the same as the number of image tags, got 0 image tags and 1 images

Same issue, any fix?

Hey @jrp2014 @landocoderissian
Sorry I missed it, last week I was moving into a new place :)
Let me check it out and get back to ASAP

@jrp2014 @landocoderissian
The error you are getting it's actually a transformers processor error and not MLX.
It seems like there is something wrong with a image path. Please ensure it's a strings.

I tested it with local files as well and it works fine.

Let me know if this fixes your issue.
For now I will close it.


Adding RCS Build Aid to CKAN

Followed the guide to create a .netkan for http://forum.kerbalspaceprogram.com/threads/35996
netkan.exe ended up crashing when I tried creating a .ckan file, possibly because I don't have mono? possibly because I'm an idiot? At any rate, I'm pretty sure I formatted the file correctly. Here's a pastebin of it: http://pastebin.com/dBYNSDwh
If someone else would be willing to take it the last 5 yards it would be appreciated. Thanks.
Lastly, paging @m4v as the author per: https://github.com/KSP-CKAN/CKAN-support/wiki/Adding-a-mod-to-the-CKAN#requesting-support-for-a-mod-on-the-ckan

See https://github.com/KSP-CKAN/NetKAN/pull/1292#issuecomment-102868557


Update release docs /current redirect for 2.7.0 release

Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

It will help us expedite review of your Pull Request if you tag someone (e.g. @username) to look at it.
Post-Commit Tests Status (on master branch)

Lang
SDK
Apex
Dataflow
Flink
Gearpump
Samza
Spark

Go

---
---
---
---
---
---

Java

Python

---

---
---
---

R: @udim

Javadocs / Pydocs already published at: https://beam.apache.org/releases/javadoc/2.7.0/

run website precommit

I can repro this by specifying the -PgithubPullRequestId gradle parameter:
./gradlew -PgithubPullRequestId=6595 :websitePreCommit

https://gradle.com/s/z3uukn4zlesoe

I believe this is broken due to BEAM-5681
I have a fix here: https://github.com/apache/beam/pull/6608

I believe this is ready to go in. @udim PTAL


⚠ Bofrost.at has degraded performance

In a2721ec, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 1437 ms

Resolved: Bofrost.at performance has improved in 7683aab after 9 minutes.


command to load a dataset into a sqlite database

There should be a cli command to load a dataset into a sqlite database. The command should print out path to the sqlite file and schema upon exiting.

Note: follow this recipe: https://stackoverflow.com/a/305639


[Tracking] Interpreter Optimization Ideas

Parallelism

Execute par blocks in parallel
Parallel execution of assignments (in group execution)

The first of these is more likely to be useful while the latter might not always be faster.
Performance tuning

Avoid executing cells which have not had a value change (during combinational convergence loop)
Use dataflow ordering to evaluate the group directly rather than iterating until combinational convergence. #893

There are definitely other things and I will update this issue as I remember them and link the appropriate issues for particular implementation proposals.

The tracker is about a year old so let's discuss and update it or close it

Closing: stale and not up to date with current efforts


[Shapely]Shapely ImportError after compile and run

When I import and use shapely (2.0.3) in my Python code, compile it into an executable file and run it, ImportError would happen; the program works normally if run directly under Python.
Code is compiled under MiniConda, but should not be a conda problem as everything works well (even if compiled into an exe) without shapely imported.
There are several reported issues related to shapely, but seems all of them are kind of long time ago (> 1 year), thus I guess this is probably a new issue.

Nuitka Version
(dpu64) D:\Src\Shapely_Nuitka_Test>python -m nuitka --version
2.1
Commercial: None
Python: 3.9.5 (default, May 18 2021, 14:42:02) [MSC v.1916 64 bit (AMD64)]
Flavor: Anaconda Python
Executable: C:\ProgramData\Miniconda3\envs\dpu64\python.exe
OS: Windows
Arch: x86_64
WindowsRelease: 10
Version C compiler: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\cl.exe (cl 14.2).

How did you install Nuitka and Python

I use MiniConda to create a Python environment, and install Nuitka through "pip install nuitka".
I think it should not be a conda problem as everything works well (even if compiled into an exe) without shapely imported.

Shapely Version
shapely==2.0.3
Code example to reproduce this issue
from shapely.geometry import Polygon

def test_shapely():
    # calculate gamut coverage
    x_list = [0.680, 0.265, 0.150]
    y_list = [0.320, 0.690, 0.060]
    triangle = Polygon([(x_list[0], y_list[0]), (x_list[1], y_list[1]), (x_list[2], y_list[2])])
    return triangle

if __name__ == "__main__":
    anyVal = test_shapely()

Nuitka options / cmd
python -m nuitka --standalone --output-dir=out ShapelyNuitkaTest.py
Error message after run
D:\Src\Shapely_Nuitka_Test\out\ShapelyNuitkaTest.dist>ShapelyNuitkaTest.exe
Traceback (most recent call last):
  File "D:\Src\SHAPEL~1\out\SHAPEL~1.DIS\ShapelyNuitkaTest.py", line 1, in <module>
  File "D:\Src\SHAPEL~1\out\SHAPEL~1.DIS\shapely\__init__.py", line 28, in <module shapely>
ImportError

This works fine on normal non-conda nuitka, might be a conda error.


before_record is ignored when before_record_response/request is used

When a VCR instance is configured with before_record and before_record_response and/or before_record_request, before_record is ignored.
I used this as a way to prevent recording or using cassettes completely but this did not work.
Example
USE_CASSETTES = False
vcr.VCR(
    before_record=lambda request: request if USE_CASSETTES else None,
    before_record_request=lambda request: request,
    before_record_response=lambda response: response)

In this scenario cassettes are still used or recorded.
Solution
I think this is intended behavior but I think the documentation should make it clear. Possibly here.

before_record_response and/or before_record_request, before_record is ignored.

It's not and/or.
before_record is simply an alias for request.
The relevant line is
self.before_record_request = before_record_request or before_record

Thanks for clearing things up @IvanMalison.
To prevent future confusion, is it an idea to replace before_record with before_record_request in the docs?

Sure, although before_record still works. The only thing that is worth noting is that before_record_request supercedes before_record. That is, before_record will be ignored when before_record_request is present.


[8.x] Added singleOrFail() alias for sole()

I like the functionality of sole() but I also like consistency.
All other QueryBuilder methods that are able to throw an error end with OrFail()
If you prefer oneOrFail #35929

Thanks for your pull request to Laravel!
Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.
If possible, please consider releasing your code as a package so that the community can still take advantage of your contributions!
If you feel absolutely certain that this code corrects a bug in the framework, please "@" mention me in a follow-up comment with further explanation so that GitHub will send me a notification of your response.

Thanks for your pull request to Laravel!
Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.
If possible, please consider releasing your code as a package so that the community can still take advantage of your contributions!
If you feel absolutely certain that this code corrects a bug in the framework, please "@" mention me in a follow-up comment with further explanation so that GitHub will send me a notification of your response.


doc: fix type signature of Coe

Change Type to Sort.

What is the motivation for this PR?

Coe is defined this way: https://github.com/leanprover/lean4/blob/6e904421304c362a146883baa360f451376dd9b1/src/Init/Coe.lean#L126-L129.

Hah my bad, I missed that