text:
Signed/unsigned is reversed

I believe signed and unsigned samples are handled in precisely the opposite way of how they should be handled. For instance, the beep example produces a very sharp sound, whereas it should produce a sine wave of exactly one frequency, which sounds very soft.
On the other hand, I modified the example to produce signed samples instead:
extern crate cpal;

fn main() {
    let mut channel = cpal::Voice::new();

    let amplitude = std::i16::MAX as f32;
    let mut data_source = (0u64..).map(|t| t as f32 * 0.03)
                                  .map(|t| (t.sin() * amplitude) as i16);

    loop {
        {
            let mut buffer: cpal::Buffer<i16> =
                channel.append_data(1, cpal::SamplesRate(44100), 32768);

            for (sample, value) in buffer.iter_mut().zip(&mut data_source) {
                *sample = value;
            }
        }

        channel.play();
    }
}

This again produces the sharp sound that sounds like a square wave. When the last two occurences of i16 are replaced by u16 — effectively rendering a signed sine wave but casting it to u16 — the sound sounds like a sine again. I verified the above code on Windows as well as Linux.
On a side note, when I ran the beep example on Windows I could sometimes hear large fluctuations in the frequency, even though it should be constant. The frequency would jump abrubtly after a few seconds.

How large were the fluctuations in frequency? Around 30-40hz? If they were small fluctuations, they might be because of the phase's resolution (32-bit floating point) changing to a 64-bit floating point might fix this?
As for the signed/unsigned, I'm not sure (don't have time to check atm).

I don’t know how big the fluctuations are in Hz, but it is all pretty much in the range of one note difference. Thinking about it again, I now know exactly what the problem is: it is indeed a floating-point problem. You get rounding errors, because the accumulator grows very rapidly, so 0.03 becomes small in comparison with the accumulator quickly, and precision is lost when adding. The proper way to deal with this is to use compensated summation, but in this case there is an easier solution, which I happened to implement accidentally: use multiplication by a counter instead of addition. So I opened #40 because I thought this was neater than the manual Iterator implementation, and it happens to fix this fluctuation as well!

This has been fixed in #51.

authors: mitchmindtree ruud-v-a

repo: tomaka/cpal


text:
'arithmetic operation overflowed' OpenGL error during initialization

neikos@celestias-palace ~/p/r/rust-gg (add-window_module) [101]> env RUST_BACKTRACE=1 cargo run --example simple
     Running `target/debug/examples/simple`
glium has triggered an OpenGL error during initialization. Please report this error: https://github.com/tomaka/glium/issues
thread '<main>' panicked at 'arithmetic operation overflowed', src/event.rs:30
stack backtrace:
   1:     0x7fd1d87542be - sys::backtrace::write::ha67a6a2049d22fadIvs
   2:     0x7fd1d87579c6 - panicking::on_panic::hfa4bf0215983f759lzx
   3:     0x7fd1d874f36e - rt::unwind::begin_unwind_inner::ha1b5da93bdf7e8ffC0w
   4:     0x7fd1d874f936 - rt::unwind::begin_unwind_fmt::hac9e09b20e42a51cIZw
   5:     0x7fd1d8757396 - rust_begin_unwind
   6:     0x7fd1d877c3b4 - panicking::panic_fmt::hd75b6cee85f3afe4SgC
   7:     0x7fd1d877bd9d - panicking::panic::h25435899636f1091pfC
   8:     0x7fd1d8555bf5 - event::step::fixed::h3367868930290687227
                        at src/event.rs:30
   9:     0x7fd1d8555a93 - event::step::fixed_60::h11065430683454575616
                        at src/event.rs:42
  10:     0x7fd1d8539f3b - main::h013698df486c2431iaa
                        at examples/simple.rs:11
  11:     0x7fd1d87572ed - __rust_try
  12:     0x7fd1d875968a - rt::lang_start::hff4eb66c456e4a8ehux
  13:     0x7fd1d85565cb - main
  14:     0x7fd1d7d6c60f - __libc_start_main
  15:     0x7fd1d8539d98 - _start
  16:                0x0 - <unknown>
An unknown error occurred

To learn more, run the command again with --verbose.

The code:
extern crate gg;
extern crate glium;

use glium::DisplayBuild;
use gg::event::step::fixed_60;

fn main() {
    let display = glium::glutin::WindowBuilder::new().build_glium().unwrap();

    fixed_60(|_dt| {
        use gg::event::StepResult;
        for ev in display.poll_events() {
            match ev {
                glium::glutin::Event::Closed => return StepResult::Stop,
                _ => ()
            }
        }
        return StepResult::Continue;
    });

}

I have also commented out my loop and then I just get this error:
neikos@celestias-palace ~/p/r/rust-gg (add-window_module) [1]> env RUST_BACKTRACE=1 cargo run --example simple
   Compiling gg v0.1.0 (file:///home/neikos/projects/rust/rust-gg)
examples/simple.rs:5:5: 5:30 warning: unused import, #[warn(unused_imports)] on by default
examples/simple.rs:5 use gg::event::step::fixed_60;
                         ^~~~~~~~~~~~~~~~~~~~~~~~~
examples/simple.rs:8:9: 8:16 warning: unused variable: `display`, #[warn(unused_variables)] on by default
examples/simple.rs:8     let display = glium::glutin::WindowBuilder::new().build_glium().unwrap();
                             ^~~~~~~
     Running `target/debug/examples/simple`
glium has triggered an OpenGL error during initialization. Please report this error: https://github.com/tomaka/glium/issues

I am using stable rust 1.3

Same thing if I launch teapot.rs:
neikos@celestias-palace ~/p/r/glium (master)> cargo run --example teapot
     Running `target/debug/examples/teapot`
glium has triggered an OpenGL error during initialization. Please report this error: https://github.com/tomaka/glium/issues

source: gharchive/issue

repo: tomaka/glium

license_type: permissive

license_source: bigquery


text:
Does not add marker to map

Inside my controller I have a function that grabs data from my factory and calls addMarker.  Here's my problem:
If I call addMarker inside this function the map displays with no marker, and I get this error:
[AngularJS - Leaflet] 'center' is undefined in the current scope, did you forget to initialize it?
If I call addMarker outside of this I get a null data error because the data has not loaded yet.
myFactory.getDarta().then(function(data) {
$scope.myData = data;
$scope.addMarker($scope.myData);
});
$scope.addMarker = function (item) {
	angular.extend($scope, {
	    center: {
	        lat: item.latitude,
	        lng: item.longitude,
	        zoom: 13
	    },
	    markers: {
	        store: {
	            lat: item.latitude,
	            lng: item.longitude,
	            message: "Drag me to your position",
	            focus: true,
	        }
	    }
	});

};

a

@mikekay01 , can you please tell me how did you solve that problem. Beacause if i try to add markers in the way you did, not via function but in the beginning, leaflet doesnt add them. they ARE in map, but not displayed

repo: tombatossals/angular-leaflet-directive

license: mit


text:
Popup wrong in markers filtered

If you have filtered results and you change the items displayed, the popup messages shown on the popup are incorrect.
To reproduce the error go to this example http://jsfiddle.net/d8gouyjd/2/ and follow next steps:
1)uncheck up
2)unckeck middle
3)unckeck down
4)check down
5)check middle
6)check up
If you click on up marker, show popup down.
I think issues #276, #478 and #468 are related.

:+1:
Is there any cleaner work-around?

This is probably a terrible way to do things, (and after digging into the dist/angular-leatlet-directive.js and realizing I was not going to get to the bottom of things in a couple of hours), but here's what I'm doing to work around the problem right now:
var app = angular.module('myApp', ['ui.highlight', 'leaflet-directive']);

function MyController($scope, $http, leafletData) {
  leafletData.getMap().then(function(map) {

    leafletData.getMarkers().then(function(markers){
      for (var index in markers) {
        var marker = markers[index];

        (function(index){
          marker._leaflet_events.click[0].action = function(e){

            var theRealMarker = $scope.markers[index];

            L.popup()
              .setLatLng([ theRealMarker.lat, theRealMarker.lng ])
              .setContent('My index is: ' + index)
              .openOn(map)
              ;
          }
        })(index);

      }
    });

  });
});

I'm going to rework&redesign angular-leaflet-directive to be compatible with Leaflet v1.0. It will mantain almost all its functionality, and will be compatible with the current features of the directive, but I must start from a fresh point, so I'm going to close this issue. If you think it must be worked with the new version, please reopen it.

I am using v0.10.0 and this bug has not been resolved.
I store my markers in an array and each marker has a property id which is the database id.
I have registered the marker onclick using this code:
$scope.$on('leafletDirectiveMarker.map.click', function (event, data)
When I click on a marker I get the right data (The correct marker id)
When I add a marker using javascript and then reload the data (I reload the markers array) the leafletDirectiveMarker.map.click returns the wrond data. The id is completly wrong!


text:
Rename paws.js to paws.user.js so Greasemonkey recognizes it

Greasemonkey expects user scripts to end in .user.js: https://wiki.greasespot.net/Troubleshooting_(Users)#Script_Install_Errors

Thanks, @dserodio!

source: gharchive/pull-request

authors: dserodio tombenner

repo: tombenner/paws


text:
Move "out" directory to "target"

First of all, thank you for Weasel. It's excellent, useful, and highly readable even to a Clojure newb such as myself.
I've noticed that running the Weasel repl creates a new "out" directory in my project. I'm hoping that Weasel could be updated to put this "out" dir in a "target" dir, or something customizable. Please see a similar discussion for Austin here: https://github.com/cemerick/austin/issues/14
I'll continue poking at this on my own, but as I'm new with Clojure it could take me awhile. :)

Reopen? Seeing this in 0.7.0

Any chance you could post the project.clj?

