generic binarySearch (and others) should be available in std.algorithm

schveiguy (@schveiguy) reported this on 2020-05-05T19:13:35Z
Transfered from https://issues.dlang.org/show_bug.cgi?id=20798
CC List

petar.p.kirov

Description
Let's say I have a large struct, S, and I sort an array of them according to one field:

auto sorted = someArr.sort!((a, b) => a.field < b.field);

Now, I have this SortedRange, but I can only use binary searches and the like if I manufacture an entire S element. But I should be able to search using something like:

sorted.binarySearch!((a, b) => a.field < b)(fieldVal);

This is not available. In fact, the only place where binary search is implemented in Phobos is in std.range, inside the SortedRange package.

I think binarySearch, and the other search mechanisms there, should be available as standalone functions. They can't be proven to be correct at compile time, but that's not important. I don't care if the answer might be WRONG because the sort assumption is incorrect, I just shouldn't have to reimplement binary search on my own, phobos should have this building block available.

petar.p.kirov commented on 2020-05-05T23:17:33Z
The following works:

struct S
{
    string s;
    int field;
}

void main()
{
    import std;

    auto someArr = 100.iota
        .map!(i => S("asd", i))
        .array
        .randomShuffle;

    someArr.sort!((a, b) => a.field < b.field);

    someArr
        .map!(x => x.field)
        .assumeSorted!((a, b) => a < b)
        .equalRange(42)
        .writeln;
}

So where does this approach fall short? Performance, convenience, and accessibility?

schveiguy (@schveiguy) commented on 2020-05-06T12:25:47Z
(In reply to ZombineDev from comment #1)
> So where does this approach fall short? Performance, convenience, and
> accessibility?

So for example, if I wanted the S values that had the field value 42, this does not work. Instead I have to construct an S:

    someArr
        .equalRange(S("asd", 42))
        .writeln;

Which isn't always easy or practical (S might be a large complicated struct, with only constructors that require valid data for fields that I don't care about).

In my code, I'm now doing:

auto idx = someArr.binarySearch!((S, v) => S.field < v)(val);
if(idx != someArr.length && someArr[idx].field == val) { /* use someArr[idx] */ }

