text:
Lanczos algorithm + EDKit

Dear Jie,
Thank you for your excellent package.
I have successfully solved the problem with a spin-1 diamond chain up to 12 spins.
Now, I aim to increase the number of spins to 18 while conserving SzT by applying TranslationalBasis.
I have 64 GB of RAM, and the code gets terminated when the total Sz exceeds sector 6.
To address this issue, I need to utilize the Lanczos algorithm. Here is the code I have managed:
using EDKit, LinearAlgebra
using DelimitedFiles
using KrylovKit
# Hamiltonian parameters:
J1 = 1.0
J2 = J1
J3 = 2.8
J4 = J1
J5 = J1
L = 6
N = 3*L
k=0
sz_min = 0
sz_max = N
B_min = 0
B_max = 0
uB = 0.01
# -------------------------------------------------------
all_energies = []
Size_EigVals = []
for i in sz_min:sz_max
        # onsite Hamiltonian matrix
        O1 = spin((J1, "xx1"), (J1, "yy1"), (J1, "zz1"), D=3)
        O2 = spin((J2, "x1x"), (J2, "y1y"), (J2, "z1z"), D=3)
        O3 = spin((J3, "1xx"), (J3, "1yy"), (J3, "1zz"), D=3)
        # hz = spin((ha, "z11"), (hb, "1z1"), (hc, "11z"), D=3)
        h1 = O1 + O2 + O3
        C1 = spin((J4, "1x1x11"), (J4, "1y1y11"), (J4, "1z1z11"), D=3)
        C2 = spin((J5, "11xx11"), (J5, "11yy11"), (J5, "11zz11"), D=3)
        h2 = C1 + C2
        Nj = diag( spin((1,"z11"), (1,"1z1"), (1,"11z"), D=3) + 3*I )
        total_z(s) = sum(Nj[sj+1] for sj in s)
        basis = TranslationalBasis(L=L, f = s -> total_z(s) == i, k=k, base=3^3)
        H = trans_inv_operator(h1, 1:1, basis) + trans_inv_operator(h2, 1:2, basis)
        if i <= 6
           energy = eigvals(Hermitian(H))
        else
           energy = eigsolve(H, ones(size(H, 1)), howmany=20, which=:SM, T=Float64)
        end
        println("size Eigenvalues = ", size(energy, 1))
        push!(Size_EigVals, size(energy, 1))
        for sublist in energy
            for element in sublist
                push!(all_energies, element)
            end
        end
    println("*************************************************************")
    println("-------------- Finished job: SzT = ", i, "--------------------")
    println("*************************************************************")
end

open("Energies_DiamondS1_cSzT_k0_EDKit_EnDig_J$(J3)_N$(N).txt", "w") do io
    for energies in all_energies
        for En in energies
            writedlm(io, En, '\n')
        end
    end
end

open("Size_EigVals_J$(J3)_N$(N).txt", "w") do io
           writedlm(io, [Size_EigVals], '\t')
end

But I get following error:
LoadError: Tuple field type cannot be Union{}
Stacktrace:
 [1] eigsolve(f::EDKit.Operator{Float64, TranslationalBasis{Int64, Float64}}, x₀::Vector{Float64}, howmany::Int64, which::Symbol; kwargs::@Kwargs{howmany::Int64, which::Symbol, T::DataType})
   @ KrylovKit ~/.julia/packages/KrylovKit/diNbc/src/eigsolve/eigsolve.jl:183
 [2] top-level scope
   @ ~/DiamondS1/EDKit_DiamondS1_FTLM.jl:38
in expression starting at /home/DiamondS1/EDKit_DiamondS1_FTLM.jl:21

It seems that eigsolve is unable to recognize the Hamiltonian matrix, whether it's the full Hamiltonian or the reduced Hamiltonian after applying TranslationalBasis.
I would appreciate your comments and suggestions on this issue.

Hi Hamid,
The object Operator currently is not an AbstractMatrix. It can multiply to a vector, though. So for the Lanczos algorithm, the way to go is to use the method
eigsolve(f, x₀, [howmany = 1, which = :LM]; kwargs...)

Here, the first argument can be the multiplication function x -> H * x.

Dear Jie,
I performed
x₀ = ones(size(H, 1))
energy = eigsolve(x -> H * x, x₀, howmany=1, which=:LM)

But still get following error
ERROR: LoadError: MethodError: no method matching eigselector(::var"#3#7"{EDKit.Operator{Float64, TranslationalBasis{Int64, Float64}}}, ::Type{Float64}; howmany::Int64, which::Symbol)

Closest candidates are:
  eigselector(::Any, ::Type; issymmetric, ishermitian, krylovdim, maxiter, tol, orth, eager, verbosity) got unsupported keyword arguments "howmany", "which"
   @ KrylovKit ~/.julia/packages/KrylovKit/diNbc/src/eigsolve/eigsolve.jl:205
  eigselector(::AbstractMatrix, ::Type; issymmetric, ishermitian, krylovdim, maxiter, tol, orth, eager, verbosity) got unsupported keyword arguments "howmany", "which"
   @ KrylovKit ~/.julia/packages/KrylovKit/diNbc/src/eigsolve/eigsolve.jl:237

Hi Hamid,
The "howmany" and "which" are not keyword argument, you can try removing the argument names in the eigsolve function.

Thank you for your response,
Term  energy = eigsolve(x -> Array(H) * x, x₀) still does not work, and I get similar error. Please know that I need to limit the number of eigenvalues to smaller values compared to the hole spectrum specifically for 18 number of spins.
So, the term howmany may play important role.
I used the alternative term Arpack.eigs :
if i <= 3
        energy = eigvals(Hermitian(H))
    else
        # x₀ = ones(size(H, 1))
        # energy = eigsolve(x -> Array(H) * x, x₀)
        # energy = eigsolve(x -> H * x, x₀)
        energy = Arpack.eigs(Array(H), nev=100, which=:LM, tol=1e-8)

end

Arpack.eigs seems work, but it always returns 6 eigenvalues. I tried other option: which=:SR, but Arpack.eigs does not give more than 6 eigenvalues.

Sorry for the confusion. What I mean is
energy = eigsolve(x -> H * x, x₀, 1, :LM)

That is the usage of eigsolve in KrylovKit when the first argument is a function.
Besides, when H is getting large, you can also consider using sparse(H) to get a sparse matrix of the Hamiltonian (and for that purpose you need to import SparseArrays). Using Array(H) is not very efficient in this case.

I tried what you suggested:
x₀ = ones(size(H, 1))
energy = eigsolve(x -> H * x, x₀, 1, :SR)

still I get error:
ERROR: LoadError: MethodError: no method matching iterate(::KrylovKit.ConvergenceInfo{Vector{Float64}, Vector{Vector{ComplexF64}}})

Closest candidates are:
  iterate(::KrylovKit.SplitRange)
   @ KrylovKit ~/.julia/packages/KrylovKit/diNbc/src/KrylovKit.jl:83
  iterate(::KrylovKit.SplitRange, ::Any)
   @ KrylovKit ~/.julia/packages/KrylovKit/diNbc/src/KrylovKit.jl:83
  iterate(::Core.MethodMatch, ::Int64)
   @ Base deprecated.jl:265

I also considered x = ones(size(H, 1)), but it did not help to solve the problem.
btw, when I consider sparse(H) I get following error from line if i <= 3 energy = eigvals(sparse(H)) :
ERROR: LoadError: MethodError: no method matching eigvals!(::SparseMatrixCSC{Float64, Int64})

Closest candidates are:
  eigvals!(::AbstractMatrix{T}, ::Cholesky{T}; sortby) where T<:Number
   @ LinearAlgebra /snap/julia/92/share/julia/stdlib/v1.10/LinearAlgebra/src/symmetriceigen.jl:217
  eigvals!(::SymTridiagonal{<:Union{Float32, Float64}, <:StridedVector{T} where T})
   @ LinearAlgebra /snap/julia/92/share/julia/stdlib/v1.10/LinearAlgebra/src/tridiag.jl:265
  eigvals!(::SymTridiagonal{<:Union{Float32, Float64}, <:StridedVector{T} where T}, ::UnitRange)
   @ LinearAlgebra /snap/julia/92/share/julia/stdlib/v1.10/LinearAlgebra/src/tridiag.jl:268
  ...

Well it is a bit strange. On my computer, for i=7, eigsolve(x -> H * x, x₀, 1, :SR) works fine.
Anyway for Lanczos problem, you can alway convert the Hamiltonian to sparse matrix and then use the Arpack to solve the eigenvalues.
eigs(sparse(H), nev = 20, which=:SR)

As for your second error message. It is just because eigvals function does not work for sparse matrices. So for the complete diagonalization case, you don need to convert H to a sparse matrix.

Thank you very much for your assistance.
The command energy, _ = eigs(sparse(H), nev = 20, which=:SR)  works well for system with N <= 12.
However, when I attempted to diagonalize the Hamiltonian for the 18-spin system, I encountered a memory error. This happened even when I reduced nev to 1, indicating that the memory issue persists regardless of the number of desired eigenvalues.
The error occurs specifically at i = 7 for the 18-spin system, leading to the termination of the diagonalization process. This is unexpected as I am operating on a PC with 64 gig of RAM.
I had the same issue when I tried to use ED method to diagonalize the spin-1 system with  N = 18 using ITensor.jl.
I am not sure that whether HPhi can do diagonalization for 18-spin system using Lanczos algorithm on my PC.
I would greatly appreciate it if you could provide any insights or suggestions regarding this memory issue. Perhaps there are alternative approaches or optimizations that could be applied by EDKit to address this challenge.


text:
Upgrade classloader xstream deepcloner to XStream 1.4.1

From johan.ha...@gmail.com on August 30, 2011 08:41:05
Upgrade
Original issue: http://code.google.com/p/powermock/issues/detail?id=345

From johan.ha...@gmail.com on January 05, 2012 02:07:15
Status: Fixed

source: gharchive/issue

repo: jayway/powermock

license_type: permissive

license_source: bigquery


text:
Create add0625

!xxx 匹配最后一个执行的命令  某些场景可以代替 上下键

@lidianhk  格式不对

source: gharchive/pull-request

authors: jaywcjlove lidianhk

repo: jaywcjlove/linux-command

license: MIT

license_source: github-api


text:
Creating a ForeignKey or OneToOneField to a model in this package generates migrations

This package seems to be fundamentally broken. To recreate the issue, simply create a model with something along the lines of the following:
class MyModel(models.Model):
    device = models.OneToOneField(GCMDevice, related_name='my_model', on_delete=models.CASCADE)

then run
python manage.py makemigrations
The result is that Django tries to generate migrations inside of the django-push-notifications package. The only side which should generate migrations is the model with the concrete field, namely MyModel

That happens most likely due to the AutoField which can be customized since Django 3.2, see:
https://docs.djangoproject.com/en/4.0/releases/3.2/
https://docs.djangoproject.com/en/4.0/ref/settings/#std:setting-DEFAULT_AUTO_FIELD
Have set the default to BigAutoField in your settings?

authors: levinotik simonkern

repo: jazzband/django-push-notifications