Sure
(defproject pol "0.1.0-SNAPSHOT"
  :description "POL in clojure"
  :dependencies [[org.clojure/clojure "1.7.0"]
                 [org.clojure/tools.reader "0.9.2"]
                 [org.clojure/tools.nrepl "0.2.10"]
                 [org.immutant/web "2.1.0"]
                 [compojure "1.4.0"]
                 [ring "1.4.0" :exclusions [ring/ring-jetty-adapter]]
                 [ring/ring-defaults "0.1.5"]
                 [ring/ring-session-timeout "0.1.0"]
                 [ring-ttl-session "0.1.1"]
                 [metosin/ring-middleware-format "0.6.0"]
                 [metosin/ring-http-response "0.6.5"]
                 [buddy "0.6.2"]
                 [ring-webjars "0.1.1"]
                 [hiccup "1.0.5"]
                 [selmer "0.9.1"]
                 [bouncer "0.3.3"]
                 [com.taoensso/timbre "4.1.1"]
                 [markdown-clj "0.9.71"]
                 [org.clojure/java.jdbc "0.4.1"]
                 [java-jdbc/dsl "0.1.3"]
                 [honeysql "0.6.1"]
                 [ring-wicked-pdf "0.4.2"]
                 [clojure-csv/clojure-csv "2.0.1"]
                 [circleci/clj-yaml "0.5.4"]
                 [clj-time "0.11.0"]
                 [clj-pdf "2.1.1"]
                 [cheshire "5.5.0"]
                 [clj-http "2.0.0"]
                 [prone "0.8.2"]
                 [im.chit/hara "2.2.11"]
                 [im.chit/cronj "1.4.3"]
                 [mysql/mysql-connector-java "5.1.36"]
                 [yesql "0.5.0"]
                 [net.sourceforge.jtds/jtds "1.3.1"]
                 [com.microsoft/sqljdbc4 "3.0"]
                 [digest "1.4.4"]
                 [environ "1.0.0"]
                 ;; cljs below
                 [org.clojure/clojurescript "1.7.122" :scope "provided"]
                 [domina "1.0.3"]
                 [im.chit/purnam "0.5.2"]
                 [jayq "2.5.4"]
                 [cljs-ajax "0.3.14"]
                 [org.clojure/core.async "0.1.346.0-17112a-alpha"]
                 [cljsjs/react "0.13.3-1"]
                 [cljsjs/jquery "2.1.4-0"]
                 [cljsjs/jquery-ui "1.11.3-1"]
                 [cljsjs/bootstrap "3.3.5-0"]
                 [cljsjs/jqgrid "5.0.0-0"]
                 [reagent "0.5.1-rc3"]
                 [re-frame "0.4.1"]
                 [reagent-utils "0.1.5"]
                 [re-com "0.6.2"]
                 [secretary "1.2.3"]
                 [com.andrewmcveigh/cljs-time "0.3.13"]
                 [weasel "0.7.0" :exclusions [org.clojure/clojurescript]]
                 [org.omcljs/om "0.9.0"]
                 [prismatic/om-tools "0.3.12"]
                 [racehub/om-bootstrap "0.5.3" :exclusions [org.clojure/clojure]]]
  ;; :cache-analysis true ; disabling 2015-03-10 per http://dev.clojure.org/jira/browse/CLJS-1103 and https://groups.google.com/forum/#!topic/clojurescript/fdT3f1HxJzM
  :jvm-opts ["-server"]
  :main pol.core
  :aot [pol.core]
  :repl-options {;:init-ns pol.repl
                 :init (do
                         (require 'weasel.repl.websocket)
                         (defn start-weasel [& opts]
                           (cemerick.piggieback/cljs-repl
                            (apply weasel.repl.websocket/repl-env opts))))}
  :clean-targets ^{:protect false} [:target-path [:cljsbuild :builds :app :compiler :output-dir] [:cljsbuild :builds :app :compiler :output-to]]
  :plugins [[lein-environ "1.0.0"]
            [lein-ancient "0.6.5"]
            [migratus-lein "0.1.5"]
            [lein-cljsbuild "1.0.6"]]
  :ring {:handler pol.handler/app
         :init    pol.handler/init
         :destroy pol.handler/destroy}
  :cljsbuild
  {:builds
   {:app
    {:source-paths ["src-cljs"],
     :compiler
     {:output-to "resources/public/js/app.js",
      :output-dir "resources/public/js/out",
      :externs ["react/externs/react.js"]
      :optimizations :none,
      :pretty-print true}}}}
  :profiles
  {:uberjar       [:project/uberjar :profiles/uberjar]
   :dev           [:project/dev :profiles/dev]
   :test          [:project/test :profiles/test]
   :project/uberjar {:omit-source true
                     :env {:production true}
                     :hooks [leiningen.cljsbuild]
                     :cljsbuild
                     {:jar true
                      :builds
                      {:app
                       {:source-paths ["env/prod/cljs"]
                        :compiler {:optimizations :advanced :pretty-print false}}}}
                     :aot [pol.core]}
   :project/dev  {:dependencies [[ring/ring-mock "0.2.0"]
                                 [ring/ring-devel "1.4.0"]
                                 [pjstadig/humane-test-output "0.7.0"]
                                 [org.clojure/tools.nrepl "0.2.10"]
                                 [com.cemerick/piggieback "0.2.1"]
                                 [lein-figwheel "0.3.9"]
                                 [mvxcvi/puget "0.8.1"]]
                  :plugins [[lein-figwheel "0.3.9"]]
                  :cljsbuild
                  {:builds
                   {:app
                    {:source-paths ["env/dev/cljs"] :compiler {:source-map true}}}}
                  :figwheel
                  {:http-server-root "public"
                   :server-port 3449
                   :nrepl-port 7002
                   :css-dirs ["resources/public/css"]
                   :ring-handler pol.handler/app}
                  :repl-options {:init-ns pol.core ;; DOUBLE-CHECK THIS LINE... auto-compile/load js here I think
                                 :nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]} ;; needed for weasel
                  :injections [(require 'pjstadig.humane-test-output)
                               (pjstadig.humane-test-output/activate!)]
                  ;;when :nrepl-port is set the application starts the nREPL server on load
                  :env {:dev        true
                        :port       3000
                        :nrepl-port 7000}}
   :project/test {:env {:test       true
                        :port       3001
                        :nrepl-port 7001}}
   :profiles/dev {}
   :profiles/test {}}

  :aliases {"build" ^{:doc "Make jars for standalone running"} ["do" "clean" ["with-profile" "uberjar" "ring" "uberjar"]]}
  :min-lein-version "2.0.0")

authors: gberenfield jmreidy tomjakubowski

repo: tomjakubowski/weasel

license: unlicense


text:
When using M2M with a custom through object, how do I get to the through object?

I have 2 classes Section with an M2M to Item. I want the items to be ordered in the sections, so I added a custom through object to the SectionsItems that has an order property. I am not sure how I get the custom class though. My current selector looks something like this:
export const getSectionsForDisplay = createSelector(orm, ormSelector, propsSelector, idSelector, (session, props, id) =>  {
    const form = session.FormForEdit.withId(id)
    const arr = []
    const sections = form.sections.toModelArray()
    sections.forEach((section, index) => {
        const sectionObj = Object.assign({ }, section.ref)
        arr.push({ type: 'header', section: sectionObj })
        section.items.toRefArray().forEach((item, itemIndex) => {
            arr.push({ type: 'item', item: item, itemIndex: itemIndex, sectionId: section.id })
        })
    })
    return arr
})

But I can't figure out how to get to SectionsItems to get to my order.
For now, I might just change the M2M to 2 fks and manage it myself, but I would love to know how to do it the "right way".

You just need to use backward name of through model.
E.g. we have such setup:
            const UserModel = class extends Model {};
            UserModel.modelName = 'User';
            UserModel.fields = {
                id: attr(),
                name: attr(),
            };
            const User2TeamModel = class extends Model {};
            User2TeamModel.modelName = 'User2Team';
            User2TeamModel.fields = {
                user: fk('User', 'links'),
                team: fk('Team', 'links'),
                name: attr(),
            };
            const TeamModel = class extends Model {};
            TeamModel.modelName = 'Team';
            TeamModel.fields = {
                id: attr(),
                name: attr(),
                users: many({
                    to: 'User',
                    through: 'User2Team',
                    relatedName: 'teams',
                }),
            };

and here is how to use (e.g. to get user's teams):
            const user = User.withId('u0');

            // direct way
            user.teams.all().toModelArray().map(m => {
                        //'m' is instance of our Team model
                        return m.ref;
            });

            //via through model
            user.links.all().toModelArray().map(m => {
                        //'m' is instance of our through model
                        return m.team.ref;
            });

authors: chanan plandem

repo: tommikaikkonen/redux-orm


text:
Font colour doesn't change when theme changes

Checklist:

[x] I updated to the latest version available
[x] I cleared the cache of my browser

Release with the issue:
latest
Last working release (if known):
?
Browser and Operating System:
I was able to reproduce this in Windows 10 with Browser Chrome, Opera and Firefox and on Ubuntu 20 with Browser Chromium, Opera and Firefox

Description of problem:
I use Google Light and Dark Theme installed with HACS frm https://github.com/liri/lovelace-themes) and use an automation to set it on sunrise, sunset or home assitant atart according to sun above or below horizon. It appears that in all other cards the font color changes when the theme changes (service frontend.set_theme) but it won't change in the compass card. Reloading the page with F5 then corrects it and all sohws up nicely again.
Please find attached more dtails about the theme switcher, a lovelace card I use and 2 scrren shots on how it appears on my end.
automation theme switcher.yaml.txt
my lovelace card.yaml.txt

Thanks for the extensive report! This is first on my todo list now.

Thanks for the extensive report! This is first on my todo list now.

uups, just seen I indicated the wrong theme, sry for that.
It's Google Drak Theme
https://github.com/JuanMTech/google_dark_theme
and Google Light Theme
https://github.com/JuanMTech/google_light_theme
I was also able to reproduce the effect with
iOS Dark Mode
https://github.com/basnijholt/lovelace-ios-dark-mode-theme
and iOS LightMode
https://github.com/JuanMTech/ios_dark_mode_theme
NB: all these themes come from @JuanMTech.

uups, just seen I indicated the wrong theme, sry for that.
It's Google Drak Theme
https://github.com/JuanMTech/google_dark_theme
and Google Light Theme
https://github.com/JuanMTech/google_light_theme
I was also able to reproduce the effect with
iOS Dark Mode
https://github.com/basnijholt/lovelace-ios-dark-mode-theme
and iOS LightMode
https://github.com/JuanMTech/ios_dark_mode_theme
NB: all these themes come from @JuanMTech.

hey @tomvanswam, all fine on your side?
sry for being inpatient,  any update on this yet?

Unfortunately my spare time is very limted at the moment. So no real progress. Also some issues with my dev environment took up some time, but that should be fixed now.
Expect news within a month.

Found the problem, now to fix it ;-)

cool, you're the man. tnx for this update. looking forward to the v1.1.1 milestone :-)

authors: andilge tomvanswam

repo: tomvanswam/compass-card

license: MIT

license_source: github-api


text:
install issue

I found this sample very useful , especially the use of webpack.
However I am facing an issue when i do npm install after cloning .
P.S,  this is happening on a corporate network only. I dot have this issue on my personal machine outside of the corporate network. see the console output below for more info , any idea ?

typings install

typings WARN badlocation "github:Esri/jsapi-resources/3.x/typescript/arcgis-js-a
pi.d.ts" is mutable and may change, consider specifying a commit hash
typings WARN deprecated 9/14/2016: "registry:dt/core-js#0.0.0+20160524134847" is
deprecated (updated, replaced or removed)
typings WARN deprecated 9/7/2016: "registry:dt/dojo#1.9.0+20160521151917" is dep
recated (updated, replaced or removed)
typings ERR! message Unable to connect to "https://raw.githubusercontent.com/Esr
i/jsapi-resources/master/3.x/typescript/arcgis-js-api.d.ts"
typings ERR! caused by self signed certificate in certificate chain
typings ERR!
npm ERR! code ELIFECYCLE
npm ERR! angular2-esri-example@0.2.4 postinstall: typings install
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular2-esri-example@0.2.4 postinstall script 'typings i
nstall'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the angular2-esri-example
package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     typings install
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs angular2-esri-example
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls angular2-esri-example

@Abexdatl I'm glad you found this useful, and I'm sorry that you're having that install issue.
Looks like your corporate firewall doesn't like the cert on https://raw.githubusercontent.com/Esr
i/jsapi-resources/master/3.x/typescript/arcgis-js-api.d.ts
However, I no longer use Angular (no TypeScript) day to day, so I'm not sure if the way this repository is getting the types is the most up to date way.
You might try installing them via npm as documented here.
Although I'm not actively maintaining this repository, if you do find a better way to install the types I'd gladly accept a pull request.

authors: Abexdatl tomwayson


text:
Как правильно задать директорию на output

Здравствуй Тончик!.
крутая штука, только я в php очень нуб, особенно в ООП.
Неопдскажешь как именно задавать директорию на output html  страниц?...
по настройкам "/tmp"..Но там пусто.
рад буду ответу, а особенно если он будет до здачи проекта...;))

