Scraping dynamic page

Hi !
I want to get the whole content of a site. I cannot use curl for instance, as the page is dynamic (made with angularJS) and should be rendered before being downloaded.
At the end, I've been able to do it with phantomJS (v-2.1.1). It requires using page.evaluate.
var url = "http://site/to/download"

var page = require('webpage').create();
page.open(url, function(status) {
    if (status === 'success') {
        var html = page.evaluate(function() {
            return document.documentElement.outerHTML;
        });
        console.log(html)
    }
    phantom.exit();
});

I want to stick with node, so I installed phantomjs-node. But I cannot make it work (I can download the original page, not the rendered one). What's the way to do it with phantomjs-node and Promises? If possible, could you add this kind of scraping example into your own examples, beside simple.js ?
Thanks in advance,

There is a lot of examples in issues that have talked about this. This should work. Just use evaluate. I won't go in to detail on how to do it because I think the source is pretty clear. Try it and if it doesn't work post what you have tried.

Issues are for bugs, where expected behavior is different than actual. For questions or best practices please use other sources like stackoverflow.com or the slack chat room.
Please review the guidelines for creating issues before opening new issues in the future.

Thank you for your answer.
Sorry for not posting in the right place, I hadn't found the places where to ask questions. Maybe it should be in the Readme? "I won't go in to detail on how to do it because I think the source is pretty clear" is pretty severe for new learners who have read the examples, but not all issues, I admit.
Thanks anyway for this useful project.

@jgranduel  there is a slack room that you can join to ask questions.


Update about page ft img to match demo site

Closes #491
Assumes that you want them to match and that you'd prefer this change vs updating the demo page.

Ready for review, @regisphilibert

Hey @tlindsay42 and thank you for noticing! That file has been renamed since then (from _index.md to index.md) making this conflict a pain. Would you mind creating a new PR from master and update the new /about/index.md with that change?

Replaced by #507


Small issue

Hello,
The script sometimes removes the complete line. Here is an example:
Before:
`1
00:00:06,507 --> 00:00:08,467
[Moiraine] The world
is broken.
2
00:00:08,551 --> 00:00:10,302

[voices whispering]
Many, many years ago,

3
00:00:10,386 --> 00:00:12,555
men who were born
with great power believed`
After:
`1
00:00:08,551 --> 00:00:10,302

Many, many years ago,

2
00:00:10,386 --> 00:00:12,555
men who were born
with great power believed`
And sometimes it's fine:
Before:
`95
00:06:57,751 --> 00:07:00,420
[Tam] I remember when this road
was just a little deer path,
96
00:07:00,504 --> 00:07:02,589
winding down the mountain.`
After:
`65
00:06:57,751 --> 00:07:00,420
I remember when this road
was just a little deer path,
66
00:07:00,504 --> 00:07:02,589
winding down the mountain.`

Yes so the problem here is the empty newline after the 1 in the first subtitle entry:
1

00:00:06,507 --> 00:00:08,467
[Moiraine] The world
is broken.

In any case I have fixed the issue in the latest release. If you reinstall/update to version v1.4.3, it should be fine.
Thank you for raising this issue :+1:


Missing information (satellite height)

For the processing of the elevation variable I need the satelliteHeight(xpath: product/imageGenerationParameters/sarProcessingInformation/satelliteHeight).
Is it possible to add it to your reader please?

This is part of #17, right? If so, yes, of course I can add those. However, I'm not sure when I will be able to complete that.

Yes it is, sorry I didn't notice it


About test

Hi, thank you for the amazing open source code. When I try to run the test code some error happened, if you are experienced with this, please help me explain it.

According to your readme, the test commend is "python3 basicsr/train.py -opt options/test/TMP/test_TMP.yaml", I guess the validation entrance is basicsr/test.py, but I use it got a error.
The error is:
Traceback (most recent call last):
File "basicsr/test.py", line 49, in
test_pipeline(root_path)
File "basicsr/test.py", line 44, in test_pipeline
model.validation(test_loader, current_iter=opt['name'], tb_logger=None, save_img=opt['val']['save_img'])
File "basicsr/../basicsr/models/base_model.py", line 48, in validation
self.nondist_validation(dataloader, current_iter, tb_logger, save_img)
File "basicsr/../basicsr/models/video_base_model.py", line 136, in nondist_validation
self.dist_validation(dataloader, current_iter, tb_logger, save_img)
File "basicsr/../basicsr/models/video_recurrent_model.py", line 71, in dist_validation
gt_cuda, hidden_states = net_g_cuda(inp_cuda, hidden_states, return_hs=True)
File "/share3/home/queshicheng/dependences/miniconda3/envs/TMP/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "basicsr/../basicsr/archs/tmp_arch.py", line 67, in forward
assert h % 4 == 0 and w % 4 == 0, ('The height and width must be multiple of 4.')
AssertionError: The height and width must be multiple of 4.
so, is it means the resolution of LQ images must be multiple of 4? Well, the resolution of my image sequence is 1920x1080, is it available?

By the way, I changed the options/test/TMP/test_TMP.yaml, "dataroot_gt" and "dataroot_lq" changed to my dataset (three png sequences, the value is the parent directory of these sequence folders), dataroot_gt is the directory of my 1920x1080 sequences and dataroot_lq is the directory of the original sequence been bicubic downsampled sequences (480x270). And "pretrain_network_g" to points to the pretrained model pth file. I'm not sure it's right.

I can make the program run by commenting out line 66 of basicsr/archs/tmp_arch.py, but the results obtained from multiple runs are different, and there is a floating error in the second decimal place. Is this right? In addition, is there a built-in time statistics program? Which period of time is the running time in Table 1 of the paper statistically calculated? Finally, thank you again for your contribution.


Duplicate Titlebar when System Theme Changes

Windows Terminal version
1.20.11381.0
Windows build number
10.0.19045.0
Other Software
No response
Steps to reproduce

Open a new Windows Terminal window
Close the window
Change the Windows application theme (in either direction)
Open a new Windows Terminal window again
See the duplicated title bar

Expected Behavior
No response
Actual Behavior
How to trigger this
When the Windows application theme changes (light<->dark), and a quake mode WT instance is running in the background, upon opening a new instance of Windows Terminal, two titlebars are present.
This happens if and only if a WT window (other than the quake window) was opened and closed before the theme change, and a new WT window is opened after the theme change.
If the theme change happens whilst a WT window is open, the application colours change correctly and the titlebar isn't duplicated for the existing window. However, opening a new WT window will show the extra titlebar.
Fixing this through the titlebar
Interacting with either titlebar (hitting the minimize or maximize buttons) makes the extra titlebar disappear and retains only the WT titlebar. However, hitting either close button, and then opening a new WT window, the extra titlebar is still present.
Fixing this through the setting
Toggling the Appearance > Hide the titlebar setting from On to Off, and closing the affected window, when opening a new WT window, the two titlebars are still present but weirdly overlapping:

Then, toggling the aforementioned setting from Off back to On, and closing the affected window, when opening a new WT window the extra titlebar is not present.
When does it happen again
Once the duplicate titlebar disappears, it won't appear again until another theme change.

I forgot to mention, I have never seen any other program duplicate its titlebar when changing the windows application theme (and I have a script that changes the theme daily to match day/night), hence I believe this is a bug with Windows Terminal.

This is almost certainly related to refrigeration (which is what we call "keeping a window object around on Windows 10 and using them instead of making new ones" (which we do because of a crash in WinUI...))


Uncomment and fix unit tests

Uncomment and fix unit tests for Naming Conventions https://github.com/elastic/elasticsearch-net/blob/8632fc197c01e5f8a7b89a0e9b2cc357e9163903/src/Tests/CodeStandards/NamingConventions.doc.cs

Added a PR #1779 for this as it's quite a sweeping set of changes :smile:

#1779 is pulled in, thanks @russcam :+1:


list 404 urls

1./CONTRIBUTING.md
https://git.k8s.io/community/contributors/guide/contributor-cheatsheet.md
2./docs/adding_custom_rest.md
docs/adding_custom_rest.md
https://sigs.k8s.io/apiserver-builder-alpha/blob/master/docs/adding_resources.md
3./docs/adding_custom_rest.md
https://sigs.k8s.io/apiserver-builder-alpha/blob/master/docs/adding_subresources.md
4./docs/adding_custom_rest.md
https://sigs.k8s.io/apiserver-builder-alpha/issues/92
5./docs/compare_with_kubebuilder.md https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md
6./docs/creating_an_api_server.md
https://sigs.k8s.io/apiserver-builder-alpha/blob/master/docs/getting_started.md
7./docs/tools_user_guide.md
https://sigs.k8s.io/apiserver-builder-alpha/blob/master/docs/installing.m

