[BEAM-1230] Fixed a typo in the documentation of the Window class.

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

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

R: @dhalperi , I think we're pretty much the only ones not on a vacation at the moment...

Thanks, LGTM & merged!


Go generation broken for some projects

Hi,
Go client generation seems to be failing for one of the private services of my organisation (Gilt), while it works for others.
The error is: Generator failed with HTTP 500: Unsupported response code[500]. Expected: 200, 409

thanks - we are aware there are a few open areas to add support for this go client - will update once we fix. how critical? and curious are you using this as a CLI or in a server?

No problem. No critical at all. I was thinking to adopt it in a AWS Lamba.


No test cases generated for a method

To Reproduce
Try to generate tests for
public class Solution {

    public void func_1(String logfile) throws IOException {
        FileHandler fh = new FileHandler(logfile);
        Logger logger = Logger.getLogger("MyLog");
        logger.addHandler(fh);
        SimpleFormatter formatter = new SimpleFormatter();
        fh.setFormatter(formatter);
        logger.info("My first log");
    }
}

Actual behavior
The result is empty test class
public class SolutionTest {
}

Additional context
Bug was found by Dmitry Fedrushkov wx1076228

Seems to be caused by the same bug/limitation as #105.

Duplicate of #105


Update RemovePrivateMethodNeverUsed to work with generic methods

The first commit is better to analyze the PR. The 2nd one is to update from tabs to spaces, the file was incorrectly formatted.
Closes #343.

@carloscds I have rebased this to work with the new HEAD. If you have checked it out you need to delete your local branch and do it again.

Coverage increased (+0.01%) to 90.91% when pulling 62be57ca198a23e115f7219e46207407fb72791d on giggio:fix-remove-private-method into 4df081f28bc43cc9c9c0b81bbffd04010a22edc2 on code-cracker:master.


See password button on login page

The login page should have a button that allows you to see the password you're typing.

Hmm, is that best practice for a web application?  I'm not aware of other web applications that have such a feature (though that feature is common for e.g. wireless password tools for some reason).

oh, maybe not. I personally really appreciate it when it's there, but now that I think about it that's probably because I have a keyboard layout that doesn't match my keyboard. Happy to delete.

Yeah, thinking about this more, I think it'd introduce a security issue if we made this change -- if you're using a password manager but have configured it to not let a user get the password without re-typing the password manager's master password, this feature would make it possible for someone borrowing your computer for a few minutes to steal your password directly in the browser (which wasn't previously possible directly).  So I'm closing this as wontfix.


Safari in private mode - QUOTA_EXCEEDED_ERR

When I use Safari in private mode - when we use localStorage.setItem() - we getting exception. More details there: http://stackoverflow.com/questions/9077101/iphone-localstorage-quota-exceeded-err-issue
As result instead of "sync" event we getting "error" event in model. Would be great in this case save all data in array and do not fire error event.
iPad Air 2, iOS 8.1.3

Hi @ihor-sviziev, I think that the issue is in Safari and the only thing this library can do is report an error.
The correct behaviour should be an error getting thrown at the very start, so we know that the issue is localStorage not being supported as early as possible.


Error 500 when accessing /api/v1/repos/:org/:repo/releases after deleting user

Gitea version (or commit ref): 1.10.4
Git version: 2.20.1
Operating system: CentOS 7
Database (use [x]):

[x] PostgreSQL
[ ] MySQL
[ ] MSSQL
[ ] SQLite

Can you reproduce the bug at https://try.gitea.io:

