API Authentication: The 'email' key is missing from the given credentials array.

Laravel Version: 6.2
Adldap2-Laravel Version: 6.0
PHP Version: 7.3.13
LDAP Type: ActiveDirectory

Description:
I am trying to setup API Token authentication for my project. I followed [Laravel's Guide)[https://laravel.com/docs/6.x/api-authentication] for implementing it but I am getting the The 'email' key is missing from the given credentials array. exception when submitting a get request to a protected endpoint. I have attempted with and without hashing the api_token and tried every option of authentication(passing in url, sending as form_param, and bearer).
passing the api_token in the url just returns unauthenticated, the others return the email error.
Here is my api.php file
<?php

use Illuminate\Http\Request;

Route::group(['middleware' => ['auth:api']], function () {
    Route::resource('location', 'LocationController');
});

Here is the guards from config/auth.php
<?php
 'guards' => [
        'web' => [
            'driver' => 'session',
            'provider' => 'users',
        ],

        'api' => [
            'driver' => 'token',
            'provider' => 'users',
            'hash' => false,
        ],
    ],

I created a listener to actually create the API token upon login
EventServiceProvider
<?php

namespace App\Providers;

use Adldap\Laravel\Events\AuthenticationSuccessful;
use App\Listeners\CreateAPIToken;
use Illuminate\Auth\Events\Registered;
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;

class EventServiceProvider extends ServiceProvider
{
    /**
     * The event listener mappings for the application.
     *
     * @var array
     */
    protected $listen = [
        Registered::class => [
            SendEmailVerificationNotification::class,
        ],
        AuthenticationSuccessful::class => [
            CreateAPIToken::class
        ],
    ];

    /**
     * Register any events for your application.
     *
     * @return void
     */
    public function boot()
    {
        parent::boot();

        //
    }
}

CreateAPIToken
<?php

namespace App\Listeners;

use App\User;
use Illuminate\Support\Str;

class CreateAPIToken
{
    /**
     * Handle the event.
     *
     * @param  object  $event
     * @return void
     */
    public function handle($event)
    {
        $user = User::where('email', '=', $event->user->getUserPrincipalName())->first();
        $token = Str::random(80);

        if($user->api_token === null) {
            $user->api_token = $token;
            $user->save();
        }
    }
}

Steps To Reproduce:
Using Insomnia REST Client, create get request to /api/location and set bearer token to api_token in database. Send request

Hi @shaqaruden,
The Adldap2-Laravel auth driver does not  support using the API Token guard. Have you configured your users provider to use the ldap driver inside of your auth.php file?

Yes I do

Then you must configure your api guard to use a different provider that has the eloquent or database driver, because those drivers are able to save and retrieve tokens from your users database table.
The LDAP driver does not support saving tokens to your LDAP user, as it has no where to store them properly (no database). It's possible it could support this in the future by using an LDAP attribute that could hold a string, but that opens a big can of worms and possible bugs / issues that could occur along the way.

For anyone coming across this same issue. What I did was I created a new middleware called BearerToken and use that to authenticate the API Token. This middleware only works for Bearer but you can easily create your own middleware that captures more types of tokens. Here is my middleware class
<?php

namespace App\Http\Middleware;

use App\User;
use Closure;
use Exception;
use Illuminate\Support\Facades\Auth;

class BearerToken
{

    protected $token;
    /**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @return mixed
     */
    public function handle($request, Closure $next)
    {
        $authorization_header = explode(' ', $request->header('Authorization'));

        if($authorization_header[0] === 'Bearer') {
            $this->token = $authorization_header[1];
        } else {
            abort(401, 'Bearer Token not specified.');
        }

        if(User::where('api_token', '=', $this->token)->first() === null) {
            abort(401, 'Bearer Token Mismatch.');
        }

        return $next($request);
    }
}

Then you must configure your api guard to use a different provider that has the eloquent or database driver, because those drivers are able to save and retrieve tokens from your users database table.
The LDAP driver does not support saving tokens to your LDAP user, as it has no where to store them properly (no database). It's possible it could support this in the future by using an LDAP attribute that could hold a string, but that opens a big can of worms and possible bugs / issues that could occur along the way.
// config/auth.php

// ...

 'providers' => [
        'users' => [
            'driver' => 'eloquent',
            'model' => App\User::class,
        ],

    //...

Wouldn't just allowing us to specify what column in our users table is the api_token be enough information for ADLDAP2-Laravel (and some other code changes) to support api tokens?

Unfortunately no - the TokenGuard calls the retrieveByCredentials() method on your configured provider, but instead of passing credentials with a username or email key, it passes a configured storageKey. This means that the LDAP auth driver would not be able to locate a user in your LDAP directory by the given storageKey value, so no user could be returned to validate the token.
// vendor/laravel/framework/src/Illuminate/Auth/TokenGuard.php

// ...
$user = $this->provider->retrieveByCredentials([
    $this->storageKey => $this->hash ? hash('sha256', $token) : $token,
]);

It's possible to support it by reworking a lot of the configuration, but that would require a lot of work, testing, documentation and an upgrade / usage guide.
If you're up for the challenge, I'd definitely accept a PR!

@shaqaruden Hi I am interested in your workaround. I have a project that uses Adldap for LDAP integration, and it works perfectly for the web application.
I need to integrate an API to support mobile devices, and I am unable to validate requests with a Bearer token. How exactly do I integrate the middleware?


Quick hacky investigation into event hooks

OK, this registers hooks with the global singleton OpenFeatureApi. It would probably be better to register the hooks with the client instead of the singleton, but this works for the moment. Also, OpenFeatureAPI doesn't maintain references to the individual clients so it's hard to trigger a callback on the client without some work in that area.
Anyway, It  was a quick look into the mechanism. Many improvements could be made (at the moment, I just registered a hook as receiving a generic string, but we want to properly type it in future)

Hey @agentgonzo, would you be willing to start an OFEP for event hooks?

I'm not entirely clear which hooks we'll be firing, so I'm having a difficult time contextualizing this.  Sorry for the delay!

Relates to an OFEP. Closing this PR until the proposal has been accepted.

@beeme1mr , I think I must have turned off notifications, as I didn't see the messages on this.
I dont' have any spare time to look at a research topic for this, but happy to take a look in a couple of weeks or answer questions.

@agentgonzo, no problem. Todd created a proposal before he left on vacation. When you're back from vacation, your feedback would be highly appreciated.
https://github.com/open-feature/research/pull/25


service apache not active it goes inctive mode

service apache not active it goes inctive mode ..cant start again why?

@lingambaikari
Authentication failure.
Run command with admin privilege (sudo).
$ sudo service apache2 start
$ sudo service apache2 status
Regards
Arun Kumar

@lingambaikari   u can start the service manually  by using service apache2 start

@lingambaikari
How did you install ? What are  the steps ?

Is it done?

Done sir tq...
On Sun, Oct 14, 2018, 3:29 PM revathi-muthana123<EMAIL_ADDRESS>wrote:

Is it done?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/QT-DevOps/DevOpsIssues/issues/218#issuecomment-429611596,
or mute the thread
https://github.com/notifications/unsubscribe-auth/Ao-f7pzyzw8LvJYbXDMKA7-0YirP2sYxks5ukwrlgaJpZM4XY82t
.

pls mention how did you resolve? Then close this issue.


add missing key type added in psono server 2.4

psonoci is missing the types SSH private key and SSH public key that was added in psono 2.4
i don't know internal structure but i assume there is missing secret-value-type:

ssh_key_private
ssh_key_public

I think bookmark is not in psonoci too, but I would not recommend to put Credit cart to psonoci
From release notes

Feature: Added SSH key entry type
Feature: Added credit card type

(v0.4.0)[https://discord.com/channels/709047685885198346/709047685885198350/1139523085159112764] introduces SSH key, credit card and TOTP secret types.


Update nomad CLI usage in nomad-examples-helper.sh

Replaces some deprecated CLI commands with current usage

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement
Learn more about why HashiCorp requires a CLA and what the CLA includes
Have you signed the CLA already but the status is still pending? Recheck it.

@brikis98 sure thing! I'll update any other mentions I can find. Thanks for the review. 😄

@brikis98 I looked аround for other deprecated dasherized nomad CLI commands and updated them in https://github.com/hashicorp/terraform-aws-nomad/pull/82/commits/e50504b608fc3ffb83492f1d72f8101865d83902 😄👍

Tests passed! Merging now.

Thanks for the review @brikis98 😄


Scan only photos extentions

Hi on  the librephotos_backend
it show it try to make thumbernails from WAV files or hprj files i could be cool for people that have a big library of photos to only scan know extentions for photo
INFO:ownphotos:Could not handle /data/Sons/f0590656_ZOOM0006/ZOOM0014/ZOOM0014_LR.WAV, because unable to call thumbnail
magickload: Magick: no decode delegate for this image format VIDEO' @ error/constitute.c/ReadImage/572 (null)   ������uINFO:ownphotos:Could not handle /data/Sons/f0590656_ZOOM0006/ZOOM0014/ZOOM0014.hprj, because unable to call thumbnail   VipsForeignLoad: "/data/Sons/f0590656_ZOOM0006/ZOOM0014/ZOOM0014.hprj" is not a known file format   ������nINFO:ownphotos:Could not handle /data/1ermai2/DCIM/100CANON/IMG_9235.CR2.xmp, because unable to call thumbnail   magickload: Magick: must specify image size /tmp/magick-nIUbLhhaQ_LZ1XFxZgEqr_Gv10uhGyID' @ error/mvg.c/ReadMVGImage/186 (null)
������nINFO:ownphotos:Could not handle /data/1ermai2/DCIM/100CANON/IMG_9189.CR2.xmp, because unable to call thumbnail
VipsForeignLoad: "/data/1ermai2/DCIM/100CANON/IMG_9189.CR2.xmp" is not a known file format

I think we  have to modify this part to make them seek only for videos extentions and photos extensions right ?
https://github.com/LibrePhotos/librephotos/blob/dev/api/directory_watcher.py#L30

We could do that, but we would have to list every file format, which we support, which is a long list, that needs to be maintained.
We currently just try to parse the files as images / videos and if that fails we skip it. That way it's more manageable. That's also the reason why we treat this event an info log and not an error.


fetch prices for selected stations

Thanks for this great integration!
Would it be possible to retrieve and display the price for one or two selected stations in home assistant?
I have a card for one brand (Total Energies) and two stations at about the same distance from my home. Their prices change often and sometimes show quite a nice difference...
Cheers,
Phil

for a very specific station, you could use the scrape sensor as I originally used myself before creating this custom integration: https://community.home-assistant.io/t/dutch-gas-priceses/59230/70?u=myt
I'm still considering some integration of this, but this will require some advanced options in the config flow to setup the integration, currently not my top priority

Hi, since R7.1.0 it will now be possible to select an individual gas station during setup of the entity. For now, only for gas stations in BE/FR/LU, over time I may also make it available for other countries NL/IT/DE.


Plex Playlists not loading Content - error [argument of type 'nonetype' is not iterable]

What version of Music Assistant has the issue?
2.1.0
What version of the Home Assistant Integration have you got installed?
2024.7.1.b0
Have you tried everything in the Troubleshooting FAQ and reviewed the Open and Closed Issues and Discussions to resolve this yourself?

[X] Yes

The problem
Most (not all) Plex playlists never produce any results and return the error 'argument of type 'NoneType' is not iterable'. Full debug Error text below.
2024-08-01 09:41:00.355 ERROR (MainThread) [music_assistant.webserver] Error handling message: CommandMessage(message_id=25, command='music/playlists/playlist_tracks', args={'item_id': '12', 'provider_instance_id_or_domain': 'library', 'force_refresh': False})
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/music_assistant/server/controllers/webserver.py", line 352, in _run_handler
result = [x async for x in result]
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/music_assistant/server/controllers/media/playlists.py", line 65, in tracks
tracks = await self._get_provider_playlist_tracks(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/music_assistant/server/controllers/media/playlists.py", line 353, in _get_provider_playlist_tracks
for item in await provider.get_playlist_tracks(item_id, page=page):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/music_assistant/server/providers/plex/init.py", line 895, in get_playlist_tracks
if track := await self._parse_track(plex_track):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/music_assistant/server/providers/plex/init.py", line 729, in _parse_track
track.album = self._get_item_mapping(
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/music_assistant/server/providers/plex/init.py", line 428, in _get_item_mapping
name, version = parse_title_and_version(name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/music_assistant/common/helpers/util.py", line 85, in parse_title_and_version
if splitter in title:
^^^^^^^^^^^^^^^^^
TypeError: argument of type 'NoneType' is not iterable
How to reproduce

Click 'Music Assistant' from Home Assistant's left navigation pane
Click 'Playlists' from the bottom Music Assistant panel
Select a Playlist

Music Providers
Plex
Player Providers
UPnP/DLNA Player provider
Full log output
d5369777_music_assistant_2024-08-03T20-06-44.724Z.log
Additional information
No response
What version of Home Assistant Core are your running
2024.7.4
What type of installation are you running?
Home Assistant Supervised
On what type of hardware are you running?
Linux

Please follow the template instructions and replace the pasted log excerpt with an attached full log.

@OzGav log file uploaded

Sorry but that is not the full log. You need to get it from the MA settings

@OzGav, apologies for that. Let's try that again. New (hopefully correct) logs uploaded

@aLTeReGo-SWI Looking at this again. Firstly you have attached the log with DEBUG enabled. We ask you do not do this unless requested. Can you update to the latest version of MA, get this error to occur and then attach the logs WITHOUT debug enabled.
I do note that you have just about every provider enabled. Do you actually use all of those? If not then you should remove the ones you don't use.

I can't reproduce this now on version 2.2.0 so either this is fixed in the series of bugfixes we did last releases or there is some trigger to indice the issue. Can you re-test once you upgraded to version 2.2.0 and let me know if this is still an issue ?

Updated to Music Assistant Server 2.2.2 using Music Assistant integration 2024.8.1
@OzGav the only provider(s) I have are shown in the screenshot below.

Video of issue attached
https://github.com/user-attachments/assets/4e2c4ba2-eb24-4784-9466-da3e7698bd02
Logs collected after errors shown in video
d5369777_music_assistant_2024-08-23T22-58-10.868Z.log
I believe the issue may be related to a simple timeout or reaching some maximum size. The errors only appear on large playlists (hundreds of songs). Smaller playlists with only tens of tracks load just fine without error. If you're unable to reproduce the issue, I'm happy to share my Plex server with you so you can troubleshoot further.

Not stale


Wish list

List of miscellaneous functionality to be implemented

[ ] Creation of RefCell only by objects of co-dimension 1
[ ] generate -> Grid
[ ] Address TODO's in the code
[ ] identify objects at boundary
[ ] Benchmarking
[ ] Documentation
[ ] Extract skeleton mesh
[ ] Extract boundary mesh


Add Tooltip Component

Create a tootlip component which has the following props:

label - For the text content
children
position - top | right | bottom | left

If you have any ideas on what else can be done, drop it here!

Hi!, I would like to take care of this issue :)

@ManuelMartinDev Sure! Just go through the Contribution guidelines in CONTRIBUTING.md
Keep me updated with your progress.
Also star the repository if you like it! Thank you 😄


[New game]: Clash Of Clans

🎮 Game Request
Clash of Clans is a mobile strategy game where players build and upgrade their village, train troops, and attack other players to earn resources. The game's logic involves managing resources (gold, elixir, and dark elixir), constructing and upgrading buildings, and planning offensive and defensive strategies. Players join clans to participate in clan wars, donate troops, and collaborate on strategies. The game requires both real-time and long-term planning to succeed in both base-building and combat.
Point down the features
Base Building: Construct and upgrade various buildings, including defensive structures, resource collectors, and army camps.
Resource Management: Gather and manage gold, elixir, and dark elixir to fund upgrades and train troops.
Troop Training and Battles: Train a variety of troops and spells to attack other players' bases for resources and trophies.
Clan System: Join or create clans to participate in clan wars, donate troops, and engage in clan games for additional rewards.
Regular Updates: The game receives frequent updates introducing new troops, buildings, events, and game modes.
Select program in which you are contributing
GSSoC24
Code of Conduct

[X] I follow CONTRIBUTING GUIDELINE of this project.

Hey @arunimaChintu !
Thank you for raising an issue 💗
You can self assign the issue by commenting /assign in comment 😀
Make sure you follow CODE OF CONDUCT and CONTRIBUTING GUIDELINES 🚀
Don’t Forget to ⭐ our GameZone🎮
Make sure you join our Discord🕹


binary:logitraw

what is the differents between reg:linear and binary:logitraw in xgboost?

what is the differents between reg:linear and binary:logitraw ?

It's not the same loss being optimized
https://github.com/dmlc/xgboost/blob/master/doc/parameter.md#learning-task-parameters


Last release on the release page from Jan 2016

Hi, I just wanted to ask whether the master branch is stable enough to use or do I have to wait for a release? I just came back to jsPsych after 2 years. Looks very impressive :)

We're getting close on releasing a stable version 6.0 (milestone progress here). The master branch is relatively stable, although I said that a few weeks ago and then we decided to overhaul almost all of the plugins. The code right now is passing all of the tests and should be good to use, but you may want to do an extra round of testing of the experiment just to be safe.


Adding Terraform module for a rancher server

I would like to add this Terraform module for a rancher server on Digitalocean.
Feedback is always welcome.

Thank you!


Dynamic number of connection ring for one node

Hi,
I try to custom a node, which would contain a + and - button and would add or remove a "connection ring".
I try something, the first connection ring appears, but not the following. And when I try to connect the first, I have an error.
First I show you my custom node.
https://zupimages.net/viewer.php?id=21/44/30yf.png
CustomNode :
import React, { memo, useState } from 'react';
import { Handle, Position } from 'react-flow-renderer';
import Checkbox from '@mui/material/Checkbox';
import ButtonGroup from '@mui/material/ButtonGroup/ButtonGroup';
import Button from '@mui/material/Button/Button';

const IncNode = memo(({ isConnectable, sourcePosition, targetPosition, data, ...props }: any) => {

    const [targetArray, setTargetArray] = useState<any>([])

    const add = (type: string) => {
        let tmp = type + (targetArray.length + 1)
        setTargetArray([...targetArray, tmp])
    }

    return (
        <>
            {targetArray && targetArray.map((id: string, key: any) => (
                <Handle
                    key={key}
                    type="target"
                    position={targetPosition ? targetPosition : Position.Left}
                    id={id}
                    style={{ background: '#555' }}
                    isConnectable={isConnectable}
                />
            ))}

                    <ButtonGroup
                        orientation="vertical"
                        aria-label="vertical outlined button group"
                        size="small"
                    >
                        <Button key="targetMore" onClick={() => add("T")}>+</Button>
                    </ButtonGroup>

{data.label}

        </>
    );
});

export default IncNode

I simplified the code by removing the icons, the less function, and the buttons on the right.
When I try to connect the first connection ring I have this error :
The above error occurred in the <ConnectionLine> component:
    at ConnectionLine

cjs.js:12 Uncaught TypeError: Cannot read properties of null (reading 'find')
    at ConnectionLine (cjs.js:12)

How can I increase my number of connection rings, and that they work when I want to connect them ?
Thank you in advance for your answers

Hey, if I have understood your point correctly with "connection ring" you mean the handles right?
If so, there's an example you can use. Basically, you need to create a function for your handles and pass in the number of handles you want and a value to calculate the spacing (that is up to you and you need to make sure they don't overlap) them a look at this from the examples:
import React, { memo, FC, useMemo, CSSProperties } from 'react';

import { Handle, Position, NodeProps } from 'react-flow-renderer';

const nodeStyles: CSSProperties = { padding: 10, border: '1px solid #ddd' };

const CustomNode: FC<NodeProps> = ({ data }) => {
  const handles = useMemo(
    () =>
      Array.from({ length: data.handleCount }, (x, i) => {
        const handleId = `handle-${i}`;
        return (
          <Handle
            key={handleId}
            type="source"
            position={Position.Right}
            id={handleId}
            style={{ top: 10 * i + data.handlePosition * 10 }}
          />
        );
      }),
    [data.handleCount, data.handlePosition]
  );

  return (

      <Handle type="target" position={Position.Left} />

output handle count: {data.handleCount}

      {handles}

  );
};

export default memo(CustomNode);

Finally your error, I've come across many of these so I can't remember the exact one but I would always recommend anyone dealing with connecting nodes check the following:

It has to be a source to a target or the opposite
the nodes need to have ID as I think these are the ones in the edge data
I you have multiple handles, you need to give them handle ID's as the snipper above ('id: string - you only need this when you have multiple source or target handles (otherwise the node id is used)' - https://reactflow.dev/docs/api/handle/)

Hey ! Thanks a lot for the answer !
After a few hours of code I almost got what I wanted.

I will explain how I did it, because I think there are several things that ReactFlow users may be interested in.
const IncNode = ({ isConnectable, sourcePosition, targetPosition, data, ...props }: any) => {
    const nodeRef: any = useRef();
    const [targetArray, setTargetArray] = useState<any>([])
    const [dimensions, setDimensions] = useState({ width: 20, height: 20 });

    useLayoutEffect(() => {
        if (nodeRef.current) {
            setDimensions({
                width: nodeRef.current.offsetWidth + dimensions.width,
                height: nodeRef.current.offsetHeight + dimensions.height
            });
        }
    }, []);

    const add = (type: string) => {
        if (type === "T" && targetArray.length < 4) {
            let tmp = (targetArray.length + 1)
            setTargetArray([...targetArray, tmp])
        }
    }

    const positionHandle = (index: number) => {
        if (index === 1 || index === 2) {
            return (dimensions.height / 3) * index
        } else if (index === 3) {
            return 0
        } else if (index === 4) {
            return dimensions.height
        }
    }

    const targetHandles = useMemo(
        () =>
            targetArray.map((x: any, i: number) => {
                const handleId = `target-handle-${i + 1}`;
                return (
                    <Handle
                        key={handleId}
                        type="target"
                        position={Position.Left}
                        id={handleId}
                        style={{ top: positionHandle(i + 1) }}
                    />
                );
            }),
        [targetArray]
    );

    return (

            {targetHandles}

                    <ButtonGroup
                        orientation="vertical"
                        aria-label="vertical outlined button group"
                        size="small"
                    >
                        <Button key="targetMore" onClick={() => add("T")}>+</Button>
                    </ButtonGroup>

{data.label}

    );
};

export default memo(IncNode);

First I create function for handle, like you said, but I don't have number of handle because I want it dynamically.
And I distinguished source & target by adding it in the ID
Handle Function
const targetHandles = useMemo(
        () =>
            targetArray.map((x: any, i: number) => {
                const handleId = `target-handle-${i + 1}`;
                return (
                    <Handle
                        key={handleId}
                        type="target"
                        position={Position.Left}
                        id={handleId}
                        style={{ top: positionHandle(i + 1) }}
                    />
                );
            }),
        [targetArray]
    );

But I had a problem with the placement of the handles, which was not very aesthetic.
So I recovered the size of my node thanks to a ref, to which I added the 20px of padding. Then I did a position assignment function.
Ref
    const nodeRef: any = useRef();
    const [dimensions, setDimensions] = useState({ width: 20, height: 20 });

    useLayoutEffect(() => {
        if (nodeRef.current) {
            setDimensions({
                width: nodeRef.current.offsetWidth + dimensions.width,
                height: nodeRef.current.offsetHeight + dimensions.height
            });
        }
    }, []);

......

Position Assignment Function.
 const positionHandle = (index: number) => {
        if (index === 1 || index === 2) {
            return (dimensions.height / 3) * index
        } else if (index === 3) {
            return 0
        } else if (index === 4) {
            return dimensions.height
        }
    }

.....

style={{ top: positionHandle(i + 1) }}

But when I try to connect my handles I always get the same error messages.
The above error occurred in the <ConnectionLine> component:
    at ConnectionLine

cjs.js:12 Uncaught TypeError: Cannot read properties of null (reading 'find')
    at ConnectionLine (cjs.js:12)

So if there is more explanation on how to fix this, I'm fine.
@mermicode, you said "It has to be a source to a target or the opposite"
I admit to being a little lost with this concept in the bookstore. Because for me the source corresponds to the entrance, therefore to the left or above. And the target corresponds to the place where the information will go, the output, so on the right or at the bottom. But in the ReactFlow examples it's the other way around.

@Ipicky22 good stuff mate, so basically what I meant and don't think I see in your code is that handles have types and this can be either source or target. By default you can only connect a source to a target (or target to source, but the direction will be the same) if you try to connect a source to a source or target to target from what I'm reading in your code that's not going to work. (unless there is something else going wrong. So I would expect to see in your code:
Source...
                    <Handle
                        key={handleId}
                        type="source" //This is the handle type
                        position={Position.Right} //Just changed this as it would be good to be in parallel with the target
                        id={handleId}
                        style={{ top: positionHandle(i + 1) }}
                    />

Target...
                    <Handle
                        key={handleId}
                        type="target"  //This is the handle type
                        position={Position.Left}
                        id={handleId}
                        style={{ top: positionHandle(i + 1) }}
                    />

If you then try to connect these two together you shouldn't be getting any errors (unless I'm missing something else)... Let me know if that helps out

Hey thanks for answer !
I managed to get what I wanted, for the custom node :

But impossible to connect it to another node or custom node.
@mermicode, compared to your answer, I have both, handles specified target and others specified source.
const targetHandles = useMemo(
        () =>
            targetArray.map((x: any, i: number) => {
                const handleId = `target-handle-${i + 1}`;
                return (
                    <Handle
                        key={handleId}
                        type="target"
                        position={Position.Left}
                        id={handleId}
                        style={{ top: positionHandle(i + 1) }}
                    />
                );
            }),
        [targetArray, positionHandle]
    );

    const sourceHandles = useMemo(
        () =>
            sourceArray.map((x: any, i: number) => {
                const handleId = `source-handle-${i + 1}`;
                return (
                    <Handle
                        key={handleId}
                        type="source"
                        position={Position.Right}
                        id={handleId}
                        style={{ top: positionHandle(i + 1) }}
                    />
                );
            }),
        [sourceArray, positionHandle]
    );

And I return :

            {targetHandles}

                    <ButtonGroup
                        orientation="vertical"
                        aria-label="vertical outlined button group"
                        size="small"
                    >
                        <Button key="targetMore" onClick={() => add("T")}>+</Button>
                        <Button key="targetLess" onClick={() => less("T")}>-</Button>
                    </ButtonGroup>

{data.label}

                    <ButtonGroup
                        orientation="vertical"
                        aria-label="vertical outlined button group"
                        size="small"
                    >
                        <Button key="sourceMore" onClick={() => add("S")}>+</Button>
                        <Button key="sourceLess" onClick={() => less("S")}>-</Button>
                    </ButtonGroup>

            {sourceHandles}

But I advanced in my quest for debugging, because I was able to find two behaviors that I know how to reproduce.
The first is when I click on a handle of my custom node, I get the error seen in previous posts.
For this problem I have absolutely no ideas
cjs.js:12 Uncaught TypeError: Cannot read properties of null (reading 'find')

The above error occurred in the <ConnectionLine> component: at ConnectionLine

The second behavior is when I try to link a node to my custom node, but starting from the handle of the standart node.
couldn't create edge for source handle id: source-handle-1; edge id: reactflow__edge-node_0source-handle-1-node_1null

I looked for and found several issues with this warning (https://github.com/wbkd/react-flow/issues/581, https://github.com/wbkd/react-flow/issues/1039, https://github.com/wbkd/react-flow/issues/749), I tried the proposed solutions but without success.
The strangest thing is that when I get my graph, the edge is present. But the targetHandle is null, which corresponds to the handle of the standart node.

If you have any ideas, I'm interested ^^

Hey @Ipicky22
whenever you update the handles programatically you need to use the useUpdateNodeInternals hook to inform ReactFlow about the changes you made https://reactflow.dev/docs/api/hooks/#useupdatenodeinternals

Hi @moklick !
Thanks for your response, it's awesome! She solves everything!
So I did :
const nodeId: string = props.id
...
useEffect(() => {
        updateNodeInternals(nodeId)
}, [sourceArray, targetArray])

Thank you for the documentation, although I looked for it in the issues, I had not found it.
But thanks to the word "updateNodeInternals" I found this issue (1038) which solves my problem as well ...
Thanks again, and keep it up, ReactFlow is awesome.

Adding dynamic handle from same component I am able to do. But I dont know how to add dynamic handle from other component.


package couldn't compile

when I added .Package(url: "https://github.com/vapor/mysql-provider.git", majorVersion: 1, minor: 0) and do vapor clean vapor Xcode -y, I still can't import VaporMySQL as my module. Also I kept on getting these 2 errors,

Header '/usr/local/include/mysql/mysql.h' not found

Could not build Objective-C module 'CMySQLMac'

I have also a running MySQL server running on my machine.

How did you install MySQL? Homebrew or an official installation?

@benjdum59 brew install MySQL.


restructure dockerfile/install.sh to better re-use the cache on rebuilds

Running the "update pieces of the OS and install prereqs" and "install the current level of my product" in the same command (install.sh in the dockerfile makes it painful to update to new levels of the product because there's not a layer than includes all the prereqs.
Splitting https://github.com/MediaBrowser/Emby.Build/blob/master/Docker/Dockerfile#L19 into different steps in the Dockerfile will help the layers work for you.

May , I ask why you are not using the build images themselves. PS, I will be restructuring the whole Dockerfile soon. I personally don't have any issue with using the cache and having multiple layers. Some people though within the Docker community hate and try and have the smallest layers possible.

May , I ask why you are not using the build images themselves. PS, I will be restructuring the whole Dockerfile soon. I personally don't have any issue with using the cache and having multiple layers. Some people though within the Docker community hate and try and have the smallest layers possible.

I generally don't trust docker images built by someone else, especially when the original layers are so old (phusion is pinned to a level from January).  I couldn't see what it was doing until I pulled the Dockerfile and then it turned out that I couldn't see what it was doing until I dug into install.sh.  It really hurts inspectability.
I've found easiest way to keep myself up to date is ripple changes from base images through their dependencies, so I'm probably going to have my personal version of this anyway.  I just thought I'd help with the inspectability and layer re-use for anyone else vetting the image.

May , I ask why you are not using the build images themselves.

Also, working on OpenShift and Kubernetes, I like to keep up with what people are trying to do with their Dockerfiles and images.

We will be restructuring the dockerfile soon.


F#1074 create json file type snapshot

Description
Currently, we only support CSV file type snapshot generating.
JSON file type snapshot generating feature is required.
Related Issue :
https://github.com/metatron-app/metatron-discovery/issues/1074
How Has This Been Tested?

Create snapshot with JSON format to local and hdfs storage.
Check if snapshot preview is displayed well.
Download generated snapshot file.(Currently it downloaded as csv file. It will be fixed soon.)

Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

[ ] My code follows the code style of this project. it will be added soon
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[ ] I have read the CONTRIBUTING document. it will be added soon
[ ] I have added tests to cover my changes.
[ ] All new and existing tests passed.

Additional Context

run build
deploy to 4


[New Checks] Directory Service

Context
Idea for important checks for AWS Directory Service.
Description
Proposed checks:

Check if exists log export to CloudWatch (Logging and Monitoring)
Check if exists event topics to send email or text messages when the status of your directory changes. (Logging and Monitoring)
Check expiration date and status of CA Certificates (the import process is manual and does not have the option of auto renewal)
Check Snapshot Limits (Default limit is 5)

and change prowler-additions-policy.json adding necessary rights for this new checks
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Awesome, thanks @lemelop we will give it a look and let you know soon if we have any comment or suggestion


Fixing global symbol replacement when referenced by non-load ops.

This cleans up the code used in FoldGlobalsPass/FuseGlobalsPass and extends it to support ops that reference globals as if they are loads.
Fixes #17825.

Pushing past busted mi300 bot.


Extract WaitProxy class for re-use

Problem:
We want to implement the wait proxy pattern on the projects that use this Composer package.
The current implementation for the Wait Proxy AsyncMink doesn't allow for easy use of the logic that is implemented there.
Fix:
Extract an abstract WaitProxy class from AsyncMink, and have AsyncMink extend it.
Also, rename AsyncMink to FlexibleContextWaitProxy to make it clear what the class does.

Forcing review because Scrutinizer's complaints are invalid. The classes it claims are present, and the methods it claims does not exist, do. It just doesn't understand @mixin.


Binary classifier causes special case bugs due to BinaryLabelizer

During classification when a Softmax layer is used (recommended), the output probabilities are not calculated correctly due to the BinaryLabelizer in sklearn which has special cases for binary classification problems.  In those cases, the output is mapped to 1D rather than 2D for more accurate probability estimation.
There's some code in predict_proba to handle this problem, but it needs to be fixed also in fit().

Close by SHA:49c1960699399db7cf91745382a0421292818620


clock.syncTime() returns undefined

clock.syncTime() just forces synchronization process and doesnt return anything: https://github.com/artem-russkikh/react-native-clock-sync/blob/master/index.js#L43
Also it calls automatically in interval every tickRate ms  here: https://github.com/artem-russkikh/react-native-clock-sync/blob/master/index.js#L29 when JS thread is active (not in background)


v1.0.0 Command Structure

since the inception of this project, we've used the chalda/DiscordBot layout for making commands, which is
exports.commands= [
  'xyz'
];
exports.xyz = {}

However there's limtiations on this implementation

we can't use numbers in declaration names for export objects
it does not encourage clean code.

so to improve this, we'll be doing a class-based approach instead of the export object approach we usually adopted.

class CommandName {
    constructor(description, usage, adminOnly) {
          description: 'nya',
          usage: '<ayn>',
          adminOnly: true;
          }
     async main() {
             await ctx.createMessage('noud is cute');
           }
}

exports.commands= CommandName;

this is usually cleaner and requires less code for subcommanding compared to the exports approach

class CommandName {
    constructor(description, usage, adminOnly) {
          description: 'nya',
          usage: '<ayn>',
          adminOnly: true;
          }
   async main() {
       await ctx.createMessage('noud is cute');
         }
   async delet() {
         this;
      }
}
exports.commands = CommandName;

CC @Ovyerus for your feedback
FYI for Karen maintainers, you don't need to implement this, feel free to use cogs and stuff or equivalent

Exactly what I was thinking.

For subcommands or commands that aren't part of the group (designated with static), we'll need to return some object so we know all the info about it.
New Proposal
const {Command, SubCommand} = require('./modules/CommandSystem'); // Or we can set `global.Command`/`global.SubCommand`.

class MyCommand {
    constructor(bot) {
        this.bot = bot; // Sets the Clara instance onto the command so we don't need to pass it to commands.
        this.description = 'The best command in the world!';
        this.owner = true;
        // ...
    }

    // Any methods called `init` will not be included in the command, and will instead be run on command setup.
    // This is equivalent to the current `exports.init = bot => {}`
    // Users can do any asynchronous setup they need in here.
    async init() {
        // ...
    }

    async subcommand() {
        return new SubCommand({
            description: 'The best subcommand in the world!',
            name: 'foo' // This is optional. By default, the name of the method will be used.
            owner: false // Will override the owner setting of the parent command if its set.
        }, async ctx => { // This is the actual function
            await ctx.createMessage('I am a banana!');
        });
    }

    static async separateCommand() {
        return new Command({
            // Some structure as SubCommand.
        }, async ctx => {
            // ...
        });
    }
}

module.exports = [MyCommand]

I was thinking of having commands extend Command, but I wouldn't know how to allow statics to be a new command, without having two separate classes ICommand and Command, although I may plan on doing this, we'll have to see.

@Ovyerus looks good to me, if you like, you can update the spec in example/1.x if you like that to be out final structure
One little note though, I prefer the the Command system require as a global instead to lessen LoCs


Create workflow for editions

Inserting a new, blank edition in MongoDb already works.
An edition has also a model file on the data file share.
Uploading models already works.
The next thing is that users can create a fresh, blank scene to an edition for that model.

We have changed our thinking on editions: there is one scene file, always called voyager.svx.json and there may be multiple gltf/glb files.

Done. See also #10


build all archs indicated in a file

Currently, there is a split between how build works and how publish works:

publish: build all archs indicated an a yaml file, unless overridden by --arch
build: build your local arch, unless overridden by --build-arch, which will only take the first arch

The problems are:

will only build one arch, which means no way to generate an index or multiple archs
no way to test multi-arch build without doing publish, which you may not want to do
build always ignores the arches in the yaml
inconsistent behaviour between the two
inconsistent flags

This changes the above to make it consistent:

same flag --arch
builds for all archs in yaml, unless explicitly overrides
supports building for multiple archs
supports the --arch host for "build local"

This is a change in the default behaviour, so it should be reviewed properly, but I do believe this is the right thing to do.
This does lead to a lot of duplication between build and publish. I think that, once this is in (assuming we agree to this), we should remove most of the logic from publish, have publish just call build, and then use the outputs to publish.

Some things to think about here:

change in default behaviour (local arch or override to single arch -> multiple archs)
should we include the sboms in the final tgz, which includes an index and the manifests and configs and layers? We could include them as individual files, or as sha256 files. We also could reference them in the manifests and/or index. I think these might be better as follow-on steps, but open to both.
the manifest.json is used by docker for docker load; what would we want it to point to?

related: https://github.com/chainguard-dev/apko/pull/484/files


Laravel 11.x Compatibility

This is an automated pull request from Shift to update your package code and dependencies to be compatible with Laravel 11.x.
Before merging, you need to:

Checkout the l11-compatibility branch
Review all comments for additional changes
Thoroughly test your package

If you do find an issue, please report it by commenting on this PR to help improve future automation.

:warning: The latest version of Laravel has a dependency for phpunit/phpunit of ^10.5. If you would like to also upgrade your tests, you may run the PHPUnit 10 Shift for free.

:warning: Shift detected GitHub Actions which run jobs using a version matrix. Shift attempted to update your configuration for Laravel 11. However, you should review these changes to ensure the desired combination of versions are built for your package.

:alembic: Using this package? If you would like to help test these changes or believe them to be compatible, you may update your project to reference this branch.
To do so, temporarily add Shift's fork to the repositories property of your composer.json:
{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/laravel-shift/laravel-aws-webhooks.git"
        }
    ]
}

Then update your dependency constraint to reference this branch:
{
    "require": {
        "renoki-co/laravel-aws-webhooks": "dev-l11-compatibility",
    }
}

Finally, run: composer update

@rennokki is this going to be merged and tagged for release?

Would be great to get this merged. Laravel 11 has been out for a few months.


[SPARK-32186][DOCS][PYTHON] Development - Setting PySpark with PyCharm

What changes were proposed in this pull request?
This PR proposes to document the way of setting PySpark with PyCharm.

Why are the changes needed?
To let users know how to setup PySpark with PyCharm.
Does this PR introduce any user-facing change?
Yes, it adds a new page in the documentation about setting PySpark.
How was this patch tested?
Manually built the doc.

Test build #128796 has started for PR 29781 at commit b5feb02.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/33419/
Test PASSed.

Nice, thanks @itholic. Can you also add a link to here at https://github.com/apache/spark/blob/master/python/docs/source/development/debugging.rst#remote-debugging-pycharm-professional ?

Test build #128796 has finished for PR 29781 at commit b5feb02.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/128796/
Test PASSed.

Test build #128816 has started for PR 29781 at commit 9c5a7df.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/33439/
Test PASSed.

Test build #128816 has finished for PR 29781 at commit 9c5a7df.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/128816/
Test PASSed.

The doc gen seems failing. Can you fix?

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/33466/
Test PASSed.

Test build #128843 has started for PR 29781 at commit c528e4e.

Test build #128843 has finished for PR 29781 at commit c528e4e.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/128843/
Test PASSed.

Looks good. I'll leave this open for some more days.

Test build #128884 has started for PR 29781 at commit ee355b0.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/33506/
Test PASSed.

Test build #128884 has finished for PR 29781 at commit ee355b0.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/128884/
Test PASSed.

@itholic, can you update the PR title and description?

Thanks for the comment, @HyukjinKwon . Done !

Merged to master.
Thanks @itholic and all!


chore: bump v0.4.0.post2

Motivation

FlashInfer v0.2.0 has some issues, but our version v0.4.0.post1 will install it by default.
WGMMA requires CUDA 12.3 or higher, set 12.4.1 as the default.
Recent fixes on the main branch can be included in this release version.

Modifications

Checklist

[ ] Format your code according to the Contributor Guide.
[ ] Add unit tests as outlined in the Contributor Guide.
[ ] Update documentation as needed, including docstrings or example tutorials.

@HuanzhiMao May you try the latest main


pull request for e2e test at 11/21/2016 07:56:06

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

optest/docs/updated_at.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Use Fastify's Request Validation instead of Implementation of its own

building schema using TypeBox
fastify validation

Depends on #40.


Google OAuth

Normal Login and sign up will be handled by the  view functions . Only  social media logins are handled by Django allauth .

@siddhantkhandelwal all the suggested changes have been made .

@Saujas requirements.txt has been updated now and it works in the venv .

Cool


Add zotero selector URL to BBT JSON export

The Zotero selector URL (zotero://…) doesn't seem to be in the BBT JSON export - would it be ok to add it?

:robot: this is your friendly neighborhood build bot announcing test build <IP_ADDRESS>35 ("validate lib against schema")
Install in Zotero by downloading test build <IP_ADDRESS>35, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".

Can you test 6435? I'm looking to cut a new release.

Perfect. Thank you!
I note that the select URL isn't included for the attachments, but that's not particularly useful as I'd only really want to open the actual file rather than jump to the attachment item in Zotero.

:robot: this is your friendly neighborhood build bot announcing test build <IP_ADDRESS>51 ("add select links to BBT JSON attachments")
Install in Zotero by downloading test build <IP_ADDRESS>51, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".

Just tried it - looks like it works great. Thank you!

Hi - could you please re-post the most recent test build, which has expired?  Thank you.

:robot: this is your friendly neighborhood build bot announcing test build <IP_ADDRESS>05 ("locator for scannable cite")
Install in Zotero by downloading test build <IP_ADDRESS>05, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".


Version 0.7.2 does not work with flutter version > 1.17

Refactoring occurs:
https://github.com/flutter/flutter/wiki/Changelog
logs:
ng.org/extended_image-0.7.2/lib/src/gesture/extended_image_slide_page_route.dart:333:9: Error: No named parameter with the name 'animation'.
        animation: animation,
        ^^^^^^^^^
../fvm/versions/master/packages/flutter/lib/src/cupertino/route.dart:435:3: Context: Found this candidate, but the arguments don't match.
  CupertinoFullscreenDialogTransition({

https://github.com/fluttercandies/extended_image/issues/160


Update lazycheck

Fixes #
Proposed Changes

removed "in" in search_regex
added check for "from * import *"

Screenshots

Checking


be more friendly about async "overspecified" errors; closes #2407

This is what I got for #2407.  It seems to work well, but I'm worried actually forcing async tests  to be async is going to break some tests out there--especially amongst those using --async-only.
Regardless of the above, I'm pretty sure what I've done here is "more correct."
I'm happy to pull that out, but the result is we cannot warn a user (or in fact do anything) about:
it('should blah', function (done) {
  return new Promise(function () {
    done();
  });
});

Yes, they returned a Promise, but it executes synchronously, so we can't inspect the return value of the test to even know it's a Promise.
cc @mochajs/core @elado @teckays @ScottFreeCode

cc @papandreou

Interesting edge case. First workaround that comes to mind would be waiting for test sync execution to finish before paying attention to any calls to done.

Awesome. This is very close to what I had in mind when I looked at #2407. Haven't played around with your implementation, but the tests look sane :)

I noticed that the stack traces here are useless.  Making them better.

And then I noticed:

there are a whole lot more edge cases I didn't originally consider
I've yet to determine a foolproof way of showing what the Promise was rejected with, what done(err) was called with, or both, and in what order.
I'm seeing a lot of potential improvements around throwing "internal" errors (timeouts, done() called twice, this stuff, etc).

This is becoming kind of a rabbit hole.  I'd rather do this the right way instead of half-assed.  I want to shelve this for now; better documentation around the issue could help.
Is anyone dying to get this in?

@scottfreecode mainly I'm concerned about adding a bunch of complexity around this. The idea was to help the user see they likely have a bug, or are otherwise misusing the API. The challenge is both covering all of the weird cases that exist (I can think of 7-8 offhand) and providing as much information as possible.
I'm not thrilled about forcing an "async" test to actually be async. On some level that makes a lot of sense. But IMO, it's too severe of a change for this issue. If we don't do it, we reduce the number of cases we can recognize and report to the user.
I can reduce this PR to cover the single case reported in #2407. That would be best course of action, since Mocha can't get too smart without significant changes to the runner.
Thoughts?

I'm not thrilled about forcing an "async" test to actually be async. On some level that makes a lot of sense.

To clarify, we're not talking about disallowing, say, a Promise API that's being tested from using Promise.resolve(), right? That's a legitimate optimization that shouldn't affect whatever's using (or testing) the returned promises. If I'm following correctly, the issue is that we don't know what the function has returned by the time done is called if done is called synchronously, which is a more narrow case.

If we don't do it, we reduce the number of cases we can recognize and report to the user.

Maybe if done is called synchronously during the test, wait to act on it till the test also returns, so we can check whether the return value was a promise?

I can reduce this PR to cover the single case reported in #2407. That would be best course of action, since Mocha can't get too smart without significant changes to the runner.

Sounds reasonable to me; I may be repeating myself, but while I don't have a strong opinion on whether using promises and done together should be disallowed (I can see where in some cases it's redundant and in other's it's a probable bug, but also cases where it would be the most straightforward way to express the intended test behavior), my main concern with #2407 is that I don't think the timeout error is helpful in a completed-by-promise test where adding the done call would be a nominally different error.

We are operating under the assertion that there is no valid use case for
doing both. Can you think of one?
On Mon, Aug 8, 2016 at 06:11 Scott Santucci<EMAIL_ADDRESS>wrote:

I'm not thrilled about forcing an "async" test to actually be async. On
some level that makes a lot of sense.
To clarify, we're not talking about disallowing, say, a Promise API that's
being tested from using Promise.resolve(), right? That's a legitimate
optimization that shouldn't affect whatever's using (or testing) the
returned promises. If I'm following correctly, the issue is that we don't
know what the function has returned by the time done is called if done is
called synchronously, which is a more narrow case.
If we don't do it, we reduce the number of cases we can recognize and
report to the user.
Maybe if done is called synchronously during the test, wait to act on it
till the test also returns, so we can check whether the return value was a
promise?
I can reduce this PR to cover the single case reported in #2407
https://github.com/mochajs/mocha/issues/2407. That would be best course
of action, since Mocha can't get too smart without significant changes to
the runner.
Sounds reasonable to me; I may be repeating myself, but while I don't have
a strong opinion on whether using promises and done together should be
disallowed (I can see where in some cases it's redundant and in other's
it's a probable bug, but also cases where it would be the most
straightforward way to express the intended test behavior), my main concern
with #2407 https://github.com/mochajs/mocha/issues/2407 is that I don't
think the timeout error is helpful in a completed-by-promise test where
adding the done call would be a nominally different error.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/mochajs/mocha/pull/2413#issuecomment-238230314, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AA4bMXvpQX1QXlpuRG-yujg5f55V6Cw8ks5qdyrkgaJpZM4JcYC9
.

--
Christopher Hiller
https://boneskull.com | https://github.com/boneskull

I thought there were some examples in the discussion surrounding the original issue. Not things where anyone had to use them together, just things where it might be marginally simpler to do so than to use promises alone. E.g. https://github.com/mochajs/mocha/issues/2407#issuecomment-237408877, https://github.com/mochajs/mocha/issues/2407#issuecomment-237448224 (I also have a vague recollection that it came up in Gitter at some point, but Gitter's not great for finding past conversation...)
I don't have a strong opinion on the value of such constructions, however; so I am fine either way when it comes to how extensive we want the current fix to be.
PR looks fine as far as I can tell at the moment, by the way, although I should really download it and try it out.

Those two comments are both hypothetical; I would like to see an actual test that needed to use both Promises (or async/await) and done.
cc @elado

@ScottFreeCode This is one of those changes that, while not strictly violating semver, would potentially cause complaints about tests which magically start failing upon a minor or patch upgrade.
The crux of it is here.
In master, when you supply done in Mocha, your test does not run asynchronously.
For emphasis, your test does not run asynchronously.
Instead, done gives your test the capability of running asynchronously (via a callback).
  The most likely problem would be timeouts.  In weird, synchronous tests which execute code after they call done(), this code would actually execute, potentially causing hard-to-trace exceptions.
Whether or not this is more correct or less correct than the current behavior is unclear (though I said it seemed "more correct" originally).  The "most correct" thing, if we wanted to force async, would be to run the test function in a process.nextTick() or setImmediate() wrapper.  But I don't know if we want to force async.  At the very least, we should be more clear in the docs about how this works.

Those two comments are both hypothetical; I would like to see an actual test that needed to use both Promises (or async/await) and done without a reasonable workaround.

@boneskull  My general use-case for using both is that there's no built-in ability to ensure that assertions are run.  The pattern embraced is to use --async-only forcing our devs to use done.  This way, our tests always have assertions immediately followed by done.  The new async-await pattern makes for some great code readability.
it('does not allow deleting', async function(done) {
  var response = {
    send: function(val) {
      val.should.equal(400);
      done();
    }
  };

  var request = await _getRequestObject();
  request.params.id = '123';
  route.del(request, response, function () {});
});

Without done, if route.del returns and never calls response.send the test would just silently pass.
P.S. I love the library and the work you're doing here.  I hope you guys are able to find a way to allow async-await with done without breaking changes elsewhere.  In the meantime, I'm fixing myself to Mocha 2.5.3 which supports using them together.  If it helps, I'm using mocha --compilers js:babel-register

@bitsoflogic At https://github.com/mochajs/mocha/pull/1320#issuecomment-242018472 I suggest checking for both Promise fulfillment and 'done' execution if both are 'requested'.

with v2.x the behavior is unexpected w/r/t Promise fulfillment, and at worst non-deterministic. Again, this is the main reason it was eliminated.
A compromise would be to, if a Promise is returned, to change the definition of done--if and only if it has not yet been called--to wait upon its call before continuing to the next test. Otherwise--when done was already called--wait for Promise fulfillment instead. If the Promise is rejected via exception or otherwise, or done() is called with an error parameter, they must cause each other to fail. So for the implementation, there must be only "one way out" of an async Runnable. Doable, but likely non-trivial.
The difference between this behavior and 2.x is that if you use both, the Promise fulfillment is effectively ignored. In this proposal, neither would be ignored.
Thoughts? Would this work for everyone?

Hmm, that sounds like the 'waiting for both' I'm suggesting. I'd add reporting whether the Error came from the Promise or from 'done'.

On 28 Sep 2016, at 19:35, Christopher Hiller<EMAIL_ADDRESS>wrote:
with v2.x the behavior is unexpected w/r/t Promise fulfillment, and at worst non-deterministic. Again, this is the main reason it was eliminated.
A compromise would be to, if a Promise is returned, to change the definition of done--if and only if it has not yet been called--to wait upon its call before continuing to the next test. Otherwise--when done was already called--wait for Promise fulfillment instead. If the Promise is rejected via exception or otherwise, or done() is called with an error parameter, they must cause each other to fail. So for the implementation, there must be only "one way out" of an async Runnable. Doable, but likely non-trivial.
The difference between this behavior and 2.x is that if you use both, the Promise fulfillment is effectively ignored. In this proposal, neither would be ignored.
Thoughts? Would this work for everyone?
—
You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

It sounds like you're both describing the same thing.  I'm fine with that solution, although I think this would be best if we keep both the non-Promise and Promise done behavior the same.  To elaborate, I've put together a few examples.
it('will work', function(done) {
  done();
  throw new Exception('oops');
});

// This was the original behavior
// Results in 1 passing, 1 failing test (even though there's only 1 test)

it('will work', async function(done) {
  done();
  // async promise throws...
});

// Results in 1 passing, 1 failing test (even though there's only 1 test)

or, keep them the same this way:
it('will work', function(done) {
  done();
  throw new Exception('oops');
});

// Results in 1 failing test

it('will work', async function(done) {
  done();
  // async promise throws...
});

// Results in 1 failing test

@bitsoflogic I'm not sure I quite understand your examples.  Can you be more explicit (where are Promises returned, or not returned, etc, and/or equivalent async/await usage)?
But anyway, it does sound like we're talking about the same thing.
I could implement this, but I'm not sure when that would happen.  So if someone wants to beat me to it, I'll create a new issue.

Sounds like a fun / cool thing to code.

On 28 Sep 2016, at 20:45, Christopher Hiller<EMAIL_ADDRESS>wrote:
Closed #2413.
—
You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@boneskull The way I ended up reading these threads was through https://github.com/mochajs/mocha/wiki/Spies
I thought the latter method (using done in EventEmitter callback) seemed very nifty, and got that perplexing error. Reason is my function is async and I do await-stuff in it; in other words, my test is multi-step async stuff, AND I'd like to resolve it by done-ing upon emitted event.
The way I'm going to do it now is to either just use the first suggested method (sinon.spy()) or stuff like https://www.npmjs.com/package/await-event. But that using done in an async function is out of question isn't trivial at all, mostly because async functions look so much like normal functions syntactically. Who even uses Promises anymore directly when you have async/await :coolface:


Fix broken link

[x] Have you followed the guidelines in our Contributing document?
[x] Have you checked to ensure there aren't other open Pull Requests for the same change?
[x] Have you added an explanation of what your changes do and why you'd like us to include them?
[ ] Have you written new tests for your changes? Here's an example.
[x] Have you successfully run brew tests with your changes locally?

The link to formula cookbook is linked to ruby doc, however, the cookbook isn't there. So I correct the link to the cookbook.
I didn't write a new test because my patch updates comment only, and I think that there is no need to write a test to test a comment

Thanks for your contribution to Homebrew!  You rock!


Extraction script doesn't work on os x [phab:T162]

Created by endobson at 2016-08-23 15:27:32:
The extraction script assumes that readlink supports -e but osx's readlink doesn't.
endobsonyggdrasil () ~/proj/kythe % ./kythe/extractors/bazel/extract.sh .
readlink: illegal option -- e
usage: readlink [-n] [file ...]

salguarnieri wrote at 2016-12-05 19:01:09:
A possible easy solution is to require (and use) greadlink on OS X.
In the meantime, a workaround might be to alias greadlink to readlink such that your shell picks that over the default readlink binary.


Added a common page for Mobile Threat Defense (MTD) - Android and iOS

@JohanFreelancer9 - kindly do the copy editor review for this PR. Thanks


Limit by request?

Is there any way to limit based on the Request? Specifically I'd like to set the name of the limiter based on a device ID of the request. I'm using Govee's API to turn lights on and off and the rate limits are device-specific. I tried just letting it react to 429s but that didn't work very well.

Lemme know what you think!

Hey @aarondfrancis!
So at this point in time - the Limit class is not request-aware, but I've already started looking to see if I can make it nice for the developer to define a custom name - maybe in the form of a closure like this? Let me know if you have any other ideas.
protected function resolveLimits(): array
{
    return [
        Limit::allow(10)->everyMinute()->name(function (PendingRequest $pendingRequest) {
             return $pendingRequest->getRequest()->getDeviceName();
        }),
    ];
}

I tried making a proof of concept but I haven't cracked it yet - in the meantime, while it's not the most seamless approach, you can achieve this by adding the HasRateLimits trait to your request too! Saloon will invoke both traits independently so you can have your limits on your connector, and your limits on your requests! 🤠
You could make your own trait that implements the resolveRateLimitStore method so you don't have to define it in both your connector and request.
class UpdateLightRequest extends Request
{
    use HasRateLimits;

    protected function resolveLimits(): array
    {
        return [
            Limit::allow(10)->everyMinute()->name('device-light-limit-' . $this->deviceId),
        ];
    }

    protected function resolveRateLimitStore(): RateLimitStore
    {
        $redis = new Redis;
        $redis->connect('<IP_ADDRESS>');

        return new RedisStore($redis);
    }
}

Let me know your thoughts.

Oh I had no idea you could add it to a request! That's definitely what I'll do. Thank you!


Add JuliaBox Python module to path in scripts, fix #261.

@tanmaykm, I have, as you suggested, added the path to the Python module manually in each script that runs on the host. I have not removed the env dependence in this PR as I am not familiar enough with the codebase to be sure I won't break anything.

Looks good. Thanks!


r_split needs exported functions

As @tammam1998  informed me, there is a bug when using --r_split flag in pash and calling functions.
Reproduce:
extract_text()
{
    :
}

extract_tex()
{
    :
}

test1()
{
    :
}

# this fails
echo 'test' |
extract_text
# this doesn't fail
echo 'test' |
extract_tex
# this doesn't fail
extract_text
# this doesn't fail
echo 'test1' |
test1

Adding export -f extract_text seems to solve the issue. However, I do not understand why the other function calls seem to pass.
Tested on deathstar and my local machine.

This is an issue with how r_split works, and it is low priority since exporting the functions does the trick.

This is not really a bug, so closing with wontfix.


Add Kanagawa Lotus

Kanagawa Lotus is the light variant of the Kanagawa theme set. Also renamed Kanagawa to Kanagawa Wave to make it more clear which variant is which.

Thank you!!


Add Elasticsearch

🚀 Feature
Is it planned to add elasticsearch as an Algolia alternative ?
It would make the product full featured for internal IT documentation!

You can actually use Algolia's DocSearch internally. See their docs.

@yacinehmito this is not full self hosted, just the crawler. API calls are still made to Algolia servers.

I'm going to mark this as duplicate of #776
We allow switching the SearchBar component easily in next major version. All that's left that needs to be done is creating a Search component in React that utilizes elasticsearch


How many led Can drive with E1.31

Hi. I try to use E1.31 and maximum led can drive is 400 pixels. Can much more drive led?

Hi. I try to use E1.31 and maximum led can drive is 400 pixels. Can much more drive led?

Sorry, I don't know answer for your question.
But...
Some months ago you asked:
https://github.com/vvip-68/GyverMatrixWiFi/issues/5
I met the same problem. I asked vvip-68 about it.
He gave me advice to install latest version of Arduino IDE and to update ESP8266 library to v. 2.5.2 and - no more errors.
You can find this here (in Russian, sorry):
https://github.com/vvip-68/GyverMatrixWiFi/issues/9

try to increase END_UNIVERSE  in definitions.h
(170 LEDs per DMX Universe)


filtering on ip availability for subnets

like so?
policies:
  - name: subnet-available-ips
    resource: subnet
    filters:
      - type: value
        value: 500
        key: AvailableIpAddressCount
        op: lte

@kapilt any additional information regarding this issue?


Feedback: Include agency name and program name in payload to server

This is to make it easier for BC211 to handle the change requests to their data
Acceptance Criteria

[x]  Include agency name in payload to server
[x]  Include program name in payload to server

How to do it

[x] Change selectFeedbackPostData() to pull the additional service attributes from the store and add them to the FeedbackPostData returned.
[x] It would be nice to give a bit more structure to FeedbackPostData, it really contains three kinds of information (the current structure implies two kinds of information), so add FeedbackPostServiceIdentification or something like that.

@rasmus-storjohann-PG I reviewed the code. So would the steps to QA be to create a new feedback request and observe the changes in Airtable?  A step to step would be highly appreciated.

Pass QA 1.43.0, agency name and program name both made it to airtable.


HEAD responses should be boolean aliases

As titled.
For example:
type DocumentExistsResponse = boolean

@Mpdreamz suggested top use a base class, as some languages will not return a plain boolean, but a structured object. The clients generators will need to detect this custom class and act accordingly.
class HeadResponseBase {
  exists: boolean
}

class DocumentExistsResponse extends HeadResponseBase {}

@Mpdreamz suggested top use a base class, as some languages will not return a plain boolean, but a structured object. The clients generators will need to detect this custom class and act accordingly.
class HeadResponseBase {
  exists: boolean
}

class DocumentExistsResponse extends HeadResponseBase {}

class HeadResponseBase extends ResponseBase {
  exists: boolean
}

class DocumentExistsResponse extends HeadResponseBase {}

class HeadResponseBase extends ResponseBase {
  exists: boolean
}

class DocumentExistsResponse extends HeadResponseBase {}


terraform config broken - Resource.AlreadyAssociated: the specified association for route table rtb-b85eb0c3 conflicts with an existing association

Is this a BUG REPORT or FEATURE REQUEST? (choose one):
BUG REPORT
Environment:

Cloud provider or hardware configuration:
AWS - us-west-2

OS (printf "$(uname -srm)\n$(cat /etc/os-release)\n"):
Linux 4.13.0-36-generic x86_64
NAME="Ubuntu"
VERSION="18.04 LTS (Bionic Beaver)"

**Version of Terraform:
Terraform v0.11.7

provider.aws v1.23.0
provider.null v1.0.0
provider.template v1.0.0

Kubespray version (commit) (git rev-parse --short HEAD):
1aee6ec3
terraform apply
...
Error: Error applying plan:

1 error(s) occurred:

* module.aws-vpc.aws_route_table_association.kubernetes-private[2]: 1 error(s) occurred:

* aws_route_table_association.kubernetes-private.2: Resource.AlreadyAssociated: the specified association for route table rtb-b85eb0c3 conflicts with an existing association
        status code: 400, request id: 41114887-0431-432a-8508-6d9983ba383d

BTW adding this was required to make terraform apply work:
variable "default_tags" {
  description = "Default tags for all resources"
  type = "map"
+  default = {
+    "Terraform" = "terraform"
+  }
}


Update Migration documentation - very old versions to 4.0.0

Description:
Update migration documentation - very old versions to 4.0.0

Closing this PR as PR [1] addresses the same issue.
[1] https://github.com/wso2/docs-apim/issues/3969


Add async to script tag

When the script tag is being used and placed in the HTML header, the player doesn't load quite right.  I see a pause button, but can't control any UI of the player.  When the tag is below the mux-player element, like in the footer, it loads correctly.  This is specifically with browser caching disabled between page loads, or when loading the player script for the first time.  Since it partially loads it might confuse a first-time user if they were trying to get a quick test or demo going.  Adding async to the script tag also solves the issue if the script tag is above or below the element, and is best practice.

This should be resolved by https://github.com/muxinc/media-chrome/pull/194 which will be in the beta.1 release for Mux Player


[release-2.6] ACM-5513: Update go to v1.20

Related Issue:  ACM-5513
Description of changes

Update go to v1.20

/lgtm


Don't sort on groupby (e.g. in skill() method)

groupby(..., sort=False) in skill() and similar methods

correct tests accordingly

Fix bug in weights when assigning from dict (caused wrong results in some cases)
Re-introduce to_dataframe() on Comparer
Syncronize to_dataframe() of Comparer and Timeseries such that they work in the same way (include aux also)
Docstrings for all to_dataframe() methods
Docstrings for several other methods
Renaming of internal variables (and variables in tests) to confirm to best practice and for consistency (e.g. sk for skill() )
New method sort_values() on SkillTable
xy set to nan for skill() of track data

Okay to merge @ecomodeller ?

Now added more tests. Okay to merge @ecomodeller ?

Good, and I changed the _to_long_dataframe a bit more.


Add a Frames option to the Timer node

Adds the option to have timers run with frames instead of time. Works with idle and physics options to choose either physics or normal process. They are used for frame-perfect timings such as in doom-like games or fighting games.
Supersedes https://github.com/Redot-Engine/redot-engine/pull/131
Quick edit: I think there are space/indent issues

Related PR: godotengine/godot#97725
Related proposal: godotengine/godot-proposals#10879


Accept roll commands from other bots

The question
Is allowing another bot to send roll commands to this bot would be something that you'd be willing to add/support?
Why I'm asking?
I was looking at updating my fork and noticed your "please don't make a personal instance anymore.  set up is just too much now" note.
This could also allow me not to maintain the fork anymore.
My use case
Using a custom version of your Genesys character sheet, I post chat commands to Discord and have a custom version of the dice roller to roll the dices. Moreover, it deletes the 1st bot command to keep the chat clean.
To enforce that it is not some random bot command, the bot only accepts the "!!" prefix for bots.
The only "breaking" change is that I combined the rolls into a single message to keep rolls more organized when multiple players are rolling at the same time. They sometimes ended up out of order; this fixed that.

set up is just too much now

Have you thought of deploying the bot in a Docker container?
I don't know what is "too much" but this could help you out (or others).
Implementation
I do have a working implementation that I could trim and PR down here (including a Dockerfile and deployment script).
Automatic deployment
If that is something that interests you, I built a Continuous Delivery pipeline using Azure DevOps to deploy updates automatically to AWS EC2 after a push is made on GitHub. And manual scripts to deploy into Microsoft Azure Container Service.
The CD pipeline deploys Docker images/containers.

I'm not interested in connecting the emporium and D1

I don't want you to connect emporium to anything; I am only asking if it could be possible that D1 could support other bots talking to it.

No that would cause all sorta of cross talk.

No that would cause all sorta of cross talk.

no, it does not have too;
I'm not talking about only removing the current check.

Something like this:
    const hasBotCommandPrefix = message.content.startsWith(
        functions.config.prefix + functions.config.prefix
    );
    //Ignore messages sent by the bot
    if (message.author.bot && !hasBotCommandPrefix) {
        return;
    }

    //Ignore messages that dont start with the command symbol
    if (!message.content.includes(functions.config.prefix)) return;

    if (message.author.bot && hasBotCommandPrefix) {
        message.content = message.content.substr(1);
        if(message.deletable){
            message.delete();
        }
    }


Wrong fixture def used when changing from non-generic to generic

A

new empty workspace
add fixture
select any non generic
change it to generic/generic dimmer
the name will change, but #of channels/manufacturer etc. will stay from the non-generic fixture.

Fix(tested):
Add
else
{
    m_fixtureDef = NULL;
}

after https://github.com/mcallegari/qlcplus/blob/master/ui/src/addfixture.cpp#L600
B

do the steps from A
edit the fixture (double click in fixture manager)
change back to non-generic
OK, exit the dialog
change to generic again
OK, exit the dialog
the non-generic definition stays there

Fix:
Check in https://github.com/mcallegari/qlcplus/blob/master/ui/src/addfixture.cpp#L595
that the referenced fixture's Manufacturer and Model match manu and model from selection,
and if not, reset them (untested).

Note: I didn't check how generic fixtures are released; this fix may leak memory.


Use additionally shift for translation and ctrl for rotation

This PR affects the function onMouseDown in the Editor.ts file: it adds in addition to the mouse controls the possibility of using the shift key for translation and the ctrl key for rotation (useful for using partdesigner in laptops with left click only). The modification is as follows:
 private onMouseDown(event: MouseEvent) {
	const {ctrlKey, shiftKey} = event;
	if(event.button === 0 && !ctrlKey && !shiftKey) {
		if (this.handles.onMouseDown(event)) {
			this.mouseMode = MouseMode.Left;
		}
	} else if(event.button === 1 || shiftKey) {
		this.mouseMode = MouseMode.Middle;
	} else if(event.button === 2 || ctrlKey) {
		this.mouseMode = MouseMode.Right;
	}
	event.preventDefault();
}

Merged in #5


Update console.md

This is my first ever contribution to open source! I apologize in advance if I am breaking protocol! I wanted to see if this file meets the open issue to make these pages look more like the website.  Please let me know if this is what you are looking for and I take a shot at the rest of the files in the doc folder.
Relative links were used in the update. Extra header row added since GitHub tables require it.

Thanks for giving this a try! I think this is meant to address issue #3.
The problem is a bit more complicated. The markdown files are used in two ways:

they can be visited directly on GitHub, which renders the Markdown as HTML
they can also be used by Jekyll to create the HTML pages of the main site

This PR fixes (1), but breaks (2).
The difficulty is that (2) requires Jekyll, because that's what GitHub Pages uses (the site at windowjs.org is really just a custom domain for GitHub Pages built out of the docs/ directory). See the documentation here:
https://windowjs.org/dev/documentation
https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/testing-your-github-pages-site-locally-with-jekyll
I didn't really know anything about GitHub Pages nor Jekyll when I built that, so it kinda works but unfortunately it doesn't render well on the main GitHub view. That's the main problem to be fixed: make the pages also render "ok" on GitHub (problem (1) above).
They don't look too bad, but it's not good either:
https://github.com/windowjs/windowjs/blob/main/docs/doc/console.md
The main issues are:

the Jekyll frontmatter appearing as tables on top
tables not rendering correctly
{% includes %} not working at all.

I don't really know what's the right way to fix these, so I've filed the issue and maybe someone with more experience with GitHub Pages could have a look into this.
The attempt at a fix is very appreciated. Please feel free to continue contributing to the project! Consider posting your plans in the issues or in the discussions so that you can get the background context and confirm that the approach might work.
If you'd like to improve the documentation:

there's issue #33 about rendering the HTML better on mobile devices. You'll have to serve the pages using Jekyll on your computer first, and then use the Chrome Devtools to see how they look on mobile. Jekyll will then update the pages automatically when you make changes. The Canvas API docs look really bad on my phone: https://windowjs.org/doc/canvas. The fix should involve editing only docs/style.css, but it's a bit of a mess :-)

I'm not a native English speaker and I bet the docs have a lot of funny grammar and phrases. I've tried to write them in a clear way, in mostly impersonal language the focuses on the tools and the APIs. I'd appreciate a lot if native speakers fix whatever they find that is off :-)

@hamish-milne just introduced Typescript types and we'd like to eventually generate the Markdown documentation out of those, to keep them in sync.

Thank you very much for the thorough and helpful response. And yes, this was meant for #3. I am sorry for being such a newbie!
After spending some time reading up on Jekyll and looking at other sites, this does appear to be a challenge above my abilities. I will try to help on #33.

I am respectfully withdrawing my pull request on issue #3 at this time.


Rename/Delete/Duplicate/Move the currently open file

It would be good to reopen this issue #1886

Yes having this natively would be amazing

Yes, I just tried to find a way to rename the currently open file/tab... this apparently doesn't exist at all, and when I renamed the file via the Finder (macOS) the tab got closed in vscode.

Agreed, surprised a move/rename feature isn't included by default. This is something that should be in core functionality via the command palette (or whatever VSCode calls it) accessible with Cmd+Shift+P.
This may be an extension already, but shouldn't have to be.

I think that this counts as core functionality. Shame that I had to search in Google and find out that I need an extension to have this.


Serialize a list of class objects with json

Hello,
I want to serialize a list which contains a class objects. How can I do that using json. For a list of regular types I understand, but when I try to use json j_list(listName), and the listName is a list of objects I receive some errors from to_json method and 'force_msvc_stacktrace'.
This is the code.
   std::list<Student>studentList;

// populate studentList with objects of Student class
string filename = "StudentList.json";
std::ofstream output(filename, std::ofstream::out);
json js_list(studentList);
output << js_list;
output.close();

What should I do to I make this work?
Thank you! :D

If you read the errors, it should tell you what you need to do.

Thank you! :D

@AncaMRG Do you need further assistance or can I close this issue?

You can close the issue. Thank you! :D
On Wednesday, 23 May 2018, 08:42:04 EEST, Niels Lohmann<EMAIL_ADDRESS>wrote:
@AncaMRG Do you need further assistance or can I close this issue?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.


Replace Bluebird with native promise

See the list of occurrences below.
I think we can start from the top and resolve them one by one.
For example P.resolve can be replaced with Promise.resolve.
But Promise.fromCallback requires refactor or keeping a util function.
I suggest to keep this module in require(./src/util/promise') to have promise utilities and even merge into it the utils from require('./src/util/promise_utils').
$ rg 'P\.\w+|new P\(' --only-matching --no-heading --no-line-number --no-filename | sort | uniq -c | sort -nr
 334 P.resolve
 101 P.fromCallback
  98 P.delay
  84 P.map
  75 P.fcall
  46 P.all
  41 P.ninvoke
  37 new P(
  34 P.join
  16 P.try
  15 P.defer
  11 P.nfcall
  10 P.reject
  10 P.each
   5 P.TimeoutError
   4 P.promisifyAll
   4 P.hijackQ
   3 P.config
   2 P.test
   2 P.prototype
   2 P.props
   2 P.promisify
   2 P.any
   1 P.then
   1 P.catch

👍
I think that in simple function like: https://github.com/noobaa/noobaa-core/blob/master/src/agent/agent.js#L222:L235
We can even eliminate the use of P.resolve like this:
    async start() {
        const dbg = this.dbg;
        this.is_started = true;
        this.rpc.set_disconnected_state(false);
      try {
       await this._init_node();
       await this._do_heartbeat();
      } catch (err) {
                dbg.error('server failed to start', err.stack || err);
                this.stop();
                throw err;
      }
    }

don't code review it, Just my 2 cents... 🙂

Sure, but I would actually start with a simple search replace of P.resolve( to Promise.resolve( because that case is at least trivial to replace without refactoring to async-await.

Changing P.resolve() to Promise.resolve() where there is .return() .timeout() .delay() and .spread() is not possible without refractoring.

@liranmauda can we close?

@guymguym I guess so.
Closing.


Zuul, Eureka in AWS ECS

Hi,
We have many microservices in our solution deployed to AWS and now we are trying to put an API Gateway with Netflix Zuul in front of them and a service registry with Netflix Eureka.
All microservices along with service registry and zuul proxy are deployed in ECS with EC2 launch type. We successfully registered our services and API gateway to the service registry in cloud environment but we when we send a request to an underlying microservice (report service for example) over the API
gateway, we get Zuul Forwarding Error.
We think that since we deploy our microservices to ECS, somehow our service registry cannot access to the other underlying microservices but could not resolve why.

So your services are registered with Eureka but cannot be connected to? Can you provide your config files and full error/response headers?

Hi @fdanismaz, have you addressed the issue?

I to got exact same issue. any help

Anyone managed to make this work on ECS? How did you register EUREKA and made it available to the services to register?

same issue , it works fine in localhost but doesnt work in ecs . Eureka is registration is ok for all the services , individual services are also working but zuul doesnt forward api reaquests

Try extending EurekaInstanceConfigBean and override getHostname. You can get the data center information by calling AmazonInfo dataCenterInfo = (AmazonInfo)this.getDataCenterInfo(). Based on the AmazonInfo object, you can decide to return route53 hostname, ip address, or machine hostname.
Hope this helps.

@fdanismaz this Config Bean in my understanding have to be into the Eureka project, right? do you have any idea of how to do the entire configuration or any resource for this?
@Shubhamr837 @carlosbpf @dvsingh9 @zhaojunjie163 did you found how to solve this? @fdanismaz did you?

hi.. is there a solution to this. I anyone has resolved this, appreciate some help in this regard


Set terraformls to also operate on tf files

Terraform files (e.g.: something.tf) are picked up by vim mas ft=tf.
This change makes sure those get highlighted.

I don't think this is correct, tf is something else and has nothing to do with Terraform. You need https://github.com/hashivim/vim-terraform or https://github.com/sheerun/vim-polyglot for Neovim to correctly set the filetype.

I'm not using vim-terraform (don't want any of the features it offers really), so vim picks these files up as tf.
Does this PR actually sound wrong though? The file extension is typically .tf, and the file format is hcl. It seems wrong that the LSP only works on a filetype=terraform, but not tf (the extension) nor hcl (the file format).

We literally use what's in filetype as a vim :help filetype, we're not matching on the extension.

The PR in its current form wrong for the same reason that using something like ft=python is wrong. ft=tf actually refers to TinyFugue. So your Vim thinks you're coding a TinyFugue file and not HCL/Terraform. Therefore starting terraform-ls is wrong. You wouldn't start python-language-server when editing a Ruby file.
Relying on the file extension can be tricky since as you've noticed, it's ambiguous. We can't make a blanket decision that all .tf files are Terraform files, because evidently, they're not. Even if it might be true most of the time.
Since the tf syntax file is of no use when editing Terraform files (probably even does more harm than good). You can solve it by setting the modeline, e.g. vi: ft=terraform. Alternatively create an autocmd, something like:
autocmd BufRead *.tf setlocal=terraform

Starting the server for ft=hcl has some merit though I guess. Especially if you happen to have a syntax file  forft=hcl (e.g. vim-hcl), but not for ft=terraform.

And since this plugin is meant to be easy to extend/configure. You can also override filetypes to suit your use-case:
lspconfig.terraformls.setup({
  filetypes = {"terraform", "tf"},
})

I was unaware of TinyFugue. Out-of-the-box, nvim pick up something.tf as ft=tf, hence my confusion (the highlighting seemed very odd, but somehow worked for me :sweat_smile: ).
I've updated the PR to set make terraformls run on hcl files too. This plays nicely with vim-hcl too.

BTW, thanks for all the clear feedback here!

I was unaware of TinyFugue.

You and me both 😉 Never heard of it until today. Last time I played MUD was like 20 years ago.

I've updated the PR to set make terraformls run on hcl files too.

Please update the PR title and description to reflect this.

I should perhaps add that I'm not actually a maintainer. So take what I say with a grain of salt 😛

Updated.

I should perhaps add that I'm not actually a maintainer.

No worries, your points are still valid.

I should perhaps add that I'm not actually a maintainer. So take what I say with a grain of salt 😛

@lithammer you're basically a maintainer in my view 😃

@lithammer (now it's not just in my view ;) )

@lithammer Was the consensus we should merge this? I have never used terraform

Hmm, it's not clear-cut since not all HCL files are Terraform files. But the downsides are few I guess. So I'm in favour of merging. We can always revert if we start receiving issues.


[AutoComplete] Drop list no close outline mouse

Tech
Version

Material-UI
v4.9.3

React
v16.12.0

Browser
Chrome

TypeScript

etc.

Hi, please, look at the gif with the problem

Please provide a full reproduction test case. This would help a lot 👷 .
A live example would be perfect. This codesandbox.io template may be a good starting point. Thank you!

I'm running into the same issue.
Force focus the input after click indicator will solve the problem.
--- a/packages/material-ui-lab/src/useAutocomplete/useAutocomplete.js
+++ b/packages/material-ui-lab/src/useAutocomplete/useAutocomplete.js
@@ -756,6 +756,7 @@ export default function useAutocomplete(props) {
     if (open) {
       handleClose(event);
     } else {
+      inputRef.current.focus();
       handleOpen(event);
     }
   };

I have the same problem shown in the GIF, but with multiple selection enabled. Does someone have a tip for a workaround?

@m-apsolon Do you have a reproduction?

@oliviertassinari no, unfortunately not yet, just stumbled on this thread via google. It's also difficult to reproduce on our implementation, because it's happening sporadically


chore: upgrade deprecated macos-12 builds to macos-latest

Observation
macos-12 runner is deprecated and has stopped working:

Changes
Bumped to macos-13 for x86_64 and restored aarch64 build on macos-14

Looks like the new images added python-3.13 and we fail to build for that. To support it, it looks like we need to upgrade pyo3 to 0.23+ but we're held back by serde-pyobject which requires pyo3-0.22. I have submitted a PR here: https://github.com/Jij-Inc/serde-pyobject/pull/13 and here's a fix for our repo: https://github.com/Eppo-exp/eppo-multiplatform/pull/79

Looks like the new images added python-3.13 and we fail to build for that. To support it, it looks like we need to upgrade pyo3 to 0.23+ but we're held back by serde-pyobject which requires pyo3-0.22. I have submitted a PR here: Jij-Inc/serde-pyobject#13 and here's a fix for our repo: #79

Rebase with your latest changes ✔
Run ls -l dist
total 13672
-rw-r--r--  1 runner  staff  2335283 Nov 27 [17](https://github.com/Eppo-exp/eppo-multiplatform/actions/runs/12054913678/job/33614056238?pr=77#step:5:18):01 eppo_server_sdk-4.1.1-cp311-cp311-macosx_10_12_x86_64.whl
-rw-r--r--  1 runner  staff  2329177 Nov 27 17:02 eppo_server_sdk-4.1.1-cp312-cp312-macosx_10_12_x86_64.whl
-rw-r--r--  1 runner  staff  2328976 Nov 27 17:03 eppo_server_sdk-4.1.1-cp313-cp313-macosx_10_12_x86_64.whl