text:
.slugs() and .names() doesn't work for (Generic)TaggedItemBase custom tags

Hello everyone.
So I created a model with Custom Tags:
class ArticleTaggedItemBase(TaggedItemBase):
    content_object = models.ForeignKey('Article')

class Article(models.Model):
    title = models.CharField(max_length=300)
    comment = models.CharField(max_length=600, blank=True)

    tags = TaggableManager(through=ArticleTaggedItemBase)

When trying
Article.tags.all()

in the manage.py shell it works and returns a list of Tag objects.
When trying
Article.tags.names()
Article.tags.slugs()

both methods return this error:
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "my\dir\to\virtualenv\lib\site-packages\taggit\utils.py", line 138, in inner
    raise TypeError("Can't call %s with a non-instance manager" % func.__name__)
TypeError: Can't call names with a non-instance manager

Where it says can't call names it says can't call slugs for the slugs error.
Any ideas?

Update: This also occurs for me when using the standard TaggableManager()!

I've no idea if this is the solution, but you might want to try adding related_name to the content_object:
class ArticleTaggedItemBase(TaggedItemBase):
    content_object = models.ForeignKey('Article', related_name="%(app_label)s_%(class)s_items")

Only because I have a similar setup and names() and slugs() work fine for me, and this looked like the main difference we have.

as the error message says you need an instance manager (like Article.objects.get(pk=1).tags.names()). Probably need to improve the error message here

authors: Braintelligence philgyford rtpg

repo: jazzband/django-taggit


text:
Could not find a version that matches celery<4,<4.0,==3.*,>=2.5,>=3.1.0,>=3.1.15,>=4.0

We have our celery version pinned to 3.* but pip-tools fails with the above error.
Environment Versions

OS Type: Debian Jessie Docker
Python version: Python 2.7.14
pip version: pip 9.0.1 from /usr/local/lib/python2.7/site-packages (python 2.7)
pip-tools version: pip-compile, version 1.9.0

Steps to replicate

Pin celery like so in requirements.in
celery==3.*
Run pip-tools --upgrade

Expected result
Celery pinned to 3.x version
Actual result
Could not find a version that matches celery<4,<4.0,==3.*,>=2.5,>=3.1.0,>=3.1.15,>=4.0
Tried: 0.1.2, 0.1.4, 0.1.6, 0.1.7, 0.1.8, 0.1.10, 0.1.11, 0.1.12, 0.1.13, 0.1.14, 0.1.15, 0.2.0, 0.3.0, 0.3.7, 0.3.20, 0.4.0, 0.4.1, 0.6.0, 0.8.0, 0.8.1, 0.8.2, 0.8.3, 0.8.4, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.2.0, 2.2.0, 2.2.0, 2.2.1, 2.2.1, 2.2.1, 2.2.2, 2.2.2, 2.2.2, 2.2.3, 2.2.3, 2.2.3, 2.2.4, 2.2.5, 2.2.6, 2.2.7, 2.2.8, 2.2.9, 2.2.10, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.3.4, 2.3.5, 2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.4.4, 2.4.5, 2.4.6, 2.4.7, 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.5, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.0.6, 3.0.7, 3.0.8, 3.0.9, 3.0.10, 3.0.11, 3.0.12, 3.0.13, 3.0.14, 3.0.15, 3.0.16, 3.0.17, 3.0.18, 3.0.19, 3.0.20, 3.0.21, 3.0.22, 3.0.23, 3.0.24, 3.0.25, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.3, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.8, 3.1.9, 3.1.9, 3.1.10, 3.1.10, 3.1.11, 3.1.11, 3.1.12, 3.1.12, 3.1.13, 3.1.13, 3.1.14, 3.1.14, 3.1.15, 3.1.15, 3.1.16, 3.1.16, 3.1.17, 3.1.17, 3.1.18, 3.1.18, 3.1.19, 3.1.19, 3.1.20, 3.1.20, 3.1.21, 3.1.21, 3.1.22, 3.1.22, 3.1.23, 3.1.23, 3.1.24, 3.1.24, 3.1.25, 3.1.25, 4.0.0rc3, 4.0.0rc3, 4.0.0rc4, 4.0.0rc4, 4.0.0rc5, 4.0.0rc5, 4.0.0rc6, 4.0.0rc6, 4.0.0rc7, 4.0.0rc7, 4.0.0, 4.0.0, 4.0.1, 4.0.1, 4.0.2, 4.0.2, 4.1.0, 4.1.0

Judging from the output it looks like it would have a hard time finding something >= 4.0 and also less than < 4.0

found it was the package django-celery-email being upgraded from 1.x to 2 requiring celery 4
but my django-celery-email line is unpined
so to satisfy requirements why didn't it pick the 1.x instead of trying to go to 2 since that is incompat?

pip-compile will act like pip: If no constraints are given, it will fetch the latest version of a package.

why didn't it pick the 1.x instead of trying to go to 2 since that is incompat?

Because pip-compile does not try to "backtrack" to find a matching version.
It's a shame, but it's not a trivial thing to do. See #397 for a bit more info.
In your specific case, I'd say downpinning django-celery-email <2.0 in your requirements.in would be your solution.
Hope this helps!

yep down pinned worked
instead of backtracking then, since it's hard
couldn't it display which package(s) are causing a conflict
or even just display which packages had any version specifications when it fails to find a package
so I could see which ones are probably the culprit
turned on verbose and had to grep the output of a big list (lots of requirements)

There's an issue on that: #473. It does gets asked a lot, and I agree it would really help.
I had started some work on this, but had no time to work on it for a while.
The general idea would probably to populate the InstallRequirements.comes_from property and to display it on failure, although it gets messy. grep is indeed your best friend right now.
I'll admit I'm waiting to #531 to be resolved before putting more energy in new features right now.
Contributions are still welcomed though!

Closing, keeping #473

authors: oppianmatt vphilippon

repo: jazzband/pip-tools


text:
Navigation bar animation does not adhere to locale: left to right and right to left (e.g. Arabic and English).

Navigation bar animation does not adhere to locale: left to right and right to left (e.g. Arabic and English).
When using Easy Localization package, and switching from LTR and RTL from the package it does not apply to the bottom navigation bar tab switching animations.
STEPS:
set up easy localization
set up navigation bar
change tabs with English locale (correct behavior)
change language to arabic
switch tabs (the animation is still LTR when it should be RTL).

i have the same probleme i hope they will solve it since the package is good

Hi, which animation exactly do you expect to change? The sliding of the pages when switching tabs?
So from what I understand: When switching from Tab 1 to Tab 2 the pages slide to the left in LTR mode. In RTL mode they should slide to the right, correct?
Same when switching from Tab 2 to Tab 1: The pages slide to the right in LTR mode. In RTL mode they should slide to the left, correct?
Feel free to open a pull request if you have a solution.

Solved since version 5.0.0-beta.7


text:
demo have bug

I found this error too. You can download those files, run the project, everything works.

fixed it, thanks

authors: WGL878420 gmsa panjiangyi

repo: jbaysolutions/vue-grid-layout

license: mit


text:
Filter for cattle

@jbloom could we maybe have a filter for sequences that have 'cattle' in their name? would be nice to be able to subset on cattle outbreak.

@Bernadetadad, this should be addressed in 0cd213b with the URLs for the new cattle phenotype scatters and trees in the README.

authors: Bernadetadad jbloom


text:
[CLOUD-449] Expose ARTIFACT_DIR as parameter in s2i templates (EAP)

The SSO templates already exposes this parameter, no need to change them.

Hey @osnipso, because this field is not required and defaults appropriately in the s2i scripts, I think it's better to not specify a value in the templates.  If we change the s2i scripts in the future, we'd need to change the templates too.  By not setting a default, we will use whatever the script deems appropriate.  This comment applies to the other related PRs too.

Ok @rcernich, got it. Just one question before I go ahead and edit the files: you mean not setting a default by leaving it as an empty string ("value": "") or by omitting the value line entirely?

looks like we use empty string, ""

authors: osnipso rcernich

repo: jboss-openshift/application-templates


text:
Refactor tools drawer

What does this PR do and why?

break component up into multiple files
add owner tab (tab hidden when owner not connected)
clearer sections
improve spacing and copy

⚠ no functionality as changed :)
Why?
I want to add the V1V2 migration setup UI to this drawer, but adding it as-is would clog the drawer up too much. This separation is a better UX i believe.
FWIW i think we should have a dedicated settings page soon.
Screenshots or screen recordings

wallet not connected
owner wallet connected

Acceptance checklist

[x] I have evaluated the
Approval Guidelines
for this PR.
[x] I have tested this PR in
all supported browsers.

@jmilldotdev lurrrrv it. agree with you. Made the change! Also moved some more files around,

repo: jbx-protocol/juice-interface


text:
support copy paste images in markdown editor

What does this PR do and why?
Provide a description of what this PR does. Link to any relevant GitHub issues, Notion tasks or Discord discussions.
Screenshots or screen recordings
If applicable, provide screenshots or screen recordings to demonstrate the changes.
Acceptance checklist

[ ] I have evaluated the Approval Guidelines for this PR.
[ ] (if relevant) I have tested this PR in all supported browsers.
[ ] (if relevant) I have tested this PR in dark mode and light mode (if applicable).

Current dependencies on/for this PR:

main

PR #3877

PR #3878

PR #3879   👈

This comment was auto-generated by Graphite.

@wraeth-eth started a stack merge that includes this pull request via Graphite.

Graphite rebased this pull request as part of a merge.

@wraeth-eth merged this pull request with Graphite.


text:
No longer working with BabyBuddy Container

Using BabyBuddy v1.12.2 via docker, Home Assistant version 2022.9.7. My scripts for starting a timer and logging food (without a timer) no longer work.
Start timer topped working:
  - type: button
    tap_action:
      action: toggle
    entity: switch.child1_last_timer
    show_icon: true
    name: Start Timer

Button to log food stopped working:
  - type: button
    tap_action:
      action: toggle
    entity: script.babybuddy_add_self_fed_snack
    name: Snack

With the below script:
babybuddy_add_self_fed_snack:
  alias: BabyBuddy Self Fed - Snack
  sequence:
  - service: babybuddy.add_feeding
    data:
      type: Solid food
      method: Self fed
      amount: 4
    target:
      entity_id: switch.child1_last_timer
  - service: notify.parents
    data:
      title: BabyBuddy
      message: "\U0001F33D\U0001F966 Snack \U0001F33D\U0001F966"
  mode: single
  icon: mdi:corn

However, I just rolled back to a backup of Home Assistant 9.6 and things appear to work at first glance. Does anyone know what broke with 9.7? Is anyone else having issues?

Any applicable error logs to share?

Upgraded HA to 10.1 and am not having the issue that i saw in 9.7. Marking this as closed.

authors: Borlean jcgoette


text:
Add warning limits

These are typically set at ±2σ. See Oakland for discussion.

[ ] Add Oakland spec + data

[ ] Ch 6, Worked Example 1
[ ] Ch 6, Worked Example 4

[ ] Rename {upper,lower}_limit to {upper,lower}_control_limit to distinguish from warning limits.

