Variable value hover tooltips in debugger stop working after first hover

Didn't see another issue filed for this already so forgive me if I missed it:
In VS Code December release, we've noticed that when you hover over variable names while the debugger is stopped, it works the first time but then it doesn't work again until you resume debugging and it hits a new breakpoint.  Sometimes I see it stop working entirely even across debugging sessions.  I don't see any requests being made to my debug adapter on hover, so I'm guessing this is happening client-side.

We are improving the debug hover this milestone  (e.g we are adding a tree for complex variable inspection) so this should get fixed as a part of that.
I will close once I verify this is no longer happening

I no longer side this with our new debug hover work

Great!  Looking forward to the improvements :)

We're actually still experiencing this issue with the PowerShell extension in 0.10.8.  Here's some information from @rkeithhill:
--
I've observed that scope plays some part here. Global scope variables act flakey at first. They maybe show once but not thereafter as long as we're executing in global scope. As soon as I step into a function, the global variables pop debug data tips quite reliably. Unfortunately, I then get no data tips for the variables inside the function I'm executing in. And when there is not a data tip, it is because we never received a variables request from VSCode. Every time we receive a variables request (not related to populating the variables view), a debug data tip appears.
--
Is there some way that we might be returning our variable data wrong which causes the VS Code debug client to react incorrectly to data tip requests?  Let me know if I should file a separate issue for this.

I would if this could have anything to do with us using $ in the variable name e.g. $index.

I just checked if $ makes a difference on our side and it does not, we still treat $index as one word.
Rkeithill is right, the scope plays a big part there, once a user hover over a word we try to find a variable matching that word by going through all the 'non expensive' scopes. If the variable is not in the non expensive scopes the hover will not show it
To overcome these issues I suggest you switch to the alternative hover strategy - return supportsEvaluateForHovers as a part of the capabilites response. Then on hover VSCode will not go through the scopes but will always pass the hovered over value to the powershell adapter to be evaluated. This works better in practice if the powershell adapter can somehow guarantee that no dangereous scripts would be executed by accident in this way.
We currently use this approach for node and it works quite well for us.

Thanks Isidor!  I haven't been using the capabilities features of the debug protocol yet, so this seems like a good place to start.  We'll give that a shot and see if it helps for us.

That should fix this, since the issue explained here are the limitations of our 'scope sniffing' approach.
Closing for now, and we can open a seperate issue if the supportEvaluateForHovers does not do the trick for you

try to find a variable matching that word by going through all the 'non expensive' scopes.

What determines if a scope is expensive?  Higher up the callstack?  Would it matter that we have multiple "top-level" variable containers: Local, Script, Global and Auto?

Adapter decides for each scope if it is expensive
Not sure how powershell defines these, but hover does not sniff inside expensive scopes.

OK the issue is not related to the scope's expensive field as we always set it to false.

What message should I receive if I've implemented supportsEvaluateForHovers?  I'm pretty sure I have the initialize request returning the right data e.g.:
2/20/2016 4:17:12 PM [VERBOSE] - Method "ReadMessage" at line 111 of C:\Users\Keith\GitHub\rkeithhill\PowerShellEditorServices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageReader.cs

    READ MESSAGE:

    {
      "type": "request",
      "seq": 1,
      "command": "initialize",
      "arguments": {
        "adapterID": "PowerShell",
        "linesStartAt1": true,
        "pathFormat": "path"
      }
    }

2/20/2016 4:17:12 PM [VERBOSE] - Method "WriteMessage" at line 58 of C:\Users\Keith\GitHub\rkeithhill\PowerShellEditorServices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageWriter.cs

    WRITE MESSAGE:

    {
      "type": "event",
      "event": "initialized",
      "body": null
    }

2/20/2016 4:17:13 PM [VERBOSE] - Method "WriteMessage" at line 58 of C:\Users\Keith\GitHub\rkeithhill\PowerShellEditorServices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageWriter.cs

    WRITE MESSAGE:

    {
      "type": "response",
      "request_seq": "1",
      "command": "initialize",
      "success": true,
      "body": {
        "supportsConfigurationDoneRequest": true,
        "supportsFunctionBreakpoints": false,
        "supportsConditionalBreakpoints": false,
        "supportsEvaluateForHovers": true,
        "exceptionBreakpointFilters": null
      }
    }

But for hovers I'm still seeing a variablesRequest message and the hover tip behavior is still flaky.  I'll get it once for a variable but not a second time and some variables still don't show tips at all.
2/20/2016 4:17:30 PM [VERBOSE] - Method "ReadMessage" at line 111 of C:\Users\Keith\GitHub\rkeithhill\PowerShellEditorServices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageReader.cs

    READ MESSAGE:

    {
      "type": "request",
      "seq": 32,
      "command": "variables",
      "arguments": {
        "variablesReference": 74
      }
    }

2/20/2016 4:17:30 PM [VERBOSE] - Method "WriteMessage" at line 58 of C:\Users\Keith\GitHub\rkeithhill\PowerShellEditorServices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageWriter.cs

    WRITE MESSAGE:

    {
      "type": "response",
      "request_seq": "32",
      "command": "variables",
      "success": true,
      "body": {
        "variables": [
          {
            "name": "$itemCount",
            "value": "5",
            "variablesReference": 0
          }
        ]
      }
    }

BTW this is what I'm seeing:

I've noticed that if I use the debug toolbar to step, I don't hardly get any hover tips during debugging.  I believe that is because when I move the cursor off the toolbar down to the code I'm interested in, I move the cursor over something that doesn't have a hover tip (or I'm moving the cursor too fast that it goes away). Anyway, I get a more repeatable experience by not moving the cursor much and using F10/F11 to step the script.

@rkeithhill sorry for not mentioning it, but you should use our alpha release, since the evaluate on hover feature is not shipped in our January release. It will be a part of February.
As for the hover tips delay, it is also implemented in the alpha release (there is a 300 ms timeout).
Can you please try it in alpha release and if you still see this strange behaviour I will investigate the underlying issue.

I don't have access to that site/builds. I have the latest Insiders build but I don't think that's the same.  I can ask @daviwil if he has access to alpha builds.

Here's a direct link which you should have access to
https://az764295.vo.msecnd.net/alpha/719730a346c842ea29d8a8fe99016e802e39a819/VSCodeSetup-alpha.exe

I see what you mean by issues with side-effects.  One of the first things I accidentally hovered over was a Write-Output command that requires input and if it is not supplied to the command, the command asks the host to ask the user for the input.  Not a good experience while debugging.  I don't think we are going to be able to use supportsEvaluateForHovers safely.
I updated the alpha just a few minutes ago and reverted back to the original 0.4.1 PowerShell extension version.  The flaky behavior is still there.  Tips show once and then not again until I step the debugger.  If there is anything I can do to help you figure out what is going on with this approach, don't hesitate to ask.  When the data hover tips work, they're beautiful.  :-)

I will investigate tomorrow / day after, can you just provide the simplest possible PS program for which this easily repros?

Here's the simplest repro:
# Set breakpoint on line 4 (last line) and run.  Hover over $date on
# line 3 multiple times.  Hover tips displays only the first time.
$date = Get-Date"Date is $date"

However this might give more insight into which stepping into another scope/stackframe helps:
# 1. Set a breakpoint on the last line of the script
# 2. Run the script until it breaks on the breakpoint on `foo 0 5`
# Hover over $date - be careful not to move the cursor over other
# variables that could display a hover tip.  $date should display
# a hover tip.  Move the cursor off and back onto $date - no tip.
# Hover over $proc, also no tip.
# 3. Press F11 to step into function foo.  Hover over $count in the
# function parameter list.  You should see 5, then move the cursor
# off and back onto $count, no tip.  Move over to $startIndex - also
# no tip.  No move the cursor up to $date and $proc (outside the function).
# Now these tips work correctly displaying hover tips every time you move
# over these variables.  Move over $date *inside* the function and note it
# works as well - every time.  Note: PowerShell uses "dynamic" scoping and
# NOT lexical scoping so variables from higher up the call stack are visible
# inside functions further down the call stack.  Weird but true.  :-)
# 4. Continue to step through the foo function to observe only the first
# hover tip from a variable inside the function (except $date) works.

$date = Get-Date
$proc = Get-Process 'Code - Alpha'

function foo($startIndex, $count) {
    $date
    "`$startIndex is $startIndex, `$count is $count"
    for ($i = $startIndex; $i -lt $count; $i++) {
        "`$i is $i"
    }
}

foo 0 5

Ok so I found the issue looking into the 4 line sample from above. The issue is that the variable $date exists in multiple scopes. Because VSCode has no deep language understanding yet, it can not correlate the word that is being hovered over with a scope. Thus when we search through scopes and find multiple matches for $date we are not sure which one to show so we show none.
This variable duplication seems to happen to powershell all the time, unlike other languages.
As a workaround the powershell adapter could say that all scopes except the local scope are expensive, thus the hover will only search in the local scope and always find a hover match. We do not use expensive for any other functionality except the hover so I think this is fine.
Opinions?

Another option could be for VS Code to always take the variable from the earliest scope in the scope list that the adapter returned.  I would think that most adapters would return their scopes with the most local scope first, but maybe there's a language out there that wouldn't play by the same rules.
Could also have some adapter configuration that dictates how to prioritize scopes.  Maybe there could be an extra field on the Scope object which gives a numeric priority order?  In the case that the adapter gave the same value (like 0) for the priority of all scopes, you could just continue with your current behavior of not showing anything since it's not obvious what to show.

All good ideas. Though taking the earliest might in some rare cases show the wrong result to the user which might be very confusing.
@weinand opinions?

Yep, agreed that it could be problematic.  Would be nice to have some opt-in behavior but I can understand if it would be too much of a special case.

Yes the earliest (first?) scope "might" not always be the best.  For instance, PowerShell returns Auto as the first scope which is a "filtered" view of Local variables.  It turns out that would probably be OK but I could see other debugger extensions that might put Global first above Local not realizing there are implications.  I do like the idea of having a separate field for lookup order for hover tips.  That way, display order in the debug view isn't implicitly tied to the lookup order.
FYI I've modified our code to have all other scopes except Local return Expensive=true and that has helped.  However I have found one other bug/issue in the process.  PowerShell is a case-insensitive language and given this method:
function Do-Work($workCount, $opt = 'foo')
{
    Write-Output "Doing work..."

    Write-Item $workcount

    Write-Host "Done!"
}

I get a hover tip on the first instance of $workCount but never on the second instance $workcount.  That should work.  Is there a metadata tag somewhere indicating a language is case-insensitive that perhaps we are failing to set?

