text:
Support AbstractGraph{T} for all T <: Integer

Currently only AbstractGraphs{Int64} are supported
MWE :
julia> g = SimpleDiGraph(UInt8(10))
{10, 0} directed simple UInt8 graph

julia> add_edge!(g, 1, 2)
true

julia> solve_positions(Zarate(), g);
ERROR: MethodError: Cannot `convert` an object of type
  JuMP.Containers.DenseAxisArray{VariableRef{},1,Tuple{Array{UInt8,1}},Tuple{Dict{UInt8,Int64{}}}} to an object of type
  JuMP.Containers.DenseAxisArray{VariableRef{},1,Tuple{Array{Int64,1}},Tuple{Dict{Int64,Int64{}}}}
Closest candidates are:
  convert(::Type{T}, ::T) where T<:AbstractArray at abstractarray.jl:14
  convert(::Type{T}, ::LinearAlgebra.Factorization) where T<:AbstractArray at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\LinearAlgebra\src\factorization.jl:55
  convert(::Type{T}, ::GenericAffExpr{T,VarType} where VarType) where T at C:\Users\Gauthier\.julia\packages\JuMP\e0Uc2\src\aff_expr.jl:317
  ...
Stacktrace:
 [1] setindex!(::Array{JuMP.Containers.DenseAxisArray{VariableRef,1,Tuple{Array{Int64,1}},Tuple{Dict{Int64,Int64}}},1}, ::JuMP.Containers.DenseAxisArray{VariableRef,1,Tuple{Array{UInt8,1}},Tuple{Dict{UInt8,Int64}}}, ::Int64) at .\array.jl:847
 [2] setindex! at .\multidimensional.jl:559 [inlined]
 [3] ordering_problem(::Zarate, ::SimpleDiGraph{UInt8}, ::Array{Array{UInt8,1},1}) at C:\Users\Gauthier\.julia\dev\LayeredLayouts\src\zarate.jl:113
 [4] solve_positions(::Zarate, ::SimpleDiGraph{UInt8}) at C:\Users\Gauthier\.julia\dev\LayeredLayouts\src\zarate.jl:67
 [5] top-level scope at REPL[136]:1

checking this and it seems to have been fixed, though I am not sure when.
Under the hood we are still working with Int,
but I think this was just a usability issue, rather than one where that actually matters for memory.
So I am considering this closed .

authors: gsoleilhac oxinabox


text:
Rename ObjId to Id

What I understood from https://github.com/ozkriff/zemeroth/issues/358 ; a simple replace all, clippy and cargo check are ok with these changes.

I fixed cargo fmt errors concerning using orders impacted by alphabectical change.
Other errors concerning function parameters being on several lines were not the point of this merge request.

Thanks, merged!

source: gharchive/pull-request

authors: Vrixyz ozkriff

repo: ozkriff/zemeroth

license_type: permissive

license_source: github-api


text:
Support for id's for homebridge-nest

Hi
You have created support Nest token and id's for for homebridge-nest-cam which is great. However, I am using homebridge-nest, which needs similar tokens. Especially, the Cookie token needs to refreshed at regular intervals.
It would nice if this already existing functionality in configu-ui-x could also support that one.
Thanks.
Ejvind

All the code to make this happen lives in the homebridge-nest-cam repo; homebridge-nest would need to add the same or similar code to enable this.

Code ref: https://github.com/Brandawg93/homebridge-nest-cam/blob/master/src/uix.ts

source: gharchive/issue

authors: EjvindHald oznu

repo: oznu/homebridge-config-ui-x

license: MIT


text:
PCT algorithm bugs

I think there are some bugs in the PCT algorithm. I will send a pull request or more details later.

Here I would change:
var mIndex = RandomNumberGenerator.Next(PrioritizedSchedulableChoices.Count) + 1;
// ->
var mIndex = RandomNumberGenerator.Next(PrioritizedSchedulableChoices.Count + 1);

The former does not allow mIndex to be 0. This means a thread can never be added as the highest priority thread. Or is this intentional because the 0th thread is always the initial thread? Will it ever do sends?
And here in the Fisher-Yates shuffle, I think the random choice should be between 0 and idx (inclusive), not 0 and ScheduleLength (exclusive). Unless both are valid.
There are a few other changes I could suggest. In particular, PCT implementations that I can find (four of them, including two of my own :) ) pick priority change points by repeatedly doing changePoints.Add(Random.Next(k)); if two change points end up on the same scheduling point, that is fine---there will just be two threads that get lowered. But maybe we should fix/dismiss the two queries above first so we have a baseline for comparison for any additional changes. Maybe we should also wait until DPOR is merged!

repo: p-org/PSharp

license: mit

license_source: bigquery


text:
issue with files name

just a small problem, the " character is illegal in windows file name so the script crash when it encounters one.

Did you mean directory names?
I've changed the directory name construction so that anything that isn't alphanumeric or '_' is stripped out.

@p-ranav  what about this one
saveddit search  AceAttorney  -q "Ace Attorney " -o .
Traceback (most recent call last):
  File "c:\users\dubo\anaconda3\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\dubo\anaconda3\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\dubo\anaconda3\Scripts\saveddit.exe\__main__.py", line 7, in <module>
  File "c:\users\dubo\anaconda3\lib\site-packages\saveddit\saveddit.py", line 356, in main
    downloader.download(args)
  File "c:\users\dubo\anaconda3\lib\site-packages\saveddit\search_subreddits.py", line 100, in download
    os.makedirs(search_dir)
  File "c:\users\dubo\anaconda3\lib\os.py", line 213, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "c:\users\dubo\anaconda3\lib\os.py", line 223, in makedirs
    mkdir(name, mode)
FileNotFoundError: [WinError 3] filenotfound。: '.\\www.reddit.com\\q\\Ace Attorney \\AceAttorney'

authors: p-ranav reuspppp wanghaisheng

repo: p-ranav/saveddit


text:
Failed test 'No matches found for Descendants matching type Table from input'