Unfortunately Oakland only provides constants up to n = 12, rather than the n = 25 that I'm using. Putting this aside for now.

To be clearer: x̄R limits can be calculated using the current constants table, but R̄ can't. It needs various values for Dʹ (as in Appendix C of Oakland).

repo: jchester/spc-kit


text:
How safe is State::error?

Hi,
I'm trying to work out how safe calling the error method is, for reporting problems back to Lua code. It causes longjmp to unwind past a Rust function, which sounds undefined, but can it be safe if I'm careful?
I'd be interested in both "in practice ok" and "yes it's correct" type answers.
Thanks,
Chris

From the reference:
12.3 Behavior considered undefined

Unwinding into Rust from foreign code or unwinding from Rust into foreign code. Rust's failure
system is not compatible with exception handling in other languages. Unwinding must be caught
and handled at FFI boundaries.

All bets are off if you raise an error outside of a pcall. I think to properly handle this, LUAI_TRY and LUAI_THROW need to be redefined to call into the appropriate Rust functions to perform setup/teardown.

Hi,
Thanks for the response, which I think confirms what I thought, which is that I'm ok with errors from Lua code if I always use pcall, but there isn't a safe way to generate a Lua error from Rust code.
When thinking about what I could do about this, I thought it would be nice if the Rust function could be written like:
fn myFunction(state: &mut lua::State) -> Result<c_int, String> {
   ...stuff with try!() etc.
}

where an Err result could be translated into a lua_error lower down.
So it would go something like:

Lua calls foo()

foo, which could be Lua or C, is a wrapper which is the inverse of pcall, something like:
ok, results = wrap_foo() -- wrap_foo is probably an upvalue to a generic C/Lua function.
if ok then
    return results
else
    error(results) -- error message
end

3. `wrap_foo` is an optional wrapper, now Rust, which calls `real_foo`, and returns `true, results` or `false, error msg` depending on the Result returned.

With those layers in place, I could then write reasonably natural Rust functions and have errors translated automatically.

I think I've got all I need to implement this on top of rust-lua53 without any changes your end, though it would be convenient (and I guess a little faster) if the library supported calling `error` safely directly from Rust; however that looks hard to me.

I'd be interested in any comments/suggestions/obvious problems with my mad scheme above, but I'm happy to close this issue now; but I'll leave that to you in case you want to implement anything.

I've been working on some things quite similar to this here (see components/script/environment.rs). I've added a few convenience wrappers around lua::State, including ones that allow closures to be pushed onto the stack and functions with the signature:
fn my_function(environment: Environment) -> Result<i32, Box<Error>> {
    // ...
    Ok(1)
}

@jugglerchris Perhaps you'd be interested in collaborating on a higher-level Rust-Lua library? I've got some neat ideas that don't really fit into this project (from my understanding, this is meant to be a 1:1 Rust binding to Lua).

@coderstephen I was planning on (eventually) splitting out what I have into a separate crate; I'd be happy to work together.  I've implemented the scheme in my above comment and a way to safely share Rust types in what I think is a (dynamically) type-safe way with Lua.  I'll try to prioritise getting that up somewhere, hopefully sometime this week.

I've split out my in-development (badly documented, inconsistently named and so on) interface into a github repo: https://github.com/jugglerchris/rlua in case it's of interest.
See the _push_closure method which takes a Rust function returning a Result, and wraps it via a small Lua stub which converts an Err into a call to the Lua error function.  Similarly run_loaded_lua converts Lua errors back into a Rust Err.
It's all a bit messy and rough at the moment, but I'm happy for that to be a starting point for a more generally useful and Rustic (is that the word?) interface on top of this one.

authors: coderstephen jcmoyer jugglerchris


text:
ArrayIndexOutOfBoundsException when using P-Frames

Simple way to reproduce: Using org.jcodec.samples.gen.SequenceEncoderDemo, changing the size of the BufferedImages from 640x480 to 800x600 results in the following exception:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 480000
	at org.jcodec.codecs.h264.encode.MBEncoderHelper.takeSafe(MBEncoderHelper.java:40)
	at org.jcodec.codecs.h264.encode.MBEncoderP16x16.mvEstimate(MBEncoderP16x16.java:145)
	at org.jcodec.codecs.h264.encode.MBEncoderP16x16.encodeMacroblock(MBEncoderP16x16.java:70)
	at org.jcodec.codecs.h264.H264Encoder.encodeMacroblock(H264Encoder.java:301)
	at org.jcodec.codecs.h264.H264Encoder.encodeSlice(H264Encoder.java:279)
	at org.jcodec.codecs.h264.H264Encoder.encodeFrame(H264Encoder.java:170)
	at org.jcodec.codecs.h264.H264Encoder.encodeFrame(H264Encoder.java:107)
	at org.jcodec.codecs.h264.H264Encoder.encodeFrame(H264Encoder.java:92)
	at org.jcodec.api.SequenceEncoder.encodeNativeFrame(SequenceEncoder.java:80)
	at org.jcodec.api.awt.SequenceEncoder.encodeImage(SequenceEncoder.java:23)
	at org.jcodec.samples.gen.SequenceEncoderDemo.main(SequenceEncoderDemo.java:59)

I would assume that P-Frames / KeyInterval should work more or less independent of the movie resolution.

Fixed

authors: mrieser svitvitskiy

repo: jcodec/jcodec


text:
🛑 audience is down

In cb9c47c, audience (https://www.audience-soest.de) was down:

HTTP code: 0
Response time: 0 ms

Resolved: audience is back up in b1b58f9.

repo: jcruse-erw/UptimeReport


text:
GButton as GList item may cause "ItemClick" event fires more than once

Simple use case:
let list;

list.itemRenderer = (index, object) => {
    // any logic
};
list.numItems = 4;
list.numItems = 5;
list.numItems = 6;

list.on(fgui.ListEvent.ItemClick, onClick, this);

let onClick = () => {
    console.log('GList item clicked');  // will output multiple times as the times of calling GList.numItems
};

This problem appears to be related to PIXI's default event emitter, it won't check for duplicate event handlers, thus when GList renders, the default behavier child.click(this.$clickItem, this) will trigger multiple times, and when the event is fired, this.$clickItem will be triggered multiple times too.
But if the remove logic works right, this won't happen. However...
public removeChildToPoolAt(index: number): void {
     let child: GObject = super.removeChildAt(index);
     this.returnToPool(child);
}

This super call will bypass the remove event logic.
Please fix this ASAP!

fixed in dev branch, will merge asap.

authors: jcyuan shunia

repo: jcyuan/FairyGUI-PixiJS


text:
Add my first file.

created profile.md

created a file.

repo: jdanyow/introduction-to-github


text:
Adding Nexmo Verify to Providers

Nexmo offers both lower level SMS/Voice APIs and a high level 2FA API.

No need to include the No entries--can you trim those, please?

@smholloway pulled them out.

Right on. Looks good! After another approval we will merge.

We created providers section for users to see what's available.
If this thing is only sms/voice, is there a point to list it here?
It requires no additional effort from the user to set it up(ie no client to install/configure)...

If the list is limited to those that provide user facing systems, I understand. But with Authy, Telesign, and others listed that provide an API to add 2FA to applications, I thought this would fit.

totally agree with @mxxcon. Closing the PR

I think it's within the scope of providers. Nexmo offers 2FA as a service.
To me providers page is mostly for implementers. The thought is something like, "I want to implement 2FA--let's see what's available! Ah, this one has voice and SMS while this one has an app. I like the idea of an app, so I'll explore this more." As a secondary benefit, users can review the page to see what is available.

That what I thought it was (a page helping those non-2FA enabled sites / services find a way to enable it). But obviously, I'm not a curator of the list so could only glean that from looking at the list (while something like Clef is very user facing, something like Authy is very developer / integrator facing).
Either way, the data is here if it's found useful.

Then perhaps we should clarify that.. @jdavis?

FWIW, I agree with @smholloway.

I'm a little confused on what Nexmo does.
So it verifies phone numbers as well as functionality to send SMS messages? Where does the 2FA come into play? Does that mean the site/app is supposed to generate the OTP, send it out through Nexmo, and then do the verification themselves?

@jdavis The verify API can be used by a service to implement 2FA (just like other 2FA providers). Nexmo also offers APIs for sending SMS messages or making phone calls.
The site/app does not generate an OTP and is not responsible for validating that the user has the correct OTP.
Like other 2FA APIs, the first call to the API initiates the process (Nexmo generates a OTP, then delivers it by SMS or Voice depending on the number type, falling back to another channel if needed), and the second call is made to the API with the user provided OTP (Nexmo confirms if the code is correct in the response).

Right. It can be used to implement 2FA, but unless I'm missing something, we don't have any other providers on the /providers/ page that don't do the 2FA for you (generating OTP, sending the messages, actually being a 2FA solution).
Putting a service on that page that makes it easier to send SMS messages isn't a 2FA provider to me.

@jdavis Maybe I'm missing something you're saying, but Nexmo does do the OTP generation and confirms the user provided the correct code. It's not just sending an SMS (though there's another API that lets you just do that).

@tjlytle Ah, okay. Do you have better documentation? According to this, I'd expect the use case to be:

User comes to the website and enters in account info.
They sign up for SMS notifications.
You confirm the phone number using Nexmo Verify (because the tagline is: "Verify any number, hassle-free").

Where does it mention the 2FA/OTP for when you aren't needing to verify a phone number?

@jdavis  We've found that the 'verify' process is heavily used both in a signup flow and for adding 2FA to logins, so we're not limited to a single use case (effectively they do the same thing prove you have something right now).
Here are the docs, more generic than the product page: https://docs.nexmo.com/index.php/verify
I can update the URL to that if it's better.

@tjlytle No, I think the link you have now is better. But you really should look into improving the main landing page if you are hoping to capture more users of the auth verification of the product. It isn't very clear at all.
If anyone else has objections, feel free to mention them. If not, add the looks-good label and it can be merged.

@jdavis There's also this page, but doesn't really say anymore about 2FA specifically. Great point, I'll pass it on.

authors: Carlgo11 RichJeanes jdavis mxxcon smholloway tjlytle

repo: jdavis/twofactorauth


text:
Add GaBO IK module

GaBO IK module 추가 관련 PR 드립니다!

kinematics.py에 pykin style IK module 추가
pykin main README 수정, GaBO README 추가
GaBO example 추가
GaBO 실행할 때만 import 예외 처리
테스트 완료

이외에 GaBO 관련 모든 모듈은 pykin/utils/gabo에 저장해두었습니다!

안녕하세요. 영택님,
깔끔하게 정리해주셔서 감사합니다! 👍


text:
is blocking another javascript

The script is interrupting with another javascript and blocking it from working, any solution??

Link to your page? It's impossible to diagnose an issue like this without seeing it. What do you mean by "blocking"?

found the problem, there was a another script and it interfered with

got it sorted out....

authors: jedfoster joloshop


text:
uni-app，online表单开发的接口，如何获取字典表的label名称

版本号：
3.6.3
问题描述：
使用online表单开发，其中工地id字段使用字典表配置，web端可展示字典表名称。在uni-app中如何获取工地id的名称？目前接口返回没有_dictText这个属性。
截图&代码：

