text:
Typing Doesn't Trigger Search

On the examples page for 3.5.2, if you use the tab key to give a select box focus and start typing, a search of the options begins, as desired.
On the examples page for 4.0, if you do the same thing, nothing happens. You are required to actually click the dropdown in order for searching to begin.
This is no good - I want my users to be able to tab through a form and, when they reach a dropdown, to be able to just start typing to begin searching, and use the enter key to make a selection. In other words, I don't want to users to have to use the mouse at all if they don't want to, which with 3.5.2 is possible, but with 4.0 is not.

I agree, this appears to be a breaking Ux change in 4.0. I would also include the change in behavior to the clear button (x) as a breaking Ux change in 4.0. It now displays the drop down automatically when clearing the selection.
Any suggestions on work-around(s) for these issues ?

This was an intentional change, and in order to understand why we changed it you need to understand how it was done before.
We started off doing this by listening to key events when the <div> was focused, and then repeating the character into the text box. This had two unfortunate side effects:

Not all browsers (cough Internet Explorer) handled key events the same way, and it was difficult to consistently get the typed in character.
Moving that typed character over to the search box meant moving the keyboard focus over and ensuring that the character wasn't highlighted. This proved to be more difficult than it should have, and both IE and Firefox had a tendency to lose the first character.

So we decided to make the focusing element an <input /> box, and have it be hidden out of sight. This fixed the IE issues, and we could consistently get the character typed (just get the .value). Eventually we were able to alleviate the second issue, but we ended up adding in a few new side effects:

Because were were automatically focusing the keyboard, any interaction with Select2 on a mobile device would trigger the on-screen keyboard.
We created an accessibility problem because there was no indication of what the focusing <input /> was actually for. And some screen readers actually ignored it, so it was impossible to navigate Select2 through a keyboard.

And that's why we added a shouldFocusInput option in Select2 3.x that disables the automatic focusing of the input if the user is on a mobile device and there isn't a visible search box. While that worked in a way, it was never considered anything more than a hack.
And that's why we no longer try to handle that case magically in Select2 4.0.
If we took the easy route and automatically opened the dropdown when we detected a keypress, that would work some of the time. But we would run into exactly the same issue that we originally hit. It would also block any possibility of us getting the searching to work when the dropdown is not open (so you can quickly select things), which is far out on our roadmap.
So we made the decision to not support it in Select2 4.0. You can still open the dropdown by hitting [space] or [enter], which is how it works in a normal <select>.

Thanks for the details.
Ed
On Sun, Apr 26, 2015 at 5:01 PM, Kevin Brown notifications@github.com
wrote:

This was an intentional change, and in order to understand why we
changed it you need to understand how it was done before.
We started off doing this by listening to key events when the  was
focused, and then repeating the character into the text box. This had two
unfortunate side effects:

Not all browsers (cough Internet Explorer) handled key events the
same way, and it was difficult to consistently get the typed in character.
Moving that typed character over to the search box meant moving the
keyboard focus over and ensuring that the character wasn't highlighted.
This proved to be more difficult than it should have, and both IE and
Firefox had a tendency to lose the first character.

So we decided to make the focusing element an  box, and have it
be hidden out of sight. This fixed the IE issues, and we could consistently
get the character typed (just get the .value). Eventually we were able to
alleviate the second issue, but we ended up adding in a few new side
effects:

Because were were automatically focusing the keyboard, any
interaction with Select2 on a mobile device would trigger the on-screen
keyboard.
We created an accessibility problem because there was no indication
of what the focusing  was actually for. And some screen
readers actually ignored it, so it was impossible to navigate Select2
through a keyboard.

And that's why we added a shouldFocusInput option in Select2 3.x that
disables the automatic focusing of the input if the user is on a mobile
device and there isn't a visible search box. While that worked in a way, it
was never considered anything more than a hack.
And that's why we no longer try to handle that case magically in Select2
4.0.
If we took the easy route and automatically opened the dropdown when we
detected a keypress, that would work some of the time. But we would run
into exactly the same issue that we originally hit. It would also block
any possibility of us getting the searching to work when the dropdown is
not open (so you can quickly select things), which is far out on our
roadmap.
So we made the decision to not support it in Select2 4.0. You can still
open the dropdown by hitting [space] or [enter], which is how it works in a
normal .
—
Reply to this email directly or view it on GitHub
https://github.com/select2/select2/issues/3279#issuecomment-96450069.

I can partially understand this reasoning for the regular select, but for the multiselect it's a pretty bad user experience. The multiselect looks visually like a regular input, and when you tab to it, it's not at all clear that you're dealing with a mutliselect, so pressing the spacebar is not intuitive.

I agree with @philipwalton. The select looks like an string input and should therefore act in a similar way. If it's confusing developers using it, chances are it's also going to their users too. With that said, I can understand it's a difficult issue, but that just doesn't make it resolved just by stating why the desired behaviour was unable to be achieved. Leaving the issue open would also encourage pull requests.

As noted in https://github.com/select2/select2/issues/3415 and on the mailing list, I'm open to the idea of automatically focusing the search on a multiple select when the selection area is focused. I think this would fix the major usability problem (the multiple select looks like a search box but doesn't act like one), but it would still leave the difference in behaviour between the multiple and single select.

Right now there are two UX issues that are a result of this in 4.0.0:

Any letters typed in a focused by closed dropdown do not filter the results at all.
This same action also does not open the dropdown.

This also increases the minimum number of key presses to select an item in 4.0.0 to 5, which is up from 4 in 3.5.2 and 3 in a native select.
Here are the key sequences that I've been using to measure this UX issue in 4.0.0. All of these are done using Chromium 43 on Ubuntu 14.04.

Default <select> - never opening the dropdown (optimal)
http://jsbin.com/kawoxenofa/1/edit?html,js,output

Place focus on the text box
Press tab to focus on the select
Type the search term ("g")

During this time the browser finds the first element starting with "g" and "selects" it

Press the tab key to move focus on to the next element

Default <select> - with opening the dropdown
http://jsbin.com/kawoxenofa/1/edit?html,js,output

Place focus on the text box
Press tab to focus on the select
Press the "enter" or "space" key to open the select
Type "g" to get the first result starting with "g"
Press "enter" to close the dropdown
Press the tab key to move the focus on to the next element

Select2 4.0.0
http://jsbin.com/kawoxenofa/3/edit?html,js,output

Place focus on the text box
Press tab to focus on Select2
Press the "enter" or "space" key to open the Select2
Type the search term ("g")
Press "enter" to select the result
Press the tab key to move the focus on to the next element

Select2 3.5.2
http://jsbin.com/kawoxenofa/2/edit?html,js,output

Place focus on the text box
Press tab to focus on Select2
Type the search term ("g")

The dropdown is automatically opened
Results are filtered by "g"

Press "enter" to select the result
Press the tab key to move the focus on to the next element

Is there a fix for this? This is kind of a dealbreaker for me when using the multiselect. You should be able to tab to it and start typing.

Is there stopgap fix for this?

If you are interested in using the unstable builds (I guess you could say "not released", they're relatively stable), the fix for multiple selects landed yesterday in https://github.com/select2/select2/commit/02cca7baa7b78e73cdcf393172ee3a54be387167.

Thanks for the tip. I tried it, but the copy from today isn't working in IE 9 (the combo box isn't being hidden), so I'll just keep an eye out for the next stable release.

Does anybody have an idea when is v4.0.1 coming? Not a huge fan of monkeypatches.

Does anybody have an idea when is v4.0.1 coming? Not a huge fan of monkeypatches.

We're aiming to release 3.5.3 (probably the last of the 3.5.x line) this weekend. Then we can start focusing on 4.0.1, which will be released when this milestone has no open tickets.

+1. It is an important accessibility feature. I proposed a workaround here.

+1

+1

+1

+1

+1

+1

@select2 any news on this?

@select2 any news on this?

It's fixed for multiple selects, that patch landed in 4.0.1. For single selects, no "good" solution has been found yet, but we're open to ideas.

Opening the search box on the keypress event would be better than nothing.
http://jsfiddle.net/n2en77vt/
Feel free to improve.
It may not be an ideal solution in all case, but at least when doing tab, start typing, you see what is done and just have to type enter to validate the selection.
For me, it's sufficient.
Maybe it could be possible, on a keypress, to :

open the search box
add the key pressed to the search box (or maybe replace it if last key was typed more than ms ago)
trigger the search
select first result
close the search box

and, such, having the same behaviour as a classic select.

Not sure if it's of interest to anyone, but I hacked a solution using jquery. Note, this assumes you have a select2 class added to the select element:
 $(document).on('focus', 'span.select2', function () {
  $(this).prev('select:not([multiple])').select2('open');
 });

@jgeurts : Open on focus is interesting, but IMHO it's too much.
Let's consider a form with input / select 2 / input, if I press 3 times Tab, it won't do what I think it will do.
But I suppose it's a matter of taste.
See my answer above (and the fiddle) for opening the select2 only on a keypress.

@Yopai Timeout seems to be required
http://jsfiddle.net/9zmco28f/

I understand you had your reason for changing the default behavior, but we are using Select2 on a long-term project and need to provide existing users the UX they are used from 3.5.x (opening the select2 on keypress, without typing return first.).
IMO there should at least be an option to use the old select2 opening behavior for legacy projects.

+1

Current implementation seems to only allow search on single select when the dropdown is open AND there is a search box present. I'm regretting upgrading at this point. Not providing search on initial focus seems like a big deal. Would it be possible to track keypresses on the focus div and just append to an in-memory string, rather than changing focus to a DOM element, resetting the string after a reasonable timeout?

Would it be possible to track keypresses on the focus div and just append to an in-memory string, rather than changing focus to a DOM element, resetting the string after a reasonable timeout?

This doesn't work well with odd keyboards, non-English languages, and numeric keypads. See https://github.com/select2/select2/issues/3279#issuecomment-96450069.

So, the way I understand it, using an input as the focus element is the only (known) way to correctly capture the keyboard input on all keyboards, but it has 2 negative side effects... 1) it shows the keyboard on touch devices, and 2) it was not picked up by some screen readers. Is that a good summary?

@kevin-brown I'd really need a solution for this. Can you give specific requirements for how this needs to behave to be acceptable? Also, worth noting, at least on my iPhone 5, the mobile keyboard does display on tap under the current example (one of the issues against using an input as the focus element, i thought).

Below is a codepen showing my partial solution to the issue, using an adapter. The technique transfres focus from the $selection element to the $search element on keydown. This seems to correctly capture the input in the search box (which must be enabled for this to work). Since this doesn't change the initial focused element, I assume it will still be fine for screen readers. I have tested this in IE11, and recent versions of FF, Chrome and Safari (Mac).
http://codepen.io/jessehouchins/pen/rWZxwr

This is a crippling missing feature that has caused me to toss out Select2 as an option for my application.
I get that it is free and you are totally under no obligation to fix it, but I thought you might be interested in knowing that even though I would rather go with Select2, I can't.  Without the "closed" selection via typing and arrow keys that a normal select box (and so many other select replacements) fully support the difference in the user experience is just too jarring for most users.