Is anybody going to fix this broken urls?
It has been a long time for now already.

added to my list, will take a shot this week or next.


v6: introduce alternative patching flow

:tada: This PR is included in version 6.0.0 :tada:
The release is available on:

v6.0.0
npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


New check: ADD OSV: Show current state w.r.t open security vulnerabilities (e.g. CVEs, OSS-Fuzz, etc)

api key requirement gone, thanks to @oliverchang.
curl -X POST -d '{"version": "0.17.0", "package": {"name": "arrow"}}' "https://api.osv.dev/v1/query" | jq
Oliver, what was the way to get latest version ?

I think we need to look at the upstream repo to get:

The current HEAD commit sha and use that to commit.
Or the closest tag name.

I can try add this.

@oliverchang - we have a launch sometime this week, is this doable in next 2-3 days?

Will try to tackle this tmrw.


[v1.13] bpf: fix error handling for invoke_tailcall_if()

Manual backport for

[ ] https://github.com/cilium/cilium/pull/26118. Adjusted for additional / missing usage of invoke_tailcall_if() in v1.13 branch.

Once this PR is merged, you can update the PR labels via:
for pr in 26118; do contrib/backporting/set-labels.py $pr done 1.13; done

or with
make add-labels BRANCH=v1.13 ISSUES=26118

/test-backport-1.13


Develop

Checklist

Please update the following checklist as applicable. Otherwise, the maintainers may close your pull request.

[ ] You created a branch from develop branch.
[ ] You PR is raised on develop branch and not onmain.
[ ] Blog follows Blog Guidelines.
[ ] You have read the Contribution Guidelines before creating this PR.
[ ] Checked for any duplicate blog entry.
[ ] Checked for all grammatical errors in the blog.
[ ] You have not published the blog content elsewhere on the internet on platforms like Medium, Dev.to, etc.
[ ] The content is not copy-pasted from elsewhere on the internet.

Description of Change

Hi @raghunath-r-a Please remove engineering blog for a while from develop branch, as @srishti-74 needs to merge growth and swi blog to prod


Remove universal binary compilation

Checklist

[x] Used a personal fork of the feedstock to propose changes
[x] Bumped the build number (if the version is unchanged)
[ ] Reset the build number to 0 (if the version changed)
[x] Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
[x] Ensured the license file is being packaged.

This is necessary since the packaged binaries resulted to have x86_64 compatibility, as opposed to arm64 one.

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.


JSON error

{"error":"partial write: unable to parse 'framerate,server=VanityCarbonClient instant=1,average=NaN<PHONE_NUMBER>172': invalid number\nunable to parse 'frametime,server=Vanity instant=3236.638,average=Infinity<PHONE_NUMBER>172': invalid boolean dropped=0"}

Noticed another issue already posted with similar issues, I'll add to that and close this.


ensure no missing info before handleRelevancy

PR Type:
Bug fix

PR Description:
This PR addresses an issue where short-lived containers, such as host-scanner, could attempt to generate a filteredSBOM on exit with missing instanceID. The solution ensures that all necessary image information (ImageID, ImageTag, InstanceID, and Wlid) is present before handling relevancy.

PR Main Files Walkthrough:
pkg/relevancymanager/v1/relevancy_manager.go: The function 'ensureImageID' has been renamed to 'ensureImageInfo' and its condition has been expanded to check for the presence of ImageID, ImageTag, InstanceID, and Wlid. This function is called in 'monitorContainer' method before handling relevancy.

User Description:
with short lived containers, such as host-scanner, we could try to generate a filteredSBOM on exit with a missing instanceID
{"level":"warn","ts":"2023-09-12T17:29:05Z","msg":"failed to filter SBOM","container ID":"e095f32808abc9b8417b3c0d6035a727d50e17984a6d5347d36a74edc1ff687b","k8s workload":"kubescape/host-scanner-gwlth/host-sensor","error":"instance id is nil"}

How is it possible you are missing info? What is the use-case? (this should never happen...)

apparently it does... since I saw this log - I guess more checks don't harm


Enable parallel docker ops

killStragglers has to be reworked to not rely on dockerLock
PPG 552 passed

Rebased and merged as https://github.com/openwhisk/openwhisk/commit/8a559899d85d5fef6e1491198065a80be81cbc02.


Android Studio Import Issue

After cloning I imported the code in Android Studio 2.3.3 But app folder is not showing in Project>Android and also other android specific option like Android Monitor is absent. Build Project not working.
How I imported is as followed. File>New>Import Project>android-RuntimePermissions>build.gradle and then clicked ok

Gradle sync failed: Could not find com.android.tools.build:gradle:3.0.0.
Searched in the following locations:
file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom
file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.jar
https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom
https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.jar
Required by:
project :
Consult IDE log for more details (Help | Show Log) (474ms)

Having this response when trying to build
Task 'assemble' not found in root project 'android-RuntimePermissions'.

This sample has been deprecated/archived (check README for more information on newer samples related to this technology).
As recommended by GitHub, we are closing all issues and pull requests.


discussion: implementing phoenix like websocket channels

I'm looking and playing around a bit with dream and I have a hobby project that would definitely benefit from something like channels in dream.
So I created this issue to start some discussion around how to implement this for dream. I haven't thought deeply about this yet, but I was wondering if you could give some input on what a good way of tackling this would be.
Questions I have at the moment:

What would be the best way of handling runtime state
I don't see an example of a long running websocket (the examples all send Dream.close_websocket) how would that work?
I would need a reference to the websocket so that I can broadcast, reply to other people,... Not sure what the best way to do that either

I don't see an example of a long running websocket (the examples all send Dream.close_websocket) how would that work?

You can simply pass the reference that you get to the WebSocket to any other function, store it in data structures, etc. There's no reason why you must close it inside that callback.

I would need a reference to the websocket so that I can broadcast, reply to other people,... Not sure what the best way to do that either

I think the above answers this, as well, but let me know if not.

What would be the best way of handling runtime state

What are the options? You should be able to handle it in any way in OCaml. A simple example would be some kind of mutable map from channel names to WebSocket lists, so (string, Dream.websocket) Hashtbl.t ref. There might be drawbacks to that depending on what you want to implement exactly, but that's at least one way to start off with.

Thanks, so, I'll create a recursive function and a mutable structure (Hashtbl for example), something like this:
module Channel = struct
  let joined = Hashtbl.create ...
  let join .... = update Hashtbl
end

let rec websocket_listener websocket =
  match%lwt Dream.receive websocket with
  | Some msg ->
    let key = key_from_message msg in
    let%lwt () = Channel.join ~key ~websocket in
    ws_loop websocket
  | _ ->
    Dream.close_websocket websocket

tested something similar to this and it seems to work.
Would this be something that would be useful to document in a simple chat example?

Yes, if you'd like to make an example (that is still about as simple as most examples), I'd merge it :)

I've been thinking a bit more about how to model this, feedback is welcome:
type topic =
  | Topic of string
  | WithSubtopic of (string * string)

type payload = Payload of string

type answers = answer list
and answer =
  | Reply of string
  | Broadcast of string
  | Stop of string

type 'a channel =
  { handle_join : topic -> payload -> 'a * answers
  ; handle_message : 'a -> payload -> 'a * answers
  }

val channels : (string * 'a channel) list -> Dream.websocket -> unit Lwt.t

The idea is that you can do something like this:
          Dream.websocket
      @@ Socket.channels
           [ ( "public_chat"
             , { handle_join = (fun topic payload -> (initial state, [ replies ]))
               ; handle_message = (fun state payload -> (new state, [ replies ]))
               } )
           ; ( "private_chat:123"
             , { handle_join = (fun topic payload -> (initial state, [ replies ]))
               ; handle_message = (fun state payload -> (new state, [ replies ]))
               } )
           ] )

This is a first brain dump, so it's not complete and it has at least one big flaw at the moment. A type 'a channel is no good, each channel can have a different type. I'll need an other structure for that.

The use of channels will force all the channels in one call to Socket.channels to have the same type parameter, so this might be more reasonable than I think you are suggesting :)