Ideally, we would like to have the debugger always search three scopes in order.  First Local scope, then Script scope and finally Global scope.  We have a fourth scope Auto that is redundant with Local (filtered view of Local).  Currently, we always return all variables to VSCode in each of these scopes.  So it isn't very expensive to lookup a variable within each scope.  That lookup is O(1) since variable reference id passed to us is just an index into a List<>.

Good feedback, @weinand and me will discuss.
As for the moment we are not providing any option that an adapter can specify it is case-insensitive. This is something to add for the future and we should plan for it.

@rkeithhill @daviwil you might want to consider to do the lookup yourself: enable eval based hover and then in the eval request do the lookup yourself if the context == 'hover'.

@weinand I'll look at this tonight but when I first enabled supportsEvaluateForHover, we wound up evaluating PowerShell commands which blocked because most commands have mandatory input.  This caused the command to ask the debug host to prompt the user for that input.  Now I could implement some code to try to distinguish variables from other things (commands, expressions, etc) but that seems more dangerous to me.  :-)

@rkeithhill you are using your own implementation of eval. So you are in control what to do in the 'eval' that is used for the hover. Instead of using the normal 'eval' you could lookup the 'expression' in a data structure that you have prepared in the last stopped event (probably the same data structure that the adapter returns in the stacktrace > scope > variables requests). So basically you would mimic what the VS Code UI does, but you have more control over the details.


[feature] To support creating Azure DevOps variable as secret in library

Currently we are able to create Azure DevOps (ADO) variable group with CAF modules, but unable to mark them as secret when creating them using Terraform.
It is obvious that the secret is still visible in TF configuration files however we are planning to create it in another ADO project which they don't have access to the TF configuration that contains ADO variable group secret.
It seems that in Terraform ADO provider has the capability to do so here
Hopefully this can be supported in CAF modules.

Hi, not sure if this exactly what you're after but - CAF has a nice feature to set variables out of a KeyVault. This way you dont have to store the secret anywhere but the vault: https://github.com/Azure/caf-terraform-landingzones/blob/master/caf_solution/add-ons/azure_devops_v1/scenario/200-contoso_demo/variable_groups.tfvars#L75-L88


Commentate and improve readability of Observe.hs

Hope this is better. I commented all instances of unsafePerformIO and unsafeInterleaveIO. Since the rest of the code is safe, I hope this is convincing in regards to referential transparency.

Note that this pull request is to the safe-entanglement branch, not to master.


Dependencies inconsistencies between CocoaPods and SPM

Stencil 0.11.0 currently declare the following dependencies:

in its podspec, only declares one dependency to PathKit ~> 0.8.0
in its Package.swift, declares two dependencies, one to PathKit 0.9 and one to Spectre 0.8

Not sure why there's an inconsistency in the PathKit versions between the two, and why SPM would need a dependency to Spectre while CocoaPods wouldn't

Stencil uses SPM to build and test, so it only needs test dependencies in Package manifest. PathKit versions should match indeed but I guess ~> 0.8.0 will also match 0.9 version when installed via CocoaPods

By definition, ~> 0.8.0 matches any 0.8.x where x > 0. But doesn't match 0.9. So no, CocoaPods won't fetch PathKit 0.9 with that spec definition


Inference Time

Hi.
Where do I get the inference times for the test data?

Follow up.
Just noticed that eval.py does not print the time. The inference_video.py does for each frame. Also, the time is printed after each validation epoch during training.


The default make task should check if the required packages exist

old-mbp:helm aledbf$ make
go build -o helm.bin -ldflags "-X main.version=" helm/helm.go
helm/model/chart.go:6:2: cannot find package "github.com/Masterminds/semver" in any of:
	/usr/local/Cellar/go/1.5.1/libexec/src/github.com/Masterminds/semver (from $GOROOT)
	/Users/aledbf/go/src/github.com/Masterminds/semver (from $GOPATH)
helm/action/update.go:8:2: cannot find package "github.com/Masterminds/vcs" in any of:
	/usr/local/Cellar/go/1.5.1/libexec/src/github.com/Masterminds/vcs (from $GOROOT)
	/Users/aledbf/go/src/github.com/Masterminds/vcs (from $GOPATH)
make: *** [build] Error 1

This has been fairly standard practice for our Makefiles because (I think) it's too expensive to call make bootstrap for every make build target.
I'm going to close this, but please re-open if you have ideas for improving this.


Split pane layout

For tablets

I think this is resolved now with announcement of http://ionicframework.com/blog/splitview-has-landed/


Add "Go To [Output]" shortcut on Interactive Window

The Go To [Output] is on the CodeLens, but it doesn't support shortcut. I suggest adding a shortcut preference setting for it.

I believe this would require a command palette command for the Go To. Seems doable as we have one for Run cell.


Garbage text in UI

Does this issue occur when all extensions are disabled?: Yes/No

VS Code Version: latest
OS Version: Ubuntu 22

Steps to Reproduce:

Press Ctrl+E
Observe garbage text in the input: "edt mru"

It isn't really "garbage text", it is the directive/filter to show the (mru) most recently used (edt) editors - which is what you want (although it needs to have a space after it to function correctly).
I do not see the edt mru when I use that command on W11, Stable or Insiders.  Possibly a linux bug?

Sorry, so which one is it - a linux bug or a 'what you want'?

We closed this issue because it is a question about using VS Code rather than an issue or feature request. Please search for help on StackOverflow, where the community has already answered thousands of similar questions. You may find their guide on asking a new question helpful if your question has not already been asked. See also our issue reporting guidelines.
Happy Coding!

@bpasero Where did you see a question here?

@duzenko
Question: Why is there garbage text in the input: "edt mru"
Answer: edt mru shows a list of all opened editors

@bpasero Read the first post, steps to reproduce
This is a bug report, not only it's a garbage text but also prevents normal operation and is a UX bug


Withdraw challenge period needs a timer

Currently if needing to move to L1 from L2 the user does not know how long the challenge period is... there is just infiinite waiting. We need a timer so the person can be aware to come back to complete withdraw to the L1

Planned for August.


AndroidX support?

Hi. Will this project be receiving updates to support AndroidX?

Since this library doesn't rely on any external dependencies, I think it will only need the minVersion and targetVersion of the Gradle config to be updated for AndroidX support, right?
Not too much of an Android dev myself, so any guidance with this is very much welcome! My company is using this library in a few different production apps, so I'm very much committed to keeping it up to date.

Pretty sure this has been resolved by #34.


Current implementation tests on

Hey, thanks for sharing!
When training on partially corrupted labels, shouldn't we still evaluate on accurate labels? Current implementation evaluates on a dataset that has corrupted labels.
Or perhaps I'm missing something?
Thanks!

@henrikmarklund Depending on what you want to do. If you want to evaluate the generalization performance under the situation where the underlying data distribution has some probability of generating random labels, then you need to set the test data to also contain random labels. If on the other hand, you want to evaluate what is the effect of artificially corrupted training data with random labels, then the test data could be the original clean data. Hope this clarifies your question.

It does! Thank you! :)


Implements better xml node attribute handling

update to handle attributes in XML nodes in a more intuitive way to prevent loss of data.

Thank you for your contributions!

it was my pleasure? are you able to publish this version to sonatype?

now I published 0.3.2 https://search.maven.org/artifact/org.micchon/play-json-xml_2.12/0.3.2/jar


Fixing the bug of trying to create created resources during update, a…

…dding better way to name gen resource names

Can one of the admins verify this patch?


ready() is fired even when subscription is not fully loaded

according to the readme, ready() is described as "Return boolean value corresponding to subscription fully loaded", but from what I see, ready() is returning true, even when the subscription is partially loaded.

Thanks, I was unaware of this issue. I guess that I never tested that it worked properly. I'll see what I can do.

@andycjw This should now be fixed.

@numtel thanks, how does this code change work, why does using fut'return' fixed this?
is fut'return' same as fut.return()? I'm trying to learn how this work, but couldn't figure it out myself

@andycjw Yeah it's the same but because return is a reserved word, it's best to put it as a string (unless using ES6).
The reasoning behind this change can be traced back to these 3 lines of code. Just an oversight on my part in the initial development.


Quick Sort

Aim

To implement quick sort

Details

Its a C code

Programming language

[x] C
[ ] C++
[ ] Java
[ ] Python

Can I do in Java? I'm a participant of LGM Soc21.

Assign me this. Under LGMSOC21

Hi,
I want to implement this in python as a part of LGM-SOC'21.
@rahulsrivastava1  @Ayush7614 Please assign it to me. Thank you!!

Hi,
I want to implement this in C++ as apart of LGM-SOC'21.
@rahulsrivastava1  @Ayush7614  Please assign it to me. Thankyou!!

Hello, I  Himanshu Verma, and I would like to work on this issue. I will write code in C++.
Kindly @rahulsrivastava1 please assign me this issue

Hey
I want to implement Quick sort in C++, Java as apart of LGM-SOC'21.
@rahulsrivastava1 @Ayush7614 Please assign it to me.


Should we have child.textMaybe <-- ... ?

or, maybe, child.text.maybe ?

I'm now wondering if there's a good reason to keep child.text separate from child at all. Due to our implicits, we can already say child <-- fooObservable.map(_.toString) and that will work because an implicit conversion will be inserted into _.toString. But child <-- stringObservable will not work because there's no place to inject the implicit. Which feels unintuitive to someone not familiar with our implicits.
Our child.text already has def <--[T]($node: Source[T])(implicit ev: T => TextNode), we might as well just make child <-- itself into def <--[T]($node: Source[T])(implicit ev: T => Child), then we won't need child.text at all.


Develop

Orange pi can now communicate with TTGO TCall module.
it ill reply if ttgo tcall ask for time

I'm merging this code just because of Namaz time file, other wise kindly resolve comments before applying any changes in PR or you better create new PR for new feature.


ArrayIndexOutOfBoundsException on Safari (iPad)

Hello,
The following snippet: https://scalafiddle.io/sf/aIBFLrQ/1 crashes with an ArrayIndexOutOfBoundsException on Safari iPad.
I have tested with ScalaJS 0.6.14 and 0.6.15.
Works fine until iOS 10.3. Only iOS 10.3.1 is impacted from what I have been able to test.
From what I have been able to see with the debugger, is that an offset is computed as 8 while the array as 8 elements. Very weird, but the same expression returns 7 when evaluated in the debugger.

I have try to debug further, but I'm a bit confused by the definition of $imul and $g["Math"]["imul"]
How can I debug that further?

Thanks for the report. However, this definitely looks like a bug in the JavaScript engine. Probably a wrong optimization or codegen bug in general. There's nothing we can do about it.