[ ] Yes
[ ] No
[x] Not relevant (can't delete users on try.gitea.io)

Log gist:

$ curl --include "https://XXXX/api/v1/repos/ORG/REPO/releases?access_token=XXXXXXXX"
HTTP/1.1 500 [...]
{"message":"user does not exist [uid: 16, name: , keyid: 0]","url":"https://XXXX/api/swagger"}

Description

create a release with user joe in some repository
as instance admin, delete user joe
visit gitea/org/repo/releases, notice release is now by Ghost
curl --include "https://XXXX/api/v1/repos/ORG/REPO/releases?access_token=XXXXXXXX"
get error 500

Looking into the release table it looks like there are releases with publisher_id=16 (where 16 was the ID of the deleted user joe).

Could you upgrade to v1.11.1?


RuntimeError: cuFFT error: CUFFT_INTERNAL_ERROR

Hi,
When I run
python train_ms.py -c configs/config.json -m checkpoints
I get the below stack trace. I've tried setting all versions of torch, CUDA, and other libraries compatible with each other. I am using Python 3.7, CUDA 11.7, torch 1.13.1, torchaudio 0.13.1, torchvision 0.14.1, and cudnn-cuda-11. I am using a python3.7 venv as well. This is on my local machine with an RTX 4080. I am not running out of GPU memory or system memory.
I believe all my wavs and list files are formatted correctly, and I have followed all other instructions in README.md.
I am running on WSL 2 Ubuntu 22.04.4 LTS.
Thank you for your help.
Traceback (most recent call last):
  File "train_ms.py", line 306, in <module>
    main()
  File "train_ms.py", line 56, in main
    mp.spawn(run, nprocs=n_gpus, args=(n_gpus, hps,))
  File "/home/user/vits-3.7-venv/lib/python3.7/site-packages/torch/multiprocessing/spawn.py", line 240, in spawn
    return start_processes(fn, args, nprocs, join, daemon, start_method='spawn')
  File "/home/user/vits-3.7-venv/lib/python3.7/site-packages/torch/multiprocessing/spawn.py", line 198, in start_processes
    while not context.join():
  File "/home/user/vits-3.7-venv/lib/python3.7/site-packages/torch/multiprocessing/spawn.py", line 160, in join
    raise ProcessRaisedException(msg, error_index, failed_process.pid)
torch.multiprocessing.spawn.ProcessRaisedException:

-- Process 0 terminated with the following error:
Traceback (most recent call last):
  File "/home/user/vits-3.7-venv/lib/python3.7/site-packages/torch/multiprocessing/spawn.py", line 69, in _wrap
    fn(i, *args)
  File "/home/user/vits-finetuning/train_ms.py", line 124, in run
    train_and_evaluate(rank, epoch, hps, [net_g, net_d], [optim_g, optim_d], [scheduler_g, scheduler_d], scaler, [train_loader, eval_loader], logger, [writer, writer_eval])
  File "/home/user/vits-finetuning/train_ms.py", line 170, in train_and_evaluate
    hps.data.mel_fmax
  File "/home/user/vits-finetuning/mel_processing.py", line 105, in mel_spectrogram_torch
    center=center, pad_mode='reflect', normalized=False, onesided=True, return_complex=False)
  File "/home/user/vits-3.7-venv/lib/python3.7/site-packages/torch/functional.py", line 633, in stft
    normalized, onesided, return_complex)
RuntimeError: cuFFT error: CUFFT_INTERNAL_ERROR

If I remember correctly, I have just modified the requirements.txt and this error resolved. Maybe you can try to update the versions.
But just a note here, it kept giving error TensorRT is not found, even I imported it.


[Bug/Question] Strict mode doesn't seem to work good with libraries

Describe the bug
When strict mode is disabled, files are found just find (though also all relative ones, which i want to get rid off). When enabling strict mode, it works fine within the project, but when requiring modules outside of the project, the paths will be suggested, but not found.
To Reproduce
Steps to reproduce the behavior:

Add löve2d library
Require löve, see that its found.
Enable strict mode
Löve won't be resolved
But autocompletion shows löve as an option.

Expected behavior
Finding the module
Environment (please complete the following information):

OS: Windows 10
No WSL
Client: VSCode

duplicate with #847


Shadow point when removing vertex from linestring