OK, so Chosen did not work out for me so I was back to Select2.  I found a way to make it support typing in place for searching.  I only tested it for single select and YMMV.
Here is the code (typescript):
// At the class level:
inlineSearchString: string = '';
inlineSearchTimeoutId: any;

// In a setup somewhere
//+ Add the ability to just type in the item you want.
selectBox.keypress(event => {
    var key = event.which;
    if (key >= 32) {

        // If we don't get a keystroke after a bit, then we will reset the
        // inline filter so that they can start a new search.
        clearTimeout(this.inlineSearchTimeoutId);
        this.inlineSearchTimeoutId = setTimeout(() => {
            this.inlineSearchString = '';
        }, 750);

        let char = String.fromCharCode(key);
        let inlineSearch = this.inlineSearchString = this.inlineSearchString + char;
        let allOptions = originalSelect.find('option');
        // A filter of `option[value*='${char}']` was tried and it returned 0 results.
        // So a manual filter on the function was put in even though it is not as clean.
        let filteredList = allOptions.filter(function(index) {
            if (inlineSearch && this.value) {
                let optionMatchRegExp = new RegExp('^'
                                + inlineSearch.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), "i");
                let result = optionMatchRegExp.test(this.value);
                return result;
            } else {
                return false;
            }
        });

        let newValue = filteredList.first().val();
        if (newValue) {
            originalSelect.val(newValue);
            originalSelect.trigger('change');
        }
    }
});

In the above code, selectBox is the Select2 select box (the root span).  originalSelect is the element that is the actual <select> tag that you put in your code.
Here is a working fiddle: http://jsfiddle.net/Vaccano/L3gozrew/1/

This is how I solved the "open on keypress". Your solution will not work with AJAX.
    /*
     * An unfortunate restriction of Select2 v4 is that there is no backing <input> and it will
     * not open until you press enter or space.
     * https://github.com/select2/select2/issues/3279
     */
    // noinspection JSUnusedGlobalSymbols
    @HostListener('window:keydown', ['$event'])
    onKeyDown(ev: KeyboardEvent) {
        /* we're only interested when the open on keypress behavior is enabled */
        if (!this.openkeypress) {
            return;
        }
        /* quick test that it is a select2 element to not cause a performance drag */
        if ((<any>ev.target).className.indexOf('select2-selection') === -1) {
            return;
        }
        let $target = jQuery(ev.target).closest('.select2-container');
        if (!$target.length) {
            return;
        }
        /* not if it is already open */
        if ($target.hasClass('select2-container--open')) {
            return;
        }
        $target = $target.prev();
        /* check if it belongs to this component instance */
        if (!$target.length || !$target[0].isEqualNode(this.element[0])) {
            return;
        }
        if (ev.which >= 32) {
            this.element.select2('open');
            let $search = this.element.data('select2').dropdown.$search || this.element.data('select2').selection.$search;
            /* Safari does not have key */
            let key = ev.key ? ev.key : String.fromCharCode(ev.which);
            /* filter function keys such as "Meta" */
            if (key.length === 1) {
                $search.val(key);
            }
            // Timeout seems to be required for Blink
            setTimeout(() => {
                $search.get(0).setSelectionRange(1, 1);
                $search.trigger('keyup');
            }, 0);
        }
    }

+1

I started with the code from @achimha and ended up with this:
$('.select2-selection').keydown((ev) => {
  if (ev.which < 32)
    return;

  var target = jQuery(ev.target).closest('.select2-container');
  if (!target.length)
    return;

  target = target.prev();
  target.select2('open');

  var search = target.data('select2').dropdown.$search ||
               target.data('select2').selection.$search;

  /* Safari does not have key */
  var key = ev.key ? ev.key : String.fromCharCode(ev.which);

  /* filter function keys such as "Meta" */
  if (key.length === 1)
    search.val(search.val() + key);
});

It works even when you type really fast :)

So to be clear, no official support for this feature is coming for single-select? Any news on this?

Native dropdowns will search for a value when focused and a key is pressed. I don't understand why that functionality is not at least supported here.

+1

I modified the library with the following (borrowing from @turekl):
// Line #5368
this.on('keypress', function (evt) {
  var key = evt.which;

  if (self.isOpen()) {
    if (key === KEYS.ESC || key === KEYS.TAB ||
        (key === KEYS.UP && evt.altKey)) {
      self.close();

      evt.preventDefault();
    } else if (key === KEYS.ENTER) {
      self.trigger('results:select', {});

      evt.preventDefault();
    } else if ((key === KEYS.SPACE && evt.ctrlKey)) {
      self.trigger('results:toggle', {});

      evt.preventDefault();
    } else if (key === KEYS.UP) {
      self.trigger('results:previous', {});

      evt.preventDefault();
    } else if (key === KEYS.DOWN) {
      self.trigger('results:next', {});

      evt.preventDefault();
    }
  } else {
    if (key === KEYS.ENTER || key === KEYS.SPACE ||
        (key === KEYS.DOWN && evt.altKey)) {
      self.open();

      evt.preventDefault();
    } else {
      if (key === KEYS.SHIFT || key === KEYS.CTRL || key === KEYS.ALT || key === KEYS.TAB)
        return;

      target = self.$container;

      if (!target.length)
        return;

      target = target.prev();
      self.open();

      var search = target.data('select2').dropdown.$search ||
                   target.data('select2').selection.$search;

      /* Safari does not have key */
      var key = evt.key ? evt.key : String.fromCharCode(evt.which);

      /* filter function keys such as "Meta" */
      if (key.length === 1)
        search.val(search.val() + key);
    }
  }
});

Seems like a simple fix to the library, not sure what the issue is. Any improvements are welcome.