I tried looking at the JS and with the following code, I can't reproduce
  var $imul =   (function(a, b) {
    // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/imul
    var ah = (a >>> 16) & 0xffff;
    var al = a & 0xffff;
    var bh = (b >>> 16) & 0xffff;
    var bl = b & 0xffff;
    // the shift by 0 fixes the sign on the high part
    // the final |0 converts the unsigned value into a signed value
    return ((al * bl) + (((ah * bl + al * bh) << 16) >>> 0) | 0);
  });

  function bitCount(i) {
    var t1 = ((i -<PHONE_NUMBER> & (i >> 1))) | 0);
    var t2 = (((858993459 & t1) + (858993459 & (t1 >> 2))) | 0);
    return ($imul(16843009, (252645135 & ((t2 + (t2 >> 4)) | 0))) >> 24)
  };

  const bitmap = -1588583920;
  const mask = -2147483648;
  const offset = bitCount((bitmap & (((-1) + mask) | 0)));

  console.log("NICO offset["+i+"]="+offset);

What I am missing to be able to be sure that's the browser ?

If it's an optimization bug, it might be extremely tricky to reproduce worth any kind of simplification of the code.
If it works in every single other JavaScript engine, that's as good a proof as any that it's a browser bug.

OK, closing it
For my culture, what is the definition of the associated function of $g["Math"]["imul"] in https://github.com/scala-js/scala-js/blob/741e7c4317ed3e9328505598af1a8040f886626e/tools/scalajsenv.js#L88 ?

That's 32-bit integer multiplication.

Ahhh, it's the Math.imul Javascript function! Sorry, that was a silly question.


Twitcasting error

Checklist

[x] I'm reporting a broken site support
[x] I've verified that I'm running youtube-dl version 2019.10.29
[x] I've checked that all provided URLs are alive and playable in a browser
[x] I've checked that all URLs and arguments with special characters are properly quoted or escaped
[x] I've searched the bugtracker for similar issues including closed ones

Verbose log

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '--list-formats', 'https://twitcasting.tv/hinatarosu']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2019.10.22
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.17763
[debug] exe versions: ffmpeg N-87196-g6cadbb1, ffprobe N-87196-g6cadbb1
[debug] Proxy map: {}
[generic] hinatarosu: Requesting header
WARNING: Falling back on generic information extractor.
[generic] hinatarosu: Downloading webpage
[generic] hinatarosu: Extracting information
[generic] twplayer?r8186: Requesting header
WARNING: Falling back on generic information extractor.
[generic] twplayer?r8186: Downloading webpage
[generic] twplayer?r8186: Extracting information
ERROR: Unsupported URL: https://ssl.twitcasting.tv/hinatarosu/twplayer?r8186
youtube_dl.utils.UnsupportedError: Unsupported URL: https://ssl.twitcasting.tv/hinatarosu/twplayer?r8186

Description

I am trying to get a .m3u8 or similar link on this livestream to run on VLC but I get the same error as above.

This may be the same issue as #21225.

... Too bad that issue has been locked.  Anyway, I wanted to let people know that the URL crawler of JDownloader 2 is able to download Twitcasting videos (named “index” by default).


Remove additional check for system roles

Describe the issue:
Check the usage of [1] and remove it if it is not needed. verify workflow related operations after removing the check.
[1]https://github.com/wso2/carbon-kernel/blob/4.7.x/core/org.wso2.carbon.user.core/src/main/java/org/wso2/carbon/user/core/common/AbstractUserStoreManager.java#L6895

This issue is being closed due to extended inactivity. Please feel free to reopen it if further attention is needed. Thank you for helping us keep the issue list relevant and focused!


Subsequent P2P exceeding 100%

App:  https://github.com/opensrp/fhircore/releases/tag/v0.2.3-rc1
Device : G60 3GB RAM 64GB ROM android 9
App ID: CHA, CHSS
Describe the bug

when sending data via p2p in subsequent times, the percentage is exceeding 100%. See video below.

https://github.com/opensrp/fhircore/assets/84722169/c89e92bb-1606-4cde-a872-27a82dafda33
added data  Household: Karimi, Family members: Williams, bear
Careplans: Family planning
To Reproduce

login to one device with CHA
login to another device with CHSS
ensure sync is completed on both devices.
add some data on the CHA device e.g add a HH and register members and enroll them to a careplan
initialize the p2p transfer.
after its complete. Disconnect the 2 devices.
Add records on the CHA device.
Try P2P again and observe.

Expected behavior

[ ] P2P should never go beyond 100%.
[ ] The % should show how many of any new records since last p2p have been transferred.
[ ] 100% shows a complete p2p and all records have been transferred from one device to another.

The issue is a big  complicated due to a design flaw. The _lastUpdated which is used is not unique and therefore we have multiple records with the same _lastUpdated  of the same resource type.
This means we have a numbers of cases where we can either ignore records by assuming that the next subsequent send should only fetch records whose _lastUpdated is >. The lastUpdated when fetched from the server can also be behind and it's never updated during insertion into the DB, this means we might miss some records during p2p sync that were synced from the server
We can try and fix the specific issues or change the initial design to so we have some sort of rowId that is unique and increments for new records and updates

@AnnieMungai
https://github.com/opensrp/fhircore/releases/v0.2.4-rc1
Device : android 11 & android 9
App ID: cha
This Fails QA.

P2P sync still exceeds 100%
This is now happening even on the initial sync. see below video (on subsequent sync)and screenshot(from initial sync)

https://github.com/opensrp/fhircore/assets/84722169/40728775-dd10-4bf7-9b3b-0e122193d85f

@ekigamba I would first check if this is indicative of a problem with records not being synced, if it is then we need to investigate deeply. If it's not, all records are being synced but for some reason the percent is >100, we can add a max on the percent as a stop-gap, then do a deeper investigation to make the percent more accurate

@pld  I agree. I also noticed that the p2p version being used is outdated

closing this, please reopen if we see it not working on the main branch

From my investigations, the total number of records sent via p2p sync are more than what is available on the database and therefore there might be some duplicate records being sent to the receiving device. This issue was replicated on the first p2p sync and not on the subsequent syncs.
:disappointed: This seems to be a regression caused when the p2p version updated here was changed back to 0.6.3. However, the library code traversed from FHIR Core seems to some of the interface params added to fix this :man_shrugging: . I'll be retesting the app by syncing afresh to confirm the bug no longer exists. The new changes to indexes do not have proper migrations and therefore the app crashes without a fresh install and sync.

@AnnieMungai
https://github.com/opensrp/fhircore/releases/tag/v0.2.4-rc3

This passes QA.


[DevTestLab] Rename --resource-group/-g to --lab-resource-group/-lg for all commands

Description
Rename --resource-group/-g to --lab-resource-group/-lg for all commands

Environment summary
Install Method: How did you install the CLI? (e.g. pip, interactive script, apt-get, Docker, MSI, nightly)
Answer here: Development version from master
CLI Version: What version of the CLI and modules are installed? (Use az --version)
Answer here:
azure-cli (2.0.6+dev)

acr (2.0.4+dev)
acs (2.0.6+dev)
appservice (0.1.6+dev)
batch (2.0.4+dev)
cdn (0.0.2+dev)
cloud (2.0.2+dev)
cognitiveservices (0.1.2+dev)
component (2.0.4+dev)
configure (2.0.6+dev)
container (0.1.3+dev)
core (2.0.6+dev)
cosmosdb (0.1.6+dev)
dla (0.0.6+dev)
dls (0.0.6+dev)
documentdb (0.1.5+dev)
feedback (2.0.2+dev)
find (0.2.2+dev)
interactive (0.3.1+dev)
iot (0.1.5+dev)
keyvault (2.0.4+dev)
lab (0.0.4+dev)
monitor (0.0.4+dev)
network (2.0.6+dev)
nspkg (3.0.0+dev)
profile (2.0.4+dev)
rdbms (0.0.1+dev)
redis (0.2.3+dev)
resource (2.0.6+dev)
role (2.0.4+dev)
sf (1.0.1+dev)
shell (0.2.3+dev)
sql (2.0.3+dev)
storage (2.0.6+dev)
taskhelp (0.1.2+dev)
testsdk (0.1.0+dev)
utility-automation (0.1.1)
vm (2.0.6+dev)

Python (Darwin) 3.5.2 (v3.5.2:4def2a2901a5, Jun 26 2016, 10:47:25)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]

Python location '/Users/vishrut/git-repos/azure-cli/env/bin/python'

OS Version: What OS and version are you using?
Answer here: MacOS 10.12.4
Shell Type: What shell are you using? (e.g. bash, cmd.exe, Bash on Windows)
Answer here: bash

-lg is not a valid flag. It can only be a single letter.

@tjprescott Aha I see.
@gxy001 As Travis has pointed out the short flag must be a single letter, feel free to provide your suggestion on what letter makes more sense to represent Lab's Resource Group.


It's having an issue. It gave me this error.

C:\Users\User\Documents>echo
ECHO is on.
C:\Users\User\Documents>adb connect <IP_ADDRESS>:58526
'adb' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\User\Documents>adb -s <IP_ADDRESS>:58526 push C:\Users\User\Pictures\no.png /sdcard/Download/
'adb' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\User\Documents>pause
Press any key to continue . . .

Do you hace adb installed on your system?

Do you have adb installed on your system?

Yes I do

Then set environment variable to the location where you have kept the adb files.
Or you can follow along with this tutorial
Once done, type 'adb' on the terminal and it show show something other than "not recognised". That should do it.

Then set environment variable to the location where you have kept the adb files.
Or you can follow along with this tutorial
Once done, type 'adb' on the terminal and it show show something other than "not recognised". That should do it.

Alright I’ll try this later. Thanks!

I'm closing this issue for now. Though feel free to reopen if you need more help.

I'm closing this issue for now. Though feel free to reopen if you need more help.

Alright thanks that should help.


rosdep: nixos: Add OpenCV cxxdev output

Nixpkgs (the Nix package collection) has recently changed the way CUDA dependency resolution works.
Packages that use OpenCV as a C++ dependency should now also include opencv.cxxdev along with opencv in order to allow CUDA to work correctly. When not using CUDA, this change is harmless.

rosdep PRs require two approvals before merging.

@audrow can you provide the second review?


Image upload: opening the crop tool reverts crop to 1:1

Describe the bug

When an image is uploaded, the aspect ratio is set to "none", but when the crop tool is opened for the first time, it reverts to 1:1.
To Reproduce
Steps to reproduce the behavior:

Paste or select an image in a new post
Post it, the aspect ratio is set to the original image's
Past or select an image in a new post
Open the crop tool and close it
Post it, the image is cropped to 1:1

Expected behavior

The crop tool for the first time should open with "none" aspect ratio selected
Screenshots