Hello,
We have recently integrated Leaflet-Geoman-Pro into our project and discovered a bug related to vertex manipulation on linestrings. For information the issue only appears on the pro version.
When a vertex is removed from a linestring and the map is dragged slightly, the removed vertex reappears.
Steps to Reproduce:

Navigate to your demo site.
Remove a vertex from any linestring.
Slightly drag the map.
Observe that the previously removed vertex reappears.

Thank you for reporting. We will fix this asap

@MonfretAugustin we fixed the issue. It will be in the next release of the pro version.


(Question) Advantages over CUDA

none

Writing CUDA is hard. If you want to anything non-trivial that isn't just linear algebra, it's very hard.
To run any possible high-level problem using non-trivial communication, anything symbolic and abstract, etc, is extremely hard.
But Bend lets you do just that. You write a normal high-level program with no threads, no locks, no memory handling, no core to core communication and it works and gets automatically parallelized to efficiently use the GPU resources.
Bend is not a competitor to CUDA. Fast CUDA programs will continue to be faster in CUDA.


Change Group2Invoke to not transform if the cell's ports have a guarded assignment

If c is the cell we are trying to turn into an invoke: if the group has any assignments in the form of c.port = ... ? ... then we do not transform into an invoke. This will prevent the error described #1304.

Left a comment in #1304 explaining what I think is causing the problem. Take a look and see if that makes sense

Yeah, that makes sense. Made the changes suggested in #1304.


Rewrite X.U.NamedScratchpad using X.L.Minimize

Using additional "secret" workspace seems to be very hackish way and produces many issues. I think using X.L.Minimize is better for that. X.L.Minimize is not ready for this(it should minimize windows persisting on multiple workspaces correctly) but that's another issue.
Related for X.U.NamedScratchpad: #85 and similar problems
Related for X.L.Minimize: #49 #102

@f1u77y is #102 enough for this rewrite? Are there other issues with X.L.Minimize that need to be resolved?

@IvanMalison X.L.Minimize couldn't be used for named scratchpads just because of separate minimized state for one window on different workspaces.
And as I can see @geekosaur does not agree that minimized state should be global(but then I don't understand what's the point of having EWMH-related code in X.L.Minimize; separate state for workspaces are breaking compliance)

@IvanMalison X.L.Minimize couldn't be used for named scratchpads just because of separate minimized state for one window on different workspaces.

Right, that is what I thought -- it seems like #102 fixes that completely, so we should be able to make NamedScratch pad simply use minimization, right?

And as I can see @geekosaur does not agree that minimized state should be global(but then I don't understand what's the point of having EWMH-related code in X.L.Minimize; separate state for workspaces are breaking compliance)

@geekosaur can you clairify your position here?

we should be able to make NamedScratch pad simply use minimization, right?

Another point is that such implementation could cause mess when user minimizes window A, then toggles off some scratchpad B, and then he wants to restore A with withLastMinimized maximizeWindow but restores B. So, maybe this should be separate from minimizing(but use the same idea)

I am not averse to providing an option for it; I am averse to removing
the existing behavior entirely, as not everyone uses or wants EWMH. As the
current behavior is not the EWMH one, perhaps the correct way to go is an
EWMHMinimize separate from the existing one.
On Mon, Nov 21, 2016 at 7:03 PM, Ivan Malison<EMAIL_ADDRESS>wrote:

@IvanMalison https://github.com/IvanMalison X.L.Minimize couldn't be
used for named scratchpads just because of separate minimized state for one
window on different workspaces.
Right, that is what I thought -- it seems like #102
https://github.com/xmonad/xmonad-contrib/pull/102 fixes that
completely, so we should be able to make NamedScratch pad simply use
minimization, right?
And as I can see @geekosaur https://github.com/geekosaur does not agree
that minimized state should be global(but then I don't understand what's
the point of having EWMH-related code in X.L.Minimize; separate state for
workspaces are breaking compliance)
@geekosaur https://github.com/geekosaur can you clairify your position
here?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/xmonad/xmonad-contrib/issues/90#issuecomment-262107145,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AB8SoDwmhoVFYomkWu_f1Pu40yQ-kfM4ks5rAjE9gaJpZM4KO0xP
.