My original idea was that every Channel could have it's own state (and thus also decide on how the state would look like).
So for example a topic chat:123 would have some state and product:xxx would have some other.
Although maybe that's not really a requirement that I have at the moment...
I'm first going to try to play with this a bit and focus on the answer. The idea is that you can reply: Broadcast hi and it's a message that goes to everyone in the channel chat:123

I've made my current WIP public: https://github.com/tcoopman/dream-channels


Core: Merge latest changes from master

options for bootnodes orchestrator
md5 checks for binaries
updated ami

Updated to sha256

@phahulin can we merge it?

Yes, please do


creates vuejs folder

Thanks for the great session about Vue.js!

Thank YOU for making it happen! :)


Add all orders to OrderWatcher on startup

It appears that OrderWatcher isn't getting the orders in the database when restarted. This means expired orders and invalid orders aren't pruned if the service goes down.

Will work on a PR for this.


[FancyZones] new windows created by Chromium based browsers are not snapped into their parent's window zone.

Environment
Windows build number: [Win 10 1909 18363.900]
PowerToys version: 0.19.1
PowerToy module for which you are reporting the bug (if applicable): FancyZones

Steps to reproduce

Long version:

Open a Chromium based browser (I use Brave) and open a few tabs in a few separate windows.
Right click on the icon in the taskbar and select "Close all windows"
Open the browser again (it just opens a new tab according to my settings) then use the CTRL+SHIFT+T keyboard shortcut to re-open the closed tabs from the last session.
This will open each of the separate windows with their tabs per press on the letter T.
Now each of those windows (with a few tabs) will not be snapped into the zone their parent window (the one from step 3)

Short version :

open a browser window
snap it to a zone
open a new window from the hamburger menu or SHIFT+click a link/bookmark

Expected behavior

The newly created or re-opened browser windows (with tabs) should snap into the zone that is assigned to the browser.
Actual behavior

The newly created or re-opened browser windows (with tabs) are not snapped to anything, they are just arranged close enough of their parent window
Screenshots

Hi @Kahana82
this is currently by design since FancyZones doesn't have a way (yet) to determine if a child window is a window that should be snapped or not.
Closing as duplicate of https://github.com/microsoft/PowerToys/issues/4939 since the underline problem is the same.
Thanks.


Fix BUG 12549: Alluxio worker pods can't be started if changing rpc/data/web ports

Can one of the admins verify this patch?

alluxio-bot, merge this please

alluxio-bot, cherry-pick this to branch-2.3-fuse please

this PR fixed https://github.com/Alluxio/alluxio/issues/12549


[Admin] Redirect to all products page after adding a category

As an admin, after I add a new category, I should be redirected to the Products listing page.


Add apple music metadata

Updated the URI and metadata guessing to allow simplified Apple Music URIs, similar to existing Spotify and Deezer support.
Apple Music uses different URIs depending on whether an item is taken from the user's music library or from the broader service. This pull request includes support for both types of content.

Pull Request Test Coverage Report for Build 476414749

30 of 32 (93.75%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.6%) to 77.852%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/helpers/metadata-helper.ts
30
32
93.75%

Totals

Change from base Build 459194923:
0.6%

Covered Lines:
1228

Relevant Lines:
1595

💛  - Coveralls

Pull Request Test Coverage Report for Build 476414749

30 of 32 (93.75%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.6%) to 77.852%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/helpers/metadata-helper.ts
30
32
93.75%

Totals

Change from base Build 459194923:
0.6%

Covered Lines:
1228

Relevant Lines:
1595

💛  - Coveralls

And one more tip, this library uses sematic releases. So if your last commit message would start with fix: Support for apple music guessing. It would auto-release a new (beta) version after merge.
This would also mean there will be a note in the release notes about apple music

And one more tip, this library uses sematic releases. So if your last commit message would start with fix: Support for apple music guessing. It would auto-release a new (beta) version after merge.
This would also mean there will be a note in the release notes about apple music

@svrooij I didn't know about the significance of the beginning of the commit message. Perhaps it's in the docs. I'm not familiar with automatic releases based on commit message semantics.
I think you can put comments/instructions in a pull request template with the information that you just shared -- that way anyone who submits a pull request will see it and understand that it is relevant.

@svrooij I didn't know about the significance of the beginning of the commit message. Perhaps it's in the docs. I'm not familiar with automatic releases based on commit message semantics.
I think you can put comments/instructions in a pull request template with the information that you just shared -- that way anyone who submits a pull request will see it and understand that it is relevant.


[SPARK-38697][SQL] Extend SparkSessionExtensions to inject rules into AQE Optimizer

What changes were proposed in this pull request?

Add injectRuntimeOptimizerRule public method in SparkSessionExtensions
Why are the changes needed?

Provide a entrance for user to play their logical plan with runtime optimizer in adaptive query execution framework.
We should follow the existed Spark session extension to allow user inject the rule.
So developers can improve the logical plan leverage accurate statistics from shuffle.
Does this PR introduce any user-facing change?

yes, a new entrance for Spark session extension
How was this patch tested?

Add test

cc @cloud-fan @HyukjinKwon @dongjoon-hyun

thank you @wangyum

thank you @dongjoon-hyun for pointing out it. I tried to give a readable name for this PR.
I have unified the name to runtime optimizer and it should be better match the name of Statistics#isRuntime. Then the names change to:

Adaptive Query Execution Runtime Optimizer Rules  in document
RuntimeOptimizerRules in val and method names
User Provided Runtime Optimizers in Batch name

I'm also good with the name change if you have other good idea.

@cloud-fan @maryannxue any comments ? thank you

thanks, merging to master!

thank you @cloud-fan @dongjoon-hyun @maryannxue !

@ulysses-you @cloud-fan @dongjoon-hyun  we are finding this feature useful to try out optimizations.  It would be nice to have in the older spark branches (like 3.3) so it could be used sooner.  Does anyone have objections if we backport this?  It seems like its a fairly small change that shouldn't be to risky.

When do you expect Apache Spark 3.3.2? I thought Apache Spark 3.4.0 will be faster than 3.3.2, @tgravescs .

https://spark.apache.org/versioning-policy.html

yes 3.3.2 might not be for a bit but it might get faster adoption then moving up a major version to 3.4. We were thinking about trying on the 3.2 branch as well but haven't yet as wanted to get feedback first.

Do you need only this patch, @tgravescs ?
Also, cc @sunchao

Although it's sort of a new feature that we don't usually backport, I think practically it's nice to test it out if the feature can be tested out in production, and I don't believe there'd be any risk here so I am fine with backporting.

I'm fine with backporting as well.

+1 on backporting this too.

We can get this to Spark 3.2.3 release too.

I'm also fine. It won't do harm.

If this is the only backporting target, I'm fine too. If it turns out this backporting requires additional patches or introduce some hidden breaking change, we had better respect the existing Apache Spark community policy and I believe we can revert it back in that case at that time, @tgravescs .

Thanks for the feedback, we will work on putting up prs for 3.3 and 3.2 line. We know the 3.3 one is straight forward but we will see what the 3.2 one looks like and can make decision if other things needed.  And agree @dongjoon-hyun if anything unexpected goes wrong just revert it.

+CC @xkrogen , @robreeves

3.2 backport PR: https://github.com/apache/spark/pull/38401

3.3 backport PR: https://github.com/apache/spark/pull/38403


Add support for webapp's new configurable notification sounds feature

Via https://github.com/zulip/zulip/pull/8061, we recently added Zulip webapp support for picking a notification sound from a set of (currently) 2 choices.  Before doing mobile work on this, we should wait for the server/client API to work how we want it to (right now, we send just a name, e.g. "ding", to tell a client what sound to use, and I think we should instead send a dictionary structure mapping available sound file formats to full sound URLs, as described in https://github.com/zulip/zulip/pull/8061#issuecomment-445692152), but I'm opening the mobile issue now so that we don't forget about it.

I suspect this will be more complicated on mobile than it sounds to be useful if implemented fully flexibly like that.
What if we just supply the files up front and the only option given is one of the names?

Well, we can certainly do that for v1, and plan to extend with "if the key is a URL, fetch it".


Could not pass event PlayerUseUnknownEntityEvent to FancyNpcs

i keep getting errors: https://pastebin.com/L46qVKKy
and i cant update the paper version cuz im on minehut....

Well the only way to fix, is to update paper. Maybe you can use a fork of paper that has a higher version of paper, if you understand what I mean

i got same error on folia 1.20.1

Do you use the latest commit of folia 1.20.1?