Приветствую!
В настройках есть три параметра для директории вывода:
'clearAfter' => true, // автоматическая очистка после разбора
'removeOutputDir' => true, // удалят саму output dir после разбора
'outputDir' => '/tmp/'.uniqid(), // output dir
соответственно, если 'clearAfter' = false, то файлы все останутся

Благодарю за оперативность...:)
запустил ваш движочек, правда через бинарники Gufi. вроде все хорошо
anysites.
Я так же и  изменял вроде бы настройки, но что-то не ничгео происходило
Прошу прощения за свою "одупленность" в Php, но где правильно вставить блок Settings?)
Есть страница, на ней выполняется весь код. У меня Settings стояли после кода как в документации
...;)
спасибо что уделили время

$pdf = new \TonchikTm\PdfToHtml\Pdf('test.pdf', [
    'pdftohtml_path' => '/usr/bin/pdftohtml',
    'pdfinfo_path' => '/usr/bin/pdfinfo'
]);

Здесь как раз и устанавливаются настройки, просто все остальные в данном случае по-умолчанию остаются.
Т.е. Вам нужно примерно так:
$pdf = new \TonchikTm\PdfToHtml\Pdf('test.pdf', [
    'pdftohtml_path' => '/usr/bin/pdftohtml',
    'pdfinfo_path' => '/usr/bin/pdfinfo',
    'outputDir' => '/tmp/'.uniqid(),
    'clearAfter' => false,
]);

;)....блин, вот снубил.
буду знать.
спасибо!
успехов в разработке!

authors: alexTitakov tonchik-tm

repo: tonchik-tm/pdf-to-html


text:
Usage without Middleware

Thank you for the project!
I would like to suggest improvements:

There is a need to use the package when the shouldAcceptUtmParameter() condition is not true. For example POST requests. Then in this case an empty array will always be received (because the boot() method will not be run), and I would like to retrieve the session without writing to it.
It would also be nice to extend the conditions shouldAcceptUtmParameter() to add an exception router configuration.

For now you could extend the middleware by creating your own and overwrite shouldAcceptUtmParameter() method. This will allow you to customize the conditions under which UTM parameters are accepted, including handling POST requests and adding an exception router configuration.
Example:
php artisan make:middleware CustomMiddleware

<?php

use Illuminate\Http\Request;
use Suarez\UtmParameter\Middleware\UtmParameters;

class CustomMiddleware extends UtmParameters
{
    /**
     * Determines whether the given request/response pair should accept UTM-Parameters.
     *
     * @param \Illuminate\Http\Request  $request
     *
     * @return bool
     */
    protected function shouldAcceptUtmParameter(Request $request)
    {
        return $request->isMethod('GET') || $request->isMethod('POST');
    }
}

And finally update your Kernel.php or bootstrap/app.php to use the CustomMiddleware:
$middleware->web([CustomMiddleware::class]);

The proposed solution is clear, but my point is another...
To make a static method (or even apply this constructor), which would get the current session state from utm and use it everywhere, both inside Middleware and outside.
That it would be possible to work with the package without calling Middleware where it is not needed.
For example, there is a router where Middleware is not needed (no need to save utm), but we need to get data about previously collected utm.

Thank you for your suggestion.
Now it's possible to use it also without middleware. Take a look: Use as Facade
Remove the middleware and add that facade where you need to.
use Suarez\UtmParameter\Facades\UtmParameter;

class IndexController {
  public function index(Request $request)
  {
      UtmParameter::boot($request);
  }
}

class SomeDifferentController {
  public function index(Request $request)
  {
      $source = UtmParameter::get('source');
  }
}

If you call UtmParameter::get('source') - it will always return an empty value. There is no need to execute UtmParameter::boot($request), because there is no request or there is no need to write utm data to the session, but only to retrieve it.
I suggest that when calling UtmParameter::all() to get data from the session directly that would not be dependent on Request, and in Middleware to do only saving to the session.

In case you don't want to use the middleware, which updates everything within the session via UtmParameter::boot($request); with every GET-Request, you can use the facade technique.
In this case you need to call UtmParameter::boot($request); once, to retrieve the UTM-Parameters. It's stored inside the session and you can easily use UtmParameter::all(), UtmParameter::get(), UtmParameter::has() or UtmParameter::contains().
Route::get('/', function (Request $request) {
    // initial call to get the UTM Parameters from the Request-Object
    UtmParameter::boot($request);

    return view('index');
});

Route::get('/detail', function (Request $request) {
     // Retrieve parameter from the session
    $source = UtmParameter::get('source');
    dd($source);
    return view('detail');
});

You could also work with middleware-aliases and apply it only on routes you want to check for these parameters.

Thank you.

authors: Tigla toni-suarez

repo: toni-suarez/laravel-utm-parameter


text:
Split into packages to make importable

I split the different parts up in modules here so it is importable into other projects.
Any feedback is welcome!

Great, thank you! :+1:

authors: meyskens tonobo

repo: tonobo/mtr


text:
Provide references for multi-project security vulnerability notifications

Feature Request

Is it for PyCharm? Yes
Is it for the GitHub Action or Docker container? No

Details
When multi-projects are used in PyCharm, multiple virtual environments can be used simultaneously. Because each one will have different sets of package dependencies, any notification regarding Python Security CVE are hard to resolve since the user cannot easily figure out for which environment the flagged notification applies to. The generated notification should better guide the user to which explicit package is affected.
Originally created in https://youtrack.jetbrains.com/issue/PY-56849
Steps to Reproduce

Create multiple projects with different virtual environments and dependencies.
In one of the environment, purposely install a package (any) that will trigger a CVE to be detected when analyzed.
Open the projects and attach them together to create a multi-project view.
Once CVE are analyzed and detected, see how produced notifications do not provide any indication about which environment is affected.

Expected Result
A link or path displaying the specific package, the specific project, or the relevant virtual environment should be provided to help the developer inspect or correct the affected package.
Actual Result
Without better references, analyzing massive multi-project CVEs is impossible, since all sub-projects could use different dependencies. It is extremely counter-productive to look up all possibilities each time any environment and/or installed packages change.

Thanks for the suggestion @fmigneault that sounds like a complicated setup. When this plugin was originally made, PyCharm supported neither multiple projects or package managers.
I've had a look at the API. The plugin gets:

A Project interface, which has a name
Each Project has a set of Sdk's, which each have an interface for fetching a list of installed package
Each package has a version, name and location
There is no API (that I can find) for getting the name of the Package Manager, but I am looping over all package managers in a project

Have experimented with adding some additional messages to the notifications:

The name of the project
The location of the package if it has a vulnerability

Does this meet your requirement?

@tonybaloney
Thanks for this update. Looks great!
I’ll have to try it out, but it looks like it would resolve the issue.

Shipped in 1.28.0 (update should show by tomorrow)

authors: fmigneault tonybaloney

repo: tonybaloney/pycharm-security


text:
FEATURE REQUEST: Accept both comma and point as a separator regardless of the budget settings

ToolKit Feature Name: All numerical entry fields, calculator.
Expected Behavior
All amount entry fields (Inflow/Outflow/Budgeted) should accept both 123.45 and 123,45 as valid input regardless of what symbol is set as the decimal separator in the budget settings.
This is the default behavior of YNAB 4
I'm using both Russian and English keyboard layouts. In Russian layout, ./Del key on a numeric keypad generates a comma. In English layout, a point. I'd like to be able to enter numbers correctly without thinking about what layout is active at any particular moment.
Actual Behavior
Comma is set as the decimal separator for my budget (Russian locale). Only comma is accepted as such. 123.45 is interpreted as 12345,00 in all entry fields and the built-in calculator. So if I happen to write something in English into the memo, or enter a payee name in English, I have to switch to Russian before entering anything into the Outflow or Inflow fields.
Steps to Reproduce the Behavior

Set the decimal separator to comma in the budget settings.
Try to enter 123.45 (with point) in the Budgeted amount for any category, in the Inflow/Outflow fields of a transaction.
Try to make calculations with decimal places using the numeric keypad while in English keyboard layout.

Export of Toolkit Settings (Bottom Left of Settings Page)
N/A
System Settings
ToolKit Version:
Operating System (Mac/Windows/Etc): Windows
Browser (Chrome/Firefox/Safari): Chrome
Browser Version: 58.0
Other Extensions: N/A

We're starting to track all enhancements in Trello.
I've added this request here. Thank you!

authors: dsent joshmadewell

repo: toolkit-for-ynab/toolkit-for-ynab


text:
MonthlyPoints on BotObjects not implemented

As described here bots should have Points and MonthlyPoints.
But in this Library they only have Points.
MonthlyPoints should be added.

can you also update the nuget package?

repo: top-gg/DBL-dotnet-Library


text:
feat(TabItem): add description and image

FX-3140
Description

enhance Tabs.Tab with description and avatar as we agreed in the RFC
update styles to comply with BASE
showcase all possible states in the storybook
showcase possible real usage example in the storybook (It is just an example, it will not be in BASE)

How to test

I tried to use atomic commits, if you find the PR too big, try to review commit by commit 🙇
compare examples in the storybook with the design
check Happo screenshots

Development checks

[x] Add changeset according to guidelines (if needed)
[x] Read CONTRIBUTING.md and Component API principles
[x] Make sure that additions and changes on design follow Toptal's BASE design, and it's been already discussed with designers at #-base-core
[x] Annotate all props in component with documentation
[x] Create examples for component
[x] Ensure that deployed demo has expected results and good examples
[x] Ensure the changed/created components have not caused accessibility issues. How to use accessibility plugin in storybook.
[x] Self reviewed
[x] Covered with tests

All development checks should be done and set checked to pass the
GitHub Bot: TODOLess action

PR commands

List of available commands:

@toptal-bot run package:alpha-release - Release alpha version
@toptal-anvil ping reviewers - Ping FX team for review

PR Review Guidelines

When to approve? ✅
You are OK with merging this PR and

You have no extra requests.
You have optional requests.