--
brandon s allbery kf8nh                               sine nomine associates
<EMAIL_ADDRESS><EMAIL_ADDRESS>unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net

The only difference from current behaviour is that new version minimizes
windows, that present on multiple workspaces, on all of them while
current minimizes on current one. But current version has code that
(un)sets _NET_WM_STATE_HIDDEN and sets window state to Normal/Iconic.
That could confuse statusbars/panels or applications themselves. So, the
current behaviour is not minimize at all, it is more like "make window
invisible on current workspace"
On 11/22/2016 06:35 AM, geekosaur wrote:

I am not averse to providing an option for it; I am averse to removing
the existing behavior entirely, as not everyone uses or wants EWMH. As the
current behavior is not the EWMH one, perhaps the correct way to go is an
EWMHMinimize separate from the existing one.
On Mon, Nov 21, 2016 at 7:03 PM, Ivan Malison<EMAIL_ADDRESS>wrote:

@IvanMalison https://github.com/IvanMalison X.L.Minimize couldn't be
used for named scratchpads just because of separate minimized state
for one
window on different workspaces.
Right, that is what I thought -- it seems like #102
https://github.com/xmonad/xmonad-contrib/pull/102 fixes that
completely, so we should be able to make NamedScratch pad simply use
minimization, right?
And as I can see @geekosaur https://github.com/geekosaur does not agree
that minimized state should be global(but then I don't understand what's
the point of having EWMH-related code in X.L.Minimize; separate state for
workspaces are breaking compliance)
@geekosaur https://github.com/geekosaur can you clairify your position
here?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub

https://github.com/xmonad/xmonad-contrib/issues/90#issuecomment-262107145,

or mute the thread

https://github.com/notifications/unsubscribe-auth/AB8SoDwmhoVFYomkWu_f1Pu40yQ-kfM4ks5rAjE9gaJpZM4KO0xP

.

--
brandon s allbery kf8nh sine nomine associates
<EMAIL_ADDRESS><EMAIL_ADDRESS>unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/xmonad/xmonad-contrib/issues/90#issuecomment-262139005,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKyf5XnRrTXYHHFhGhC1tasXQLbY_MlIks5rAmMPgaJpZM4KO0xP.

On Tue, Nov 22, 2016 at 12:59 PM, Bogdan Sinitsyn<EMAIL_ADDRESS>wrote:

The only difference from current behaviour is that new version minimizes
windows, that present on multiple workspaces, on all of them while
current minimizes on current one. But current version has code that
(un)sets _NET_WM_STATE_HIDDEN and sets window state to Normal/Iconic.
That could confuse statusbars/panels or applications themselves. So, the
current behaviour is not minimize at all, it is more like "make window
invisible on current workspace"

This already raises several questions, one of which I mentioned before but
you apparently decided to ignore.

There's stuff that already uses/presumably, by your interpretation,
"abuses" copyTo... expecting independent control per workspace. Your
approach means this is "illegal".

Your argument still assumes that following EWMH strictly is necessarily
the correct behavior. How far do you go with this? We violate this by
treating workspaces as things that can move between monitors, instead of
considering all monitors to span a single workspace; EWMH does not
explicitly say this is wrong but it is implied by the interrelationships
between its workspace-related properties. In particular, _NET_WORKAREA will
never work the way EWMH expects with a dwm/xmonad workspace model (there's
an active ticket about this). Do you in fact assert that following EWMH
here is necessary? If not, at what point does it become acceptable to you
to depart from strict EWMH behavior?

2a. The dwm/xmonad model also means that EWMH pagers will never work
correctly, regardless of the hidden window situation. Do you consider this
a bug in xmonad?
--
brandon s allbery kf8nh                               sine nomine associates
<EMAIL_ADDRESS><EMAIL_ADDRESS>unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net