Details

Platform: Web, iOS
Platform version: 1.46
App version:

Additional context

Open the crop tool and close it

By "close it", do you mean pressing Cancel or Done? I can only reproduce this with pressing Done.
It probably makes sense for the initial selection to be "none" though.

There's another weird UX thing (which is maybe unrelated to your request).  My expectation is that it should start "from scratch" again, but what actually happens is that my old "already cancelled" edits show up. This seems confusing.

https://github.com/bluesky-social/social-app/pull/1415


In/Out/Fault Flow's is setting to 'None', if we edit an API in the Publisher

Steps to reproduce:

Create API with existing mediation policies in the drop down list such as json_to_xml_in_message, log_out_message, json_fault.
Publish the API
Edit the API and go to implement tab.
We could observe that mediation policies set to 'None' in IE and firefox old version browser.

Fixed with https://github.com/wso2/carbon-apimgt/pull/5917


error: invalid argument to --rsort

for like 2 weeks i'm getting this error:
~ $ pacaur -Ss pacaur
error: invalid argument to --rsort

while cower works as expected
~ $ cower -s pacaur
aur/archupdate 1-1 (0)
    A simple script to update archlinux using pacmatic and pacaur.
aur/pacaur 4.3.2-1 (352)
    A fast workflow AUR helper using cower as backend
aur/pacaur-git 4.3.2-1 (21) [installed: <IP_ADDRESS>.ga59dc2e-1]
    A fast workflow AUR helper using cower as backend

Tried updating both to latest git versions, didnt change anything.
Any ideas would be appreciated, really like using pacaur ;)

What's your cower version?

ok now i feel stupid. updated cower again and now it works. i'm sure i did this a few days ago.
thanks for your time ;)

;)

i am on cower 12 and it does not recognize popularity as a key for (r)sort:
cower --rsort=popularity -i cower
error: invalid argument to --rsort
   --sort=KEY, --rsort=KEY
       Sort the results in ascending or descending order, respectively, by KEY where KEY is firstsubmitted, lastmodified, maintainer, name, outofdate, version or votes.

fixed by changing sortby to votes in /usr/bin/pacaur - maybe this should be the default?

Why don't you use the latest cower?

warning: cower-2:12-2 is up to date -- reinstalling

$ pacaur -Ss cower
aur/cower 14-2 (563, 16.91) [installed]
Stop using third party repo if you're unable to manage them properly.

ouch, sorry. i did not quite realize this came from an untrusted repo.. works now

Note you can use the VerbosePkgLists option in pacman.conf to display repositories when installing/updating packages. That option also extends the main prompt of pacaur for AUR packages.

thanks for the tip!


MSVC: support finding build tools even when Visual Studio IDE is not installed

Fixes #1844

coverage: 87.97% (+0.001%) from 87.969%
when pulling 059640478bd9a8d5723844ab7a6874d79451c722 on Keithcat1:main
into 23a42e032d9cbe2347cd47546b14839e2b01bad6 on dart-lang:main.


Tsconfig Pretty Json

Would you accept a pull request to take the prettyJSON logic from atom-typescript as well as the use of detect-indent and detect-newline to maintain the formatting of tsconfig.json.
https://github.com/TypeStrong/atom-typescript/blob/master/lib/main/tsconfig/tsconfig.ts
...

import detectIndent = require('detect-indent');
import detectNewline = require('detect-newline');

...

export function prettyJSON(object: any, indent: string | number = 4, newLine: string = os.EOL): string {
    var cache = [];
    var value = JSON.stringify(
        object,
        // fixup circular reference
        function(key, value) {
            if (typeof value === 'object' && value !== null) {
                if (cache.indexOf(value) !== -1) {
                    // Circular reference found, discard key
                    return;
                }
                // Store value in our collection
                cache.push(value);
            }
            return value;
        },
        indent
    );
    value = value.replace(/(?:\r\n|\r|\n)/g, newLine) + newLine;
    cache = null;
    return value;
}

...

if (projectSpec.filesGlob) { // for filesGlob we keep the files in sync
    var prettyJSONProjectSpec = prettyJSON(projectSpec, detectIndent(projectFileTextContent).indent, detectNewline(projectFileTextContent));

    if (prettyJSONProjectSpec !== projectFileTextContent && projectSpec.atom.rewriteTsconfig) {
        fs.writeFileSync(projectFile, prettyJSONProjectSpec);
    }
}

Hi there.  If it comes with some tests, positive and negative, sure.

I've added the prettyJSON function to the tsconfig.ts module. I need to add the tests.
Any suggestions on what tests you would like me to add?
So far I can think of 3 positive tests - preserves tabs, preserves spaces, and preserves newlines. Drawing a blank on what else to add tests for.
Any suggestions on how you want me to add the tests?
I took a look at the existing tests and one option I saw was to add a command line assertion function that loads an input tsconfig, calls either the prettyJSON function or the saveTsConfigSync function, and then verifies that the indentation / new line from the source matches the output.
Let me know what your preferences are and I'l get these added and the PR submitted.

The tests that are specified in the Gruntfile are mostly that way because they're trying to test some end to end stuff (and as an accident of history).  You probably just need one of those with a command line assertion function.  Then some positive and negative tests possibly in the style of the options reaolver tests if you can find a seam. The Nodeunit tests are generally much faster and simpler to understand.
Feel free to submit the PR right away and just say it's WIP.  Thanks for contributing!

As I think about it, I am not sure a command line assertion will help you since this feature doesn't map to a tsc fracture.  So I think Nodeunit is your best bet.

Hmm so the tests 'pass' but....   I had used atom to manually control crlf and lf in the source/expected files and of course git will normalize these.
One option, I could replace the use of source/expected files with inline strings in the test functions using "\r\n" and "\n" as needed. Thoughts? If you want me to go the inline string route should I inline all of the source/expected files or just the ones testing newline behavior?

Yes in-lining the ones where the line endings are relevant will be the most cross platform way of doing it.  I think opening/replacing/rewriting the files prior to each test run to ensure the line endings are as expected would be fine too.  That should only be a few lines of code, hopefully.  Thanks for doing this PR!  I hope this has been interesting and fun for you.

This is released in grunt-ts v6.0.0-beta.16 on npm.  Thank you!


Clean mantis root folder

We need to reduce the clutter on the root folder:
Files like MODEL_FASTER_RCNN.md , README_MKDOCS.md, ABOUT.md can probably be moved under docs/
images/ can be moved under docs/,
Maybe we can also move notebooks/ and examples/ under docs/? I'm not sure about this one though, being on the root folder can facilitate exploration.
samples can probably be moved under tests. That would require additional refactoring because of test_utils though...

I will try cleaning this up. 👍 md files might create a mess later on.

Closed: done in the PR #367


Icons being clipped

The zocial Twitter icon (and many of their other ones) is being clipped.
<FAKIconImage name={'zocial|twitter'} size={50} style={{width:50, height: 50}} color='white' />

I've tried messing with the both the size prop, and what I pass to width and height, but it keeps clipping.

What is that view wrapped in? The view itself doesn't look square, just
curious if thats the issue
Thanks,
Cory Smith
http://ca.linkedin.com/in/corysmith/
http:/twitter.com/smixx http://twitter.com/smixx
On Fri, Jun 26, 2015 at 10:29 AM, Marc Shilling<EMAIL_ADDRESS>wrote:

The zocial Twitter icon (and many of their other ones) is being clipped.
<FAKIconImage name={'zocial|twitter'} size={50} style={{width:50, height: 50}} color='white' />
[image: Image of clipping]
https://camo.githubusercontent.com/51f5e8c42f0a120e2264046a1788613c9f198546/687474703a2f2f692e696d6775722e636f6d2f737558564a36422e706e67
I've tried messing with the both the size prop, and what I pass to width
and height, but it keeps clipping.
—
Reply to this email directly or view it on GitHub
https://github.com/corymsmith/react-native-icons/issues/55.

Nope, even if I make the icon my very top level view it is still clipped:
<View style={{flex: 1, backgroundColor: 'black', paddingTop: 20}}>
   <FAKIconImage name={'zocial|twitter'} size={50} style={{width:50, height: 50}} color='white' />
</View>

This is just an issue with zocial, btw. If I use fontawesome|twitter, it works great.

I am experiencing clipping with fontawesome|keyboard-o

@corymsmith Did you have any thoughts as to the source of this issue?

It has to do with the image scaling mode and the fact that those icons aren't equal width & height. I haven't had time to look into it though
On Fri, Aug 21, 2015 at 8:43 AM, irfaan<EMAIL_ADDRESS>wrote:

@corymsmith Did you have any thoughts as to the source of this issue?
Reply to this email directly or view it on GitHub:
https://github.com/corymsmith/react-native-icons/issues/55#issuecomment-133204370

I'm experiencing this in FontAwesome too. For example, check out fontawesome|bicycle and fontawesome|diamond.

The problem might lie in this section of code:
https://github.com/corymsmith/react-native-icons/blob/6a2e9c532d8dde7d90a6ce7593971dfd2f1a039e/iOS/ReactNativeIcons/Libraries/FontAwesomeKit/FAKIcon.m#L118-L134
I'm not totally sure, as I don't know much about Objective-C. But basically I think the solution would be to find the actual aspect ratio of the font icon, and then if one of its dimensions exceeds the size parameter passed to the React component, shrink that value to equal size while also reducing the other dimension by the same ratio.

@ffxsam You should check out https://github.com/oblador/react-native-vector-icons
He's fixed all these issues in his lib, I'm most likely discontinuing support on this lib to focus on pushing forward other open source projects. There's no need for competing icon libs that do the same thing :)

Oh man, thanks for the link! You saved me from spending hours later on trying to fix this. ;) Maybe you could include a note to this effect on the npmjs page, so people don't stumble down the same path I did.

@ffxsam Just added a warning now


[Flow Visibility] Add depolyment files of policy recommendation Spark job in k8s cluster

Codecov Report

Merging #3280 (ab7e661) into main (c135609) will decrease coverage by 16.99%.
The diff coverage is n/a.

:exclamation: Current head ab7e661 differs from pull request most recent head 90ebb81. Consider uploading reports for the commit 90ebb81 to get more accurate results

@@             Coverage Diff             @@
##             main    #3280       +/-   ##
===========================================
- Coverage   58.76%   41.77%   -17.00%
===========================================
  Files         292      202       -90
  Lines       24724    24301      -423
===========================================
- Hits        14530    10151     -4379
- Misses       8622    13117     +4495
+ Partials     1572     1033      -539

Flag
Coverage Δ

kind-e2e-tests
?

unit-tests
41.77% <ø> (+1.62%)
:arrow_up:

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