Minehut updated paper but it it still giving this error.
https://pastebin.com/x7stSEF6

Minehut updated paper but it it still giving this error.
https://pastebin.com/x7stSEF6

Okay but this error has nothing todo with FancyNpcs?

Do you use the latest commit of folia 1.20.1?

yes, folia 1.20.1 latest commit on sep 12 github
https://github.com/PaperMC/Folia/commit/edafbcef6884cffe493e62cd71f4957708fba7ff
newer version is dev/1.20.2 which is still dev version

Should be fixed with the newest Folia version


Add min height to "body > container"

Add min height 36vh to body > container. This is to remove repositioning of the footer when the items are still loading.

I would like to work on this

Ok @Graviton5 I'll assign you


Multi-select in Event Log Rule Scanning

In the scenario where there are 100s or 1000s of events, it would be helpful to add a multi-select option so users can quickly add allow rules for all audited/blocked apps.

If I could add to this?
It would be could if you could remove or untick a rule; if you mis-clicked one.
Currently, you have to back out and start over, or complete the adding rules section, and then delete the rule afterwards from the policy. This would save time.


Generate histograms

Generate histograms from diabetes dataset
Adding a kde (kernel density estimate) it's a good plus for this one


abp-zero recaptcha bug

Hi,
I find out that abp-zero project's register page use Recaptcha.Web.dll to generate recaptcha, but this dll use google's api to generate recaptcha, as we can visit google's web site in china, so this function is unuseful to us, please consider to change another way to generate recaptcha. thank you.
alex.

Hi,
I don't want to change it since Recaptcha is the most widely used method. But you can change it for your application and it does not get too much time of you.
Thanks.


ThinkCentre M70q chromeos locked

I have recently purchased ThinkCentre M70q with locked ChromeOS unable to unlock it by any method please help
I'm already a user of  unlocked Chromebook windows user thanks to @MrChromebox for that support.

this isn't really an issue with my firmware or something my script can do. The best option I can offer is for you to flash the UEFI firmware image directly using an external programmer, following the instructions in my unbricking guide: https://wiki.mrchromebox.tech/Unbricking. a SuzyQ will not work here since the CCD is locked out by virtue of the device being managed

@MrChromebox Thanks for understanding the situation please share the UEFI Firmware for Lenovo M70Q So i can unlock the device

the unbricking guide linked above tells you how to get the current download links :)

Hello There @MrChromebox Lenovo M70q is not present in the list where can i find the firmware

Hello There @MrChromebox Lenovo M70q is not present in the list where can i find the firmware

You mean the M60q, right? Google turns up nothing for a M70q Chromebox
https://mrchromebox.tech/#devices lists the name for the M60q as KINOX. The script provides a download for this board

@MrChromebox  i mean Lenovo M70Q its this machine
https://www.lenovo.com/ca/en/p/desktops/thinkcentre/m-series-tiny/thinkcentre-m70q/wmd00000405?orgRef=https%253A%252F%252Fwww.google.com%252F
locked as chromeos and showing some Amazon ChromeOS Admin locked

@bparihar that's not a ChromeOS device, nothing we can do to help


feat: quantum computing

I have some experience on Microsoft quantum computing several years before by using their framework with Q#. However, it hard to say useful for now. Since LLMs becomes the hot trend, more people are crazy on it but they still with the traditional techniques on training it. Also we got LoRA, the training processing are still too long.
So, I see the change for quantum computing. If here has a evolution of computing way for the infrastructure. I believe the LLMs will be more powerful than now.

https://github.com/hololandscape/blog/commit/f1c3266743a3e9bc8978bc94022a2f29d9706764


The collection has not been initialized

I keep getting the following error when I attempting to create a new folder and apply permissions to the folder.
format-default : The collection has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested.
+ CategoryInfo          : NotSpecified: (:) [format-default], CollectionNotInitializedException
+ FullyQualifiedErrorId : Microsoft.SharePoint.Client.CollectionNotInitializedException,Microsoft.PowerShell.Commands.FormatDefaultCommand

@AreAyeZee - Please create the issue with the template provided, cmdlet used, version, etc...Thanks.


Non-working code sample

Hey peeps, the first code sample on this page doesn't quite work.
I'm not 100% sure of the intention, so I'm filing this first and happy to submit a PR to fix, if someone lets me know what was the original intention :)

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 49b15fd3-39b5-3ad9-8c4e-b8160360dee9
Version Independent ID: c33981af-93ce-d4be-a265-5d4696666c7a
Content: Request and Response operations in ASP.NET Core
Content Source: aspnetcore/fundamentals/middleware/request-response.md
Product: aspnet-core
Technology: aspnetcore-fundamentals
GitHub Login: @jkotalik
Microsoft Alias: jukotali

So the first example should work, but is used more to demonstrate the issues of not using a pipe to read the request body.
What exception or incorrect behavior are you observing?

I appreciate that, however the sample is not working.
The obvious thing is that the loop breaks before the stream is read. There are other issues too.
To be fair I haven't fully checked the other samples so they might not be working either.