Just to be clear on this: #2 above is not a question of "if xmonad were
clever enough we could make it work". It is a fundamental conflict between
the workspace models. You can only "fix" it by changing workspace models
completely.
On Tue, Nov 22, 2016 at 1:16 PM, Brandon Allbery<EMAIL_ADDRESS>wrote:

On Tue, Nov 22, 2016 at 12:59 PM, Bogdan Sinitsyn <
<EMAIL_ADDRESS>wrote:

The only difference from current behaviour is that new version minimizes
windows, that present on multiple workspaces, on all of them while
current minimizes on current one. But current version has code that
(un)sets _NET_WM_STATE_HIDDEN and sets window state to Normal/Iconic.
That could confuse statusbars/panels or applications themselves. So, the
current behaviour is not minimize at all, it is more like "make window
invisible on current workspace"

This already raises several questions, one of which I mentioned before but
you apparently decided to ignore.

There's stuff that already uses/presumably, by your interpretation,
"abuses" copyTo... expecting independent control per workspace. Your
approach means this is "illegal".

Your argument still assumes that following EWMH strictly is necessarily
the correct behavior. How far do you go with this? We violate this by
treating workspaces as things that can move between monitors, instead of
considering all monitors to span a single workspace; EWMH does not
explicitly say this is wrong but it is implied by the interrelationships
between its workspace-related properties. In particular, _NET_WORKAREA will
never work the way EWMH expects with a dwm/xmonad workspace model (there's
an active ticket about this). Do you in fact assert that following EWMH
here is necessary? If not, at what point does it become acceptable to you
to depart from strict EWMH behavior?

2a. The dwm/xmonad model also means that EWMH pagers will never work
correctly, regardless of the hidden window situation. Do you consider this
a bug in xmonad?
--
brandon s allbery kf8nh                               sine nomine
associates
<EMAIL_ADDRESS><EMAIL_ADDRESS>unix, openafs, kerberos, infrastructure, xmonad
http://sinenomine.net

--
brandon s allbery kf8nh                               sine nomine associates
<EMAIL_ADDRESS><EMAIL_ADDRESS>unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net

Your approach means this is "illegal"

No, I meant that setting some EWMH state with current minimize behaviour
is illegal because it's better to assume that window is shown while it's
hidden then do the contrary. In other words, I just suggest to remove
setMinimizedState usage from current code of X.L.Minimize because in
my optinion setting no state is better then setting incorrect state.

Your argument still assumes that following EWMH strictly is
necessarily the correct behavior.

Okay, I misused words "correct"/"incorrect". That was I called correct
is more like familiar to me.

Do you in fact assert that following EWMH here is necessary?

No, and I agree that current behaviour should be left as it was. I'm
just talking about removing code, that sets wrong state, from current code.

Do you consider this a bug in xmonad?

No
On 11/22/2016 09:16 PM, geekosaur wrote:

On Tue, Nov 22, 2016 at 12:59 PM, Bogdan Sinitsyn<EMAIL_ADDRESS>wrote:

The only difference from current behaviour is that new version minimizes
windows, that present on multiple workspaces, on all of them while
current minimizes on current one. But current version has code that
(un)sets _NET_WM_STATE_HIDDEN and sets window state to Normal/Iconic.
That could confuse statusbars/panels or applications themselves. So, the
current behaviour is not minimize at all, it is more like "make window
invisible on current workspace"

This already raises several questions, one of which I mentioned before but
you apparently decided to ignore.

There's stuff that already uses/presumably, by your interpretation,
"abuses" copyTo... expecting independent control per workspace. Your
approach means this is "illegal".

Your argument still assumes that following EWMH strictly is necessarily
the correct behavior. How far do you go with this? We violate this by
treating workspaces as things that can move between monitors, instead of
considering all monitors to span a single workspace; EWMH does not
explicitly say this is wrong but it is implied by the interrelationships
between its workspace-related properties. In particular, _NET_WORKAREA will
never work the way EWMH expects with a dwm/xmonad workspace model (there's
an active ticket about this). Do you in fact assert that following EWMH
here is necessary? If not, at what point does it become acceptable to you
to depart from strict EWMH behavior?