po app output (po stands for Print Object)
(lldb) po app
Attributes: Application, 0x7fae4ff159a0, pid: 80385, label: 'TallestTowers'
Element subtree:
 →Application, 0x7fae4ff159a0, pid: 80385, label: 'TallestTowers'
    Window (Main), 0x7fae4fa06510, {{0.0, 0.0}, {393.0, 852.0}}
      Other, 0x7fae4fa0b1b0, {{0.0, 0.0}, {393.0, 852.0}}
        Other, 0x7fae5311de00, {{0.0, 0.0}, {393.0, 852.0}}
          Other, 0x7fae4fc051c0, {{0.0, 0.0}, {393.0, 852.0}}
            Other, 0x7fae4fc07c40, {{0.0, 0.0}, {393.0, 852.0}}
              Other, 0x7fae4fc05550, {{0.0, 0.0}, {393.0, 852.0}}
                Other, 0x7fae4fc05660, {{0.0, 0.0}, {393.0, 852.0}}
                  Other, 0x7fae4ff16ac0, {{0.0, 0.0}, {393.0, 852.0}}
                    NavigationBar, 0x7fae4ff1eb00, {{0.0, 53.7}, {393.0, 96.0}}, identifier: 'Tallest Towers'
                      StaticText, 0x7fae4fc08820, {{16.0, 101.3}, {223.3, 40.7}}, label: 'Tallest Towers'
                    Other, 0x7fae4fc08400, {{0.0, 0.0}, {393.0, 852.0}}
                      Other, 0x7fae4ff25390, {{0.0, 0.0}, {393.0, 852.0}}
                        Other, 0x7fae5311da40, {{0.0, 0.0}, {393.0, 852.0}}
                          Other, 0x7fae4fc08510, {{0.0, 0.0}, {393.0, 852.0}}
                            CollectionView, 0x7fae53007ed0, {{0.0, 0.0}, {393.0, 852.0}}
                              Other, 0x7fae4ff27e80, {{-20.0, -1554.3}, {433.0, 4053.3}}
                              Cell, 0x7fae4e729bf0, {{20.0, 149.7}, {353.0, 60.3}}
                                Other, 0x7fae4e725340, {{20.0, 149.7}, {353.0, 60.3}}
                                  Other, 0x7fae4e71e920, {{20.0, 149.7}, {353.0, 60.3}}
                                Other, 0x7fae4e715630, {{20.0, 149.7}, {353.0, 60.3}}
                                  Other, 0x7fae4e728a90, {{20.0, 149.7}, {353.0, 60.3}}
                                    Other, 0x7fae4e715290, {{20.0, 149.7}, {353.0, 60.3}}
                                      Button, 0x7fae4e7286e0, {{20.0, 149.7}, {353.0, 60.3}}, label: 'Burj Khalifa, Dubai, United Arab Emirates, 828m'
                                        StaticText, 0x7fae4e712da0, {{40.0, 160.7}, {86.0, 20.3}}, label: 'Burj Khalifa'
                                        StaticText, 0x7fae4e712a10, {{40.0, 181.0}, {193.3, 18.0}}, label: 'Dubai, United Arab Emirates'
                                        StaticText, 0x7fae4e712650, {{261.0, 163.0}, {73.7, 33.7}}, label: '828m'
                                        Image, 0x7fae4e7067b0, {{345.3, 173.7}, {7.0, 12.0}}
                              Cell, 0x7fae4e7046c0, {{20.0, 210.0}, {353.0, 60.3}}
                                Other, 0x7fae4e710a80, {{20.0, 210.0}, {353.0, 60.3}}
                                  Other, 0x7fae4e7106d0, {{20.0, 210.0}, {353.0, 60.3}}
                                Other, 0x7fae4e7117a0, {{20.0, 210.0}, {353.0, 60.3}}
                                  Other, 0x7fae4e734c70, {{20.0, 210.0}, {353.0, 60.3}}
                                    Other, 0x7fae4e734100, {{20.0, 210.0}, {353.0, 60.3}}
                                      Button, 0x7fae4e732610, {{20.0, 210.0}, {353.0, 60.3}}, label: 'Shanghai Tower, Shanghai, China, 632m'
                                        StaticText, 0x7fae4e731a80, {{40.0, 221.0}, {120.7, 20.3}}, label: 'Shanghai Tower'
                                        StaticText, 0x7fae4e72efb0, {{40.0, 241.3}, {111.0, 18.0}}, label: 'Shanghai, China'
                                        StaticText, 0x7fae4e726bf0, {{260.7, 223.3}, {74.0, 33.7}}, label: '632m'
                                        Image, 0x7fae4e72e4b0, {{345.3, 234.0}, {7.0, 12.0}}
                              Other, 0x7fae4e72e110, {{40.0, 209.7}, {333.0, 0.3}}
                              Cell, 0x7fae4e726850, {{20.0, 270.3}, {353.0, 60.3}}
                                Other, 0x7fae4e724d50, {{20.0, 270.3}, {353.0, 60.3}}
                                  Other, 0x7fae4e7260e0, {{20.0, 270.3}, {353.0, 60.3}}
                                Other, 0x7fae4e7264a0, {{20.0, 270.3}, {353.0, 60.3}}
                                  Other, 0x7fae4e72d9b0, {{20.0, 270.3}, {353.0, 60.3}}
                                    Other, 0x7fae4e72d600, {{20.0, 270.3}, {353.0, 60.3}}
                                      Button, 0x7fae4e72d250, {{20.0, 270.3}, {353.0, 60.3}}, label: 'Abraj Al-Bait Clock Tower, Mecca, Saudi Arabia, 601m'
                                        StaticText, 0x7fae4e72c6d0, {{40.0, 281.3}, {193.3, 20.3}}, label: 'Abraj Al-Bait Clock Tower'
                                        StaticText, 0x7fae4e72c320, {{40.0, 301.7}, {140.0, 18.0}}, label: 'Mecca, Saudi Arabia'
                                        StaticText, 0x7fae4e723e40, {{264.0, 283.7}, {70.7, 33.7}}, label: '601m'
                                        Image, 0x7fae4e72bf80, {{345.3, 294.3}, {7.0, 12.0}}
                              Other, 0x7fae4e7226e0, {{40.0, 270.0}, {333.0, 0.3}}
                              Cell, 0x7fae4e72bbf0, {{20.0, 330.7}, {353.0, 60.3}}
                                Other, 0x7fae4e72b830, {{20.0, 330.7}, {353.0, 60.3}}
                                  Other, 0x7fae4e722330, {{20.0, 330.7}, {353.0, 60.3}}
                                Other, 0x7fae4e721f80, {{20.0, 330.7}, {353.0, 60.3}}
                                  Other, 0x7fae4e721bd0, {{20.0, 330.7}, {353.0, 60.3}}
                                    Other, 0x7fae4e71f400, {{20.0, 330.7}, {353.0, 60.3}}
                                      Button, 0x7fae4e72b490, {{20.0, 330.7}, {353.0, 60.3}}, label: 'Ping An Finance Center, Shenzhen, China, 599m'
                                        StaticText, 0x7fae4e71ca90, {{40.0, 341.7}, {178.0, 20.3}}, label: 'Ping An Finance Center'
                                        StaticText, 0x7fae4e718e00, {{40.0, 362.0}, {115.7, 18.0}}, label: 'Shenzhen, China'
                                        StaticText, 0x7fae4e7249b0, {{259.7, 344.0}, {75.0, 33.7}}, label: '599m'
                                        Image, 0x7fae4e718a40, {{345.3, 354.7}, {7.0, 12.0}}
                              Other, 0x7fae4e717c80, {{40.0, 330.3}, {333.0, 0.3}}
                              Cell, 0x7fae4e716cc0, {{20.0, 391.0}, {353.0, 60.3}}
                                Other, 0x7fae4e716920, {{20.0, 391.0}, {353.0, 60.3}}
                                  Other, 0x7fae4e715da0, {{20.0, 391.0}, {353.0, 60.3}}
                                Other, 0x7fae4e7159f0, {{20.0, 391.0}, {353.0, 60.3}}
                                  Other, 0x7fae4e70a9c0, {{20.0, 391.0}, {353.0, 60.3}}
                                    Other, 0x7fae4e70e720, {{20.0, 391.0}, {353.0, 60.3}}
                                      Button, 0x7fae4e70ee50, {{20.0, 391.0}, {353.0, 60.3}}, label: 'Goldin Finance 117, Tianjin, China, 596m'
                                        StaticText, 0x7fae4e70eac0, {{40.0, 402.0}, {141.3, 20.3}}, label: 'Goldin Finance 117'
                                        StaticText, 0x7fae4e70df40, {{40.0, 422.3}, {92.0, 18.0}}, label: 'Tianjin, China'
                                        StaticText, 0x7fae4e71e2d0, {{259.7, 404.3}, {75.0, 33.7}}, label: '596m'
                                        Image, 0x7fae4e71e3e0, {{345.3, 415.0}, {7.0, 12.0}}
                              Other, 0x7fae4e71d650, {{40.0, 390.7}, {333.0, 0.3}}
                              Cell, 0x7fae4e71d760, {{20.0, 451.3}, {353.0, 60.3}}
                                Other, 0x7fae4e7102c0, {{20.0, 451.3}, {353.0, 60.3}}
                                  Other, 0x7fae4e7103d0, {{20.0, 451.3}, {353.0, 60.3}}
                                Other, 0x7fae4e7070c0, {{20.0, 451.3}, {353.0, 60.3}}
                                  Other, 0x7fae4e7071d0, {{20.0, 451.3}, {353.0, 60.3}}
                                    Other, 0x7fae4e71a390, {{20.0, 451.3}, {353.0, 60.3}}
                                      Button, 0x7fae4e71a4a0, {{20.0, 451.3}, {353.0, 60.3}}, label: 'Lotte World Tower, Seoul, South Korea, 554m'
                                        StaticText, 0x7fae4fa0fcd0, {{40.0, 462.3}, {138.3, 20.3}}, label: 'Lotte World Tower'
                                        StaticText, 0x7fae4fa08f60, {{40.0, 482.7}, {130.3, 18.0}}, label: 'Seoul, South Korea'
                                        StaticText, 0x7fae4fa09070, {{260.7, 464.7}, {74.0, 33.7}}, label: '554m'
                                        Image, 0x7fae4fa0a790, {{345.3, 475.3}, {7.0, 12.0}}
                              Other, 0x7fae4fa0a8a0, {{40.0, 451.0}, {333.0, 0.3}}
                              Cell, 0x7fae4fa0a9b0, {{20.0, 511.7}, {353.0, 60.3}}
                                Other, 0x7fae4fa0aac0, {{20.0, 511.7}, {353.0, 60.3}}
                                  Other, 0x7fae4fa0abd0, {{20.0, 511.7}, {353.0, 60.3}}
                                Other, 0x7fae4fa0b570, {{20.0, 511.7}, {353.0, 60.3}}
                                  Other, 0x7fae4fa0b680, {{20.0, 511.7}, {353.0, 60.3}}
                                    Other, 0x7fae4fa0b790, {{20.0, 511.7}, {353.0, 60.3}}
                                      Button, 0x7fae4fa0b8a0, {{20.0, 511.7}, {353.0, 60.3}}, label: 'One World Trade Center, New York City, USA, 541m'
                                        StaticText, 0x7fae4fa0b9b0, {{40.0, 522.7}, {184.3, 20.3}}, label: 'One World Trade Center'
                                        StaticText, 0x7fae4fa067c0, {{40.0, 543.0}, {133.3, 18.0}}, label: 'New York City, USA'
                                        StaticText, 0x7fae4fa068d0, {{264.7, 525.0}, {70.0, 33.7}}, label: '541m'
                                        Image, 0x7fae4fa069e0, {{345.3, 535.7}, {7.0, 12.0}}
                              Other, 0x7fae4fa06af0, {{40.0, 511.3}, {333.0, 0.3}}
                              Cell, 0x7fae4fa048a0, {{20.0, 572.0}, {353.0, 82.3}}
                                Other, 0x7fae4fa049b0, {{20.0, 572.0}, {353.0, 82.3}}
                                  Other, 0x7fae4fa04ac0, {{20.0, 572.0}, {353.0, 82.3}}
                                Other, 0x7fae4fa04bd0, {{20.0, 572.0}, {353.0, 82.3}}
                                  Other, 0x7fae4fa04ce0, {{20.0, 572.0}, {353.0, 82.3}}
                                    Other, 0x7fae4fa073c0, {{20.0, 572.0}, {353.0, 82.3}}
                                      Button, 0x7fae4fa074d0, {{20.0, 572.0}, {353.0, 82.3}}, label: 'Guangzhou CTF Finance Center, Guangzhou, China, 530m'
                                        StaticText, 0x7fae4fa075e0, {{40.0, 583.0}, {127.3, 42.3}}, label: 'Guangzhou CTF Finance Center'
                                        StaticText, 0x7fae4fa076f0, {{40.0, 625.3}, {126.0, 18.0}}, label: 'Guangzhou, China'
                                        StaticText, 0x7fae4fa0dd00, {{260.7, 596.3}, {74.0, 33.7}}, label: '530m'
                                        Image, 0x7fae4e7094f0, {{345.3, 607.0}, {7.0, 12.0}}
                              Other, 0x7fae4e709600, {{40.0, 571.7}, {333.0, 0.3}}
                              Cell, 0x7fae4e71b2a0, {{20.0, 654.3}, {353.0, 60.3}}
                                Other, 0x7fae4e71b3b0, {{20.0, 654.3}, {353.0, 60.3}}
                                  Other, 0x7fae4e71b4c0, {{20.0, 654.3}, {353.0, 60.3}}
                                Other, 0x7fae4e72ca70, {{20.0, 654.3}, {353.0, 60.3}}
                                  Other, 0x7fae4e72cb80, {{20.0, 654.3}, {353.0, 60.3}}
                                    Other, 0x7fae4e72cc90, {{20.0, 654.3}, {353.0, 60.3}}
                                      Button, 0x7fae4e72ffb0, {{20.0, 654.3}, {353.0, 60.3}}, label: 'Tianjin CTF Finance Center, Tianjin, China, 530m'
                                        StaticText, 0x7fae4e7300c0, {{40.0, 665.3}, {204.3, 20.3}}, label: 'Tianjin CTF Finance Center'
                                        StaticText, 0x7fae4e7301d0, {{40.0, 685.7}, {92.0, 18.0}}, label: 'Tianjin, China'
                                        StaticText, 0x7fae4e7307a0, {{260.7, 667.7}, {74.0, 33.7}}, label: '530m'
                                        Image, 0x7fae4e7308b0, {{345.3, 678.3}, {7.0, 12.0}}
                              Other, 0x7fae4e7309c0, {{40.0, 654.0}, {333.0, 0.3}}
                              Cell, 0x7fae4e731e30, {{20.0, 714.7}, {353.0, 60.3}}
                                Other, 0x7fae4e731f40, {{20.0, 714.7}, {353.0, 60.3}}
                                  Other, 0x7fae4e732050, {{20.0, 714.7}, {353.0, 60.3}}
                                Other, 0x7fae4e7329a0, {{20.0, 714.7}, {353.0, 60.3}}
                                  Other, 0x7fae4e732ab0, {{20.0, 714.7}, {353.0, 60.3}}
                                    Other, 0x7fae4e732bc0, {{20.0, 714.7}, {353.0, 60.3}}
                                      Button, 0x7fae4e733160, {{20.0, 714.7}, {353.0, 60.3}}, label: 'China Zun, Beijing, China, 528m'
                                        StaticText, 0x7fae4e733270, {{40.0, 725.7}, {77.7, 20.3}}, label: 'China Zun'
                                        StaticText, 0x7fae4e733380, {{40.0, 746.0}, {93.3, 18.0}}, label: 'Beijing, China'
                                        StaticText, 0x7fae4e733920, {{261.3, 728.0}, {73.3, 33.7}}, label: '528m'
                                        Image, 0x7fae4e733a30, {{345.3, 738.7}, {7.0, 12.0}}
                              Other, 0x7fae4e733b40, {{40.0, 714.3}, {333.0, 0.3}}
                              Other, 0x7fae4e734490, {{360.0, 103.0}, {30.0, 699.7}}, label: 'Vertical scroll bar, 1 page', value: 0%
                              Other, 0x7fae4e7345a0, {{49.3, 785.0}, {294.3, 30.0}}, label: 'Horizontal scroll bar, 1 page', value: 0%
Path to element:
 →Application, 0x7fae4ff159a0, pid: 80385, label: 'TallestTowers'
Query chain:
 →Find: Target Application 'com.semaphoreci.TallestTowers'
  Output: {
    Application, 0x7fae4fa100b0, pid: 80385, label: 'TallestTowers'
  }

(lldb)

Other things to try for the future:
'Debug view hierarchy' (icon with 3 squares). You can drag the slider on the right to control the range of visible views.


text:
E-Mail Validation fails on /admin123 login

Describe the bug
After entering login data for admin123 message "Your Email must be a valid email address." appears, but e-mail address is valid.
To Reproduce
Steps to reproduce the behavior:

Go to https://ph7.example.com/admin123/main/login
Enter admins e-mail, username and password
See error

Expected Behavior
e-mail address should validate
Screenshots / Screencasts