sq

你意思online表单这里配置的表字典，这uniapp里面渲染的不对吗？请加一些截图描述一下你的业务场景？

无回复，关闭

repo: jeecgboot/JeecgBoot


text:
CF ddns报错

问题描述
请求接口 https://api.cloudflare.com/client/v4/zones?name=alistofyjj.top&status=active&per_page=50 失败! 返回内容: {"success":false,"errors":[{"code":6003,"message":"Invalid request headers","error_chain":[{"code":6111,"message":"Invalid format for Authorization header"}]}],"messages":[],"result":null} ,返回状态码: 400
安装在电脑上的，用的是CF的域名和token(.top的)，这个情况怎么解决
DNS服务商
Cloudflare
是否已搜索同类问题
已搜索，但未能解决
操作系统
Windows
架构
x86_64
版本
v5.6.1
安装方式
其它
额外信息
No response

#308


text:
[For Mod Dashboard] A page that lists all bots

A page on the moderator dashboard that lets you see a list of all bots just in case you need to go to a specific bot's page.

Or it could be for everyone so they can find bots easier

that page would take wayy too much time to load after time

Pagination?

good idea

authors: RONTheCookie RileyDatLord TechGuyAnthony jellz


text:
Fixes objectref handling in GetSubmissionSetAndContents

Fixes IHE pre-connectathon test 11906

@devcritter I just merged this in, it fixes a bug in OpenXDS (as long as I'm understanding the code right). You would need to build this and replace the openxds-1.1.1.jar in your vm with the one created by the build in build/openxds-1.1.1.jar.
I just merged it in without review as it is a pretty obscure fix that doesn't really make sense unless you read a lot of the code.

repo: jembi/openxds


text:
Define security contact for dockerhub-notification plugin

Description
Adding security contact for https://github.com/jenkinsci/dockerhub-notification-plugin where @rsandell is the only maintainer (releaser, as per this file).

Submitter checklist for changing permissions

Always

[x] Add link to plugin/component Git repository in description above

For a newly hosted plugin only

[ ] Add link to resolved HOSTING issue in description above

For a new permissions file only

[ ] Make sure the file is created in permissions/ directory
[ ] artifactId (pom.xml) is used for name (permissions YAML file).
[ ] groupId / artifactId (pom.xml) are correctly represented in path (permissions YAML file)
[ ] Check that the file is named plugin-${artifactId}.yml for plugins

When adding new uploaders (this includes newly created permissions files)

[x] Make sure to @mention an existing maintainer to confirm the permissions request, if applicable
[x] Use the Jenkins community (LDAP) account name in the YAML file, not the GitHub account name
[x] All newly added users have logged in to Artifactory at least once

@rsandell ping? Do you approve?

Needs explicit approval from @rsandell to proceed

Build failed; the context from the latest run is:
Expand to view
[2019-08-14T04:44:09.822Z] 	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
[2019-08-14T04:44:09.822Z] 	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
[2019-08-14T04:44:09.822Z] 	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213)
[2019-08-14T04:44:09.822Z] 	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
[2019-08-14T04:44:09.822Z] 	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42)
[2019-08-14T04:44:09.822Z] 	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
[2019-08-14T04:44:09.822Z] 	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
[2019-08-14T04:44:09.822Z] 	at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:160)
[2019-08-14T04:44:09.822Z] 	at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23)
[2019-08-14T04:44:09.822Z] 	at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:157)
[2019-08-14T04:44:09.822Z] 	at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:158)
[2019-08-14T04:44:09.822Z] 	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:162)
[2019-08-14T04:44:09.822Z] 	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:132)
[2019-08-14T04:44:09.822Z] 	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:132)
[2019-08-14T04:44:09.822Z] 	at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17)
[2019-08-14T04:44:09.822Z] 	at WorkflowScript.run(WorkflowScript:61)
[2019-08-14T04:44:09.822Z] 	at ___cps.transform___(Native Method)
[2019-08-14T04:44:09.822Z] 	at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:84)
[2019-08-14T04:44:09.822Z] 	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:113)
[2019-08-14T04:44:09.822Z] 	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:83)
[2019-08-14T04:44:09.822Z] 	at jdk.internal.reflect.GeneratedMethodAccessor390.invoke(Unknown Source)
[2019-08-14T04:44:09.822Z] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2019-08-14T04:44:09.822Z] 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[2019-08-14T04:44:09.822Z] 	at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
[2019-08-14T04:44:09.822Z] 	at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21)
[2019-08-14T04:44:09.822Z] 	at com.cloudbees.groovy.cps.Next.step(Next.java:83)
[2019-08-14T04:44:09.822Z] 	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:174)
[2019-08-14T04:44:09.822Z] 	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:163)
[2019-08-14T04:44:09.822Z] 	at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:129)
[2019-08-14T04:44:09.822Z] 	at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:268)
[2019-08-14T04:44:09.822Z] 	at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163)
[2019-08-14T04:44:09.822Z] 	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18)
[2019-08-14T04:44:09.822Z] 	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:51)
[2019-08-14T04:44:09.822Z] 	at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:186)
[2019-08-14T04:44:09.822Z] 	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:370)
[2019-08-14T04:44:09.822Z] 	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$200(CpsThreadGroup.java:93)
[2019-08-14T04:44:09.822Z] 	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:282)
[2019-08-14T04:44:09.822Z] 	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:270)
[2019-08-14T04:44:09.822Z] 	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:66)
[2019-08-14T04:44:09.822Z] 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[2019-08-14T04:44:09.822Z] 	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:131)
[2019-08-14T04:44:09.822Z] 	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
[2019-08-14T04:44:09.822Z] 	at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
[2019-08-14T04:44:09.822Z] 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[2019-08-14T04:44:09.822Z] 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[2019-08-14T04:44:09.822Z] 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[2019-08-14T04:44:09.822Z] 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[2019-08-14T04:44:09.822Z] 	at java.base/java.lang.Thread.run(Thread.java:834)
[2019-08-14T04:44:09.822Z] Finished: FAILURE

Powered by the Comment Logger

authors: batmat jenkinsadmin oleg-nenashev slide


text:
Add me as a developer for the typetalk-plugin

Description
Typetalk Plugin ( https://github.com/jenkinsci/typetalk-plugin )
@ikikko
I want permission to upload Typetalk Plugin to keep it healthy.
My GitHub account is @yasuyuki-baba
Submitter checklist for adding or changing permissions
Always

[x] Add link to plugin/component Git repository in description above

When adding new uploaders (this includes newly created permissions files)

[x] Make sure to @mention an existing maintainer to confirm the permissions request, if applicable
[x] Use the Jenkins community (LDAP) account name in the YAML file, not the GitHub account name
[x] Make sure to @mention the users being added so their GitHub account names are known if they require GitHub merge access (see below).
[x] All newly added users have logged in to Artifactory at least once

Reviewer checklist (not for requesters!)

[ ] Check this if newly added person also needs to be given merge permission to the GitHub repo (please @ the people/person with their GitHub username in this issue as well). If needed, it can be done using an IRC Bot command
[ ] Check that the $pluginId Developers team has Admin permissions while granting the access.
[ ] In the case of plugin adoption, ensure that the Jenkins Jira default assignee is either removed or changed to the new maintainer.
[ ] If security contacts are changed (this includes add/remove), ping the security officer (currently @Wadeck) in this pull request. If an email contact is changed, wait for approval from the security officer.

There are IRC Bot commands for it

@ikikko I waited for the account synchronization with Artifactory and reopened this PR. Please check it.

I'm ok. I want someone to give @yasuyuki-baba to the permission.

@ikikko @timja Thank you for making me a maintainer.
But I want to take merge permission to the GitGub repo.
@ikikko Can you give me permission?

done

@timja @ikikko Still I don’t have write access to https://github.com/jenkinsci/typetalk-plugin.
If there is any action I should take, could you let me know?

I've added you again, make sure you've accepted any github org invites

Go to https://GitHub.com/jenkinsci and accept the invite

@timja I could join!
Thank you very much :-)

authors: halkeye ikikko timja yasuyuki-baba


text:
chore: bdd-spring-1578693007 to 0.0.1

chore: Promote bdd-spring-1578693007 to version 0.0.1

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approvers:
If they are not already assigned, you can assign the PR to them by writing /assign  in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS

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


text:
fix: push to branch logic

so it pushes to the correct branch (not the current BRANCH_NAME but the branch of the PR)

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To complete the pull request process, please assign jstrachan
You can assign the PR to them by writing /assign @jstrachan in a comment when ready.
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

OWNERS

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

/approve

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

Needs approval from an approver in each of these files:

OWNERS [jstrachan]

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

authors: jenkins-x-bot-test jstrachan

repo: jenkins-x/jx-gitops


text:
feat: Add option to select field to filter on

The particular use case I want to support is to also on select on spec.template.metadata.annotations when calling jx gitops annotate --prod-spec

/cc ankitm123 tomhobson babadofar

repo: jenkins-x/jx-helpers


text:
fix: added in vault auth configuration for jx secret populate

x

Hi @chrismellard. Thanks for your PR.
I'm waiting for a jenkins-x or todo member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
I understand the commands that are listed here.

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

Hi @chrismellard. Thanks for your PR.
I'm waiting for a jenkins-x or todo member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
I understand the commands that are listed here.

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

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To complete the pull request process, please assign rawlingsj
You can assign the PR to them by writing /assign @rawlingsj in a comment when ready.
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

OWNERS

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

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To complete the pull request process, please assign rawlingsj
You can assign the PR to them by writing /assign @rawlingsj in a comment when ready.
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

OWNERS

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

/lgtm
/ok-to-test

/lgtm
/ok-to-test

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

Needs approval from an approver in each of these files:

OWNERS [jstrachan]

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

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

Needs approval from an approver in each of these files:

OWNERS [jstrachan]

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

@chrismellard: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

pr
48cbc0f8023f3bcece9d8b6f890e897ac8a345b5
link
/test

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the jenkins-x/lighthouse repository. I understand the commands that are listed here.

@chrismellard: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

pr
48cbc0f8023f3bcece9d8b6f890e897ac8a345b5
link
/test

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the jenkins-x/lighthouse repository. I understand the commands that are listed here.

New changes are detected. LGTM label has been removed.

New changes are detected. LGTM label has been removed.

repo: jenkins-x/jx-secret


text:
chore(deps): upgrade jenkins-x/jx3-pipeline-catalog to version 3.2.196

from: https://github.com/jenkins-x/jx

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To complete the pull request process, please assign jstrachan
You can assign the PR to them by writing /assign @jstrachan in a comment when ready.
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

OWNERS

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


text:
Build log Output truncated. - print tail of log instead of head

Dependencies

Feature Request
Our pipeline step prints a decent amount to the console logs:
wc ci_output/make.out
 3186  25671 294530 ci_output/make.out

When it fails, the majority of useful prints are at the end.
As an alternative, would it be possible to get publish the tail of the Build log?
Ideally I'd like to see the full Build log, but I don't know the reason(s) why it is currently getting truncated or what the limit is (Jenkins vs GitHub restrictions/limitations?)

