text:
Fix for deleting non-mbp UTF-8 characters

This fix handles the case where a character defined in a non-bmp area of UTF-8 is deleted (for example a smiley character). Characters defined on non-bmp is represented by 2 characters. Before this fix, the range to remove was incorrectly including one of the two characters.

@tobiassodergren thx for this.
I suppose, we need to put that on our general agenda. I.e. this is probably not the only place where we need to be aware of it.
Thanks for pointing us to an entry point.

Tracked by issue #885

The proposed solution is not enough either, since characters may be a composition:
👨👨👧👧
Family (man, man, girl, girl)
Unicode: U+1F468 U+200D U+1F468 U+200D U+1F467 U+200D U+1F467

authors: oliver---- tobiassodergren


text:
Table GUI editor

Does it have Table GUI editor with rowspan and colspan support?

Not yet, but it is planned.

Visual table editing will be possible with the new release (ready in 1-2 weeks). However, there are no editing tools for inserting rows, merging cells etc. but those will follow with the next release.

source: gharchive/issue

authors: abeq michael

repo: substance/texture

license: mit

license_type: permissive

license_source: bigquery


text:
Integrate Substrate playground into our tutorials

I (Jimmy) will try to integrate playground in off-chain worker tutorial and see how hard this process is

Dupe of 426, now moved to https://github.com/paritytech/substrate.io/issues/1

license_source: github-api


text:
[BUG] Null video_url

I've realized on SOME content on Instagram, videos/reels will have a NULL video_url.
Is there any reason for this? I would say this happens for 20% ish content.

@florifull give an example please

@florifull give an example please

I think I found myself in a similar situation to @florifull
I'm trying to download an image from random post, but the API doesn't return me any URL that can be saved on my PC as an image (not counting the thumbnail - the API gives me a link to it but the quality of that image is poor as we can except).
The link to the example post that doesn't work for me:
https://www.instagram.com/p/CxwqqfOsD-V/?utm_source=ig_web_copy_link
My script:
    urlToPost = input("URL to Post: ")

    postMediaPK = client.media_pk_from_url(urlToPost)
    try:
        postMedia = client.media_info(postMediaPK)
    except LoginRequired:
        resetSessionID()
        loginUser("You need to re-login!")

    if postMedia == None:
        printPurple("Media is None!")
        return

    thumbUrl = str(postMedia.thumbnail_url or "None")
    printPurple("Type: " + getMediaType(postMedia.media_type))
    printPurple("Product Type: " + str(postMedia.product_type or "None"))
    printPurple("Video URL: " + str(postMedia.video_url or "None"))
    printPurple("Video Length: " + str(postMedia.video_duration or "None"))
    printPurple("Amount of resources: " + str(len(postMedia.resources) or "None"))
    printPurple("Thumbnail: " + thumbUrl)

    ## DOESN'T WORK ##
    img = client.photo_download_by_url_origin(urlToPost)
    saveFile('testimg.jpg', img) ## FILE IS CORRUPTED
    ## DOESN'T WORK ##

Output:
URL to Post: https://www.instagram.com/p/CxwqqfOsD-V/?utm_source=ig_web_copy_link
Type: Image
Product Type: feed
Video URL: None
Video Length: None
Amount of resources: None
Thumbnail:
https://scontent-waw1-1.cdninstagram.com/v/t51.2885-15/385174082_251560954545094_3180730719918433015_n.jpg?stp=dst-jpg_e
35_s1080x1080&_nc_ht=scontent-waw1-1.cdninstagram.com&_nc_cat=1&_nc_ohc=KZ_DD89KFBMAX9f8N4N&edm=ALQROFkBAAAA&ccb=7-5&ig_
cache_key=MzIwMjI0Njk3Mjc2NDM0MDExNw%3D%3D.2-ccb7-5&oh=00_AfCByB66n68k6uS170q7EWexcP4_CCQjdG0ATJ9Is2Yjog&oe=651AE623&_nc
_sid=fc8dfb

authors: adw0rd florifull thewolfprod

repo: subzeroid/instagrapi

license: MIT


text:
ActivityNet 1.2 feature

Hi, will you release the feature of ActivityNet 1.2?

@sujoyp @zhenyingfang Hi! Recently, I re-implemented the code of W-TALC on ActivityNet v1.2. I obtain the classification mAP of 94% on ActivityNet v1.2. But the detection performance is bad. Why is that? Is it parameter setting?

We smoothened the output of our model before applying the threshold for detection in ActivityNet1.2.

@sujoyp Thanks for your reply. I appreciate your help very much. I downloaded the features of ActivityNet v1.2. I used the following Settings to get mIOU@0.5=16.62.
def smooth(v):    l = min(351, len(v)); l = l - (1-l%2)    if len(v) <= 3:       return v    return savgol_filter(v, l, 1)  threshold = np.max(tmp) - (np.max(tmp) - np.min(tmp))*0.5
But But when I change the threshold to threshold = np.max(tmp) - (np.max(tmp) - np.min(tmp))*0.7, I got mIOU@0.5 = 33.99. I think it's because the action instances in the ActivityNet v1.2 dataset occupy most of the video and each video contains only 1.5 action instances. So turning the threshold down can get better results. Is there any skill in parameter setting to get the results in the paper?

@Rheelt we actually used the savgol_filter, which is already there in the smooth() function of detectionMAP.py

hi, when I train on ActivityNet v1.2. the  I got mIOU is nan.
how to solve the problem?

hi, when I train on ActivityNet v1.2. the I got mIOU is nan.
how to solve the problem?

@Rheelt we actually used the savgol_filter, which is already there in the smooth() function of detectionMAP.py

hi, when I train on ActivityNet v1.2. the I got mIOU is nan.
how to solve the problem?

@sunsiyang2015 First, check whether detection weight is right. Then, check evaluation code

@sunsiyang2015 First, check whether detection weight is right. Then, check evaluation code

I use the reference evaluation code as same as detectionMAP.py

@sunsiyang2015 First, check whether detection weight is right. Then, check evaluation code

@sujoyp Thanks for your reply. I appreciate your help very much. I downloaded the features of ActivityNet v1.2. I used the following Settings to get mIOU@0.5=16.62.
def smooth(v): l = min(351, len(v)); l = l - (1-l%2) if len(v) <= 3: return v return savgol_filter(v, l, 1) threshold = np.max(tmp) - (np.max(tmp) - np.min(tmp))*0.5
But But when I change the threshold to threshold = np.max(tmp) - (np.max(tmp) - np.min(tmp))*0.7, I got mIOU@0.5 = 33.99. I think it's because the action instances in the ActivityNet v1.2 dataset occupy most of the video and each video contains only 1.5 action instances. So turning the threshold down can get better results. Is there any skill in parameter setting to get the results in the paper?

@sujoyp Thanks for your reply. I appreciate your help very much. I downloaded the features of ActivityNet v1.2. I used the following Settings to get mIOU@0.5=16.62.
def smooth(v): l = min(351, len(v)); l = l - (1-l%2) if len(v) <= 3: return v return savgol_filter(v, l, 1) threshold = np.max(tmp) - (np.max(tmp) - np.min(tmp))*0.5
But But when I change the threshold to threshold = np.max(tmp) - (np.max(tmp) - np.min(tmp))*0.7, I got mIOU@0.5 = 33.99. I think it's because the action instances in the ActivityNet v1.2 dataset occupy most of the video and each video contains only 1.5 action instances. So turning the threshold down can get better results. Is there any skill in parameter setting to get the results in the paper?

I use the reference evaluation code as same as detectionMAP.py, but the result is nan.

@sujoyp Hi ! Thanks for your excellent work. Can you share the parameter (window length) of savgol_filter?

authors: Rheelt StrongGong sujoyp sunsiyang2015 zhenyingfang

repo: sujoyp/wtalc-pytorch


text:
Can not manage users without contact

As there is only a list of contacts in the backend.
Users without a linked contact are not visible in the backend and can not be managed.

as talked with @chirimoya the user contact should not be nullable

repo: sulu-io/sulu


text:
支持自行替换Tesseract模型

大佬还在维护吗
框架已经很好了
能否支持自行替换Tesseract模型

项目还在维护。如果要替换模型的话把训练后的数据复制到 /installation-path/app/tessdata 文件夹中


text:
United Kingdom Number Name Not Show

United Kingdom Number Name Not Show
Like truecallerjs -s 4475985436xx --name
output Unknown

This package won't really extract the  name of a person with phone number. It will extract  the name as per the Truecaller database. If it is unknown, then there is no information about that number.

repo: sumithemmadi/truecallerjs


text:
🛑 MAIL HOME is down