Workaround
To get this working, I considered following workaround:
--- Validate.class.php.ORIG	2023-07-30 04:29:28.602137792 +0000
+++ Validate.class.php	2023-07-30 04:24:20.233319333 +0000
@@ -272,6 +272,7 @@
     public function email($sEmail, $bRealHost = false)
     {

+        return true;
         $sEmail = filter_var($sEmail, FILTER_SANITIZE_EMAIL);

         if ($bRealHost) {

Hi @ip6li
Thanks for mentioning this. Returning true will completely disable the email validation check. We don't want this. Could you share the pattern format of the email you have used?


text:
How to redraw highchart after change it's data?

Hi team! I have used highchart in my angular application but i have got a problem. After data has been changed after ajax loaded, the chart has not been redraw.
My code is:
js:
olbius.controller('DashboardController',function($rootScope, $scope, $controller,DashboardService,InventoryService) {
$.extend(this, $controller('BaseController', {
$scope: $scope
}));
//    $scope.chartSeries = [];
$scope.chartSeries = [
                    ];
$scope.chartConfig = {
            options: {
                chart: {
                	type: 'column',
     	            borderColor: '#EBBA95',
     	            borderWidth: 3,
     	            height:220,
     	   			 width:600
                }
            },
            series:  [{
                      data: $scope.chartSeries
            }]
            ,
            title: {
                text: 'Tỷ lệ số lượng các SP đã bán(%)'
            }
};

$scope.$on('$viewContentLoaded', function() {
	$scope.setHeader("Thống kê", "/main", false);
    $scope.getDataPurchaseProduct();
});

//    InventoryService.getTable().then(function(res){
//    	console.log(res);
//    });
	$scope.dataProduct = [];
	$scope.getDataPurchaseProduct =   function (){
	    	DashboardService.purchaseReportProduct().then(function(res){
	    		var productPurchaseArr = new Array();
	    		var productQuantity = new Array();
	    		var temp = new Array();
	    		var dataSet = new Array();
	    		var quantity = 0;
	    		var i = 0;//index

			for ( var productReport in res["productQtyInfo"]) {
				var quantity = parseFloat(res["productQtyInfo"][productReport]["quantity"]);
				productPurchaseArr.push(quantity);
				temp.push(productReport);
				i++;
			}
			var sum = 0;
			for (var j = 0; j < productPurchaseArr.length; j++) {
				sum += productPurchaseArr[j];
			}
			for (var j = 0; j < productPurchaseArr.length; j++) {
				productQuantity.push(((productPurchaseArr[j] / sum * 100).toFixed(2))/1);
			}
			for(var i=0 ;i<temp.length;i++){
				$scope.chartSeries.push({"name":temp[i],"data":[productQuantity[i]]});
			}
			console.log($scope.chartSeries);

//				$scope.chartSeries = $scope.dataProduct;
	    });

};

});
html:

Could you create a jsfiddle?

Hi, should the code be $scope.chartConfig.chartSeries.push? You have $scope.chartSeries.push in your code.
I really like this this plugin btw, great job! :)

:).Thanks Typescripter and pablojim,i really like this plugin too,and I fixed this problem then  add $scope.chartSeries.push...:D

Thanks u so much :)

Thanks @Namdnitbk92  and @typescripter

@Namdnitbk92 You said you fixed this problem. How?

authors: Bclayson Namdnitbk92 pablojim typescripter

repo: pablojim/highcharts-ng


text:
Official JavaScript Pachyderm Client

We've had a number of people wanting to build dashboards on top of Pachyderm, and we have a browser-usable JS client wrapped up in the dashboard. It would be good to split this client out into a standalone repo that could be directly consumed as a dependency, with it's own CI and automated building of Pach's protobufs. Ideally this package would also work from Node, but there's probably some added complications there around how to handle switching out the use of a websocket proxy (since a node client could just connect directly over GRPC, proxy-free)
Specific TODOs (from the Ruby client delivery):
1) Integration Work
When supporting a client, we have a handful of requirements to ensure code quality / maintainability.

[ ] Update the proto build process to consume the protos directly from the Pachyderm repo at a release version
[ ] Use our standardized proto build approach (within a docker container) for reproducible code emitted from the proto/grpc definitions
[ ] Stand up CI for all work on the client
[ ] Use meta programming tricks to make the client easier to use. This guarantees 100% API coverage, and resilience to API changes

2) Usage

[ ] Create the repository and examples of basic usage
[ ] Create tests for examples of different call patterns. In particular streaming calls, e.g. getFile and putFile
[ ] how to use auth tokens via the client

3) Installation

[ ] push to NPM to enable npm install pachyderm
[ ] Ensure the version is aligned with the Pachyderm API version (so 1.7.3.12 of the package is built against Pachyderm 1.7.3)

Similar to the Ruby client, we should ideally figure out a process to have full coverage of all APIs (pfs, pps, auth, etc) and wrap that under a single client (for convenience and so that auth session data gets used without having to specify it each time).
For client-side we'll also need to figure out how we communicate the usage of the grpc websocket proxy

Any update on this?

Hey @theomessin work has started on a node client over at node-pachyderm. It's still in the beginning stages but feel free to check it out.

authors: Connor-Wallace gabrielgrant theomessin

repo: pachyderm/pachyderm


text:
Question about pachctl get file

Can i fetch file from repo and download into local Directory using this Command pachctl get file @:<path/in/pfs> [flags]

Hello @PriyankaUrs1796 , I'm not sure if you're having an issue or if this is just a question but you can download a file from a repo and branch by using
# get file "XXX" on branch "master" in repo "foo"
$ pachctl get file foo@master:XXX

Hello @PriyankaUrs1796 , I'm not sure if you're having an issue or if this is just a question but you can download a file from a repo and branch by using
# get file "XXX" on branch "master" in repo "foo"
$ pachctl get file foo@master:XXX

Hi @mindthevirt by using this command pachctl get file foo@master:XXX you can display the content of a file not able to download .

@PriyankaUrs1796 you'll need to specify -o with the output file name. For example:
pachctl list file images@master
NAME         TYPE SIZE
/46Q8nDz.jpg file 57.27KiB
/8MN9Kg0.jpg file 78.7KiB
/g2QnNqa.jpg file 102.4KiB

pachctl get file images@master:/46Q8nDz.jpg -o 46Q8nDz.jpg
46Q8nDz.jpg 58.64KB / 58.64 KB [========================================================================================================================================================================] 0s 0.00 b/s

@mindthevirt thanks jan i am able to download the file to my local directory now ,but the issue is
REPO   BRANCH    COMMIT                           FINISHED       SIZE     PROGRESS DESCRIPTION
images newMaster 1c53b8a0662247949e5b989bb00c5783 3 minutes ago  1.438MiB -
images newMaster 76727a9663be412196e1d5d94c6f0801 15 minutes ago 1.047MiB -
I have uploaded the file with same name but different content, i need to do Data Versioning so when i download the file with their corresponding COMMIT ID the first file which i uploaded is getting download .So how can i resolve this.

@mindthevirt I am able to download file using their commit ids ,but now i am struck to download a directory from repo i am using --recursive Flag but i am not able to do .
$ pachctl get file images@02506b3e70ce41ecb45e2e62d00d8927:/Input_dir -r  /newdir
Input_dir is the directory i have uploaded and newdir is the new dir i want the uploaded files.

Hi @PriyankaUrs1796
I think you might not be uploading your files to the directory structure you're expecting.
Here's a series of commands that does what you're trying to do:
$ mkdir data-output
$ pachctl put file test-data@master:data/housing-simplified-0.csv -f data/housing-simplified-0.csv
$ pachctl put file test-data@master:data/housing-simplified-1.csv -f data/housing-simplified-1.csv
$ pachctl get file test-data@master:/data/ --recursive -o ./data-output/

I hope this helped. I'm closing this issue now. If you need additional help, please drop by our #users channel in our Pachyderm Slack Community for additional help. Thank you!

authors: PriyankaUrs1796 echohack mindthevirt


text:
Don't error if worker dir already exists

Fix #1606

Lol, literally just fixed this myself an was about to open a PR, my fix is identical to yours so... looks quite good to me.

authors: derekchiang jdoliner


text:
Updates and Improvements

This PR updates k8s version to 1.18.3, calico to 3.13.1, metallb to 0.9.3.
I also added more options in the vars file as well as removing the need for an ssh agent to deploy the cluster. Terraform will now create a pem key that gets deleted when the cluster is destroyed.
I also updated the syntax to follow terraform 0.12 which gets rid of the warnings.

@pereztr5 Just push a tiny change to the variables file for consistent spacing :D
Feel free to merge now. I have tested my repo and it works well.

repo: packet-labs/kubernetes-bgp


text:
Check test-only jobs without a specfile_path

And no specfile in the repo.
Signed-off-by: Hunor Csomortáni csomh@redhat.com

/packit test

repo: packit/hello-world


text:
Disable the "Follow Fedora branching" feature while creating Copr projects

For non-Packit use cases, it's best to have this feature enabled.  Users
that enable Rawhide chroots typically want us (Copr) to automatically
branch the Rawhide builds to a "branched" chroot, once it appears.
But Packit handles the set of chroots itself when the build is done.
There's probably no motivation to let us copy the builds.  At the time of
branching, disabling the feature would save us a lot of copying work and
we would save some storage (tens or hundreds of GB).

Yes, we can do that. (If Copr provides an API for that...;) Even this is important mainly to the non-temporary projects which is probably a minority of all the projects...
We can also decrease the number of days the temporary project is removed:
https://github.com/packit/packit/blob/41a74aefaa6a7d07f2559513c0d454d082b1efdd/packit/copr_helper.py#L121-L123

If I'm not wrong we are missing that API, yes.  Reported here https://pagure.io/copr/copr/issue/2312

waiting for the Copr deployment on 5/25 to be able to get the current value of the branching from the API

authors: lachmanfrantisek mfocko praiskup

repo: packit/packit-service


text:
creating a source-git repo results in a malformed spec file in .distro/