It's a GitHub restriction 65535 bytes or so I think. and yes the tail makes sense and should be fine to swap to using that.
May be a bit more complex, but worth doing imo

repo: jenkinsci/checks-api-plugin


text:
specify pipeline-library in Jenkinsfile

Try to execute the Jenkinsfile from local Jenkins instance, and it complains
groovy.lang.MissingPropertyException: No such property: infra for class: groovy.lang.Binding

After checked for a while, noticed it would be good to add library in Jenkinsfile
@Library('pipeline-library@master') _.

This is what did in https://github.com/jenkins-infra/azure/blob/master/Jenkinsfile#L6
Surely the pipeline-library shall be set in Global Pipeline Libary of my Jenkins instance.
Will be nice if can be added to save extra setup locally.

Jenkinsfile is only to build the official images from jenkins infra

Some automatic library definitions may be helpful later, but @Library is probably not the best option while pipeline-library has no versions, etc.

authors: carlossg larrycai oleg-nenashev

repo: jenkinsci/docker


text:
adapt tests to new google credential ids

After https://github.com/jenkinsci/google-oauth-plugin/pull/186 , when we create a google credential, the ID is no longer the project id but a generated one. Editing tests to no longer rely on that assumption. For the CasC test, it is now entirely CasC-ified, with creating the credential through CasC as well (creating a credential on the UI, ignoring the output and applying a CasC file made before we knew it wasn't a very realistic scenario.)
### Submitter checklist
- [x] Make sure you are opening from a **topic/feature/bugfix branch** (right side) and not your main branch!
- [ ] Ensure that the pull request title represents the desired changelog entry
- [x] Please describe what you did
- [ ] Link to relevant issues in GitHub or Jira
- [x] Link to relevant pull requests, esp. upstream and downstream changes
- [x] Ensure you have provided tests - that demonstrates feature works or fixes the issue

this needs google-oauth-plugin 1.1.1 for the id field in the credentials.

I sadly cannot push to @Riliane 's PR, so I created a new one to take care of the review comments: https://github.com/jenkinsci/google-compute-engine-plugin/pull/417

authors: Riliane aneveux

repo: jenkinsci/google-compute-engine-plugin


text:
Jenkins framework crash if inside a docker container in bridge mode

I'm experience this issue with the following setup:
Jenkins 2.2 (running in docker with bridge network)
Mesos-plugin 0.12
Mesos 0.28.1
Apparently the framework keep crashing after starting the connection with the mesos master. The framework is using the IP address of the container which is not reachable from the Mesos master (mesos master is running in a container in a different host).
These are the logs on the mesos master:
I0510 10:32:34.468268    12 master.cpp:2231] Received SUBSCRIBE call for framework 'jenkins-framework' at scheduler-1d3da1d1-aa5d-4c78-a65a-ccb1dbfd5c84@172.17.0.3:45128
I0510 10:32:34.475852    12 master.cpp:2302] Subscribing framework jenkins-framework with checkpointing enabled and capabilities [  ]
I0510 10:32:34.483469     9 hierarchical.cpp:265] Added framework 0ccc0b5b-b484-4821-9ace-5eddda056dcf-0157
I0510 10:32:34.514787    12 master.cpp:5324] Sending 2 offers to framework 0ccc0b5b-b484-4821-9ace-5eddda056dcf-0157 (jenkins-framework) at scheduler-1d3da1d1-aa5d-4c78-a65a-ccb1dbfd5c84@172.17.0.3:45128
I0510 10:32:34.692304     9 master.cpp:2231] Received SUBSCRIBE call for framework 'jenkins-framework' at scheduler-1d3da1d1-aa5d-4c78-a65a-ccb1dbfd5c84@172.17.0.3:45128
I0510 10:32:34.692454     9 master.cpp:2302] Subscribing framework jenkins-framework with checkpointing enabled and capabilities [  ]
I0510 10:32:34.692483     9 master.cpp:2312] Framework 0ccc0b5b-b484-4821-9ace-5eddda056dcf-0157 (jenkins-framework) at scheduler-1d3da1d1-aa5d-4c78-a65a-ccb1dbfd5c84@172.17.0.3:45128 already subscribed, resending acknowledgement
I0510 10:32:35.919252     9 master.cpp:2231] Received SUBSCRIBE call for framework 'jenkins-framework' at scheduler-1d3da1d1-aa5d-4c78-a65a-ccb1dbfd5c84@172.17.0.3:45128
I0510 10:32:35.919471     9 master.cpp:2302] Subscribing framework jenkins-framework with checkpointing enabled and capabilities [  ]
I0510 10:32:35.919534     9 master.cpp:2312] Framework 0ccc0b5b-b484-4821-9ace-5eddda056dcf-0157 (jenkins-framework) at scheduler-1d3da1d1-aa5d-4c78-a65a-ccb1dbfd5c84@172.17.0.3:45128 already subscribed, resending acknowledgement
E0510 10:32:37.481415    13 process.cpp:1958] Failed to shutdown socket with fd 24: Transport endpoint is not connected

I have tried to change the Jenkins URL to the IP address of the VM where docker is running but it seems to make no changes.
If I run the container with networking "host" mode I can successfully register the jenkins framework to the Mesos master.

I don't see the "crash" in the logs you posted?
Anyway a mesos frameowrk should advertise a routable IP to the mesos master, otherwise things don't work. You can set LIBPROCESS_ADVERTISE_IP and LIBPROCESS_ADVERTISE_PORT environment variables before starting jenkins master. These values should correspond to the the routable IP address and port, which in this case is the docker host's IP and host port forwarded to the container's port.

How are you starting your jenkins master? Are you using Marathon?
In bridged mode, your docker container shall know its host IP and run with at least 3 binded ports:

PORT0 = jenkins http port
PORT1 = jenkins jnlp port
PORT2 = mesos libprocess port

Then you can set, when starting the container:
export LIBPROCESS_PORT="${PORT2}"
export LIBPROCESS_ADVERTISE_IP="${HOST_IP}"
export LIBPROCESS_ADVERTISE_PORT="${LIBPROCESS_PORT}"

By crash I means that the framework attempt to register to the Mesos master and immediately fail.
There is a configuration option in the mesos-plugin section under "Manage Jenkins" called Jenkins URL I thought this option would have set up the correct Jenkins IP address and port to pass to Mesos master. I will try to pass this variable and I will let you know how it goes

I made a comment In another Issue but this seems to be the exact match to my problem, I paste it here also:
I'm running Mesos 0.28.2 and Jenkins 1.651.3 (also testing 2.7) with plugin version 0.13.0, (as I saw that 0.13.1 is tied to Mesos 1.0)
I'm getting disconnected.

my Jenkins configuration is this:

Not sure if its an incompatibility with the Mesos version or I have a wrong setting.
(My jenkins are containers, with mesos lib installed manually in each one)

@iax7 you have to use zookeeper url in Mesos master [hostname:port] field
In my example:

Hi, I have the same issue with a jenkins host running in bridged mode.

It was working fine when I was trying in standalone mode.
@geoffroyjabouley should I use the export you just wrote? What about LIBPROCESS_IP here

@gdippolito, were you able to resolve the issue?

Closing for lack of response.

authors: gdippolito geoffroyjabouley iax7 jeschkies kopax lavcraft vinodkone

repo: jenkinsci/mesos-plugin


text:
[FIXED JENKINS-32046] Rounding error on aggregated throughput in case…

Fix a rounding problem when multiple throughput URI reports are involved.

Thank you for this pull request! Please check this document for how the Jenkins project handles pull requests.

authors: artevel jenkinsadmin

repo: jenkinsci/performance-plugin


text:
Add write access to Everyone team.

@jenkinsci/everyone  I found to leave this repository from our teams. Anyone add this repository to Everyone team?

@hsbt since you maintain this plugin I recommend going to #jenkins on freenode.  A lot of the Jenkins CI admins hang out there and there's an IRC bot for maintenance tasks on the jenkinsci org.

@hsbt @samrocketman
The Write permission has been granted to Everyone. It's better to use INFRA tickets next time

@samrocketman @oleg-nenashev Thank you for your action. I'm going to try submit tickets next time.

authors: hsbt oleg-nenashev samrocketman

repo: jenkinsci/rbenv-plugin


text:
contextName = "context1"; leads to incorrect API calls within the session

Hi,
Here is an issue that i have faced using the plugin on a loaded session:
contextName is always a constant -> "context1". Therefore, In case of, there are two contexts using the same name (For example, a second scan/run on a loaded session), that leads to using a-non-unique contextName -> "context1" as a parameter to ZAP API calls. Call example: "zapClientAPI.context.includeInContext(API_KEY,contextName,contextURL);", that results in, The target URL not being included in the intended context within that session, but the very first context with the name "context1".
Note: ZAP version is 2.5.
If you need more info, please let me know.
P.S: Exception stack traced found in Jenkins Console log:
The provided url is not in the required context (url_not_in_context) : url
at org.zaproxy.zap.extension.spider.SpiderAPI.scanURL(Unknown Source)
at org.zaproxy.zap.extension.spider.SpiderAPI.handleApiAction(Unknown Source)
at org.zaproxy.zap.extension.api.API.handleApiRequest(Unknown Source)
at org.parosproxy.paros.core.proxy.ProxyThread.processHttp(Unknown Source)
at org.parosproxy.paros.core.proxy.ProxyThread.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
ERROR: org.zaproxy.clientapi.core.ClientApiException: The provided url is not in the required context
at org.zaproxy.clientapi.core.ApiResponseFactory.getResponse(ApiResponseFactory.java:32)
at org.zaproxy.clientapi.core.ClientApi.callApi(ClientApi.java:290)
at org.zaproxy.clientapi.gen.Spider.scanAsUser(Spider.java:239)
at fr.novia.zaproxyplugin.ZAProxy.spiderURLAsUser(ZAProxy.java:1834)
at fr.novia.zaproxyplugin.ZAProxy.executeZAP(ZAProxy.java:1334)
at fr.novia.zaproxyplugin.ZAProxyBuilder$ZAProxyCallable.invoke(ZAProxyBuilder.java:395)
at fr.novia.zaproxyplugin.ZAProxyBuilder$ZAProxyCallable.invoke(ZAProxyBuilder.java:381)
at hudson.FilePath.act(FilePath.java:1018)
at hudson.FilePath.act(FilePath.java:996)
at fr.novia.zaproxyplugin.ZAProxyBuilder.perform(ZAProxyBuilder.java:200)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
at hudson.model.Build$BuildExecution.build(Build.java:205)
at hudson.model.Build$BuildExecution.doRun(Build.java:162)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
at hudson.model.Run.execute(Run.java:1720)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:404)
Regards,
mabdelmoez

https://github.com/zaproxy/zaproxy/issues/2741

@mabdelmoez Resolved in pull request #41, feel free to re-open or adjust your pull request to add any additional features you may like. I have since made context name a required field.

authors: JordanGS mabdelmoez

repo: jenkinsci/zaproxy-plugin


text:
Relationship hasMany doesn't work