This can be easily captured into a function (I know my values are unique so I don't need to bother with an "equal range").

My contention is that I shouldn't have to write my own binarySearch function to get this kind of functionality.

I suppose I could also do:

    someArr
        .map!(x => x.field)
        .enumerate
        .assumeSorted!((a, b) => a[1] < b[1])
        .equalRange(tuple(0, 42))
        .map!(a => someArr[a[0]])
        .writeln;

But again, we are talking about a LOT of work, not only in range-transform acrobatics, but in the compiler actually calling lots of intermediary functions, just to do a simple search an already-sorted data.

A binary search is a simple base component that should be available for constructing more complicated items. We shouldn't hide it inside SortedRange with a very constrained set of interfaces.


Kotlin Spark API 1.2.0

Already creating this, I'll signal you when it can be merged :) (As soon as we release 1.2.0 basically)

@ileasile Can this be merged and updated? We're deploying 1.2.0 as we speak :)


NavbarHoverChange

Just made a small navbar change and removed the shadow that was not going with the animation issue #97

Hii @jeet1703 please resolve merge conflicts.


Allow nested folders in src/client/js

Our js folder is getting ugly. Organization by folder would go a long way.

I now realize this was never even an issue. Browserify handles all source mapping automatically.


Replace "help" with "vimdoc" in treesitter default parser list

I'm getting this error when starting Neovim with a fresh setup:
Installation not possible: ...vim/lazy/nvim-treesitter/lua/nvim-treesitter/install.lua:86: Parser not available for lan
guage "help"

This looks to be related to a new breaking nvim-treesitter change described here.
Thanks for making it super easy to get up-and-running!

Duplicates #248 😜


Fixed associativity tests in FStar.Real

These two tests were testing nothing until now. Fixed now.

Thanks @hacklex!


[Bug]: .next directory returns a 404 error page

Summary
When I set my publish dir on netlify to .next, because I'm using next build as my command, so I can get the API routes feature. I get a 404 page not found error. Could this be an issue exclusive to netlify alone?
I remember this being possible in the older versions of Next.js, API routes support was out-of-the-box.
I read up on an answer you suggested in a GitHub discussion stating how next build solves the problem. Well,  I think it does to some extent at least. But, the issue here is that platforms like Netlify needs a/an index.html file to serve when I set my publish dir to .next instead of out when I'm using next build right?
And the content in the .next folder includes a subdir like server, static and others I can't remember anymore.
Is there a way I can tap into the superpower of Next.js API routes when I'm using next build. "Yes, definitely" is the reply I'd get, perhaps, and still be able to allow Netlify bots to find an index.html file that can be served? because last time I checked, I didn't find any.
My site (http://meje.dev) taps into the SSR feature that Next provides, and currently, I'm adding a little bit of backend stuff to it -- a few server-side calls here and there.
I definitely need the API route. How do I get this to work when I'm using next build on @netlify
. Or is this only possible on
@vercel
?
PS: this was extracted from a thread I made as a reply to Lee Robinson's reply to my tweet.
Steps to reproduce
my repo
A link to a reproduction repository
https://github.com/kaf-lamed-beyt/seven
Next Runtime version
v4.29.3
More information about your build

[ ] I am building using the CLI
[ ] I am building using file-based configuration (netlify.toml)

What OS are you using?
Linux
Your netlify.toml file

`netlify.toml`
# Paste content of your `netlify.toml` file here

Your public/_redirects file

`_redirects`
# Paste content of your `_redirects` file here

Your next.config.js file

`next.config.js`
# Paste content of your `next.config.js` file here. Check there is no private info in there.

Builds logs (or link to your logs)

Build logs
# Paste logs here

Function logs

Function logs
# Paste logs here

.next JSON files

generated .next JSON files
# Paste file contents here. Please check there isn't any private info in them
# You can either build locally, or download the deploy from Netlify by clicking the arrow next to the deploy time.

Oh Dang!
Forgot it is private. I'll share the link to the build logs now.

Here you go

It's showing that the Next Runtime has been disabled. Have you set NETLIFY_NEXT_PLUGIN_SKIP to true?

I don't think I have.
Do you mind telling me where I can find it?

Found it.
Realized that it is an environment variable, and I've changed the value to false

"Site is Live ✨"
Thank you for your help @ascorbic!

Great! The runtime needs to be disabled when you're using next export, but is needed for all other cases.

Looks like this is resolved @kaf-lamed-beyt, so I'm going to go ahead and close this.

Yes, it is.
Thanks


Fix ViewPropTypes usage for deprecated prop types

Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch<EMAIL_ADDRESS>for the project I'm working on.

Here is the diff that solved my problem:
diff --git a/node_modules/react-native-snap-carousel/src/carousel/Carousel.js b/node_modules/react-native-snap-carousel/src/carousel/Carousel.js
index dae71a3..2fd7107 100644
--- a/node_modules/react-native-snap-carousel/src/carousel/Carousel.js
+++ b/node_modules/react-native-snap-carousel/src/carousel/Carousel.js
@@ -1,5 +1,6 @@
 import React, { Component } from 'react';
-import { Animated, Easing, FlatList, I18nManager, Platform, ScrollView, View, ViewPropTypes } from 'react-native';
+import { Animated, Easing, FlatList, I18nManager, Platform, ScrollView, View } from 'react-native';
+import { ViewPropTypes } from 'deprecated-react-native-prop-types';
 import PropTypes from 'prop-types';
 import shallowCompare from 'react-addons-shallow-compare';
 import {
diff --git a/node_modules/react-native-snap-carousel/src/pagination/Pagination.js b/node_modules/react-native-snap-carousel/src/pagination/Pagination.js
index 5c021cf..7fbe20c 100644
--- a/node_modules/react-native-snap-carousel/src/pagination/Pagination.js
+++ b/node_modules/react-native-snap-carousel/src/pagination/Pagination.js
@@ -1,5 +1,6 @@
 import React, { PureComponent } from 'react';
-import { I18nManager, Platform, View, ViewPropTypes } from 'react-native';
+import { I18nManager, Platform, View} from 'react-native';
+import {ViewPropTypes} from 'deprecated-react-native-prop-types';
 import PropTypes from 'prop-types';
 import PaginationDot from './PaginationDot';
 import styles from './Pagination.style';
diff --git a/node_modules/react-native-snap-carousel/src/pagination/PaginationDot.js b/node_modules/react-native-snap-carousel/src/pagination/PaginationDot.js
index e59d196..41bd4f9 100644
--- a/node_modules/react-native-snap-carousel/src/pagination/PaginationDot.js
+++ b/node_modules/react-native-snap-carousel/src/pagination/PaginationDot.js
@@ -1,5 +1,6 @@
 import React, { PureComponent } from 'react';
-import { View, Animated, Easing, TouchableOpacity, ViewPropTypes } from 'react-native';
+import { View, Animated, Easing, TouchableOpacity } from 'react-native';
+import {ViewPropTypes} from 'deprecated-react-native-prop-types';
 import PropTypes from 'prop-types';
 import styles from './Pagination.style';

diff --git a/node_modules/react-native-snap-carousel/src/parallaximage/ParallaxImage.js b/node_modules/react-native-snap-carousel/src/parallaximage/ParallaxImage.js
index 8bc774a..da72b06 100644
--- a/node_modules/react-native-snap-carousel/src/parallaximage/ParallaxImage.js
+++ b/node_modules/react-native-snap-carousel/src/parallaximage/ParallaxImage.js
@@ -1,7 +1,8 @@
 // Parallax effect inspired by https://github.com/oblador/react-native-parallax/

 import React, { Component } from 'react';
-import { View, ViewPropTypes, Image, Animated, Easing, ActivityIndicator, findNodeHandle } from 'react-native';
+import { View, Image, Animated, Easing, ActivityIndicator, findNodeHandle } from 'react-native';
+import {ViewPropTypes} from 'deprecated-react-native-prop-types';
 import PropTypes from 'prop-types';
 import styles from './ParallaxImage.style';

This issue body was partially generated by patch-package.

hello! does this fix the error?
ViewPropTypes will be removed from React Native, along with all other PropTypes. We recommend that you migrate away from PropTypes and switch to a type system like TypeScript. If you need to continue using ViewPropTypes, migrate to the 'deprecated-react-native-prop-types' package.

I wish this was addressed in the react-native-snap-carousel package itself. Are there any plans to get to this soon?


Add a --redirects flag to paket remove (5.173.1)

Description
Using Paket version 5.173.1
When I use paket remove to remove a dependency from a specific project (using the --project flag), every app.config in my repo gets updated. I notice that it's removing binding redirect information that was added when I did paket install --redirects.
paket add has a --redirects flag, but it looks like paket remove does not. Could it be added, to avoid this problem?

I think you should persist redirects options in the deps file
rabrahamOpti<EMAIL_ADDRESS>schrieb am Fr., 22. Juni 2018,
18:30:

Description
Using Paket version 5.173.1
When I use paket remove to remove a dependency from a specific project
(using the --project flag), every app.config in my repo gets updated. I
notice that it's removing binding redirect information that was added when
I did paket install --redirects.
paket add has a --redirects flag, but it looks like paket remove does not.
Could it be added, to avoid this problem?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/fsprojects/Paket/issues/3266, or mute the thread
https://github.com/notifications/unsubscribe-auth/AADgNPnETNmMz5mRTglqUDNcQ9rtzsSQks5t_RvAgaJpZM4U0FyA
.

Looking at the documentation. Do you mean redirects:on?
Does that eliminate the need to use the --redirects flag on install and add?

yes. But better use redirects:force
You can use it as group setting or on individual packages.
Am 22.06.2018 19:39 schrieb "rabrahamOpti"<EMAIL_ADDRESS>Looking at the documentation
https://fsprojects.github.io/Paket/dependencies-file.html. Do you mean
redirects:on?
Does that eliminate the need to use the --redirects flag on install and add?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/fsprojects/Paket/issues/3266#issuecomment-399521847,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADgNLua2jzASy0XbY9-eUvspbEBDyvOks5t_SvYgaJpZM4U0FyA
.

What's the difference between redirects: on, redirects: force, and
using the --redirects flag on paket install and paket add?
On Fri, Jun 22, 2018 at 1:44 PM, Steffen Forkmann<EMAIL_ADDRESS>wrote:

yes. But better use redirects:force
You can use it as group setting or on individual packages.
Am 22.06.2018 19:39 schrieb "rabrahamOpti"<EMAIL_ADDRESS>Looking at the documentation
https://fsprojects.github.io/Paket/dependencies-file.html. Do you mean
redirects:on?
Does that eliminate the need to use the --redirects flag on install and
add?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/fsprojects/Paket/issues/3266#issuecomment-399521847,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADgNLua2jzASy0XbY9-
eUvspbEBDyvOks5t_SvYgaJpZM4U0FyA>
.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/fsprojects/Paket/issues/3266#issuecomment-399523024,
or mute the thread
https://github.com/notifications/unsubscribe-auth/Aa_5x8STNR3R0mc8FFTi3o_MVa5vN5THks5t_SzpgaJpZM4U0FyA
.

--
Bobby Abraham
Software Engineer
active intelligence | clean water
c.<PHONE_NUMBER>
optirtc.com | @optirtc https://twitter.com/optirtc |

very small difference. But usually you want force
Am 22.06.2018 19:49 schrieb "rabrahamOpti"<EMAIL_ADDRESS>What's the difference between redirects: on, redirects: force, and
using the --redirects flag on paket install and paket add?
On Fri, Jun 22, 2018 at 1:44 PM, Steffen Forkmann<EMAIL_ADDRESS>wrote:

yes. But better use redirects:force
You can use it as group setting or on individual packages.
Am 22.06.2018 19:39 schrieb "rabrahamOpti"<EMAIL_ADDRESS>Looking at the documentation
https://fsprojects.github.io/Paket/dependencies-file.html. Do you mean

redirects:on?
Does that eliminate the need to use the --redirects flag on install and
add?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/fsprojects/Paket/issues/3266#issuecomment-399521847,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADgNLua2jzASy0XbY9-
eUvspbEBDyvOks5t_SvYgaJpZM4U0FyA>
.
—
You are receiving this because you authored the thread.

Reply to this email directly, view it on GitHub
https://github.com/fsprojects/Paket/issues/3266#issuecomment-399523024,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/Aa_5x8STNR3R0mc8FFTi3o_MVa5vN5THks5t_SzpgaJpZM4U0FyA
.

--
Bobby Abraham
Software Engineer
active intelligence | clean water
c.<PHONE_NUMBER>
optirtc.com | @optirtc https://twitter.com/optirtc |
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/fsprojects/Paket/issues/3266#issuecomment-399524496,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADgNFTLx90loeoZ3S5U-IuZw1ReoMI6ks5t_S42gaJpZM4U0FyA
.

Would you mind explaining what the difference is? I'm afraid I'm not too
familiar with F#, so it's hard to read the source. When would users want to
use redirects:force vs redirects:on, and which of those two options
does the --redirects flag correspond to?
On Fri, Jun 22, 2018 at 1:57 PM, Steffen Forkmann<EMAIL_ADDRESS>wrote:

very small difference. But usually you want force

"on" is trying to determine if the flag is needed or not by checking if you
have multiple dlls of the same thing. Force is always adding the redirects.
rabrahamOpti<EMAIL_ADDRESS>schrieb am Mo., 25. Juni 2018,
22:20:

Would you mind explaining what the difference is? I'm afraid I'm not too
familiar with F#, so it's hard to read the source. When would users want to
use redirects:force vs redirects:on, and which of those two options
does the --redirects flag correspond to?
On Fri, Jun 22, 2018 at 1:57 PM, Steffen Forkmann <
<EMAIL_ADDRESS>wrote:

very small difference. But usually you want force

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/fsprojects/Paket/issues/3266#issuecomment-400082472,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADgNG5lex1SItfjr5MEjdkNbRTBXxBtks5uAUYogaJpZM4U0FyA
.

Thank you! And I assume using the --redirects flag on the install or add command is equivalent to adding the redirects:force option in paket.dependencies, is that correct?

Yes it's doing force IIRC
rabrahamOpti<EMAIL_ADDRESS>schrieb am Di., 26. Juni 2018,
15:13:

Thank you! And I assume using the --redirects flag on the install or add
command is equivalent to adding the redirects:force option in
paket.dependencies, is that correct?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/fsprojects/Paket/issues/3266#issuecomment-400302658,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADgNE0HxrJCoEa20OpJ00FBqH77nwDgks5uAjNcgaJpZM4U0FyA
.


Cannot remove textfield border or implement theme class styling

Which platform(s) does your issue occur on?

iOS emulator

tns version: 4.1.2
Cross-platform modules: "version": "4.1.1"
"tns-ios": "version": "4.1.1"
Please, tell us how to recreate the issue in as much detail as possible.
I am created a few form pages.  I tried using the theme classes to have a border bottom only, but all I am getting is a border-box around all text-fields.

Desired output:

Code:
<GridLayout rows="60, 45, 50, 50, 50, 50, 50, 50" class="container">

  <StackLayout class="input-field" row="2">
    <TextField
      class="input"
      [(ngModel)]="userSignup.fullName"
      hint="Full Name"
      autocorrect="false"
      autocapitalizationType="none"
      required></TextField>
    <StackLayout class="hr-light"></StackLayout>
  </StackLayout>

  <StackLayout class="input-field" row="3">
    <TextField
      class="input"
      [(ngModel)]="userSignup.email"
      hint="Email Address"
      keyboardType="email"
      autocorrect="false"
      autocapitalizationType="none"
      required></TextField>
    <StackLayout class="hr-light"></StackLayout>
  </StackLayout>
...

Tried removing the border with css:
.input-field {
	margin: 0;
	padding: 0;
	border: none;
}
TextField {
	border: none;
	border-box: none;
	border-width: 0;
}

Just looking how to remove the border around the entire text-area and show only the border-bottom;

HI @SGissubel,
I noticed that you have missed adding form CSS class to the main GridLayout container. This class is needed for properly applying the TextField styling. You can check the docs here. For your convenience, I am attaching a sample project.
Archive.zip

Thank you @tsonevn, I actually did try this, just did not include it above.  Just tried it again now and it again did not work.

HI @SGissubel,
Can you review the attached sample project in my previous comment and make the needed changes, which will allow me to recreate the issue?
Meanwhile, I would suggest making sure that all the latest changes are applied to the app. Regarding that, can you remove the platforms folder and rebuild the project again?

I removed the platforms folder. And rebuilt the project. Still no changes.
As for the sample project - considering how simple it is, I couldn't imagine what I am missing that the sample has or implements.  All things referenced inside of the sample I displayed above.
Still no changes.
Additionally - I cannot now ADD a border to buttons...:

No border appears.

Possible this is affecting it... ?
CONSOLE ERROR file:///app/tns_modules/tns-core-modules/trace/trace.js:165:30: Error: Css styling failed: Error: undefined:1:5: missing '{'

I have been looking into it. No solutions have worked so far.
https://github.com/NativeScript/nativescript-dev-sass/issues/53

Also, I know this was closed... but no solution was ever arrived at.

Hi @SGissubel,
Excuse me for the delay in reply.
I am still unable to recreate the problem on my side, which makes the investigating hard. Can you send me your project in a private message in Slack? My nickname is nikts.


Add ~/.emacs.d/early-init.el to HM module

This fixes the display of the unthemed Emacs window during startup, and also should slightly improve startup performance.
Fix issue https://github.com/nix-community/nix-doom-emacs/issues/186.
Also removes an unnecessary version check in default.el (since doom-emacs is only compatible with version 27.1+).

Seems to work fine on my end but I haven't done extensive testing, will let @ckiee review.

I don't like how this only works for the home-manager module. Can we perhaps set startup-init-directory?
/nix/store/c03crmxhy86jiag0dcy3rp8vf273s733-source/lisp/startup.el
  ;; Load the early init file, if found.
  (startup--load-user-init-file
   (lambda ()
     (expand-file-name
      ;; We use an explicit .el extension here to force
      ;; startup--load-user-init-file to set user-init-file to "early-init.el",
      ;; with the .el extension, if the file doesn't exist, not just
      ;; "early-init" without an extension, as it does for ".emacs".
      "early-init.el"
      startup-init-directory)))
  (setq early-init-file user-init-file)

I don't like how this only works for the home-manager module. Can we perhaps set startup-init-directory?
/nix/store/c03crmxhy86jiag0dcy3rp8vf273s733-source/lisp/startup.el
  ;; Load the early init file, if found.
  (startup--load-user-init-file
   (lambda ()
     (expand-file-name
      ;; We use an explicit .el extension here to force
      ;; startup--load-user-init-file to set user-init-file to "early-init.el",
      ;; with the .el extension, if the file doesn't exist, not just
      ;; "early-init" without an extension, as it does for ".emacs".
      "early-init.el"
      startup-init-directory)))
  (setq early-init-file user-init-file)

Well, I looked at the documentation and the location on HOME was the only documented way to load this file: https://www.gnu.org/software/emacs/manual/html_node/emacs/Early-Init-File.html.
I think we could do something different but it would risk breaking in future updates. Also, not sure how I can set this variable because early-init.el happens really early on Emacs initialization.

Maybe we can use site-start.el instead: https://www.gnu.org/software/emacs/manual/html_node/emacs/Init-File.html

Maybe we can use site-start.el instead: https://www.gnu.org/software/emacs/manual/html_node/emacs/Init-File.html
If it works it would be good since we can remove the load of early-init.el in default.el.

This also doesn't really work. Emacs from nixpkgs uses its own site-start.el file, so to make it to work we would need to pass this siteStart parameter with our own site-start.el file that includes both the nixpkgs' start-site.el and doom-emacs's early-start.el contents. However this triggers a rebuild in Emacs, and I am not sure how good this approach would be anyway.

Maybe we can use site-start.el instead: https://www.gnu.org/software/emacs/manual/html_node/emacs/Init-File.html
If it works it would be good since we can remove the load of early-init.el in default.el.

This also doesn't really work. Emacs from nixpkgs uses its own site-start.el file, so to make it to work we would need to pass this siteStart parameter with our own site-start.el file that includes both the nixpkgs' start-site.el and doom-emacs's early-start.el contents. However this triggers a rebuild in Emacs, and I am not sure how good this approach would be anyway.

Just to see if it would work, I created a site-start.el combining both the contents of start-site.el from nixpkgs and early-start.el from doom-emacs and it kinda works. However again, not sure if this is the best way to go considering that this would retrigger a full Emacs rebuild.
The main issue that I see for the above approach would be how we could keep sync with the nixpkgs's site-start.el since this is passed as a parameter to the derivation. Using flake we probably can do something like lib.readFile "${nixpkgs}/pkgs/applications/editors/emacs/site-start.el" + "\n" + "${doom-emacs}/early-start.el", however for the non-flake build I am not sure if this is going to work.
So WDYT @ckiee ?
BTW, I also tried to do something similar as we do for default.el file, however Emacs will ignore my site-start.el file.

[..] considering that this would retrigger a full Emacs rebuild

If we're triggering a Emacs rebuild for this we could instead patch the Emacs source to be able to override the early-init path with an env-var. Maybe that could get accepted upstream, or at least into nixpkgs.

So here is a patch that adds --init-directory support for loading both core/core-start.el and early-init.el. For now this patch doesn't check Emacs version so it probably will break anyone using Emacs stable.
This approach has a few interesting advantages, for example, we don't need the ~/.emacs.d/init.el file set in HM module anymore since the flags will ensure that we will always use the emacs.d from /nix/store. Also it doesn't seem to break --init-directory usage in my testing, since passing it via command-line will overwrite the previous usage.
So WDYT @ckiee? Would this be a valid approach?
diff --git a/default.nix b/default.nix
index d756ecd..d677762 100644
--- a/default.nix
+++ b/default.nix
@@ -1,5 +1,5 @@
 { # The files would be going to ~/.config/doom (~/.doom.d)
-doomPrivateDir
+  doomPrivateDir
 /* Extra packages to install

    Useful for non-emacs packages containing emacs bindings (e.g.
@@ -8,8 +8,7 @@ doomPrivateDir
    Example:
      extraPackages = epkgs: [ pkgs.mu ];
 */
-, extraPackages ? epkgs:
-  [ ]
+, extraPackages ? epkgs: [ ]
   /* Extra configuration to source during initialization

      Use this to refer other nix derivations.
@@ -36,8 +35,7 @@ doomPrivateDir
        });
      };
 */
-, emacsPackagesOverlay ? self: super:
-  { }
+, emacsPackagesOverlay ? self: super: { }
   /* Use bundled revision of github.com/nix-community/emacs-overlay
      as `emacsPackages`.
   */
@@ -54,7 +52,8 @@ doomPrivateDir
          "emacs-overlay" = fetchFromGitHub { owner = /* ...*\/; };
        };
   */
-, dependencyOverrides ? { }, lib, pkgs, stdenv, buildEnv, makeWrapper
+, dependencyOverrides ? { }
+, lib, pkgs, stdenv, buildEnv, makeWrapper
 , runCommand, fetchFromGitHub, substituteAll, writeShellScript
 , writeShellScriptBin, writeTextDir }:

@@ -63,6 +62,7 @@ assert (lib.assertMsg ((builtins.isPath doomPrivateDir)
   "doomPrivateDir must be either a path, a derivation or a stringified store path");

 let
+  isEmacs29 = lib.versionAt emacsPackages.emacs.version "29";
   flake = import ./flake-compat-helper.nix { src = ./.; };
   lock = p:
     if dependencyOverrides ? ${p} then
@@ -202,15 +202,20 @@ let

   # Stage 5: catch-all wrapper capable to run doom-emacs even
   # without installing ~/.emacs.d
-  emacs = let
-    load-config-from-site = writeTextDir "share/emacs/site-lisp/default.el" ''
-      (message "doom-emacs is not placed in `doom-private-dir',
-      loading from `site-lisp'")
-      (when (> emacs-major-version 26)
-            (load "${doom-emacs}/early-init.el"))
+  emacs = (emacsPackages.emacsWithPackages (epkgs: []));
+
+  load-init-from-site = pkgs.writeTextDir "emacs.d/init.el" ''
       (load "${doom-emacs}/core/core-start.el")
-    '';
-  in (emacsPackages.emacsWithPackages (epkgs: [ load-config-from-site ]));
+  '';
+
+  load-early-init-from-site = pkgs.writeTextDir "emacs.d/early-init.el" ''
+      (load "${doom-emacs}/early-init.el")
+  '';
+
+  emacs-d = pkgs.symlinkJoin {
+    name = "emacs.d";
+    paths = [ load-early-init-from-site load-init-from-site ];
+  };

   build-summary = writeShellScript "build-summary" ''
     printf "\n${fmt.green}Successfully built nix-doom-emacs!${fmt.reset}\n"
@@ -222,11 +227,17 @@ in emacs.overrideAttrs (esuper:
   let
     cmd = ''
       wrapEmacs() {
-          wrapProgram $1 \
-                    --set DOOMDIR ${doomDir} \
-                    --set NIX_DOOM_EMACS_BINARY $1 \
-                    --set __DEBUG_doom_emacs_DIR ${doom-emacs} \
-                    --set __DEBUG_doomLocal_DIR ${doomLocal}
+          local -a wrapArgs=(
+              --set DOOMDIR ${doomDir}
+              --set NIX_DOOM_EMACS_BINARY $1
+              --set __DEBUG_doom_emacs_DIR ${doom-emacs}
+              --set __DEBUG_doomLocal_DIR ${doomLocal}
+          )
+          if [[ $(basename $1) == emacs ]] || [[ $(basename $1) == emacs-* ]]; then
+            wrapArgs+=(--add-flags '--init-directory ${emacs-d}/emacs.d')
+          fi
+
+          wrapProgram $1 "''${wrapArgs[@]}"
       }

       for prog in $out/bin/*; do
diff --git a/modules/home-manager.nix b/modules/home-manager.nix
index 18807de..b79c96a 100644
--- a/modules/home-manager.nix
+++ b/modules/home-manager.nix
@@ -91,9 +91,6 @@ in
     in
     mkMerge ([
       {
-        home.file.".emacs.d/init.el".text = ''
-          (load "default.el")
-        '';
         home.packages = with pkgs; [
           emacs-all-the-icons-fonts
         ];

So here is a patch that adds --init-directory support for loading both core/core-start.el and early-init.el. For now this patch doesn't check Emacs version so it probably will break anyone using Emacs stable.

Created a PR with this approach: https://github.com/nix-community/nix-doom-emacs/pull/191

I haven't tested it but I like that approach a lot.
You seem to have not yet suffered from maintaining Emacs things. Want to be a committer here?

I haven't tested it but I like that approach a lot.
You seem to have not yet suffered from maintaining Emacs things. Want to be a committer here?

Sure, why not.
I can always have a little Emacs suffering between my nixpkgs/NixOS.


--sleep or --delay option to sleep before taking the screenshot

While working on #14 I found that all images hadn't yet loaded when a screenshot was taken, so I hacked around it like this:
shot-scraper 'https://www.owlsnearme.com/?place=127871' \
  --selector 'section.secondary' \
  --javascript 'new Promise(resolve => setTimeout(resolve, 2000))' \
  -o owls.jpg

I'll use terminology to best match Playwright.

https://playwright.dev/docs/cli#take-screenshot
# Wait 3 seconds before capturing a screenshot after page loads ('load' event fires)
npx playwright screenshot \
    --device="iPhone 11" \
    --color-scheme=dark \
    --wait-for-timeout=3000 \
    twitter.com twitter-iphone.png

--wait-for-timeout is a bit verbose for me, but --wait will work.


Quality of results

Hey, big thanks for all your work! I think a node like this could be super useful, especially when filtering a large quantity of generated images when building datasets for characters. Unfortunately the quality of results appears to be bad at the moment. As an experiment, I took 4 high quality images of Charlize Theron, cropped them into squares, and used your FaceAnalysis node to compute the similarity between the faces. I was hoping to see low EUC values - low as in way lower than 0.3 - when comparing images of the same persons' face. But the EUC values I see are like 0.4 and 0.5. I also noticed that comparing the exact same photo to itself yields EUC values like 0.04 or 0.06 depending on the image. I would have expected that to be at 0.00 or like 0.01 at most.
If you have ideas on how to improve, it would be really cool to get this working correctly.

theron_comparison.json

I tried resizing all images to 512x512. Now the same image compared to itself yields 0 EUC as it should. However, the comparisons between images are still giving values between 0.4 to 0.6 for the same person.

From a face recog point of view 0.6 or less EUCL or 0.07 COS means that they are the same person. So in your example all results passed despite being very different shots.

Here's a counterexample of 2 completely different persons getting 0.6 EUCL:

I tried a bunch of random image pairs that represented different people, and FWIW I was not able to find anything that returned below 0.6, but I did get find several pairs of slightly above 0.6. Most results were between 0.65 and 0.80.

you got 0.083 COS which it very high (btw EUC is above 0.6). There's a reason why I offer both EUC and COS, I may actually add other options.

@belladoreai Did you manage to get this to be more accurate?

@andupotorac Unfortunately no. And in general, I have not found any useful quantitative measure of "does the person in this photo look like the person in this other photo".

@andupotorac Unfortunately no. And in general, I have not found any useful quantitative measure of "does the person in this photo look like the person in this other photo".

Did you try this also? https://github.com/chflame163/ComfyUI_FaceSimilarity

I haven't tried that one. If you have, let me know how well it works.

I haven't tried that one. If you have, let me know how well it works.

Pending for me, as I have issues with the installation.


Split MigrationsModelDiffer.Sort into two methods

Per @AndriySvyryd's comment on #6522
MigrationsModelDiffer.Sort should be split into two methods so that it doesn't need to be completely reimplemented when adding an operation

@bricelam you can either just do this or we can talk more if you think it needs more thought

Given our design meeting discussion, I don't think this is high enough priority for the 1.1.0 release.


add update function for docker agent

add update function
TODO: add update.sh in upstream compose files

Signed-off-by: Dixing (Dex) Xu<EMAIL_ADDRESS>

@yeasy I did not find update.sh at upstream scripts, just wonder which image should I use? Thanks

@yeasy I did not find update.sh at upstream scripts, just wonder which image should I use? Thanks

The test results are ok:

The test results are ok:

@yeasy I did not find update.sh at upstream scripts, just wonder which image should I use? Thanks

You should create a new update.sh.
The image is built from the cello-hlf Dockerfile.

@yeasy ok, I've changed accordingly


Update ingress docs for authentication

In the authentication section of the ingress annotations there were two entries that did not reflect the annotation they document.
For auth-on-unauthenticated-request the example was showing values for auth-type, and for auth-scope options were missing and example was also for auth-type.

/assign @bigkraig

/ok-to-test

/approve
/lgtm


HorizontalAlignment and VerticalAlignment doesn't start with lower case

In namespace dymaptic.GeoBlazor.Core.Components.Symbols;
public enum HorizontalAlignment
{
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
left,
right,
center
#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member
}
public enum VerticalAlignment
{
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
baseline,
top,
middle,
bottom
#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member
}
Make at example Left to left, because otherwise it will not work
Further in function
internal override SymbolSerializationRecord ToSerializationRecord()
not exist XOffset and YOffset

@dirk193 thank you for this. I can see this is specifically impacting the Protobuf serialization of graphics, using SymbolSerializationRecord. The JSON serializations should all be working correctly due to the [JsonConverter(typeof(EnumToKebabCaseStringConverter<HorizontalAlignment>))] attribute, which automatically lower-cases all the enums.
I will work on a fix for this, however, it will be specific to the serialization, as we don't want to move away from the C# idiomatic style of upper-casing enum members.


Fixed Issue #837 (accessibility hierarchy problem) (super small PR)

Setting parent view as an accessible view prevents from finding siblings, so we need to turn it off if we want to use subviews.
This is crucial for the UI tests since I'm not able to check the message of this HUD if the defaultMaskType set not to none

Anyone?

I can not judge this PR as I am not firm with the accessibility API. Someone else or do you have documentation about the "right" way?

@honkmaster here is the documentation on this property - https://developer.apple.com/documentation/objectivec/nsobject/1615141-isaccessibilityelement
It says if view is a container for other elements which should be accessible, then this property should be false. This is what is needed here to access HUD element and check it's text in UI Tests.

I second the need to fix the accessibility hierarchy, it's painful to test normal errors such a email / password issues without the accessibility change


added implementations page

@fehguy , another one you can add:

Title
Project Link
Language
Description

KaiZen OpenAPI Parser
GitHub/RepreZen/KaiZen-OpenAPI-Parser
Java
High-performance Parser, Validator, and Java Object Model for OpenAPI 3.x

Some of the projects here can be added. Would you prefer as comments or PRs when this is merged?

I'll go ahead and merge, then you can send a PR.  Thanks @MikeRalphson


🚀 [Feature] Coverage Tests for Login & Community Server

:rocket: Feature

Have a coverage test for login_server & community_server like for the frontend. So we can make sure we don't drop in coverage.

[ ] Run tests on LS
[ ] Run tests on CS
[ ] Generate Coverage
[ ] Test LS for Coverage Goal in test workflow
[ ] Test CS for Coverage Goal in test workflow

It is not important how much coverage we have. It is important that we ensure we at least have x% coverage automatically

What means LS and CS?

Login Server and Community Server @einhornimmond


Alert.alert() not showing after calling Share.share()

Description
I am having issues showing alerts after sharing text. I am using Share.share() to share text and then creating alerts with Alert.alert(), called in a then() method after calling Share.share(). The alert shows after only the first time Share.share() is called (by pressing a button). Subsequent button presses trigger the sharing mechanism but no alerts are shown.
With the code I provided in the gist linked below, the same behaviour arises when using an equivalent await on Share.share() in an async function instead of using then() methods. All the console.debug() statements in the then methods print as would be expected - so the code in the then() methods is executed but, for some reason, the alerts in that code don't show after the first time the code is executed. When you remove the call to Share.share() and take the calls to Alert.alert() out of the then() methods after calling Share.share(), the alerts show each time - as would be expected. This is why I think this issue is due to some interaction between Share.share() and Alert.alert(). I observed this behaviour running the code locally on an Android device with Expo over Wifi.
React Native version:
I am using expo version 40.0.1, which includes react-native version 0.63.2, and react version 16.13.1.
Running "react-native info" gave the following output:
npmPackages:
@react-native-community/cli: Not Found
react: 16.13.1 => 16.13.1
react-native: https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz => 0.63.2
Steps To Reproduce

Download this gist containing the source code I was running to try and debug the issue: https://gist.github.com/taeh98/d26b3a33c22d44f0634295547c72fd7d
Integrate this file into an Expo TypeScript project (see https://docs.expo.io/guides/typescript/#starting-from-scratch-using-a-typescript-template) as App.tsx
Ensure package.json has the same versions of expo, react, and react-native as listed above
Run locally on an Android device with Expo ("expo start --android") and scan the QR code on the landing page from the Expo Go app on an Android device
Try pressing the button multiple times; the Alert(s, with a second alert triggered by the callback parameter also failing to display) should only show after the first time the button is pressed - not after subsequent presses

Desired Results
The alerts show after each time the button is pressed.
Actual Results
The alerts show after only the first time the button is pressed.
Snack, code example, screenshot, or link to a repository:
GitHub gist: https://gist.github.com/taeh98/d26b3a33c22d44f0634295547c72fd7d

Any updates on this? Facing the same issue.


Consolidate reports in multi project setup

This is intended to solve #1295.
Since all subprojects are processed individually it is really only possible to consolidate on a file level.
The solution does not really seem that great to be quite honest, but I don't really see more options and would like your feedback.
I intentionally do not parse the xml to reduce the the amount of coupling to CLI as well as hopefully increase processing speed.

Just realized that this will only work if the parent contains sources.  All sub projects of that sub module are merged?
Or will this feature only work if run from top level?
I also think that the file level is the only option here.

All sub projects of that sub module are merged?
Correct, that was the idea. Does that make any sense?

Hm kind of yes, I have a project where I have like 5 modules with no sources but with rather 2-8 more modules per module. That would make sense here.
So my parent with no sources, should also produce an uber report :)

Can you please rebase it and check the compilation errors reported by CI. Would be good to get this merged :)

Codecov Report

Merging #1329 into master will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master    #1329   +/-   ##
=========================================
  Coverage     74.81%   74.81%
  Complexity     1737     1737
=========================================
  Files           328      328
  Lines          5280     5280
  Branches        961      961
=========================================
  Hits           3950     3950
  Misses          805      805
  Partials        525      525

Continue to review full report at Codecov.

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

The build failure seems to be a problem with the line endings on Win. I assume the expectations do not have \r\n and therefore do not match.  Does anyone have an elegant solution? Unfortunately I do not have a Win machine available and can only guess.

Maybe something like trim or trimEnd can help in the tests? Thats what we often use in the Spec files...

I will just say: tab vs spaces :fire:
But seriously. Careful seems that you are using tabs for your code, when project uses spaces :)

Yes, sorry if you missed this. We reformat the code base with KtLint and use spaces now.
Strange that there were only two check runs and our formatting does not fail the build oO

All right. Since it has to be rebased anyway I will have a look. I actually did try to find the right idea settings. I guess https://github.com/arturbosch/detekt/blob/master/idea-code-style.xml is no longer valid? Should it be removed then?

Yes please remove it, thanks.

I think I fixed my local setup now. Thanks for the pointers.
With regards to this PR I am not so sure it should be merged as it will most likely collide with #1221 and I don't know if it really has that much benefit.

Hm, maybe we should promote/document more the use case to have a detektAll task should run over the whole code base like we self do in https://github.com/arturbosch/detekt/blob/master/build.gradle.kts#L289 ?

I agree. It is obviously possible to achieve the same results without introducing even more complexity into the gradle plugin.

@arturbosch I'm not sure why running it in the whole project is better. Imagine a really big project with lots of modules. When nothing has changed, the Gradle plug-in has caching support where the tool will not even run on unchanged modules. It only runs on changed which is great.
Running it on all sources all the time is not scalable.

@tasomaniac I agree however merging xml files on strange conditions (what about nested modules etc) feels overly complex and hacky. If there is more demand we should try to solve this with the capabilities of gradle?
Maybe even a collectReportTasks? We know the filenames in the build directory and could merge all.
But now again, for all created reports? Only from the last run?

Filenames in build directories wouldn't work because there might be stale ones from old builds if the user didn't clean.
Closing this PR is ok. It's a tricky problem. Not easy to solve. Definitely post 1.0 problem imo.
This can be solved with really good Gradle setup. Android Lint does this with checkDependencies flag.

I would also prefer a gradle solution here, as it is gradle which cuts our report into pieces :)


How to use langchain.debug=True in langflow

Hey.
We might be able to set that up in the CLI together with the log-level parameter.
The better approach would be to improve the callbacks in Langflow which is something we are working on.


don't prettify HTML

This is needed because the BeautifulSoup prettify function changes rendered content (maybe bug in BeautifulSoup?).
Specifically we saw a link directly followed by punctuation would render as a space between the end of the link and the punctuation. For example foo! when prettified would be \nfoo\n\n! which would render with a space before the punctuation since it's on its own line.

27f8e58605136c9439d6e39a2641dad8845c820b fixes an issue where some characters were being misrepresented e.g. an "em dash" turning into â€”. This was because the bytestring output of body_tag.renderContents() was being re-parsed by BeautifulSoup before assignment to the HTML.body field.


webaberse.com/{.eth,0x} mode

It would help to have a mode where hitting the webaverse URL for a .eth or 0x opens up a generated scene with that avatar and all of its nfts, to the best of our ability.
This could be entirely done in Totum without much trouble. The generated scene can even have some nice HTML/text labeling all of the NFTs in the scene.

This would be a quite quick way to onboard any wallet or show things off with Webaverse tech.

Useful links:
https://github.com/webaverse/totum
https://github.com/webaverse/totum/blob/main/types/scn.js
https://github.com/webaverse/totum/blob/main/type_templates/scn.js

Place where we load the parsed URL: https://github.com/webaverse/app/blob/1679f2be251c9c90110c501b450dd598b7e28a96/universe.js#L17


gpt-4 model not supported

Getting this error when I try using "gpt-4" as the model:
InvalidRequestError
openai.error.InvalidRequestError: This is a chat model and not supported in the v1/completions endpoint. Did you mean to use v1/chat/completions?

I'm having the same issue. How did you resolve ?


Tehs changes  | Warsong buildings should be able to cast For the Horde! #2622

Should work as intended #2622
Still new to this, hope that I did not change anything else.

Will try to get on it with Madsen today. Because literally I have no idea what happened there.

Will try to get on it with Madsen today. Because literally I have no idea what happened there.

Oh, I know what happened.
You made your first change from the Tehs-changes branch. Then you used the Tehs-changes branch again for this one. So your branch has the changes from your first branch, but isn't aware that they've already been pushed.
The way to avoid this is simple: every time you complete a Pull Request, delete the branch you used for it, then use a new one next time.
In this case, you can solve your current problem by merging dev from the main repository into your branch. Madsen might know how to do that in Github Desktop.

@YakaryBovine Should be fixed now!

@Tehia I recommend deleting Tehs-changes at this point. Next time you need to make a change, you can make a new branch off the latest dev.


Figure 3: Summary of data processing found in basic QC report

After explaining the overview of the figure, I think it will be beneficial to include some plots that show each of the steps taken when processing each library. We include a lot of this in our main QC report. This figure should include an example of each of the following plots that are found in our QC report:

[ ] Knee plot showing which cells passed filtering out empty droplets
[ ] Summary of cell metrics showing the total umi/ number of genes/ mitochondrial content for each cell
[ ] miQC model plot
[ ] Plot showing removal of low quality cells (cells colored by keep/ remove)
[ ] UMAP colored by number of genes detected OR do we show clusters...? Or both?

To do this, we will need to find an example library that we like to use for re-creating each of these plots.

I wonder if we might include these in the overview figure as little illustrations? I'm not sure how much value there is in making these a separate figure. Another option might be an image of the QC report?

Hmm... I like both of these ideas. I do think having an image would be hard to fit into one figure where it is legible. I think mini versions of the figures would be fun though and a nice way to show them.

We have decided to include this with the overview of scpca-nf and be Fig. 2B. We will include mini versions of the plots in the QC report. We can do this by either shrinking the full size versions and making sure that the font size is still legible, or we can create dummy data with less points to make it easier to have smaller versions.


Clear cell cache when external scrolling ends

With the fix in 9.5.0 for using the cell cache inWindowScroller (https://github.com/bvaughn/react-virtualized/blob/master/CHANGELOG.md#950), another bug was unveiled:
Since the Grid when used with WindowScroller does not emit onScroll events when the user scrolls, the cell cache is never cleaned up because the _debounceScrollEnded function is never called.
This PR fixes that by detecting if props.isScrolling changed from true to false, and call this._debounceScrollEnded() in that case.

Thanks for this contribution! Released as 9.7.3

Thanks for accepting it and for this library!


Build example config into the docker image

This should have a fs schema cache backend and a stdout sink.

Completed here: https://github.com/silverton-io/honeypot/commit/558fa195abf2e245aa61cb1ba4315c916731f6ed


[Qualcomm feedback] Chapter 4: Clarify Figure 1 and description

Reference: link

Confidential VMs (under a VMM) are shown in figure 1 and Confidential applications (managed by
an untrusted host OS) are shown in the architecture figure 2. As evident from the architecture, the
difference between these two scenarios is the software TCB (owned by the tenant within the TVM)
for the tenant workload - in the application TEE case, a minimal guest runtime may be used;
whereas in the VM TEE case, an enlightened guest OS is expected in the TVM TCB.

The statement "under a VMM" may be misleading, as figure 1 depicts 3 non-confidential VMs on top of the host VMM.
Suggestion to use "managed by VMM", similar to second part of sentence (managed by an untrusted host OS).
Figure 1 does not show that. The TVM appears as grey box without any TCB component.

making updates to the figure to reflect clarifications in a combined PR

address in PR #71
cc @ozkoyuncu


Post-Test-Refactoring

@martin-schulze-vireso Have you had a look at the test on master.
not ok 173 wait_for_changes_to_be_detected_in_container fails when timeout is reached
# (from function `repeat_until_success_or_timeout' in file test/test_helper/common.bash, line 38,
#  from function `repeat_in_container_until_success_or_timeout' in file test/test_helper/common.bash, line 71,
#  from function `wait_for_changes_to_be_detected_in_container' in file test/test_helper/common.bash, line 184,
#  in test file test/test_helper.bats, line 169)
#   `TEST_TIMEOUT_IN_SECONDS=0 wait_for_changes_to_be_detected_in_container "${CONTAINER_NAME}"' failed
# bash: /usr/local/bin/helper_functions.sh: No such file or directory
# bash: _monitored_files_checksums: command not found
# Timed out on command: docker exec 2623cb20c5f730c0028575b27f7ef75902812b4fc9f5e2d3976919de545182c1 bash -c source /usr/local/bin/helper_functions.sh; cmp --silent -- <(_monitored_files_checksums) "${CHKSUM_FILE}" >/dev/null
# 2623cb20c5f730c0028575b27f7ef75902812b4fc9f5e2d3976919de545182c1
not ok 174 wait_for_changes_to_be_detected_in_container succeeds within timeout
# (from function `repeat_until_success_or_timeout' in file test/test_helper/common.bash, line 38,
#  from function `repeat_in_container_until_success_or_timeout' in file test/test_helper/common.bash, line 71,
#  from function `wait_for_changes_to_be_detected_in_container' in file test/test_helper/common.bash, line 184,
#  in test file test/test_helper.bats, line 196)
#   `wait_for_changes_to_be_detected_in_container "${CONTAINER_NAME}"' failed
# bash: /usr/local/bin/helper_functions.sh: No such file or directory
# bash: _monitored_files_checksums: command not found
# bash: /usr/local/bin/helper_functions.sh: No such file or directory

...

We should intervene here promptly.

I'd think this is an interaction between the parallel changes on my PR and master.
_monitored_files_checksums is loaded via the test_helper.bash, I don't understand why yet, why it is not there anymore.

Could this be the culprit: https://github.com/tomav/docker-mailserver/commit/da8171388f0116b02472d4e47b7f14ffe2abccb6#diff-dd2c0eb6ea5cfc6c4bd4eac30934e2d5746747af48fef6da689e85b752f39557R231

Travis seems to have connectivity issues. The jobs only start sporadically and the one that came through failed, because could not download shellcheck.

Could this be the culprit: da81713#diff-dd2c0eb6ea5cfc6c4bd4eac30934e2d5746747af48fef6da689e85b752f39557R231
It changes helper_functions.bash to helper-functions.bash, but the PR still references the old name: https://github.com/tomav/docker-mailserver/blob/master/test/test_helper/common.bash#L184

I should have realized this myself, thank you very much. This seems to be the issue.


[mle] add helper methods for constructing RLOC and ALOC addresses

This commit adds ConstructRloc() and ConstructAloc() helper methods to the Mle class for constructing RLOC and ALOC IPv6 addresses from given RLOC16/ALOC16 values. These methods are now used in other modules where RLOC or ALOC addresses are needed.
Related methods are renamed to use the Construct term (e.g., ConstructServiceAloc()) to harmonize the naming style. Additionally, the SetToRoutingLocator() and SetToAnycastLocator() methods in the Ip6 class are replaced with a common SetLocator() method.

Closing in favor of https://github.com/openthread/openthread/pull/10391.


Google colab - pmg config --add PMG_MAPI_KEY produces error in _load_pmg_settings

MP_API_KEY = '' #@param {type:"string"}
!pmg config --add PMG_MAPI_KEY {MP_API_KEY}

Traceback (most recent call last):
  File "/usr/local/bin/pmg", line 5, in <module>
    from pymatgen.cli.pmg import main
  File "/usr/local/lib/python3.7/dist-packages/pymatgen/cli/pmg.py", line 15, in <module>
    from pymatgen.core import SETTINGS
  File "/usr/local/lib/python3.7/dist-packages/pymatgen/core/__init__.py", line 61, in <module>
    SETTINGS = _load_pmg_settings()
  File "/usr/local/lib/python3.7/dist-packages/pymatgen/core/__init__.py", line 51, in _load_pmg_settings
    d.update(d_yml)
TypeError: 'NoneType' object is not iterable

Workaround is to just use export MAPI_KEY=<your API key>, but then another error ensues (which appears regardless of using Google Colab or not). See #58

I think I've got it figured out, and it will be addressed in the next pymatgen release. Workaround is to delete .pmgrc.yaml if it's an empty file and make sure not to use the pmg --add CLI, only the shell export command.
https://github.com/materialsproject/pymatgen/issues/2377


Problem with sprite images when using less.js

When I try to use less.js to load the styles I get this error for the sprite file:

I reference the files like this in the head of my page:
 <link rel="stylesheet/less" type="text/css" href="bootstrap/less/bootstrap.less">
 <script src="less.js" type="text/javascript"></script>
```
 It looks like it has to do with the two sprit image variables:

```css
 @iconSpritePath:          "../img/glyphicons-halflings.png";
 @iconWhiteSpritePath:     "../img/glyphicons-halflings-white.png";

However, these files do exist in my installation, so i'm not sure why I am seeing the error.

If I comment out the reference to the images variables in sprites.less then the rest of the less/css will work.

Interesting. I must have an older version also installed in another project. The sprites.less file doesn't use variables for the images in this version:
[class^="icon-"] {
  display: inline-block;
  width: 14px;
  height: 14px;
  vertical-align: text-top;
  background-image: url(../img/glyphicons-halflings.png);
  background-position: 14px 14px;
  background-repeat: no-repeat;

  .ie7-restore-right-whitespace();
}
.icon-white {
  background-image: url(../img/glyphicons-halflings-white.png);
}

surrounding the variable reference with quotes in sprites.less seems to resolve the issue:
[class^="icon-"],
[class*=" icon-"] {
  display: inline-block;
  width: 14px;
  height: 14px;
  line-height: 14px;
  vertical-align: text-top;
  background-image: url('@iconSpritePath');
  background-position: 14px 14px;
  background-repeat: no-repeat;

  .ie7-restore-right-whitespace();
}

.icon-white {
  background-image: url('@iconWhiteSpritePath');
}

Blah, this is already fixed in 2.0.2-WIP.

It seems that less does't fail now, however the images icons don't appear te loading:

I'm not getting a less error now, but the images are not showing

Does appear to be fixed in 2.0.2-wip


chore: update tests for replaceItems with actOnDispatch

Summary
Tests for #751

well I just copied the test block above it and modified it for dispatch, but It looks like an important test so it might be intentional (?)

lol. merged it then. I want to work on a few things in this repo anyways. I don't like the implicit magic that happens around replaceItems. When to use context.data, when to use context.result depending on context.type? It does not work for around hooks at all? What do you want to achieve with replaceItems in a before hook if there already is context.result because you want to skip the adapter call.
Too many questions and to much magic for my taste. I want to introduce a more explicit replaceData and replaceResult and maybe replaceDispatch or get that covered by replaceResult(..., { useDispatch: true | false | 'ifExistent' }) or something. Just thinking out loud.
That said I'll eventually rework this stuff anyways.

hmm, I found the bug for replaceItems when I was using feathers-casl. it was using replaceItems but things were not getting replaced. so It took me some time to pin point it to the dispatch issue. and then I had to patch feathers-casl to replace both result and dispatch. I have done A LOT of modifications to feathers-casl to get it working the way I want it to, and it's still not what I expect.
I know it's not the place to discuss it, just wanted to mention where this little utility was having impact on my project.
(btw feathers-casl's most interesting feature for me was the getChannelsWithReadAbility function)

Wrote you on discord. I would love to chat about this stuff. Not now but in the near future.


Exclude recently surveyed places from bimonthly check

Hi,
I went for a walk in town and checked some shops meanwhile. When I got home I noticed I checked shops that were recently surveyed, but where the date was added as survey_date=* instead of check:date=*. Maybe the "bimonthly check" should keep in consideration the most recent date of both tags, so users can focus on not-checked places.

I just chose the most used and known tag for the check date :) Regarding others, I assume they have been set with different editors, which might miss some attributes like a phone or a wheelchair accessibility. So even if they were checked like a day ago, it would still have sense to take another look with Every Door.


can NeuRBF  support  LLFF  , Mip-NeRF 360 dataset ?

thank your NeuRBF, i like it very much!
can NeuRBF  support  LLFF  , Mip-NeRF 360 dataset ?

NeuRBF can support LLFF dataset, which is the version that uses K-Planes as the grid-based part (page 8 bottom right in the NeuRBF paper). We are working on releasing that part of codes. For Mip-NeRF 360 dataset, we have not tried it.


Added Events card

ref: https://github.com/kubevirt/web-ui-components/pull/324

@rawagner rebased the PR


Missing function in MoistAir

Reported by fcasella on 14 Mar 2008 16:57 UTC
A function enthalpyOfNonCondensingGas should be added to the Modelica.Media.[wiki:PartialCondensingGases] interface, in the same spirit of enthalpyOfCondensingGas, and then implemented for the MoistAir model.

Migrated-From: https://trac.modelica.org/Modelica/ticket/61

Comment by kproelss on 14 Mar 2008 17:57 UTC
fixed in revision 04dd747fc338559fe7b0ed85556e25c47b90d179

Modified by otter on 21 Jan 2009 11:08 UTC


Scan command is not working properly in cluster mode with multiple shards

scan command gives empty output sometimes when we run it in cluster mode with multiple shards (3 shards). Is there any solution to run scan command in all shards.
I have tried to use this code:
const masters = cluster.nodes("master");
Promise.all(
masters
.map((node) => node.keys())
.then((keys) => {
// keys: [['key1', 'key2'], ['key3', 'key4']]
})
);
but it gives no response

I have the same issue. It exits really early with CURSOR at '0' even though it didn't scanned it all.
Can it be similar to https://github.com/phpredis/phpredis/issues/2074 ?


Cannot seem to use ES6 method for the  validate and Custom props don't work

I cannot get the return from an implicit es6 function, or even using a class method to work properly for the validate fuction.
E.g. even doing the attached code below, will not make the component invalid (i.e. returning a string).
In my real code, I'm trying to use class method as the validator, and valid is always true.
Also, in the props that are passed to the validator method, any custom props (also see below), never appear in the props list.
let customprops: any = {sw: 1};
<Field validate={(value) => "3"}
props={...customprops}
/>

Hello @stephenwil,
Please provide an actual running code that demonstrates your issue.

I had the same problem.
In my case, it was because my logout reducer cleaned the form key from the redux store.
Make sure you don't mess with the form key in the store.

Closing due to no response from OP.


Use goreleaser

Use a dummy repo to validate the release process
See how customizable go releaser's steps around building and pushing images are.
Investigate automation around updating Gopkg.toml in ark-plugin-examples repo; is it even possible?

@skriss ready to close this?

just curious if there was a decision to use a different tool?

Closed by #1000


fix setup_py to include the modules

resolves #14
Added the modules into the list in setup.py so that they get properly installed via pip.
Tested by running
pip install .

In the root of the repo.

Looks good to me.


Backend added for feedback form and styles fixed

issue #170 solved

@mdazfar2 check the PR

@RamakrushnaBiswal It has gotten much better than before.
I am getting this error, how do I get the result?

@mdazfar2 you run the server?
1st go to the Official-website folder in the terminal
2nd type npm install
3rd type node index.js

hy @mdazfar2 is there any discord channel where we can communicate

@RamakrushnaBiswal Check Discord, I texted you.


Api/resource filtering

Purpose
Richie frontend needs to know if a user has purchased a product. In order to achieve that, we add query params filters to the order api route. For now, an order can be filtered by its state and a product id.
Proposal

[x] Filter Order by product id
[x] Filter Order by state
[x] Test all this new stuff

Not withstanding the fact that we want to add the possibility to filter orders, I would like the question the efficacy of using this endpoint to determine if a product has been bought by the logged-in user.
My understanding is that we need to know that each time we display a course detail page to a user? So this will get a heavy load and maybe we could add this information "is_bought_by_user=True|False" on the product detail view?

Not withstanding the fact that we want to add the possibility to filter orders, I would like the question the efficacy of using this endpoint to determine if a product has been bought by the logged-in user. My understanding is that we need to know that each time we display a course detail page to a user? So this will get a heavy load and maybe we could add this information "is_bought_by_user=True|False" on the product detail view?

Indeed. I'm not a fan to add a is_bought_by_user field into the product as in this way, the product api response does not stick with the Product model. But to reduce load, we could add an order attribute to the product response.
This property will be null if user does not have a valid order related to the product otherwise it will contain the order uid. WDYT ?

Not withstanding the fact that we want to add the possibility to filter orders, I would like the question the efficacy of using this endpoint to determine if a product has been bought by the logged-in user. My understanding is that we need to know that each time we display a course detail page to a user? So this will get a heavy load and maybe we could add this information "is_bought_by_user=True|False" on the product detail view?

Indeed. I'm not a fan to add a is_bought_by_user field into the product as in this way, the product api response does not stick with the Product model. But to reduce load, we could add an order attribute to the product response. This property will be null if user does not have a valid order related to the product otherwise it will contain the order uid. WDYT ?

Yes, agreed! Just make sure that you don't query too much with the order! You will need the state of the order as well if I'm not mistaken.


Add the "optimizing-flatlist-configuration" topic

Hello
As mentioned here , there is some useful information about FlatList which can be added to the official docs.
I started to import them but there is a question (@cpojer): as the version 0.60 is already cut (here), should my PR have 0.60 version?
cc @kelset @filipemerker

Yeah, let's have a 0.60 and a master version.

Wow @MohamadKh75, amazing work on the PR! I would definitely not be able to integrate it so well. When I get home today, I can take a look and help you with something!

uhm just one thing - it seems that the PR is trying to add files for all the docs, I think you may have to rebase the PR and remove the versioned 0.60 files you generated

cc @cpojer / @rickhanlonii I think it's ready for merging


DNS logged as updating but not actually updating.

There is no error log of it not updating but it does not update.

nvm. I found out what the issue is.  I didn't change the auth_method from "token" to "global" since my key is a global key.  It works like a charm now.  Thanks so much for the script.


Update tests that are expected to "fail" to succeed

I would like to update tests that are supposed to fail to be marked as succeeded workflows. This is so we can easily look at the list of workflow runs and find what's broken.
Right now it's really hard to see if tests are actually broken or are working fine just based on the workflow runs page.

Maybe tests can be updated to use continue-on-error in order to allow for failures?


fix: uses ThreadLocal to prevent concurrent modification on ScopeManager

Impact

[X] Bug fix (non-breaking change which fixes expected existing functionality)
[ ] Enhancement/New feature (adds functionality without impacting existing logic)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Description
Issues  #5426 #2433 #4173  #4314  presents the same error:  "Cannot end scope bsbacsmwja when currently at scope root" .
The issue was narrowed down to Scope class handling of ScopeManager:

Thread "A" starts and creates a root scope. By doing so, Scope.getCurrentScope() returns "root"
Thread "A" starts a child scope "ABC". Now, Scope.getCurrentScope() returns "ABC", and parent is root (parent is saved in a non-static variable, while currentScope is static)
Thread "A"  is suspended and Thread "B" starts
Thread "B" starts.  By doing so, Scope.getCurrentScope() returns "ABC" (hey! that's already wrong)
Thread "B" starts a child scope "DEF". Now, Scope.getCurrentScope() returns "DEF" and parent is "ABC"
Thread "B"  is suspended, "A"  resumes
Thread "A" does it's job and ends the scope.  The last step of exit is restoring the former Scope, so thread "A" sets currentScope to root (remember, parent is local and current is static) .
Thread "B" resumes - now working on curentScope "root" . It does it work and tries to finish. It tries to compare scopeId that was saved in a local variable,  but then "B" gets message "Cannot end scope DEF (local variable)  when currently at scope root (statically changed) " - RuntimeException

We prevent this issue by using a ThreadLocal object that ensures that each thread will have it's own ScopeManager , so "A" won't break "B" as it cannot mess with it's ScopeManager.
This issue has always been around, but seems it started to show up more as child scopes are being used for blocking tasks (that allows threads switching) such as database execution in ChangelogJdbcMdcListener . In the example above, A and B were suspended waiting for a database query to run.

@filipelautert Nice fix. Would you suppose this makes ThreadLocalScopeManager effectively obsolete? Perhaps it should be deprecated?

@mches makes sense as now we are always using it, and in a simpler way.

@mches https://github.com/liquibase/liquibase/pull/5780 , thanks for the reminder!


Changes for form submission

My pr

What is this @VirtualRcoder? Most of the changes we already have in our project.
You only have to send those changes which are not yet present.

Okay
On Fri, 14 Sep 2018, 11:35 am Prashant Sharma<EMAIL_ADDRESS>wrote:

What is this @VirtualRcoder https://github.com/VirtualRcoder? Most of
the changes we already have in our project.
You only have to send those changes which are not yet present.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/GeekyFreelancers/CollegeProject/pull/22#issuecomment-421240982,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AZT07MqRmJLo6LvwfrIVy8dScjosjYboks5ua0cPgaJpZM4WgNLB
.

Why You don't close it gutsytechster


Icon Font: Icons are not centered

Problem Description
It appears that many of the font icons from the ETmodules font are not properly aligned. Is there any way to solve this with CSS or can this be considered a bug and get fixed?
Screenshot and/or gif

QA Checklist
Reporter

[ ] Helpful title used

Helpful title format: Scope(s) :: One Sentence To Describe The Issue
Example: VB :: Floating Toolbar :: Jumps To Top Of Page

[ ] Detailed description

Description should usually be 150+ characters.

[ ] Steps to reproduce included
[ ] Support Ticket URL included
[ ] Image and/or gif

Developer

[ ] Steps to reproduce proven solved
[ ] Test included and coverage acceptable and all Tests passing?
[ ] PR description has layman's description of problem and solution and "Areas Affected" listed/explained?
[ ] PR branch includes latest commits from master branch (at the time of checking)?
[ ] Estimated points on issue
[ ] Proper code documentation and conventions?
[ ] Proper RTL appearance
[ ] i18n used if applicable
[ ] Ajax/Form used? Nonce used? Perms checked? All user input sanitized and validated? Intentional unsanitized/unescaped functions used?
[ ] Database saved/updated? Data sanitized and validated?
[ ] Variable output properly escaped and validated?

Peer Review

[ ] PR branch includes latest commits from master branch (at the time of checking)?
[ ] Steps to reproduce proven solved
[ ] Affected areas are tested and ok
[ ] Proper code documentation and conventions
[ ] Proper RTL appearance
[ ] i18n used if applicable
[ ] Test(s) included and coverage acceptable
[ ] Ajax/Form used? Nonce used? Perms checked? All user input sanitized and validated? Intentional unsanitized/unescaped functions used?
[ ] Database saved/updated? Data sanitized and validated?
[ ] Variable output properly escaped and validated?

Quality Assurance

[ ] All tests passed on CircleCI.
[ ] Steps to reproduce passed, the fix works.
[ ] No errors in console or output
[ ] Affected areas are tested and ok
[ ] The fix does not change a customer's website in any surprising or unintended way

[ ] If Divi's design is adjusted, settings are migrated gracefully and invisibly

Design Review

[ ] UI is to spec
[ ] UX is to spec
[ ] Design is to spec
[ ] No surprising visual changes to a customer's website will be experienced after updating

[ ] Any/all visual changes are migrated gracefully

Dev Review

[ ] Test(s) included and coverage acceptable
[ ] Ajax/Form used? Nonce used? Perms checked? All user input sanitized and validated? Intentional unsanitized/unescaped functions used?
[ ] Database saved/updated? Data sanitized and validated?
[ ] Variable output properly escaped and validated?
[ ] i18n used if applicable
[ ] Implementation acceptable, DRY, Scaleable, future safe
[ ] Best practices used, cleverness and grokage, ES6 use, etc.

I also reported this more than a year ago
https://www.elegantthemes.com/forum/viewtopic.php?f=187&t=668135


Disk cashing for the tempdb drive?

I see notes on what disk cashing needs to be chosen for the data files and log files. but I could not find for the Tempdb drive.
can I choose ReadOnly caching for Tempdb?
[Enter feedback here]

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

ID: f9a7fbbc-41a8-4f0a-df40-00c34b4a74df
Version Independent ID: 541ee437-f922-53dc-b470-9985885dc10f
Content: Configure storage for SQL Server VMs - SQL Server on Azure VMs
Content Source: azure-sql/virtual-machines/windows/storage-configuration.md
Service: virtual-machines-sql
Sub-service: management
GitHub Login: @bluefooted
Microsoft Alias: pamela

@selectstarfromsql Thank you for your feedback!  We've assigned this to the document author for further review.

No, the tempdb files go on the local drive that doesn't support caching. You can read more about tempdb best practices here: https://docs.microsoft.com/azure/azure-sql/virtual-machines/windows/performance-guidelines-best-practices-storage?view=azuresql#data-file-caching-policies


Improve documentation

Add limitations details (only from import, not import, only internal imports...)
Write technical doc (algorithms, ...)

Documentation written for version 3.


Problem when deploying?

So I've tried to deploy this cartridge like 8 times and it never works properly

Not` Found
The requested URL /app was not found on this server.
Apache/2.2.15 (Red Hat) Server at xx-xxxxxxx.rhcloud.com Port 443

it also "freezes" the machine so I can't ssh into it to check logs, steps to reproduce is just to create a new openshift application with the "Nodejs (Latest)" and no scaling.

Nevermind, seems like Openshift is not deleting applications properly, I had to delete my application AND the domain, create another one then it worked.

Nevermind, seems like Openshift is not deleting applications properly, I had to delete my application AND the domain, create another one with completely different name then it worked.


Enable Step Assist

The current auto-jump implemented by Mojang get's players killed.
This enhancement is to allow the single player (or the server admin) to turn on step assist.
This option will not come into affect if the vanilla auto-jump is enabled.
The server configuration determines if this step assist will be applied to the player.

I turn the built in auto-jump off right away as it is horribly broken.
There is a mod that fixes it, but I could not get it to work. I should go back and see if it works now.

I can see if it works. If it does I will remove this enhancement.

A proposed change for this.  Default autojump is dangerous, a bit unpredictable, and can even prematurely waste your hunger bar.  However, the step-up ability that horses have is a powerful boon that, while not game breaking, should be earned through a little effort.
I propose creating it as an enchant that can be added to boots, that provides the step-up functionality.  This way if a player wants to get rid of it, they can always take the boots off, but it also makes the player deal with basic travel for a while before they can get the easy mode travel :)
Benefits of being an enchant:
Progress gated behind enchanting as a prerequisite.
Can work with any enchantable boots.
Mobs can spawn with it, giving zombies and skeletons a new level of hell to chase down players with!
Drawbacks of being an enchant:
Progress gated behind enchanting as a prerequisite.
Can work with any enchantable boots.
Mobs can spawn with it, giving zombies and skeletons a new level of hell to chase down players with!

@kaojinn Those are some good points. Were the benefits and drawbacks supposed to be the same, though?

Yes :)  My attempt at humor.  But in truth, as a matter of perspective, they can be viewed as both good and bad things, depending on the level of challenge the player prefers.  Personally, I like an absolutely punishing experience.  I feel all the more accomplished if I overcome it :)

Heh. I have no combat skills whatsoever, so I usually play in creative (and I still fail at killing mobs. I usually end up falling off a cliff/down a hole). I switch to survival/peaceful to mine sometimes, but that's about it.

So what I have so far.
An enchantment called "Step Assist". It will have up to 3 levels and is a common enchantment.
1st level gives the player 1 block step assist. This way they can go up 1 block inclines.
2nd level gives the player 1.5 block step assist. This way they can go up fences/walls.
3rd level gives the player 2 block step assist. This makes it much easier to go up/around mountains.
Because there is no armor equip/unequip event I have to check on each player tick if they have boots with this enchantment and adjust their StepHeight property based on the level.
I will keep track of what their original step height was and what I changed it too. This way when they un-equip the boots I can reset the player's step height to what my mod knows it is supposed to be. This can be a bit tricky with other mods doing step assist things (like botania's baubles). But since this happens on every tick it should be fine.

Oh I am also going to make sure that of the player has step assist form another mod that the enchantment level represents the maximum allowed step height.
So of they already have a step height of 1 from the botania bauble and enchant some boots with step assist 1, their step height would stay at 1.

This feature has been implemented in <IP_ADDRESS> and is now available on curseforge. Have fun!


add reconnection mechanism

Now setting up a TiDB cluster, the start-up sequence must be PD -> TiKV -> TiDB, otherwise it will fail to build，up to 99% probability. This is not friendly for setting up a cluster, please add a simple reconnection mechanism in TiKV to make world better.

Thanks for your advice. I will add a TODO label for this issue.

TiKV has supported re-connection for PD, but it only try 100 times with 50ms every time, so if the PD doesn't start ok in 5s, TiKV may fail.
We can check more times and wait longer when checking is_cluster_bootstrapped in node.rs. @huachaohuang

In TiDB, this may panic when opening the storage, we may handle here. @shenli


Correct assisted-service repo in release_tickets.py

In order to use the release_tickets.py script against the assisted-service repo it needs to be changed from assisted=service to assisted-service in the script.

/cc @YuviGold @ronniel1 @oshercc @osherdp


fix(pymongo): extend support for more operations

https://epsagon.atlassian.net/browse/CS-119

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

GitHub release
v1.77.1

Your semantic-release bot :package::rocket:


[QUERY] Is there a way to customize the behavior of the RedirectPolicy

Library name and version
Azure.Core.1.33.0
Query/Question
RedirectPolicy will clear the authorization header - https://github.com/Azure/azure-sdk-for-net/blob/2b941a2f3cb6ebefba2477effc741941f1883ac8/sdk/core/Azure.Core/src/Pipeline/RedirectPolicy.cs#L83C1-L84C1

Is there some way to keep it?
If not, what is the best way to supply an alternative to maybe replace the current RedirectPolicy?

We are considering disabling allowAutoRedirect and then supplying a similar policy that doesn't strip the header or resend the request, which feels a bit upside down. What would be the best approach?

======
If we understand correctly, the reason to strip the header is to avoid exposing the authorization header to an untrusted host. Is it possible to expose a delegate for the client code (our code) to determine whether the host is trusted and avoid stripping the header when it is?
We have a legitimate scenario where 302 Found is returned by a request, and we know the trusted host to go with.
Environment
Windows; .NET 6;

Thank you for reporting the issue. Tagging and routing it to the person best able to assist you.
FYI - /cc: @annelo-msft , @christothes

Hi @xiaomi7732,
As of 1.33.0, redirects are actually disabled by default due to security concerns. If you choose to enable redirects, then the auth header is stripped for the reason that you mentioned. Does the URI that you are being redirected to require the auth header?

Yes, we can use this issue to track that feature request.

@JoshLove-msft , Fantastic. Please keep us posted for the changes. We are looking forward to see the capability to be implemented.

@xiaomi7732, can you clarify whether you are writing a client library that needs this functionality or if you are intending to use this feature as a user of a client library or Azure.Core?

@JoshLove-msft, we have code using HttpPipeline (instead of HttpClient) to leverage the policy/retryPolicy provided. So, we are the latter.
I am just curious, why does that matter? A client library would also be a user for Azure.Core too, right? :-)

I am just curious, why does that matter? A client library would also be a user for Azure.Core too, right? :-)

Yes, but the question is who would be configuring this policy - would it be the client library or the user of the client library? The answer to that question would help inform the API design. It sounds like for your scenario, it would be the client library itself that needs to configure the policy.

Okay. I am not sure I can see the difference without seeing the details. But if you'd like to share the API design, I'd be glad to verify whether that's gonna work for our scenario or not.

@xiaomi7732, can you share your code for how you are constructing the HttpPipeline?

Yes. this is a simplified version of the factory method we used:
return HttpPipelineBuilder.Build(
    clientOptions,
    perCallPolicies: new HttpPipelinePolicy[]
    {
        new ABCPolicy(clientOptions.Endpoint),
        new VersionPolicy(clientOptions.ApiVersion)
    },
    transportOptions: new HttpPipelineTransportOptions
    {
        IsClientRedirectEnabled = true
    },
    responseClassifier: null);

FWIW, I would imagine a delegate to allow checking for trusted endpoints. For example:
return HttpPipelineBuilder.Build(
    clientOptions,
    transportOptions: new HttpPipelineTransportOptions
    {
        IsClientRedirectEnabled = true
        // Only forward the auth header for trusted host
        IsTrustedHost( url => {
            if(url.IsRelativeUri) // Relative url doesn't specify host, use base uri
            {
                  return true;
            }
            if(url.host) ...  // Check if the target is whitelisted.
            {
                  return true;
            }
            return false;
        })
    },
    responseClassifier: null);

Please let me know if there more info needed.

So you do not use the BearerTokenAuthenticationPolicy? I ask because this policy, when applied in the perRetryPolicies will result in the Authorization header always being applied before sending the request.

@JoshLove-msft Yes, we use BearerTokeAuthenticationPolicy. Actually, we use that as a workaround. It allows us to re-attach the header on every call.
The problem is, that applying it to perRetryPolicies is at best a workaround. It defeats the purpose of removing the header for the redirect scenario.
Does that make sense?

That makes sense. The issue in which BearerTokenAuthPolicy adds back the header unconditionally would need to be addressed as part of the feature to allow customizing whether the RedirectPolicy retains the header. Otherwise, it will just get added back if a library is adding the bearer token policy.

@JoshLove-msft Thanks for the communication. Just on the side, please consider backward compatibility carefully. I actually have a complaint about stopping auto-redirect by default. Here's our case:
I have 1 library A, that references the package Azure.Core.1.31.0 with auto-redirect;
The user has some other library, B, that references the package Azure.Core.1.33.0, where auto-redirect is disabled;
The problem, at the runtime, the latest package will be used, and auto-redirect will be off by default, and the library A stopped working because of that.

Hi @xiaomi7732 .  Thanks for reaching out and for opening this feature request.  The Azure.Core team has reviewed, and we have decided not to move forward with this feature.  This is a rather a unique scenario which can be satisfied by the current work around or by disabling the built-in redirect policy and injecting a custom policy.
Should we receive feedback from other developers asking for similar functionality in the future, we may reconsider.  For now, I'm going to close this out as unplanned.


Can else and else if conditions be used in TagUI scripts?

Raising this from an user email for sharing, as other users might benefit from this question.

Does your current version of if present()support else if and else?
I originally tried the following:
for (n=1; n<=num_awards; n++)
{
	if present('//*[@class="award"]['+n+']')
	{
		read //*[@class="award"]['+n+'] to str
		awards = awards + "(" + n + ") " + str + "\r\n"
	}
}
else
{
	break
}

It didn't work.
Does your current version of if present()support else? If yes, how do I write it?
How about else if?
By the way, for present() we must use single quote (')? I tried double quote (") - gives error.

on present('//*[@class="award"]['+n+']') I think it is JavaScript programming. Imagine if you use " to enclose and there is also " enclosing award. It becomes invalid JavaScript syntax.

support for the else and else if keywords is limited and the choice was made in favour of enabling auto-waiting for elements to appear before acting on them. It depends on the context, below works -

http://tebel.org/index_mobile.php
if present('footer')
{
print footer
}
else
{
print header
}

http://tebel.org/index_mobile.php
if present('footer')
{
print footer
}
else if present('header')
{
print header
}

In your example, the else does not have a matching if block. This is JavaScript syntax error I think.


fix: Update dependencies

fix: Upgrade lenra_components to v1.0.0-beta.45 fix: errors must be in english (#103)

:tada: This PR is included in version 1.0.0-alpha.1 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Merge & Release of the v12 branch

Hey there!
First of all, amazing work on emoji-data and js-emoji 🙇
The version on the v12 branch looks great and includes Emoji v12 😃
Are you planning to merge and release it any time soon?
It would be fantastic for both me and my company 😁

Some complex emojis like 🧑🏾🤝🧑🏼 from Emoji 13 throw an error on branch v12

Emoji 13.1 has now been merged


CUDA out of memory

class KanMLP(nn.Module):
    """Some Information about KanLinear"""
    def __init__(self,
              in_features=1152,
              hidden_features = None,
              out_features = None,
               drop=0.
              ):
        super().__init__()

        approx_gelu = lambda: nn.GELU(approximate="tanh")

        out_features = out_features or in_features
        hidden_features = hidden_features or in_features
        self.mlp = nn.ModuleDict(
            dict(
                c_fc=KAN(width=[in_features, hidden_features]),
                c_proj=KAN(width=[hidden_features, out_features]),
                act=NewGELU(),
                dropout=nn.Dropout(0.0),
            )
        )
        m = self.mlp
        self.mlpf = lambda x: m.dropout(
            m.c_proj(m.act(m.c_fc(x)))
        )  # MLP forward

    def forward(self, x):
        x = self.mlpf(x)
        return x

net = KanMLP(1152,1152*4).to("cuda")
x = torch.rand(size=(4,4096*4,1152)).to("cuda")
nex(x)

When the number of tokens reaches a certain size, the following situation will occur

 CUDA out of memory.

Hello!  Can you answer these questions?

What GPU are you using?
RAM size of GPU
Model (if applicable)

I dropped your code into claude, and hopfully this gives you some indication:
The main reason you're running out of CUDA memory is the large size of your input tensor. Let's break down the memory usage:
Input tensor x:
Shape: (4, 4096*4, 1152) = (4, 16384, 1152)
Elements: 4 * 16384 * 1152 = 75,497,472
Assuming float32, this tensor alone requires about 302 MB of memory.
Network parameters:
Input size: 1152
Hidden size: 1152 * 4 = 4608
This results in two large matrices in the KAN layers, each potentially using significant memory.
Intermediate activations:
The forward pass will create several large intermediate tensors, further increasing memory usage.
To address this issue, you can try the following approaches:
Reduce batch size:
Instead of processing 4 samples at once, try reducing it to 1 or 2:
pythonCopyx = torch.rand(size=(1, 4096*4, 1152)).to("cuda")
Use gradient accumulation:
If you need to process larger batches for training stability, you can use gradient accumulation. This involves processing smaller sub-batches and accumulating gradients before performing an optimization step.
Use mixed precision training:
Utilize float16 (half-precision) computations to reduce memory usage. You can use NVIDIA's Apex library or PyTorch's native AMP (Automatic Mixed Precision):
pythonCopyfrom torch.cuda.amp import autocast
with autocast():
output = net(x)
Optimize your model architecture:
Consider if you can reduce the size of your hidden layers or use more memory-efficient architectures.
Use gradient checkpointing:
This technique trades computation for memory by not storing all intermediate activations.
If possible, process your data in smaller chunks:
Instead of processing the entire 4096*4 sequence length at once, you might be able to process it in smaller segments.


fix Entertainment.Language description

ContentRating text seems to be used incorrectly.

@yoichinak : Thanks for your contribution! The author, @v-geberr, has been notified to review your proposed change.

@yoichinak Thank you for your PR. I would like to reword the text and submit it. #in-progress

@yoichinak This doc has been updated. Please review.

@diberry Thank you for updating the document.

@yoichinak Thank you for looking it over. I believe this issue is resolved. Feel free to reopen this issue is you need to. #please-close


Tiny type fixes

Tiny type fixes:

useStoryblokAPI's return type was any, because of the use of globalThis.
StoryblokComponent was expecting a prop called props in all components

Thank you very much @ridem 🙂


HIVE-21867

@vineetgarg02 , I updated the PR. Note that hybridgrace_hashjoin_2.q issue will be tackled in HIVE-20260 so I think we can proceed with this issue. In the latest patch I also added some simple logic to SharedWorkOptimizer to remove some duplicate filter expressions remaining in the plan because of change in the shape of the expression (problem was existing, patch just exposed it).


Can't use this custom integration and the official one at the same time

I've been eagerly awaiting for the release of the official HA integration to test out the local API feature, which I really want to switch to. But before making the final move, I was also interested in comparing the two options, in terms of performance, how special cases were handled (e..g. partially locked), etc...
I've upgrade today to 2024.2 and realized I can't have both - if the custom component is installed, it's the only one that shows up on the integration list. I have to remove it in order to get the official integration.
I also tried removing it, configure the official one and then install the custom one on top to see what happens, but it breaks the configuration of the local bridges.
Is this supposed to happen? Is there a workaround?
Also, on a separate note, while I got the official one working, I did some quick testing, and it is WAY slower at updating the state of a lock in HA when I manually lock/unlock it. Is this expected? By slow, I mean something like half a minute. This custom integration wasn't instant either, but I don't think it ever took more than maybe 5 to 10 seconds...
I thought one of the big advantages of the local API would be the use of callbacks so that we would get near-instant updates, no? Are my expectation incorrect?

Is this supposed to happen? Is there a workaround?

Yes it's intended like that, so normal users/don't mix match and encounter weird errors. If you install it manually (that is copying the folder in by yourself) you can change the domain in manifest.json and const.py which would allowing you running it in parallel.

I thought one of the big advantages of the local API would be the use of callbacks so that we would get near-instant updates, no? Are my expectation incorrect?

No that's correct.But I had to pull that feature in 2024.2.0b3, as there was a bug which could crash your bridge. So no callbacks happening atm. Hoping to get it back latest 2024.3.0.

Yes it's intended like that, so normal users don't mix match and encounter weird errors. If you install it manually (that is copying the folder in by yourself) you can change the domain in manifest.json and const.py which would allow you to run it in parallel.

Ok, great to know - I'll try that.

No that's correct.But I had to pull that feature in 2024.2.0b3, as there was a bug which could crash your bridge. So no callbacks happening atm. Hoping to get it back latest 2024.3.0.

Oh, I see. There's still hope then! :)
Is there a ticket that I can follow about this?
Thanks


Update imguralbum.py

I changed imageIDs from list to set, so it doesn't return duplicate imgs ever.
This is my first collaboration, sorry if this is not the way and please contact me.

Ditto on this as it would solve issue #37

This was already done here #26

@Szero your version gives the following error:
$ ~/imguralbum.py http://imgur.com/a/uOOju
Traceback (most recent call last):
  File "/home/user/imguralbum.py", line 207, in <module>
    downloader = ImgurAlbumDownloader(args[1])
  File "/home/user/imguralbum.py", line 96, in __init__
    for i in self.imageIDs:
AttributeError: 'ImgurAlbumDownloader' object has no attribute 'imageIDs'

This one works, so :+1:

@Kagami Thanks, I updated it so it works like it should now.

Closing to prevent duplication as @Szero too has a working version.


Add CI to generate the hints.md document

The document https://github.com/ndmitchell/hlint/blob/master/hints.md often ends up out of date. The only way to guarantee it is always fresh is to tie it into the CI. Usual approach would be generate it, make regeneration easier, and if it changes, fail CI.

@ndmitchell Hi Neil! I would like to try and contribute to hlint by solving this issue. I was wondering, since the CI seems to use the ndmitchell/neil@master action for a large amount of the CI work, whether you think it'd be better to add the hints.md freshness check in the CI step here or in the ndmitchell/neil@master action?

Great, thanks!
You shouldn't edit ndmitchell/neil, since that's the actions that are common to everything. The solution is to edit https://github.com/ndmitchell/hlint/blob/master/travis.hs - that's a script that is run by my CI (named from back in the day when it actually ran on Travis). If it produces a non-zero exit code it fails. Alternatively, if it leaves the repo not in a clean state, it fails. Having that script call out to regeneration is probably sufficient.
I actually don't know how to generate the hints - its something that should be written down at https://github.com/ndmitchell/hlint/blob/master/README.md#hacking-hlint, but isn't. Once you figure it out (I think its some command line flags to HLint) can you please write it there too.

@ndmitchell Cool! Thank you for the pointers :slightly_smiling_face:


SubNode inside parent Node

Hi, I am new to this library,
Is there any way to put a node inside the parent node and have its handle connect to another parent node?

Nope, but it's on our list: https://github.com/wbkd/react-flow/discussions/1024