(this is mostly a note to me to investigate further)
$ packit -d source-git init v2.2.4 . ~/p/f/r/rubygem-fog-core
...
2022-04-29 17:24:59.688 packit_base.py    DEBUG  Packit 0.49.1.dev5+gc36800b is being used.
2022-04-29 17:24:59.689 source_git_init.py WARNING Generating source-git repositories is experimental, please give us feedback if it does things differently than you expect.
2022-04-29 15:24:59.741 commands.py       DEBUG  Command: rsync --archive --delete --filter exclude *.patch --filter exclude sources --filter exclude .git* /home/tt/p/f/r/rubygem-fog-core/ /home/tt/g/fog-core/.distro
2022-04-29 15:24:59.837 specfile.py       VERBOSE Writing SPEC file '/home/tt/g/fog-core/.distro/rubygem-fog-core.spec' to the disc
2022-04-29 15:24:59.844 utils.py          ERROR  Failed to parse SPEC file: ['error: Name field must be present in package: (main package)', 'error: Version field must be present in package: (main package)', 'error: Release field must b
e present in package: (main package)', 'error: Summary field must be present in package: (main package)', 'error: License field must be present in package: (main package)']

And indeed, those RPM tags are not present in the .distro/rubygem-fog-core.spec. What's wrong?
source-git:
$ head -n 10 .distro/rubygem-fog-core.spec
# Generated from fog-core-1.22.0.gem by gem2rpm -*- rpm-spec -*-
%global gem_name fog-core
BuildRequires: ruby(release)
BuildRequires: rubygems-devel
BuildRequires: ruby
BuildRequires: rubygem(excon)
BuildRequires: rubygem(formatador)
BuildRequires: rubygem(mime-types)
BuildRequires: rubygem(minitest)
BuildRequires: rubygem(minitest-stub-const)

dist-git:
$ head -n 10 rubygem-fog-core.spec
# Generated from fog-core-1.22.0.gem by gem2rpm -*- rpm-spec -*-
%global gem_name fog-core

Name: rubygem-%{gem_name}
Version: 2.2.4
Release: 4%{?dist}
Summary: Shared classes and tests for fog providers and services
License: MIT
URL: https://github.com/fog/fog-core
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem

Did I do something wrong or is the parser misbehaving? I'm using rebase-helper-0.26.0-1.fc35.noarch

Please share your findings, I'm curious what's going on here.

The issue comes from the remove_patches method because rubygem-fog-core.spec does not use newlines to separate sections of the spec file. After I inserted newlines around the patch section, the process went through smoothly (and the only patch was removed correctly).
The spec file:
# Generated from fog-core-1.22.0.gem by gem2rpm -*- rpm-spec -*-
%global gem_name fog-core

Name: rubygem-%{gem_name}
Version: 2.2.4
Release: 4%{?dist}
Summary: Shared classes and tests for fog providers and services
License: MIT
URL: https://github.com/fog/fog-core
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
# Fix "load bad cache data - empty file, from disk" test case broken by
# different Psych return value.
# https://github.com/fog/fog-core/commit/a662135d701ad79f543bbaa190e573ae56a5d049
Patch0: rubygem-fog-core-2.2.4-fix-cache-test-for-ruby-3.1.patch
BuildRequires: ruby(release)
BuildRequires: rubygems-devel
BuildRequires: ruby
BuildRequires: rubygem(excon)
BuildRequires: rubygem(formatador)
BuildRequires: rubygem(mime-types)
BuildRequires: rubygem(minitest)
BuildRequires: rubygem(minitest-stub-const)
BuildArch: noarch

authors: TomasTomecek csomh

repo: packit/packit


text:
Sources in included files are not found

What happened? What is the problem?
I have spec files that use "%include" to share common parts, like this (in this case, we have "versioned" packages that are co-installable):
# my-name-1.0.spec
%global base_name my-name

Version:        1.0
Name:           %{base_name}-%{version}
Release:        1%{?dist}
Source100:      %{base_name}-common.inc

%include %{SOURCE100}

# my-name-common.inc
Source0:        %{base_name}-%{version}.tar.xz
Summary:        My summary
License:        GPLv3

I then want to get all sources with spec.sources().content
Currently, I only get ["my-name-common.inc"].
https://github.com/packit/specfile/pull/341 has a failing test which shows the problem in executable form.
Workaround

[ ] There is an existing workaround that can be used until this issue is fixed.

Participation

[X] I am willing to submit a pull request for this issue. (Packit team is happy to help!)

Thanks for reporting this. I see the issue, however, I'm not sure if it is possible to do anything about it. specfile won't be able to edit tags in included files, but I suppose you are interested only in parsing/read-only access, right? If so, I think you should be able to get what you want like this:
from specfile import Specfile
from specfile.sources import Sources

spec = Specfile(...)
for source in Sources(spec.tags(spec.parsed_sections.package).content, []):
    print(source.expanded_location)

Thanks @nforro, that does the trick! I'm indeed only interested in the parsing part.
Just FYI, since I had both code paths around: specfile is around 5x slower than rpmspec -P and parsing the Source lines from the output. It's not much of a problem for my use case, but maybe good to know.

authors: imphil nforro

repo: packit/specfile


text:
Add Pacman/Ghost states for being captured (and power-pellet mode)

These should be marked by flags in the Player object.
The new endpoints should be located in the Pacman/Ghost controllers.

I am merging issue #33 into this issue because it'll be simpler for the Pacman state to have 3 options: active, power, and captured. This means that the Ghost state will also have the same object, but should never return the power mode.

Working on this on the branch player-states.

Documentation for the new API endpoints
Development for these endpoints is still underway.
Get a Ghost's state
Description
Returns the current state of the ghost (identified by its ID).
A ghost's state can be any of the following:

UNINITIALIZED
READY
ACTIVE
CAPTURED

Request
Method
GET
Mapping
/ghost/{id}/state
Response
Codes

HTTP Status Code
Meanings

200 OK
Retrieved ghost's state successfully

404 Not Found
No ghost with that ID exists

500 Internal Server Error
The server crapped itself

JSON body
{
	"state" : UNINITIALIZED
}

Example cURL call

Resolved in above-referenced merge.
The API documentation has been updated accordingly.

repo: pacmacro/pm-server


text:
IPactVerifier.Verify() does not work if .FromPactUri() is used without .FromPactBroker()

Hi
In the following code, the if path does not work:
            IPactVerifier tmpPactVerifier;

            if (tmpPactUrl != null)
            {
                // For builds triggered by a 'contract content changed' webhook,
                // just verify the changed pact. The URL will bave been passed in
                // from the webhook to the CI job.
                Console.WriteLine("PACT_URL != null");
                Console.WriteLine($"tmpPactUrl: {tmpPactUrl}");
                Uri tmpPactUri = new Uri(tmpPactUrl, UriKind.Absolute);
                tmpPactVerifier = pactVerifier.FromPactUri(tmpPactUri);
            }
            else
            {
                // For 'normal' provider builds, fetch `master` and `prod` pacts for this provider
                Console.WriteLine("PACT_URL: == null");
                Console.WriteLine($"brokerBaseUri: {brokerBaseUri}");
                IEnumerable<string> consumerVersionTags = tmpVersionTags;
                string includeWipPactSince = "2020-01-01";

                tmpPactVerifier = pactVerifier.FromPactBroker(brokerBaseUri, uriOptions, enablePending, consumerVersionTags, includeWipPactSince);
            }

            tmpPactVerifier = tmpPactVerifier
                .WithProviderStateUrl(new Uri($"{_pactServiceUri}/provider-states"))
                .ServiceProvider("ProductService", new Uri(_pactServiceUri))
                .HonoursPactWith("ApiClient")
                .WithPublishedResults(tmpProviderVersion, tmpProviderVersionTags);
            tmpPactVerifier.Verify();

In the code above if the verify pact changed pipeline is triggered from PactFlow webhook and the if path with pactVerifier.FromPactUri() is executed the following URL is passed to Uri tmpPactUri = new Uri(tmpPactUrl, UriKind.Absolute) and I get the error message further down bellow:
https://xxxxx.pactflow.io/pacts/provider/ProductService/consumer/ApiClient/pact-version/xxxxxxxxxx/metadata/xxxxxxxxxxxxxxxxxxxxxx
I get the following error message:
PactNet.PactFailureException : Invalid arguments were provided to the verification process
Stack Trace:
at PactNet.Native.NativePactVerifier.Verify(String args) in /Users/erikdanielsen/work/dius/pact-net/src/PactNet.Native/NativePactVerifier.cs:line 42
at PactNet.Native.PactVerifier.Verify() in /Users/erikdanielsen/work/dius/pact-net/src/PactNet.Native/PactVerifier.cs:line 240
at tests.ProductTest.EnsureProviderApiHonoursPactWithConsumer() in D:\a\1\s\tests\ProductTest.cs:line 98
Standard Output Messages:
Invoking the pact verifier with args:
--url
https://xxxxxx.pactflow.io/pacts/provider/ProductService/consumer/ApiClient/pact-version/xxxxxxxxxxxxxxxxxxxxxxxxx/metadata/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
--state-change-url
http://127.0.0.1:9001/provider-states
--provider-name
ProductService
--hostname
127.0.0.1
--port
9001
--filter-consumer
ApiClient
--publish
--provider-version
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
--provider-tags
master
--loglevel
trace
The exception above is not thrown if the method .FromPactBroker() is added to the if path as follows:
             if (tmpPactUrl != null)
            {
                // For builds triggered by a 'contract content changed' webhook,
                // just verify the changed pact. The URL will bave been passed in
                // from the webhook to the CI job.
                Console.WriteLine("PACT_URL != null");
                Console.WriteLine($"tmpPactUrl: {tmpPactUrl}");
                Uri tmpPactUri = new Uri(tmpPactUrl, UriKind.Absolute);
                tmpPactVerifier = pactVerifier.FromPactUri(tmpPactUri);

                **tmpPactVerifier = pactVerifier.FromPactBroker(brokerBaseUri, uriOptions);**
            }

Thanks

Thank you.
As discussed in slack, the issue seems to be that you can't pass --uri without also passing --broker-url which seems incorrect at first glance and results in awkward use of the .NET interface at least.
We'll take a look.

This is probably not an issue after PactNet moved to a handles-based approach for verification instead of this older CLI args style.

The PactNet API has moved on quite significantly from this both internally and externally so this is no longer applicable and can be closed I think.

authors: adamrodger cyrusdevnomad mefellows

repo: pact-foundation/pact-reference


text:
FRP.Event modules in purescript-behaviors

Since v7.0.0 FRP.Event got moved to purescript-event.
But I find it confusing that some modules in the FRP.Event namespace still live in purescript-behaviors (namely: FRP.Event.AnimationFrame, FRP.Event.Keyboard, FRP.Event.Mouse, FRP.Event.Semantic).
It seems to make more sense that they would also be in purescript-event.

This is because I didn't want purescript-event to be tied to the browser at all. In fact, I might break it up more eventually so that purescript-behaviors is also more portable.

Makes sense


text:
Firefox 56.0: JS files blocked by X-Content-Type-Options: nosniff

Hi guys
I'm facing some issues in Firefox 56.0 after installing mod_pagespeed.
Some Javascript files are blocked because nosniff option.
How can I disable the header X-Content-Type-Options: nosniff ?

PageSpeed 1.12.34.2-0
Http/2
Apache 2.4
Ubuntu 16.04

I think you can't turn it off, but you could exclude the files from being processed by mod_pagespeed with the url control options: https://www.modpagespeed.com/doc/restricting_urls
Having said that, wouldn't it be possible to actually eliminate the mime type mismatch instead?

authors: oschaaf rafaelpatro


text:
Delete prepare_psol.sh

Will be replaced with new build_psol script in mod_pagespeed.

LGTM, though wait to commit until the new script is on github

authors: hillsp jeffkaufman


text:
New release on pub.dev

We've successfully tested the recent version with the Junit-PACT Consumer Tests against a broker and they work great. Could you please do a release on pub.dev, so that we don't have to reference the master in our pub spec anymore?
Thanks you!

Hi @gtudan
Just published what is on master

Cool, thanks a lot

Am 08.06.2021 um 18:44 schrieb Nuno Caro @.***>:

Hi @gtudan
Just published what is on master
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.


text:
Request to Use SHA256 in manifest instead of SHA512 to support Offline Kubernetes builds

The dependency-mapping service binding currently cannot be used in Kubernetes environments with buildpacks using SHA512 checksums, as the format for specifying an alternative checksum defined in RFC 10 includes a colon, which is not usable as a Kubernetes secret key. A related issue has been opened here: https://github.com/paketo-buildpacks/packit/issues/521
To allow users to run dotnet builds in offline Kubernetes environments, would it be possible to use SHA256 in this buildpack's buildpack.toml until an alternate format has been defined?

Hey @ChuckQuinnIV, to be clear - if you're using a dependency mapping, can't you provide the checksum as a SHA256, or do you run into an error?

Happy to run that test & respond back - my understanding was that the dependency-mapping service binding would only apply to the checksums published in the buildpack's buildpack.toml, but I'll see what happens if I plug in the unpublished SHA256 checksums.

Confirmed that using the unpublished SHA256 checksum does not keep the buildpack offline - which makes some sense, as without the buildpack declaring the SHA256 checksum of the dependency, it wouldn't know what file it's associated to without an internet connection.
Results below show the dotnet-core-aspnet-runtime buildpack, but I imagine issue is similar between the two buildpacks as both use SHA512 - happy to move issue if not:
Paketo Buildpack for ASP.NET Core Runtime 0.3.24

  Resolving ASP.NET Core Runtime version

    Candidate version sources (in priority order):

      runtimeconfig.json -> "7.0.0"

      <unknown>          -> ""

    No exact version match found; attempting version roll-forward

    Selected ASP.NET Core Runtime version (using runtimeconfig.json): 7.0.11

  Executing build process

    Installing ASP.NET Core Runtime 7.0.11

failed to fetch dependency: failed to make request: Get https://download.visualstudio.microsoft.com/download/pr/dc2c0a53-85a8-4fda-a283-fa28adb5fbe2/8ccade5bc400a5bb40cd9240f003b45c/aspnetcore-runtime-7.0.11-linux-x64.tar.gz: dial tcp 93.184.215.201:443: i/o timeout

ERROR: failed to build: exit status 1

@ChuckQuinnIV thanks for verifying, it's been a minute since I've worked with the dependency mappings. I totally see what you mean -  you're cornered into using whatever algorithm is used in the buildpack.toml. I totally get why you're stuck now if you can't provide a binding with a -.
I think in terms of this issue, I'm more inclined to make the fix on the packit side and allow for any algorithm to be used on K8s than to change the buildpack.toml here to use a different algorithm than what Microsoft provides for the dependency. I know it's likely to be a quicker change if we do it here in the buildpack, but I'd rather A. keep using the checksums as provided from upstream wherever possible and B. enable the entire Paketo ecosystem to leverage the feature

Makes sense - eager to get offline builds working with .NET, but completely understand wanting a strategic fix here.

Let's continue the discussion on https://github.com/paketo-buildpacks/packit/issues/521 and see how we can move the ball forward on that issue

authors: ChuckQuinnIV sophiewigmore

repo: paketo-buildpacks/dotnet-core-sdk


text:
Use pack inspect-builder to get lifecyle and run image details

Summary
The pack inspect-builder command will now give us the same details we were using docker inspect for. Let's use it as it makes this code a bit simpler.
Please confirm the following:

[x] I have viewed, signed, and submitted the Contributor License Agreement.
[ ] I have added an integration test, if necessary.

good idea!

authors: ryanmoran sophiewigmore

repo: paketo-buildpacks/github-config


text:
Join ring refactor

If a node is in zombie mode, allow us to join the ring with user-provided tokens. This should fail if not in zombie mode (for extra safety) or if the tokens had already been set on the node (otherwise corruption will occur).

Added do not merge until I've tested JOINING a node.

Tested ring movements by joining/leaving, appeared to have work correctly. Also confirmed setting tokens via config still works as expected.

repo: palantir/cassandra


text:
Using destructuring throws: "Cannot read property 'flags' of undefined"

Bug Report

TSLint version: 4.0.1
TypeScript version: 2.1.0.dev
Running TSLint via: CLI

TypeScript code being linted
export const SchedulePractical = ({ field, deleteField }: any, { Binder: { bindTo } }: App.Context ) => (
  <Form.Group>
    <ReduxForm.DatePicker model={bindTo(field, 'from')} placeholder={i18n`Visible From`} width={3} />
    <ReduxForm.DatePicker model={bindTo(field, 'due')} placeholder={i18n`Due Date`} width={3} />
    <ReduxForm.Input readOnly model={bindTo(field, 'name')} width={7} />
    <Form.Button type="button" width={3} onClick={() => deleteField(field)} color="red" icon="trash" />
  </Form.Group>
);

with tslint.json configuration:
{
  "rules": {
    "class-name": true,
    "comment-format": [true, "check-space"],
    "curly": true,
    "eofline": true,
    "forin": false,
    "indent": [true, "spaces"],
    "label-position": true,
    "max-line-length": [false, 140],
    "member-access": false,
    "member-ordering": [true,
      "public-before-private",
      "static-before-instance",
      "variables-before-functions"
    ],
    "no-arg": true,
    "no-bitwise": true,
    "no-console": [true,
      "log",
      "debug",
      "info",
      "time",
      "timeEnd",
      "trace"
    ],
    "no-construct": true,
    "no-debugger": true,
    "no-duplicate-variable": true,
    "no-empty": true,
    "no-eval": false,
    "no-inferrable-types": true,
    "no-shadowed-variable": true,
    "no-string-literal": false,
    "no-switch-case-fall-through": true,
    "no-trailing-whitespace": true,
    "no-unused-expression": true,
    "no-use-before-declare": true,
    "no-var-keyword": true,
    "object-literal-sort-keys": false,
    "one-line": [true,
      "check-open-brace",
      "check-catch",
      "check-else",
      "check-whitespace"
    ],
    "quotemark": [true, "single", "jsx-double", "avoid-escape"],
    "radix": true,
    "semicolon": [true],
    "triple-equals": [true, "allow-null-check"],
    "typedef-whitespace": [true, {
      "call-signature": "nospace",
      "index-signature": "nospace",
      "parameter": "nospace",
      "property-declaration": "nospace",
      "variable-declaration": "nospace"
    }],
    "variable-name": false,
    "whitespace": [true,
      "check-branch",
      "check-decl",
      "check-operator",
      "check-separator",
      "check-type"
    ]
  }
}

Actual behavior
This bit { Binder: { bindTo } } is responsible for the following error.
Throws:
 tslint ./app/client/modules/schedules/components/schedule_admin_view.tsx
/usr/local/lib/node_modules/typescript/lib/typescript.js:61677
            var flags = symbol.flags;
                              ^

TypeError: Cannot read property 'flags' of undefined
    at displayPartKind (/usr/local/lib/node_modules/typescript/lib/typescript.js:61677:31)
    at symbolPart (/usr/local/lib/node_modules/typescript/lib/typescript.js:61675:34)
    at Object.writeSymbol (/usr/local/lib/node_modules/typescript/lib/typescript.js:61662:31)
    at buildBindingElementDisplay (/usr/local/lib/node_modules/typescript/lib/typescript.js:24826:28)
    at /usr/local/lib/node_modules/typescript/lib/typescript.js:24807:110
    at buildDisplayForCommaSeparatedList (/usr/local/lib/node_modules/typescript/lib/typescript.js:24853:21)
    at buildBindingPatternDisplay (/usr/local/lib/node_modules/typescript/lib/typescript.js:24807:21)
    at buildParameterDisplay (/usr/local/lib/node_modules/typescript/lib/typescript.js:24791:21)
    at buildDisplayForParametersAndDelimiters (/usr/local/lib/node_modules/typescript/lib/typescript.js:2488

Expected behavior
No errors

fails on no-use-before-declare rule when calling TypeScript API languageService on SchedulePractical in sample code

Opened https://github.com/Microsoft/TypeScript/issues/12451

repo: palantir/tslint


text:
Hyperlinks to specimen and OTU on the Explore results

On some record pages there are hyperlinks to see the specimen or OTU.
(eg OTU records have hyperlinks to specimens; and Collection records have hyperlinks to specimens)
Can these links default to showing the images, desciptions, etc (all the checkboxes on the search query)

I think this is very specific and would be encapsulated in the broader query rework.

authors: aazaff doricon

repo: paleobot/pbot-dev


text:
is there a good way to get session for different bind/database

Hi,
I need to bind multiple databases, and there is a good way to do it as follow document.
https://flask-sqlalchemy.palletsprojects.com/en/2.x/binds/
but, after that, sometimes I want to run a plain-text SQL directly via Session for different databases/bind.
I ready the source code in this project, and implatment it like this.
@contextmanager
def session_scope(bind='default'):
    if bind != 'default':
        s = db.create_scoped_session(options={'bind': db.get_engine(db.get_app(), bind)})
    else:
        s = db.session

    s.expire_on_commit = False
    try:
        yield s
        s.commit()
    except:
        s.rollback()
        raise
    finally:
        s.close()

I want to know if there is a more graceful way to get a session, if not, I suggest adding a function in class SQLAlchemy.
def get_session_by_bind(self, bind=None):
    if bind:
        return self.create_scoped_session(options={'bind': self.get_engine(self.get_app(), bind)})
    else:
       return self.session

B&R

You should not need to do this, the session automatically chooses a bind based on the model's or table's bind key. Otherwise, you can call session.execute(bind=...) to execute with a specific bind.

You should not need to do this, the session automatically chooses a bind based on the model's or table's bind key. Otherwise, you can call session.execute(bind=...) to execute with a specific bind.

OK， thx your response.

authors: davidism skeetwu

repo: pallets-eco/flask-sqlalchemy


text:
Allow spaces in bash completion results

Allows spaces in returns from bash autocompletion.
Fixes #769

I'm not entirely sure how this is related to #769, on the tin they look completely unrelated.

They are related. IFS needs to be set to only break apart completion results based on newline, rather than space as well. This allows spaces to be returned as a completion result. Previously bash would regard a completion result with spaces as multiple possible completions.

Ok, could you add a changelog entry for this as well (but keep it targeted at master)? Thanks!

Done. Thanks!

Thanks!

authors: stopthatcow untitaker

repo: pallets/click


text:
Better sessions

Given this change one can now use the technique as describe by the SQLAlchemy docs regarding joining a session into an external transaction. For example, and bearing in mind I also have SQLALCHEMY_COMMIT_ON_TEARDOWN = True as a default setting on my app, I can now rollback everything as one transaction:
import pytest

def pytest_runtest_call(item):
    # Flush all fixtures before the test is called
    if hasattr(item, 'funcargs') and 'db_session' in item.funcargs:
        item.funcargs.get('db_session').flush()

@pytest.yield_fixture()
def db_session(app, db):
    with app.app_context():
        connection = db.engine.connect()
        transaction = connection.begin()
        options = dict(bind=connection, binds={})
        session = db.create_scoped_session(options=options)
        db.session = session
        yield session
        transaction.rollback()
        connection.close()
        session.remove()

@pytest.fixture()
def user(db_session):
    user = MyUserClass(...)
    db.session.add(user)

This would take care of #243.

Now merged, unfortunately automagic was lost in the rebase.

No worries. Thanks, though!

Hi @immunda, could you consider releasing new version containing this change?

In the meantime, this is the workaround that I use for transactional testing with Flask-SQLAlchemy. This is a py.test fixture, but the same approach would work with any testing framework supporting setup/teardown. This code assumes that you're already inside the Flask application context:
    connection = db.engine.connect()
    transaction = connection.begin()

    # Patch sessionmaker to use a predefined connection
    from flask import _app_ctx_stack
    db.get_binds = lambda app: {}
    db.session = scoped_session(
        session_factory=lambda: SignallingSession(_db, bind=connection),
        scopefunc=_app_ctx_stack.__ident_func__)

    try:
        yield db
    finally:
        db.session.remove()
        transaction.rollback()
        connection.close()

In case anybody is interested, I found a more elegant way of temporarily patching Flask-SQLAlchemy to use a specific connection without replacing the whole session.
Assuming create_app is your application factory and _db is a SQLAlchemy instance:
@pytest.yield_fixture
def app():
    with create_app().app_context():
        yield _app

Using monkeypatch from py.test:
@pytest.yield_fixture
def db(app, monkeypatch):
    connection = _db.engine.connect()
    transaction = connection.begin()

    # Patch Flask-SQLAlchemy to use our connection
    monkeypatch.setattr(_db, 'get_engine', lambda *args: connection)

    try:
        yield _db
    finally:
        _db.session.remove()
        transaction.rollback()
        connection.close()

Using patch from unittest.mock:
@pytest.yield_fixture
def db(app, monkeypatch):
    connection = _db.engine.connect()
    transaction = connection.begin()

    # Patch Flask-SQLAlchemy to use our connection
    with patch('app.db.get_engine') as get_engine_mock:
        get_engine_mock.return_value = connection

        try:
            yield _db
        finally:
            _db.session.remove()
            transaction.rollback()
            connection.close()

This is now out in the wild with version 2.1

Thanks much, Phil!
On Oct 23, 2015 5:58 AM, "Phil Howell" notifications@github.com wrote:

This is now out in the wild with version 2.1
—
Reply to this email directly or view it on GitHub
https://github.com/mitsuhiko/flask-sqlalchemy/pull/249#issuecomment-150532382
.

In case anybody is interested, I found a more elegant way of temporarily patching Flask-SQLAlchemy to use a specific connection without replacing the whole session.
Assuming create_app is your application factory and _db is your SQLAlchemy instance:
@pytest.yield_fixture
def app():
    with create_app().app_context():
        yield _app

Using monkeypatch from py.test:
@pytest.yield_fixture
def db(app, monkeypatch):
    connection = _db.engine.connect()
    transaction = connection.begin()

    # Patch Flask-SQLAlchemy to use our connection
    monkeypatch.setattr(_db, 'get_engine', lambda *args: connection)

    try:
        yield _db
    finally:
        _db.session.remove()
        transaction.rollback()
        connection.close()

Using patch from unittest.mock on Python 3 (mock on Python 2):
@pytest.yield_fixture
def db(app):
    connection = _db.engine.connect()
    transaction = connection.begin()

    # Patch Flask-SQLAlchemy to use our connection
    with unittest.mock.patch('app.db.get_engine') as get_engine_mock:
        get_engine_mock.return_value = connection

        try:
            yield _db
        finally:
            _db.session.remove()
            transaction.rollback()
            connection.close()

This is all that worked for me, unless I'm being dumb and missed some other option.

@adambyrtek 's approach works, exception a minor fix due to the newer version of SQLAlchemy is expecting a different call signature for db.get_engine

In case anybody is interested, I found a more elegant way of temporarily patching Flask-SQLAlchemy to use a specific connection without replacing the whole session.
Assuming create_app is your application factory and _db is your SQLAlchemy instance:
Using monkeypatch from py.test:
@pytest.yield_fixture
def db(app, monkeypatch):
    connection = _db.engine.connect()
    transaction = connection.begin()

    # Patch Flask-SQLAlchemy to use our connection
    monkeypatch.setattr(_db, 'get_engine', lambda *args: connection)

    try:
        yield _db
    finally:
        _db.session.remove()
        transaction.rollback()
        connection.close()

The monkeypatch line should be
monkeypatch.setattr(_db, 'get_engine', lambda *args, **kwargs: connection)

Or else you would see an error like this:
self = <sqlalchemy.orm.session.SignallingSession object at 0x1088feb80>, mapper = <Mapper at 0x10755e640; MasterProduct>
clause = <sqlalchemy.sql.selectable.Select at 0x1089a4730; Select object>

    def get_bind(self, mapper=None, clause=None):
        """Return the engine or connection for a given model or
        table, using the ``__bind_key__`` if it is set.
        """
        # mapper is None if someone tries to just get a connection
        if mapper is not None:
            try:
                # SA >= 1.3
                persist_selectable = mapper.persist_selectable
            except AttributeError:
                # SA < 1.3
                persist_selectable = mapper.mapped_table

            info = getattr(persist_selectable, 'info', {})
            bind_key = info.get('bind_key')
            if bind_key is not None:
                state = get_state(self.app)
>               return state.db.get_engine(self.app, bind=bind_key)
E               TypeError: <lambda>() got an unexpected keyword argument 'bind'

../../../.venvs/server-D2-ixepO/lib/python3.8/site-packages/flask_sqlalchemy/__init__.py:166: TypeError

I am running Flask-SQLAlchemy==2.4.1 and SQLAlchemy==1.3.16.

authors: adambyrtek dfeinzeig immunda mattupstate oinopion ye

repo: pallets/flask-sqlalchemy


text:
url_for to another application during request?

Assuming I have more than one Flask application (I'm using blueprints too, so there is not need to advice me them) and I want to build url from one to another. With no request context I was just using forced context of target application and it worked. But what should I do with existing request context? If i receive request to one application and want to do redirect to another one?
Or, in another words, why url_for first of all searches for request context? Maybe it should be optional, through _external parameter for example?
Please, do not send me to stackoverflow, my question about similar problem is hanging for more than a week with no responses at all.

url_for searches in the request context because e.g. if an absolute URL is wanted, it will take a look at the current request to check whether the resulting URL should be HTTPS or HTTP.
This kind of entanglement of multiple apps is not officially supported. I'm not sure if the request context is even hindering you while generating the URL, but if it is, you can manually pop the request context from the stack, and push it after you generated the URL. While happening all within the Python interpreter, this is quite costly, and I think it's much smarter to generate your URLs ahead of time.
The _external parameter already exists, it controls whether absolute URLs should be generated.

Popping request context just for url generation seems like a hack, Its easier for me to write my own url generator with possibility to choose which context should be used or, in another words, absolute or relative url should be built.
I know that _external parameter controls absolute url behaviour, so maybe it should be responsible for request-application context determination too?
My motivation is that it seems not logical that if You want to built url to another application within request context, You have no clear way how to do it.

This kind of usage is simply not supported, so yes, this is going to require hacks (or a new URL generator) on your side.
Application dispatching is of course supported, but not the kind of combination you want: Poking at an application's internal state from another one.

This looks really strange to me, especially that whole application context thing is designed for multi application usage. Or, I just missing something.
Anyway, thanks, I'll think further on this problem.

shouldnt entering a request context for the other application be suficient (in case both are served form the same process)

I don't clearly understand Your proposition, what do You mean entering context for other application? And whats the point with the process?
By the way, there is even deeper problem - I'm using dispatcher middleware, and my applications dispatched by url prefix. And application url map has nothing to do with this prefix. So, actually from application perspective its simply impossible to built correct url to another application.
I ended up creating separated url builders for each application.

what exactly are your different applications?

Different Flask instances dispatched with DispatcherMiddleware

so its the same app? is the database different?

Ok, how is database related to how many applications do I have? App in terms web application - Yes, its same. App in terms flask.Flask application instances - than No, currently i have 4 of them, each one responsible for separate part of the project.

I am also trying to do this as well. I have separate "applications" dispatched using SubdomainDispatcher. I want to link from one subdomain app to another, but url_for() fails to build the urls. Currently, my only solution is to manually type the urls.

I can give you a reason/example. I have an admin/employee app and a user app. The models etc. are shared, but the applications are under different subdomains for cookies, easy management, hosting, etc. reasons. In the user app, there may be actions that trigger emails to an admin with links to pages in the admin app. Currently, this must be done manually. It would be ideal to be able to do something like url_for('mybp.myroute', _external=True, app=myadminapp).

Just came across this same requirement myself, similar to the last commenter's example. Has anyone found a good workaround for this? Would Flask be interested in having this supported somehow? Seems pretty useful to me in a framework built for multi-app support.

#1548

Hi all!
Why this issue is closed? As I can see, there are nor solution neither workaround.
According to this advice for proper url generation there are must be set APPLICATION_ROOT (for correct url_prefix) and SERVER_NAME (for correct absolute URLs) and call url_for like this:
    with app.app_context(), app.test_request_context():
        return url_for(endpoint, **values)

where app is destination

Yes, this kind of usage is simply not supported by Flask.

In case it's useful I've used this approach to allow url_for to access endpoints against other apps:
from flask import current_app, url_for
from werkzeug.wsgi import DispatcherMiddleware

__all__ = ['Dispatcher']

class Dispatcher:
    """
    Allows one to mount middlewares or applications in a WSGI application.

    This is useful if you want to combine multiple WSGI applications::

        app = DispatcherMiddleware(app, {
            '/app2':        app2,
            '/app3':        app3
        })

    """

    def __init__(self, app, mounts=None):
        self.app = app
        self.mounts = mounts or {}
        self.url_for_resolver = URLForResolver(
            [self.app] + list(self.mounts.values())
            )

    def __call__(self, environ, start_response):
        script = environ.get('PATH_INFO', '')
        path_info = ''

        while '/' in script:
            if script in self.mounts:
                app = self.mounts[script]
                break
            script, last_item = script.rsplit('/', 1)
            path_info = '/%s%s' % (last_item, path_info)
        else:
            app = self.mounts.get(script, self.app)

        original_script_name = environ.get('SCRIPT_NAME', '')
        environ['SCRIPT_NAME'] = original_script_name + script

        # Convert empty path info values to a forward slash '/'
        environ['PATH_INFO'] = path_info or '/'

        return app(environ, start_response)

class URLForResolver:
    """
    A URL resolver that provides resolution of `url_for` across multiple apps.
    """

    def __init__(self, apps):
        self.apps = apps
        self.cache = {}

        for app in apps:
            app.url_build_error_handlers.append(self)

    def __call__(self, error, endpoint, values):
        """Attempt to resolve a URL any of the registered apps"""

        # Check if we have a cached look up
        if endpoint in self.cache:
            app = self.cache[endpoint]
            if app:
                with app.app_context(), app.test_request_context():
                    return url_for(endpoint, **values)
            else:
                raise error

        # Attempt to find an app with the registered endpoint
        for app in self.apps:

            # No point in checking the current app
            if app is current_app:
                continue

            for rule in app.url_map.iter_rules():

                if rule.endpoint == endpoint:
                    # Found - cache the result and call self to return the URL
                    self.cache[endpoint] = app
                    return self(error, endpoint, values)

        # Not found - cache the result and re-raise the error
        self.cache[endpoint] = None
        raise error

authors: RonnyPfannschmidt Vitalium a-urth anthonyjb asteinlein davidism patrickyan untitaker warik

repo: pallets/flask


text:
Compile elif tag to elif instead of else: if

This avoids deep nesting in case of many {% elif .. %} blocks (which would fail during execution) and also deep recursion (which may fail during compilation)
fixes #759

Meh. Travis is broken. In case this passes it looks good to me though.

authors: ThiefMaster mitsuhiko

repo: pallets/jinja


text:
dont know how to get multiple entries in formdata using request.files

Environment:

Python version: 3.11.4
Quart version: 0.18.4

request.files.getlist

request.files.getlist(key)

i tried before and it's not recognize the getlist.

this is the error when i use the getlist
AttributeError: 'coroutine' object has no attribute 'getlist'

files = await request.files
files.getlist(key)

https://quart.palletsprojects.com/en/latest/how_to_guides/flask_migration.html#async-and-await

authors: alexissinglaire davidism

repo: pallets/quart


text:
Download网站DNS解析丢失

http://bilibili.danmaku.live/ 该网站已无法解析，烦请修复DNS解析，十分感谢！~

Hello
因为是从国内购买的域名 目前需要通过一些认证 我正在和域名供应商沟通 会尽快解决DNS的问题

现在已经恢复了，辛苦了！另外readme.md里面写最新版本是1.1.1，我用你的源代自己编译也是1.1.1~

1.1.2版本的代码目前在develop分支

收到！感谢回答。祝元宵节快乐！

authors: devilcn pandaGao

repo: pandaGao/bilibili-live-helper


text:
gh:284 - resolving various axis types

[x] Closes #284
[ ] Tests added: Please use assert_type() to assert the type of any return value

Sir you can check and if any changes are required i'll do it

thanks @ramvikrams

thanks a lot sir

repo: pandas-dev/pandas-stubs


text:
chore(lint): fix lint primitives

Fixes lint clippy::needles_lifetimes in storage

if there are more please combine them @emhane :)

yes sure, breakeven with incrementally committing this, cause it's so much by now, don't want to risk two people fixing the same lint warnings, or fixing merge conflicts. so rather many small prs.

repo: paradigmxyz/reth


text:
Theme toggle icon is not working  other than home page

fix issue related to Theme toggle icon is not working  other than home page.
Please assign me to fix this.

@param-code I want to conrtibute to the code base with clean and optimize code could you kindly assign me this.

@param-code I want to conrtibute to the code base with clean and optimize code could you kindly assign me this.

yeah sure.There you go.I have assigned this to you as you have asked.All the Best!!

repo: param-code/counter-app


text:
Addition of i18n translation for website link

See https://github.com/parameter1/base-cms/pull/95 for affected button. (Upper right "Visit Site")

 oh no! I found a Leaders error. When clicking "view profile" it goes to an "unexpected error" page. Is that just because it's on test?


text:
chore(main): release 3.1.1

:robot: I have created a release beep boop
3.1.1 (2024-01-07)
Bug Fixes

Update Parallel node to use XTokens V3 & Update Calamari node to use unlimited fees 🔧 (38b8bef)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/paraspell/xcm-sdk/releases/tag/v3.1.1 :sunflower:

repo: paraspell/xcm-sdk


text:
🛑 Office proxy is down

In 3e3a480, Office proxy (https://proxy.perryizgr8.com/health) was down:

HTTP code: 530
Response time: 779 ms

Resolved: Office proxy is back up in d29e72a after 5 hours, 44 minutes.

repo: parikshit-parspec/upptime


text:
EHN: add more command lines to interact with database

closes #249
An example of what I meant in #249.
I let this opened to be taken back.

This needs a test before we can merge it though.

authors: glemaitre rth

repo: paris-saclay-cds/ramp-board


text:
[Feature] Also check for Polkadot Address in User Profile

People in the Polkadot ecosystem constantly contributing might also have their address included in their profile.
For example like me:

This, for example, is the pattern needed for all Fellowship members to get their github verified.
It would be good that if we trigger a tip, that we can also check this user profile for the address, in case the user does not include it directly into their github pull request body.
This would be a fallback to the PR body check.

@shawntabrizi we already have that, but parsing it a bit differently - similar to a PR body
https://github.com/paritytech/substrate-tip-bot/blob/master/src/util.ts#L65
polkadot address: <ADDRESS>
Do you suggest to use this address regardless of prefix or something else?

haha nice, sorry i didnt know.
thank you for thinking ahead for me :)

authors: mordamax shawntabrizi

repo: paritytech/substrate-tip-bot


text:
Print the state of the Kademlia k-buckets in the system_networkState RPC query

Once https://github.com/libp2p/rust-libp2p/issues/1003 is done, we should improve the state() method in substrate-network-libp2p/src/service_task.rs to also include the content of the Kademlia buckets.

This has never been a necessity, and we now report the number of entries in the k-buckets to Prometheus, allowing us to detect any potential issue here. Closing.

repo: paritytech/substrate


text:
BEEFY subscription fires multiple times for the same commitment

Fixes https://github.com/paritytech/grandpa-bridge-gadget/issues/159

The issue mentions to find out why commitments are send twice and not to just prevent sending them multiple times from the rpc layer.

@bkchr
Because of the way networking works, peers could still be broadcasting votes for a round that has already concluded. The best we can do is dedupe the notifications sent to the rpc layer.

Bump

Fixed in https://github.com/paritytech/substrate/pull/10882

authors: Wizdave97 acatangiu seunlanlege


text:
SimpleSlotWorker: Do not implement SlotWorker for all types implementing SimpleSlotWorker

Because Rust currently doesn't support specialization, it prevents users from implementing
SlotWorker for their own types. This pr solves this by removing the generic implementation of
SlotWorker for SimpleSlotWorker and providing some wrapper type for that.

@bkchr Collator preconnect (https://github.com/paritytech/polkadot/issues/4381 and https://github.com/paritytech/polkadot/issues/5255) requires AuRa consensus to expose the SimpleSlotWorker, but build_aura_worker only returns impl SlotWorker, losing the implementation of a Simple one.
This could've been resolved by weakening the impl from slot worker to a simple worker, but given the changes in this PR, it won't work anymore.
The only sensible solution I see is exposing AuraWorker and returning it directly, also replacing the dyn in cumulus with it.
The downside, we will have to re-implement SlotWorker having a copy of auto-implementation.
What are your thoughts on this?

@slumber https://github.com/paritytech/substrate/pull/11247

authors: bkchr slumber


text:
[pallet-assets] add asset_exists(id: AssetId) function

Checks if an asset exists via loose coupling(the Inspect trait).
closes #12444

I think you should add this to fungible::Inspect too.

I think you should add this to fungible::Inspect too.

Alright

I think you should add this to fungible::Inspect too.

@joepetrowski in this case, are we going to introduce a new type AssetId: AssetId; since it isn't in the trait initally
?

That is a great point. Seems obvious now, but looking at fungible I don't think it makes sense to add AssetId to it. In that case I'm OK with this PR.

bot rebase

bot merge

This pull request has been mentioned on Polkadot Forum. There might be relevant details there:
https://forum.polkadot.network/t/polkadot-release-analysis-v0-9-36/1529/1

authors: Polkadot-Forum dharjeezy ggwpez joepetrowski


text:
Bump kvdb-rocksdb to 0.19.0

polkadot companion: https://github.com/paritytech/polkadot/pull/7212

How do we handle changes depending on each other?
kvdb-rocksdb should be bumped in polkadot but it won't compile until substrate is also bumped :see_no_evil:

And cumulus fails because polkadot-service needs to be bumped with the companion above.

bot merge

bot merge

bot merge

authors: niklasad1 ordian tdimitrov


text:
core/network: Surface peerset's set_priority_group in NetworkService

PeerSetHandle.set_priority_group allows modifying a priority group by
group identifier. With this commit the function can be accessed through
NetworkService.
This is need in order for a validator to connect to as many other
validators as configured without reserving a specific connection slot
for them.
This is needed for #3247, see https://github.com/paritytech/substrate/pull/3247#issuecomment-516351141 for details.

Just a note: add_to_priority_group and remove_from_priority group might be useful as well.

Just a note: add_to_priority_group and remove_from_priority group might be useful as well.

As of right now I don't need those functions for https://github.com/paritytech/substrate/pull/3247. Do you still want me to add them here @arkpar?

authors: arkpar mxinden


text:
Add origin information about Wasm traps

Hi,
Is there any way to debug where trap happened? At least function would be good, file+line and/or traceback is even better.
I'm using rust's wasm32-unknown-unknown for generating wasm code itself (and the trap is a panic). Maybe that's something to tweak at the compiler side?

Closed in favor of https://github.com/paritytech/wasmi/issues/538.

authors: Robbepop tailhook

repo: paritytech/wasmi


text:
unable to make request with content type "text/xml" after September 30 commits

I am using gorequest to make requests to SOAP server. My code is
agent := gorequest.New().
		Post(endpoint).
		Type("xml").
		Set("Content-Type", "text/xml").
		Set("charset", "utf-8").
		Set("SOAPAction", "login").
		Set("user-agent", "user").
		Send(body)

It worked well until recently, but after September 30 commits content type of my request gets implicitly overwritten to "application/xml", which my SOAP server does not accept. Had a look through code and tests, got a feeling this behavior is considered desirable by gorequest developers. Is there any way to keep explicitly set content type?

Right now, there is no way to keep the content type. It should be able to it tho so I will tag this as a bug.
Btw, I feel the Sept 30 commits should not create the problem in your case tho.
Are you certain that you didn't have a problem before using the same code?

This is broken by https://github.com/parnurzeal/gorequest/pull/154. Moving the for loop broke the older API. @cpacifying is correct in observing that the latest code breaks the existing client. @parnurzeal

@harsimranmaan Got it. Thank you for pointing it out 👍   I will comment in your PR.

authors: cpacifying harsimranmaan parnurzeal

repo: parnurzeal/gorequest


text:
TypeError: 'int' object is not subscriptable

I successfully imported dtreeviz with the command:
from dtreeviz import *
I tried this command:
viz = dtreeviz(clf, xdev, ydev,                 target_name="isFraud", feature_names = list(xdev.columns), class_names = ['notFraud', 'isFraud'])
I get the error:
TypeError: 'int' object is not subscriptable
Here are my xdev and ydev:

Any idea on where this error might be coming from?
Thank you so much!

Having the same issue as you, did you manage to resolve it?

@kevlariii I see that you are using the old API of the library, could you try with the new version ? You can find examples here : https://github.com/parrt/dtreeviz/tree/master/notebooks
If the error still persists, would be very helpful if you could prepare a sharable notebook (like google colab) to investigate the issue. Thanks.

I solved the error adding histtype,'pie', highlight_path in the file Python\Python38\Lib\site-packages\dtreeviz\compatibility.py
    model = DTreeVizAPI(shadow_tree)
    return model.view(precision, orientation,
                      instance_orientation,
                      show_root_edge_labels, show_node_labels, show_just_path, fancy, histtype,'pie', highlight_path, X,
                      max_X_features_LR, max_X_features_TD, depth_range_to_display, label_fontsize, ticks_fontsize,
                      fontname, title, title_fontsize, colors=colors, scale=scale)

I dont know why dont exists leaftype: ('pie', 'barh') = 'pie', in this funtion

authors: Leci37 LegalWiggle kevlariii tlapusan

repo: parrt/dtreeviz


text:
Update to PS6

This PR updates the example project to PS6. As we are now using a await startup method, we need to use modules

Can we merge this @mtrezza

🎉 This change has been released in version 1.2.0

authors: dblythy parseplatformorg

repo: parse-community/parse-server-example


text:
BAT 157 month survey catalog

Hi,
now that I've managed to create a working pipeline, I've started analyzing data from several sources and it seems that the list of sources only considers the 105 month catalog.
(If I am wrong, could you point me towards the catalog files so that I can try to find how the X-ray Binaries I'm interested in are named there ? I've looked at the sources_cX.cat files creaed in the mosaic folder, but to no avail).
Since creating mosaic gives an rmf called 157.rmf, I assume the 157 months survey is at least partly ready. Are they any plan to add the new sources detected during this period to the current iteration of BatAnalysis ?

Hi @Parrazyte, the catalog is not the most recent 157 month catalog since that paper and the full catalog has not been released yet. It is possible to add sources to the catalog file that is included with the BatAnalysis package. This is outlined in the bat survey introduction Jupyter notebook.
So, you can add the sources that you would like and those sources will be analyzed with your pipeline, so long as your custom catalog is passed to the appropriate functions.
Once, the full 157 month fits file catalog is ready we will update the python package.

I completely missed that, thanks for the heads up.

authors: Parrazyte parsotat

repo: parsotat/BatAnalysis


text:
Unable to scan other subnets

I came across your integration and immediately set it up.  Works GREAT for scanning the local subnet that HomeAssistant runs in.
My primary use case for this is to set a binary sensor for when people are connected to my guest wifi, to disable certain automations (like setting the security system to ARM if the people who live in the house all leave).
I am not seeing any errors in the logs, and I have confirmed that HomeAssistant has full access through the firewall to the other subnets in my network.  Is this a limitation of the integration or Home Assistant in general?  I am running HA as an ESX OVA install currently, latest version as of 2/11/2024.

Same problem here. No device in my "Guest" network. Able to scan device only in the principal network "Home".
Solutions?

since we are using nmap, you can provide multiple ip-range, separated by comma: 192.168.1.0/24,192.168.2.0/24

authors: giustanca jjarboe01 parvez


text:
Added JumpStepWrapper

Hi Patrick,
I factored the jump_ts and step_ts out of the PIDController into JumpStepWrapper (I'm not very set on this name, lmk if you have ideas). I also made it behave as we discussed in #483. In particular, the following three rules are maintained:

We always have t1-t0 <= prev_dt (this is checked via eqx.error_if), with inequality only if the step was clipped or if we hit the end of the integration interval (we do not explicitly check for that).
If the step was accepted, then next_dt must be >=prev_dt.
If the step was rejected, then next_dt must be < t1-t0.

We achieve this in a very simple way here: https://github.com/patrick-kidger/diffrax/blob/78b122adf39b2f8d26a79d0ac239a2fb675653a1/diffrax/_step_size_controller/jump_step_wrapper.py#L119-L123
The next step is to add a parameter JumpStepWrapper.revisit_rejected_steps which does what you expect. That will appear in a future commit in this same PR.

I now also added the functionality to revisit rejected steps. In addition, I also imporved the runtime of step_ts and jump_ts, because the controller no longer searches the whole array each time, but keeps an index of where in the array it was previously.
Also I think there was a bug in the PID controller, where it would sometimes reject a step, but have factor>1. To remedy this I modified the following:
https://github.com/patrick-kidger/diffrax/blob/501bed52fb3726aaee41798aaab46d2bdff1a680/diffrax/_step_size_controller/adaptive.py#L569-L574
I think possibly something smaller than just self.safety would make even more sense, I feel like if a step is rejected the next step should be at least 0.5x smaller. But I'm not an expert.
I added a test for revisiting steps and it all seems to work. I also sprinkled in a bunch of eqx.error_if statements to make sure the necessary invariants are always maintained. But this is a bit experimental, so maybe there are some bugs I didn't test for.
I think I commented the code quite well, so hopefully you can easily notice if I made a mistake somewhere.
P.S.: Sorry for bombarding you with PRs. As far as I'm concerned this one is very low priority, I can use the code even if it isn't merged into diffrax proper.

Hi @patrick-kidger,
I got rid of some eqx.error_ifs that I added to my JumpStepWrapper and redid the timing benchmarks. My new implementation was already faster than the old PIDController before, but now this is way more significant, especially when step_ts is long (think >100). Surprisingly, it is faster even when it has to revisit rejected steps. See https://github.com/patrick-kidger/diffrax/blob/345e23ad34abe095d25b8be8d621360afd592165/benchmarks/jump_step_timing.py#L126-L128

Thanks for the review! I made all the edits I could and I left some comments where I need guidance (no hurry though, this is not high priority for me). Also, should I get rid of prev_dt entirely, as you suggested in #483?

Working on the NeuralSDE now and I realised JumpStepWrapper can be useful to wrap a constant step controller as well, for the purpose of making it step to save_ts on top of whichever constant steps it is making. Yes it is more efficient/proper to just do a union of the original constant steps and the save_ts and then feed that into diffrax.StepTo. But there are situations where that could be very inconvenient to do in code, so you can just wrap your constant step controller with a JumpStepWrapper. And I am pretty sure the overhead should be quite minimal (with my implementation the cost per step is no longer O(log n), but just O(1)), so this isn't so bad.
This ties into the SDE interpolation business, where essentially the only good way of interpolating SDEs seems to be just making the solver step to whichever ts you want to save at. I do intend to eventually implement that, but in the meantime this is a useful workaround, I would say.
We don't really have to advertise this use case, but can nevertheless just change the type of JumpStepWrapper.controller from AbstractAdaptiveStepController to AbstractStepController.
What do you think?

Also, should I get rid of prev_dt entirely, as you suggested in #483?

If it's easy to do that in a separate commit afterwards then I would say yes. A separate commit just so it's easy to revert if it turns out we were wrong about something here :D

Thanks for the review, Patrick! I'll probably make the fixes sometime in the coming week. I am also making progress on the ML examples for the Single-seed paper, but it is slower now, due to my internship.

I am very confused about what the correct value of made_jump should be when the step was rejected. By my understanding the original PID controller also got this wrong. However, I'm not sure whether getting this wrong is actually a significant issue, so I want your thoughts on it.
Suppose there is a jump at t=2. I will present 2 possible scenarios, in both of which I think something goes wrong (although maybe diffeqsolve might correct for the issue in scenario B). I wrote them as if JSW and the controller are separate, but the same holds for just the old PID controller.
====== scenario A =======

We start with a step from t0 = 0 to t1 = 1, the controller decides the step will be kept and makes a proposal next_t0 = 1, next_t1=2.5 which gets clipped to next_t1 = 2 and so the JSW writes jump_next_step=True in its state.
We take the next step from t0 = 1 to t1 = 2. Suppose the step is rejected, so next_t0 = 1. But the way the code works now, it will still set made_jump = previous_state.jump_next_step, which has been set to True. But that is wrong because made_jump should reflect whether there is a jump at next_t0 so that the solver knows whether to reevaluate the VF at the start of the next step. Still this is not horrible, since it just causes one extra evaluation of the VF, but the full solution should still be correct. Right?

====== scenario B =======

We start with a step from t0 = 0 to t1 = 1, the controller decides the step will be kept and makes a proposal next_t0 = 1, next_t1=2.5 which gets clipped to next_t1 = 2 and so the JSW writes jump_next_step=True in its state.
We take the next step from t0 = 1 to t1 = 2. Suppose the step is accepted and the controller proposes next_t0 = 2 and next_t1 = 4 the controller returns (correctly) made_jump = previous_state.jump_next_step (=True) and ControllerState(..., jump_next_step=False).
We take the next step from t0 = 2 to t1 = 4. Note that because made_jump was set to True last iteration, the FSAL VF was reevaluated at t = 2. Suppose the step is rejected and the new proposal is next_t0 = 2 and next_t1 = 3. The controller returns  made_jump = previous_state.jump_next_step (=False). This is a problem because there is a jump at next_t0=2, so made_jump should have been True. However that might be fine if the value of the VF which was recomputed at the start of this step is kept for the next step (but I remember thinking that solver state is discarded when the step is rejected, so the recomputed VF also gets discarded).

Another way of seeing this all is through this:

jump_next_step = (there is a jump at next_t1)
previous_state.jump_next_step = (there is a jump at t1)
made_jump should be True iff there is a jump at next_t0

Hence setting made_jump = previous_state.jump_next_step only works when the current step is being accepted, so next_t0 = t1. When rejecting the step, the new made_jump should be equal to the previous step's made_jump which we no longer have access to. The solution would be to add yet another thing to the state, but first I wanted to confirm with you to see if I'm getting this right. What are your thoughts?

So I think the made_jump-on-rejected-step is handled through this line, outside the stepsize controller:
https://github.com/patrick-kidger/diffrax/blob/daec89c8fc9e72e4c2b32def2527a96b80f18b9d/diffrax/_integrate.py#L390
I made the decision to handle some of the step-rejection logic in the main integrate.py loop, on the basis that for those pieces it should be the same for all stepsize controllers.
So I think this fine? Do double-check my logic though! :p
Other than that, one thing I am noticing is that this next_made_jump business is pretty annoying to deal with in the stepsize controller, and I think could probably also be factored out to happen in the main integrate.py loop.

Great, that's exactly the line I was looking for (I must admit I looked in _integrate.py only briefly). But yes this is precisely the piece of the puzzle that my logic was missing, so I think we both independently arrived at the same conclustion that this is probably correct.
Thinking about it now, the next_made_jump situation might be way easier than I thought it was. I'll try to write the code and then I'll write a proof that it does the right thing for any number of stacked JSWs.

Hi Patrick!
I just pushed a new version of this PR, rebased on top of the most current main. I think I addressed everything you asked me to fix.
As it stands this contains 3 commits, contatining:

Everything except 2. and 3.
The changes to at_dtmin and factormax in pid.py
Removing prev_dt from JSW.

I left some conversations unresloved. I did try to fix the things mentioned in those, but I am not sure whether what I did was the best way to tackle that so I wanted to hear your opinion.
Also the test are failing because pyright doesn't know how to import typeguard, which has nothing to do with my changes.

authors: andyElking patrick-kidger

repo: patrick-kidger/diffrax


text:
Unlock should unlock without pull spring even when automatic pull spring is enabled

There is a parameter that can explicitly unlock without pulling the latch. Since there is an explicit option to 'open' the lock I think it would be best if 'unlock' did not pull the spring.
Could also be configurable if people have a user for that.
Refer:
https://tedee-tedee-api-doc.readthedocs-hosted.com/en/latest/endpoints/lock/unlock.html
Specifically, mode=2 for "unlock mode".

Not possible at the moment. Unlock does either pull the latch or not, depending on what you set in the app for your lock.

It is possible to unlock without pull spring using the „mode“ parameter.
https://api.tedee.com/api/v1.30/my/lock/{id}/operation/unlock?mode={mode}
„mode=3“ should be used for unlock command an „mode=4“ for open command.
https://tedee-tedee-api-doc.readthedocs-hosted.com/en/latest/enums/unlock-mode.html explains the available mode parameters.

Should be resolved with 2023.7.0

authors: mluecke09 patrickhilker rsporsche zweckj


text:
About time to tag a new release?

The dep vendoring tool use the latest tag instead of master by default.
Right now the latest tag (v2.0.0)  for this package is over a year old.

go-cache is mostly stable and does its job well, so regular releases for releases' sake isn't necessary. (PRs still need to be reviewed but they are not merged at the moment.)
Perhaps when there fixes or a few more features in the pipe.

But there has been changes to the public API since the v2.0.0 tag, and not tagging a release means that users of dep will default to using a version of go-cache without SetDefault for example.

https://github.com/patrickmn/go-cache/releases/tag/v2.1.0

authors: patrickmn peterhellberg

repo: patrickmn/go-cache


text:
fix: process.version is not reflecting Strapi version

process.version contains NodeJS version instead of installed Strapi one, therefore bustAdmin does not work properly for versions older than 3.4.0

Hello tomekzar! Thanks for your contribution!
Unfortunately the master branch is not maintained anymore, we are on the beta branch now!

@Hi @stafyniaksacha, from what I saw you're dropping support for versions < 3.4.0 too (basing on paths that are supported and defined during Router creation)?

Hi @stafyniaksacha, from what I saw you're dropping support for versions < 3.4.0 too (basing on paths that are supported and defined during Router creation)?

Yes, you can set the min version to 3.6.0 and that would be perfect :)

Thanks @tomekzar  ! This change has been added to version 1.5.1
Note: v2 will be up soon

authors: patrixr stafyniaksacha tomekzar

repo: patrixr/strapi-middleware-cache


text:
[Question] Docker ability

Since I haven't seen anyone ask this before:
Is it also possible to run this as a Docker ? Would it be possible to get instructions how to get this to work with Docker and perhaps even a Docker image on the Docker Hub ?

I'd love to have a docker image of this, setting it up would be as simple as one command

my gosh taht would make things a lot easier lol. Would probably make game development a bit easier if you don't have to troubleshoot each time you pull.

I'm considering investing some personal cash into a project that would do just this.

@patsonluk Any updates on this ?

sorry. Have been busy/low energy to do coding work outside of work. I have to conserve the remaining energy to fix bugs/make change to the game 😓
This is an open repo so would love to get someone to create PR for docker image for us and I will review :)

authors: drvntechnologies fly-man- patsonluk survivorbat

repo: patsonluk/airline


text:
Is there the posibility to add another models or get cheap?

Issue
First I want to say that this tool is the best tool I have ever tried, what happens is that it is becoming very expensive in terms of openai tokens and more so as my project grows... Is there any way I can run a model locally or an alternative that can be compared to gpt-4o? Currently with the 128K of context it can do an update with a single prompt and hit the nail on the head with all the files it needs, so I don't know if that level of quality could be achieved in a more economical way...
Anyway, your tool is incredible, I hope you continue to progress with it
Version and model info
No response

Thanks for trying aider and filing this issue. See the LLM leaderboards for rankings of how capable the various models are. See the docs on connecting to LLMs for recommended models, including some free ones.

I'm going to close this issue for now, but feel free to add a comment here and I will re-open or file a new issue any time.

authors: AxolotDevelopment paul-gauthier

repo: paul-gauthier/aider


text:
Having multiple instances with different labels/configs

I'm trying to have couple of different instances of zap-loki with different labels. Is that possible? Right now it gives me this error:
sink factory already registered for scheme "loki"

As far as I can see in the code lokiSinkKey is hardcoded. Which means that I can't init multiple loggers with different config? Am I missing something?
Thank you!

yeah you are 100% correct. This was a use case not thought of but it is now configurable via the config and will default to "loki" if no SinkKey is provided.

authors: paul-milne thinklinux

repo: paul-milne/zap-loki


text:
How to echo unescape text ?

I also use some token like<?= ?> <?:=?> ${var} $${var}  as escape and unescape tags group.
How this in Swig? What should I do?

{{someValue|raw}}

repo: paularmstrong/swig


text:
change checking Error.errno to Error.code

Update the check for existing output directory to use .code instead of .errno.
.errno is a deprecated property as explained here : https://github.com/joyent/node/issues/2211#issuecomment-2896181.
And on iojs 1.5.x and node 0.12.x on OSX libuv returns the errno value of -17 for EEXISTS hence causing this piece of code to throw the an error if the output directory exists.

:+1:
This bit us in the butt recently, and also found that changing this one line fixed the problem. Please consider merging this.

Updated quotes and rebased to top of master.

authors: elfreyshira notthetup