2a. The dwm/xmonad model also means that EWMH pagers will never work
correctly, regardless of the hidden window situation. Do you consider this
a bug in xmonad?
--
brandon s allbery kf8nh sine nomine associates
<EMAIL_ADDRESS><EMAIL_ADDRESS>unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/xmonad/xmonad-contrib/issues/90#issuecomment-262320711,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKyf5TDiyQEQOeLuned6QRMVMla4r2S3ks5rAzF0gaJpZM4KO0xP.

--
Bogdan Sinitsyn

I use the following code to obtain the titles of all windows managed by XMonad.
import XMonad
import Control.Monad (filterM, join)

titles :: X [String]
titles = do
  withDisplay $ \disp -> do
    (_, _, ws) <- io $ queryTree disp $ defaultRootWindow disp
    join $ mapM (runQuery title) <$> filterM isClient ws

If a scratchpad was minimized, could it be still detected by titles?

In neither the old nor new styles would it be mapped. It should still be present as a child of the root.
That said, queryTree is rather inefficient. You'd probably do better to use XMonad.StackSet.allWindows. (This also means you can dump the isClient check.)

I am getting the hangs of it, but I don't understand clearly.
Are you saying that if I used XMonad.StackSet.allWindows or isClient, would I be safe against the changes proposed by this issue?

You are safe either way. I'm just suggesting something faster (and less "hammer the X server") than queryTree, and that if you use it you also don't need isClient any more (since isClient just checks if it's in the StackSet somewhere, which it must be if you're getting the window list from the StackSet).

When I wrote titles, I didn't know better, so I ended up using X11 functions.
It turns out that I could just use allWindows. Thanks for the tip.

@f1u77y @geekosaur I saw that there was some discussion about _NET_WM_STATE_HIDDEN here, but I couldn't tell if a deliberate decision not to set that property in XMonad was made, or if support has simply not yet been implemented.

As discussed in https://github.com/xmonad/xmonad-contrib/issues/591 it's probably worth opening a new issue to brainstorm hot-swappable backends for NSP, in case people are interested.


fix: warn if maxDataSize=0

Stable object ID was removed in Node 12, so maxDataSize=0 is once again dangerous to use. We warn if the user sets it to this value in Node 12.
This also disables the circular reference test for Node 12+.
Fixes #742

[ ] Tests and linter pass
[ ] Code coverage does not decrease (if any source code was changed)

@DominicKramer FYI: You disabled a test that doesn't have to do with circular references (but it still is because of changes in the Inspector API in Node 12). I've re-enabled it conditionally running on Node 11 only.

@DominicKramer Why is it trying to run system tests on Node 8?

@kjin I think running system tests on Node 8 is an oversight.   They should be run on the newest Node.  We can address that issue in a followup PR.


Accept POST requests from HTML forms

Allows inserts or RPC calls via HTML forms like
<form method="post" action="https://myapi.com/people">
  <input type="text" name="fullname" />
  <input type="text" name="dob" />
  <!-- the other columns -->
  <input type="submit" value="Create New">
</form>

One thing which makes this functionality somewhat awkward is that after submitting the form the browser will arrive at a blank page because the default API response has no body.
My original motivation for this feature is a simple email list signup form.


Add not_resources

what

Adds the not_resources argument

why

adds functionality

/test all

@stratusjerry Thanks for the contribution! Released as https://github.com/cloudposse/terraform-aws-backup/releases/tag/0.12.0.


Declare mavenCentral repository explicitly as first repository

Rationale
We plan to update our Artifactory configuration so it no longer proxies for certain remote repositories. This requires that builds that require these remote repositories declare these repositories themselves.  We put mavenCentral as the first repository so it won't query our Artifactory instance when looking for external dependencies.
Related Pull Requests