In 53c8f53, MAIL HOME (https://mail.diegorende.com.ar) was down:

HTTP code: 0
Response time: 0 ms

Resolved: MAIL HOME is back up in 7c156c1.


text:
Code for original Textrank algorithm (without similarity function optimizations)

Hi,
Is it possible to get the python implementation of original Textrank algorithm? or
Can you suggest the changes that need to be done in the existing code for original Textrank?
I need to compare the summaries produced by both variations.
Thanks in advance

Hi,
The version that is in this repository follows the original implementation of TextRank.
You can have a look at the source code to calculate the similarities:
https://github.com/summanlp/textrank/blob/master/summa/summarizer.py#L41
The version that we added on Gensim uses the optimizations, with the Okapi BM25 function.
You can verify that in the source code in:
https://github.com/RaRe-Technologies/gensim/blob/develop/gensim/summarization/summarizer.py#L79
Best,
Fede

repo: summanlp/textrank


text:
Lua.workspace.ignoreDir behaves not same as gitignore

Describe the bug
in lua-language-server v2.4.8 , Lua.workspace.ignoreDir setting not work sometimes.
for example:
mydir:
root/
  file.lua
  sub/
   file.lua

root/sub/file.lua will not be preload by setting like this:
"Lua.workspace.ignoreDir":
[
   "*.lua",
   "!sub/*.lua"
]

but will be preload if config in .gitignore:
*.lua
!sub/*.lua

Environment (please complete the following information):

OS: Windows

Log
use Lua.workspace.ignoreDir setting
[11:05:53.803][info] [#0:script\workspace\workspace.lua:330]: Preload start.
[11:05:53.803][info] [#0:script\workspace\workspace.lua:89]: Ignore by exclude:	**/CVS
[11:05:53.803][info] [#0:script\workspace\workspace.lua:89]: Ignore by exclude:	**/Thumbs.db
[11:05:53.803][info] [#0:script\workspace\workspace.lua:89]: Ignore by exclude:	**/.git
[11:05:53.803][info] [#0:script\workspace\workspace.lua:89]: Ignore by exclude:	**/.svn
[11:05:53.803][info] [#0:script\workspace\workspace.lua:89]: Ignore by exclude:	**/.DS_Store
[11:05:53.803][info] [#0:script\workspace\workspace.lua:89]: Ignore by exclude:	**/.hg
[11:05:53.803][info] [#0:script\workspace\workspace.lua:134]: Ignore directory:	!sub/*.lua
[11:05:53.803][info] [#0:script\workspace\workspace.lua:134]: Ignore directory:	*.lua

use .gitignore
[11:16:38.100][info] [#0:script\workspace\workspace.lua:330]: Preload start.
[11:16:38.100][info] [#0:script\workspace\workspace.lua:89]: Ignore by exclude:	**/CVS
[11:16:38.100][info] [#0:script\workspace\workspace.lua:89]: Ignore by exclude:	**/Thumbs.db
[11:16:38.100][info] [#0:script\workspace\workspace.lua:89]: Ignore by exclude:	**/.git
[11:16:38.100][info] [#0:script\workspace\workspace.lua:89]: Ignore by exclude:	**/.svn
[11:16:38.100][info] [#0:script\workspace\workspace.lua:89]: Ignore by exclude:	**/.DS_Store
[11:16:38.100][info] [#0:script\workspace\workspace.lua:89]: Ignore by exclude:	**/.hg
[11:16:38.116][info] [#0:script\workspace\workspace.lua:99]: Ignore by .gitignore:	*.lua
[11:16:38.116][info] [#0:script\workspace\workspace.lua:99]: Ignore by .gitignore:	!sub/*.lua

compare the log, I realize that maybe it is the config order result in bug.
this worked for me.
"Lua.workspace.ignoreDir":
[
   "!sub/*.lua",
   "*.lua"
]

repo: sumneko/lua-language-server


text:
Lua does not support this grammar (with some assignment operators in LuaU)

LuaU is a gradually typed embeddable scripting language derived from Lua which you can read on here.
I know it isn't regular lua 5.4+ but it adds some extra assignment operators that lua is yet to add, which can be found in most other programming languages such as +=, -=, *=, /= etc
I couldn't find a "quick fix" for it appearing as a grammatical error, I tried to disable linting on them but it didn't work either, could you add support for these operators or an option to ignore highlighting?

Oh I just saw the "Nonstandard Symbol" options in settings, nevermind.
Though prechecking parameters being highlighted like function name(a : nil, b : string) is something I still can't find a fix for.

Oh I just saw the "Nonstandard Symbol" options in settings, nevermind.
Though prechecking parameters being highlighted like function name(a : nil, b : string) is something I still can't find a fix for.

see https://github.com/sumneko/lua-language-server/wiki/Plugin-(Experimental)

Where do I put that in the plugin folder, does it need to be a function of the module being returned?
Also how do I stop this from happening I accidentally enabled semantic tokens

repo: sumneko/vscode-lua


text:
Ram DT: check EPS firmware explicitly to set minEnableSpeed to 0

The upstream method to check if the first 4 characters of the EPS firmware are smaller than or equal to the defined bounds to set minEnableSpeed = 0. would not work for some Ram DT.
Affected route: 001ccccec7a1992c|2023-06-07--21-25-45
EPS FW: b'21590101AA'
Only allow minEnableSpeed = 0. for the EPS firmware that is known to allow enable steering at 0.

The affected users verified that the change allows the EPS to steer under the defined conditions.

source: gharchive/pull-request

repo: sunnyhaibin/sunnypilot


text:
Derivatives of the nuclear attraction integral

My understanding is that there are two components to this derivative: ⟨i|∇nuc|j⟩ and ⟨i|nuc|∇j⟩. If that's the case I have a few questions on libcint usage:

For basis function not centered on the atom being displaced, how do I compute the ⟨i|∇nuc|j⟩ contribution only?

When computing gradients with cint1e_ipnuc_sph is ⟨i|nuc|∇j⟩ the only term included?

Thank you!

cint1e_ipnuc_sph is the derivatives of electron coordinates. You would need to transform it to derivatives of nuclear coordinates with a minus sign due to the bindings r - R between electron coordinates and nuclear coordinates in GTO basis. cint1e_ipnuc_sph only includes ⟨∇i|nuc|j⟩. You can transpose the integrals tensor to get ⟨i|nuc|∇j⟩ .Then computing ⟨i|∇_R nuc|j⟩ = -⟨∇_R i|nuc|j⟩ - ⟨i|nuc|∇_R j⟩ = ⟨∇ i|nuc|j⟩ + ⟨i|nuc|∇ j⟩
For basis off the atom center, derivatives can be computed with the similar indirect methods.

authors: gustavojra sunqm

repo: sunqm/libcint


text:
Error Domain=NSURLErrorDomain Code=-1011 "There was a bad response from the server."

Loop receiving NSURLErrorDomain error
Error Domain=NSURLErrorDomain Code=-1011 "There was a bad response from the server."
I am following the ReadMe.md and trying to init realtime connection, but only receive error as above. I checked the source code and look like there is no place to attach access_token to the connection. I believe that is the main reason of the error ( but not really sure yet)
To Reproduce

Create an iOS sample project with Xcode
Add package supabase realtime-swift
Follow their ReadMe.md to declare the client instance and try to init the connection.

Screenshots

System information

Version of supabase realtime-swift: 0.0.2

I am having the same issue, were you able to figure this out?

I ran into this issue when I incorrectly forgot to add the realtime/v1/ to the endpoint parameter.
From the logs you posted, it seems that you put /auth/v1 rather than realtime/v1
bad:
RealtimeClient(endpoint: "http://myprojectname.supabase.co/")

works:
RealtimeClient(endpoint: "http://myprojectname.supabase.co/realtime/v1")

authors: danhdevelop kurtguenther malachif-jpg

repo: supabase-community/realtime-swift


text:
[SuperTextField] Expose IME configuration (Resolves #1109)

[SuperTextField] Expose IME configuration. Resolves #1109
Currently, we can configure the textfield's textInputAction but we can't configure other IME aspects, like keyboard type and autocorrection.
This PR  introduces a SuperTextFieldImeConfiguration, which users can use to configure the IME. As both SuperTextFieldImeConfiguration and textInputAction configures the input action, the textInputAction is being deprecated.
I added an attachToImeWithConfig method in ImeAttributedTextEditingController instead of changing the existing method to avoid a breaking change. If we should just change attachToIme then I can make this change.

@matthew-carroll Rebased to fix the failing tests.


text:
AttributedSpans equality check disregards order of attributions

Closes https://github.com/superlistapp/super_editor/issues/270

Does VSCode have a setting to format lines at 120 characters?

@britannio it has nothing to do with VSCode. But you can change the dart format line wrap in settings :)

Cool, I created https://github.com/superlistapp/super_editor/pull/272 so I don't have to run the dart format command manually.

@britannio Of course not what I was suggesting :) Nice PR - I meant the user settings.

Can you add a test to the appropriate test file that verifies unordered equality?

@matthew-carroll Just added the tests!

Thanks for the feedback! Hopefully, I've addressed it all.


text:
Detailed information about failed tests is not shown in Sauce labs 'JSUnit' tab

\cc @AlexanderMoskovkin

I'll fix it soon

Fixed in the qunit-harness@0.1.21

authors: AlexanderMoskovkin inikulin miherlosev

repo: superroma/testcafe-hammerhead


text:
Missing buttons

"YELLOW" button missing in source either in Readme
"ok" button missing in Readme

Is there any plan for OK button, that is a blocker for us to use this library. Any plans to incorporate it?

The README.md has been since updated with the 4 color buttons.

authors: IvanI3 engineerPapa supersaiyanmode

repo: supersaiyanmode/PyWebOSTV


text:
Gradle doesn't run itself

Hello,
I'm a French student, and I tried to use SWIG with Android Studio by following your instructions:
https://github.com/sureshjoshi/android-ndk-swig-example
When I finished all those steps, I did not succeed to launch my Application, because there is no  possibly to run it (the run button is grayed out). So, I tried again to build this project following your instructions, and I found out that when I launch Android Studio after git clone, the gradle doesn't run by itself. Instead, a Setup Sdk link appears at the top right corner of the main window (see below)?

When you state "let Gradle run", I assume that it's automatically started by Android Studio isn't it?
To try to understand the problem I compared a working Android Studio project with the result of your sample. As you can see below, there are quite a few differences about the color of the folders:

Sorry for my poor English and thank you very much in advance.

Hi, sorry, this got buried in my email.
Did you ever get it sorted out?

@LudovicRansau looks like you didn't succeed with runSwig step. The step ./gradlew runSwig will build all required files into com/sureshjoshi/core folder. Sure, SWIG should be installed in your system.
That yellow bar is exactly about the step this creates local.properties and the sdk.dir. After that you have to go into terminal (a separate application or right here in Android Studio, the tab at the left bottom corner of your screenshot), and execute ./gradlew runSwift command.
After that you will be able to start the app. Completed this quest by myself today 😄

Hi, this is no longer an issue in AS 2 or AS3

authors: LudovicRansau dstd sureshjoshi

repo: sureshjoshi/android-ndk-swig-example


text:
First try of a plugins system

Implemented only for LiveView.
Only mount
Dummy implemenation

No global plugins

Good point. You convinced me to be more explicit with the plugin macro or passing the plugins as an option to  use Surface.LiveView, pluings: []

I'm having second thoughts about allowing plugins to define their own options to prop, data, etc.

I agree. I allowed plugins to modify the list of options because for, let's say, core plugins, I would not force the user to be verbose for default and temporary options. By hardcoding these two options, we are coupling it to the plugins system. That being said, it could be a tradeoff.
Regarding the two propositions of how passing options to plugins, I am wondering if we could avoid the plugin macro and infer the list of plugin based on the options that are passed to data
Instead of
data items, :list, options_for: [{MyPlugin, some_option: ...}]

plugin MyPlugin

We could have
data items, :list, plugins: [{MyPlugin, some_option: [...]}]

Why did you define options by data? I suppose we could have different options for different data but I do not find a concrete example in mind... Why should a plugin act differently depending on the data?
data items, :list, options_for: [{MyPlugin, some_option: ...}]
data contacts, :list, options_for: [{MyPlugin, some_option: ...}]

If it is not needed, I believe we could have a less verbose syntax:
plugin MyPlugin, opts_one
plugin MyPlugin, opts_two

data items, :list, plugins: [MyPluginOne, MyPluginTwo]

If I have to choose, I prefer the syntax where I do not have to scroll up and down to have the full info about a data.
data items, :list, options_for: [{MyPlugin, some_option: ...}]

I agree. I allowed plugins to modify the list of options because for, let's say, core plugins, I would not force the user to be verbose for default and temporary options. By hardcoding these two options, we are coupling it to the plugins system. That being said, it could be a tradeoff.

I'm fine to have temporary as built-n since it also a built-in feature in LV itself.
This whole plugin thing overlaps with the idea of data providers too. As far as I can see, all examples we have could be implemented as data providers too. This topic keeps coming back as @olivermt mentioned in https://github.com/surface-ui/surface/issues/260#issuecomment-821995260 so maybe we should discuss the whole thing if we want to have a consistent API. A data provider behaviour would have a very similar set of callbacks.

@Malian another solution would be to use a module attribute to add metadata to data instead of manipulating the options. Something like:
@plugin MyPlugin
data items, :list

with options:
@plugin {MyPlugin, opt1: "whatever", opt2: "other stuff"}
data items, :list

Or if we go with the data provider approach:
@provider {PubSub, key: "items_from_pubsub"}
data items, :list

That information would not be available in the same set of the built-in options but in a separate data structure, e.g. metadata or plugin_metadata or provider_metadata.

I have read the test that was added, and I am still not quite clear on what the usecase for a Plugin is.
Do you have a better non-abstract example of what MyPlugin could do?

Do you have a better non-abstract example of what MyPlugin could do?

@olivermt plugins are basically just a way to inject common code into components/LV's callbacks. Currently, we hardcode that common code at compile-time. With plugins, we just have to hardcode the basic plugin logic that iterates over the plugins list. This way any other logic that adds a specific feature can be isolated in a separate module. Here are the 3 built-in plugins we could identify:
https://github.com/surface-ui/surface/blob/589f968ec3ad91434dc28d63d6b7581e9f834681/lib/surface.ex#L162-L164
Other plugins could then be configured by the user, for instance, an AuthPlugin that automatically do all the logic related to authentication.
@Malian maybe we need both abstractions. Plugins for things that are not directly related to any specific data and Data Providers for those features that add behaviour to a single data.
Data provider config should be added individually for each data. Like:
@provider {PubSub, key: "items_from_pubsub"}
data items, :list

and Plugin config should be added alongside the plugin definition:
plugin Auth, user_data: :current_user, ...

Plugins should probably also have a callback to inject code in the component itself. This way they could add their own data definitions or anything else they need.

Here are some thoughts based on the project I am working on. No need for answers ;)
I am working on a client project wherein most of the live views I have to:

Check that the user is logged in

If the user is logged in, assign some defaults: current_user and current_company where current_company depends if current_user has been set or not.
If the user is not logged id, redirect him to the log in page

Assign default values that come from database and/or modules

Simple as assign(:values, Context.list_values())
I also have to perform simple transformations on these data (sorting, prepare data for views, etc.)
I also have to assign default assigns based on value from other assigns. The interesting thing here is that these transformations should be applied several times depending on some parameters that could be changed by the end-user.

Here is an example of a simple live view that implements all these cases.
defmodule MyLiveView do
  use Surface.LiveView

  data current_user, :struct
  data current_company, :struct
  data my_list, :list
  data my_sorted_list, :list

  data var1, :string, default: "var1"
  data var2, :string, default: "var2"
  data my_dynamic_list, :list

  def mount(_params, session, socket) do
    socket =
      socket
      |> assign_defaults() # Will check if user is logged in + assign current_user + redirect if not logged in
      |> assign_my_list()
      |> assign_my_sorted_list()
      |> assign_my_dynamic_list()

    {:ok, socket}
  end

  defp assign_my_list(socket) do
    {:noreply, assign(socket, :my_list, MyList.list_lists()}
  end

  defp assign_my_sorted_list(socket) do
    {:noreply, assign(socket, :my_sorted_list, Enum.sort(MyList.list_lists(order: :name), &sort_my_list)}
  end

  defp assign_my_dynamic_list(socket) do
    {:noreply, assign(socket, :my_list, MyList.list_lists(socket.assigns.var1, socket.assigns.var2))}
  end

  def handle_event("update_my_dynamic_list", %{"var1": var1, "var2": var2, socket) do
    socket =
      socket
      |> assign(:var1, var1)
      |> assign(:var2, var2)
      |> assign_my_dynamic_list()

    {:noreply, socket}
  end

end

All of these examples can indeed be implemented as data providers but several concerns pop in my mind:

I do not want to write data current_user, :struct and data current_company for all my live views. That being said, I am afraid losing some clarity if we let the user define data without explicitly declare it. Moreover, it could be implemented as a data provider but not sure it is the right way to do as, some side effects exist in that kind of data provider like redirection.
current_company is a value computed based on current_user so it could be a data provider that references a key from another data that comes from another data providers... It means that data should be computed in the same order, every time.
my_sorted_list could be implemented as a local provider simple as &assign_my_sorted_list
my_dynamic_list is a computed data based on other data
How to differentiate a simple provider that does not require any reference to socket, etc. than providers that require reference to assigns, socket, session, etc. ?

Let's try to rewrite the above example with the above propositions:
defmodule MyLiveView do
  use Surface.LiveView

  @provider MyAuth
  data current_user, :struct

  @provider ??? No idea what could be a simple syntax to reference a key from another data/prop
  data current_company, :struct

  @provider &MyList.list_lists/0
  data my_list, :list

  @provider &assign_my_sorted_lists/1
  data my_list, :list

  data var1, :string, default: "var1"
  data var2, :string, default: "var2"

  @provider &assign_my_dynamic_list/1, data: [:var1, :var2]
  data my_dynamic_list, :list

  defp assign_my_sorted_list(socket) do
    {:noreply, assign(socket, :my_sorted_list, Enum.sort(MyList.list_lists(order: :name), &sort_my_list)}
  end

  defp assign_my_dynamic_list(socket) do
    {:noreply, assign(socket, :my_list, MyList.list_lists(socket.assigns.var1, socket.assigns.var2))}
  end

  def handle_event("update_my_dynamic_list", %{"var1": var1, "var2": var2, socket) do
    socket =
      socket
      |> assign(:var1, var1)
      |> assign(:var2, var2)
      |> assign_my_dynamic_list()

    {:noreply, socket}
  end

end

I am indeed wondering if we should have two abstractions. One for provider and one for plugins as suggested but I am a little bit lost of what could be other examples of plugins instead of the default ones:

InitializeSurface
Default assigns <-- Could be a provider too
Temporary assigns

but I am a little bit lost of what could be other examples of plugins instead of the default ones

@Malian I think any functionality that requires interaction with the socket through life-cycle callbacks or event handlers may be a good candidate. Let's take this example from the Uploads guide.
A plugin could be responsible for most (or even all) that common logic. We could define different types of uploads, e.g. local or S3 and then ask for different configuration options that could be used by the plugin to fill the gaps, in this case, the non-generic pieces for each type of upload. For instance, the local one, could the set as something like:
plugin Upload,
  name: :avatar,
  uploaded_entries: :uploaded_files,
  accept: ~w(.jpg .jpeg),
  dest: "priv/static/uploads"

We don't even have to address all possible scenarios. The user can still implement it manually if necessary. However, if this could work for most common scenarios by just adding a plugin entry + injecting a couple of components, that would be awesome ;)

@Malian do you think we could have a simpler version of this feature but instead of loading the plugins with Application.get_env(:surface, :plugins, []) we could use an explicit API? For instance, either:
use Surface.Component

plugin ThePlugin,  opt1: ...,  opt2: ...

or
use Surface.Component, plugins: [
  {ThePlugin,  opt1: ...,  opt2: ...},
  ...
]

It seems to me that even if we keep it as just a private API for now, allowing us to move the logic that is injected in the different components into their related plugins, it will already be an improvement from the design PoV.
Also, besides the builtin-in plugins you already identified, I'm planning to add another one to handle Surface Catalogue's examples/playground's common behaviour.
I'd also like to make some experiments with the previously mentioned Upload plugin. I've seen many people having trouble setting up the uploads properly. It might be worth it to give it a try. WDYT?

@msaraiva I'll try to do this next weekend.

@msaraiva Quick update. I have a version that handles both LiveComponent and LiveView with the following callbacks:

before_mount_live_view
after_mount_live_view
before_mount_live_component
after_mount_live_component
before_update_live_component
after_update_live_component

I didn't add the callback for Component as I am waiting to know what we will do with #400
I have to add some tests as I moved some part of the code into plugin ,but the tests still pass even without the plugins activated, strange... I'll also clean it before updating the branch.
I'll do this in the next few days.

@Malian that's great news! I'm excited about the possibilities this might bring.

I have to add some tests as I moved some part of the code into plugin ,but the tests still pass even without the plugins activated, strange...

Very strange 🤔

@msaraiva & @miguel-s I updated the code to the last working version I have on my computrer. Actually, you can pass options to the plugin but these options are not used yet, and are not part of the API. It is quite easy to fix.
If you disabled the RestorePrivateAssignsPlugin from LiveComponent all the test remain green :thinking:
Feel free to start from scratch or from this branch if you want to go further with the plugin system.
Here are some thought:

This does not work for stateless Component
Order matters! Actually, there is no way to execute a plugin before the defaults ones.
The API should be reviewed:

Should we pass the module as the first argument or through options? etc.
How should we pass options?
Should we define a %Plugin{} struct that handles the env? Something like: %Plugin{module: MyLiveView, opts: [...]}. I believe so.

There are lack of duplicated code in this version and there is a lack of tests
There is no callback for handle_event. It is probably something we should add with an Upload plugin @msaraiva

Feel free to comment and ask questions, I would be glad to help to go further with this feature.

@Malian thanks for working on this. I'll certainly give it a try this week ;)

I'm closing this since LV will support something similar in the next version. If it turns out it's not what we want, we reopen it :)

authors: Malian msaraiva olivermt

repo: surface-ui/surface


text:
added version control option to benchmark

Abstract
Add mqtt version control option to benchmark
Description
In this p-r, I add below options:

version: mqtt protocol version to use

Example
$ GOMAXPROCS=2 go test -run=TestFan -vv=2 -logtostderr=true -host localhost -port 1884 -user "" -pass "" -version 3

plz check this p-r.

Will do over the wkend. Sorry for the delay.

Thx!

authors: muddydixon zhenjl

repo: surgemq/surgemq


text:
Refactor SmartUnmarshal

SmartUnmarshal output has changed to array
SmartUnmarshal now supports non-arr normal, arr normal and arr raw
fix Typo
fix #79

Added new code packages for clean up of the code and made modules smaller to consume by other go modules.
Refactor RawUnMarshal to use with RawQuery generic for getting status and other elements that were not possible before.

The changes look good and the code is more readable.

SmartUnmarshal output shouldn't be changed to array, a fair complex project will have most surql code in BEGIN; ... COMMIT; block, and it returns exactly what it returns, RETURN {...} returns an object, RETURN true returns a boolean.  Whether the output should be array depends on user's demands, driver shouldn't do that

SmartUnmarshal output shouldn't be changed to array, a fair complex project will have most surql code in BEGIN; ... COMMIT; block, and it returns exactly what it returns, RETURN {...} returns an object, RETURN true returns a boolean. Whether the output should be array depends on user's demands, driver shouldn't do that

Yeah, you are right, I will look into this but for now we have bigger issues thanks for the feedback I will put this on the list.

SmartUnmarshal output shouldn't be changed to array, a fair complex project will have most surql code in BEGIN; ... COMMIT; block, and it returns exactly what it returns, RETURN {...} returns an object, RETURN true returns a boolean. Whether the output should be array depends on user's demands, driver shouldn't do that

Yeah, you are right, I will look into this but for now we have bigger issues thanks for the feedback I will put this on the list.

I'll contribute and make changes, I kind of need this to work now
Thank you

SmartUnmarshal output shouldn't be changed to array, a fair complex project will have most surql code in BEGIN; ... COMMIT; block, and it returns exactly what it returns, RETURN {...} returns an object, RETURN true returns a boolean. Whether the output should be array depends on user's demands, driver shouldn't do that

Yeah, you are right, I will look into this but for now we have bigger issues thanks for the feedback I will put this on the list.

Never mind, I just see that multiple results can be returned from raw query, your code is the only way to handle that.  I'll just make a function to handle single result case locally in my code.

this code will break in this case though: [map[result:true status:OK time:4.219606ms]], because RawQuery result field is set to []i .
also it doesn't handle throw error, which is this case: [map[result:An error occurred: blocked status:ERR time:4.219606ms]]

authors: ElecTwix agufagit timpratim


text:
Other resources to help with rewriting

https://github.com/kamalkech/sveltekit-graphql/blob/main/src/routes/graphql.ts
https://dev.to/vibhanshu909/how-to-add-a-graphql-endpoint-into-a-sveltekit-app-40jh
https://github.com/mercurius-js/mercurius

@babichjacob What needs to be rewritten and why?  Perhaps the README could be updated a bit with a paragraph of this information about some ROADMAP that exists in your mind or somewhere.  Or make a GitHub Project and link to it on the README?  That might help understand the current state of things, and what the future state needs to be and possibly how to get there...so that others can contribute to help against that ROADMAP.

authors: babichjacob thadguidry

repo: svelte-add/graphql-server


text:
Discrepancy in @html directive regarding script tags

Describe the bug
When having a string like <script>alert(1);</script> inserted to a {@html stringWithScriptTag}, the script gets evaluated when refreshed on the page or the user gets to the page via a link with rel="external". It does not get evaluated when you follow a link without rel="external" to the page.
Reproduction
Here is a reproducer on sveltelab.dev with two pages where page2 includes the script injection.
Logs
No response
System Info
System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.18.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm
    pnpm: 8.14.0 - /usr/local/bin/pnpm
  npmPackages:
    @sveltejs/adapter-auto: ^3.0.0 => 3.1.1
    @sveltejs/kit: ^2.0.0 => 2.4.1
    @sveltejs/vite-plugin-svelte: ^3.0.0 => 3.0.1
    svelte: ^4.0.5 => 4.2.9
    vite: ^5.0.0 => 5.0.12

Severity
serious, but I can work around it
Additional Information
For my use case, I would be happy if script injections would be always allowed, but I would understand to disallow them always. It doesn't feel right to me that it behaves differently depending on how the user switches to the page in question though. I didn't see this documented somewhere, so I tested it and saw this happening.

Btw, on Discord, khromov shared a potential workaround:
Use the onMount to inject a third party script on the page:
const script = document.createElement('script');
script.src = 'https://example.com/external-script.js';
script.type = 'text/javascript';
document.body.appendChild(script);

repo: sveltejs/kit


text:
svelte-package: svelte-5: Using ComponentConstructorOptions in svelte.d.ts after running svelte-package

Describe the bug
After running pnpm package, and checking a created svelte.d.ts file, it uses ComponentConstructorOptions with stroke line on VSCode.
'ComponentConstructorOptions' is deprecated.ts(6385)
index.d.ts(3, 5): The declaration was marked as deprecated here.

Reproduction
Create a sample component, lib/Mycompo.svelte:
<script lang="ts">
  interface Props {
    firstName: string;
    lastName: string;
  }
  let { firstName, lastName }: Props = $props();
</script>

<p>
  Hello {firstName} {lastName}
</p>

In lib/index.ts:
export { default as MyCompo } from './MyCompo.svelte'

Run pnpm package and check dist/MyCompo.svelte.d.ts
Logs
No response
System Info
System:
    OS: macOS 14.6
    CPU: (10) arm64 Apple M2 Pro
    Memory: 43.16 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.14.0 - ~/.nvm/versions/node/v20.14.0/bin/node
    npm: 10.7.0 - ~/.nvm/versions/node/v20.14.0/bin/npm
    pnpm: 9.4.0 - /opt/homebrew/bin/pnpm
    bun: 1.1.8 - ~/.bun/bin/bun
  Browsers:
    Chrome: 126.0.6478.62
    Edge: 126.0.2592.68
    Safari: 17.6
  npmPackages:
    @sveltejs/adapter-auto: ^3.2.2 => 3.2.2
    @sveltejs/kit: ^2.5.17 => 2.5.17
    @sveltejs/package: ^2.3.2 => 2.3.2
    @sveltejs/vite-plugin-svelte: ^3.1.1 => 3.1.1
    svelte: 5.0.0-next.162 => 5.0.0-next.162
    vite: ^5.3.1 => 5.3.1

Severity
annoyance
Additional Information
No response

This is intentional. The component is a function in svelte 5 and the constructor signature is kept for compatibility. See https://github.com/sveltejs/svelte/pull/11775 for the reasoning. Is there a specific reason why you don't want to see it or you just find that unexpected?

No, this is intentional for backwards compatibility as the linked issue explains. We want to output both so that people can use it both way. This will be removed once Svelte 4 syntax is no longer be usable in a future major version of Svelte.
Does this output cause any issues for you in practise? Or is it just that you're wondering why it's using a deprecated syntax?

Thanks. I just wanted to clarify. Since VSCode uses the line stroke, I thought I was doing something wrong.

authors: dummdidumm jasonlyu123 shinokada


text:
[docs] clarification needed if and how SvelteKit is deployable to multi-node/cluster environments such as Kubernetes and its implication on, e.g., sessions

Describe the problem
From the docs, in particular the part about $app/stores, it is not clear how we can deploy Sveltekit in multi-node environments such as Kubernetes.
With express I would store session data on a database, single instance or replicated and get always the session from there. Hence, I can scale express indefinitely since it stays stateless. Is this also possible with SvelteKit? Meaning Svelte's session store would always get the session data from a db before it answers the request?
A simple chart of such an architecture:

The problem behind: Even if some cluster orchestration software allows to create sticky sessions, so requests hit the same node, it is not always possible to solve this problem on the cluster layer (e.g., when using BGP, autoscaling down, etc.) and it's in general more complicated than just storing the sessions on the db if latter is fast.
Describe the proposed solution
A paragraph in the docs stating if deploying to a multi-node cluster is possible and/or what trade-offs would be encountered (assuming the cluster layer does not offer sticky sessions).
Alternatives considered
No response
Importance
would make my life easier
Additional Information
No response

Session handling is left up to you, using the provided hooks. In the configuration you're describing, you would write a handle hook runs first, takes the request, and extracts (for example) a session ID from a cookie and attaches that session ID to request.locals. Then the getSession hook would run, talk to the database and fetch the session data given the session ID, and return an object with the session data that the client should see (which will populate the $session store on the client). (Note: You could also do the DB query in the handle hook rather than the getSession hook, depending on whether you want that session data loaded for endpoints or just for pages. The best way to do that will depend on your app and what precisely you store in the session.)
Which means that scaling up would not be a problem, because session data would always be fetched from the DB service no matter which node answered the request.

Ok, glad to hear and to summarize:

To "sessionize" a page => in handle, do extract the session ID from the cookie and enrich request.locals, in getSession get session data from db and return in order to populate the $session store in the client
To sessionize an endpoint => do all above in handle and before returning the endpoint's response; reason: the response depends very much on the session data in a typical app, .e.g,, the settings json of an individual user

Did I get it right?


text:
set env vars before postbuild analysis

closes #8646
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

[x] It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
[x] This message body should clearly illustrate what problems it solves.
[x] Ideally, include a test that fails without this PR but passes with it.

Tests

[x] Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

[x] If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. Changesets that add features should be minor and those that fix bugs should be patch. Please prefix changeset messages with feat:, fix:, or chore:.

confident in this PR so i'm gonna merge it otherwise #8636 will be a PITA


text:
I suggest pinning SvelteKit version to avoid breaking change error

Hello,
What do you think to pin SvelteKit version in examples/* to avoid breaking change error like this?
Best regards,
Stéphane

I would rather update the dev script to vite dev in examples… i think better to stay up to date and include all new features bug fixes etc..

authors: jarda-svoboda stephane-klein


text:
Added elapsed time, duration, status, keys and roles

Hi,
i am working on iQontrol, especially on a MediaPlayer-Widget. For that reason i added a few features i was in need of to your great adapter.
This PR adds:

a new folder 'keys' wich contains buttons for every valid value for "KEY"
inside the playNow-Folder datapoints for time (= elapsed time of acutal track), total (= duration of actual track) and playing-status
added roles to some datapoints (like media.artist, media.album, ...)

This solves https://github.com/SwedishChef/ioBroker.bosesoundtouch/issues/43
I hope you don't mind that i forked your adapter and that you like these changes. If you do, it would be great if you could merge these changes.
Many thanks,
Sebastian

Sorry, this bugfix is necessary as it fixes sending of PRESET_1, ..., PRESET_6 only as key "release" - this ist necessary because otherwise the preset is overwritten instead of called.
Greetings

One further extention: Added shuffle and repeat.
Now everything works for my setup.
Best regards, Sebastian

Another extention: the play_everywhere-feature did not work for me, with these changes it works and even recognizes if the play_everywhere-feature is started from another app.
Greetings

I saw a lot of the issues that you fixed in your PR too, So I'm wondering if @SwedishChef is still active here?

I saw a lot of the issues that you fixed in your PR too, So I'm wondering if @SwedishChef is still active here?

I merged the PR and adapted version info - unfortunately Travsi CI totally fails ;-(
Could anyone have a look to fix this as I don't have the complete setup available at the moment.  Thx.

I merged the PR and adapted version info - unfortunately Travsi CI totally fails ;-(
Could anyone have a look to fix this as I don't have the complete setup available at the moment.  Thx.

@sbormann
As I no longer use ioBroker I would be happy to hand over this adapter code to another developer. Are you willing to take over?

@sbormann
As I no longer use ioBroker I would be happy to hand over this adapter code to another developer. Are you willing to take over?

Hi, thank you for asking me!
But maybe its better to ask the iobroker-community to take over the adapter, then multiple developers can participate.
All you have to do is create an issure here and alk them to take over:
https://github.com/iobroker-community-adapters/info/issues
Many thanks and greetings!

Hi, thank you for asking me!
But maybe its better to ask the iobroker-community to take over the adapter, then multiple developers can participate.
All you have to do is create an issure here and alk them to take over:
https://github.com/iobroker-community-adapters/info/issues
Many thanks and greetings!

Hi, thank you for asking me!
But maybe its better to ask the iobroker-community to take over the adapter, then multiple developers can participate.
All you have to do is create an issure here and alk them to take over:
https://github.com/iobroker-community-adapters/info/issues
Many thanks and greetings!

As you already might have noticed @sven-s-ter took over to maintain this adapter ;-)
Thanks a lot for this!

Hi, thank you for asking me!
But maybe its better to ask the iobroker-community to take over the adapter, then multiple developers can participate.
All you have to do is create an issure here and alk them to take over:
https://github.com/iobroker-community-adapters/info/issues
Many thanks and greetings!

As you already might have noticed @sven-s-ter took over to maintain this adapter ;-)
Thanks a lot for this!

Thanks a lot, thats a perfect solution.
Best wishes, Sebastian

Thanks a lot, thats a perfect solution.
Best wishes, Sebastian

authors: Aron4u SwedishChef sbormann


text:
broken invoices

invoices is broken, and the user/admin has no way to close the "semi-unclosed" invoices.

somehow the bill "reopens" when opening other events

should be fixed with 151d46cc71b7180926ac6252cb146faafacfcd23 needs further testing

repo: svennd/alies


text:
Can't seem to get it working

Here's the gulp file.js:
// gulp-svg-sprite
svgSprite = require('gulp-svg-sprite');
let spriteConfig = {
  mode: {
    css: {
      render: {
        css: true
      }
    }
  }
};
gulp.task('sprites', function () {
  return gulp.src('**/.*.svg', {cwd: 'source/images'})
    .pipe(svgSprite(spriteConfig))
    .pipe(gulp.dest('source/test'));
});

// end gulp-svg-sprite

the directory is

foo
--source
----images
--gulpfile.js

Obviously there are more folders than that, but this is all that's relevant to now.
I've tried doing ./source/images' as well and that does not work either.

@mearleycf Hello! I'm closing it due to inactivity. If you still have this problem please open a new issue. Thanks

authors: Kreeg mearleycf

repo: svg-sprite/gulp-svg-sprite


text:
Plugin request: Remove style tags

Illustrator is including a base64 of fonts during an scripted export in a style tag. A plugin  for that would be helpful.

It's not that difficult, but obviously should be disabled by default.

I can try to work on it this weekend and submit pull request. Would that help?

It would be nice.

I have a commit ready to make a pull request. Should I create the request to the 'next' branch?

No, it's far for completion.

Why you've closed it?

I wasn't sure which branch to go to. So, I make the request to master?

Yep

Thanks for the merge, that was kind of a quick fix for my problem, but I could see where this might be a pain point for others in the future it they still want the rest of the styles.
For my purposes, I'm just building a single color sprite, so the fewer attributes and styles the better.
When using scripts to export SVGs, I couldn't get illustrator to stop exporting that base 64 font. I tried making an action to outline fonts and change other export settings.
What are your thoughts?

Sorry, I can't say anything

I can do some research on this and get back to you.

Closed, due to #427

authors: GreLI itsjustluck

repo: svg/svgo


text:
XmlException on var w = new Wiki(...)

Hello,
I get an exception when calling the constructor of the Wiki class on wikipedia. The code worked fine a couple of months ago and hasn't been changed since. Can you give me a hint on what's going on? Thank you very much for your great work!!
Marc
var wiki = new Wiki("...", "en.wikipedia.org");
Throws a XmlException:
"'en' is an unexpected token. The expected token is '"' or '''. Line 2, position 12."
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.ParseAttributes()
at System.Xml.XmlTextReaderImpl.ParseElement()
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r)
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r, LoadOptions o)
at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
at System.Xml.Linq.XDocument.Parse(String text, LoadOptions options)
at LinqToWiki.Download.Downloader.Download(IEnumerable1 parameters) in c:\code\LinqToWiki\LinqToWiki.Core\Download\Downloader.cs:line 74    at LinqToWiki.Internals.QueryProcessor.Download(WikiInfo wiki, IEnumerable1 processedParameters, IEnumerable1 queryContinues) in c:\code\LinqToWiki\LinqToWiki.Core\Internals\QueryProcessor.cs:line 156    at LinqToWiki.Internals.QueryProcessor1.ExecuteSingle[TResult](QueryParameters2 parameters) in c:\code\LinqToWiki\LinqToWiki.Core\Internals\QueryProcessor.cs:line 76    at LinqToWiki.Internals.NamespaceInfo.GetNamespaces(WikiInfo wiki) in c:\code\LinqToWiki\LinqToWiki.Core\Internals\NamespaceInfo.cs:line 38    at LinqToWiki.Internals.WikiInfo..ctor(String userAgent, String baseUrl, String apiPath, IEnumerable1 namespaces) in c:\code\LinqToWiki\LinqToWiki.Core\Internals\WikiInfo.cs:line 70
at LinqToWiki.Generated.Wiki..ctor(String userAgent, String baseUri, String apiPath) in c:\Users\Svick\AppData\Local\Temp\LinqToWiki\Wiki.cs:line 32

Same exception upon running the sample application.
System.Xml.XmlException occurred   HResult=0x80131940   Message='en' is an unexpected token. The expected token is '"' or '''. Line 2, position 12.   Source=System.Xml

After little bit of try & error approach, I was able to fix the issue. Correct way to get connected is as below.
 var wiki = new Wiki("LinqToWiki.Samples", "https://en.wikipedia.org", "https://en.wikipedia.org/w/api.php");

repo: svick/LINQ-to-Wiki


text:
Generated API definitions with all internal java.time.Period properties

Q
A

Bug or feature request?
bug

Which Swagger-Core version?
2.0.1

Which Java version?
9.0.4

Which JAX-RS framework & version?
RestEasy 4.0.0.Beta3 & Beta2 earlier

Generated API definitions does not respect types which, I see, supposed to be fully supported.
I raise this issue just about the most common type among those several I'm talking about.
java.time.Period
"term": {
        "years": 0,
        "months": 0,
        "days": 0,
        "chronology": {
          "id": "string",
          "calendar_type": "string"
        },
        "units": [
          {
            "duration": {
              "seconds": 0,
              "nano": 0
            }
          }
        ]
      }

instead of
"term": "PxYxMxD"

or something similar according to underlying ISO
others are java.time.ZoneId and javax.money.MonetaryAmount.
Even though to ensure types are available for Swagger's ObjectMapper it whether does not respect those settings whether bug
        objectMapper.registerModule(new JavaTimeModule());
        Json.mapper().registerModule(new JavaTimeModule());

        objectMapper.registerModule(new MoneyModule().withFastMoney().withDefaultFormatting());
        Json.mapper().registerModule(new MoneyModule().withFastMoney().withDefaultFormatting());

Jackson itself works fine and (de-)serializes all listed as supposed.
So, in general the main issue is (if it is the issue) inability to configure Swagger's ObjectMapper fully.
"Fully" because it uses some of provided settings, but not all. For example:
        objectMapper.setPropertyNamingStrategy(SNAKE_CASE);
        Json.mapper().setPropertyNamingStrategy(SNAKE_CASE);

works as expected.
Env.: Wildfly 11

@frantuma
My use case at least at current stage is just producing correct api definition from jax-rs endpoints. I mean so, that model(-s) which will in .yaml file produced, say, displayed in swagger ui,  will form correct JSON representation, and anyone can POST that JSON as request body.
As much automated as possible - means without unnecessary @Schema annotations as well as any other swagger additional annotations.
I do not know swagger deeply and I thought that inner ObjectMapper being setup with some options will lead to custom api definition produced.
That was confirmed (at least I thought so)  by, for example, setting NamingStrategy to snake case
        objectMapper.setPropertyNamingStrategy(SNAKE_CASE);
        Json.mapper().setPropertyNamingStrategy(SNAKE_CASE);

so that produced definition models are in snake case.
Also such types as java.time.LocalDate and others in table below are correctly formed JSON properties

field
produced model type
real java type
example

updated_on*
string($date-time)
java.time.ZonedDateTime
"2018-04-24T04:58:49.132Z"

valid_from*
string($date)
java.time.LocalDate

valid_until*
string($date)
java.time.LocalDate

insured
string
java.lang.String

created_on
string($date-time)
java.time.LocalDateTime

creator_id
integer($int64)
java.lang.Long

creator_id
integer($int64)
java.lang.Long

Serialization
...I mean,  that those types above are NOT being represented as the whole java.time.LocalDate internal structure, but rather just a string($date) so String is awaited as request body property.
So, I thought that registering Module like Json.mapper().registerModule(new JavaTimeModule()); will lead to supporting such types as java.time.ZoneId and java.time.Period which is exactly what I am looking for.

If "registering JavaTimeModule in internal Swagger's ObjectMapper WILL NOT lead" to correctly produced models then - Why would anyone at all will do so?? For what?? (You said "seem to work fine" - What does it do then?)
If I DID understood correctly and "registering JavaTimeModule in internal Swagger's ObjectMapper WILL lead" to correct model JSON properties, than.. Why it is that SOME setting applied successfully (like NamingStrategy) and some other (like JavaTimeModule) does not?

Regardless there already were some similar examples in tests, or examples ( I don't remember exactly where) those did not help a lot but your answer did. Maybe there should be a guide to similar solutions and/or this issue can be marked as documented or smth like that. @frantuma Thank you very much. This worked well and we adopted that.
My original "issue" resolved so I think what else is rest is covered well in https://github.com/swagger-api/swagger-core/issues/1445
because adding external types as primitives seems to be a highly demanded mechanism.
so I close this one.

repo: swagger-api/swagger-core


text:
swagger-gradle-plugin: ClassCastException on Task.Resolve in multiple subproject

I am using swagger-gradle-plugin in multiple subprojects that correspond to different APIs. In each subproject, it generates the API documentation with Task.Resolve and then copies the documentation into the Tomcat staging directory. The documentations are consumed by a Swagger UI that is hosted within my web application. At the top-level gradle project, I have a task that depends on these tasks.
Top-level project:
task stageSwagger {
    dependsOn { project('subproject-1').tasks.resolve }
    dependsOn { project('subproject-2').tasks.resolve }
    dependsOn { project('subproject-3').tasks.resolve }
}

Subproject:
resolve {
    outputFileName = "sample-openapi"
    classpath = getSwaggerClasspath()
    resourceClasses = getSwaggerResourceClasses()
    outputPath = buildDir.toPath()
}

task swagger(type: Copy) {
    dependsOn resolve
    from buildDir
    include 'sample-openapi.json'
    into tomcatStagingDir
}

When I run task stageSwagger from the top-level project, I am able to successfully execute subproject-1:resolve but any subsequent resolve tasks fail with the following exception:
> Task :subproject-1:resolve
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

> Task :subproject-2:resolve FAILED
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':subproject-1:resolve'.
> org.gradle.api.GradleException (no error message)

* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':subproject-1:resolve'.
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:96)

...

Caused by: java.lang.reflect.InvocationTargetException
        at io.swagger.v3.plugins.gradle.tasks.ResolveTask.resolve(ResolveTask.java:388)
        ... 49 more
Caused by: java.lang.ExceptionInInitializerError
        at io.swagger.v3.jaxrs2.integration.JaxrsAnnotationScanner.classes(JaxrsAnnotationScanner.java:73)
        at io.swagger.v3.jaxrs2.integration.JaxrsApplicationAndAnnotationScanner.classes(JaxrsApplicationAndAnnotationScanner.java:10)
        at io.swagger.v3.oas.integration.GenericOpenApiContext.read(GenericOpenApiContext.java:469)
        at io.swagger.v3.jaxrs2.integration.SwaggerLoader.resolve(SwaggerLoader.java:215)
        ... 50 more
Caused by: java.lang.ClassCastException: com.sample.MyLogger cannot be cast to com.sample.MyLogger
        at com.sample.MyLogger.getLogger(MyLogger.java:61)
        at com.sample.MyClient.<clinit>(MyClient.java:64)
        ... 54 more

My guess for the above exception is that com.sample.MyLogger is loaded by a classloader but when the classes is casted, it is using com.sample.MyLogger from a different classloader, hence causing ClassCastException even if it's the same class.
MyLogger.java is extended from java.util.logging.Logger. An instance of MyLogger is created by LogManager. Because LogManager can only return an instance of Logger, I have to cast MyLogger to the Logger object so the classes that uses it can access the methods in MyLogger.
    public static MyLogger getLogger() {
        synchronized (Logger.class) {
            // Calling class is always at index 1
            String className = new Exception().getStackTrace()[1].getClassName();
            return (MyLogger) getLogger(className);
        }
    }

    public static Logger getLogger(String name) {
        synchronized (Logger.class) {
            LogManager manager = LogManager.getLogManager();
            Logger result = manager.getLogger(name);
            if (result == null) {
                result = new MyLogger(name);
                manager.addLogger(result);
                return manager.getLogger(name);
            }
            return result;
        }
    }

My question is:
Is it a bug in swagger-gradle-plugin that it tries to cast a class from a different classloader?
OR
Is there are different way that I can configure the gradle project such that the same classloader is used across different subprojects?

ah, my exact issue. How did you work around this limitation ?

authors: mandopaloooza michaeljohnstonverint


text:
refs #2079 - JsonView support (includes and replaces #2662)

refs #2079 - JsonView support. Includes and replaces #2662 implementing ignoreJsonView field in @ApiOperation (for backward compatibility) and adding minor fixes and tests.

@frantuma I'm not getting this to work for request objects, only response objects. Is it not supported for request objects, or am I doing something wrong?
Works:
@GET
@Path("{id}")
@JsonView(Views.ProductReadSecure.class)
public ProductDTO getProduct(@PathParam("id") Integer id) {
    ProductDTO testProduct = new ProductDTO();
    testProduct.setId(id);

    return testProduct;
}

Don't work:
@POST
public Response createProduct(@JsonView(Views.ProductCreateSecure.class) ProductDTO product) {
    return Response.noContent()
            .build();
}

@frantuma Did you se my previous comment?

authors: frantuma simenflatby


text:
Question: swagger-node-express has dependency vulnerability with outdated lodash version

The latest 'swagger-node-express' is using outdated lodash dependency which causes vulnerability. How it can be fixed without migration to new package 'swagger-node'?

*grabs the popcorn.

authors: JohnMcLear dmytro-severniuk

repo: swagger-api/swagger-node


text:
Bump Version to 1.6.8 to include all bugfixes since 1.6.7

Describe the solution you'd like
Create new 1.6.8 Tag
So we have a tag to import in go modules, which includes the new features and fixes

List of commits since last release:
https://github.com/swaggo/swag/compare/v1.6.7...master

v1.6.8 is released now.

repo: swaggo/swag


text:
Clearing package directory before new package is not working

Hi there,
Thanks for cool tool, it makes workflow easier:)
I found that clearing before creating new package doesn't detect files in package dir correctly as it logs in terminal: √ package directory is already clean - even when it is not and also it doesn't clear old files.
Have a great day

Thanks, I guess I know what's the trouble.

authors: deeppresentation swashata

repo: swashata/wp-webpack-script


text:
Transpiling async functions as class properties causes error

Describe the bug
dist/index.js:694
                        console.log(!!_this);
                                      ^
ReferenceError: _this is not defined

Input code
class Weird1 {
	weird = async () => {
		console.log(!!this);
	};

	decoy1 = async () => {};
	decoy2 = () => {};
}

class Weird2 {
	weird = async () => {
		console.log(!!this);
	};

	//    decoy1 = async () => { };
	decoy2 = () => {};
}

class Weird3 {
	weird = async () => {
		console.log(!!this);
	};

	decoy1 = async () => {};
	//    decoy2 = () => { };
}

class Weird4 {
	decoy1 = async () => {};
	decoy2 = () => {};

	weird = async () => {
		console.log(!!this);
	};
}

// This will succeed
new Weird4().weird();

// This will succeed
new Weird3().weird();

// This will succeed
new Weird2().weird();

// This will fail with "ReferenceError: _this is not defined"
new Weird1().weird();

Config
{
	"env": {},
	"module": {
		"type": "commonjs"
	}
}

package.json (the browserslist config is important):
{
	"browserslist": "> 0.2%",
	"dependencies": {
		"@swc/cli": "^0.1.51",
		"@swc/core": "^1.2.106",
		"browserslist": "^4.17.5",
		"regenerator-runtime": "^0.13.9"
	}
}

Playground link
No response
Expected behavior
Prints "true" four times.
Version
1.2.106
Additional context
https://github.com/parcel-bundler/parcel/issues/7147

This bug bit me while trying to develop a Parcel Transformer. Seems to be related to how SWC is transpiling classes with async members.
My browserslist is > 1%, last 2 versions, not dead
Error:
_assert_this_initialized.js:3 Uncaught ReferenceError: this hasn't been initialised - super() hasn't been called
    at $733bad68c43ec620$export$2e2bcd8739ae039 (_assert_this_initialized.js:3)

Source code:
// this is a class expression part of a bigger generated file
class extends TwingTemplate {
  constructor(environment) {
    super(environment)

    this._source = new this.Source(
      ``,
      `e10576113ec1c33c06c0e5213e4c77e1a257721431f0a454eedd7c891e35eb79`
    )

    let aliases = new this.Context()

    this.blockHandlers = new Map([
      [
        'card_head',
        async (context, outputBuffer, blocks = new Map()) => {
          let aliases = this.aliases.clone()
        },
      ],
      [
        'card_body',
        async (context, outputBuffer, blocks = new Map()) => {
          let aliases = this.aliases.clone()
        },
      ],
      [
        'card_foot',
        async (context, outputBuffer, blocks = new Map()) => {
          let aliases = this.aliases.clone()
        },
      ],
    ])
  }

  async doDisplay(context, outputBuffer, blocks = new Map()) {
    let aliases = this.aliases.clone()

    outputBuffer.echo(`

  `)
    outputBuffer.echo(
      await this.traceableRenderBlock(14, this.source)(
        'card_head',
        context.clone(),
        outputBuffer,
        blocks
      )
    )
    outputBuffer.echo(`

  `)
    outputBuffer.echo(
      await this.traceableRenderBlock(17, this.source)(
        'card_body',
        context.clone(),
        outputBuffer,
        blocks
      )
    )
    outputBuffer.echo(`

  `)
    if (context.has(`card_footer`) ? context.get(`card_footer`) : null) {
      outputBuffer.echo(`

  `)
      outputBuffer.echo(
        await this.traceableRenderBlock(21, this.source)(
          'card_foot',
          context.clone(),
          outputBuffer,
          blocks
        )
      )
      outputBuffer.echo(`

  `)
    }
    outputBuffer.echo(`</div>`)
  }

  get isTraitable() {
    return false
  }
}

Transpiled code (comments added by me):
function (TwingTemplate) {
    "use strict";

// _inherits
    $64fc7f36b05addcd$export$2e2bcd8739ae039(_class, TwingTemplate);
    function _class(environment) {
        $4157fc935b703f38$export$2e2bcd8739ae039(this, _class);
        var _this2;

// _assert_this_initialized -- error is thrown inside here because _this2 is undefined
        var _this1 = $733bad68c43ec620$export$2e2bcd8739ae039(_this2);
        _this2 = $2447e84f18ded1d7$export$2e2bcd8739ae039(this, $59ba81f3a69e444e$export$2e2bcd8739ae039(_class).call(this, environment));
        _this2._source = new _this2.Source("", "e10576113ec1c33c06c0e5213e4c77e1a257721431f0a454eedd7c891e35eb79");
        var aliases1 = new _this2.Context();
        _this2.blockHandlers = new Map([
            [
                'card_head',
                function(context, outputBuffer) {
                    var _ref = $1fed9fc3d70a7ca8$export$2e2bcd8739ae039((/*@__PURE__*/$parcel$interopDefault($f110eb6e8c8d50db$exports)).mark(function _callee(context, outputBuffer, param) {
                        var blocks, aliases;
                        return (/*@__PURE__*/$parcel$interopDefault($f110eb6e8c8d50db$exports)).wrap(function _callee$(_ctx) {
                            while(1)switch(_ctx.prev = _ctx.next){
                                case 0:
                                    blocks = param === void 0 ? new Map() : param;
                                    aliases = _this3.aliases.clone();
                                case 2:
                                case "end":
                                    return _ctx.stop();
                            }
                        }, _callee);
                    }));
                    return function() {
                        return _ref.apply($733bad68c43ec620$export$2e2bcd8739ae039(_this2), arguments);
                    };
                }()
            ],
            [
                'card_body',
                function(context, outputBuffer) {
                    var _ref = $1fed9fc3d70a7ca8$export$2e2bcd8739ae039((/*@__PURE__*/$parcel$interopDefault($f110eb6e8c8d50db$exports)).mark(function _callee(context, outputBuffer, param) {
                        var blocks, _this3, aliases;
                        return (/*@__PURE__*/$parcel$interopDefault($f110eb6e8c8d50db$exports)).wrap(function _callee$(_ctx) {
                            while(1)switch(_ctx.prev = _ctx.next){
                                case 0:
                                    blocks = param === void 0 ? new Map() : param;
                                    _this3 = _this;
                                    aliases = _this.aliases.clone();
                                case 3:
                                case "end":
                                    return _ctx.stop();
                            }
                        }, _callee);
                    }));
                    return function() {
                        return _ref.apply($733bad68c43ec620$export$2e2bcd8739ae039(_this2), arguments);
                    };
                }()
            ],
            [
                'card_foot',
                function(context, outputBuffer) {
                    var _ref = $1fed9fc3d70a7ca8$export$2e2bcd8739ae039((/*@__PURE__*/$parcel$interopDefault($f110eb6e8c8d50db$exports)).mark(function _callee(context, outputBuffer, param) {
                        var blocks, _this, aliases;
                        return (/*@__PURE__*/$parcel$interopDefault($f110eb6e8c8d50db$exports)).wrap(function _callee$(_ctx) {
                            while(1)switch(_ctx.prev = _ctx.next){
                                case 0:
                                    blocks = param === void 0 ? new Map() : param;
                                    _this = _this1;
                                    aliases = _this1.aliases.clone();
                                case 3:
                                case "end":
                                    return _ctx.stop();
                            }
                        }, _callee);
                    }));
                    return function() {
                        return _ref.apply($733bad68c43ec620$export$2e2bcd8739ae039(_this2), arguments);
                    };
                }()
            ]
        ]);
        return _this2;
    }
    $3027f5da6d67258f$export$2e2bcd8739ae039(_class, [
        {
            key: "doDisplay",
            value: function doDisplay(context, outputBuffer, param) {
                var blocks = param === void 0 ? new Map() : param;
                return $1fed9fc3d70a7ca8$export$2e2bcd8739ae039((/*@__PURE__*/$parcel$interopDefault($f110eb6e8c8d50db$exports)).mark(function _callee() {
                    var aliases;
                    return (/*@__PURE__*/$parcel$interopDefault($f110eb6e8c8d50db$exports)).wrap(function _callee$(_ctx) {
                        while(1)switch(_ctx.prev = _ctx.next){
                            case 0:
                                aliases = this.aliases.clone();
                                outputBuffer.echo("\n
\n
\n        ");
                                _ctx.t0 = outputBuffer;
                                _ctx.next = 5;
                                return this.traceableRenderBlock(14, this.source)('card_head', context.clone(), outputBuffer, blocks);
                            case 5:
                                _ctx.t1 = _ctx.sent;
                                _ctx.t0.echo.call(_ctx.t0, _ctx.t1);
                                outputBuffer.echo("
\n
\n        ");
                                _ctx.t2 = outputBuffer;
                                _ctx.next = 11;
                                return this.traceableRenderBlock(17, this.source)('card_body', context.clone(), outputBuffer, blocks);
                            case 11:
                                _ctx.t3 = _ctx.sent;
                                _ctx.t2.echo.call(_ctx.t2, _ctx.t3);
                                outputBuffer.echo("
\n    ");
                                if (!(context.has("card_footer") ? context.get("card_footer") : null)) {
                                    _ctx.next = 22;
                                    break;
                                }
                                outputBuffer.echo("
\n            ");
                                _ctx.t4 = outputBuffer;
                                _ctx.next = 19;
                                return this.traceableRenderBlock(21, this.source)('card_foot', context.clone(), outputBuffer, blocks);
                            case 19:
                                _ctx.t5 = _ctx.sent;
                                _ctx.t4.echo.call(_ctx.t4, _ctx.t5);
                                outputBuffer.echo("
\n    ");
                            case 22:
                                outputBuffer.echo("
");
                            case 23:
                            case "end":
                                return _ctx.stop();
                        }
                    }, _callee, this);
                }).bind(this))();
            }
        },
        {
            key: "isTraitable",
            get: function get() {
                return false;
            }
        }
    ]);
    return _class;
}(TwingTemplate1)

authors: mischnic poislagarde

repo: swc-project/swc


text:
cookbook misrepresents Plot.SaveFig() arguments

plt.SaveFig arguments in the cookbook show dimensions:
plt.SaveFig(600, 400, "01e_Legend.png");
however these are not available. Is this documentation out-of-date, or is it that I am using .NET Core 3.1?

Oh man good catch! I've got to fix that for sure 😝 thanks for letting me know about it!
The line in the cookbook generator that needs fixing is here:
https://github.com/swharden/ScottPlot/blob/337c36cbd9d050e16023924b15c41c2cd199ee15/tests/Cookbook/Report.cs#L83-L84

actually, a totally new cookbook system solved this issue!

authors: Resonanz swharden

repo: swharden/ScottPlot


text:
Volume Key Handling

Volume Key Handling

This build crashes in the current Production version of Xcode (Version 7.3.1) when selecting a station. "fatal error: unexpectedly found nil while unwrapping an Optional value". Master can only accept builds with no errors. Thank you.

repo: swiftcodex/Swift-Radio-Pro


text:
Unable to use RunLoop to allow task to advance

Description
Say we have a UIKit table view controller which loads its data by doing this inside viewDidLoad():
Task {
    results = await viewModel.load()
    self.tableView.reloadData()
}

I am able to test this in XCTest by pumping the run loop. This does not work in Swift Testing.
Expected behavior
With XCTest, I can allow the task to proceed by polling for the expected results in a loop that calls:
RunLoop.current.run(until: Date(timeIntervalSinceNow: 0.01))

Actual behavior
With Swift Testing, pumping the run loop does not advance the task.
I added print statements in 2 places: one inside the Task after the await, and another at the end of the test case, both XCTest and Swift Testing.

XCTest: Task completes, then test completes
Swift Testing: Test completes, then task completes

Steps to reproduce
In https://github.com/jonreid/ExpectToEventuallyEqual there is a SampleApp that contains both XCTest and Swift Testing targets. The print statements are in place inside TableViewController viewDidLoad(), and at the end of test_numberOfRows and numberOfRows. Run each to see the difference in behavior.
swift-testing version/commit hash
Xcode 16.0.0 built-in
Swift & OS version (output of swift --version ; uname -a)
swift-driver version: 1.115 Apple Swift version 6.0 (swiftlang-6.0.0.9.10 clang-1600.0.26.2)
Target: arm64-apple-macosx14.0
Darwin Llama.local 23.6.0 Darwin Kernel Version 23.6.0: Mon Jul 29 21:14:30 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T6000 arm64

Just to clarify: is the test in question marked @MainActor? Is it async?

It is @MainActor. Tried both with and without async.

Alright, thanks. Interactions between the main actor and main run loop are controlled by the Swift runtime, so I'm going to move this issue to the main Swift repo.

authors: grynspan jonreid

repo: swiftlang/swift-testing


text:
[6.0] [Sema] Don't parse skipped bodies when computing discriminators

6.0 cherry-pick of #75421

Explanation: Fixes an issue where #sourceLocation() would incorrectly be diagnosed with an error in a function body when emitting a module. More generally, this change also stops us from needlessly parsing function bodies when emitting modules.
Scope: Affects compilation when function body skipping is enabled, e.g when emitting modules
Issue: rdar://131726797
Risk: Low, the fix is minimal, and restores the behavior that is already present in Xcode 16b3
Testing: Added tests to test suite
Reviewer: Allan Shortlidge

@swift-ci please test

repo: swiftlang/swift


text:
[test] Add -disable-experimental-parser-round-trip to value generic tests

Parsing of integer literals as generic arguments isn’t implemented in SwiftParser yet, blocking swift-syntax PR testing.
CC @Azoy

@swift-ci Please smoke test


text:
[CMake] clang-builtin-headers needs to copy the module maps as well as the headers

When copying the clang builtin headers, the module maps need to go with them.

@swift-ci smoke test

@swift-ci smoke test

@swift-ci smoke test Windows


text:
Run Multiple Times / Until Failure commands showing up for non-Swift tests

Describe the bug
You can see these new context menu commands for test cases that aren't swift tests
To Reproduce
Steps to reproduce the behavior:

Open a workspace that has no Swift source (I had a Go workspace open)
Go to the test explorer and right-click on a test case
See commands

NOTE When clicking the actually Swift extension activates and tries to run but fails obviously
Expected behavior
Hide these commands for non-Swift tests
Environment
All environments
Additional context
N/A

Verified with be8372e

repo: swiftlang/vscode-swift


text:
Configurable user-select css property

I'm submitting a ...  (check one with "x")
[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter

Current behavior
Text is not selectable because of user-select:none.
Expected behavior
Make user text select configurable.
Reproduction of the problem
See this line https://github.com/swimlane/ngx-datatable/blob/88c46dac0adc7024cc4c2e90f1ae9d5f01140809/src/components/datatable.component.scss#L105
What is the motivation / use case for changing the behavior?
Copying table content, for example to excel, is common in some workflows. No reason to disabling this entirely.
Please tell us about your environment:

Table version: master. Commit #88c46dac

Angular version: 4.0.x

Browser: Chrome 57

Language: all

I think this was done to make it easier to drag column headers as I suspect some platforms might only select the text when it is enabled. But you're right, I don't think body cell needs to have it.

This has came up before and I don't remember why but it was done on purpose :S ... ill dig around and see if i can't remember why

@amcdnl Is there any information?

I don't know where this is on the priority list, but this would be a decent nice-to-have. The header cells shouldn't need to be changed though.

Has there been a solution / workaround for this? In our app, we need to be able to select and copy text out of the table without triggering an event that's indistinguishable from a click. Selecting text (using the trackpad on my Mac) triggers an (activate) event of type 'click' and it's impossible to distinguish from an actual click on a row. (select) doesn't seem to work at all.

authors: adammedford amcdnl ericleb010 kasparsklavins s-edlund tamascsaba

repo: swimlane/ngx-datatable


text:
Need some Color for Expanded row to show prominently, for which detail is being displayed

I'm submitting a ...
[x] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter

Current behavior
When we expand a row for displaying row details, we could have our own template being rendered as row details, however the row which is expanded cannot be highlighted. We wanted to show the expanded row in some different color.
I'm not sure if it is already pursued or have discussed somewhere. Could you please help me out.
Expected behavior
We need to highlight the row which is expanded.
Reproduction of the problem
Take a table with row details, you could pick from the example as well. Expand couple of rows. You could see that the row which is expanded does not appear prominent.

What is the motivation / use case for changing the behavior?
The expanded row should be displayed prominently, so that user could determine for which row he/she is viewing the details. It gets difficult for user to quickly identify the row which is expanded.
Please tell us about your environment:

Table version:
ngx-datatable: 9.2.0

Angular version:
Angular version : 4.3.0

Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
All browsers

Language: [all | TypeScript X.X | ES6/7 | ES5]
Typescript

Could anyone please help us resolving this issue?
Thanks. Rahul

That's the same thing I am looking for. Anyone please resolve this issue.

I use rowClass input of ngx-datatable component. If rowClass is a function it actually take 'row' object as parameter which contain only row data and no informatoin about  expanding. But there is kinda huck for this function. This function is called in context of body-row component, and you can get access to its propeties through 'this' object. So, for higher level component:
  getRowClass(row) {     return {       'row-expanded': this.expanded     };   } and
<ngx-datatable ... [rowClass]="getRowClass" ...> </ngx-datatable>

This is purely for demonstration purposes. Its up to the implementer to decide this.

@amcdnl @mishkolesnikov thanks for you response.
I tried mishkolesnikov's solution, however could not make it work. would you mind pasting your code for reference?
Having said that, I still feel that this should be provided in Ngx-datatable OOTB CSS classes.
Thanks. Rahul

can anyone please help on this ?

authors: Rushipk amcdnl mishkolesnikov rahul-winner


text:
responsive mode not availabe

mode as shown in tutorial is not there

Right click on the ruler 📏  corner and you will see a context menu. Choose 'show responsive control' to bring up the responsive mode.

Good morning
I have done it but tool bars in graphic mode are note responding for eg
1 missing div tool
2 quick responsive layout tool from code side bar as seen in ur tutorial
video all functions are missing
I don't know why?
Please help me out
Regards
Areeb
On May 14, 2016 10:06 PM, "Swagatam Mitra" notifications@github.com wrote:

Right click on the ruler 📏 corner and you will see a context menu.
Choose 'show responsive control' to bring up the responsive mode.
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/swmitra/html-designer/issues/7#issuecomment-219229913

Did you ever get an answer to this?

authors: NoellyB76 areebaliasr swmitra

repo: swmitra/html-designer


text:
Swoft\Db\Helper\EntityHelper::listToEntity() must be of the type array, boolean given

Q
A

Bug report?
yes

Feature request?
yes

Swoft version
1.0

Swoole version
4.4.0

PHP version
7.1.19

Runtime environment
Mac

Details

Describe what you are trying to achieve and what goes wrong.

Argument 1 passed to Swoft\\Db\\Helper\\EntityHelper::listToEntity() must be of the type array, boolean given, called in /Users/osx/Documents/pprt-parkingpay/parkingpay-server/vendor/swoft/db/src/QueryBuilder.php on line 1506

Provide minimal script to reproduce the issue

/**
     * 测试方法
     * @RequestMapping(route="register/bing_test",method={RequestMethod::POST,RequestMethod::GET})
     */
    public function bing_test(Request $request)
    {
        MainUser::findOne(['mobile'=>$request->input('mobile')], ['fields'=>['id']])
            ->getResult();
    }

@yangtongbing 描述下你详细信息

1.0 的吗

我本地环境正常启动项目，findOne结果集不用getResult没有问题，用的话就报出上述错误，很纳闷为什么？各种composer包都安装无误。

是swoft1.0的版本，搜了下没有人碰到我类似的问题，公司项目用docker跑的，我也能跑起来，但本地环境始终是个梗

建议升级到 2.0

建议升级到 2.0
升级带来的就是好多修改，公司项目咱们也不敢随意升级的，感觉还是找找这个问题解决比较好。

@yangtongbing 描述下你详细信息

parkingpay-server/vendor/swoft/db/src/DbResult.php  第96行发现不管什么select语句返回的result都是true，导致下面无法进行解析，最终getResult报错，这个问题很头疼。

@yangtongbing 描述下你详细信息

vendor/swoft/db/src/DbResult.php 第96行发现不管什么select语句返回的result都是true，导致下面无法进行解析，最终getResult报错，这个问题很头疼。

@yangtongbing 建议升级到2.0 1.0 暂时重大问题才会去修复

@yangtongbing 建议升级到2.0 1.0 暂时重大问题才会去修复

怨我不小心安装了swoole beta版本，坑死，以后会注意，谢谢。

我也碰到这个问题

我也碰到这个问题
你php --ri swoole看下是什么版本,如果是较新的版本建议切换下

我也碰到这个问题

碰到了同样的问题,跟 swoole 版本有关,安装 swoole 4.3.3 后解决了

authors: datou-leo sakuraovq stelin trrtly yangtongbing

repo: swoft-cloud/swoft


text:
Travis CI Build Fails Erroneously for geometry_util on jade-devel

Compare these CI builds of the same commit, and you can see that our Travis CI fails and the OSRF Jenkins build passes.
This package also seems to build fine for me on Mint 17.2.

I did an experiment to use format 1 for the package that's causing an error and Travis passed for my forked repository. So it may be how catkin_tools handles package format 2.

Interesting. I'll have to look into that.

So there were actually two issues here, and I fixed them both in #311.
One is a failure to find Eigen3, and I spent a while beating my head against that without figuring why it was happening.  It always worked in my Jade VMs but failed in the Travis build.  I "fixed" it by adding a fallback that will use PkgConfig to find Eigen3 if the CMake Find fails.  That seems to work, so it's good enough for me.
The second issue was the failing geometry_util test, which was because swri_image_util was erroneously installing the geometry_util.test file in its "launch" directory; the Travis build was them trying to run the test out of the install dir, but it would fail because the compiled cpp code for the test did not get installed.  I fixed it by not installing that .test file.

@pjreed

So there were actually two issues here, and I fixed them both in #311.

You mean https://github.com/swri-robotics/marti_common/pull/309?

Oops, that is correct.

authors: 130s evenator pjreed


text:
preview and edit don't work on windows

What system are you running Yazi on?
Windows
What terminal are you running Yazi in?
alacritty v0.14.0
yazi --debug output
Yazi
    Version: 0.3.3 (7c445ce 2024-09-04)
    Debug  : false
    OS     : windows-x86_64 (windows)

Ya
    Version: 0.3.3 (7c445ce 2024-09-04)

Emulator
    Emulator.via_env: ("xterm-256color", "")
    Emulator.via_csi: Ok(Unknown([]))
    Emulator.detect : Unknown([])

Adapter
    Adapter.matches: Chafa

Desktop
    XDG_SESSION_TYPE           : None
    WAYLAND_DISPLAY            : None
    DISPLAY                    : None
    SWAYSOCK                   : None
    HYPRLAND_INSTANCE_SIGNATURE: None
    WAYFIRE_SOCKET             : None

SSH
    shared.in_ssh_connection: false

WSL
    WSL: false

Variables
    SHELL              : None
    EDITOR             : None
    VISUAL             : None
    YAZI_FILE_ONE      : None
    YAZI_CONFIG_HOME   : None

Text Opener
    default: Some(Opener { run: "hx %*", block: true, orphan: false, desc: "hx", for_: None, spread: true })
    block  : Some(Opener { run: "hx %*", block: true, orphan: false, desc: "hx", for_: None, spread: true })

Multiplexers
    TMUX               : false
    tmux version       : program not found
    ZELLIJ_SESSION_NAME: None
    Zellij version     : program not found

Dependencies
    file             : 5.45
    ueberzugpp       : program not found
    ffmpegthumbnailer: program not found
    magick           : 7.1.1-40
    fzf              : 0.56.3
    fd               : 10.2.0
    rg               : 14.1.1
    chafa            : 1.14.5
    zoxide           : 0.9.6
    7z               : 24.08
    7zz              : program not found
    jq               : 1.6

--------------------------------------------------
When reporting a bug, please also upload the `yazi.log` log file - only upload the most recent content by time.

Describe the bug
The file preview does not display and using the Enter key to open the file has no effect at all.
Minimal reproducer
2024-11-16T13:07:02.641798Z  WARN yazi_adapter::adapter: [Adapter] Could not identify XDG_SESSION_TYPE
at yazi-adapter\src\adapter.rs:109
2024-11-16T13:07:02.641807Z  WARN yazi_adapter::adapter: [Adapter] Falling back to chafa
at yazi-adapter\src\adapter.rs:118
2024-11-16T13:07:02.644430Z  WARN yazi_adapter::ueberzug: ueberzugpp spawning failed: program not found
at yazi-adapter\src\ueberzug.rs:96
2024-11-16T13:07:02.711457Z ERROR yazi_scheduler::prework::prework: Returned 2 when running fetcher mime with:
C:\Users\kicre\AppData\Roaming\yazi\state\yazi.envrc
C:\Users\kicre\AppData\Roaming\yazi\state\yazi.gitignore
C:\Users\kicre\AppData\Roaming\yazi\state\yazi.styluaignore
C:\Users\kicre\AppData\Roaming\yazi\state\yazi\Cargo.lock
C:\Users\kicre\AppData\Roaming\yazi\state\yazi\Cargo.toml
C:\Users\kicre\AppData\Roaming\yazi\state\yazi\CODE_OF_CONDUCT.MD
C:\Users\kicre\AppData\Roaming\yazi\state\yazi\CONTRIBUTING.md
C:\Users\kicre\AppData\Roaming\yazi\state\yazi\cspell.json
C:\Users\kicre\AppData\Roaming\yazi\state\yazi\flake.lock
C:\Users\kicre\AppData\Roaming\yazi\state\yazi\flake.nix
C:\Users\kicre\AppData\Roaming\yazi\state\yazi\LICENSE
C:\Users\kicre\AppData\Roaming\yazi\state\yazi\LICENSE-ICONS
C:\Users\kicre\AppData\Roaming\yazi\state\yazi\README.md
C:\Users\kicre\AppData\Roaming\yazi\state\yazi\rustfmt.toml
C:\Users\kicre\AppData\Roaming\yazi\state\yazi\stylua.toml
at yazi-scheduler\src\prework\prework.rs:49
Anything else?
No response
Validations

[X] I tried the latest nightly build, and the issue is still reproducible
[X] I updated the debug information (yazi --debug) input box to the nightly that I tried
[X] I can reproduce it after disabling all custom configs/plugins (mv ~/.config/yazi ~/.config/yazi-backup)

Please make sure to set up your file(1) correctly according to https://yazi-rs.github.io/docs/installation#windows

authors: kicre sxyazi

repo: sxyazi/yazi