[cleanup] Remove vendor

ISSUE TYPE

Code cleanup Pull Request

SUMMARY

Remove vendoring since we have switched to go modules
Update Dockerfile to use go mod

Fixes #165

we could add vendor dir under .gitignore as well.

Yes, thanks @aananthraj


Support for timeout propagation in async requests

Feature Request
Currently the methods handling the request/reply pattern exposed in the Connection class don't have support for propagating a timeout for async clients.
Use Case:
We are using the async request/reply pattern in our Java application. While testing at 10TPS, we have noticed high memory usage with reachable objects not being properly garbage collected in a timely manner.
The async clients using the request implementation in NatsConnection don't have the possibility to pass a timeout to the NatsRequestCompletableFuture being created, which is using a default hardcoded timeout of 10 minutes: NatsRequestCompletableFuture.
Proposed Change:
New API exposed, proposition in PR:  #617
Who Benefits From The Change(s)?
Any client using the request/reply pattern in asynchronous way.
Alternative Approaches
Leave as is, I don't see an alternative as the current timeout is private and hardcoded in NatsRequestCompletableFuture

Resolved via  #617


Framework, scripts and tests.

The bin/ directory holds scripts meant to be user-executable and helpful. It contains a collection of functionality that was previously submitted to contrib/devtools/, but as discussed, this repo is now considered the best place. These differ from the earlier submission in that they are now built off of the framework and have a bunch of extra amenities provided by the shared code.
The framework/ directory holds common infrastructure that can help accelerate future scripts and automation.
The test/ directory is a set of scripts that test the scripts in the bin/ directory and are invoked by .travis.yml to prevent breakage upon future refactoring and enhancement.
The scripts all have -h output courtesy of argparse that describe functionality and options. The bin/README.md file also gives a quick overview.
Out of the box, this can build from scratch and compute the full set of reports for the master branch of bitcoin/bitcoin like so:
$ bin/clone_configure_build.py ~/bitcoin-build
(output snipped)
$ bin/reports.py ~/bitcoin-build
(output snipped)

The BerkeleyDb 4.8 workspace and other miscellaneous file are written to /tmp/bitcoin-maintainer-tools/ (by default). For the clang toolchain binaries, it defaults to using the highest installed version in PATH, but it can also be pointed to a different toolchain directory (e.g. -b ~/clang+llvm-3.9.1-x86_64-linux-gnu-debian8/).
Where it makes sense, the scripts allow limiting the scope to individual files and/or subdirectories. Illustrated by example:
$ bin/clang_format.py check ~/bitcoin-build/src/init.cpp
--------------------------------------------------------------------------------
1472 files tracked in repo
 407 files in scope according to .bitcoin_maintainer_tools.json settings
   1 files examined according to listed targets
   4 parallel jobs for computing analysis
--------------------------------------------------------------------------------
A code format issue was detected in /home/isle/bitcoin-build/src/init.cpp

 +--------+         +------------+--------+---------+-----------+------------+
 | score  |         |     before |  added | removed | unchanged |      after |
 +--------+ +-------+------------+--------+---------+-----------+------------+
 | 90.39% | | lines |       1644 |    148 |     158 |      1486 |       1634 |
 +--------+ +-------+------------+--------+---------+-----------+------------+
--------------------------------------------------------------------------------
These files can be formatted by running:
$ clang_format.py format [option [option ...]] [target [target ...]]
--------------------------------------------------------------------------------

*** code format issue found

The repository is and .clang_format file is inferred from the targets. They can be formatted and re-checked like so:
$ bin/clang_format.py format ~/bitcoin-build/src/init.cpp
$ bin/clang_format.py check ~/bitcoin-build/src/init.cpp
--------------------------------------------------------------------------------
1472 files tracked in repo
 407 files in scope according to .bitcoin_maintainer_tools.json settings
   1 files examined according to listed targets
   4 parallel jobs for computing analysis
--------------------------------------------------------------------------------
No format issues found!
--------------------------------------------------------------------------------

Also, the report  and check subcommands of the scripts all have a --json mode that provides the full information to assist with programmatic uses (bisecting, charting, etc.).
The intention is to provide utility for the main bitcoin/bitcoin project, but the scripts appear to work well for forks too. For example, you can point to Elements, build, and compute the analysis and reports:
$ bin/clone_configure_build.py -u https://github.com/ElementsProject/elements -b elements-0.13.1 ~/elements-build
$ bin/reports.py ~/elements-build

If the target repo provides a .bitcoin-maintainer-tools.json file, it helps the tools to know which subtrees to ignore, etc. If the repo doesn't have one, it uses .fallback-bitcoin-maintainer-tools.json which holds the appropriate settings for v0.14.0.

Thanks, sorry, never noticed this PR before! That's a lot of new tools.
Will have a look.

Some spelling/grammar errors noticed

Closing for now. Let me know when you want to work on this again


Form Radio Button - Wrong One Sent On Submission