Changes

Stop publishing buildInfo
Explicitly declare mavenCentral as first repository to check

Changes will be pulled froward from 21.3


Corrects the way the gemspec refers to various files

Fixes #1590

removes all use of git ls

LGTM


Image file location

After upgrading my years old allsky tonight 10PM located in Southern California following all instructions and performing sudo service allsky status to make sure allsky is running I cannot find the image folder, where is it ?

Fixed, found a statement buried in a shell about dark mode so I turned it off and now the IMAGE directory and images have been created.


HTTP Basic Auth is providing unauthorized access to protected resources.

I'm working on setting up HTTP Basic Auth and I think I may have found a nasty bug. When I go to the OpenAPI UI and access one of the protected routes, I get the username and password prompt as expected. When I enter an incorrect username and password, the prompt reappears so I can try again with different credentials (expected). The issue is that if I hit the cancel button on the prompt, the server returns a 401 HTTP Status code (expected), but also returns the data that they are not authorized to access (unexpected).
Here is how I setup the Basic Auth:
func initializeBasicAuth(app: App) {
    let credentials = Credentials()

    let basicCredentials = CredentialsHTTPBasic(verifyPassword: { username, password, callback in
        UserAuth.authEntry(username: username, onCompletion: { (authMatches, error) in
            if let entries = authMatches, let userAuth = entries.first {

                // Check Password
                let saltedPassword = "\(password)\(userAuth.salt)"
                let hashedPassword = hashPassword(saltedPassword)

                if hashedPassword == userAuth.hashedPassword {
                    let userProfile = UserProfile(id: userAuth.username,
                                                  displayName: username,
                                                  provider: "HTTPBasic")
                    callback(userProfile)
                } else {
                    callback(nil)
                }
            } else {
                callback(nil)
            }
        })
    })

    credentials.register(plugin: basicCredentials)
    app.router.get("/entries", middleware: credentials)
    app.router.put("/entries", middleware: credentials)
    app.router.delete("/entries", middleware: credentials)
}

So if I use the OpenAPI UI to perform a GET request on the /entries endpoint, I still get the JSON data back in the body of the response along with the 401 HTTP Status code in the headers.

Also confirmed by another Kitura user. From Slack conversation:
https://swift-at-ibm.slack.com/archives/C29BLC4KB/p1560408275024600?thread_ts=1560376184.023800&cid=C29BLC4KB

pushkarnk
Yup, this is easily reproducible. And it happens in a browser window too. So, doesn't look like an OpenAPI UI issue alone. It appears like HTTPBasic auth is broken

It may prove a good idea to add a unit test for this as well.

It turned out that the Credentials middleware was configured after configuring the route handler.
IMO, this critical nature of the order in which middleware is configured may not be clear to new users. As @dillan asked over slack, I'm not sure if it is possible to have any safeguards against doing these in a wrong order. Any thoughts @djones6 / @ianpartridge ?
The Routing documentation does talk about an order of execution for middleware and route handlers. But may be we should document this user error as a warning there? cc @helenmasters

@pushkarnk thanks for the heads up. @Andrew-Lees11 is going to add a line into the Routing documentation on kitura.io about the order of execution and we're also going to start work on a middleware guide, which should go into more detail about the order of execution.

Thanks @helenmasters


[BEAM-3030] Adds a deduplication key to Watch, and uses it to handle growing files in FileIO.match

https://issues.apache.org/jira/browse/BEAM-3030
CC: @reuvenlax

Fixed test failure, PTAL.

Test failure seems like an infrastructure flake.


Sort an array using bubble sort logic

Fixes #42
Changes proposed in this PR:

Sort an array using bubble sort logic

Codecov Report

Merging #46 into master will not change coverage.
The diff coverage is 100%.

@@          Coverage Diff          @@
##           master    #46   +/-   ##
=====================================
  Coverage     100%   100%
=====================================
  Files           2      3    +1
  Lines           9     22   +13