Add nit: to your comment. (ex. nit: I'd rename this variable from makeCircle to getCircle)

When to request changes? ❌
You are not OK with merging this PR because

Something is broken after the changes.
Acceptance criteria is not reached.
Code is dirty.

When to comment (neither ✅ nor ❌)
You want your comments to be addressed before merging this PR in cases like:

There are leftovers like unnecessary logs, comments, etc.
You have an opinionated comment regarding the code that requires a discussion.
You have questions.

How to handle the comments?

An owner of a comment is the only one who can resolve it.
An owner of a comment must resolve it when it's addressed.
A PR owner must reply with ✅ when a comment is addressed.

The bottom space, between the sub-label and the bottom of the tab should be 9px according to designs. It feels weird, as that would give a total height of 57px instead of 56px. I think it's actually better implemented in Picasso.
@TomasSlama agreed to reach out to Matt for clarifying if there's a mistake in designs.

The radius is also incorrect, according to designs. At the moment, the radius is statically defined as 8px 0 0 8px for all examples.
According to designs, without sub-label it should be 2px 0 0 2px, while with sub-label it should be 4px 0 0 4px.

I'd also load an image here, and would not leave a placeholder like that.

@separatio I originally left the same comment, but after testing locally I came to the conclusion that this is just one of the edge cases for this components.
Avatar can be either null or undefined, with null being a placehonder avatar and undefined is no avatar at all.
I think it would probably be cool to have that highlighted in the example through

I'd also load an image here, and would not leave a placeholder like that.

@OndrejTuma Are you sure we should support disabled tabs, though? If there are no designs, is there a product need to support them as disabled?

@OndrejTuma Are you sure we should support disabled tabs, though? If there are no designs, is there a product need to support them as disabled?

We support them in horizontal tabs 🤔 so maybe its worth adding it here, since you can use disabled items

@separatio I discussed with Matt the 9px bottom padding, and it should be 8px as I have implemented, Matt will fix it in figma 🙇

authors: OndrejTuma TomasSlama mkrl separatio

repo: toptal/picasso


text:
[FX-4623] Migrate TableCell to TailwindCSS

FX-4623
Description
Migration to Tailwind.
How to test

Temploy
Check the production and compare it with the temploy.

Screenshots

Before.
After.

Insert screenshots or screen recordings

Development checks

~Add changeset according to guidelines (if needed)~
~Read CONTRIBUTING.md and Component API principles~
[x] Make sure that additions and changes on the design follow Toptal's BASE design, and it's been already discussed with designers at #-base-core
~Annotate all props in component with documentation~
~Create examples for component~
~Ensure that deployed demo has expected results and good examples~
~Ensure the changed/created components have not caused accessibility issues. How to use accessibility plugin in storybook.~
[x] Self reviewed
~Covered with tests (visual tests included)~

Breaking change

~codemod is created and showcased in the changeset~
~test alpha package of Picasso in StaffPortal~

All development checks should be done and set checked to pass the
GitHub Bot: TODOLess action

PR commands

List of available commands:

@toptal-bot run package:alpha-release - Release alpha version
@toptal-anvil ping reviewers - Ping FX team for review

PR Review Guidelines

When to approve? ✅
You are OK with merging this PR and

You have no extra requests.
You have optional requests.

Add nit: to your comment. (ex. nit: I'd rename this variable from makeCircle to getCircle)

When to request changes? ❌
You are not OK with merging this PR because

Something is broken after the changes.
Acceptance criteria is not reached.
Code is dirty.

When to comment (neither ✅ nor ❌)
You want your comments to be addressed before merging this PR in cases like:

There are leftovers like unnecessary logs, comments, etc.
You have an opinionated comment regarding the code that requires a discussion.
You have questions.

How to handle the comments?

An owner of a comment is the only one who can resolve it.
An owner of a comment must resolve it when it's addressed.
A PR owner must reply with ✅ when a comment is addressed.

@toptal-anvil ping reviewers


text:
No results matching query found

When I issue luarocks install trepl, I get the this error : Error: No results matching query were found.
luarocks list is :
Installed rocks:
cwrap
scm-1 (installed) - /home/radar/anaconda/lib/luarocks/rocks
luarocks
2.2.1-1 (installed) - /home/radar/anaconda/lib/luarocks/rocks
paths
scm-1 (installed) - /home/radar/anaconda/lib/luarocks/rocks
torch
scm-1 (installed) - /home/radar/anaconda/lib/luarocks/rocks

consult our google groups for fixes, or further issues as such. https://groups.google.com/forum/#!forum/torch7

authors: darshanime soumith

repo: torch/trepl


text:
Remove Debug Logs from feather

We added a bunch of Log.d, need to remove this since we dont want our console spitting a bunch of things at our users

closed via 0ff670cd17fd1f7829aa2a42970e842bb5f818ba


text:
Cleaned up page validation. Fixes #1216

Previously, we added an extra validation rule to the slug field by overriding the clean_slug method on the page. This caused the slugs length to no longer be checked (and caused crashes when a too long slug was inserted).
This PR removes the code that manually changes the methods on the form and instead, uses form.add_error (added in Django 1.7) to perform the extra validation rules.
We currently can't add these into the form due to limitations in the edit handlers API.

If this is going to be merged into 0.8.x, it can't use form.add_error because 0.8.x still supports Django 1.6.

Could this be merged into master with form.add_error then tweaked for 0.8.x?

I've worked out an approach which will hopefully allow us to move the validators out of views/pages.py completely, and work on Django 1.6 too, without any radical code changes - first step is here: https://github.com/gasman/wagtail/commit/b8711ff8b42f0c2e81d56d816ee31479a7fba473
However, I've just noticed that the test in 452a0cdc44b3f46825af1fd17167cb77fff5dfb1 doesn't actually fail on latest master or stable/0.8.x - it returns 'unexpected success'. Please can you provide a revised failing test?

Doesn't appear to break on 0.8.x (no idea why).

As per https://github.com/torchbox/wagtail/issues/1216#issuecomment-97111915 , this problem was mis-diagnosed - the problem is with the url_path field, not the slug validation. Closing as invalid (but will open a separate non-priority ticket to clean up the validation as per https://github.com/gasman/wagtail/commit/b8711ff8b42f0c2e81d56d816ee31479a7fba473)

@gasman
https://github.com/kaedroho/wagtail/commit/452a0cdc44b3f46825af1fd17167cb77fff5dfb1 failed and https://github.com/kaedroho/wagtail/commit/645c2ccf1558e8bf35e9965de8e54ce8874dba19 fixed it. So surely something is being fixed by this PR?
Also, this removes some horrible code so why not merge it as at least a cleanup?

As mentioned above, 452a0cdc44b3f46825af1fd17167cb77fff5dfb1 does not fail - the test returns "unexpected success". Have just confirmed this by cherry-picking on latest master.
I'd prefer to move these validators out of the view module entirely as per #1245, but I agree that this is an improvement over the current code (and the validation logic is well-covered by tests, so there's not much risk of breaking things with the change). Please rebase with a more accurate commit message, and I'll merge.

Ohh, having just retried it, I found that my test wasn't breaking. Sorry about that. I'll rebase this.

Ready for another look

authors: gasman kaedroho

repo: torchbox/wagtail


text:
How do I get the CACHE-source as in the video tutorial?

I am trying to get overlay of the initial source back and comped, but I can get seem to get two sources of webcam.
Seem I need SpoutOut somehow? But my VideoIn cant be on two places at same time anyhow?

If you follow these instructions, your network should then be Video Device In TOP > Spout Out > SpoutCam > MediaPipe.
You can use the example network in the MediaPipe.toe project

repo: torinmb/mediapipe-touchdesigner


text:
Error when unloading dataset

Load a dataset, click to unload:
Traceback (most recent call last):
  File "X:\avirtual\standalonev2\dataset-tag-editor-standalone\venv\lib\site-packages\gradio\queueing.py", line 527, in process_events
    response = await route_utils.call_process_api(
  File "X:\avirtual\standalonev2\dataset-tag-editor-standalone\venv\lib\site-packages\gradio\route_utils.py", line 270, in call_process_api
    output = await app.get_blocks().process_api(
  File "X:\avirtual\standalonev2\dataset-tag-editor-standalone\venv\lib\site-packages\gradio\blocks.py", line 1847, in process_api
    result = await self.call_function(
  File "X:\avirtual\standalonev2\dataset-tag-editor-standalone\venv\lib\site-packages\gradio\blocks.py", line 1433, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "X:\avirtual\standalonev2\dataset-tag-editor-standalone\venv\lib\site-packages\anyio\to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
  File "X:\avirtual\standalonev2\dataset-tag-editor-standalone\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 2177, in run_sync_in_worker_thread
    return await future
  File "X:\avirtual\standalonev2\dataset-tag-editor-standalone\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 859, in run
    result = context.run(func, *args)
  File "X:\avirtual\standalonev2\dataset-tag-editor-standalone\venv\lib\site-packages\gradio\utils.py", line 788, in wrapper
    response = f(*args, **kwargs)
  File "X:\avirtual\standalonev2\dataset-tag-editor-standalone\scripts\ui\block_load_dataset.py", line 189, in unload_files
    + filter_by_tags.clear_filters(update_filter_and_gallery)
TypeError: FilterByTagsUI.clear_filters() takes 1 positional argument but 2 were given

Thank you for your report!!


text:
Move Lint/EndAlignment cop to Layout department

Fixes #23.
Follow up of rails/rails#32681.

Thank you! @koic <3

authors: koic toshimaru

repo: toshimaru/rubocop-rails


text:
[Bug]: amountToHangul 함수명이 괜찮은가요?

Bug description
amountToHangul이라는 함수 이름이 함수 자신이 하는 역할과 책임을 잘 나타내고 있나요?
Expected behavior
No response
To Reproduce
No response
Possible Solution
No response
etc.
No response

https://github.com/toss/es-hangul/pull/204#issuecomment-2257345735

@Collection50 논의에 큰 도움을 주실 것 같아서 멘션드립니다 🙇

조심스럽게 논의에 참여해봅니다 🙂
의견
먼저, 저의 생각은 다음과 같아요.
#204 에서 다뤄졌던 함수의 설명에 적합한 이름은 일관된 이름 짓기 규칙을 참고했을때 말그대로 수를 뜻하는 num, number 혹은 su가 보다 적절할 것 같습니다.
import hangul from 'hangul' // zod와 같은 방식으로도 제공
hangul.josa();
hangul.susa();

hangul.number()
hangul.num()
hangul.su();

또한 해당 함수의 구현에도 개선이 이루어지면 좋을 것 같습니다.
이유
그렇게 생각하는 이유는 다음과 같아요.
근거와 함수의 구현 내용이 적절치 못하다
왜냐하면 문서에서 근거로 삼은 이 링크에서는 "한글 맞춤법 제 44항"을 근거로 삼고있지만, 아래와 같은 형태에서 금액이 모두 한글로 이루어진 경우만 지원하고 있어요.

그리고 "한글 맞춤법 제 44항"에서는 숫자를 한글로 표기하는 경우 '만' 단위로 띄어서 쓰지만 해당 함수에서는 붙여서 반환해 주고 있어요.
하여,

숫자나 문자를 국립국어원 규칙의 한글 읽기 문자열로 변환합니다.

라는 함수가 되기 위해서는 다음과 같이 바뀌어야 해요.
개선안
amountToHangul('15,201,100'); // '천오백이십만 천백'
amountToHangul('120,030원'); // '십이만 삼십'
amountToHangul('12345.6789'); // '만이천삼백사십오점육칠팔구'
amountToHangul(15_201_100); // '천오백이십만 천백''

amountToHangul('15,201,100',options); // '1200만 천백'
amountToHangul('120,030원',options); // '12만 30'
amountToHangul('12345.6789',options); // 이 부분은 더 탐색이 필요합니다
amountToHangul(15_201_100,options); // '1520만 1100'

그리고 다음의 경우는 es-hangul에서 다룰지, 사용하는 곳에서 충분히 대응 가능한 부분인지를 논의하여 options에 추가하거나, amountToHangul을 코어로 하는 파생함수들이 추가되었으면 하는 바람이에요

금액을 적을 때는 변조(變造) 등의 사고를 방지하려는 뜻에서 붙여 쓰는 관례
영수증 등에서 제일 앞에 '일'을 덧붙이는 것은 다른 숫자를 첨기하여 금액이 변조되는 것을 방지하기 위한 경우
뒤에 '원정'으로 적는 것은 '원'이 금액의 단위이고, '-정'은 '그 금액에 한정됨'의 뜻을 더하는 접미사이기 때문에 '원'과 '정'을 붙여서 쓰는 경우

참고
저도 숫자를 통화로 표현해야하는 경험이 더러있었어요.
당시에는 numToKorean이라는 라이브러리를 사용했는데요. 앞으로도 수를 다루는 함수들이 추가되거나 이 함수에 options로 추가될 경우가 많아보여서 참고 할 함수들을 남겨보아요.

numToKorean
toss/slash의 formatToKRW
toss/slash의 formatToKoreanNumber

number, num, su 로 함수이름을 지으면 간결해서 좋긴하지만, from(숫자), to(한글) 로 변한다는 것을 잘 나타낼 수 있을까요?
그래서 amountToHangul 함수명 자체는 좋은 것 같은데 위에서 말씀해주신대로 44항을 제대로 반영하고 있지도 못하고, 전체를 한글로 반환해야할 수도 있고 숫자는 남기고 단위만 한글로 반환해야할수도 있고 하기때문에 options로 여러 요구사항을 반영하는것에 찬성합니당
import {su} from 'es-hangul'

su('120.030) // 코드만 봤을때 한국어 string이 반환된다는것을 예측하기 힘듬

이게 susa나, date(#217) 와 같은 함수들과 혼동이 없었으면 합니다
susa, date는 딱 역할과 책임이 명확해보이는데 amountToHangul은 정체성이 없어보여서 @BO-LIKE-CHICKEN 님이 작성해주신 개선안의 기능을 구현하되, 그 기능에 맞는 좁은 의미의 함수명을 사용하고 싶어요!!

저는 amountToHangul이 인자와, 결과값을 함수명으로부터 유추할 수 있다고 생각하고 amount는 굳이 필요없을 것 같아서. numberToHangul와 같은 함수명이면 좋을 것 같다고 생각합니다.

먼저, numberToHangul로의 변경에 대해서는 무척 공감합니다 🔥
처음의 from, to에 대한 코멘트도 확인해 보았었는데, 완전히 설득 되었어요.  🙇🏻♂
numberToHangul의 기능에 맞는 좁은 의미의 함수명을 고민해 보았지만, 이후에 너무 다양한 기능을 제공하는 options가 파생되면

결국 numberToHangul이 가장 적절했지  않을까?

라는 생각이 들 것 같아서 새로운 함수명 보다는  아래의 다소 실험적인 제안을 드려보려 합니다 🙂
Case 1: 커링 방식으로 numberToHangul만 export 하며 내부적으로 분리된 함수를 호출
함수의 첫 번째 호출에서 주요 설정을 분리하고 두 번째 호출에서 실제 데이터를 처리함으로써 로직이 명확하게 분리됩니다.
const result = numberToHangul('KRW')(12_340_000);

expect(result).toBe('일금 일천이백삼십사만원정')

Case 2: numberToHangul은 내부적으로만 사용하고 외부에는 래핑한 함수만을 export
다만, 생각보다 많은 개발자에게 커링은 다소 생소하거나 복잡하게 느껴질 수 있습니다. 직관적이고 사용하기 쉬운 API를 만드는 것이 중요하다면 아래의 방식도 좋을 것 같습니다.

export const numberToKRW = () =>{
//  내부에서 numberToHangul에 의존
}

const result = numberToKRW(12_340_000);

expect(result).toBe('일금 일천이백삼십사만원정');

하지만, 각 함수가 독립적으로 export되므로, 각각의 함수에 대한 사용법과 예제를 문서화해야 합니다.

무척이나 유익한 issue 생성과 의견주심에 감사드립니다. 🙌

두 분 말씀에 덧붙여 제 생각 남겨드립니다 !!
numToKorean
toss/slash의 formatToKRW
toss/slash의 formatToKoreanNumber
타 라이브러리에서 제공하는 기능이라면 #176 에서 나누었던 것처럼 es-hangul의 뾰족함이 모호해진다는 근본적인 생각이 들었어요.
동일한 기능이라면, 현재 이슈의 함수명 고민도 타 라이브러리와 다른 이름을 짓는 고민이 아닌가 싶었습니다.
두 분의 의견이 궁금합니다 !!

타 라이브러리에서 제공하는 기능이라면 https://github.com/toss/es-hangul/discussions/176 에서 나누었던 것처럼 es-hangul의 뾰족함이 모호해진다는 근본적인 생각이 들었어요.
동일한 기능이라면, 현재 이슈의 함수명 고민도 타 라이브러리와 다른 이름을 짓는 고민이 아닌가 싶었습니다.

타 라이브러리에서 제공해주는지의 여부는 es-hangul이 새로운 기능을 추가할 때 영향을 주는 잣대는 아닌 것 같아요!
복잡한 한글 도메인에 관한 규칙을 풀고 있는지 여부가 es-hangul에 새로운 기능을 추가할 때 고민해야할 지점이라고 생각하고,
숫자를 넣었을때 한글로 변환시켜주는것은, 한글 규칙이 녹아져 있다고 생각이들어서 es-hangul에서 제공해줘야한다고 생각했어요!

혹시 numberToHangul에서 제공할 함수들을 구현해봐도 될까요?
어떤 방식으로 API를 제공할지는 논의가 더 필요해 보이지만, es-hangul에 추가된다면 유용하게 사용될 기능들이 많아보여서요!
ex) formatToKRW, formatToKoreanNumber

구현하기에 앞서, 인터페이스나 함수의 역할과 책임에 대해 먼저 정리하고 나서 구현하면 좋을 것 같아요!
저도 거시적인 관점에서 고민해본 후 코맨트 남겨보겠습니다!

@suhdonghwi @minsoo-web 님께서 별도 채널에서 소중한 의견들 주셔서 제 생각도 정리해봤습니다.
num-to-korean 라이브러리에서 대응하는 정도의 옵션들이라면 비즈니스 로직의 95% 정도는 처리할 수 있다고 생각해요!
결국 함수가 해야하는 역할은 숫자를 한글로 변환해주는 것이고 내부적으로 약간 옵션에 따른 분기가 추가되기때문에 여러개의 함수보다는 하나의 함수면서 옵션으로 결과값의 형태를 정의하는 모습이면 좋겠다고 생각했어요.
number(123456) // 일이삼사오육 구현할 필요 없다고 생각해요. 너무 간단하고, 니즈가 크게 없어보입니다.
number(123456) // 십이만삼천사백오십육 => 기본 기능
number(123456, "숫자한글믹스") // 10만 3,456
formatToKRW와 같은 기능을 하는 옵션
formatToKoreanNumber 와 같은 기능을 하는 옵션

위 정도면 대부분의 숫자를 한글로 변환시키려는 케이스는 대응이 가능해보여요
이렇게 사용하는 쪽의 편의성을 챙길 수 있도록 제공해주고 추후에 더 다양한  비즈니스 요구사항이 있다면 @suhdonghwi 님이 제안해주신 다음과 같은 방법이 있을 것 같아요.
numberToHangul(15201100) =>
  [
    {
      multiple: 1520,
      multipleHangul: '일천오백이십'
      multipleHangulLingual: '천오백이십'
      unit: 10000,
      unitHangul: '만',
    },
    {
      multiple: 1100,
      multipleHangul: '일천백',
      multipleHangulLingual: '천백',
      unit: 1,
      unitHangul: ''
    }
  ]

이런 인터페이스도 가능할 것 같아요. 그러면 사용할 때
result.map(({ multipleHangul, unitHangul }) => ${multipleHangul}${unitHangul}).join('') =>
'일천오백이십만일천백'
result.map(({ multiple, unitHangul }) => ${commaizeNumber(multiple)}${unitHangul}).join(' ') =>
'1,520만 1,100'

더 잘 tree-shaking 될 수 있도록 각각의 옵션을 분리하는 것도 좋을 것 같아요
import { numberToKorean, numberToKoreanMixed, numberToKoreanSpaced } from 'es-hangul/format';
numberToKorean(12345678) === '일천이백삼십사만오천육백칠십팔'
numberToKoreanMixed(30864627) === '3,086만 4,627'
numberToKoreanSpaced(12345678) === '일천이백삼십사만 오천육백칠십팔'
Referenced by @raon0211

더 잘 tree-shaking 될 수 있도록 각각의 옵션을 분리하는 것도 좋을 것 같아요
import { numberToKorean, numberToKoreanMixed, numberToKoreanSpaced } from 'es-hangul/format';
numberToKorean(12345678) === '일천이백삼십사만오천육백칠십팔' numberToKoreanMixed(30864627) === '3,086만 4,627' numberToKoreanSpaced(12345678) === '일천이백삼십사만 오천육백칠십팔'
Referenced by @raon0211

TL;DR:
es-hangul이 트리 쉐이킹(Tree Shaking) 을 중점으로 둔다면, 각각의 옵션을 개별적으로 분리하는 것이 더 적합하다고 생각합니다. 이렇게 하면 유지보수도 용이하고, 각 함수가 명확한 책임을 가지며 코드 가독성도 좋아집니다. 대부분의 애플리케이션에서는 복잡한 금융 도메인처럼 여러 옵션이 필요하지 않기 때문에, 필요한 함수만 import해 사용하는 것이 실용적일 거예요.
다만, 파일이 많아질 수 있다는 단점이 있어서, 파일 구조에 대한 명확한 전략이 필요할 것 같아요.
또한, 사용자가 원하는 기능을 찾기 어렵지 않도록 API 문서나 디렉터리 구조를 명확하게 제공하는 것이 중요해 보입니다.

저는 es-hangul의 가장 큰 지향점이 더 나은 트리 쉐이킹(Tree Shaking) 이라면, 각각의 옵션을 분리하는 것이 더 적합하다는 의견에 동의합니다. 트리 쉐이킹을 제외하더라도 아래의 이유로 이 방식이 더 좋다고 생각해요:

관리 용이성:
각각의 옵션을 독립적인 함수로 분리하면 유지보수가 쉬워집니다. 각 함수는 한 가지 책임만을 담당하므로, 코드 수정이나 확장이 있을 때 의도한 부분만 쉽게 다룰 수 있습니다.

함수의 명확한 책임:
여러 포맷 옵션을 제공하는 하나의 함수 대신, 각 포맷을 처리하는 별도의 함수가 있으면, 각 함수의 역할이 명확해지고, 코드 가독성이 높아집니다.

비즈니스 요구사항의 최소화:
대부분의 애플리케이션에서는 매우 복잡한 금융 도메인처럼 많은 옵션이 필요하지 않습니다. 한글 숫자 변환의 경우, 각 어플리케이션의 정책에 맞는 1~2개 정도의 포맷 함수만 import 해서 사용하면 대부분의 요구사항을 충족시키기에 충분할 것이라는 생각이에요.

단점은 파일 수가 많아질 수 있다는 점인데, 이를 해결하려면 파일 구조를 어떻게 구성할지에 대한 명확한 전략을 정하고 가면 좋을 것 같아요. 예를 들어, 숫자 관련 함수는 /number 디렉터리에, 날짜 관련 함수는 /date 디렉터리로 나누는 등의 구조를 가지는 방안이 떠올라요.
(date는 파일에 그 함수들을 모으고자 했으나 폴더와 파일로 분리하는 것이 더 좋은 방식이라고 지금은 생각이 들어요)
 ├── number
 │   └── numberToKorean.ts
 │   └── numberToKoreanMixed.ts
 │   └── numberToKoreanSpaced.ts
 ├── date
 │   └── days.ts
 │   └── month.ts
...

이러한 구조의 문제점은 유저가 원하는 기능을 찾기 어려워질 수 있다는 점입니다. 복잡한 한글이라는 유니코드의 문제점을 해결하고자 es-hangul을 찾았지만 비슷한 기능을 하는 함수들이 문서에서 파편화되어 있다면 만족스럽지 못할 것 같아요.
예를 들어, '3,086만 4,627'와 같은 숫자 포맷을 바꾸고 싶다면, 사용자들은 최악의 경우에 numberTo라는 prefix가 붙은 모든 함수를 둘러봐야 해요. 따라서, 위의 구조로 간다면 API 문서나 디렉터리 구조를 명확하게 정의하는 것이 함께 진행되었으면 좋겠어요.

폴더구조는 src밑에 함수가 1뎁스로 쭉 나오면 좋을 것 같고,
문서도 1뎁스로 쭉 나오게 하면 유저가 원하는 기능을 찾기 쉬울 것 같아요!
es-hangul에 존재하는 함수가 아직은 크게 많지 않기 때문에 1차원으로 나열해도 좋을 것 같아요!
#242 관련해서 PR올려두었어요!!

안녕하세요.
폴더 구조를 #242 에서 개선해주신 후 여전히 숫자를 한글로 포매팅하는 함수가 진행되지 않고 있는 것 같습니다. 추가적인 논의가 이뤄지고 있는 상황이 아니라면 이슈라이징 후 진행해봐도 괜찮을까요?

네네 답변 늦어 죄송합니다 진행해주시면 감사하겠습니다!! 🙇

authors: BO-LIKE-CHICKEN Collection50 okinawaa

repo: toss/es-hangul


text:
feat(lint): introducing eslint flat config

Overview

PR Checklist

[ ] I did below actions if need

I read the Contributing Guide
I added documents and tests.

@manudeli I've implemented the ESLint flat config for eslint-config-ts, and it’s working perfectly. However, I changed the module type to "module" to support ES module imports. Should I revert to CommonJS modules instead? If so, this would require changing the module type for the entire package. What are your thoughts on this?

@manudeli I've implemented the ESLint flat config for eslint-config-ts, and it’s working perfectly. However, I changed the module type to "module" to support ES module imports. Should I revert back to CommonJS modules instead? As, this would require changing the module type for the entire package. What are your thoughts on this? Before proceeding further, I just need confirmation that this is the right direction.

As far as I understand, esm can import cjs,
and cjs cannot require esm. Then I thought it would be better for these eslint-related packages to be written in cjs. Because packages like docs/suspensive.org use Next.js, they should be written in cjs.
Nevertheless, if you change the eslint-related packages to esm, I wonder if you can try using the exports field in package.json. It seems that you can make a package that supports both esm and cjs with tsup. (All packages under packages/* support this way, supporting both esm and cjs.)
Personally, I think it would be best to use "type: module" and make it support both esm and cjs with tsup and exports. Can you try this?
Then, I think what you should do is use type: module as it is now, add tsup, and check if it works with the exports field.

@manudeli, I've converted all the configurations to flat config. However, making them compatible with both ESM and CJS has proven to be a bit tricky 😅. I’m working on it and expect to have it completed by tomorrow.

@manudeli I've tried various approaches to solve this issue, but I haven't been able to find a working solution. Could you please help me out with this? Your expertise would be greatly appreciated!

@manudeli any further follow-up?

@manudeli any further follow-up?

Sorry, I haven't seen this PR lately as I've been busy with other things at the company. I'm trying to remove @suspensive/eslint-config-js, @suspensive/eslint-config-ts right now. Please wait a moment and I'll mention it again.

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 70.57%. Comparing base (840160d) to head (ebb0c9c).

Additional details and impacted files

@@           Coverage Diff           @@
##             main    #1228   +/-   ##
=======================================
  Coverage   70.57%   70.57%
=======================================
  Files          70       70
  Lines         656      656
  Branches      132      131    -1
=======================================
  Hits          463      463
  Misses        171      171
  Partials       22       22

Components
Coverage Δ

@suspensive/utils
47.16% <ø> (ø)

@suspensive/react
100.00% <ø> (ø)

@suspensive/react-dom
100.00% <ø> (ø)

@suspensive/react-native
100.00% <ø> (ø)

@suspensive/react-query
72.09% <ø> (ø)

@suspensive/react-query-4
0.00% <ø> (ø)

@suspensive/react-query-5
0.00% <ø> (ø)

@suspensive/react-query-next-experimental
∅ <ø> (∅)

@suspensive/react-query-next-experimental-4
6.15% <ø> (ø)

@suspensive/jotai
0.00% <ø> (ø)

@suspensive/cache
98.01% <ø> (ø)

@suspensive/react-image
80.39% <ø> (ø)

@vr-varad @gwansikk Could you guys check my update please? I updated eslint config based on vr-varad's Pull Request from eslint legacy config to eslint flat config

Based on the code, it looks like you removed the eslint-config-ts and eslint-config-js folders and created a new src folder within eslint-config. Inside this src folder, you've added an index.ts file that consolidates the configurations from both the previous TypeScript and JavaScript ESLint configurations. Is that correct?

Based on the code, it looks like you removed the eslint-config-ts and eslint-config-js folders and created a new src folder within eslint-config. Inside this src folder, you've added an index.ts file that consolidates the configurations from both the previous TypeScript and JavaScript ESLint configurations. Is that correct?

Yes, It is much simpler, supports cjs and esm, and also supports typescript. It was possible thanks to you gave me the basic idea! @vr-varad You're king 👍

@vr-varad @gwansikk Let me know if you okay too after you check please

LGTM! after merging this PR, I think we should also consider improving cases like this one
// packages/react/src/ErrorBoundary.tsx

// TODO: remove this line
// eslint-disable-next-line @typescript-eslint/unbound-method
onError,

Yeah! Thanks to @vr-varad, we can go to eslint@9 too! Let's improve after merging this pull request. If you okay approve this pr please

And will continue to contribute to toss!!!!🙌🙌

authors: codecov-commenter manudeli vr-varad

repo: toss/suspensive


text:
Não roda de forma correta o ponto de entrada

Gente estou fazendo um ponto de entrada, onde ele é alerta quando o usuário, alterar dados do produto e salva em um campo que criei, quantas vezes foi alterado o produto.
Quando uso a função do A010TOK, o programa executa somente no botão de incluir no cadastro de produto, Não funciona no Botão Alterar.
e quando uso a função MT010ALT o programa não esboça reação.
Alguem poderia me dar um luz?
#INCLUDE "protheus.ch"
User Function A010TOK()
Local aArea := GetArea()
If M->B1_VALID $ 1 .And. Empty(M->B1_CUSTOM)
MsgStop("Produto Cadastrado com Sucesso!!!")
B1_VALID++
Endif
If M->B1_VALID $ 2 .And. Empty(M->B1_CUSTOM)
MsgAlert("Este Produto sofreu alterações!")
MsgStop("Para Mudanças neste campo, Por Favor preencha o campo alterações !")
B1_VALID++
Return (.f.)
Endif
If M->B1_VALID $ 3 .And. Empty(M->B1_CUSTOM)
MsgAlert("Este produto sofreu Alterações 2 Vezes !!")
MsgStop("Para Mudanças neste campo, Por Favor preencha o campo alterações !!")
B1_VALID++
Return (.f.)
Endif
If M->B1_VALID >= 4 .And. Empty(M->B1_CUSTOM)
MsgAlert("Este produto sofreu" + (B1_VALID - 1) + "Alterações!!")
MsgStop("Para Mudanças neste campo, Por Favor preencha o campo alterações !!")
B1_VALID++
Return (.f.)
Endif
RestArea(aArea)
Return (.t.)

Consegui fazer ele rodar no botão de alterar, mas ele não acrescenta nenhum dado e nem consulta.

Olá @thelucasx ,
Este aqui não é o canal adequado para esse tipo de dúvida. Aqui cuidamos dos problemas relacionados a extensão de debug e compilação AdvPL. Recomendo o canal de suporte da TOTVS, ou a comunidade: https://devforum.totvs.com.br
Mas para não sair de mãos vazias, acredito que seu problema esteja relacionado ao fato de você estar manipulando os campos de uma tabela, sem fazer o devido lock (RecLock()) para alteração do registro posicionado.
Espero ter ajudado!

authors: AlencarGabriel thelucasx

repo: totvs/advpl-vscode


text:
⚠ Accela has degraded performance

In 03e32cb, Accela (https://aca-prod.accela.com/santaclara) experienced degraded performance:

HTTP code: 200
Response time: 11581 ms

Resolved: Accela performance has improved in d41a39c.

repo: touzesabine/uppdownn


text:
fix comment of vit block.

Signed-off-by: wxywb xy.wang@zilliz.com

/lgtm
/approve

authors: oneseer wxywb

repo: towhee-io/towhee


text:
Feature/state site view

Mostly adding the logos for the state sites

Example of searching outside the state:

repo: townhallproject/townHallProject


text:
🛑 Asset Delivery is down

In bdab46b, Asset Delivery (https://banland.xyz/asset/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Asset Delivery is back up in c93eb71 after 55 minutes.

repo: tp-link-extender/status

license: Unlicense


text:
Mistiming of lines in output

Sabagebu!-09:
http://www.solidfiles.com/d/b39659062d/Sabagebu!-09.rar
All lines in first chapter group appear late. For the next chapter groups, it give correct output
Shirobako-10:
http://www.solidfiles.com/d/eeb5b448b3/Shirobako-10.rar
I guess this is problem with search group. The typesetting lines in the end of chapter group "Part B" has moved to earlier part in chapter group "Preview" in the output
I guess this is similar problem with #16

First part of the issue (sabagebu) is fixed in the commit linked above. The second part is yet another case of audio search working badly for almost silent segments and right now I don't have any real ideas on how to improve it.
By the way I noticed that you're always using --window 100 - this is not safe in general and you're getting very large mistimings exactly because of it. You should consider using the --max-window setting if you want to counter possible errors where default window is not enough, it should be more safe for general use.

Thanks pointing for not using --window 100. I used Sushi.0.4.3c which  doesnt yet has --max-window option. Can I get latest version with all these bugfixes?

Get it here.

thanx

Dont know if this worth to mention or not, but I tried changed the small_window value to 0.5, the mistiming in the shirobako sample is completely gone. The typesetting lines appear perfectly.
Though, that small value doesnt fix in completely silent segment in one of my sample


text:
Unable to install in mac with latest poppler

Seeing below error while installing in mac with latest poppler.
> node-gyp rebuild

Package poppler-qt5 was not found in the pkg-config search path.
Perhaps you should add the directory containing `poppler-qt5.pc'
to the PKG_CONFIG_PATH environment variable
No package 'poppler-qt5' found
gyp: Call to 'pkg-config --libs  cairo poppler-qt5' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/Users/ram4975/.nvm/versions/node/v12.21.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Darwin 20.6.0
gyp ERR! command "/Users/ram4975/.nvm/versions/node/v12.21.0/bin/node" "/Users/ram4975/.nvm/versions/node/v12.21.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/ram4975/git/ms-pdf-to-json/node_modules/pdf-fill-form
gyp ERR! node -v v12.21.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN @grpc/grpc-js@1.0.5 requires a peer of google-auth-library@5.x || 6.x but none is installed. You must install peer dependencies yourself.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pdf-fill-form@5.1.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pdf-fill-form@5.1.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

Looks like latest poppler installs by default with qt6 not with qt5 anymore.
When i look at poppler pkgconfig folder all is see is poppler-qt6.pc not poppler-qt5.pc.

Is there any workaround to proceed further?

I have the same problem.. any updates ?

https://stackoverflow.com/a/69347544/122868
The above with minor tweak worked for me. I checked which qt packages I had installed from homebrew:'
% brew ls|grep qt
poppler-qt5
qt
qt@5

Then I ran:
brew unlink qt
brew unlink qt@5
brew link qt@5

Then I opened a new terminal and was able to successfully complete the install. I should note I have node locked down to v12 on the project in question just in case this still doesn't work with later node versions.

The above solution doesn't worked with my system.

authors: cymen jeff-odopass ram4975 satyajitnayk

repo: tpisto/pdf-fill-form


text:
Update sbt to 1.4.5

Updates org.scala-sbt:sbt from 1.4.4 to 1.4.5.
GitHub Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.scala-sbt", artifactId = "sbt" } ]

labels: library-update, semver-patch

Codecov Report

Merging #337 (c3885b6) into master (2edc485) will increase coverage by 0.15%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #337      +/-   ##
==========================================
+ Coverage   84.56%   84.71%   +0.15%
==========================================
  Files         106      106
  Lines        1276     1276
  Branches       25       25
==========================================
+ Hits         1079     1081       +2
+ Misses        197      195       -2

Impacted Files
Coverage Δ

...ore/src/main/scala/net/AbstractMessageSocket.scala
83.33% <0.00%> (+33.33%)
:arrow_up:

Continue to review full report at Codecov.

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

authors: codecov-io scala-steward

repo: tpolecat/skunk


text:
GET /token

fix #3

#10 #12がマージされてから

動作確認後で


text:
Update sbt-ci-release-early to 2.0.35

Updates io.shiftleft:sbt-ci-release-early from 2.0.32 to 2.0.35.
GitHub Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "io.shiftleft", artifactId = "sbt-ci-release-early" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "@monthly" },
  dependency = { groupId = "io.shiftleft", artifactId = "sbt-ci-release-early" }
}]

labels: sbt-plugin-update, early-semver-patch, semver-spec-patch, commit-count:1

Superseded by #228.


text:
Set a default startupProbe, that would wait for Traefik to be really ready

Welcome!

[X] Yes, I've searched similar issues on GitHub and didn't find any.
[X] Yes, I've searched similar issues on the Traefik community forum and didn't find any.

What did you expect to see?
#951 allows to set a startupProbe, but there is no default one, for now.
When Traefik is starting, it is currently considered "ready" even if all the routes are not configured (because the readinessProbe and livenessProbe check /ping, that answers HTTP 200 very early)
So incoming HTTP requests can receive some HTTP 404, or the TLS certificate of another route, for the few seconds until all routes are setup.
This happens on startup but also for any change that requires a "rollout restart" of traefik pod (for example any configuration change or update of this helm chart)
The idea would be to add a default startupProbe in the bundled values.yaml, that would check somehow that the initial setup of Traefik is complete.
It would still allow users of the Helm chart to override this startupProbe with their own custom one if they need.
I had suggested that for k3s (https://github.com/k3s-io/k3s/issues/9475), but they answered it would be better to ask for it here.

Hello @mossroy,
Thanks for your intereset in Traefik.
A known workaround to this issue is to set initialDelaySeconds on readiness.
TBH, I have no idea how to

check somehow that the initial setup of Traefik is complete.

If you have an idea, feel free to open a PR.

For now, I've manually added this :
    startupProbe:
      exec:
        command:
          - sh
          - "-c"
          - "wget -q --spider -O - http://127.0.0.1:9000/api/http/routers/myrouter@kubernetes"
        failureThreshold: 10

targeted to the most important router (i.e. kube ingress rule) I have in my k3s cluster.
It's far from perfect, but is a working first step in my case.
My apologies that I don't know Traefik internals. Maybe there would be a similar URL that would return an HTTP 200 only when all configured routers are available?

https://github.com/kanopy-platform/traefik-startup-probe seems to try to solve the same issue with a side-car container checking if the number of providers is stable, to say if Traefik is ready or not. I'm not sure if it's a reliable way to do it.

Checking availability of a router can work, yes.
I have submitted an issue upstream, on traefik proxy.
https://github.com/traefik/traefik/issues/10458
I'll close this issue, since there is nothing to do on the Helm Chart FTM.
Feel free to re-open it if you see something that can be done on this topic.

Great, many thanks for the ticket you created

authors: mloiseleur mossroy

repo: traefik/traefik-helm-chart


text:
Unable to use additionalServices to setup internal loadbalancer on AKS

Welcome!

[X] Yes, I've searched similar issues on GitHub and didn't find any.
[X] Yes, I've searched similar issues on the Traefik community forum and didn't find any.

What version of the Traefik's Helm Chart are you using?
28.3.0
What version of Traefik are you using?
3.0.2
What did you do?
I have edited the values.yaml to use additionalServices. I intend to use AKS internal loadbalancer.
service:
  enabled: true
  single: true
  type: LoadBalancer
  annotations: {}
  annotationsTCP: {}
  annotationsUDP: {}
  labels: {}
  spec: {}
  loadBalancerSourceRanges: []
  externalIPs: []

  # My Changes
  additionalServices:
    internal:
      type: LoadBalancer
      annotations:
        service.beta.kubernetes.io/azure-load-balancer-internal: "true"

All other values in the file are untouched
It should have created an internal load balancer in azure
What did you see instead?
It shows an error
$ helm upgrade --install traefik traefik/traefik -f values.yaml --version 28.3.0

Error: UPGRADE FAILED: execution error at (traefik/templates/service.yaml:34:6): You need to expose at least one port or set enabled=false to service

What is your environment & configuration?
macOS 14.3.1
Helm: version.BuildInfo{Version:"v3.15.2", GitCommit:"1a500d5625419a524fdae4b33de351cc4f58ec35", GitTreeState:"clean", GoVersion:"go1.22.4"}
Additional Information
Not sure if it is a bug or I am doing something wrong. I am currently using chart version 23.0.1 on prod and it works perfectly. 28.3.0 has problems. I have read the breaking changes and applied the breaking changes CRD's accordingly.

The error message says:

You need to expose at least one port or set enabled=false to service

And that's right. As you can see in EXAMPLES.md, you have to specify in ports: section which one you want to expose on this service.
Does that answer your question ?

@arthar360 I've opened a PR to improve error message (#1104). Wdyt ?

Thanks a lot, The example helped to fix the problem. So now we need to expose services individually to the additionalServices and that was the missing part.
In the previous chart version 23.0.1 I had this config
ports:
  app1:
    port: 8080
    expose: true

  app2:
    port: 8081
    expose: true

service:
  enabled: true
  single: true
  type: LoadBalancer
  internal:
    type: LoadBalancer
    annotations:
      service.beta.kubernetes.io/azure-load-balancer-internal: "true"
      service.beta.kubernetes.io/azure-load-balancer-ipv4: 192.168.0.5

This would create 2 loadBalancers. Both of them used to have same ports without exposing ports individually.
In the new config I have to add
ports:
  app1:
    port: 8080
    expose:
      default: true # For Public
      internal: true # For private

  app2:
    port: 8081
    expose:
      default: true # For Public
      internal: true # For private

This works as expected.
Is there a way to expose all defined ports to default and additional services? It will save repeating internal: true # For private for each port.

Is there a way to expose all defined ports to default and additional services? It will save repeating internal: true # For private for each port.

I'm not aware of it. Feel free to open a PR if you need it.

This does not work for me
ports:   internal80:     expose:       internal: true     port: 80     redirectTo:       port: internal443   internal443:     expose:       internal: true     port: 443   web:     redirectTo:       port: websecure
service:   additionalServices:     internal:       enabled: true       annotations:         service.beta.kubernetes.io/azure-load-balancer-internal: "true"       labels:         traefik-service-label: internal
funny enough the lb changes the port to 443 and 80 but the chart update fails and reverts back to 9000

I got it working.
Here is the answer for users looking for the solution to this issue
ports:
  web:
    expose:
      internal: true
      default: true
    redirectTo:
      port: websecure
  websecure:
    expose:
      internal: true
      default:  true

service:
  additionalServices:
    internal:
      enabled: true
      annotations:
        service.beta.kubernetes.io/azure-load-balancer-internal: "true"
      labels:
        traefik-service-label: internal

authors: arthar360 bronhy mloiseleur


text:
helm chart should support protocol field while configuring traefik service by ports

Hello,
I wanted to terminate tls connection on AWS ELB using aws certificate manager. So I added annotations to the traefik service to add certificate arn into load balancer. It added tls certificates successfully and created two listeners in aws elb. One for port 80(web) and another for 443(websecure) but listener protocol for web had been changed to 'SSL' whose port is 80. So it was not forwarding my regular HTTP traffic to the traefik service. So I just changed the listener protocol from 'SSL' to 'TCP' and it worked.
So I think that helm chart should support protocol configuration for traefik ports so that SSL protocol can be only bound to 443 port in the AWS ELB.
Let me know If I was making any mistake.
Thanks.

just changed the listener protocol from 'SSL' to 'TCP' and it worked.

sorry don't understand; where did you change this?

I changed listener protocol into classic load balancer configuration via AWS console.

Hi, I had the same problem for a long long time since v1.7 and figured that out that Kubernetes create an ELB and set Health check port to first ports that defined in service and as it's sort base on the alphabet, it will set to the web.
Is there a chance to define order using helm?
for example:
spec:
  ports:
    - name: web
      protocol: TCP
      port: 80
      targetPort: web
      nodePort: 31502
    - name: websecure
      protocol: TCP
      port: 443
      targetPort: websecure
      nodePort: 31714

should be:
spec:
  ports:
    - name: websecure
      protocol: TCP
      port: 443
      targetPort: websecure
      nodePort: 31714
    - name: web
      protocol: TCP
      port: 80
      targetPort: web
      nodePort: 31502

if you wanna set service.beta.kubernetes.io/aws-load-balancer-backend-protocol: https in service annotations. or it will be failed.

I just wanted to add, I am not sure if it is the exact same issue, but  I have a similar issue where setting annotations on the traefik service for elb does not work properly. You end up with a elb deployed as expected, but with listeners for 80 and 443 but both are HTTP for "Load Balancer Protocol", which is wrong since 443 should be HTTPS and the ACM cert should be attached to that listener.
Note: I am also using the helm chart from https://github.com/traefik/traefik-helm-chart, so my snippet looked like
service:
  enabled: true
  type: "LoadBalancer"
  annotations:
    external-dns.alpha.kubernetes.io/hostname: "traefik.example.com"
    service.beta.kubernetes.io/aws-load-balancer-ssl-cert: "$ARNOFMYCERT"
    service.beta.kubernetes.io/aws-load-balancer-backend-protocol: "http"
    service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "https"
    service.beta.kubernetes.io/aws-load-balancer-connection-draining-enabled: "true"
    service.beta.kubernetes.io/aws-load-balancer-connection-draining-timeout: "60"
ports:
  web:
    port: 8000
    expose: true
    exposedPort: 80
    protocol: TCP
  websecure:
    port: 8443
    expose: true
    exposedPort: 443
    protocol: TCP

What I found is changing the web and websecure to http and https respectively seems to solve this issue. Not sure if the issue I am running across needs some docs to make it clear or if there is something else that needs to be done to address.
service:
  enabled: true
  type: "LoadBalancer"
  annotations:
    external-dns.alpha.kubernetes.io/hostname: "traefik.example.com"
    service.beta.kubernetes.io/aws-load-balancer-ssl-cert: "$ARNOFMYCERT"
    service.beta.kubernetes.io/aws-load-balancer-backend-protocol: "http"
    service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "https"
    service.beta.kubernetes.io/aws-load-balancer-connection-draining-enabled: "true"
    service.beta.kubernetes.io/aws-load-balancer-connection-draining-timeout: "60"
ports:
  http:
    port: 8000
    expose: true
    exposedPort: 80
    protocol: TCP
  https:
    port: 8443
    expose: true
    exposedPort: 443
    protocol: TCP

Hello,
You may follow this blog article on how to set up Traefik on AWS.

authors: Mhs-220 dennisroche haghabozorgi mloiseleur viveksatasiya


text:
Install fails on microk8s fresh install

Welcome!

[X] Yes, I've searched similar issues on GitHub and didn't find any.
[X] Yes, I've searched similar issues on the Traefik community forum and didn't find any.

What version of the Traefik's Helm Chart are you using?
32.1.0
What version of Traefik are you using?
2.10.1
What did you do?
Attempting to install traefik on a microk8s cluster:
helm install -n traefik traefik traefik/traefik --debug

What did you see instead?
Yields the following error:
install.go:200: [debug] Original chart version: ""
install.go:217: [debug] CHART PATH: C:\Users\Daniel\AppData\Local\Temp\helm\repository\traefik-23.1.0.tgz

client.go:134: [debug] creating 1 resource(s)
install.go:160: [debug] CRD ingressroutes.traefik.containo.us is already present. Skipping.
client.go:134: [debug] creating 1 resource(s)
install.go:160: [debug] CRD ingressroutetcps.traefik.containo.us is already present. Skipping.
client.go:134: [debug] creating 1 resource(s)
install.go:160: [debug] CRD ingressrouteudps.traefik.containo.us is already present. Skipping.
client.go:134: [debug] creating 1 resource(s)
install.go:160: [debug] CRD middlewares.traefik.containo.us is already present. Skipping.
client.go:134: [debug] creating 1 resource(s)
install.go:160: [debug] CRD middlewaretcps.traefik.containo.us is already present. Skipping.
client.go:134: [debug] creating 1 resource(s)
install.go:160: [debug] CRD serverstransports.traefik.containo.us is already present. Skipping.
client.go:134: [debug] creating 1 resource(s)
install.go:160: [debug] CRD tlsoptions.traefik.containo.us is already present. Skipping.
client.go:134: [debug] creating 1 resource(s)
install.go:160: [debug] CRD tlsstores.traefik.containo.us is already present. Skipping.
client.go:134: [debug] creating 1 resource(s)
install.go:160: [debug] CRD traefikservices.traefik.containo.us is already present. Skipping.
client.go:134: [debug] creating 1 resource(s)
install.go:160: [debug] CRD ingressroutes.traefik.io is already present. Skipping.
client.go:134: [debug] creating 1 resource(s)
install.go:160: [debug] CRD ingressroutetcps.traefik.io is already present. Skipping.
client.go:134: [debug] creating 1 resource(s)
install.go:160: [debug] CRD ingressrouteudps.traefik.io is already present. Skipping.
client.go:134: [debug] creating 1 resource(s)
install.go:160: [debug] CRD middlewares.traefik.io is already present. Skipping.
client.go:134: [debug] creating 1 resource(s)
install.go:160: [debug] CRD middlewaretcps.traefik.io is already present. Skipping.
client.go:134: [debug] creating 1 resource(s)
install.go:160: [debug] CRD serverstransports.traefik.io is already present. Skipping.
client.go:134: [debug] creating 1 resource(s)
install.go:160: [debug] CRD tlsoptions.traefik.io is already present. Skipping.
client.go:134: [debug] creating 1 resource(s)
install.go:160: [debug] CRD tlsstores.traefik.io is already present. Skipping.
client.go:134: [debug] creating 1 resource(s)
install.go:160: [debug] CRD traefikservices.traefik.io is already present. Skipping.
Error: INSTALLATION FAILED: unable to build kubernetes objects from release manifest: error validating "": error validating data: invalid character '<' looking for beginning of value
helm.go:84: [debug] error validating "": error validating data: invalid character '<' looking for beginning of value
helm.sh/helm/v3/pkg/kube.scrubValidationError
        helm.sh/helm/v3/pkg/kube/client.go:809
helm.sh/helm/v3/pkg/kube.(*Client).Build
        helm.sh/helm/v3/pkg/kube/client.go:350
helm.sh/helm/v3/pkg/action.(*Install).RunWithContext
        helm.sh/helm/v3/pkg/action/install.go:300
main.runInstall
        helm.sh/helm/v3/cmd/helm/install.go:286
main.newInstallCmd.func2
        helm.sh/helm/v3/cmd/helm/install.go:145
github.com/spf13/cobra.(*Command).execute
        github.com/spf13/cobra@v1.6.1/command.go:916
github.com/spf13/cobra.(*Command).ExecuteC
        github.com/spf13/cobra@v1.6.1/command.go:1044
github.com/spf13/cobra.(*Command).Execute
        github.com/spf13/cobra@v1.6.1/command.go:968
main.main
        helm.sh/helm/v3/cmd/helm/helm.go:83
runtime.main
        runtime/proc.go:250
runtime.goexit
        runtime/asm_amd64.s:1598
unable to build kubernetes objects from release manifest
helm.sh/helm/v3/pkg/action.(*Install).RunWithContext
        helm.sh/helm/v3/pkg/action/install.go:302
main.runInstall
        helm.sh/helm/v3/cmd/helm/install.go:286
main.newInstallCmd.func2
        helm.sh/helm/v3/cmd/helm/install.go:145
github.com/spf13/cobra.(*Command).execute
        github.com/spf13/cobra@v1.6.1/command.go:916
github.com/spf13/cobra.(*Command).ExecuteC
        github.com/spf13/cobra@v1.6.1/command.go:1044
github.com/spf13/cobra.(*Command).Execute
        github.com/spf13/cobra@v1.6.1/command.go:968
main.main
        helm.sh/helm/v3/cmd/helm/helm.go:83
runtime.main
        runtime/proc.go:250
runtime.goexit
        runtime/asm_amd64.s:1598
INSTALLATION FAILED
main.newInstallCmd.func2
        helm.sh/helm/v3/cmd/helm/install.go:147
github.com/spf13/cobra.(*Command).execute
        github.com/spf13/cobra@v1.6.1/command.go:916
github.com/spf13/cobra.(*Command).ExecuteC
        github.com/spf13/cobra@v1.6.1/command.go:1044
github.com/spf13/cobra.(*Command).Execute
        github.com/spf13/cobra@v1.6.1/command.go:968
main.main
        helm.sh/helm/v3/cmd/helm/helm.go:83
runtime.main
        runtime/proc.go:250
runtime.goexit
        runtime/asm_amd64.s:1598

Multiple resets of the cluster, still same error every time.
What is your environment & configuration?
Kubernetes Version:
Client Version: version.Info{Major:"1", Minor:"27", GitVersion:"v1.27.2", GitCommit:"7f6f68fdabc4df88cfea2dcf9a19b2b830f1e647", GitTreeState:"clean", BuildDate:"2023-05-17T14:20:07Z", GoVersi
on:"go1.20.4", Compiler:"gc", Platform:"windows/amd64"}
Kustomize Version: v5.0.1
Server Version: version.Info{Major:"1", Minor:"27", GitVersion:"v1.27.2", GitCommit:"7f6f68fdabc4df88cfea2dcf9a19b2b830f1e647", GitTreeState:"clean", BuildDate:"2023-05-28T05:42:25Z", GoVersi
on:"go1.20.4", Compiler:"gc", Platform:"linux/amd64"}

Helm Version:
version.BuildInfo{Version:"v3.12.0", GitCommit:"c9f554d75773799f72ceef38c51210f1842a1dea", GitTreeState:"clean", GoVersion:"go1.20.3"}

Additional Information
I'm not exactly sure where to even start debugging error validating "": error validating data: invalid character '<' looking for beginning of value. There's no filename, nor anywhere obvious to look at. Am I missing something major here?
I can provide additional information if requested.

Just a heads up: I'm still trying to debug what went wrong, but after downgrading helm cli client to 3.9.2, the install worked smoothly.


text:
dnsChallenge with Netcup requires extended "delayBeforeCheck"

Welcome!

[x] Yes, I've searched similar issues on GitHub and didn't find any.
[x] Yes, I've searched similar issues on the Traefik community forum and didn't find any.

What did you expect to see?
When setting up Traefik with Let's Encrypt on a Netcup server, I encountered issues with the DNS-01 challenge. The challenge often failed because Netcup's DNS propagation times are unusually long. This issue is also discussed in other projects, such as the certbot-dns-netcup plugin, where users noted that Netcup's DNS zones reload every 10 minutes, with propagation occasionally taking up to 20 minutes.
To address this, it is necessary to configure the delayBeforeCheck parameter with a sufficiently long delay. Based on my experience and the feedback in related projects, a value of 630 or even 900 seconds is advisable.
To help other users avoid this issue, I suggest adding a note to the ACME documentation that explicitly recommends increasing the delayBeforeCheck parameter when using Netcup as the DNS provider.
This small addition to the documentation would save users significant time and frustration when setting up Traefik with Netcup.

Hello,
if your problem is related to propagation it is better to increase NETCUP_PROPAGATION_TIMEOUT and NETCUP_POLLING_INTERVAL.
https://go-acme.github.io/lego/dns/netcup/index.html
delayBeforeCheck is mainly for zones that are created but not updated.

Hey ldez, thanks for looking into this!
You are absolutely right, that seems like a far better solution. For me it wasn't clear that this "additional configuration" is needed to get the dnsChallenge working in a default setup scenario on Netcup servers.
Thank you for fixing this issue so fast.

authors: felixbaumgaertner ldez

repo: traefik/traefik