I have this objects stored on mongodb:
Client:
{
	"_id" : ObjectId("581af4fbf53b09175210c2dc"),
	"created_at" : ISODate("2016-11-03T08:27:39.675Z"),
	"updated_at" : ISODate("2016-11-03T08:27:39.675Z"),
	"url" : "francesco.ragusa.local",
	"safe" : false,
	"attributes" : [ ],
	"enabled" : true,
	"__v" : 0
}

MessageSender:
{
	"_id" : ObjectId("581c583440135d1e581ec58e"),
	"created_at" : ISODate("2016-11-04T09:43:16.639Z"),
	"updated_at" : ISODate("2016-11-04T09:43:16.639Z"),
	"owner" : ObjectId("581af4fbf53b09175210c2dc"),
	"type" : {
		"information" : null,
		"name" : "operator"
	},
	"nickname" : "Giusipuzzu",
	"enabled" : true,
	"__v" : 0
}

And this classes on laravel:
class Client extends Eloquent
{
    protected $connection = 'mongodb';

    public function messageSenders(){
        return $this->hasMany(\App\Models\MessageSender::class, 'owner');
    }
}

class MessageSender extends Eloquent
{
    protected $connection = 'mongodb';

    public function client(){
        return $this->belongsTo(\App\Models\Client::class, 'owner');
    }
}

Where Eloquent is an alias of 'Jenssegers\Mongodb\Eloquent\Model'.
If I do:
MessageSender::find('581c583440135d1e581ec58e')->client

I got the right object.
But if I do:
Client::find('581af4fbf53b09175210c2dc')->messageSenders

I got a instance of 'Illuminate\Database\Eloquent\Collection' but empty.
I think hasMany relationship doesn't work properly.

I have the same issue. Any updates on above, anyone?

I believe your issue here is that 'owner' isn't the foreign key for both relationships, and thus, should not be the 2nd parameter in both instances. For MessageSender, it is the local side of the key, and '_id' is the foreign side (Client).

authors: emkays2000 kodekrash willypuzzle

repo: jenssegers/laravel-mongodb


text:
Allow direct $dsn assignment for MONGOLAB_URI

In PaaS, such as Heroku, when you add on a "MongoDB" service, you get a MONGOLAB_URI, which appears to be the entire $dsn required to connect. It should be possible to set the $dsn => $_ENV["MONGOLAB_URI"] rather than having to parse it all out just to be re-combined in Connection.php.
Tommy

You can pass the entire dsn just by using the dsn config key.

My apologies, I looked at the code and didn't see anything that indicated that, but it has been a long time since I worked on PHP :)
~tommy

authors: TJM jenssegers


text:
castAttribute don't work after save

Hello
I want auto cast attribute before save to mongodb but i'm test cast with default laravel don't work.
My eloquent
use \Jenssegers\Mongodb\Model as Eloquent;
class Transaction extends Eloquent  {
    protected $casts = [
       'volume' => 'integer'
    ];

PHP Code
 $transaction = new \App\Transaction;
 $transaction -> volume = "2";
 $transaction -> save();

after save cast Attribute don't cast to int. volume storage is STRING
{
"volume" : "2",
}
Thank.

+1

authors: mean-cj robsoncombr


text:
fix issue where first update of the progress bar is 2 times the print rate

Hello, thanks for the recent update allowing for multiple progress bars! I've been playing with the code and noticed that the progress bars don't update as expected. The issues are:

iteration number jumps from 0 to 2 * print_rate for first update
after fixing 1, progress bar terminates incorrectly at end of loop/scan

Issue 1 is easily fixed with the addition of (iter_num != 0) in the control flow for _update_progress_bar()
    _ = jax.lax.cond(
        (iter_num != 0) & (iter_num % print_rate == 0) & (iter_num != n - remainder),  # fix issue 1
        lambda _: callback(_update_tqdm, print_rate, bar_id, ordered=True),
        lambda _: None,
        operand=None,
    )

To explain issue 2, consider the following example where we have implemented the fix for issue 1.
from jax_tqdm import PBar, scan_tqdm
import jax
import time

n = 10
print_rate = 3

def _sleep(t):
    time.sleep(float(t))

@scan_tqdm(n, print_rate)
def step(carry, _):
    jax.debug.callback(_sleep, 1, ordered=True)
    return carry + 1, carry + 1

def map_func(i):
    # Wrap the initial value and pass the
    # progress bar index
    init = PBar(id=i, carry=i)
    final_value, _all_numbers = jax.lax.scan(
        step, init, jax.numpy.arange(n)
    )
    return (
        final_value.carry,
        _all_numbers,
    )

num_bars = 5
last_numbers, all_numbers = jax.vmap(map_func)(jax.numpy.arange(num_bars))

We choose n = 10 and print_rate = 3 which implies remainder = 1. I would expect the progress bar to update in the following order:

start of iter = 0: initialize pbar 0/10
start of iter = 3: update pbar to 3/10
start of iter = 6: update pbar at 6/10
start of iter = 9: update pbar at 9/10
at end of loop: update pbar to 10/10 and close

What I actually observe is (with the addition of the fix for issue 1):

start of iter = 0: initialize pbar 0/10
start of iter = 3: update pbar to 3/10
start of iter = 6: update pbar at 6/10
start of iter = 9: update pbar at 7/10
at end of loop: close pbar at 7/10

This happens because at iter = 9 we have n - remainder = iter which then updates the progress bar by remainder = 1, going from 6/10 --> 7/10 where the progress bar is closed.
To fix this, I removed the iter_num == n - remainder check from _update_progress_bar() and instead deal with the final update at close
    def _update_progress_bar(iter_num, bar_id: int = 0):
        """Updates tqdm from a JAX scan or loop"""
        _ = jax.lax.cond(
            iter_num == 0,
            lambda _: callback(_define_tqdm, None, bar_id, ordered=True),
            lambda _: None,
            operand=None,
        )

        _ = jax.lax.cond(
            (iter_num != 0) & (iter_num % print_rate == 0)  # fix issue 1
            lambda _: callback(_update_tqdm, print_rate, bar_id, ordered=True),
            lambda _: None,
            operand=None,
        )