It seems a radio button isn't taking after being set.  The server is saying I sent the button sent to another value.
The form:
[radiobutton:0x3ff4bd04b428 type: radio name: searchCriteriaBean.conceptOperator value: and]
[radiobutton:0x3ff4bd0322e8 type: radio name: searchCriteriaBean.conceptOperator value: accrue]
[radiobutton:0x3ff4bd022924 type: radio name: searchCriteriaBean.conceptOperator value: ]
(last value should have a value of "phrase" but it is not showing up.
My set:
searchCriteriaBean.conceptOperator - accrue
Result:
Notifies me it was sent as "and"
Another issue.  In the original form inspection, It shows a nondescript field type that shows what I've set the field to use as a value:    [field:0x3fe009c36f1c type:  name: searchCriteriaBean.conceptOperator value: accrue]
Any further information needed, please let me know.
Cheers

this_search = "fish bucket"
this_province = ""
this_operator = "accrue"																# 'accrue' or 'and'
form_url = "http://example.com/cccSrch.do?lang=eng&prtl=1&tagid=&profileId=&rstBtn.x="

agent = Mechanize.new
page = agent.get(form_url)
CCCform = page.forms[0]
CCCform['searchPage'] = 'cccSrch.do?lang=eng&prtl=1&tagid=&profileId=&rstBtn.x='
CCCform['searchCriteriaBean.textField'] = this_search
CCCform['searchCriteriaBean.conceptOperator'] = this_operator
CCCform['sbmtBtn'] = 'Search'
CCCform['searchCriteriaBean.column'] = ''
page2 = agent.submit(CCCform)

myform = CCCform.inspect
puts myform

counter = 0
CCCform.keys.each do |i|
	print "#{i} - "
	puts CCCform.values[counter]
	counter += 1
end

searchCriteriaBean.conceptOperator is a radio button.

Closing this. Resolved on IRC

how was the solution?

You have to traverse the form in its GUI format and “check” id’s for radiobuttons.  As for checkboxes, same thing, but they remain sticky for the whole nameset.

On Jan 23, 2015, at 1:09 PM, muescha<EMAIL_ADDRESS>wrote:
how was the solution?

<EMAIL_ADDRESS>


Ability to pass custom pytorch loss function

I am trying to figure out if I can pass a custom loss to the underlying bert model. Is it something I can do from your code or do I need to mess with the Bert models in pytorch _transformer - the issue is I can locate the next sentence, masked label and LM modules . Not sure which one accesses the binary label model. Any tips / suggestions? Would be useful functionality for biased samples...

It looks like the loss is being assigned in  BertForSequenceClassification, and it doesnt look like I can over ride the loss function from outside of the huggingface implementation

It looks like the loss is being assigned in  BertForSequenceClassification, and it doesnt look like I can over ride the loss function from outside of the huggingface implementation

You should be able to. Subclass BertForSequenceClassification and build your own module. BertForSequenceClassification is simply a torch.nn.Module. You can override the forward() method to use your custom loss function.
    def forward(self, input_ids, attention_mask=None, token_type_ids=None,
                position_ids=None, head_mask=None, labels=None):

        outputs = self.bert(input_ids,
                            attention_mask=attention_mask,
                            token_type_ids=token_type_ids,
                            position_ids=position_ids,
                            head_mask=head_mask)

        pooled_output = outputs[1]

        pooled_output = self.dropout(pooled_output)
        logits = self.classifier(pooled_output)

        outputs = (logits,) + outputs[2:]  # add hidden states and attention if they are here

        if labels is not None:
            if self.num_labels == 1:
                #  We are doing regression
                loss_fct = MSELoss()
                loss = loss_fct(logits.view(-1), labels.view(-1))
            else:
                loss_fct = CrossEntropyLoss()
                loss = loss_fct(logits.view(-1, self.num_labels), labels.view(-1))
            outputs = (loss,) + outputs

        return outputs  # (loss), logits, (hidden_states), (attentions)

Replace CrossEntropyLoss() with your custom loss function.

Makes sense - Let me take a shot at it. Thanks!

Good luck!

It works!

Awesome!


Should fixes include a source attribute

dachar version: *
Python version: *
Operating System: *

Typical source would be dachar, but we may have other trusted sources.

@ellesmith88 : Please implement this, so a Fix record includes a "source" attribute that is typically: dachar: <dachar_version>, e.g. "dachar: 1.0.0".


thread 'isarworker' panicked at 'called Result::unwrap() on an Err value: UnknownIndex', packages\isar_core\src\collection.rs:374:49

import 'package:isar/isar.dart';
part 'todo_model.g.dart';

@collection
class Todo {
  String id;

  Id get isarId => fastHash(id);

  bool completed;

  String description;

  @Index()
  late int seqCount;

  int count = 0;

  Todo({required this.id, required this.description, this.completed = false}) {
    this.seqCount = ++count;
  }
}

int fastHash(String string) {
  var hash = 0xcbf29ce484222325;

  var i = 0;
  while (i < string.length) {
    final codeUnit = string.codeUnitAt(i++);
    hash ^= codeUnit >> 8;
    hash *= 0x100000001b3;
    hash ^= codeUnit & 0xFF;
    hash *= 0x100000001b3;
  }

  return hash;
}

///string to int with hashFunction
int stringToIntHash(String string) {
  return fastHash(string);
}

I'm trying to index this Todo By seqCount. With int Ids from String Ids database misarrange todos, the first one goes to 5th no, 5th to 7th etc.

Not sure if it's related, but I had a similar error message and managed to fix it (I think) by clearing the db.
Maybe when you create/open a new schema the indexes go out of sync and Isar throws an error.

Duplicate of #795


Create October_06.py

Q. 6 october python - Solved and added.

#17

Thanks for the contribution @Rishiwant1729


Thank you!

I used this repo to create a NPC speech mod for Cruelty Squad.  Appreciate your work on this.  Not really much out there I could find and especially not as easy to implement.

I also now used this addon in this project for AI NPCs:
https://github.com/teddybear082/godot-ai-npc-example

You're welcome.
I've merged in both open PRs and will try cutting a new major release later today, but I'm likely no longer updating this plugin. Aside from a technical issue that makes Linux compatibility more difficult, Godot was too difficult to use as a blind developer and I just can't maintain a long tail of projects in maintenance mode.
If anyone wants to take over ownership then let's talk, otherwise this is likely the last release.

Godot added native TTS support in the engine, so eventually this addon won't be necessary. Right now from my experience it's still buggy and cannot interface with some third-party software (e.g. NVDA on Windows), so this addon is still better.

Actually, if anyone wants to fix all the CI errors that just popped up, that'd be great. I don't have the bandwidth to battle GitHub CI's accessibility issues today. Thanks.

I took a peek to see what might be going on. Regarding the "Check" failing, seems like a random error cargo decided to throw that time. I tried running the CI on my fork and the check passed without issue, so you might need to just run the CI again.
As for the Android build, seems like that behavior was deprecated, and removed from version 7 onwards, hence the error now popping up. I don't have experience developing on Android, so I hope someone else can fix it.
Lastly, I really want to thank you for your work. I have a user that is fully blind and wanted to use a project I'm developing. This addon and the godot-accessibility addon work really well, and integrating them was effortless.


⚠ Bofrost.be has degraded performance

In a8993e9, Bofrost.be (https://www.bofrost.be) experienced degraded performance:

HTTP code: 200
Response time: 1411 ms

Resolved: Bofrost.be performance has improved in b52f0c7 after 1 hour, 1 minute.


Documentation (or, is this project dead?)

I've been playing around with this package, and while I think it has some merit and potential, it feels woefully under-documented, and its advice is confusing.
For example, I ran across an interpolated string in my code where the analyzer raised HAA0601. The help link does nothing, nor is there any code fix available, so I really don't know how to fix this. I'm guessing it's because the value types I have in the string will get boxed? So I created a small benchmark project:
using BenchmarkDotNet.Attributes;

namespace TestFormatting
{
	[MemoryDiagnoser]
	public class FormattingAndBoxing
	{
		private readonly uint value1 = 324;
		private readonly int value2 = 43219;

		[Benchmark]
		public int FormatStringWithNoToString() =>
			$"The expected call count is incorrect. Expected: {this.value1}, received: {this.value2}.".Length;

		[Benchmark]
		public int FormatStringWithToString() =>
			$"The expected call count is incorrect. Expected: {this.value1.ToString()}, received: {this.value2.ToString()}.".Length;
	}
}

The results were....interesting:
|                     Method |     Mean |    Error |   StdDev |  Gen 0 | Gen 1 | Gen 2 | Allocated |
|--------------------------- |---------:|---------:|---------:|-------:|------:|------:|----------:|
| FormatStringWithNoToString | 400.7 ns | 4.240 ns | 3.759 ns | 0.0496 |     - |     - |     208 B |
|   FormatStringWithToString | 118.4 ns | 1.277 ns | 1.132 ns | 0.0687 |     - |     - |     288 B |

So the second way is faster, but it actually allocates a bit more memory? Is this correct? If so, how do I really address this analyzer's diagnostic? Or is my test faulty?
It's really down to prescriptive advice. This package needs far better documentation for it to be useful on every-day projects. I'd love to use it and continue to provide feedback, but it's unclear if this is even being maintained anymore.

The project is not dead ... but at the same time the Roslyn team has decided they are going to incorporate this into some sort of Roslyn tooling. @jinujoseph / @sharwell?

The Roslyn team forked this code to dotnet/roslyn-analyzers with the intent of working towards a production-ready set of performance analyzers. Allocations are only one source of observed performance problem. Ideally, we want users to be able to document "performance sensitive" sections of code with [PerformanceSensitive], which links to a documented measurement scenario and describes the constraints that developers working in the code need to be aware of. Where possible, the analyzers would help enforce those constraints during builds.

Is there a preview of these performance analyzers yet?

@stebet The analyzers are getting published here: https://dotnet.myget.org/feed/roslyn-analyzers/package/nuget/Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers
The issue tracker for that package is here: https://github.com/dotnet/roslyn-analyzers/issues

I agree with @JasonBock. I loved this package, but even for simple things can be hard to tell what's wrong or what we can do about it. For example:
    public class Foo
    {
        public int Id { get; set; }
    }

    public class Bar
    {
        void DoSomethingWithFoo(Foo someFoo)
        {
            var somethingWithFoo = $"We received the Foo Id {someFoo.Id}";
        }
    }

We received this warning:

HAA0601	Value type to reference type conversion causes boxing at call site (here), and unboxing at the callee-site. Consider using generics if applicable

and... what? I can't imagine a simpler code, and for some reason we need change or fix this code. A really really simple suggestion about what's happening or what we can do will be really amazing.


Tony/21_chrome_support

Pull Request Details
What issue does this PR address

Fixed the issue that video cannot be played on Chrome.

Link to associated issue: #21

Checklist
Complete the check-list below to ensure your branch is ready for PR.
Flutter Style Guide: https://survivor.togaware.com/gnulinux/flutter-style.html

[x] Screenshots included in linked issue
[ ] Changes adhere to the team style and coding guideline
[x] No confidential information
[x] No duplicated content
[x] No lint check errors related to your changes (make prep or flutter analyze lib)
[ ] Pre-exisiting lint errors noted: [HERE]
[ ] Tested on at least one device

[ ] Android Phone
[ ] Android Emulator
[ ] Chrome on Android
[x] Chrome
[ ] iOS
[ ] Linux
[x] MacOS
[ ] Windows

[x] Added 2 reviewers (or 1 for private repositories then they add another)

Finalising
Once PR discussion is complete and 2 reviewers have approved:

[ ] Merge dev into the branch
[ ] Resolve any conflicts
[ ] Add one line summary into CHANGELOG.md
[ ] Bump appropriate version number in pubspec.yaml
[ ] Push to git repository and review
[ ] Merge PR into dev

I am getting a black window on Linux. When I click Play the audio is heard but no video.

I am getting a black window on Linux. When I click Play the audio is heard but no video.

Thanks @gjwgit. I'll check it on Linux.

If my black screen on chrome is not seen on other OS then please merge this PR and have the Linux issue as a separate issue for resolution later on.

If my black screen on chrome is not seen on other OS then please merge this PR and have the Linux issue as a separate issue for resolution later on.

Hi @gjwgit, I will fix it in #30. This issue will be merged first.


More strict commit policy for stable branch

The motivation behind this was a cherry-pick of c204036 to the 15.09 release branch, which broke evaluation. Now I've cherry-picked another commit which was needed by c204036 (58e9440) because otherwise evaluation would fail.
I by myself didn't state a reason at the time where I was cherry-picking the commit but figured that I should have done so after being noted by @lethalman about a related work that removes the changes in the commit I have cherry-picked.
Long story short: If we cherry-pick stuff to any of the release branches, we should explicitly state the reasons why we did so.
Not only because reviewers spend less time wondering about the introduced changes but to give the committer time to rethink about whether it really is necessary to include the change to a supposedly
stable branch.

Cc: @NixOS/nixpkgs-committers

:+1:

:+1:

As long as we're discussing this, shouldn't there be an actual policy written in that document for what could or should be cherry-picked to the stable branch vs what shouldn't?

@wizeman: That's actually a good point. I mean security and bug fixes may sound obvious, but even that isn't so clear if you give it a second thought, for example: Do you just add a patch or update to the newest upstream version? What about mass-rebuild changes? And what about changes that are not security/bug fixes? What about changes to NixOS modules?

Maybe we could agree to adhere to http://chris.beams.io/posts/git-commit/

@DamienCassou this article is nice, but it's over plus for us IMO.

I think that the best start is to by example.
Find agreement with a list of good commits to stable, and a list of bad
commits to stable. I think that any attempt to write a generalization
without examples will not be clear enough.
Please use actual commits that happened; there is no need to write against
what never happened.
Regards,
Lluís.
On Thu, Dec 10, 2015 at 09:33:52PM -0800, Arseniy Seroka wrote:

@DamienCassou this article is nice, but it's over plus for us IMO.

Reply to this email directly or view it on GitHub:
https://github.com/NixOS/nixpkgs/pull/11609#issuecomment-163845227

@DamienCassou: I already am quite "nazi" about commit messages and I'm already committing almost as in the linked article. However I do put a period at the end of the subject (will avoid that from now on because I didn't realize that I always OCDed it in).
So from my point of view, I'd strongly recommend making that the default commit policy so that we at least can try to encourage people to do so.

:+1:

Squashed and pushed (while leaving authorship with Aszlig).


Provide option to setup sudoreplay.

This MR provides option to setup sudoreplay with sane defaults. It is disabled by default.

thanks for the contribution! published to the galaxy as v1.0.10


Suggestion to add initialValues prop for Server Side Rendering

redux-form takes an initialValues prop, which hydrates the state from the server so that the page appears complete on first render. Would this be hard to achieve with violet-paginator?

I don't think it would be hard to add support for that. We could allow the initialize action to accept some optional initial values. The pagination wrapper could also accept this optional prop and pass it along to initialize.
Feel free to submit a PR if I can't get to it first.

@markau I submitted #8 as a proposed solution for this. I haven't tested it yet whatsoever. Do you want to see if it works for you? The idea is you supply a preloaded prop to the paginated component, and that would be an object like this:
const preloaded = {
  results,
  totalCount,
  page
};

That should allow the component to render with that data and also prevent it from performing a fetch when it initially renders.

Yes, nice work, that is doing the job. It does cause a re-render of the page though - i.e. the grid header appears instantly on page load, and then a short time later the data appears. It's faster than waiting for the API with the spinner. I am passing the preloaded data via mapStateToProps to the connected component FWIW.

Oh and it doesn't paginate on that initial SSR load (it displays all results). Does preloaded need a 'number of items per page' property?

My thinking was that you would just pass in a single page of data. violet-paginator is designed to request new pages of data from the fetch function that you provide. It's probably not a good idea to pass in your entire result set, because if your result set gets large your query will take too long to execute. So something more like this would probably fit the bill in terms of the data that your server is returning:
const query = SomeModelClass.all
const totalCount = query.count()
const page, perPage = getPageParameters()
const results = query.paginate({ page, perPage })

return json({
  results,
  totalCount,
  page
})

Ok that seems obvious now that you mention it. Thanks.
It is working well.
This is beyond my React/JavaScript knowledge, so if you happened to know why the pagination results (i.e. the numbered buttons), and the preloaded data, force a re-render - both follow the initial server page render by about half a second - then I'd be keen to explore it further.

Sure, I will have to do some testing and see what I can see. I suspect the result would be the same without server rendering, i.e. just using the preloaded prop from a parent component. So I can try to recreate it that way, or you can link me to your repo if you like.

I have seen this issue where components must call the window namespace (which doesn't exist on the server, only after the client JavaScript runs.)

I confess that I am inexperienced with server rendering. If you think the above point is relevant, can you elaborate on it or provide some resources?

@markau I've been hacking on a server rendering example today and I've confirmed my suspicions as to the cause of the re-render. The first problem is that the preloaded data doesn't get inserted directly into the components, but instead it gets passed into an action creator that triggers a state update. After the state update, the components re-render with the updated state that contains your preloaded data.
I was able to fix the datatable by inserting those props directly into the component if they are present and we are uninitialized. However, this doesn't currently work for the pagination controls because the props that they rely on are getting updated as a result of the initialize action.
In other words, it may take me a little bit of refactoring to solve this problem, but I think I'm pretty close to a solution. Thanks for your patience.

Sorry for the poor response time, and don't stress because this library is so good, with or without SSR.
Now that you outlined the state update that makes sense as to why it would re-render. I have learnt enough about React and Redux to understand that; but I probably wouldn't have been able to work it out. So, thanks.
Take your time - I am happy to do any testing, just let me know.

@markau I think I got it. My last commit includes an example server rendering app that seems to work correctly with no re-render. Please let me know if it works for you. I'll have to add some automated testing before merging, but until then you could reference the commit hash in your package.json
"violet-paginator": "github:sslotsky/violet-paginator#ef40fccc11a2310258f2fa296171d73cbc94659d"

No worries! I'll explore this over the next day or so. Just to be a problem user - I am using ReactJS.NET, not Node/Express, which presents some limitations - for example, I need to pass the preloaded data in as a prop and not via the window.__PRELOADED_STATE__ method. This is not ideal, but works for my scenario. I have had to do this workaround with some other libraries; it shouldn't require any changes to your commit so far.
On first glance, the main thing I need to work out is if my preloaded data coming in (via prop) is shaped liked this:
const initData = {
      "results": [
        {
          "id": 0,
          "hop": "chinook",
          "AAU": 5,
        },
        {
          "id": 1,
          "hop": "cascade",
          "AAU": 5,
        }
      ],
  totalCount: 2
};

I see that I need to instantiate the Violet-Paginator reducer with this:
pagination: List(preloadedState.pagination)

instead of what I have currently:
pagination: pagination

Therefore, my preloadedState object needs to be more than just the results object.

Maybe I'm reading you wrong but it sounds like your conflating preloadedState with the preloaded data. The preloadedState object should be what's returned by store.getState().
You are correct that preloadedState.pagination will have to be wrapped in a List when you create your store on the client side. This is a little janky to be sure, but there's no good way around it at this time since I didn't anticipate the difficulties with using immutable state together with server rendering. violet-paginator expects store.getState().pagination to contain the reducer, so we're kind of boxed into this setup for now.

Ahh yes, thank you for the clarification.
It seems with the benefit of Node/React/Redux on the server, you are passing in the reducer as an object (i.e. preloadedState.pagination). That is pretty sweet. I will have to build preloadedState.pagination based on the preloaded data.
I feel I have taken enough of your time, and I might just need to spend some time getting stuck into it.
Thank you for your efforts so far!

Very well, I'll leave you with a final tip and wish you good luck.
preloadedState.pagination is not built based on the preloaded data, as you say. In my case, I assembled the preloaded object out of some dummy data here:
https://github.com/sslotsky/violet-paginator/pull/8/files#diff-ec1f2d30c0816883347c4f8dfbe79f8cR26
The preloadedState, on the other hand, comes from store.getState() after using combineReducers and createStore to create the redux store. It then gets passed into the server template.
https://github.com/sslotsky/violet-paginator/pull/8/files#diff-07409a3d26b27197506269128d994d73R31
I basically just followed the [redux server rendering example)(http://redux.js.org/docs/recipes/ServerRendering.html) to create the store and save it to window.__PRELOADED_STATE__. Then I assembled my preloaded object and passed it directly into the VioletPaginator and VioletDataTable components.
Hopefully that clears some things up further. Best of luck!

Hey Sam, I agree that the issue is resolved. Thanks for implementing it. I'm sure I will get it working when I get some time; just a matter of priorities.

Hi @markau , I know this issue's closed, but I just finished working up a more realistic example of SSR with violet-paginator for a personal project that I'm hacking on. As I worked through it I realized that passing some preloaded data into the component itself isn't really feasible in the typical setup. However, if you do something like this on the server:
      const pageActions = composables({ listId: 'posts', preloaded: payload })
      return store.dispatch(pageActions.initialize())

then the data will be correctly preloaded on the client. Here's a full SSR example using react-router
import React from 'react'
import DevTools from 'CLIENT/DevTools'
import { match, RouterContext, createMemoryHistory } from 'react-router'
import { Provider } from 'react-redux'
import { renderToString } from 'react-dom/server'
import { syncHistoryWithStore, routerMiddleware } from 'react-router-redux'
import thunk from 'redux-thunk'
import { compose, createStore, applyMiddleware } from 'redux'

import routes from 'CLIENT/config/routes'
import reducer from 'CLIENT/reducer'
import template from './template'
import Browse from 'MODULES/posts/components/Browse'
import * as posts from 'SERVICES/posts'
import { composables } from 'violet-paginator'

const preload = (store, query, params) => ({
  [Browse]: () => {
    return posts.list().then(payload => {
      const pageActions = composables({ listId: 'posts', preloaded: payload })
      return store.dispatch(pageActions.initialize())
    })
  }
})

export default function(req, resp) {
  const memoryHistory = createMemoryHistory(req.path)
  const router = routerMiddleware(memoryHistory)

  const store = createStore(
    reducer,
    compose(applyMiddleware(router, thunk), DevTools.instrument())
  )

  const history = syncHistoryWithStore(memoryHistory, store)

  match({ history, routes, location: req.url }, (error, redirectLocation, renderProps) => {
    if (error) {
      res.status(500).send(error.message)
    } else if (redirectLocation) {
      res.redirect(302, redirectLocation.pathname + redirectLocation.search)
    } else if (renderProps) {
      const { components, query, params } = renderProps
      const component = components[components.length - 1]
      const handler = preload(store, query, params)[component]
      const promise = handler ? handler() : Promise.resolve()

      promise.then(() => {
        const html = renderToString(
          <Provider store={store}>
            <RouterContext {...renderProps}/>
          </Provider>
        )

        const preloadedState = store.getState()
        resp.send(template(html, preloadedState))
      })
    }
  })
}

Hey @sslotsky, thanks for thinking of me and posting this. I had to drop SSR, as it was completely reliant on ReactJS.NET which is not particularly well supported (the current version causes a memory leak in the web server with no fix in sight).  Client-side is making life easier, so all good.
Keep up the good work on violet-paginator. (So many downloads yet so few stars!)


PayPal Express Button not working on iOS

Description
Okay, so first and foremost I am really new to programming in HTML. The issue I am having is when customers on iOS devices; hit our Pay Now button which was generated from Paypal; they are brought to a page where they can only Pay with a paypal account. Android, Windows, and Mac Computers/Laptops all seem to be able to display correctly. I can provide screenshots for iOS device if necessary. Thanks for your help!
http://templestonemanagement.com/application-fee/
form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="EFX3YXKDLG9PQ">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_paynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form

This is how it looks on Windows, Andriod, and Mac OS. But, on iOS devices the option to pay with debit/credit card without a PayPal account does not exist.

Closing this issue as a similar question was raised here: https://github.com/paypal/paypal-checkout/issues/510#issuecomment-339413692
Also -- this repo is only for the javascript integration. There are docs / demos here if you'd like to try it out:
https://developer.paypal.com/docs/integration/direct/express-checkout/integration-jsv4/add-paypal-button/
https://developer.paypal.com/demo/checkout/#/pattern/client
Thanks!

I added in config.xml and it works! :+1:

<platform name="ios">

I added this in config.xml and it works!
    <allow-navigation href="*">
    <allow-intent href="https://*/*" />
    <allow-intent href="itms:*" />

I had same problem and added this in config.xml and it works!

I had same problem, added this in config.xml and it works!
 <platform name="ios">         <allow-navigation href="*">         <allow-intent href="https://*/*" />

I had same problem, added this in config.xml and it works!
<platform name="ios">
<allow-navigation href="*">
<allow-intent href="https://*/*" />


Upgrade bouncycastle from 1.73 to 1.77

Fixes #28636
Note:

https://github.com/bcgit/bc-java/issues/1469#issuecomment-1672700715

Reviewing cheatsheet
Before merging the PR, comments starting with

❌ ❓must be fixed
🤔 💅 should be fixed
💭 may be fixed
🎉 celebrate happy things

Do we expect there to be any visible changes to the user for this? Is this worthy of an upgrade guide entry?

I don't think so.


Remove custom short codes

What this PR does / why we need it:

Removed {{% md %}} short code because there is no value in supporting it
{{% howto_img "description" "image_path" %}}  is replaced by ![](image_path)*description*

{{% notice note %}} is replaced by Docsy supported {{% alert color="info" %}}
{{% notice info %}} is replaced by  Docsy supported {{% alert color="info" %}}
{{% notice warning %}} is replaced by Docsy supported {{% alert color="warning" title="Warning" %}}
{{% notice tip %}} is replaced by Docsy supported {{% alert title="Tip" color="primary" %}}

This PR will also fix the broken images in the changed files.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
@JordanJordanov
Release note:

The Documentation now uses only Docsy supported short codes

We shall document the supported Docsy ShortCodes

/lgtm


The selected node box has ugly grow something around

How about the shading on the box instead of growing?

not a problemmmm


small change to the way bars are summed

@lindsaycarr I put this in and it fixed the bar height issue. I think using a join to make sure the sites are mapping correctly is a good idea and also needed to add landuse.pct to y.bottom to get the heights right.

Ah yes, I like that. I don't use joins too often, so those don't come to mind first. Since you already have a PR up, could you add tidyr and dplyr to the import list in visualizeLandUse.R?

@lindsaycarr same change needs to be made for the conc fig


How to import 'regions' plugin from 'react-wavesurfer' in a React component ?

import Regions from 'react-wavesurfer' working just fine.


Fix Xbox One Controller Buttons

Xbox One Controller no use the same button scheme as Xbox 360 Controllers. Test with https://html5gamepad.com/
Note: Still kept separate section for xbox controllers in the gamepad update just in case things change.

There is a conflict with what's new


[BUG]: ChatGPT - There is a possibility that the generation is not working properly.

🐛 Describe the bug
generate_kwargs is not properly passed to PPOTrainer. So, generating sentences might be incorrect. (At leat in my case)
https://github.com/hpcaitech/ColossalAI/blob/5d5f475d758347b5e61dbb4b0ccb6108821e3e93/applications/ChatGPT/chatgpt/trainer/ppo.py#L64-L76
Like Huggingface GPT2 Model, prepare_inputs_fn and update_model_kwargs_fn should be passed to generate. But in that code, these functions are not applied because _set_default_generate_kwargs() is called after super().__init__()
So, I think the order of call should be changed.
Environment
No response

Hi, _set_default_generate_kwargs() will modify generate_kwargs inplace, so this is OK. But I agree the order is bad and we will update this.
Thanks for your suggestion!

Can you create a PR to solve this problem? All contribution is welcome.


Header updates

Resolves 58, 61, and 78

Closing because I don't think the PR url is updating.

Closing! fixed on main


max_execution_time does not work for some queries in create_pandas_dataframe_agent

System Info
python == 3.11
langchain == 0.0.286
windows 10
Who can help?
@hwchase17
Information

[X] The official example notebooks/scripts
[ ] My own modified scripts

Related Components

[ ] LLMs/Chat Models
[ ] Embedding Models
[ ] Prompts / Prompt Templates / Prompt Selectors
[ ] Output Parsers
[X] Document Loaders
[ ] Vector Stores / Retrievers
[ ] Memory
[X] Agents / Agent Executors
[ ] Tools / Toolkits
[ ] Chains
[ ] Callbacks/Tracing
[ ] Async

Reproduction
from langchain.chat_models import AzureChatOpenAI
from langchain.agents.agent_types import AgentType
from langchain.agents import create_pandas_dataframe_agent

llm = AzureChatOpenAI(
                deployment_name = "gpt-4",
                model_name = "gpt-4",
                openai_api_key = '...',
                openai_api_version = "2023-08-01-preview",
                openai_api_base = '...',
                temperature = 0
                )

df = pd.DataFrame({
    'Feature1': np.random.rand(1000000),
    'Feature2': np.random.rand(1000000),
    'Class': np.random.choice(['Class1', 'Class2', 'Class3'], 1000000)
})

agent = create_pandas_dataframe_agent(
                                                        llm,
                                                        df,
                                                        verbose=False,
                                                        agent_type=AgentType.OPENAI_FUNCTIONS,
                                                        reduce_k_below_max_tokens=True,
                                                        max_execution_time = 1,
                                                     )

agent.run('print 100 first rows in dataframe')

Expected behavior
The max_execution_time is set to 1, indicating that the query should run for one second before stopping. However, it currently runs for approximately 10 seconds before stopping. This is a simple example, but in the case of the actual dataframe that I have (which contains a lot of textual data), the agent runs for around one minute before I receive the results. At the same time, if the query doesn't request a large amount of data from the model to output, the agent would stop in one second. For instance, if my query is agent.run('give some examples of delays mention?'), the results would not be returned because the max_execution_time is 1, and it needs roughly three seconds to output the results. Therefore, this troubleshooting indicates that there's an issue with the max_execution_time when the requested output is too lengthy.

Could you confirm if this issue is consistent across different types of queries or if it only occurs with specific ones?
Yes, it is consistent across different types of queries
Have you noticed any patterns or specific conditions under which this issue occurs?
If requested output is too lengthy.
Could you provide more details about the size and structure of the real dataframe you're working with? (Please ensure to anonymize or generalize any sensitive information)
20k rows and 10 columns. One of column include textual data (about 20 sentences for each entry in that column)
Are there any error messages or warnings that appear when the issue occurs?
nope


draft Test merge 02

from @go-while :
i fixed the randomness, hashkey. was zero/empty when i debugged it.
removed the split func. the randomBytes were not initialized as they should have been.
removed the logrus dep and implemented own logger as "darelog" 👯 with correct string formating
passed darelog to all instances, creates in main
export LOGLEVEL=DEBUG|INFO|WARN works as intended
removed mutexes from dare-db get/set/del and moved these to go-redis-hashtable, where they should be.

@go-while are you not allowed to create ready PRs ?

@go-while are you not allowed to create ready PRs ?

i can but i did not as this won't work if you don't pull the other PR with the beatiful new little darelogger :dancers:


Option to disable catalogs

It would be great to have the option in the configurator to disable catalogs outright.
My use of the addon is exclusively to supplement Cinemeta when searching for specific content.
The catalogs and discover options only serve to clutter the UI in that use case.
I love the addon. Thanks for all your hard work!
Hoping this isn't outside of the project scope.

Unfortunately this is an option that is completely out of scope, most users are looking for an alternative to Cinemata, it doesn't make sense to add another option to the configuration page just for that.


harbor HA: why need to change iptables?

I read the article Harbor High Availability Guide, and get the info:
11> Change iptables

Important

You need to change <IP_ADDRESS> to your VIP address before issue the follow command, if you just use http for Harbor, then you don't need run the second command.

#>iptables -t nat -A PREROUTING -p tcp -d <IP_ADDRESS> --dport 80 -j REDIRECT
#>iptables -t nat -A PREROUTING -p tcp -d <IP_ADDRESS> --dport 443 -j REDIRECT

i cannot understand this rule's meaning, and this way looks be not a common case.
i also google some info, like below:

https://serverfault.com/questions/179200/difference-beetween-dnat-and-redirect-in-iptables
https://www.cyberciti.biz/faq/linux-port-redirection-with-iptables/

and check man manual:
   REDIRECT
       This  target  is  only valid in the nat table, in the PREROUTING and OUTPUT chains, and user-defined chains which are only called from those chains.  It redirects the packet to the machine itself by
       changing the destination IP to the primary address of the incoming interface (locally-generated packets are mapped to the localhost address, <IP_ADDRESS> for IPv4 and ::1 for IPv6).

       --to-ports port[-port]
              This specifies a destination port or range of ports to use: without this, the destination port is never altered.  This is only valid if the rule also specifies one of the following protocols:
              tcp, udp, dccp or sctp.

       --random
              If option --random is used then port mapping will be randomized (kernel >= 2.6.22).

       IPv6 support available starting Linux kernels >= 3.7.

from my original view, the REDIRECT should be used to forward local port, but this article does not use --to-ports option,  i cannot understand the purpose, anyone can explain this iptables rule? thanks in advance.

@yixingjia please help to clarify the concern. Thanks

@kulong0105
Hi  Allen,
Thank you for this question. We find that in Ubuntu OS without the above rules, the traffic package will not be able to come back to client.  From the node you can use tcpdump to watch that you did receive the package.
Mean while we are not expert on this network domain, and you are highly appreciated if you can do some investigation on how to make it works without this workaround.  Then we can discuss how to update the document with your experiment result.
Regards,
Yixing.
.

@yixingjia
Hi Yixing,
Thanks for your reply.  you are right, i use tcpdump to capture the package, and find the package cannot be sent to client, unless set the iptables rule.
BTW: this situation not only appear on Ubuntu OS, but also happen on CentOS, i guess this issue should be not related to the kind of OS.
i try to dig the details,  and find this should be relevant to the strategy of load-balancing of keepalived，it uses “DR” as “lb_kind” in this example(https://github.com/vmware/harbor/blob/release-1.5.0/make/ha/sample/active_active/keepalived_active_active.conf)
Maybe use "NAT" as "lb_kind" can avoid to use the iptables rule(http://www.keepalived.org/doc/load_balancing_techniques.html)
i would like to use Nginx/Haproxy  as LoadBalancer, they both have no need to set the iptables rule, and it looks be more general, also easy to configure.
for nginx, the configuration looks like below:
{code}
cat /etc/nginx/nginx.conf
For more information on configuration, see:
* Official English Documentation: http://nginx.org/en/docs/
* Official Russian Documentation: http://nginx.org/ru/docs/
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
Load dynamic modules. See /usr/share/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;
events {
worker_connections 1024;
}
http {
log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log  /var/log/nginx/access.log  main;

sendfile            on;
tcp_nopush          on;
tcp_nodelay         on;
keepalive_timeout   65;
types_hash_max_size 2048;

include             /etc/nginx/mime.types;
default_type        application/octet-stream;

# Load modular configuration files from the /etc/nginx/conf.d directory.
# See http://nginx.org/en/docs/ngx_core_module.html#include
# for more information.
include /etc/nginx/conf.d/*.conf;

}
stream {
upstream apiserver {
server IP1:80 weight=5 max_fails=3 fail_timeout=30s;
server IP2:80 weight=5 max_fails=3 fail_timeout=30s;
server IP2:6443 weight=5 max_fails=3 fail_timeout=30s;
}
server {
    listen 80;
    proxy_connect_timeout 1s;
    proxy_timeout 3s;
    proxy_pass apiserver;
}

}
{code}
for haproxy, the configuration looks like below:
{code}
cat /etc/haproxy/haproxy.cfg
...
#---------------------------------------------------------------------
main frontend which proxys to the backends
#---------------------------------------------------------------------
frontend  main *:80
acl url_static       path_beg       -i /static /images /javascript /stylesheets
acl url_static       path_end       -i .jpg .gif .png .css .js
use_backend static          if url_static
default_backend             app

#---------------------------------------------------------------------
static backend for serving up images, stylesheets and such
#---------------------------------------------------------------------
backend static
balance     roundrobin
server      static <IP_ADDRESS>:80 check
#---------------------------------------------------------------------
round robin balancing between the various backends
#---------------------------------------------------------------------
backend app
balance     roundrobin
server  app1 IP1:80 check
server  app2 IP2:80 check
server  app3 IP3:80 check
{code}

If we change to NAT it also have other issue and some performance concerns.
instead of use nginx+ haroxy I would recommend you to use keepalived+haproxy
Let the keepalived to provide the VIP and haproxy to provide the load balancing.
So that your lb nodes are also under HA protection.
Since for your solution, if the nginx turn down, your HA will broken.
We use Keepalived here to provide both VIP and loadbalance role because it is easy to configure.

@yixingjia
I mean keepalived+nginx  or  keepalived + haproxy to implement HA and load balancing


fuzzy match / case insensitivity

Remembering the exact keyword can be difficult. Should be able to match regardless of case, and include the ability to fuzzy match. Returning more than 1 entry asks which you want to use.

Ended up just using fzf with my elvish shell;
fn 2fa~ { 2fa | fzf | awk '{print $1}' | gocopy }

2fa brings up a fzf list of all OTP codes, and hitting enter adds the OTP to the clipboard. Works great.