=====================================
+ Hits            9     22   +13

Impacted Files
Coverage Δ

02_bubble/main.go
100% <100%> (ø)

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 3f263dc...d61ebc8. Read the comment docs.

Please Update branch (click button above)

Please Update branch (button above) and git pull origin lab2 before adding local changes.

@juliaogris Updated branch as you informed above.

Removed fib files from this PR.

@anzdaddy I have removed fib*.go from this PR.

@juliaogris  I can not merge this PR as I need an approval from @anzdaddy


Still says "Connecting to Spotify"

Even after the last update, it won't show the album

Same issue here. Is this the same issue from May, or did Spotify break itself again?

I believe this is a duplicate of #18.


xsuspender confused by additional entry in /sys/class/power_supply

I'm using the "official" Ubuntu .deb on Ubuntu 22.04 on a HP Envy x360 convertible.
My /sys/class/power_supply contains a directory hid-0018:04F3:2B11.0001-battery which links to the battery of a stylus I (rarely!) use with my notebook. Unfortunately that directory has an online "file" which seems to always contain 1 (even when the stylus battery is empty...). As a result is_on_ac_power() in https://github.com/kernc/xsuspender/blob/0cca55847367709d377c2d0a5b50d4d6b474d458/src/events.c#L208-L234 always returns true and xsuspender does not work.
Any chance this could be fixed? Ideally of course by detecting that this directory doesn't represent an AC power source, but it would probably be sufficient to add a command line option (or environment variable) which lets me specify what subdirectory of /sys/class/power_supply represents my AC power source.

How about something like:
if (g_str_has_prefix(basename, "hid-"))
    continue;  // Skip HID devices

?

Yeah, that would probably work.


using TextEditingController in FlutterSummernote

Hi,
Is there any way to save the String value directly from the TextField into a controller (TextEditingController) without using keyEditor.currentState.getText()
I need to use a controller because sometimes I got null value when I used this:
final txt = await keyEditor.currentState.getText();
It will be good if you add a controller like this:
FlutterSummernote(
                controller: comment_control,
                hint: "Your text here...",
                //value: "text content initial, if any",
                key: keyEditor,
              ),

Thanks for good library

Sorry, I can't resolve this bug for further troubleshooting, since I always get what I expected with getText().
@blue492 can you give any example code that make keyEditor.currentState.getText() that resulting null?
Please add flutter doctor -v and what version do you use for this library.
Feel free to reopen this issue

The problem appear if use in FlutterSummernote in ListView which have many widgets, that means the list will be long and sometimes you need to scroll down or up in the list. If you have  FlutterSummernote at the top of the list and you write something it will show the text you wrote, but when you scroll down at the bottom of ListView and Scroll up again to FlutterSummernote you will see that the text you wrote has been removed.
I think the problem is that FlutterSummernote widget rebuild itself when you scroll down or up, that is why the text will be removed. _keyEditor should always save the text and FlutterSummernote should not rebuild itself when I scroll down or up.
When I put the the save button at the ListView bottom it return null to me when I call:
final txt = await keyEditor.currentState.getText();
In this case, I need either to add FlutterSummernote with save button in  AlertDialog or in a sperate page to get data.
I hope that you understood me @afandiyusuf
Thanks


Go 1.X support

From readme:

This fork should work for all versions of Go >= 1.8

However go get fails on Go1.8:
$ docker run --rm -it golang:1.8
root@979761930cff:/go# go get -u github.com/mdempsky/gocode
# golang.org/x/tools/go/internal/gcimporter
src/golang.org/x/tools/go/internal/gcimporter/bexport.go:212: obj.IsAlias undefined (type *types.TypeName has no field or method IsAlias)

Go1.9 seems to work fine.
Looking at #73 seems readme should be updated to say "Go >= 1.9"

You're right, thanks for pointing that out.

Fixed by https://github.com/mdempsky/gocode/commit/fa5c674aad2c2d9b67b2339701b192d95da2849d.