    def _close_tqdm(iter_num, bar_id: int):
        dif = n - tqdm_bars[int(bar_id)].n  # complete remaining updates on pbar before close
        tqdm_bars[int(bar_id)].update(int(dif))
        tqdm_bars[int(bar_id)].close()

These changes get the progress bars working as expected! I tested both scan and for_i wrappers with and without vmap for varying print rates and confirmed the pbars function properly.

@andrewlesak looks like you just need to run the linter over this (or I can if you're not set up)

My apologies but it looks like I haven't entirely solved this problem since the use of sleep() to simulate some computation conveniently masked another issue. When I run the following matrix multiplication at each iter to simulate an expensive computation, I see that the progress bar now jumps from 8 to 10/10 at the last iter so I think i've just pushed the problem to the end of the loop.
from jax_tqdm import PBar, scan_tqdm
import jax
import jax.numpy as jnp
import jax.random as jr

n = 10
print_rate = 1
arr_size = 13000

@scan_tqdm(n, print_rate)
def step(carry, stuff):
    rand_mat = jr.normal(jr.PRNGKey(carry), (arr_size, arr_size))
    mat_mul = rand_mat @ rand_mat.T
    return carry + 1, stuff + 1e-8 * jnp.sum(mat_mul)

def map_func(i):
    # Wrap the initial value and pass the
    # progress bar index
    init = PBar(id=i, carry=0)
    final_value, _all_numbers = jax.lax.scan(
        step, init, jnp.arange(n)
    )
    return (
        final_value.carry,
        _all_numbers,
    )

num_bars = 5
last_numbers, all_numbers = jax.vmap(map_func)(jnp.arange(num_bars))

I've actually already implemented this in my wrapper for a while loop (will draft a PR soon), but the solution to this problem is to initialize all the progress bars as soon as the wrapper is called so that we don't initialize in the loop _update_progress_bar when iter_num == 0. Code would look like this:
tqdm_bars = dict()

# immediately initialize progress bars
def _define_tqdm(bar_id):
    bar_id = int(bar_id)
    tqdm_bars[bar_id] = pbar(range(n), position=bar_id + position_offset, disable=disable, **kwargs)
    tqdm_bars[bar_id].set_description(message)

callback(_define_tqdm, bar_id, ordered=True)

Then for the update functions we would just have:
def _update_tqdm(arg, bar_id: int):
    tqdm_bars[int(bar_id)].update(int(arg))

def _update_progress_bar(iter_num, bar_id: int = 0):
    """Updates tqdm from a JAX scan or loop"""
    _ = jax.lax.cond(
        # update tqdm every multiple of `print_rate`
        (iter_num % print_rate == 0),
        lambda _: callback(_update_tqdm, print_rate, bar_id, ordered=True),
        lambda _: None,
        operand=None,
    )

The minor problem with this is that we now have to pass bar_id as an input to the build_tqdm function. We can have it default to bar_id = 0 when we only want a single progress bar, but if we want to vmap then we'll have to wrap the entire loop in a function like so:
from jax_tqdm import PBar, scan_tqdm
import jax
import jax.numpy as jnp
import jax.random as jr

n = 10
print_rate = 1
arr_size = 13000

def run_loop(i):

    @scan_tqdm(n, print_rate, bar_id=i)
    def step(carry, stuff):
        rand_mat = jr.normal(jr.PRNGKey(carry), (arr_size, arr_size))
        mat_mul = rand_mat @ rand_mat.T
        return carry + 1, stuff + 1e-8 * jnp.sum(mat_mul)

    def map_func(i):
        # Wrap the initial value and pass the
        # progress bar index
        init = PBar(id=i, carry=0)
        final_value, _all_numbers = jax.lax.scan(
            step, init, jnp.arange(n)
        )
        return (
            final_value.carry,
            _all_numbers,
        )

    return map_func(i)

num_bars = 5
bar_idxs = jnp.arange(num_bars)
last_numbers, all_numbers = jax.vmap(run_loop)(bar_idxs)

I can commit these changes for review sometime later today. I already confirmed this scheme worked when I built the while loop wrapper but I'll double check when I have some time.
I'm also new to this whole properly using github thing, so I'm not entirely sure how I would run the linter. I see some test results above so I assume you were able to do it for me? Thanks.

Not sure what the issue here is now. If I run your example on the main branch
import jax
import jax.numpy as jnp
import jax.random as jr

n = 10
print_rate = 1
arr_size = 13000

@scan_tqdm(n, print_rate)
def step(carry, stuff):
    rand_mat = jr.normal(jr.PRNGKey(carry), (arr_size, arr_size))
    mat_mul = rand_mat @ rand_mat.T
    return carry + 1, stuff + 1e-8 * jnp.sum(mat_mul)

def map_func(i):
    # Wrap the initial value and pass the
    # progress bar index
    init = PBar(id=i, carry=0)
    final_value, _all_numbers = jax.lax.scan(
        step, init, jnp.arange(n)
    )
    return (
        final_value.carry,
        _all_numbers,
    )

num_bars = 5
last_numbers, all_numbers = jax.vmap(map_func)(jnp.arange(num_bars))

it seems to run fine and run as expected, i.e. it prints each step in sequence for 5 progress bars.
Would using sleep() to test this actually work, I would have thought this would have just been called when JAX is inspecting the Python code, not when actually running the compiled function? I'm curious where the issue arises with the current implementation.

Just so we're on the same page, this is what I'm seeing when I run the example code where I sleep for 1 second each iter on my branch. The progress bars appear to work as expected, updating each iter at the same rate.

And this is what I see when I run the example code that does a matrix multiplication each iter and doesn't sleep.

Im not exactly sure how sleep would be processed in jax, but it seems like its masking the issue that becomes evident when performing an actual computation.
I think that calling define_tqdm when iter_num == 0 is somehow preventing proper updates for the first iter. If I instead change the code to allow for updates at iter_num == 0 (which naively one might think would fix this issue)
def _update_progress_bar(iter_num, bar_id: int = 0):
    """Updates tqdm from a JAX scan or loop"""
    _ = jax.lax.cond(
        iter_num == 0,
        lambda _: callback(_define_tqdm, None, bar_id, ordered=True),
        lambda _: None,
        operand=None,
    )

    _ = jax.lax.cond(
        # update tqdm every multiple of `print_rate`
        (iter_num % print_rate == 0), # allow updates for `iter_num == 0`
        lambda _: callback(_update_tqdm, print_rate, bar_id, ordered=True),
        lambda _: None,
        operand=None,
    )

Then this is what I see when running the matrix multiplication example.

This results in the original issue I tried to fix where we jump from 0 to 2 * print_rate at the first update of the progress bar. Thats why I think its necessary to initialize all the progress bars outside of the loop.

I think I've figured out the issue with using sleep() to test. I believe the progress bar gets updated as soon as sleep() is called instead of after. So note to self, I probably shouldn't use sleep() to test jax loops in the future.

This PR is now superseded by #27. Can I close this PR now?

I think I've figured out the issue with using sleep() to test. I believe the progress bar gets updated as soon as sleep() is called instead of after. So note to self, I probably shouldn't use sleep() to test jax loops in the future.

sleep() would be called at compile time, then ignored by JAX at runtime unless wrapped in a callback

This PR is now superseded by #27. Can I close this PR now?

Sure this can be closed

authors: andrewlesak zombie-einstein

repo: jeremiecoullon/jax-tqdm


text:
Fix/Resolve multi-level private domains

Introduction
The changes introduced with https://github.com/jeremykendall/php-domain-parser/pull/322 broke the resolution of private domains that contain valid higher-level suffixes.
For example, consider the TLD eu.org - it is listed as a valid private domain, but it is also a part of other valid private domains:
// EU.org https://eu.org/
// Submitted by Pierre Beyssac <hostmaster@eu.org>
eu.org
al.eu.org
asso.eu.org
at.eu.org
au.eu.org
...

After the changes in https://github.com/jeremykendall/php-domain-parser/pull/322, domains such as test-domain.eu.org are not recognised as private domains:
PHP Fatal error:  Uncaught Pdp\UnableToResolveDomain: The domain "test-domain.eu.org" does not contain a "private" TLD.
Only lower-level entries, such as test-domain.au.eu.org are recognised properly.
Proposal
The easiest solution, without making any major changes, would be to have a way of checking whether a suffix is present in the valid suffix list.
Taking https://github.com/jeremykendall/php-domain-parser/issues/321 as an example, users.scale.virtualcloud.com.br would be marked as a valid suffix, but virtualcloud.com.br would not.
Describe the new/upated/fixed feature
This PR changes the way how rules are parsed and structured. Each rule label that is the last part of a domain present in the list contains a marker which denotes a valid suffix. E.g.:
# eu.org
[
    org => [
        eu => [
            {MARKER}
            al => [
                {MARKER}
            ],
            asso => [
                {MARKER}
            ],
            ...
        ]
    ]
]
# users.scale.virtualcloud.com.br
[
    br => [
        com => [
            virtualcloud => [
                scale => [
                    users => [
                        {MARKER}
                    ]
                ]
            ]
        ]
    ]
]

This way we can check whether a suffix, or a part of it, is present in the list by checking if the marker is set. Both eu.org and al.eu.org have markers, meaning, both of them are valid private domain suffixes. And in the same way, only users.scale.virtualcloud.com.br has the marker, meaning, virtualcloud.com.br is not valid.
Issue: https://github.com/jeremykendall/php-domain-parser/issues/334
Backward Incompatible Changes
This PR only modifies how the private $rules variable is structured and read, it shouldn't have any backward incompatible changes.
Targeted release version
6.1.2
PR Impact
No changes to the current public API.
Open issues
https://github.com/jeremykendall/php-domain-parser/issues/334

@laurynasgadl thanks for the proposed PR I will have to look ihto details your proposal but at first glance it looks promising so I will do my best to review it as soon as possible.
I understand the issue and I also understand how you are trying to resolve it the only blocker that I have are the following

changing the storing format may be considered a BC break as all install of the library will have to first flush their cache to be able to use the fix
thinking out loud maybe instead of changing the format we could revert #322 and try another approach to fix the both issues ?

Either way, thanks already for the potential contribution and the thorough explanation 👍🏾  let me first review your changes but keep in mind that those other possibilities are also possible.

@laurynasgadl can you confirm that in version of PHP Domain Parser prior to #321 this bug did not exists.
If this is the case then the easier fix would be to revert the fix in #321 and think of a better way to fix #322 instead of the current patch which did introduce a bug more complex to resolve ? @ash-m  What do you think ?
Of course it would mean going back to the drawing board but I do not think rewritten the algorithm in a patch/minor version is the best way without introducing more bugs 🤔 . Of course this may lead to the older bug to re-appear unless we found a better approach

@nyamsprod Yes, this bug is not present in v6.1.0

Then I would suggest

we revert the last tag
we add more tests to make sure we do not add more regression
we try to better fix #321

To me that's a better approach since the broken behaviour was introduced by the fix.

@laurynasgadl Based on the tests from your PR I have a fix currently for both issues. but I will first try to make the code faster as currently the fix is slowing down the parsing.
The algorithm stays the same BUT also calculates the remaining private domain suffixes.
If the difference is greater than 2 labels, then it is a false positive and we reject the returned value.
Problem is calculating the remaining private domain suffixes is not fast enough I need to think of a better strategy.

@laurynasgadl I will close this PR. Instead I have fix the patch from #321 and #334 in #336.

No BC breaks needed
But improve/fine tune the behavio5

authors: laurynasgadl nyamsprod

repo: jeremykendall/php-domain-parser


text:
Using dependency check to scan python open source components

I want to scan python open source packages/libraries.
I downloaded the CLI dependency check tool version 3.2.1 from this website:
https://www.owasp.org/index.php/OWASP_Dependency_Check
I am using Python 3.6.4 on a Windows 64 bit OS

I think my problem is that I am not sure what type of files I can scan.
Attempted to scan:
-.py file created by myself with open source components import statements inside
-.python open source module (also a .py file)
-python package (packages in python are normal directories with a init.py file inside)
One of the commands ran on cmd:

The Python Analyer is described here. Also, I'd suggest reading about how dependency-check works.
Try running the following (switching backslashes to forward slashes, shortening the scan path so more is analyzed and adding the log file option):
dependency-check.bat --project Test --scan c:/Users/petra/Anaconda3 --out c:/Users/petra --enableExperimental --log c:/Users/petra/odc.log

If that does not work - the log file will provide the clues as to what has gone wrong.

repo: jeremylong/DependencyCheck


text:
Engine used for .NET scan

Hi
Quick question about .NET... Which engine is used to find vulnerabilities? Im doing a quick test with a vulnerable library in purpose (https://snyk.io/vuln/SNYK-DOTNET-SYSTEMSECURITYCRYPTOGRAPHYXML-60244) but it is not being picked by dependency check.
Thanks

snyk is using a private repository of vulnerability data - whereas ODC is relying on what is in the NVD.  If you look at CVE-2018-0765 you will see the specificity of the CVE is at the entire .NET and .NET core - it does not point out specific libraries that might make up the .NET core. If you follow the links back to Microsoft (from the CVE) you will see all the patched versions are against .NET and .NET core.

authors: javixeneize jeremylong


text:
False Positve --> Nexus Artifact Upload description

When an artifact was uploaded with Nexus Pro this description is set automatically:
"POM was created by Sonatype Nexus"
After switching from version 1.2.8 to 1.2.11 DependecyCheck getting these vulnerabilities CVE-2014-9389 / CVE-2014-0792 then the pom-description is set as an evidence.

I am assuming that this is coming from the manifest? If so, could you provide the example manifest entries just so I can correctly fix this false positive?
Thanks!
Jeremy

it's comes from pom description. In my case the manifest has no description.
4.0.0mygroupidmyArtifactId1.0.0POM was created by Sonatype Nexus

Thanks for the bug report. a patch has been committed to 1.2.12-SNAPSHOT and will be included in the next release.

authors: jeremylong kaimago


text:
Report diff between plugin / cli

same maven project,
analysis with maven plugin model and cli model.
the html report :
two model, File Path,MD5 SHA1  SHA256  is ok
bug, Description and Lincnse info :  plugin model is ok,   cli model  is null.
why?

because the maven plugin benefits from the dependency management tool that maven is and the cli doesn't

because the maven plugin benefits from the dependency management tool that maven is and the cli doesn't

I don't think so. The jar package is found in both ways. Where are the descriptions and license information read from?
I think it is read from the jar, at least the license information is like this, because there is a license file in the jar.
I have tried many times. A small number of descriptions and licenses can also be obtained in the CLI mode, but most of them are still not available. However, there are both descriptions and licenses in the plugin mode.

because the maven plugin benefits from the dependency management tool that maven is and the cli doesn't

I know ,you are right ,thank you~
plugin model,read maven repository files,   a same name pom file with the jar ~ info  here.


text:
Dependencies are now being listed as hotspots in SonarQube Project

Environment:
Pipeline using Azure DevOps
SonarQube Enterprise Edition Version 8.9.9 (build 56886)
Gradle 8.1
SonarQube Gralde Plugin 3.5.0.2730
Problem
We have an Azure Pipeline that builds using Gradle and the OWASP Dependency Report is published to SonarQube (visible under More → HTML Dependency-Check) but require the issues to be listed under Security Hotspots. Under “Security Hotspots” states “There are no Security Hotspots to review.”
azure-pipelines.yml

task: SonarQubePrepare@5
inputs:
SonarQube: 'SonarQube [our sonarqube URL]'
scannerMode: 'CLI'
configMode: 'file'
extraProperties: |
sonar.dependencyCheck.reportPath=dependency-check-report.html
sonar.dependencyCheck.htmlReportPath=$(Agent.TempDirectory)/dependency-scan-results/CA/dependency-check-report.html
sonar.dependencyCheck.jsonReportPath=$(Agent.TempDirectory)/dependency-scan-results/CA/dependency-check-report.json
sonar.dependencyCheck.xmlReportPath=$(Agent.TempDirectory)/dependency-scan-results/CA/dependency-check-report.xml
sonar.dependencyCheck.severity.blocker=9.0
sonar.dependencyCheck.severity.critical=7.0
sonar.dependencyCheck.severity.major=4.0
sonar.dependencyCheck.summarize=true
sonar.dependencyCheck.securityHotspot=true
sonar.verbose=true

task: dependency-check-build-task@6
inputs:
projectName: 'XtdForce CA'
scanPath: '$(system.defaultworkingdirectory)/ca'
format: 'ALL'
reportsDirectory: '$(Agent.TempDirectory)/dependency-scan-results/CA'
additionalArguments: '--disableAssembly --disableNodeJS --disablePnpmAudit --disableNodeAudit --disableRetireJS --format HTML --format JSON --format XML'

What we have tried:
If in the "dependency-check-build-task@6" task we down grade to version 7.0.0 (dependencyCheckVersion: '7.0.0') then we get all the hotspots listed as lows. Is the issue that the SonarQube version is 8.0?

@GAlfstad Dependency report issue registration within SonarQube is the responsibility of the SonarQube plugin, which is separate from this project and can be found at https://github.com/dependency-check/dependency-check-sonar-plugin
You likely suffer from https://github.com/dependency-check/dependency-check-sonar-plugin/issues/748

The issue is with the dependency-check-sonar-plugin - not the core project.

authors: GAlfstad aikebah jeremylong


text:
Make multiple documents / indexes with PDFReader from llamahub

Hi, I try to use llama hub and get data from pdf by PDFReader(), but then I realize that I can make only one pdf with this (I have 6 diffrent), becouse I need to use file=Path(). I try making 2 index and use GPTListIndex but this didn't work. Does anyone solve that problem before?
PS: sorry for any mistake or stupid sentences, I'm new in this XD

You can load all pdfs into a single index, the SimpleDirectoryReader makes this easy
from llama_index import SimpleDirectoryReader, GPTVectorStoreIndex

documents = SimpleDirectoryReader("./path/to/data").load_data

index = GPTVectorStoreIndex.from_documents(documents)

Can we read pdf from google drive also

Can we read pdf from google drive also

Yea you probably can use this: https://llamahub.ai/l/google_drive
or this one: https://llamahub.ai/l/google_docs

You can load all pdfs into a single index, the SimpleDirectoryReader makes this easy
from llama_index import SimpleDirectoryReader, GPTVectorStoreIndex

documents = SimpleDirectoryReader("./path/to/data").load_data

index = GPTVectorStoreIndex.from_documents(documents)

But then I cannot load pdf, I need to use loader.load_data(), I thing SimpleDirectoryReader work only with txt file.
And also get this error

Whoops, typo. Yea you need load_data() at the end
SimpleDirectoryReader supports a ton of file extensions, not just txt

Whoops, typo. Yea you need load_data() at the end: documents = SimpleDirectoryReader("./path/to/data").load_data()
SimpleDirectoryReader supports a ton of file extensions, not just txt

Oh yea XD, my mistake. It worked but I can feel it's not the same like using PDFReader, the AI answer sometimes isn't what I expected. When I use this PDFReader the AI answer was more matching and specific to question. Probably there is no best way to do this, so thank you so much for helping, I will go SimpleDirectoryReader ^^

Yea, there's a few other settings you can tweak like similarity_top_k and chunk_size, I'm sure you'll find what works best after some experimenting! 💪


text:
[Question]:node strategy

Question Validation

[X] I have searched both the documentation and discord for an answer.

Question
Hello,
Does llama-index have any abstractions for optimizing the node chunking - chunk size and overall for a specific document?
Thanks!

Hey @ddealwis09,
Check out this documentation, you can control the text splitter, chunk size, chunk overlap and more.
https://gpt-index.readthedocs.io/en/stable/core_modules/data_modules/node_parsers/usage_pattern.html
Feel free to join the discord if you have any other questions!


text:
update Dockerfile

ありがたく使わせていただきました:pray:
Dockerを利用して使うにあたり、DockerHubからのpull, ローカルでのbuildともに軽微な修正が必要だったので、PR出しておきます:pray:

DockerHub からのpull時、下記エラーが発生したため修正

Dockerのバージョンによりそうですが、ダブルクォート内が1コマンド扱いにされるようになったようです。

$ docker run --rm jerrywdlee/yaml_2_resume:latest
docker: Error response from daemon: OCI runtime create failed: container_linux.go:370: starting container process caused: exec: "bundle exec ruby app.rb": executable file not found in $PATH: unknown.

build時、IPAフォントのリンク切れが発生していたため新しい配布サイトに切り替え
常にruby2系の最新イメージを利用するように (3系は依存パッケージの都合使えないようだったのでやめました)

PRありがとうございました。問題なさそうですが、手元のPCにDocker入ってないので、来週くらい動きを確認してMergeする予定です
どうもありがとうございました。

PRありがとうございました。問題なさそうですが、手元のPCにDocker入ってないので、来週くらい動きを確認してMergeする予定です
どうもありがとうございました。


text:
Provide the option to skip SSL verification for requests

If Polarion is used with an HTTPS connection using a self-signed certificate, some workarounds are required to make the requests package skip the certificate verification.
It would be nice to have a kwarg for the Polarion object constructor that disables SSL verification.

Sounds good. Did you try a workaround?
I looked here and it looks like i only need to pass verify=False when it's used.

Exactly, that's what needs to be done - I can also prepare a PR if you prefer and test it on my environment.
Currently, I am using a fairly complicated workaround overwriting requests.Session.merge_environment_settings, which is fairly ugly.
Additionally, I can also support you in terms of document support if you want (I currently have a use case related to reusing documents via the web service which I'd like to do with the help of your package).

Thanks! I will merge it, but it might take a little since I'm currently moving and have limited time.
For the document support i made a start, so feel free to continue: https://github.com/jesper-raemaekers/python-polarion/tree/documents
Currently it's a draft, so feel free to change anything. The class name currently is module, but i think it should be renamed to document. Module seems to be an old Polarion thing. Here is a snippet of how i was testing it locally:

spaces = project.getDocumentSpaces()
# spaces = project.getDocumentLocations()
docs = project.getDocumentsInSpace(spaces[0])
# workitem_in_doc = docs[0].getWorkItems()
comment = docs[0].comments.ModuleComment[0].uri
workitems = docs[0].getWorkItems()
# docs[0].insertComment('Hello this is a document comment')
top_level = docs[0].getTopLevelWorkitem()
docs[0].insertCommentReply(comment, 'Reply!')

repo: jesper-raemaekers/python-polarion


text:
Django variables with plain text are not evaluated

Accordingly to the documentation:
"A Django variable can also be used as content for any HTML element by placing an equals sign as the last character before the space and content"
it works great with tags but how about plain text?
- block heading
    Title=django_variable

result:
<% block heading %>
Title=django_variable
<% endblock %>

I think what you'd like to do there is go:
- block heading
    %title= django_variable

Which would output:
<% block heading %>
  <title>{{ django_variable }}</title>
<% endblock %>

My example was kind of confusing by me using the the keyword "title" but I do see what you are saying.
Here is another live example:
Written
%li{tooltip:'= thumbnail_name'}

Result
<li tooltip='= thumbnail_name'>

Solution
%li{tooltip:'{{ thumbnail.name}}'}

@helmutgranda : Are you referring to the "Ruby Blocks" section in the HAML documentation : http://haml-lang.com/docs/yardoc/file.HAML_REFERENCE.html#ruby_blocks
If so, I agree, that variables should also evaluate itself.

authors: helmutgranda jessemiller md3sum

repo: jessemiller/HamlPy


text:
Add check marks

Hi I little bit new in swift, I would like to add a check marks like the picture, however I can not get it, I try add the image in the xib file of the outgoing bubble, but it does not work.
How I can add the check marks like the picture?, I think that I have to add in the index table view as a text or something like that, but how?
Best regards

@angeljcarrillo  I haven't done this before but #1087 may have some helpful ideas for you

Thanks @Liampronan !
Also, @angeljcarrillo -- search old issues for "[Custom Cells]"

authors: Liampronan angeljcarrillo jessesquires

repo: jessesquires/JSQMessagesViewController


text:
[refactor] intro nixprofile package

Summary
There are three motivations for introducing the nixprofile package:

We should keep nix package focussed on executing core nix apis. This would
reduce its dependencies on other packages, enabling more packages to call nix
functions without hitting cycle errors.

nixprofile has a lot of devbox-specific logic. So, it should be its own package that calls nix apis (which themselves can be improved)

I tried moving nix.Package to devpkg but it was extremely difficult to avoid
new cyclic import errors. This PR will help avoid those.

This will also help break the import cycle for calling nix.System from lock.Lockfile.

How was it tested?
compiles

[ ] testscript should pass

Current dependencies on/for this PR:

main

PR #1238   👈

This comment was auto-generated by Graphite.

This seems generally good, except I would keep nix commands all in the nix package. Specifically, I would use nixprofile to turn devbox data into a specific nix call and then have nixprofile call the nix package. That way all nix API access is in a single package. Not a blocker.

Yes, 100% aligned. Its directionally what I had in mind with "can be improved" in the PR Summary: "So, it should be its own package that calls nix apis (which themselves can be improved)".
I'd like to circle back to it in a future PR. I wanna finish moving nix.Input to devpkg.

Soo, I decided to do it in this PR itself. So, now nixprofile calls nix apis. @mikeland73 PTAL
There is still "stutter" in naming of nixprofile functions but I'm punting on that for now.
Unfortunately, the git cp no longer carried over from nix/profile.go to nixprofile/profile.go, and so the git blame is a bit broken...

repo: jetpack-io/devbox


text:
没有创建.yapix文件

点击后没创建yapix文件

从文件系统中能否看到，或者刷新项目树试试

没有的
重启idea重试也不行，不知道什么原因

好的，我调试调试，你先手动创建

无法复现，暂时不处理

authors: kecikeci lkqm

repo: jetplugins/yapix


text:
Increase timeouts for cainjector e2e tests

What this PR does / why we need it:
These were previously set to 2s (the default), which is a bit too low when we run ~20 tests at once I think.
Release note:
NONE

/retest

/retest

/retest

/retest

repo: jetstack/cert-manager


text:
Add v0.11 draft release notes

What this PR does / why we need it:
Initial draft release notes for v0.11 - this is a big release 😄 looking forward to getting it out! 🎉
Release note:
NONE

/assign @JoshVanL
/milestone v0.11

/lgtm

authors: JoshVanL munnerz


text:
Delete old/unused test files. Merge wait-minikube.sh into ci.sh.

What this PR does / why we need it:
This PR cleans up some old files that are no longer used.
Release note:
NONE

It seems verify-chart-version.sh really does not like charts being deleted 😬 patches needed!

/skip

/skip


text:
Fix helm chart image tag (attempt 2)

This is based off https://github.com/jetstack/google-cas-issuer/pull/84 and cherry-picks the commit there but includes an update to the helm docs and a QoL fix for updating the docs
This is the second attempt after #89 - this time, using a branch on upstream rather than a fork since the github actions workflow seemed to fail because it was run on a fork.
When I looked at a recent merged PR (#82 ) I saw it was run using a branch on upstream.

Note: Fixes #88

repo: jetstack/google-cas-issuer