@TheBeardedLlama  The sample doesn't compile with ASP.NET Core 3.1. How did you fix the
Error	CS1501	No overload for method 'UseRouting' takes 1 arguments	RequestResponseSample	C:\tmp\0\RequestResponseSample\Startup.cs	30	N/A
pp.UseRouting(routes =>   // No overload for method 'UseRouting' takes 1 arguments
{
    routes.MapPost("/Streams", async context =>
    {
        var list = await GetListOfStringsFromStream(context.Request.Body);

        foreach (var item in list)
        {
            await context.Response.WriteAsync(item.ToUpperInvariant());
            await context.Response.WriteAsync(Environment.NewLine);
        }
    });

Hey @Rick-Anderson
I'm on 2.1 for my current project (don't ask...), so unfortunately, I can't help with that question.
Apologies. I can do some digging outside of work if you like. Happy to help

@TheBeardedLlama  that explains it. The sample project is using 3.0, which I upgraded to 3.1.
@jkotalik  I can make a 3.1 version of this for you if you can supply the 3.1 code for app.UseRouting(routes =>   // No overload for method 'UseRouting' takes 1 arguments

The sample I'm referring to is the first one on that page.
Cursory glance at the loop and you will see what I mean.
my offer to help stands

@TheBeardedLlama  any chance you could install 3.1 and look at https://github.com/dotnet/AspNetCore.Docs/pull/18557 ? Can you suggest how I can test? Postman only works with the first snippet.
@jkotalik  can you review #18557

apologies @Rick-Anderson I got distracted!
I will have a look this evening (UK time)

ASPNETCore 2.1, in the controller's
Method:
public async Task UploadPhysical()
I get the following error at
Line of code:
await targetStream.WriteAsync(streamedFileContent);
Error:
Error	CS1501	No overload for method 'WriteAsync' takes 1 arguments

@Amestdian some of these features weren't added until 3.1. The article is targeted for 3.1 and above, and isn't relevant until 3.1.


Semantic URLs

It would be nice to implement semantic URLs for resources like User, Plan, and Course.

Course doesn't have its own view.
Plan isn't going to necessarily be unique, except by the user-name (see below)
User is uniquely identified by their email address, which would be annoying to have be a semantic URL.

Therefore I'm closing this for now.


Add execCPUAffinity to the runtime process spec

Solves https://github.com/containers/oci-spec-rs/issues/168
Used https://github.com/containers/oci-spec-rs/pull/136 as a reference to add new field to the spec.

PTAL @utam0k

@keisku do you mind a rebase?

After rebasing it, I think we should add validation to ExecCPUAffinity and unit tests. Let me add it!

@utam0k PTAL

Sorry for the late


fix: hotfix manifest

fix: #133 ; fix publicPath; feat: getPublicPath

needful
---- Replied Message ----
| From | Giorgio @.> |
| Date | 10/04/2024 15:34 |
| To | module-federation/vite @.> |
| Cc | zhn @.>,
Author @.> |
| Subject | Re: [module-federation/vite] fix: hotfix manifest (PR #134) |
@gioboa commented on this pull request.
We are ignoring getPublicPath. is it correct to pass it in the manifest?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>


setting with enlargement fails for large DataFrames

Setting with enlargement seems to fail for DataFrames longer than 10**6 - 1
10**6 seems to be the exact treshold for me. That and anything bigger fails. Anything smaller works.
Example:
import pandas as pd

#works
X = pd.DataFrame(dict(x=range(10**6-1)))
X.loc[len(X)] = 42

#doesn't work
Y = pd.DataFrame(dict(y=range(10**6)))
Y.loc[len(Y)] = 42

>>> IndexError: index out of bounds

pd.show_versions() returns:
INSTALLED VERSIONS
------------------
commit: None
python: 2.7.9.final.0
python-bits: 64
OS: Windows
OS-release: 7
machine: AMD64
processor: Intel64 Family 6 Model 42 Stepping 7, GenuineIntel
byteorder: little
LC_ALL: None
LANG: fi_FI

pandas: 0.16.2
nose: 1.3.6
Cython: 0.22
numpy: 1.9.2
scipy: 0.15.1
statsmodels: 0.6.1
IPython: 3.0.0
sphinx: 1.2.3
patsy: 0.3.0
dateutil: 2.4.2
pytz: 2015.4
bottleneck: None
tables: 3.1.1
numexpr: 2.3.1
matplotlib: 1.4.3
openpyxl: 1.8.5
xlrd: 0.9.3
xlwt: 0.7.5
xlsxwriter: 0.6.7
lxml: 3.4.2
bs4: 4.3.2
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: 0.9.9
pymysql: None
psycopg2: None

this is the same issue as in #10645
the cases for len > 1M have different handling and something is amuck.
You know that you are copying the frame on enlargement right? This is extremely inefficient.

@jreback   What is the recommended way to do this?  This exact way is mentioned in the docs and doesn't seem to be discouraged there:
http://pandas.pydata.org/pandas-docs/stable/indexing.html#setting-with-enlargement

what are you trying to do exactly?

I'm not trying to do anything!  Or maybe you are talking to the OP?  I was actually wondering the same thing, as I would generally use append() for this general thing.
But FWIW, these questions do come up at stack overflow with some regularity and if they found "setting with enlargement" in the documentation this is suggested as the way to do it. (or one of the ways, anyway).

@johne13 sorry, was on my phone.
So enlargement is equivalent of df.append(Series(..., name=key)). This creates by definition a copy. A doc note/warning would be nice here.

Actually I didn't know that the df is copied with every enlargement anyway.
But yeah some warning in  docs would probably be nice to avoid misundersting.

About "what are you trying to do exactly?":
I just have a huge DataFrame where I append some information when it's returned from functions etc. I probably have to do some redesigning. I guess the way to go is somehow to preallocate the rows in the main DataFrame or collecting the "stuff to be appended" in some smaller list/df first and then appending all in the end.

jreback commented on Jul 28, 2015

So enlargement is equivalent of df.append(Series(..., name=key)). This creates by definition a copy. A doc note/warning would be nice here.

Jeff, I guess you didn't mean it's a "copy" of the original object in the sense of creating a brand new, unrelated object. If you just meant that a lot of data had to be copied underneath the hood, then I understand completely.
Still, I'd guess it's quite different from append in that it manages to add a row in-place. (I didn't even know it's possible...)
df = pd.DataFrame({'a':[1]})
df1 = df
df1.loc[10] = 100
assert df is df1
assert len(df) == 2


Redirect to guide page after install

Hello, how can I set a custom redirect in the after authenticate job? I want after install to redirect the user to /how-to-install.

Just use conditional logic in your home controller to redirect if it's their first visit.

@fyroc  Is correct. Since the job is dispatched out (either inline or background) the redirect won't happen, so this redirect you wish to do needs to happen in a controller or middleware, but a simple check on the home controller would work.


Added Huffman for Lua

Everything should be here. Accidently submitted a PR to my forks master derp.

Squashed Commits because that's all the rage rn I hear


store no longer compiles with new version vector-<IP_ADDRESS>.

E.g. and many similar error messages appear:
/home/curators/work/unpack-dir/unpacked/store-0.7.18-6e9fb2c1c59a9f2fb62abd0016841417b57b9a3e045088d48d65cc740cb1eeb9/src/Data/Store/Internal.hs:824:2: error: [GHC-39999]
           • No instance for ‘Store a’ arising from a use of ‘peek’
             Possible fix:
               add (Store a) to the context of the instance declaration
           • In a stmt of a 'do' block: c0f0 <- peek
             In the expression:
               do c0f0 <- peek
                  return (Data.Vector.Unboxed.Base.V_DoNotUnboxLazy c0f0)
             In an equation for ‘peek’:
                 peek
                   = do c0f0 <- peek
                        return (Data.Vector.Unboxed.Base.V_DoNotUnboxLazy c0f0)
           |
       824 | $(deriveManyStoreUnboxVector)
           |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I will disable this package on stackage for now.
(fyi @snoyberg).

As a Hackage trustee I revised a few latest releases with vector < <IP_ADDRESS>.

Fixing this issue requires https://github.com/snoyberg/mono-traversable/issues/244 being resolved first.

@mgsloan I think we can close this issue now.
@Bodigrim and @alaendle It should be okay to add store into the nightly builds on stackage again.


Create a Python video from the script #data_structures_lists_and_tuples.md

Check out this Python script and create a short video explaining how it works:
https://raw.githubusercontent.com/PythonEducationVid/PythonBrokenEnglish/main/scripts/english/data_structures_lists_and_tuples.md
Follow the Instructions for Creating and Submitting Videos
You can create a screen recording or animation based on the content of the script. If your animation is designed for children, please add the "for kids" label to your pull request.
You do not need to be extremely efficient in speaking English, In fact, we need more Broken English Programming videos or native Videos(So be free to use broken English or your native language).
If you would like to create your own script's content relative to the topic, feel free to do so. However, please choose your words carefully to avoid any inappropriate language or abuse. We highly recommend you review our Video Creation Guidelines before starting.
Any video, audio or script you create, should have a unique name to avoid any form of conflicts. You can add your name or a unique set of numbers or hash to your video. For instance "introduction_to_python_by_jacob". Make sure your video is visually clear and has good sound quality, so people can easily understand and enjoy it.
How to Submit Your Video
After creating your video, you'll need to submit it via a pull request. Follow this YouTube guide on making a pull request to ensure your submission is correct.
After Submission
Once your video is merged (added to the project), please check our social media platforms to ensure it has been posted. If you notice that your video has not been posted after merging, add a "not posted" label to your open/closed pull request.
Our Social Media Links:

YouTube: https://youtube.com/@pythoneducationalvid?si=kKWDvbzPu1Gajo6o
GitHub: https://github.com/PythonEducationVid
TikTok: https://www.tiktok.com/@python.education?_t=8pqhBAobvLK&_r=1
X (formerly Twitter): https://x.com/PythonVid?t=PMyQBP2dFmr7EoJBcrEg4w&s=09
Telegram: https://t.me/PythonEducationVid

Hi there! I'd love to work on this issue and create a video explaining the Python script. I'll make sure to follow the guidelines for video creation and submission. I'll also ensure the video is clear and easy to understand, with good sound quality. Looking forward to contributing!

Alright. That would be very good. Looking forward to accepting your Pull
request...
On Sat, Oct 19, 2024, 11:41 PM Fares Bouzayen @.***>
wrote:

Hi there! I'd love to work on this issue and create a video explaining the
Python script. I'll make sure to follow the guidelines for video creation
and submission. I'll also ensure the video is clear and easy to understand,
with good sound quality. Looking forward to contributing!
—
Reply to this email directly, view it on GitHub
https://github.com/PythonEducationVid/PythonBrokenEnglish/issues/18#issuecomment-2424255321,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOKWIBJ4DAMUFJOMZXVGQILZ4LNX7AVCNFSM6AAAAABQHY2KGGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRUGI2TKMZSGE
.
You are receiving this because you authored the thread.Message ID:
@.***>


Update boostrap to 4.1.1

Updating boostrap required pulling in popper.js (which
required adding sync-exec as a dev dependency). Some
of the templates were updated based on changes from
bootstrap.
Signed-off-by: Adam Wallis<EMAIL_ADDRESS>

@sloria, @dasdachs - Can you take a look and let me know if any improvements are needed?

@adawalli thank you! Great job!
Just a personal preference: since bootstrap 4 removed btn-default, I'd replace it with btn-light not btn-primary.

But it's your and @sloria 's call.

This is great! Thanks for this @adawalli .
I few minor suggestions.
The featurette buttons should be de-emphasized. There should only be one call to action on a page. I think btn-outline-secondary works well.

The jumbotron should take up the entire width (no whitespace on the sides).

Check out the jumbotron template in the docs: https://getbootstrap.com/docs/4.1/examples/jumbotron/
There isn't enough margin around the sign-up form:

Does it have the proper container classes around it?
None of these are hard blockers to merge. Let me know if you don't have time to do them, and I can fix them up when I have some time.

Thanks for the feedback @dasdachs
@sloria, I will definitely take a look at your comments and work on fixing them up soon. Thanks!

if you want to finish this out, I would be grateful. I am not going to get to it like I had thought

No problem. I've marked this one as 'help wanted'. I don't have time to work on this right now, but hopefully someone else can pick this up.
Thanks again for taking this on!

Let me know if there is anything else I can do to help with the migration.

@Hiyorimi Thanks for continuing work on this! Would you mind resolving the merge conflict?

Github suggests that Only those with write access to this repository can merge pull requests.

Fixed in #359.

OK, let's carry this on in #359.


Add support for replacing a channel handler

Resolves #1694
Motivation:
Third party request to be able to replace a channel handler, instead of having to add then remove. This makes the API slightly nicer/easier to work with.
Modifications:
Add 2 public methods to replace an "old" channel handler with a "new" one. One future-based, one promise-based.
Result:
You can now replace a channel handler with a call to channel.pipeline.replaceHandler(old, with: new)

@Lukasa good point. I went in with the thought that it makes sense for the new handler to be inserted before the old one is removed, so that the new handler can immediately begin to buffer/handle data.
There should be exactly one intermediate state, where the new handler has been added but the old has not yet been removed.

@Lukasa good point. I went in with the thought that it makes sense for the new handler to be inserted before the old one is removed, so that the new handler can immediately begin to buffer/handle data.
There should be exactly one intermediate state, where the new handler has been added but the old has not yet been removed.


Updated Cookbook: Example for Fetching Scores from Langfuse

Description
This update provides an example of using the fetch_scores() function from Langfuse to retrieve evaluation metrics. The example integrates UpTrain and Ragas for model evaluation and demonstrates how to log and fetch scores within Langfuse as mentioned in https://github.com/langfuse/langfuse/issues/3505
Key Features

Evaluation with UpTrain and Ragas:

Provides examples for evaluating context relevance, factual accuracy, response completeness, context precision, faithfulness, and answer relevancy..

Fetching Scores:

Shows how to retrieve and filter scores using fetch_scores_from_langfuse.

Correlation Matrix Visualization:

Adds a section that calculates and visualizes the correlation between UpTrain and Ragas evaluation scores using a heatmap.

[!IMPORTANT]
Adds an example for using Langfuse to fetch scores, evaluate models with UpTrain and Ragas, and visualize results using a correlation matrix.

Behavior:

Adds example for using fetch_scores() from Langfuse to retrieve evaluation metrics.
Demonstrates integration with UpTrain and Ragas for model evaluation.
Shows how to log and fetch scores within Langfuse.

Visualization:

Includes a section for calculating and visualizing correlation between evaluation scores using a heatmap.

Misc:

Minor whitespace changes in dspy.md, instructor.md, example-javascript.md, example-python-langgraph.md, example-python-instrumentation-module.md, example-python.md, example-vercel-ai.md, example_external_evaluation_pipelines.md, integration_dspy.md, integration_instructor.md, integration_langgraph.md, integration_llama-index_instrumentation.md, integration_llama_index_posthog_mistral.md, integration_mirascope.md, integration_mistral_sdk.md, integration_ollama.md, integration_openai_structured_output.md, example-langchain.md, js_integration_langchain.md, js_tracing_example_vercel_ai_sdk.md, prompt_management_langchain.md.

This description was created by  for 02ebc242f05aa872fb1742d8b1514c5dd217a0aa. It will automatically update as commits are pushed.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.0 out of 2 committers have signed the CLA.:x: Your Name:x: Sohammhatre10Your Name seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

@marcklingen Yupp, this was based on a single trace, and the scores were fetched accordingly. Haven't used any specifics for traces, but this was the first trace I created, so it defaulted to the first trace. Should I add more specificity for a single trace? Apologies for the late reply.


Need to add FaceID permission

This is a placeholder, I will elaborate further

Hi @jevonmao,
Is someone working on this task if no maybe I can look into it. Can you provide me a description or guide how to implement new permissions?
Thank you in advance
Best regards
NH

@N3v1 Hi, I believe https://github.com/jevonmao/PermissionsSwiftUI/blob/main/docs/New_Permission_Guide.md should be of some help.

Thx for the guide - I'll look into it and create a PR as soon as possible 👍

@jevonmao, I have created a pull request that fixes the issues with biometric authentication methods. The PR number is #148.
Best regards
NH


Use TailwindCSS

Use TailwindCSS instead of writing normal CSS code as it's easier to maintain & easy to:

Implement adaptive styles (works on mobile & laptop etc through sm:, md:, lg: etc)
Implement dark mode (using dark:)

Stay in the same HTML file instead of constantly switching to CSS files
https://tailwindcss.com/

I will be interested

Or we can use Styled Components?
ps: not a big fan of Tailwind CSS :')

ah... interesting. I'm not too sure whether we can implement above features easily in Styled Components though

We can probably do both?

Or we can use Styled Components?
ps: not a big fan of Tailwind CSS :')

Yes styled-components or emotion would be easier for me to implement as well 🙈

Interested

We can probably do both?

Yes. Definitely, we can.
But let's ask what the rest of the pod members first think about this since we all will be working together on this project :D

I don't have any experience with Tailwind or any of the other tools mentioned here, styled components look interesting but I leave it open! Maybe we can go with @yyjlincoln's suggestion though and use both but I'm not sure how well they play together 🙌

Like @ditsuke, I don't have any experience with either of the things mentioned. Let's try both and see what suits us best.😃

Maybe we can go with @yyjlincoln's suggestion though and use both but I'm not sure how well they play together 🙌

@ditsuke They don't actually play together. If we use both, it'll be essentially like using two frameworks or two different ways of styling (separately).
I usually prefer css-in-js while writing CSS in React or other JS frameworks. We can also use Tailwind with Styled Components but for that, we've to use another library called twin.macro which gives us the functionality to leverage the use of Tailwind in Styled Components.

Yeah I'm not too sure how well they play together either. Tailwind is css in html (using classes)

For example, if I want to apply: display: flex; flex-direction: row for a specific element

:

Or if I want to also add a @media tag so that it becomes flex-direction: column on mobile:

  (only when screen size > md (medium) then we'll use flex-row
Dark mode is easy with dark: in front of any class - they will only be activated in dark mode.

You can use it to create components as well - Just use {children}, for example:

function testComponent({children, param, ...args}){ // ...args here passes on everything else to the outer div such as onClick
    return (

            {children}

    )
}

Then,
function App() {
    return (
        // Other divs
        <testComponent param={true} onClick={()=>{console.log('hello')}}>
            // Children
        </testComponent>
    )
}

*Note that in JSX syntax, we'll need to use className instead of class
I haven't worked with StyledComponent/Emotion for too long so I can't say much about StyledComponent/Emotion. I think it's like css-in-js but I will be open to using them as well! I just personally prefer Tailwind as I prefer using css in html rather than css in js

Not sure having two technologies do the same task is a good idea. Also learning two different techs might be a bit too much. Let's settle on one!

@MLH-Fellowship/mlh-prep-january-2022 let's decide on something today! If we want to go with Styled Component there's still a way to nominally include tailwind the CSS-in-JS way with twin.macro. However it looks like most current PRs are using Vanilla CSS, so we need to make the addition ASAP to have any time to work with it.

I would slide with Emotion/styledcomponents when ccompared with tailwind CSS.But i think MUI(material UI) is lot simpler than both of them. Take a look here, https://mui.com/components/buttons/

@MLH-Fellowship/mlh-prep-january-2022 I've posted a poll link on the discord. Lets get to a decision and close this issue.

According to vote done today, we're using Material UI instead.


Docs say no JavaScript linter comes with VSCode, but it's still linting (and doing it wrong in *.cshtml)

Issue Type: Bug

Open VSCode with no extensions with code --disable-extensions.
Create a JavaScript file. Say c:\temp\temp.js
Enter the following code in temp.js:

var

Select "View >>> Problems" from the menubar.
See linting error reported, "Variable declaration list cannot be empty."
Look at VSCode docs here: https://code.visualstudio.com/docs/languages/javascript#_linters
Note quote:

"While VS Code does not include a built-in JavaScript linter, many JavaScript linter extensions available in the marketplace."

Be confused what's reporting an error.
Have no idea how to turn this off.

Actual, not simplest, use case (and StackOverflow question to match):
I have cshtml files where whatever is doing this linting reports...
"Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning.".
... for value Razor template comments in the form
@* This is my comment in Razor template format *@

I use eslint to lint elsewhere. I need this turned off.

VS Code version: Code 1.66.2 (dfd34e8260c270da74b5c2d86d61aee4b6d56977, 2022-04-11T07:46:01.075Z)
OS version: Windows_NT x64 10.0.19043
Restricted Mode: No

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-9850H CPU @ 2.60GHz (12 x 2592)

GPU Status
2d_canvas: enabledcanvas_oop_rasterization: disabled_offdirect_rendering_display_compositor: disabled_off_okgpu_compositing: enabledmultiple_raster_threads: enabled_onoop_rasterization: enabledopengl: enabled_onrasterization: enabledraw_draw: disabled_off_okskia_renderer: enabled_onvideo_decode: enabledvideo_encode: enabledvulkan: disabled_offwebgl: enabledwebgl2: enabled

Load (avg)
undefined

Memory (System)
31.73GB (13.01GB free)

Process Argv
--disable-extensions --crash-reporter-id 10d9d6b4-285d-425e-8f68-9113effa0ab4

Screen Reader
no

VM
0%

Extensions disabled
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyl392:30443607
pythontb:30283811
pythonvspyt551cf:30345471
pythonptprofiler:30281270
vsdfh931cf:30280410
vshan820:30294714
vstes263:30335439
vscorecescf:30445987
pythondataviewer:30285071
vscod805cf:30301675
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
pythonvsnew555:30457759
vscscmwlcmt:30465135
cppdebug:30475216

That's not separate linter such as ESLint, but VS Code comes with bundled JS/TS support and it reports errors including syntax errors.
Problem in your case is that .cshtml files are treated as usual HTML files(see HTML in status bar) which and if you use <script> tag without type attribute or with application/javascript VS Code will treat it content as regular JS and will report obviously invalid JS Syntax.
In general case - you should check for extension that will provide proper support for razor templates (should be supported by C# extension which should treat them as "ASP.NET Razor" instead of "HTML") and  will account for that syntax.
Not recommended way - search for settings with "validate" in them.

@IllusionMH Thanks for the kick in the pants. Yeah, I stumbled over the not recommended solution (setting html.validate.scripts to false) earlier today for my cshtml issue, and I think I crept closer to the recommended a bit (both covered in my answer to my own question on SO), if only by saying I bet it's related to my "files.associations" settings which considers cshtml as html [for other extensions to play usefully with Razor templates].
Sure enough, that does work -- if I remove both "html.validate.scripts": false, and...
  "files.associations": {
    "*.cshtml": "html"
  },

from settings, the errors disappear.
But I'm now not getting any script parsing in cshtml now.
So I'm still not sure how to get cshtml and script parsing to play together nicely, but otherwise it's working.
I'll close.

I think it's best to check existing docs for C# extension to see if there is existing solution or open new issue there (if there isn't one).
I don't think that there is any solution possible for plain HTML(with embedded JS) to have invalid JS syntax and still have adequate suggestions. Extension that handles these files should provide support for both: razor syntax and, probably, embed JS parts.


⚠ Turnos 24x7 has degraded performance

In 7baa3ed, Turnos 24x7 (https://reservas-dev.alternativasinteligentes.com/) experienced degraded performance:

HTTP code: 200
Response time: 1023 ms

Resolved: Turnos 24x7 performance has improved in 9fdc58c.


Reassess handleCreatorForObject method

Currently, jskos-server overwrites the creator and contributor fields of all incoming entities with its own logic. There are several issues with that, however:

contributor should always be adjustable from the outside (I think)
Possibly it might be necessary for creator to be adjustable as well and contain multiple people (currently, it will always contain only the identity of the person performing the request)
It conflicts with the logic we determined for #99.

Maybe, instead of completely overwriting those two fields, the method should check if certain expected things are given (like that the identity performing the request is part of either creator or contributor, and that it should definitely be in creator for POST requests, for example), but keep the changes that were performed.
What do you think, @nichtich?

Also don't forget to adjust the tests if this functionality is changed. 🙈

Currently, jskos-server overwrites the creator and contributor fields of all incoming entities with its own logic.

I thought it only adds values to creator or contributor but this is not fully clear from the application of handleCreatorForObject in bodyParser. In any case we have three sources of creator/contributor data to be merged:

existing entity
payload entity
authenticated account

Furthermore the logic required for #99 for editing concordances and the logic for editing concept schemes is not the same. I need to think about the other entity types first but just adding another if-branch for concordances may be easier.

My question is if it's possible to simplify and unify this logic. Do we even need to adjust the fields or can we trust the client that what they are sending is intended? Of course there need to be a few hardcoded rules, like that there needs to be at least one creator, and if there's no creator field on a POST request, that the authenticated account is added there. But other than that, I think it should be fine just removing the rest of the logic. Maybe I'm missing something though.

I'll try to summarize editing editing and how it should affect creator and contributor:
Creation of entities:

Take contributor from payload
If anonymous==true remove creator from payload
elsif auth==true use authenticated account as creator of payload
else don't modify creator of payload

Thus a newly created entity can have arbitrary contributor and

no creator for anonymous==true
otherwise

arbitrary creator for auth==false
exactly one, authenticated user as creator for auth==true

Update of entities:

Take contributor from payload
If anonymous=true remove creator from payload and existing entity
elsif auth==false take creator from payload to existing entity
else

if crossuser==false use authenticated account as creator of payload
else (crosssuer editing)

if payload contains non-empty creator, use it to update the existing entity
otherwise keep creator from existing entity and add authenticated account to contributor unless it is already listed in creator or contributor of the existing entity

Thus modification of entities

takes contributor from payload (but may add the authenticated account under certain conditions)
does not include any creator if anonymous==true
otherwise can set arbitrary creator if auth==false
otherwise sets exactly one, authenticated user as creator if crossuser==false
otherwise (crossuser editing) can set arbitrary but non-empty creator. If the client does not wish to do so, creator and contributor are adjusted automatically.

Note that we have two use cases for crossuser editing by authenticated users:

In bartoc.org any user listed in identities can modify vocabulary records, no matter if listed as contributor/creator or not
In coli-conc concordance registry only some users will be allowed to create concordances (because they will be listed via identities) but all users will be able to modify concordances iff they are listed as contributor/creator

The logic described in my previous comment is not about whether an action is allowed but how to set fields creator/contributor, if the action is allowed, so I think both use cases are possible by different combination of  configuration of identities and crossuers (?)

I like that we are narrowing in on a solution that works with the existing system. There's just one thing that I can't fit into your solution: How do we deal with editing mappings that belong to a concordance? This needs to be handled as an exception in any case because we always need to check the creator/contributor of the concordance. I'm also not sure whether it makes sense to override the creator if an entity is updated (and the creator override is not part of the updated payload). Although, this only happens for crossUser==false and it that case, in theory, creator should already include the authenticated account.
One more thing: With your solution, a contributor of a concordance is able to change concordance metadata as well, right? This is in conflict to what we discussed in #99, unfortunately.

One more thing: With your solution, a contributor of a concordance is able to change concordance metadata as well, right? This is in conflict to what we discussed in #99, unfortunately.

No, this issue is only about how the creator and contributor field can be modified. Checking whether an account can modify a record at all, is on another level. I'll try to summarize the other questions in another post

I started implementation in branch issue-153. The tests haven't been adjusted yet.

I have now implemented the changes, but with a few modifications that I thought made more sense:

If anonymous==true, both creator and contributor will be removed from payload. However, existing values will not be removed. (Thus anonymous is only for future changes and does not affect existing entities.)
If auth==true, the creator will not be adjusted, except for URI changes (i.e. we know that it's the authenticated user's entity and we update the main URI and name used in the creator field).
There is no differentiation for crossUser. For auth==true, the authenticated user will always be added to contributor if they are not already in either creator or contributor.

My reasoning for this was that the creator of an entity shouldn't actually change, even if it was updated by another user, because that other user is not the creator. However, I concur that it might be necessary to allow changes in creator, for example to give another user rights to edit a particular entity. Right now, I don't think we have a use case for this though.


[SUGGESTION] - Support a constructor that can receive an already instantiated LiteDatabase instance

Hi,
First off, kudos for putting this lib together!
While going through the constructor options, I realized for example there is not overload for connection string + BSON mapper, which happens to be there in the LiteDatabase object. Your lib currently exposes either one or the other, but not both together.
So, instead of creating yet another overload, I was thinking maybe we could simplify this and give the consumer the ability to tweak a LiteDatabase instance and feed your lib with it.
public LiteDatabaseAsync(LiteDatabase underlyingDatabase)
{
  _liteDB = underlyingDatabase ?? throw new ArgumentNullException(nameof(underlyingDatabase));
  _backgroundThread = new Thread(BackgroundLoop);
  _backgroundThread.Start();
}

The good thing about it is: Things like Pragmas and indexes would be available to the caller (I know you got async overloads for the indexes, but it may not be the case for everybody)...and you wouldn't need to create a brand new overload every single time LiteDatabase is changed.
The only con I can think of is the possibility of a external factor/leakage of the the reference in case the caller does not make a good use of it, but IMO this is all about good practices in the end.

I have written a fix for this
https://github.com/mlockett42/litedb-async/commit/2282753979b83304886d2806685a93f051caa99d
WIll merge in when I fix some other missing functionality this has revealed.

This fix is now in v0.0.5


Also return id on click for d3tree2 and d3tree3

The title says it all, this is useful when names are not unique.

This makes sense.  I need to circle back because I'd like to provide all non-circular data in d.  Thanks!

Just on the off chance that someone wants to see how to use this is an super-easy Shiny app.
library(treemap)
library(d3treeR)
library(shiny)
data(GNI2014)

tm <- treemap(
        GNI2014
        ,index=c("continent", "iso3")
        ,vSize="population"
        ,vColor="GNI"
        ,type="value"
      )

ui <- d3tree2Output('treetest')

server <- function(input,output,session){
  output$treetest <- renderD3tree2({
    # example 1 from ?treemap
    d3tree2( tm, rootname = "World" )
  })

  observeEvent(
    input$treetest_click,
    {str(input$treetest_click)}
  )
}

runApp(list(ui=ui,server=server))


Licensing clarification

The licensing link https://docs.microsoft.com/en-us/azure/active-directory/authentication/concept-password-ban-bad#license-requirements, saying that license is required for "Users synchronized from on-premises Windows Server Active Directory" for Azure AD Premium P1 or P2.

@jay98014 stated that you need to have at least some users that are being synced under Azure AD Premium P1 or P2

We have on-prem AD that syncs to Azure AD P1 edition, just wanted to confirm again, do I need all synced users or some synced users under Azure AD P1 License in order to use Password Protection feature?
Thanks in advance!

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: bd810b22-4e2a-5a66-db90-dd39b1b5c565
Version Independent ID: 8e36df09-f7f1-dcbd-dc3d-93cbeed1b040
Content: On-premises Azure AD Password Protection FAQ - Azure Active Directory
Content Source: articles/active-directory/authentication/howto-password-ban-bad-on-premises-faq.md
Service: active-directory
Sub-service: authentication
GitHub Login: @MicrosoftGuyJFlo
Microsoft Alias: joflore

@bt102 Thanks for the comment! We will investigate on this issue and get back to you soon.

@bt102The feature will  be enabled when you have premium P1 or P2 licences linked to your tenant and in order to compliant with Microsoft policies, you need all the users who are leveraging the premium features to be licensed accordingly.
So it is recommended to have licenses for all the users who are being synchronized.

@bt102 Thanks for reaching out.  You will require all synced users to be licensed to avail the benefits of the feature.
Let me know if you have any additional questions.

Thank you all for the quick response. Do non-human accounts (service accounts) consider as user in this case? Do you have any documentation that defines what "User" is when it comes to licensing?

@bt102 Could you please provide us more information on the situations where you believe a service account would need to synchronize to AAD ?

@bt102 Ideally you do not have to synchronize service accounts and can be excluded from the synchronization scope.
As a thumb rule, you can consider that  accounts which are used in interactive Azure AD authentication should be licensed.

@bt102 We will now proceed to close this thread. If you have further questions, please tag me in the comments and I will gladly continue the conversation.


Differential evolution breaks with LinearConstraints with sparse matrixes

Differential evolution breaks if a LinearConstraint built with a sparse matrix is given as argument.
LinearConstraint's A parameter can be a sparse matrix:
class LinearConstraint(object):

    Parameters
    ----------
    A : {array_like, sparse matrix}, shape (m, n)
        Matrix defining the constraint.

Yet when differential evolution does:
elif isinstance(constraint, LinearConstraint):
    def fun(x):
        A = np.atleast_2d(constraint.A)
        return A.dot(x)

If constraint.A is a sparse matrix, A will be a 2d array of (1, 1) with the sparse matrix in A[0][0], breaking the A.dot(x) due to shape mismatch. Example:
> import numpy as np
> from scipy.sparse import dok_matrix
> A = dok_matrix((2, 3))
> A[0, 0] = A[0, 1] = A[1, 1] = A[1, 2] = 1
> print(np.atleast_2d(A))
[[<2x3 sparse matrix of type '<class 'numpy.float64'>'
 with 4 stored elements in Dictionary Of Keys format>]]

If constraint.A is a Sparse matrix, it is guaranteed to have ndims == 2 and should not be np.atleast_2ded.
Minimum working example of the problem:
import numpy as np

from scipy.optimize import differential_evolution, LinearConstraint
from scipy.sparse import dok_matrix

A = dok_matrix((2, 3))
A[0, 0] = A[0, 1] = A[1, 1] = A[1, 2] = 1
constraint = LinearConstraint(
    A,  # Currently it would work if A were a numpy array: `A = A.toarray()`
    np.array([0, 0]),
    np.array([2, 3]),
    keep_feasible=True,
)
solution = differential_evolution(
    lambda x: 0.5 * x[0] + 1 * x[1] - 1 * x[2],
    bounds=[(0, 4), (0, 4), (0, 4)],
    constraints=constraint,
    seed=14,
)

closed by #11587


If OTEL exporter is not available, server panics

$ cat ~/.openfga/config.yaml

trace:
  enabled: true
  sampleRatio: 1
  otlpEndpoint: <IP_ADDRESS>:4317%

[7/12/23 10:08:14] ~/GitHub/openfga $ make run
go build -o ./openfga ./cmd/openfga
./openfga run
2023-12-07T10:08:24.108-0800    INFO    🕵 tracing enabled: sampling ratio is 1 and se
nding traces to '<IP_ADDRESS>:4317', tls: false
panic: failed to establish a connection with the otlp exporter: context deadline excee
ded

goroutine 1 [running]:
github.com/openfga/openfga/pkg/telemetry.MustNewTracerProvider({0xc00054e150, 0x4, 0xc
0005cd700?})
        /Users/mparnisari/GitHub/openfga/pkg/telemetry/tracing.go:87 +0x739
github.com/openfga/openfga/cmd/run.(*ServerContext).Run(0xc00048f250, {0x20beec0, 0x2a
c44c0}, 0xc000042d80)
        /Users/mparnisari/GitHub/openfga/cmd/run/run.go:318 +0x54c
github.com/openfga/openfga/cmd/run.run(0xc000233f00?, {0x2ac44c0?, 0x4?, 0x1ede09f?})
        /Users/mparnisari/GitHub/openfga/cmd/run/run.go:276 +0xce
github.com/spf13/cobra.(*Command).execute(0xc0002c2600, {0x2ac44c0, 0x0, 0x0})
        /Users/mparnisari/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:987 +0xa
a3
github.com/spf13/cobra.(*Command).ExecuteC(0xc0002c2300)
        /Users/mparnisari/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1115 +0x
3ff
github.com/spf13/cobra.(*Command).Execute(0xc0002c2300?)
        /Users/mparnisari/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1039 +0x
13
main.main()
        /Users/mparnisari/GitHub/openfga/cmd/openfga/main.go:28 +0x12f
make: *** [run] Error 2

We should consider removing this line: https://github.com/openfga/openfga/blob/993c66ae5a81d66e51886e0d103c9cb1fc05d090/pkg/telemetry/tracing.go#L77
Also, slightly related: we should a test that ensures that if you try to start the server on X port but that port is already taken, you get an appropriate error message.

What's wrong with the server panic'ing in this case? That was intentional, not a bug. It's not an uncommon pattern to panic if server pre-requisite dependencies are not met.