My original fix stopped working in Firefox on Linux (it's still OK on Windows). I found another, even simpler solution, only setting focus to the search field:
$('.select2-selection').keydown((ev) => {
  if (ev.which < 32)
    return;

  var target = jQuery(ev.target).closest('.select2-container');
  if (!target.length)
    return;

  target = target.prev();
  target.select2('open');

  var search = target.data('select2').dropdown.$search ||
               target.data('select2').selection.$search;

  search.focus();
});

This is still an issue as far as I know.  It is stale only because there is no movement on any kind of fix.

Just done a migration of a project which required updating our Select2 library.
To which, I was surpised to find tabbing into the select2 field and typing didn't work naturally like it did in 3.*.
A number of workarounds on this long thread I can see here - each with their own use-case. I'd agree with an eariler poster, would of been great if there was a legacy option to allow this behaviour.
Although I guess not many people are upgrading from version 3 to 4 these days as was before.

See also #5993

authors: Davidiusdadi MackieeE Pharylon Seiya82 Vaccano Yopai aaj achimha alvarotrigo andersonbiz boblail eobeda harish0507 iflow jessehouchins jgeurts kalinchuk kevin-brown lucascaton njakobsen petermikitsh philipstratford philipwalton pingwiniasty pluggy rubendroogh scottconnerly shoe788 tedliang turekl xeruf


text:
Select 2 language not working on 4.0.3

Prerequisites

[ ] I have searched for similar issues in both open and closed tickets and cannot find a duplicate
[x ] The issue still exists against the latest master branch of Select2
[ ] This is not a usage question (Those should be directed to the community)
[ ] I have attempted to find the simplest possible steps to reproduce the issue
[ ] I have included a failing test as a pull request (Optional)

Steps to reproduce the issue
See the fiddle
Expected behavior and actual behavior
Should be in french
Libraries

Select2 version: 4.0.3

You should include the translate file after select2.min.js
This doesn't work :
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/js/i18n/fr.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/js/select2.full.min.js"></script>

However, this work perfectly :
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/js/select2.full.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/js/i18n/fr.js"></script>

See your example with only this two ressources inverted : https://jsfiddle.net/hov44u55/10/

This is documented here as well: https://select2.org/i18n#language-files

Although the documentation states the way the translation files should be loaded (through a textual description), I think an improvement to the current documentation could be to show an example using some HTML.
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.X.X/js/select2.full.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.X.X/js/i18n/fr.js"></script>

source: gharchive/issue

authors: DVD27 alexweissman meyacine ohvitorino

license: MIT

license_type: permissive

license_source: github-api


text:
Accessibility issue with select2 dropdown

In the Woo Commerce checkout form the State drop down field is reading as follows in screen readers:
With JAWS 18: State drop down box is announced as “Edit Combo Collapsed”
With NVDA: State drop down box announced as “Combo Box Collapsed, Editable”.
Can this be refactored to make that field accessible for the blind and visually-impaired.

Is this an issue with WooCommerce, or Select2?

Select2 issue
--
Bob Kamp
I Can Do That Productions, Inc.
27 West 20th Street, Suite 1005
New York, NY 10011
(212) 741-6119
fax: (212) 741-2824
From:  Alex Weissman notifications@github.com
Reply-To:  select2/select2
<reply+01c041403ef6b6dfe7d835a779ff0c0d3a6919a687d7803e92cf00000001164aaef39
2a169ce0e4c1b87@reply.github.com>
Date:  Thursday, December 14, 2017 at 4:28 PM
To:  select2/select2 select2@noreply.github.com
Cc:  Bob Kamp bobkamp@icandothat.com, Author author@noreply.github.com
Subject:  Re: [select2/select2] Accessibility issue with select2 dropdown
(#4978)
Is this an issue with WooCommerce, or Select2?

You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/select2/select2/issues/4978#issuecomment-351840988 , or
mute the thread
<https://github.com/notifications/unsubscribe-auth/AcBBQBd2rNKFTDlJuk5gx7Ufq
1JO39Mfks5tAZLzgaJpZM4OK92H> .
{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4b
b","name":"GitHub"},"entity":{"external_key":"github/select2/select2","title
":"select2/select2","subtitle":"GitHub
repository","main_image_url":"https://cloud.githubusercontent.com/assets/143
418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"h
ttps://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6
-9aed-b52498112777.png","action":{"name":"Open in
GitHub","url":"https://github.com/select2/select2"}},"updates":{"snippets":[
{"icon":"PERSON","message":"@alexweissman in #4978: Is this an issue with
WooCommerce, or Select2?"}],"action":{"name":"View
Issue","url":"https://github.com/select2/select2/issues/4978#issuecomment-35
1840988"}}}

Ok, can you please describe the expected behavior?

Woocommerce is using select2 for the State drop down field in their checkout
form.
The field is reading as follows in screen readers:
With JAWS 18: State drop down box is announced as ³Edit Combo Collapsed²
With NVDA: State drop down box announced as ³Combo Box Collapsed, Editable².
We need to make that field accessible for the blind and visually-impaired.
Is there a way to edit that alt tag or ID, so it states, "State Drop Down
Field²?
Also, as the user down-arrows through the state list, the state names need
to be announced.
--
Bob Kamp
I Can Do That Productions, Inc.
27 West 20th Street, Suite 1005
New York, NY 10011
(212) 741-6119
fax: (212) 741-2824
From:  Alex Weissman notifications@github.com
Reply-To:  select2/select2
<reply+01c04140b7c9b27b1c778caf622dcb3d654ced8691bc456e92cf00000001164ab7679
2a169ce0e4c1b87@reply.github.com>
Date:  Thursday, December 14, 2017 at 5:04 PM
To:  select2/select2 select2@noreply.github.com
Cc:  Bob Kamp bobkamp@icandothat.com, Author author@noreply.github.com
Subject:  Re: [select2/select2] Accessibility issue with select2 dropdown
(#4978)
Ok, can you please describe the expected behavior?

You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/select2/select2/issues/4978#issuecomment-351849930 , or
mute the thread
<https://github.com/notifications/unsubscribe-auth/AcBBQH_j71nEyXzPzeQ8R9y7i
2d7b5liks5tAZtngaJpZM4OK92H> .
{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4b
b","name":"GitHub"},"entity":{"external_key":"github/select2/select2","title
":"select2/select2","subtitle":"GitHub
repository","main_image_url":"https://cloud.githubusercontent.com/assets/143
418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"h
ttps://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6
-9aed-b52498112777.png","action":{"name":"Open in
GitHub","url":"https://github.com/select2/select2"}},"updates":{"snippets":[
{"icon":"PERSON","message":"@alexweissman in #4978: Ok, can you please
describe the expected behavior?"}],"action":{"name":"View
Issue","url":"https://github.com/select2/select2/issues/4978#issuecomment-35
1849930"}}}

Sounds like maybe you just need a label with a suitable aria-labelledby attribute on your Select2 control?

Yes, that should work, but currently we can¹t add the label to the field.
Bob Kamp
I Can Do That Productions, Inc.
27 West 20th Street, Suite 1005
New York, NY 10011
(212) 741-6119
fax: (212) 741-2824
From:  Alex Weissman notifications@github.com
Reply-To:  select2/select2
<reply+01c04140c8b7b2dae210168fdba6429399a38115166bce6992cf00000001164acd319
2a169ce0e4c1b87@reply.github.com>
Date:  Thursday, December 14, 2017 at 6:37 PM
To:  select2/select2 select2@noreply.github.com
Cc:  Bob Kamp bobkamp@icandothat.com, Author author@noreply.github.com
Subject:  Re: [select2/select2] Accessibility issue with select2 dropdown
(#4978)
Sounds like maybe you just need a label with a suitable aria-labelledby
attribute
<https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/forms/Basic
_form_hints>  on your Select2 control?

You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/select2/select2/issues/4978#issuecomment-351869063 , or
mute the thread
<https://github.com/notifications/unsubscribe-auth/AcBBQIESl8NJSTxZ2UggE5WSl
BTqnKBTks5tAbExgaJpZM4OK92H> .
{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4b
b","name":"GitHub"},"entity":{"external_key":"github/select2/select2","title
":"select2/select2","subtitle":"GitHub
repository","main_image_url":"https://cloud.githubusercontent.com/assets/143
418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"h
ttps://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6
-9aed-b52498112777.png","action":{"name":"Open in
GitHub","url":"https://github.com/select2/select2"}},"updates":{"snippets":[
{"icon":"PERSON","message":"@alexweissman in #4978: Sounds like maybe you
just need a label with a suitable [aria-labelledby
attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/f
orms/Basic_form_hints) on your Select2 control?"}],"action":{"name":"View
Issue","url":"https://github.com/select2/select2/issues/4978#issuecomment-35
1869063"}}}

Ok.  I'm not sure if this is really a bug/feature request for Select2 at this point - seems more like a usage question.  So, we should move the discussion over to the forums.

authors: alexweissman bobkamp


text:
Search single quote

STOP!
Before you open an issue:

Make sure that your issue is a BUG or FEATURE REQUEST.  General usage and troubleshooting questions should be directed to the forums or Stack Overflow.  Issues asking for general support WILL BE CLOSED automatically.
Search the current issues, both open and closed, for a similar issue. If the bug is still present but the relevant issue has been closed, you may ask us to reopen the issue. Duplicate issues will be closed automatically.
Make sure that you are using the latest stable version of Select2 (see the release history). Old minor/patch versions will not be supported.

If you are CERTAIN that it is appropriate to open a new issue, you must:

Create and link to a minimal, complete, and verifiable example by cloning our JSBin template. Code dumps, zip files, etc are NOT acceptable.
Any additional code snippets should be formatted using Markdown code fences and properly indented. Poorly formatted code is difficult to read and reflects badly on you as a programmer.
Include relevant screenshots or animations, if possible. Drag your screenshots directly into this text box. They will automatically be uploaded and the Markdown to display them will be generated.  Avoid third-party image hosts, or links which require extra clicks to view the image.
If you are not conversationally proficient in English, do NOT just post a machine translation (e.g. Google Translate) to GitHub. Get help in crafting your question, either via the forums or in chat. If all else fails, you may post your bug report or feature request in your native language, with a machine translation below that. We will tag it with translation-needed so that others who speak your language can find it.
State the steps needed to reproduce the problem.
Mention your version of Select2, as well as the browser(s) and operating system(s) in which the problem occurs.
Clear out this placeholder text.

Issues that ignore these rules will be closed without further comment!

Hi!
We have a problem with select2. We use it to search for the name of a company (with postgresql) before creating a new one, everything works perfectly but when I search for a name with a single quote (') I get the message "The results could not be loaded". If we use apostrophe it works fine, but we have records created with single quote, so this is a problem.
Thank you and best regards.


text:
Because option "Sizzle" is enabled, the string representation for css elements does not work

The problem
When you try to return a string object for an element it works, but if you use option Configuration.selectorMode = SelectorMode.Sizzle; then string object always unknown
Details
Just use this code to check it
it is working fine, return string "css selector: input#text"
import com.codeborne.selenide.Selenide;
import org.junit.jupiter.api.Test;
import static com.codeborne.selenide.Selenide.element;

public class PapapapaTest {

    @Test
    void checkSizzleTest() {
        Selenide.open("https://yandex.ru/");
        System.out.println(element("input#text").toWebElement().toString());
    }
}

but it doesn't work, return string "unknown locator"
import com.codeborne.selenide.Configuration;
import com.codeborne.selenide.SelectorMode;
import com.codeborne.selenide.Selenide;
import org.junit.jupiter.api.Test;

import static com.codeborne.selenide.Selenide.element;

public class PapapapaTest {
    @Test
    void checkSizzleTest() {
        Configuration.selectorMode = SelectorMode.Sizzle;
        Selenide.open("https://yandex.ru/");
        System.out.println(element("input#text").toWebElement().toString());
    }
}

Also for XPath it works always
Tell us about your environment

Selenide Version:  5.16.1
Chrome\Firefox\IE Version: Version 86.0.4240.198 (Official Build) (x86_64)
OS Version: Mac os

@Catchermax Can you explain why it's needed to call $.toWebElement().toString()? I don't see how it can be useful. Why not just $.toString()?
And yes, it returns "unknown locator" because this element is loaded with Sizzle library, not css locator. JOKK.

It useful to create an interactive map of locators to estimate the amount of coverage of the ui part of the project

@Catchermax But the behaviour of WebElement.toString() is not defined. It potentially can return anything. You should find a better way to compose your interactive map.
Currently it returns [[ChromeDriver: chrome on MAC (d05fd53b66055b12601dba8f4d14058c)] -> css selector: :header]. Do you really find it useful?

@Catchermax Good news: I found a better way for you. :)
Just use method SelenideElement.getSearchCriteria():
Configuration.selectorMode = SelectorMode.Sizzle;
SelenideElement input = $(":header");
assertThat(input.toString()).isEqualTo("
Page with JQuery
");
assertThat(input.getSearchCriteria()).isEqualTo(":header");
assertThat(input.getWrappedElement().toString()).isEqualTo("[org.openqa.selenium.remote.RemoteWebElement@9953de0d -> unknown locator]");

authors: Catchermax asolntsev

repo: selenide/selenide


text:
Corrected formatting on the blocks page.

I read through the blocks page and there were a few formatting errors. I decided to fix those before looking in detail at the words/code as any changes I did add to in that regard would get lost in the formatting changes.

I suppose a quick discussion about line breaks might be in order as well. My screen is quite small so viewing the markdown and preview side by side makes the markdown look really janky. I removed the line breaks in this file so that I could read them better in markdown. But I guess it comes down to preference.
What are your thoughts here?

I use pandoc which unfortunately adds line breaks.  I was bothered by them at first but then when I edit the markdown in vscode and other "smart" markdown editors, they seem to ignore it.  I'm totally ok nuking them.

source: gharchive/pull-request


text:
OrderedCollection to gistTop?

Why is OrderedCollection in gistMeasure?  It is more generic than that.  It seems it should be in gistTop, same place as GistCollection.

Closed as part of #292, demodularize gist. No longer applicable.

repo: semanticarts/gist


text:
Curriculum Review: Day 2 Git Introduction

Prior Knowledge
Some basics of Git and some terminal commands
Content

The content looks really good. The gitflow diagrams are perfect and it really helps folks understand the concept of gitflow well. Also, the exercises are also perfect.

I have one small comment regarding merging the new branch and merge conflicts. Maybe you can also show how merging and pull requests work on the GitHub website. This will also make the comparison of the two branches and help resolve any merge conflicts.

Learning Goals
Overall, I think the slides + activities does a great job explaining the git fundamentals.

Thanks! I added a couple of slides showing manual merges here: https://drive.google.com/file/d/1ybHcKcaaamoUJ2DspuG-bpVbvsk5_CkV/view?usp=sharing
I think Github stuff is discussed more in BJ's Gitflow lesson plan so I'm not going to include it here.

authors: pranav-satheesh semaphoreP

repo: semaphoreP/codeastro


text:
Miguel Update rbac.md

PR created based on https://github.com/semaphoreci/semaphore/discussions/250

Thank you so much @mrosatii 🙏

Thanks @TomFern :)

authors: TomFern mrosatii

repo: semaphoreci/semaphore


text:
Fixed typo in release_notes.md

Description of the change: Fixed typo in unsub module release note.
Reason for the change:
Link to original source:

Closes #

Hello @Whatthefoxsays,Thanks again for the PR! We appreciate your contribution and look forward to                                              continued collaboration. Thanks!                                             Team SendGrid DX

authors: Whatthefoxsays thinkingserious

repo: sendgrid/docs


text:
Fix links in formatting-a-cv.md

Description of the change: Fix links
Reason for the change: Broken links
Link to original source:  https://github.com/sendgrid/docs/blob/develop/content/docs/ui/managing-contacts/formatting-a-csv.md

Closes #

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

This is a relative link and it is designed to work in local, staging and production builds of our site and not necessarily in github. We don't care that they don't work in github, it's much more important that it works in every stage of our build.


text:
Exit Criteria update for Automations

Description of the change:
Reason for the change:
Link to original source:

Closes #

Hello @Whatthefoxsays,Thanks again for the PR! We appreciate your contribution and look forward to                                              continued collaboration. Thanks!                                             Team SendGrid DX


text:
Authentication issue while upgrading to 2fa

The username and apikey in authentication is not working after upgrade sendgrid account to 2fa below is the code sample
HTTP request failed! HTTP/1.1 401 Unauthorized
$sendgrid = new SendGrid\SendGrid('username', 'api_key_value');
$mail     = new SendGrid\Mail();
$mail->addTo('navd@gmail.com')->
setFrom('abc@gmail.com')->
setSubject('Subject goes here')->
setText('Hello World!')->
setHtml('Hello World!');
$sendgrid->send($mail);

@thinkingserious
please check and respond. Thanks in advance

@thinkingserious
please check and respond. Thanks in advance

Hello @naveedislam,
I believe this issue may belong in this repo: https://github.com/sendgrid/sendgrid-php

Hello @naveedislam,
I believe this issue may belong in this repo: https://github.com/sendgrid/sendgrid-php

Hi @thinkingserious
Thank you for your kind response, I want to use current repo in my project, if I change the library to your mentioned repo a lot of changes will be required, Kindly provide solution in same library sendgrid-google-php

Hi @thinkingserious
Thank you for your kind response, I want to use current repo in my project, if I change the library to your mentioned repo a lot of changes will be required, Kindly provide solution in same library sendgrid-google-php

Hello @naveedislam,
Unfortunately, this library has not been updated in 7 years and is not recommended. Further, we no longer support passing your username and password, instead we recommend using an API key and it appears this library does not support that configuration, whereas sendgrid-php does support using your API key ,is regularly updated and recommended.
With best regards,
Elmer

Hello @naveedislam,
Unfortunately, this library has not been updated in 7 years and is not recommended. Further, we no longer support passing your username and password, instead we recommend using an API key and it appears this library does not support that configuration, whereas sendgrid-php does support using your API key ,is regularly updated and recommended.
With best regards,
Elmer

Hello @thinkingserious
Thank you, But there are some issues to use sendgrid-php, my client are using old PHP version 5.5.9 and sendgrid-php is not supported, let me help regarding this if it is possible to update sendgrid-google-php , I am in serious trouble we have a pro account and my client sent thousands of email daily.

Hello @thinkingserious
Thank you, But there are some issues to use sendgrid-php, my client are using old PHP version 5.5.9 and sendgrid-php is not supported, let me help regarding this if it is possible to update sendgrid-google-php , I am in serious trouble we have a pro account and my client sent thousands of email daily.

Hello @naveedislam,
I suggest you compare how authentication is handled here vs. here and update the source code accordingly. I hope that helps!
With best regards,
Elmer

Hello @naveedislam,
I suggest you compare how authentication is handled here vs. here and update the source code accordingly. I hope that helps!
With best regards,
Elmer

Hi @thinkingserious
I have tried a lot to update source code according to your provided link, but failed to update. Can you please mention the specific part to be updated, or you can please update it for us?
Thanks

Hello @naveedislam,
Please submit your request to https://support.sendgrid.com/hc/en-us and reference this issue for further assistance. Thank you!
With best regards,
Elmer

authors: naveedislam thinkingserious

repo: sendgrid/sendgrid-google-php

license: mit

license_source: bigquery


text:
CC and BCC not working

CC and BCC fields aren't working.  BCC is required for integration with a 3rd party service, so multiple TO fields aren't an option for me.
Test case:
mkdir sgtest && cd sgtest
composer init -s dev
composer require sendgrid/sendgrid 2.0.3
echo "<?php return ['username'=>'', 'password'=>'']; ?>" > cfg.php
# Add your username and password to cfg.php
curl https://gist.githubusercontent.com/lexicalbits/9669433/raw/61ee6a296734d4aaad708fdd7a482780e886e60a/gistfile1.php > run.php
php run.php

If you use the default emails in the test, you can verify the results here:
http://mailinator.com/inbox.jsp?to=sgtest_to
http://mailinator.com/inbox.jsp?to=sgtest_cc
http://mailinator.com/inbox.jsp?to=sgtest_bcc
The test gist: https://gist.github.com/lexicalbits/9669433
My setup:
Ubuntu Server 12.04 in KVM
PHP from https://launchpad.net/~ondrej/+archive/php5
php -v
PHP 5.5.4-1+debphp.org~precise+1 (cli) (built: Sep 27 2013 12:39:52)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
    with Zend OPcache v7.0.3-dev, Copyright (c) 1999-2013, by Zend Technologies
    with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans

Just wanted to add, it's strange that BCC isn't working especially since it exists as a method in your class. Please make the proper adjustments to let other users know, as soon as possible.

+1

I have to say, I ran into this again. While I "kinda" understand why you would get rid of Bcc, removing CC is slightly outrageous. In my line of work we have to send messages to entire teams of people, how are we supposed to achieve that without CC? And no, advising me to use yet another library / implementation is not acceptable.

This will be fixed in the upcoming v3.0.0 branch. We will be defaulting to
a web parameter for 'to' as opposed to the current usage of the smtpapi
header for 'to'.
On Monday, January 26, 2015, Serg Chernata notifications@github.com wrote:

I have to say, I ran into this again. While I "kinda" understand why you
would get rid of Bcc, removing CC is slightly outrageous. In my line of
work we have to send messages to entire teams of people, how are we
supposed to achieve that without CC? And no, advising me to use yet another
library / implementation is not acceptable.
—
Reply to this email directly or view it on GitHub
https://github.com/sendgrid/sendgrid-php/issues/83#issuecomment-71574394
.

--
Eddie Zaneski
{"device": "mobile"}

Thanks for the quick response. If you get a chance, please let us know when that happens.

Just had everything setup and working nicely - my class setup, email formatted and bang... ->setBcc - not working. What a big disappointment.
I went to your Github page, scrolled down to see it listed there as part of the documentation and scratched my head many times until I found this topic.
You really need to make it clear that this doesn't work with your php lib. I basically made my choice on this lib because of that.
It's been a year since this issue was put up - any news on progress on this?
Thanks a lot.

I am actively working on this on the 3.0.0 branch. It will be done very very shortly. So sorry for the delay.

I hit this one hard as well. Much time spent tracking down this bug. Thumbs up lanching version 3 as soon as possible.

Working on implementing BCC on SendGrid in another application of ours and having experienced this issue, I'd love to use the actual BCC function rather than a work-around if possible. Any ETA on the 3.0.0 branch?

I have a pre-release up of v3.0.0 that should fix all of these issues. Would love some testers to provide feedback.
I need to write up the changes and a better README, but here's a primer.
"sendgrid/sendgrid": "3.0.0-RC1" in composer.
https://github.com/sendgrid/sendgrid-php/releases/tag/v3.0.0-RC1

One of our developers (@animir) is currently testing this. /cc @animir

Is the new version the one used by parse's cloud module? Because there it does not seem to work.

@odrobnik I don't know which version Parse is using in their cloud module. I suggest you contact their support team. Thanks.

authors: eddiezane jamesspittal jlank lexicalbits nextexile odrobnik spandadk srm80 thinkingserious

repo: sendgrid/sendgrid-php


text:
Implement min-conflicts heuristic (value picking optimization)

Description
The min conflicts optimization is an approach to the search problem which differs from the backtracking search.  The min conflicts search can be described as follows:

all variables are assigned values
a set of variables which violate a constraint or many constraints is created
a variable from the set is randomly chosen and assigned a new value which minimizes the number of conflicts
this is repeated for a fixed number of iterations until a solution is found or the max number of iterations (user defined) is reached

The specific search algorithm to be used (backtracking or min-conflicts) should be easy to select as needed.
Acceptance Criteria

[ ] The min-conflicts search algorithm is implemented
[ ] The search algorithm is easy to select

Related issues
Child of #11 and #12
Additional Resources
Add attachments, external links, etc here.

Initial implementation of min-conflicts algorithm done via pair programming with Nolan.
Tested min-conflicts algorithm on CSP 1 with a single unary constraint (professor qualifications).
In order to incorporate constraints with the min-conflicts algorithm, must implement the var_satisfied() function for each.

authors: NolanVH strdavis


text:
Export converted csv

This branch:

Makes the import button only parse the CSV into a scheduleJSON, save the scheduleJSON in the context, and log it to the console (ie. it no longer logs the JSON converted back to CSV).
Makes the export button work (ie. it will save a file called schedule.csv to your downloads with the context's scheduleJSON converted back into a CSV).
Makes the hamburger menu open to the right of the hamburger button (such that you can close the menu by clicking the hamburger button again), makes the import and export menu item buttons clickable for the entire width and height of the menu item (previously only the text portion was clickable, so there was a boarder that looked clickable but wouldn't trigger anything), and finally makes the buttons have the click icon when hovered (previously the label would only give the default mouse icon when hovered).

To Test:

npm install and npm start like usual.
Try out importing a CSV, and then exporting it.
Make sure that the changes to the import/export button styling make sense/look nice.

Closes #20

Conflicts resolved, merging now

repo: senior-knights/course-schedulizer


text:
Dimmers

I setup in Hoobs.  The light goes on, but does not go off.  Not much else to config.  TIA!

If you manually turn off the light, does the state in HomeKit update?

If you manually turn off the light, does the state in HomeKit update?

Looking at it in HOOBS.  When I turn off manually, it doesn't update the status unless I refresh.  After refresh, I try to turn back on via HOOBS, but it doesn't.  Turn on manually, still doesn't update the status even after refresh.
Currently I use Home Assistant to link to the radiora2 repeater.  Just looking for HOOBS/Homebridge in case I want to switch.

If I restart HOOBS, if the light is on, it will go off if I click it in HOOBS.  However, it won't go back on if I click it in HOOBS.  If the status is incorrect before restart (showing on when it's off), it will still be wrong after reboot....and clicking on it doesn't do anything.  Just more clues for you.

Looks like HOOBS doesn't want to support platform style plugins that don't dynamically create their own accessories. it could be something with that?

I found another plugin that worked.  RadioRA worked just fine.  Thanks!


text:
Missing include senseBoxIO

senseBoxIO Library is missing when using the RGB-LED

closed #173

repo: sensebox/React-Ardublockly


text:
New UI designs and recommendations

We have a number of UI recommendations to clean up with existing frontend.
@calebhailey
Global
Overall we focused on type, color and spacing consistency. To save time, we didn’t go searching for every icon but allowed for space there. Also, we based the grid off of the columns we saw in the live site, so expecting a few things may shift around but hoping this provides enough clarity around spacing.
Home
Really similar to what currently exists, added in a description text block and updated the search area. Also, the addition of a CTA section at the bottom which can be used elsewhere.
Assets
Same layout but cleaned up the type size and spacing a bit. Open to suggestions on how items may change in proximity to each other, but this felt logical and easy to read, especially in regards to the tabs at the top and the right-hand sidebar.
Collaborator
Didn’t change much here, but offered suggestions on how to give that page a bit more depth by adjusting the pale colors.

Pull Request #125

authors: Brettwag pzupan

repo: sensu/bonsai-asset-index


text:
New option --not-today to allow skipped all today entries when doing a commit

Because sometime the current day is still messy and the PO is asking for yesterday hours again and again...

I'd say the best solution would be to add an argument filter to Timesheet.get_entries, edit entry_filter in the get_entries method to add a call to the custom filter function (eg. and filter is not None and filter()), and define a filter function in the command that would exclude entries of the current day. Unfortunately entries don't have a date attribute, so this can't work...
I guess the easy solution is to post-process entries_to_push and remove the date of the current day if it's present.

I just commit a new version, finally it was possible to do it into get_entries. Ok like that for you?

OK, here we are, third tentative!

Sorry I think I found an easier way to do it thanks to the new command structure of the 4.0 version. You'll find the commit here: https://github.com/sephii/taxi/commit/bc50cd0b854b849d283b378c85e6807b4ebdcfcd
Thanks for you efforts! ;)

authors: jeanmonod sephii

repo: sephii/taxi

license: WTFPL


text:
Simplify creation of custom formatters with different escaping

Related to #537

@dtolnay Could you give a feedback on this PR?

@dtolnay Practically only HtmlSafe is needed. Other examples are done only to have a test coverage and demonstrate flexibility.

repo: serde-rs/json


text:
Attractiveness attribute?

Hi @serengil, thank you so much for this great package! I'm using your package in my academic research project, and I was wondering if you were considering adding in more attribute models such as facial attractiveness?

Hi David,
Actually I have studied on this topic
Beauty score: https://sefiks.com/2019/12/25/beauty-score-prediction-with-deep-learning/
Attractiveness: https://sefiks.com/2020/01/22/attractiveness-score-prediction-with-deep-learning/
I mean that models are ready and it is very easy to adapt in deepface. But I didn't know people what those features to use. I can add it in the next release if you need.

Hi @serengil  I want to know on which data you have trained Gender, Age model

@Usama3059 this is mentioned in this post: https://sefiks.com/2019/02/13/apparent-age-and-gender-prediction-in-keras/

Hi @serengil thanks for taking this into consideration. I saw the links you provided. One suggestion would be to NOT train on SCUT because it's predominantly Asian, which might limit the generalizability of the model. Would recommend to train on the CelebA dataset (https://paperswithcode.com/dataset/celeba).
I'm using your work in my research, and it's been very helpful. I cited your paper in my recent research (which is under second-round review now, and hopefully will come out soon). The attractiveness variable would be important because psychology research on faces usually control for the influence of attractiveness when looking at other facial perception influences.

Unfortunately, I cannot train a new model soon. But I can adapt those pre-trained models soon. I'm going to add the both beauty score and attractiveness modules into deepface in the next release.
Please inform me when your paper is published :)

Thanks! Yes, that would work too.
Of course, I will!
Thanks again for this wonderful library.

@serengil Thanks for your response,I have been using deepface it is really amazing. How can we do batch predictions as the input isthe image path, not the image arrays?

@Usama3059, the following code satisfies your requirement.
face_pairs= [
     ["img1.jpg", "img2.jpg"],
     ["img1.jpg", "img3.jpg"],
     ["img1.jpg", "img4.jpg"],
     ["img1.jpg", "img5.jpg"],
     ["img1.jpg", "img6.jpg"]
]

for face_pair in face_pairs:
     obj = DeepFace.verify(face_pair[0], face_pair[1])
     print(obj)

@serengil  I think it is still running the model for len(face_pairs)//2.  My requirement is running the deepface.analyze model once for len(face_pairs).

Did you mean this?
img_paths = ["img1.jpg", "img2.jpg", "img3.jpg", "img4.jpg", "img5.jpg"]
obj = DeepFace.analyze(img_paths)

@serengil  Yes Thanks Alot

I realized that I haven't save the pre-trained weights for beauty and attractiveness score prediction models. I have to re-train them :/ It may last longer than I expected.
I set the status of this issue to closed but I'm going to adapt these functionalities soon. Thank you for understanding.

Any update on including beauty?

@HlebKrah no, that requires re-training, pre-trained weights are gone.

authors: Usama3059 davidwdw sehgal-neil serengil

repo: serengil/deepface


text:
[BUG] Compiling on arm64/aarch64: error Please add -D_FILE_OFFSET_BITS=64 to your compile flags!

Following the instructions here, I'm trying to compile this on an Oracle Cloud Ampere system. The system is running Ubuntu 20.04.
$ uname -a
20.04.1-Ubuntu SMP Fri Jul 16 00:56:44 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux

Steps to reproduce:

Follow the "Getting Started" instructions up to CMake.
$ cmake ..
Observe the following output:

Scanning dependencies of target logger
[  1%] Building C object src/logger/CMakeFiles/logger.dir/logger.c.o
[  3%] Linking C static library ../../lib/liblogger.a
[  3%] Built target logger
Scanning dependencies of target psync
[  4%] Building C object src/psync/CMakeFiles/psync.dir/pcompat.c.o
[  6%] Building C object src/psync/CMakeFiles/psync.dir/pstringcompat.c.o
[  7%] Building C object src/psync/CMakeFiles/psync.dir/psynclib.c.o
[  9%] Building C object src/psync/CMakeFiles/psync.dir/plocks.c.o
[ 10%] Building C object src/psync/CMakeFiles/psync.dir/plibs.c.o
... [snip] ...
[ 64%] Building C object src/psync/CMakeFiles/psync.dir/pdeviceid.c.o
[ 66%] Building C object src/psync/CMakeFiles/psync.dir/pfs.c.o
In file included from /usr/include/fuse/fuse.h:26,
                 from /home/ubuntu/pcloud-console-client/src/psync/pfs.c:13:
/usr/include/fuse/fuse_common.h:33:2: error: #error Please add -D_FILE_OFFSET_BITS=64 to your compile flags!
   33 | #error Please add -D_FILE_OFFSET_BITS=64 to your compile flags!
      |  ^~~~~
make[2]: *** [src/psync/CMakeFiles/psync.dir/build.make:583: src/psync/CMakeFiles/psync.dir/pfs.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1060: src/psync/CMakeFiles/psync.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

Attempt to correct: $ cmake -D_FILE_OFFSET_BITS=64 ..
Observe the following output:

[  3%] Built target logger
[  4%] Building C object src/psync/CMakeFiles/psync.dir/pfs.c.o
In file included from /usr/include/fuse/fuse.h:26,
                 from /home/ubuntu/pcloud-console-client/src/psync/pfs.c:13:
/usr/include/fuse/fuse_common.h:33:2: error: #error Please add -D_FILE_OFFSET_BITS=64 to your compile flags!
   33 | #error Please add -D_FILE_OFFSET_BITS=64 to your compile flags!
      |  ^~~~~
make[2]: *** [src/psync/CMakeFiles/psync.dir/build.make:583: src/psync/CMakeFiles/psync.dir/pfs.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1060: src/psync/CMakeFiles/psync.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

I'm not as incredibly familiar with C/C++ as I used to be, so I went hunting and I found this page. The second suggestion ended up working:
$ git diff
diff --git a/src/psync/pfs.c b/src/psync/pfs.c
index ad6c706..711ed83 100644
--- a/src/psync/pfs.c
+++ b/src/psync/pfs.c
@@ -10,6 +10,7 @@
  */

 #include <pthread.h>
+#define _FILE_OFFSET_BITS  64
 #include <fuse.h>
 #include <errno.h>
 #include <string.h>

HOWEVER this seems kludgy as all heck, so I didn't want to just make the change and open a PR since I'm not familiar with the codebase. Perhaps there's a more elegant solution?

Fixed in the master branch. Feel free to open a new issue if the problem appears again. Thank you for contributing, and for helping make pCloud Console Client better!

authors: EmberHeartshine sergeyklay

repo: sergeyklay/pcloud-console-client


text:
Create Spotify Strategy

Hi!
I implemented the Spotify strategy on a personal project and wanted to share it 😄

@marcelscr hey! thanks for this, it's really great. Since v3 strategies are not going to live inside this packages anymore (old strategies are still in the repo so people can copy them) and instead they will be published in independent packages like remix-auth-oauth2 or remix-auth-github.
I suggest you to use the template repository http://github.com/sergiodxa/remix-auth-strategy-template to create a remix-auth-spotify repo, copy your code there (install remix-auth-oauth2) and publish it to npm by yourself.
Again, thanks for the work here and I hope to see a new remix-auth-spotify package soon!

authors: marcelscr sergiodxa

repo: sergiodxa/remix-auth


text:
TRACKING_ID

where can i find the TRACKING_ID??? nothing in the docs mentions it.
thanks

By default its 'default '
But you Can édit the tracking id in the portal dashboard

authors: Aminejemmali xbaha

repo: sergioteula/python-aliexpress-api


text:
ARM support

Hello! This is a very promising project, congratulations.
I have deployed velero-ui using the Helm Chart. Our Kubernetes clusters only uses ARM. This is the result:
$ kubectl get pod -n velero --context=infra
NAME                                         READY   STATUS    RESTARTS      AGE
infra-velero-77c84b7b98-vjtqp                1/1     Running   0             44m
infra-velero-vui-api-7ff9d4c44-l8kch         1/1     Running   0             48s
infra-velero-vui-ui-74776c4bc8-jvz8h         0/1     Error     3 (29s ago)   48s
infra-velero-vui-watchdog-7895b8cdd7-7fxtv   1/1     Running   0             48s

As you can see both api and watchdog services are able to start without any issues. But the UI pod is failing with this error:
kubectl logs infra-velero-vui-ui-74776c4bc8-jvz8h -n velero --context=infra
exec /usr/local/bin/docker-entrypoint.sh: exec format error

This occurs because the docker image was not built to support ARM. I confirmed that the other docker repos are building the images with ARM support already (example: https://hub.docker.com/r/dserio83/velero-api).
Can you also build the velero-ui image with ARM support please? (https://hub.docker.com/r/dserio83/velero-ui)
Thank you very much in advance!

I have built the Velero-UI for ARM. Although I don't have the capability to test the image in a cluster that uses ARM, I believe there shouldn't be any issues. Please let me know if the system runs smoothly.

Thanks a lot! I'm using the new image (dserio83/velero-ui:0.1.16) and the pod is running like a charm.
But I can't confirm if everything works correctly yet. Although I can see the login page, once I enter the username and the password and I click the "Login" button, nothing occurs. I don't see any errors in the pods either:
$ kubectl logs infra-velero-vui-ui-74776c4bc8-zzw2g -n velero --context=infra

   ▲ Next.js 14.1.2
   - Local:        http://localhost:3000
   - Network:      http://0.0.0.0:3000

 ✓ Ready in 91ms

I tried changing the default password but didn't work. By the way, since I'm testing this service, for now I'm just using port-forwarding to access the service:
$ kubectl port-forward service/infra-velero-vui-ui-np -n velero 8080:80 --context=infra

And then opening the UI using http://localhost:8080. Not sure if this information is relevant.
Do you think this could be related to the ARM image? I mean, maybe some library used by the application is not supporting ARM?
Thanks again!

authors: davideserio leandrok

repo: seriohub/velero-ui


text:
sort taxonomie

you cant sort / save the taxonomy
https://de.serlo.org/taxonomy/term/organize/18230

duplicate of #15

authors: TinsayeAbye inyono


text:
notifications are broken again

No new notifications are generated. This is realy a problem, because meanwhile we have continuous community interaction and they aren't notified, if we answer their comments and review their edits.
In my top navigation, it says, I have 5 "unsolved/not viewed" notifications. But I already clicked at all of them. The 5 doesn't go away. It's the same with other profiles

the first one should be fixed

the latter's backtrace:

https://github.com/serlo-org/athene2/blob/5af370476278403b822d2073d52d62fec958c630/src/module/Notification/src/Notification/Controller/NotificationController.php#L39
https://github.com/serlo-org/athene2/blob/5af370476278403b822d2073d52d62fec958c630/src/module/Notification/src/Notification/NotificationManager.php#L72-L84
https://github.com/serlo-org/athene2/blob/5af370476278403b822d2073d52d62fec958c630/src/module/Notification/src/Notification/NotificationManager.php#L62-L70

Instead of using the default limit of 20 public function findNotificationsBySubscriber(UserInterface $user, $limit = 20) set a high number here

authors: SimonKoehl arekkas


text:
fix: Fix top level await error

Unassigned await throws error - don't ask me why.

@fwang @thdxr

repo: serverless-stack/sst


text:
Move the README.md file

The README file should actually be moved to a new /profile directory:

Closed by https://github.com/serverlessworkflow/.github/commit/3710b85dde365a4e2f733b0ef0a21de3fa82a067


text:
Move diagram section before definition section in examples

Signed-off-by: Tihomir Surdilovic tsurdilo@redhat.com
Many thanks for submitting your Pull Request :heart:!
Please specify parts this PR updates:

[ ] Specification
[ ] Schema
[ x] Examples
[ ] Usecases
[ ] Extensions
[ ] Roadmap
[ ] Use Cases
[ ] Community
[ ] TCK
[ ] Other

What this PR does / why we need it:
Updates examples to put the diagram section above the workflow definition section (for each example)
Fixes https://github.com/serverlessworkflow/specification/issues/134
Special notes for reviewers:
Additional information (if needed):

@singhkays do you mind reviewing please
Fixes issue https://github.com/serverlessworkflow/specification/issues/134

repo: serverlessworkflow/specification


text:
PostgreSQLSeverity.error 42601: syntax error at or near *

Describe the bug
UserData model
class: UserData

table: user
fields:
  user: module:auth:UserInfo
  email: String
  uid: String
  points: int
  communities: List<Community>

Inserting the data from code

// Tried this
await session.db.insert<UserData>(userData)

// Tried this
await UserData.insert(session, userData);

But not sure why my code throws error - PostgreSQLSeverity.error 42601: syntax error at or near "user"
Traces
package:postgres/src/connection.dart 513:18                     _PostgreSQLExecutionContextMixin._query
package:postgres/src/connection.dart 474:7                      _PostgreSQLExecutionContextMixin.query
package:postgres_pool/postgres_pool.dart 750:23                 _PgExecutionContextWrapper.query.<fn>
package:postgres_pool/postgres_pool.dart 695:27                 _PgExecutionContextWrapper._run
package:postgres_pool/postgres_pool.dart 749:12                 _PgExecutionContextWrapper.query
package:postgres_pool/postgres_pool.dart 585:16                 PgPool.query.<fn>
package:postgres_pool/postgres_pool.dart 332:22                 PgPool.run.<fn>.<fn>
package:postgres_pool/postgres_pool.dart 431:27                 PgPool._useOrCreate
package:postgres_pool/postgres_pool.dart 403:14                 PgPool._withConnection.<fn>
package:executor/src/executor_impl.dart 61:19                   _Executor.scheduleTask
package:postgres_pool/postgres_pool.dart 331:18                 PgPool.run.<fn>
package:retry/retry.dart 131:16                                 RetryOptions.retry
package:postgres_pool/postgres_pool.dart 329:14                 PgPool.run
package:serverpod/src/database/database_connection.dart 363:11  DatabaseConnection.insert
package:serverpod/src/database/database.dart 137:5              Database.insert
package:fluttermeetups_server/src/endpoints/auth.dart 47:7      AuthEndPoint.createUser
package:serverpod/src/server/endpoint_dispatch.dart 111:20      EndpointDispatch.handleUriCall
package:serverpod/src/server/server.dart 224:18                 Server._handleRequest
===== asynchronous gap ===========================
package:postgres_pool/postgres_pool.dart 331:18                 PgPool.run.<fn>
package:retry/retry.dart 131:16                                 RetryOptions.retry
package:postgres_pool/postgres_pool.dart 329:14                 PgPool.run
package:serverpod/src/database/database_connection.dart 363:11  DatabaseConnection.insert
package:serverpod/src/database/database.dart 137:5              Database.insert
package:fluttermeetups_server/src/endpoints/auth.dart 47:7      AuthEndPoint.createUser
package:serverpod/src/server/endpoint_dispatch.dart 111:20      EndpointDispatch.handleUriCall
package:serverpod/src/server/server.dart 224:18                 Server._handleRequest

This is my case, When I debug and I stopped at $HOME/.pub-cache/hosted/pub.dev/serverpod-1.0.0/lib/src/database/database_connection.dart 377
This is my Query(formatted for git preview)
INSERT INTO user ("user", "email", "uid", "points", "communities") VALUES
('{"id":1,"userIdentifier":"hi2minnu@gmail.com","userName":"Minnu","fullName":"Minnu","email":"hi2minnu@gmail.com",
"created":"2023-02-06T19:43:41.082894Z",
"imageUrl":"https://storage.flutterfinder.in/serverpod/user_images/1-1.jpg","scopeNames":[],"blocked":false}',
'hi2minnu@gmail.com', '3f5731b8-99d5-4cca-a337-6df3a9c8e90e', 0, '[]') RETURNING id

This runs in postico SQL query(With small changes)
INSERT INTO "public"."user" ("user", "email", "uid", "points", "communities") VALUES
('{"id":1,"userIdentifier":"hi2minnu@gmail.com","userName":"Minnu","fullName":"Minnu","email":"hi2minnu@gmail.com",
"created":"2023-02-06T19:43:41.082894Z",
"imageUrl":"https://storage.flutterfinder.in/serverpod/user_images/1-1.jpg","scopeNames":[],"blocked":false}',
'hi2minnu@gmail.com', '3f5731b8-99d5-4cca-a337-6df3a9c8e90e', 0, '[]') RETURNING id

Returns Id 1

Serverpod versions

CLI Version: v1.0.0
Library version: v1.0.0

Platform information
Mac OS M1 - 2020 (13.1 (22C65))
Additional Context
Expecting that was because my table name and the column name were same. But ideally that must not give error.

I’m dealing with the same issue.
User model
class: User table: user fields:    uid: String   name: String   mobile: int   email: String   dateofbirth: String   weight: String   height: String   gender: String   subcription: bool   updateon: DateTime
Error in db - PostgreSQLSeverity.error 42601: syntax error at or near "user"
Stack Traces
package:postgres/src/connection.dart 513:18                     _PostgreSQLExecutionContextMixin._query package:postgres/src/connection.dart 474:7                      _PostgreSQLExecutionContextMixin.query package:postgres_pool/postgres_pool.dart 801:23                 _PgExecutionContextWrapper.query.<fn> package:postgres_pool/postgres_pool.dart 746:27                 _PgExecutionContextWrapper._run package:postgres_pool/postgres_pool.dart 800:12                 _PgExecutionContextWrapper.query package:postgres_pool/postgres_pool.dart 615:16                 PgPool.query.<fn> package:postgres_pool/postgres_pool.dart 352:22                 PgPool.run.<fn>.<fn> package:postgres_pool/postgres_pool.dart 451:27                 PgPool._useOrCreate package:postgres_pool/postgres_pool.dart 423:14                 PgPool._withConnection.<fn> package:executor/src/executor_impl.dart 61:19                   _Executor.scheduleTask package:postgres_pool/postgres_pool.dart 351:18                 PgPool.run.<fn> package:retry/retry.dart 131:16                                 RetryOptions.retry package:postgres_pool/postgres_pool.dart 349:14                 PgPool.run package:serverpod/src/database/database_connection.dart 363:11  DatabaseConnection.insert package:serverpod/src/database/database.dart 137:5              Database.insert package:backend_server/src/endpoints/user_endpoint.dart 13:5    UserEndpoint.addUser package:serverpod/src/server/endpoint_dispatch.dart 111:20      EndpointDispatch.handleUriCall package:serverpod/src/server/server.dart 224:18                 Server._handleRequest ===== asynchronous gap =========================== package:postgres_pool/postgres_pool.dart 351:18                 PgPool.run.<fn> package:retry/retry.dart 131:16                                 RetryOptions.retry package:postgres_pool/postgres_pool.dart 349:14                 PgPool.run package:serverpod/src/database/database_connection.dart 363:11  DatabaseConnection.insert package:serverpod/src/database/database.dart 137:5              Database.insert package:backend_server/src/endpoints/user_endpoint.dart 13:5    UserEndpoint.addUser package:serverpod/src/server/endpoint_dispatch.dart 111:20      EndpointDispatch.handleUriCall package:serverpod/src/server/server.dart 224:18                 Server._handleRequest

Here to confirm that this error is thrown when the table and column names do match like @yahu1031 expected.

Yep

Any update !

I think this was an issue because we did not escape the table name when querying from Serverpod. And since user has a specific meaning in Postgres it couldn't resolve the query.
This should be fixed now as we have added escapes around all tables used in queries.
We ran into a similar issue with using order as an entity name in our integration tests, but that works as expected now.
Will close this issue assuming it works as expected in with latest main.
Feel free to reopen if the issue still remians.

repo: serverpod/serverpod


text:
🛑 sgmgrpc.serverssh.us is down

In f974121, sgmgrpc.serverssh.us (http://sgmgrpc.serverssh.us/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: sgmgrpc.serverssh.us is back up in d892310.

repo: serversshnet/server-status


text:
🛑 geray.serverip.my.id is down

In 9303aa9, geray.serverip.my.id (geray.serverip.my.id) was down:

HTTP code: 0
Response time: 0 ms

Resolved: geray.serverip.my.id is back up in 2781b37.


text:
🛑 dex.serverssh.net is down

In 981e4b4, dex.serverssh.net (dex.serverssh.net) was down:

HTTP code: 0
Response time: 0 ms

Resolved: dex.serverssh.net is back up in d782bb5.


text:
🛑 sg1ray.serverip.my.id is down

In 4c06c0f, sg1ray.serverip.my.id (sg1ray.serverip.my.id) was down:

HTTP code: 0
Response time: 0 ms

Resolved: sg1ray.serverip.my.id is back up in 0ce12a8 after 3 hours, 10 minutes.


text:
🛑 sg1.serverssh.net is down

In 957e301, sg1.serverssh.net (sg1.serverssh.net) was down:

HTTP code: 0
Response time: 0 ms

Resolved: sg1.serverssh.net is back up in 8fa4a48 after 6 minutes.


text:
🛑 us1vless.ipservers.xyz is down

In d9a1a63, us1vless.ipservers.xyz (us1vless.ipservers.xyz) was down:

HTTP code: 0
Response time: 0 ms

Resolved: us1vless.ipservers.xyz is back up in 2a02ccb.

repo: serversshnet/uptime


text:
Problem with proper working of controllers on IE11

Windows Server 2016
jdk1.8u121
build BES_MASTER_UNIT-1773 2017/06/14
SAML mode
Internet Explorer 11
[How to reproduce]

Open controllers in IE 11, checked for

ess.aws
ess.openstack
ess.vmware

Choose any action

resume
delete
deprovision
abort pending

Click Execute button

[Expected result]
The selected action should be executed
[Observed result]
Nothing is happened
[Details]
No errors in Logs file nor in console of IE
On Firefox and Google Chrome it works as expected

#777

repo: servicecatalog/development


text:
Infinite loop to change password after user creation and first login

Version: OSCM 18.0
Browser: Chrome
Country: BG
Actual >(wrong) behaviour:

create a new user
login as the new user with pwd from mail
user changes pwd in change dialog
pwd is changed but user asked to change pwd again and again (inifinite loop)

workaround: close browser completely and login again

system.log
system.log

tested okay with build from 13/09/2019

portal: register new user, new organization
marketplace. add user

tested with firefox and chrome

@uhu133
The fix release OSCM 18.0.2 is available DockerHub. Just pull all servicecatalog/oscm-* images with tag latest.

authors: GoebelL elfriedegoetz uhu133

repo: servicecatalog/oscm


text:
🛑 Stockport Repairs is down

In 2ff2b9e, Stockport Repairs (https://stockport-repairs.co.uk) was down:

HTTP code: 500
Response time: 3059 ms

Resolved: Stockport Repairs is back up in 75dd775.

repo: servicesite/upptime


text:
Dar feedback para o servidor quanto à demora no sistema

Algumas vezes a demora de carregamento de uma linha ou campo pode acabar atrapalhando a edição do servidor. Precisamos dar o feedback de que o sistema está carregando a informação preenchida, etc.

Duplicata da #220

authors: cv sahrosa

repo: servicosgovbr/editor-de-servicos


text:
[WIP] Generator Refactor

closes #9, #10, #11, #12
This refactors and updates the ghost generator to use the newest yeoman-generator syntax, as well as improving some of the configurability of the generator.
TODO:

[x] get the basic ghost-generator command updated and working
[ ] get the casper copy command updated and working
[ ] tests

Nice! I'm happy to turn over this module to you, or at least add you as a collaborator.
I haven't been using Ghost much lately so haven't worked on this as much as I should.

@sethvincent sounds good 😄  Do you want me to help out with npm releases too?

Sure! You're now a collaborator on github & npm.

Hey @sethvincent would you be willing to enable Travis for this repository? I can't with my current access permissions.

@acburdine enabled!
Looks like we'll need to update the travis.yml file. Feel free to include that in this PR.

@sethvincent good to go now! If you want to merge it go ahead, once that's done I'll release 0.3

:tada:

authors: acburdine sethvincent

repo: sethvincent/generator-ghost


text:
Frequent website crashing on Chrome

On Chrome 92.0.4515.159 on OS X (as well as Edge), I'm getting fairly frequent (every hour or so of active reconstruction) "Aw Snap" errors that bring down all currently active Neuroglancer tabs (although the state is preserved on refresh, which is great!). The error says "Error code: 5" but otherwise I'm not sure what is causing the issues. Any advice for how to get useful debugging information out of Chrome would be appreciated to help advance this issue.

Hi — any thoughts on this? It remains a very annoying issue, and was not occurring until recently.

repo: seung-lab/neuroglancer


text:
關於收藏一問

作者您好，於昨天也有人問過同樣的問題。
個人帳號收藏部分，原收藏順序是自己"添加收藏"的順序，昨天看了發現變成"作品發布日期"的順序。
今日有看到作者您回覆說更新1.0.26就可以解決問題，但是在剛剛更新完畢1.0.26之後，收藏的順序依舊還是依"作品發布日期"排列哦…

更新之后多了个网页的配置入口，设置-》EH-》EHentai 设置。进入之后在
"You can also select your default sort order for galleries on your favorites page. Note that favorites added prior to the March 2016 revamp did not store a timestamp, and will use the gallery posted time regardless of this setting."
这个地方修改，改成”By favorited time“。
这里有详细的说明。
http://www.ehviewer.com/help

謝謝您！問題解決了~


text:
Can you add the full transaction information to the InputType?

If you customize the processing of a transaction by instruction or transaction, there may be additional data that you want to get, such as accountKeys, but there is currently no way to get the entire transaction data, which prevents you from making certain judgments.

thank you for your feedback. we heard this feedback from multiple devs, so it will be added with v0.4.0 end of week along with a few other improvements

That is important

just updating everyone on this, we have more features coming in v0.4.0 so it's being delayed to middle of next week (around 18th of Dec)

authors: 0xNaixi KellianDev nishuzumi

repo: sevenlabs-hq/carbon


text:
fix: do not update go.mod by running make lint

Previously there was used go get ... which updated go.mod file.
Now go install ....@TAG install module, which states by doc:

This is useful for installing executables without affecting the dependencies of the main module.

The CI is failing, go install supports specifying the version only since Go 1.16, see https://golang.org/doc/go1.16#go-command
This will require upgrading Go before we can merge this.

authors: FUSAKLA lksv

repo: seznam/slo-exporter


text:
Return Config struct in init_file() func

Can you return Config struct after read log config from file? If so, I can cache this struct and don't have to read file every times. More over, I can change log config on the fly.

Yep, you can do this but it involves a bit more manual work than init_file (untested):
use std::fs::File;
use std::io::Read;
use log4rs::file::{Config, Format};

let mut config = String::new();
let mut file = File::open("log4rs.yaml").unwrap();
file.read_to_strint(&mut config).unwrap();
let deserializers = Default::default();
let raw = Config::parse(&config, Format::Yaml, &deserializers).unwrap();
let config = raw.into_config();
let handle = log4rs::init_config(config).unwrap();

// use handle to update config dynamically

Thank you so much!

authors: sfackler silenceleaf


text:
Certain combinations of slider values causes crash

To reproduce,
Select "Example," then
IPv4 Prefix Length = 32
PSID Offset = 2
Error: invalid literal for int() with base 2: ''
Other combinations crash as well.
Traceback (most recent call last):
  File "/Users/scott.freemire/Code/IP_MAP_Calculator/IP_MAP_Calculator.py", line 1286, in <module>
    rule_calc(param_ls, user_pd)  - (code is: rule_calc(param_ls, user_pd))
  File "/Users/scott.freemire/Code/IP_MAP_Calculator/IP_MAP_Calculator.py", line 448, in rule_calc
    v4hostint = int(v4hostbin, 2)  - (code is: v4hostint = int(v4hostbin, 2))
                ^^^^^^^^^^^^^^^^^

Validate was using the Python ipaddress module to test the IPv4 prefix. An IPv4 prefix with a length of 32 would succeed. It's a valid IPv4 prefix but not a valid prefix length for this calculator (at least at this time).
Update validate() to fail when IPv4 Prefix Length > 31.
Updated error messages.
Found an unrelated issue, input controls allowed a value of 16 for PSID Offset Bits. This is also invalid.
Reduced max value for PSID Offset Bits Combo and Slider to 15.
Eliminated "PSID Offset > 15" error message. - Still have to test what happens when 16 is entered on "Rule String" line.
Updated version to v0.11.13

Replaced validation and error messages for PSID Offset Bits because a value > 15 can still be entered in the Rule String field.


text:
Adding new all-day event with alert of "1 week before" causes strange alert times in official Calendar apps

I noticed a small "bug" where the alert that appears in the Mac and iOS Calendar apps differs slightly than the alert specified in the Itsycal event creation interface.
Steps to reproduce:

Create a new event in Itsycal.
Select "All-day".
Set the alert to "1 week before".
Save the event.
Open the Mac Calendar app or iOS Calendar app and look at the alert time. For Mac Calendar app the alert is set to a custom alert of "8 days before at 12AM", and for the iOS Calendar app the alert is set to a custom alert of "7 days before (12AM)".

For the record, I don't see this discrepancy when choosing other all-day alert times. Let me know if I can provide any more details.
Itsycal setup

Mac Calendar app

iOS Calendar app

@sfsam I tested this locally, and it appears that the math in the file EventViewController.m relating to the "1 week before" interval is slightly off. Currently the value is -604800 but I think -572400 is more accurate.
(32400 – (86400 x 7)) = -572400

@edelstone I reproduced this behavior as you described. I also tested your fix and it worked on both iOS and macOS. Thank you!
It sounds like you are able to compile your own copy of Itsycal with this fix?

@sfsam Yes, though once I found the fix I switched back to the official app since the bug doesn't impact me too much. I assume you'll implement the fix with your next release?

Yes.

Awesome, thank you!

authors: edelstone sfsam

repo: sfsam/Itsycal


text:
Too much spacing between numbers

I've uploaded an image showing Itscal on the left and macOS's default date on the right. As you can see the number spacing is is very significant. Can this be changed to match macOS?

I have fixed this for myself. In case you want to incorperate it as a setting or a hidden user default this is what I did. In ViewController.m::createStatusItem, you change the spacing attributes of the font to be monospace, you have a comment saying "Use monospaced font in case user sets custom clock format". Is this still relevant now that you are using the San Francisco font? For my fix, I just removed those lines and now the font matches exactly the same as macOS.

Also just a tip. When you use a pragma mark, you can have the dash before your title to accomplish the same effect in Xcode's dropdown menu:
#pragma mark -
#pragma mark Menubar item

is the same as
#pragma mark - Menubar item

@mozeryansky If you look in the commit history, you'll see that I've gone back and forth between a monospace and proportional font for the label part of the icon. There's a trade-off. The goal is to not have the changing time affect the width of the status item as each minute passes. This is so your whole status bar (all the items to the left of Itsycal) aren't subtly shifting each minute (or second if your clock is showing seconds). Of course, when the time changes from a single-digit hour to a double-digit hour (or vice versa), there will be a shift.
The system clock achieves this by having a massive amount of padding on the left and right and then custom drawing the datetime centered within the padding. Itsycal does it with normal padding and a monospaced font. Programmatically this solution is much simpler. Interestingly, the system clock also uses a monospace font when you display seconds so Itsycal is matching that without the massive padding.
I'm going to keep it the way it is for now. A cool thing about open-source is that if you have a strong subjective preference for the proportional font, you can have it.
Thanks for the pragma tip.

Yeah thanks, I did fork your project and I'm running my version. I'll just have to upstream your changes over time.

@mozeryansky, this has also been discussed in issue #45 .

The system clock achieves this by having a massive amount of padding on the left and right and then custom drawing the datetime centered within the padding. Itsycal does it with normal padding and a monospaced font.

It seems like the padding on Itsycal is not symmetrical though....

...And could it be reduced ? (as Bartender does, for example):

authors: gith-account macbugs mozeryansky sfsam


text:
Return wfs delay

This is a follow up on #59.
The main goal was fomulated by @fietew as:

Imho, it would be easier to return the pre-delay which has been added to the driving function by a particular processing step, e.g. fractional delay, wfs prefilter, focused source, plane wave, etc..
Furthermore, I would prefer that t=0 corresponds to the t=0 of the virtual source, i.e. where the sound "starts" to radiate from a point/focused source or when the plane wave passed its point of zero phase.

In order to achieve this I did the following things:

Add an additional prefilter_delay return parameter to wfs_preequalization(), which returns the delay that is added by the applied pre-filter.
Add an additional delay_offset return parameter to driving_function_imp_wfs(). In the case of conf.removedelay=1 it returns prefilter_delay. In the case of conf.wfs.removedelay=0 it returns secondary_source_diameter(conf)/c + prefilter_delay
I used this directly in sound_field_imp_wfs():

[d,~,~,delay_offset] = driving_function_imp_wfs(x0,xs,src,conf);
t = t + delay_offset*fs;

Result
That means if you use sound_field_imp_wfs() with conf.wfs.removedelay=1 you will have the first activity at the secondary sources for t = 0. With conf.wfs.removedelay=0 you will have the first activity of the virtual sources for t = 0.
Example
conf = SFS_config;
conf.wfs.removedelay = 1;
conf.plot.usedb = 1;
sound_field_imp_wfs([-2 2],[-2 2],0,[0 0.5 0 0 -1 0],'fs',0,conf)

conf = SFS_config;
conf.wfs.removedelay = 0;
conf.plot.usedb = 1;
sound_field_imp_wfs([-2 2],[-2 2],0,[0 0.5 0 0 -1 0],'fs',0,conf)

Open questions

@fietew : as you can see I have only added the return value to the driving function, not to the delayline etc. Could you maybe add it to the other functions?
@trettberg : I have added a return value also for the IIR filter with delay = conf.wfs.hpreIIRorder/2 / fs; I guess this is not correct, could you please correct it.

I have added a return value also for the IIR filter
I think it's best to return a delay of zero, instead of something like maximum group delay.

btw: The IIR case in wfs_preequalization had some issues. It should hopefully work now.

As the new version of the delayline is still under construction (see #50) I would prefer to add the delay_offset return value to this function after the merge of the new delayline.

OK, I have created #64 in order to not forget it and will merge this pull request in the meantime.

authors: fietew hagenw trettberg

repo: sfstoolbox/sfs


text:
🛑 Turnero is down

In 3bbf5a8, Turnero (https://turnos.catamarcacapital.gob.ar/) was down:

HTTP code: 500
Response time: 85 ms

Resolved: Turnero is back up in f6e2a9e.

repo: sfvc/upptime


text:
🛑 Rentas is down

In 2dda717, Rentas (rentas.catamarcaciudad.gob.ar) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Rentas is back up in 393ba99.


text:
Changes to _random opcodes and to hikey

Just some clarifications, mainly useful for people developing sfz players for the random opcodes.

Updated lo/hikey with this information, also clarifying that allowing -1 was added by the SFZ 2 spec.

Updated random stuff, also filling in some missing info about units (cents for pitch and cutoff) along the way.

As all the information in this PR has been added to the appropriate opcode pages, I suppose it can be closed now.

authors: DSmolken paulfd


text:
[Bug] canot load Gemma2 awq

Checklist

[X] 1. I have searched related issues but cannot get the expected help.
[X] 2. The bug has not been fixed in the latest version.
[X] 3. Please note that if the bug-related issue you submitted lacks corresponding environment info and a minimal reproducible demo, it will be challenging for us to reproduce and resolve the issue, reducing the likelihood of receiving feedback.
[X] 4. If the issue you raised is not a bug but a question, please raise a discussion at https://github.com/sgl-project/sglang/discussions/new/choose Otherwise, it will be closed.
[X] 5. Please use English, otherwise it will be closed.

Describe the bug
install version: sglang-0.3.5.post2 vllm-0.6.3.post1
2024-11-20 14:51:39.374748: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable TF_ENABLE_ONEDNN_OPTS=0. 2024-11-20 14:51:39.387585: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:485] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered 2024-11-20 14:51:39.402712: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:8454] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered 2024-11-20 14:51:39.407465: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1452] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered 2024-11-20 14:51:39.418505: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations. To enable the following instructions: AVX2 AVX512F AVX512_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags. 2024-11-20 14:51:40.257121: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT Automatically adjust --chunked-prefill-size for small GPUs. [2024-11-20 14:51:43] server_args=ServerArgs(model_path='/workspace/Asan/model/Gukbap-Gemma2-9B-qlora-1epoch-AWQ', tokenizer_path='/workspace/Asan/model/Gukbap-Gemma2-9B-qlora-1epoch-AWQ', tokenizer_mode='auto', skip_tokenizer_init=False, load_format='auto', trust_remote_code=False, dtype='auto', kv_cache_dtype='auto', quantization=None, context_length=None, device='cuda', served_model_name='/workspace/Asan/model/Gukbap-Gemma2-9B-qlora-1epoch-AWQ', chat_template=None, is_embedding=False, host='0.0.0.0', port=20022, mem_fraction_static=0.88, max_running_requests=None, max_total_tokens=None, chunked_prefill_size=2048, max_prefill_tokens=16384, schedule_policy='lpm', schedule_conservativeness=1.0, tp_size=1, stream_interval=1, random_seed=703420908, constrained_json_whitespace_pattern=None, watchdog_timeout=300, download_dir=None, log_level='info', log_level_http=None, log_requests=False, show_time_cost=False, enable_metrics=False, decode_log_interval=40, api_key=None, file_storage_pth='SGLang_storage', enable_cache_report=False, dp_size=1, load_balance_method='round_robin', dist_init_addr=None, nnodes=1, node_rank=0, json_model_override_args='{}', enable_double_sparsity=False, ds_channel_config_path=None, ds_heavy_channel_num=32, ds_heavy_token_num=256, ds_heavy_channel_type='qk', ds_sparse_decode_threshold=4096, lora_paths=None, max_loras_per_batch=8, attention_backend='flashinfer', sampling_backend='flashinfer', grammar_backend='outlines', disable_flashinfer=False, disable_flashinfer_sampling=False, disable_radix_cache=False, disable_jump_forward=False, disable_cuda_graph=False, disable_cuda_graph_padding=False, disable_disk_cache=False, disable_custom_all_reduce=False, disable_mla=False, disable_penalizer=False, disable_nan_detection=False, enable_overlap_schedule=False, enable_mixed_chunk=False, enable_torch_compile=False, torch_compile_max_bs=32, cuda_graph_max_bs=4, torchao_config='', enable_p2p_check=False, triton_attention_reduce_in_fp32=False, num_continuous_decode_steps=1, delete_ckpt_after_loading=False) [2024-11-20 14:51:53 TP0] Init torch distributed begin. [2024-11-20 14:51:53 TP0] Load weight begin. avail mem=23.36 GB INFO 11-20 14:51:53 awq_marlin.py:97] The model is convertible to awq_marlin during runtime. Using awq_marlin kernel. WARNING 11-20 14:51:53 interfaces.py:137] The model (<class 'sglang.srt.models.gemma2.Gemma2ForCausalLM'>) contains all LoRA-specific attributes, but does not set supports_lora=True`.
Loading safetensors checkpoint shards:   0% Completed | 0/2 [00:00<?, ?it/s]
Loading safetensors checkpoint shards: 100% Completed | 2/2 [00:01<00:00,  1.64it/s]
Loading safetensors checkpoint shards: 100% Completed | 2/2 [00:01<00:00,  1.64it/s]
[2024-11-20 14:51:55 TP0] Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/sglang/srt/managers/scheduler.py", line 1254, in run_scheduler_process
scheduler = Scheduler(server_args, port_args, gpu_id, tp_rank, dp_rank)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/sglang/srt/managers/scheduler.py", line 169, in init
self.tp_worker = TpWorkerClass(
^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/sglang/srt/managers/tp_worker.py", line 55, in init
self.model_runner = ModelRunner(
^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/sglang/srt/model_executor/model_runner.py", line 150, in init
self.load_model()
File "/usr/local/lib/python3.12/site-packages/sglang/srt/model_executor/model_runner.py", line 257, in load_model
self.model = get_model(
^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/vllm/model_executor/model_loader/init.py", line 19, in get_model
return loader.load_model(model_config=model_config,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/vllm/model_executor/model_loader/loader.py", line 402, in load_model
model.load_weights(self._get_all_weights(model_config, model))
File "/usr/local/lib/python3.12/site-packages/sglang/srt/models/gemma2.py", line 404, in load_weights
raise RuntimeError(
RuntimeError: Some weights are not initialized from checkpoints: {'model.embed_tokens.weight'}
Killed`
Reproduction
CUDA_VISIBLE_DEVICES="3" python -m sglang.launch_server --model-path "/workspace/Asan/model/Gukbap-Gemma2-9B-qlora-1epoch-AWQ" --port 20022 --host 0.0.0.0
Environment
install version: sglang-0.3.5.post2 vllm-0.6.3.post1

This works without any issues
python3 -m sglang.launch_server --model solidrust/gemma-2-9b-it-AWQ

Can you share your checkpoints or try the latest version?

authors: Foreist merrymercy

repo: sgl-project/sglang


text:
Should not print to the terminal when invoked via an API

Acceptance

[ ] When the CLI is invoked via an API, no output is shown to the terminal.

Tasks

[ ] Investigate about good software architecture practices to solve this particular issue (answer the question how should things have been organized from the start...).
[ ] TBC

Analysis

Print statements should be removed when the tool is used via an API: that clutters the server logs and provides no benefit when debugging.
The CLI needs to integrate better with the API with one-to-one mappings (one command → one endpoint).

WONTFIX: Will re-open as needed. 🙂

repo: sglavoie/uol-grades-calculator


text:
Many links are not opening in new tab

I'm not sure if this is a desired flow but I think many links which should ideally open in new tabs are opening in the current tab.
For reference:

The Follow the Tailwind CSS installation instructions to get started. on the https://ui.shadcn.com/docs/installation/manual page should ideally open in a new tab, but it's not.

This issue has been automatically closed because it received no activity for a while. If you think it was closed by accident, please leave a comment. Thank you.

authors: USKhokhar shadcn

repo: shadcn-ui/ui