add TypeScript definition file

Is the one from DefinetelyTyped, refering to version 1.0.3 a good starting point, or too much has changed?

Hi,
Yes it's good starting point, however there are several changes in v2.
This is my first (and incomplete) attempt https://github.com/gcanti/tcomb/blob/typescript/tcomb.d.ts.
I'm using Microsoft Visual Studio Code in order to check the results in terms of IDE hints.
The main problem I'm facing is how to convince tsc that the combinators return a type:
const Url = t.irreducible<string>('Url', () => true);

function f(url: Url) {} // error: Cannot find name 'Url'

I found a workaround giving a fake t member to Type<T> and then using a type query:
const Url = t.irreducible<string>('Url', () => true);

function f(url: typeof Url.t) {} // ok

not sure if is the most elegant and handy solution though
/cc @hansrwindhoff @DanielRosenwasser @jedmao

I think that's not too bad; if users find it cumbersome, they can always write
const Url = t.irreducible<string>('Url', () => true);
type Url = typeof Url.t;

function f(url: Url) {} // ok

Or even
type Url = string;
const Url = t.irreducible<Url>('Url', () => true);

function f(url: Url) {} // ok

@DanielRosenwasser Thanks for the heads up! Then I proceed with the other combinators...

Hi all.
Just pushed a first version to typescript branch https://github.com/gcanti/tcomb/tree/typescript
Files:

tcomb.d.ts
tcomb-tests.ts

I'd love to hear your feedback.
Cheers,
Giulio

Personally, I would prefer the whole library be converted into TypeScript so the definition files could be generated and always in sync, but that's just me.

Hey Giulio
I haven't completely looked at the typings yet, but in order for TypeScript to appropriately resolve the .d.ts file, you should either add a "typings" field to your package.json or rename tcomb.d.ts to index.d.ts
See our wiki page on the matter for more details.

One strange thing I've noticed is you have signatures like the following:
export function union<T>(types: Array<Type<any>>, name?: string): Union<T>;

Should any be T? Is it possible that you meant to write this?
export function union<T>(types: Array<Type<T>>, name?: string): Union<T>;

Additionally, I think Predicate should potentially be generic and defined as a type guard:
type Predicate<T> = (x: any) => x is T;

Let me know your thoughts on both of these.

Great advices, thanks a lot @DanielRosenwasser

:tada:

Thanks :+1:


install includes of the third party

Install the includes of the third party

solves https://github.com/Gepetto/biped-stabilizer/issues/9

I do not have the rights on this package so @nim65s could you check/merge/release this package?
I install the license of wykobi with the headers to be a bit consistent...


fix: certification to private on private timeline

Checklist:

[x] I have read freeCodeCamp's contribution guidelines.
[x] My pull request has a descriptive title (not a vague title like Update index.md)
[x] My pull request targets the main branch of freeCodeCamp.
[x] I have tested these changes either locally on my machine, or GitPod.

Closes #42621
Changes

Viewing a certification when showTimeline: false yields flash explaining this is not possible
Upon api-response with flash, redirect goes to last location

__
  Summary: :hammer_and_wrench: This code needs a fix

Opening this as is to close the issue. This at least brings the behaviour in line with the rest of the required settings.
After this, we can work on a better solution to navigate Campers based on where they previously were.

Edit: If Oliver dares to bring up the mixture of client+api changes in one PR, I will 👊 👋 🤝 🐟

I usually second you, but I will have his back this time. Bring it on.

Seriously, I think we need to figure out a way to do client+api changes/deployments properly as a priority.

Yeah - in an ideal world, we should be able. We could dynamically use feature flags that we can turn on from the backend.
The point of the "current way of doing things" in multiple PRs is to manage expectations correctly. The client and the API are two separate entities. They are no different than the apps being in two different repositories (which was the case a few years ago).
It's just easier logistically to know that an endpoint the client expects is deployed ahead of time, hence the current flow.
So, we could do dynamic feature flags; still, the client will not have access to the API endpoint it expects right away.
But one thing is set in stone though we are not going to marry the API and the Client together.

The simplest way to achieve this parity would be to test both (cilent+api) changes locally, then "comment" out parts of the client that can be uncommented in a subsequent deployment.

As I understand things, the best we can do in principle is three deployments (where I'm using deployment to mean "change something in production", that could be an environment variable or code, doesn't matter):

Expand api so that it can handle old and new requests
Switch client to make new requests
Contract api so that it can only handle new requests

I like @raisedadead's feature flag approach, though.  We could have a flag "MIGRATION_STAGE" that's either "api" or "client".  Then the logic would be
api:
if (MIGRATION_STAGE=='api') // expanded
if (MIGRATION_STAGE=='client') // expanded
else // contracted

client:
if (MIGRATION_STAGE=='api') // old requests
if (MIGRATION_STAGE=='client') // new requests
else // new requests

Then we can test all three stages by changing the variable.

I will fist_oncoming wave handshake fish

Hand me a fish?

Hand me a fish?

Send us your address.

For this PR, can we not deploy as is? All it will cause is maybe an early return from a request, or the current behaviour. There are no new endpoints, or removed endpoints.

I will fist_oncoming wave handshake fish

Hand me a fish?

I was threatening your fish.


Conform to Equatable

First of all thanks for sharing this, it came in handy!
I added this little bit because I needed .onChange(of:) to work with a sectioned list.
If you are still around feel free to add or even reject it if you have a better implementation or a different idea!
I had to make some adjustments to my code ( .onDelete  and a counter ) to make it work that I'm willing to share for examples if needed.
cheers :)

@igorcarrasco Thanks for the PR! I'll give this a closer look this weekend, but at first glance it looks like a really helpful feature to add. :)


Fix crash in Linux due to using iconbitmap to set the window icon

The function Tkinter.Tk.iconbitmap that sets the window icon doesn't work on Linux. It crashes with all the image formats I've tried except XBM, which runs on Linux, but doesn't set the icon and on Windows it looks bad because it's monochrome.
https://github.com/polynoman/Game-of-Life-Simulator/blob/508bc5697ec43e2044b1b8d23d5c2feb7fbeac2d/src/gui.py#L25

Traceback details
$ python game.py
Traceback (most recent call last):
  File "/tmp/Game-of-Life-Simulator/src/game.py", line 108, in <module>
    game = gameOfLife(gameMatrix)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/Game-of-Life-Simulator/src/game.py", line 31, in __init__
    self.setupGui()
  File "/tmp/Game-of-Life-Simulator/src/game.py", line 98, in setupGui
    self.app = gui.App(game=self)
               ^^^^^^^^^^^^^^^^^^
  File "/tmp/Game-of-Life-Simulator/src/gui.py", line 32, in __init__
    self.iconbitmap("../media/icon/gol_64.ico")
  File "/usr/lib/python3.11/tkinter/__init__.py", line 2136, in wm_iconbitmap
    return self.tk.call('wm', 'iconbitmap', self._w, bitmap)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_tkinter.TclError: bitmap "../media/icon/gol_64.ico" not defined

The issue is with the iconbitmap function. The image path is correct: os.path.isfile("../media/icon/gol_64.ico") returns True.
I suggest using the iconphoto method instead, which worked both on Windows and Linux. It can use the PNG image format and the other formats supported by Tkinter. It came up as a solution on Stackoverflow, etc.
I'll submit a PR with this particular fix, but feel free to close that PR if you'd don't want it / prefer another solution.

Hi alexpalade, thank you for your contribution. Very much appreciated!


LCFS - Implement Role-Based Access Control on FastAPI Endpoints using Custom Decorator

Describe the task
Implement role-based access control on FastAPI endpoints using a custom role_required decorator to validate user roles. This involves creating a decorator that checks a user's role against the required roles for an endpoint and applying this decorator to the relevant endpoints in our User management controller.
Purpose
To enhance the security and integrity of our system by ensuring that only users with appropriate roles can access specific functionalities, ensuring compliance with access control policies.
Acceptance Criteria

[ ] Develop the role_required decorator function to verify a user's role.
[ ] Apply the role_required decorator to existing endpoints in the User management controller, specifying required roles.
[ ] Test endpoints to ensure correct access control based on user roles.
[ ] Ensure proper error responses are returned when access is denied.
[ ] Update unit tests for new role-based access control functionality.
[ ] Document the implementation and usage of role_required in the codebase.

Additional context

Utilize the existing middleware that injects the user into the request for role validation in the role_required decorator.
Include the decorator in the codebase for use across different endpoints.

Decorator Example
from functools import wraps
from fastapi import HTTPException, Request

def role_required(*roles):
    def decorator(func):
        @wraps(func)
        async def wrapper(*args, **kwargs):
            request = None
            for arg in args:
                if isinstance(arg, Request):
                    request = arg
                    break

            if request is None:
                raise HTTPException(status_code=400, detail="Request object not found")

            user = request.user  # Assuming user is injected into request by middleware
            if user.role not in roles:
                raise HTTPException(status_code=403, detail="Insufficient permissions")

            return await func(*args, **kwargs)
        return wrapper
    return decorator

Usage Example
@router.get("/current", response_model=UserBase, status_code=status.HTTP_200_OK)
@role_required("Admin", "User")  # Example roles
async def get_current_user(request: Request, response: Response = None) -> UserBase:
    # Endpoint logic here

Hey team! Please add your planning poker estimate with Zenhub @AlexZorkin @hamed-valiollahi @jig-patel @kevin-hashimoto @prv-proton

Nothing for PO to test


fix(models): fix PolicyBreak model

Codecov Report

Merging #22 (a86ad0e) into master (e7d92f0) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #22   +/-   ##
=======================================
  Coverage   99.66%   99.66%
=======================================
  Files           4        4
  Lines         300      300
=======================================
  Hits          299      299
  Misses          1        1

Flag
Coverage Δ

unittests
99.66% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

pygitguardian/models.py
100.00% <ø> (ø)

Continue to review full report at Codecov.

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


How to solve Time Independent PDEs with u^n terms

Hi, I was experimenting a bit with MFEM and wondered how I can solve PDEs with nonlinear terms. For example
$$ \nabla^2 u + \nabla\cdot (\vec{\lambda} u^2)=0 $$
Where $\vec{\lambda}$ is a constant vector, let's say (0,-1,0). I tried to write this equation as an advection-diffusion equation defining $\vec{v}=\vec{\lambda}u$ resulting in
$$ \nabla^2 u + \nabla\cdot (\vec{v} u)=0 $$
Then, To assemble the bilinear form I created a coefficient in the following way
    ParBilinearForm a(&fespace);

    ConstantCoefficient k(1.);
    a.AddDomainIntegrator(new DiffusionIntegrator(k));

    Vector lmd = {0,-1};
    VectorConstantCoefficient F(lmd);
    GridFunctionCoefficient uu(&u);
    ScalarVectorProductCoefficient FF(uu,F);
    a.AddDomainIntegrator(new ConvectionIntegrator(FF,1.0));
    a.Assemble();

However, I found that when the solver iterates to find the solution, the ScalarVectorProductCoefficient doesn't update, and the solution kind of ignores the nonlinear term in the  ConvectionIntegrator and regards it as a normal one.
How can I update the ScalarVectorProductCoefficient during the solver iterations? What is a good way to solve this equation?
I attached the complete code below with a .txt extension so I can post it here.
Non-Linear-Convection.txt

Hi @cdelv,
To solve a nonlinear PDE, you must to setup a NonlinearForm by creating a NonlinearFormIntegrator, compute gradients, use a nonlinear solver, etc. You should go over example 10 to see the usual approach in MFEM.
Good luck,
Vladimir


how to set bosonnlp's .ibot.yml

would you like to  share a qucik demo?

if you use mac/linux , just create a file(~/.ibot.yml) , like this:
token: xxxxx

click  here to get the token

thanks a quick reply。
I need a quick evaluation on this project,so
rzai@rzai00:~/prj/ibot$ python3
Python 3.4.3 (default, Sep 14 2016, 12:36:27)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.

ibot 明天从南京到北京的车票
File "", line 1
ibot 明天从南京到北京的车票
^
how can i make it works?

@loveJasmine  just use pip3 to install ibot

rzai@rzai00:~/prj$ sudo pip3 install ibot
[sudo] password for rzai:
Requirement already satisfied (use --upgrade to upgrade): ibot in /usr/local/lib/python3.4/dist-packages
Requirement already satisfied (use --upgrade to upgrade): iquery in /usr/local/lib/python3.4/dist-packages (from ibot)
Requirement already satisfied (use --upgrade to upgrade): bosonnlp in /usr/local/lib/python3.4/dist-packages (from ibot)
Cleaning up...
rzai@rzai00:~/prj$
rzai@rzai00:~/prj$ cat ~/.ibot.yml
cat: /home/rzai/.ibot.yml: No such file or directory
rzai@rzai00:~/prj$ ibot 明天从南京到北京的车票
Traceback (most recent call last):
File "/usr/local/bin/ibot", line 11, in
load_entry_point('ibot==0.1.1', 'console_scripts', 'ibot')()
File "/usr/local/lib/python3.4/dist-packages/pkg_resources/init.py", line 567, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/local/lib/python3.4/dist-packages/pkg_resources/init.py", line 2612, in load_entry_point
return ep.load()
File "/usr/local/lib/python3.4/dist-packages/pkg_resources/init.py", line 2272, in load
return self.resolve()
File "/usr/local/lib/python3.4/dist-packages/pkg_resources/init.py", line 2278, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/usr/local/lib/python3.4/dist-packages/ibot/ibot.py", line 14, in
with open(os.path.join(home,".ibot.yml")) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/rzai/.ibot.yml'
rzai@rzai00:~/prj$
so, the root cause is I don't konw how to write my own ibot.yml

create the file(~/.ibot.yml) by yourself

what's the content of ibot.yml?


pagination-current-item Mixin // CSS inheritance

Currently the styling of current pagination's item is done directly on the leaf nodes (speaking with DOM structure in mind) of the item. Hence a flag $has-anchor needs to be set to true/false to style the correct element.
Wouldn't it be better to style the item itself ($has-anchor: false mode) and inherit these properties to the eventually available anchor or button? I know, inheritance is not the same as it is done at the moment, but it would be really simpler to use the pagination without thinking about "Does the element has an anchor or not".
Just my two cents...

Thanks Andi, We're reworking Pagination for Foundation 6 and took this into consideration. We're making it far less dependent on an a tag.


Tests exceeding playwright timeout and retrying are interrupted and RP launch runs forever

Hi,
Im using  "@reportportal/agent-js-playwright": "^5.1.4" and   "@playwright/test": "^1.41.1"
I experience the following behavior:
When i have a test that for instance seraches a locator and exceeds the playwright timeout while waiting, the 1 attempt obviusly failes like in here:

Then the test tries to perform a retry but the status is interrupted immidiatly, like in here:

And the whole launch is stuck on this test, even though the state is failed...

Hello @noacohen1 !
Do you see any errors in the console?
Could you please also share an example to help us reproduce the issue on our end?

Which console are you refering? those tests aren't running locally, they tun on a machine and in the machine logs the tests fails after a timeout and continue to the next test.
it's a long test that involves many files, i can paste here the main test function:

this is the part where the interrupted is thrown and the timeout exceeds:

Hi i still have this timeout issue, this time i have a test that waits for timeout (playwright method)

This test is stuck for 8 hours...

Hi @noacohen1 !
Thank you for additional details.
We have previously fixed several issues related to Playwright timeouts, but it seems that not all cases have been fixed yet.
Unfortunately, we don't have enough team capacity to dive into this issue at this time.
We would appreciate it if you could provide a small set of tests and configuration that we can run to reproduce the issue as soon as we have enough time.


Define K8s resource version compatibility for OSM and add checks to avoid panic

OSM has K8s informers for resources such as Deployments, Services, Ingress etc. OSM currently assumes the API version for these resources. Specifying a different API version for the resources during deployment will result in type assertion errors in OSM resulting in crashes.

@shashankram has this been resolved and can this be closed out?


No such image: hassioaddons/jupyterlablite-amd64:latest

Hello,
I'm unable to install it on my amd64 platform due to "No such image: hassioaddons/jupyterlablite-amd64:latest" -  Is there really no image for that platform available?
Thanks, Thomas

Yes, there is, please provide the full logs.

Here you go:
19-07-22 19:34:22 INFO (SyncWorker_5) [hassio.docker.interface] Update image hassioaddons/jupyterlablite-amd64:None to hassioaddons/jupyterlablite-amd64:0.3.0
19-07-22 19:34:22 INFO (SyncWorker_5) [hassio.docker.interface] Pull image hassioaddons/jupyterlablite-amd64 tag 0.3.0.
19-07-22 19:34:32 ERROR (SyncWorker_5) [hassio.docker.interface] Can't install hassioaddons/jupyterlablite-amd64:0.3.0 -> 404 Client Error: Not Found ("no such image: hassioaddons/jupyterlablite-amd64:0.3.0: No such image: hassioaddons/jupyterlablite-amd64:0.3.0").

That 404 usually indicates: Not enough disk space to download, unpack & install.
(Yeah, you won't expect a 404, but that is unfortunately how it is with Docker).

Ah Ok - That explains everything! Sorry for bothering and thanks a lot!


runtime: concurrent phase of GC causing full request stalls

Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version)?
Go 1.7
Also tried with: GO: fd296282e0a5058351954f1a7ea2dac5ef87f052
What operating system and processor architecture are you using (go env)?
GOARCH="amd64"
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"
What did you do?
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
Wrote a benchmark to showcase the issue using native net/http library:
https://gist.github.com/zviadm/18263037d4b9b624fc8a5b4cb7005bb4
What this benchmark does is, create a simple http server, and then create lots of connections to it and perform very simple requests to it from those connections/goroutines. This simulates having an http server and lots of clients where most of them are idle.
What did you expect to see?
When run using something like:
$: ulimit -Sn 500000
$: GODEBUG=gctrace=1 ./net_gctest -port=5002 -nroutines=30000 -sleep_t=3s -max_latency=30ms &> benchout.txt
Expect to see it doing 10k QPS, with no stalls or tail latencies.
What did you see instead?
Sample output: https://gist.github.com/zviadm/82e9b899833db9dc741f9a6400a09d6c
gc 25 @222.337s 0%: 0.34+165+1.3 ms clock, 11+477/1307/2896+43 ms cpu, 1411->1415->723 MB, 1447 MB goal, 32 P
gc 26 @237.844s 0%: 0.30+165+1.4 ms clock, 9.8+504/1306/3076+47 ms cpu, 1411->1415->723 MB, 1447 MB goal, 32 P
gc 27 @253.378s 0%: 0.30+162+1.2 ms clock, 9.4+485/1286/2993+39 ms cpu, 1411->1415->723 MB, 1447 MB goal, 32 P
even though, STW phase of GC is <2ms, we see lots of stalls of >30ms while concurrent phase of the GC runs. pretty much all requests stall during that time period.
This is a pretty serious issue because that basically means if you have lots of idle connections (or potentially just go routines?) in a server, it causes huge tail latency spikes. And in real programs GC frequency will be higher, it can happen once every 5-10 seconds and now these spikes easily show up in p95/p99 latency times.
Note that the cpu utilization is very low throughout the test. If we perform same test with much smaller number of go routines, say only 200 or 300, it can do 200k QPS without any STALLs on that same machine.

Maybe related to:
https://github.com/golang/go/issues/15847
https://github.com/golang/go/issues/16293
But it seems like issue remains with current 'master' too, so seems like something else

@zviadm Can you send an execution trace? There are several known issues around this, which we're working on for Go 1.8. From the trace we should be able to tell which one(s) are affecting you.
https://golang.org/pkg/runtime/trace/

I reproduced this using the given gist. Log output here.
Relevant bit of the trace:

I attached the full trace here. For me, the pause appears in the split 7/8 (18.884274879s-21.692853346s).

Thanks! It's clear from the trace that this is #16528. Closing as a duplicate.
@zviadm, if you subscribe to #16528, it would be great to get feedback on future fixes. You can also try CL 30031 from that issue, though based on my own tests that just shifts the pauses around (albeit to an easier-to-fix place, which is progress in some sense :)

Thanks for quick responses, I have subscribed to the other task. Will try to see what happens with that CL too, just as a data point.


Replace guava ThreadFactoryBuilder with micrometer NamedThreadFactory

Fixed #3086
Signed-off-by: Gao Hongtao<EMAIL_ADDRESS>

Thanks @hanahmily , looking forward to your next PR ;-)


v0.4.7

Current dependencies on/for this PR:

main

PR #434   👈

This comment was auto-generated by Graphite.


chore(release): v0.11.9 🎉

:robot: I have created a release beep boop
0.11.9 (2023-09-18)
Bug Fixes

types: import oidc identity provider from simple-oidc-auth (5d3fb54)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/whodisio/whodis-client/releases/tag/v0.11.9 :sunflower:


Fatal error: Uncaught Error: Class 'PhpMailer' not found

I just copy-pasted the whole project , what is the problem?
Fatal error: Uncaught Error: Class 'PhpMailer' not found in H:\xamp\htdocs\loginregister-master\classes\phpmailer\mail.php:3 Stack trace: #0 H:\xamp\htdocs\loginregister-master\includes\config.php(34): include() #1 H:\xamp\htdocs\loginregister-master\index.php(2): require('H:\\xamp\\htdocs\\...') #2 {main} thrown in H:\xamp\htdocs\loginregister-master\classes\phpmailer\mail.php on line 3

mail.php
<?php
use PHPMailer\PHPMailer\PHPMailer;
require 'phpmailer.php';
require 'exception.php';
require 'smtp.php';
class MAIL extends PhpMailer
{
...

this is strange I'm not able to replicate this on my mac. Thanks for posting your solution.

I've just ran this on locally using PHP 8.2 and it worked fine there.
I did want to override the port and added inside mail.php and added SITETITLE inside config.php define('SITETITLE','Demo');
public $Port = 2525;

can i post my whole code? i am using  PHP 7.4.33 it's not on a local server.  here is my code:
// Finally, register user if there are no errors in the form
if (count($errors) == 0) {
$password = md5($password_1);//encrypt the password before saving in the database
$query = "INSERT INTO accounts (firstname, lastname, pin, email, password)
		  VALUES('$firstname','$lastname','$pin', '$email', '$password')";
mysqli_query($db, $query);

 //send message if insert
 if(mysqli_query){

      require ('PHPMailer-master/src/PHPMailerAutoload.php');
      require ('PHPMailer-master/src/PHPMailer.php');
      require ('PHPMailer-master/src/Exception.php');
      require ('PHPMailer-master/src/SMTP.php');

   //try
                             $mail = new PHPMailer;
                             $mail->SMTPDebug = 0;
                             $mail->isSMTP();
                             $mail->Host       = 'smtp.zoho.com';
                             $mail->SMTPAuth   = true;
                             $mail->Username   = 'xxxx';
                             $mail->Password   = 'xxxxx';
                             $mail->SMTPSecure = 'ssl';
                             $mail->Port       = 465;

                            $mail->setFrom('xxxxx', 'MILNINJA');
                            $mail->addAddress($email);

                            $mail->isHTML(true);
                            $mail->Subject = 'email verification from MILNINJA';
                            $mail->Body    =    '
Thanks for registration';

                            if($mail->send()){

                                echo "Thank you for registering";
                            }else{

                                echo "Fail";
                            }

I'm think you're using the latest mailer in which case do as they suggest and place their code at the top of the file
<?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;

require 'path/to/PHPMailer/src/Exception.php';
require 'path/to/PHPMailer/src/PHPMailer.php';
require 'path/to/PHPMailer/src/SMTP.php';

also I strongly recommend upgrading to a supported version the 7 range is no longer maintained by the php team.
you should not be using md5 for passwords its too easy to break.

My whole code is like this, the goal is to send a message to the register once he register himself i tried on localhost it worked but in live server it giving me headache
SMTPDebug = 0;
                                 $mail->isSMTP();
                                 $mail->Host       = 'smtp.zoho.com';
                                 $mail->SMTPAuth   = true;
                                 $mail->Username   = 'xxx;
                                 $mail->Password   = 'xxxx';
                                 $mail->SMTPSecure = 'ssl';
                                 $mail->Port       = 465;

                                $mail->setFrom('xxx', 'MILNINJA');
                                $mail->addAddress($email);

                                $mail->isHTML(true);
                                $mail->Subject = 'email verification from MILNINJA';
                                $mail->Body    =    'Thanks for registration';

                                if($mail->send()){

                                    echo "Thank you for registering";
                                }else{

                                    echo "Fail";
                                }

     }else{

     }
     //done send message here

   	$_SESSION['email'] = $email;
  	$_SESSION['success'] = "Thank you for your registration ";
  	header('location: index.php');
  }
}

// ...

I've removed your credentials from your post never post your database credentials online, for future reference.
You can try this
<?php
session_start();
ob_start();

use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\Exception;

require ('PHPMailer/src/PHPMailerAutoload.php');
require ('PHPMailer/src/PHPMailer.php');
require ('PHPMailer/src/Exception.php');
require ('PHPMailer/src/SMTP.php');

// initializing variables
$firstname = "";
$lastname = "";
$pin = "";
$email    = "";
$errors = array();

// connect to the database
 $db = mysqli_connect('localhost', '***', '***', '***');

  // REGISTER USER
  if (isset($_POST['reg_user'])) {
  // receive all input values from the form
  $firstname = mysqli_real_escape_string($db, $_POST['firstname']);
  $lastname = mysqli_real_escape_string($db, $_POST['lastname']);
  $pin = mysqli_real_escape_string($db, $_POST['pin']);
  $email = mysqli_real_escape_string($db, $_POST['email']);
  $password_1 = mysqli_real_escape_string($db, $_POST['password_1']);
  $password_2 = mysqli_real_escape_string($db, $_POST['password_2']);

  // form validation: ensure that the form is correctly filled ...
  // by adding (array_push()) corresponding error unto $errors array
  if (empty($firstname)) { array_push($errors, "First name is required"); }
  if (empty($lastname)) { array_push($errors, "Last name is required"); }
  if (empty($pin)) { array_push($errors, "A PIN is required"); }
  if (empty($email)) { array_push($errors, "Email is required"); }
  if (empty($password_1)) { array_push($errors, "Password is required"); }
  if ($password_1 != $password_2) {
	array_push($errors, "*The two passwords do not match");
  }

  // first check the database to make sure
  // a user does not already exist with the same username and/or email
  $user_check_query = "SELECT * FROM accounts WHERE email='$email' LIMIT 1";
  $result = mysqli_query($db, $user_check_query);
  $user = mysqli_fetch_assoc($result);

  if ($user) { // if user exists
    if ($user['email'] === $email) {
      array_push($errors, "*email already exists");
    }
  }

  // Finally, register user if there are no errors in the form
  if (count($errors) == 0) {
  	$password = md5($password_1);//encrypt the password before saving in the database

  	$query = "INSERT INTO accounts (firstname, lastname, pin, email, password)
  			  VALUES('$firstname','$lastname','$pin', '$email', '$password')";
  	mysqli_query($db, $query);

    $mail = new PHPMailer;
    $mail->SMTPDebug = 0;
    $mail->isSMTP();
    $mail->Host       = 'smtp.zoho.com';
    $mail->SMTPAuth   = true;
    $mail->Username   = 'xxx';
    $mail->Password   = 'xxxx';
    $mail->SMTPSecure = 'ssl';
    $mail->Port       = 465;

    $mail->setFrom('xxx', 'MILNINJA');
    $mail->addAddress($email);

    $mail->isHTML(true);
    $mail->Subject = 'email verification from MILNINJA';
    $mail->Body    =    '
Thanks for registration';

    if($mail->send()){
        echo "Thank you for registering";
    } else{
        echo "Fail";
    }

   	$_SESSION['email'] = $email;
  	$_SESSION['success'] = "Thank you for your registration ";
  	header('location: index.php');
  }
}

It's hard to say what the issue is your code is very different to this repo.

thx you sorry i forget to remove the credentials

u saveddddddddddddddddddddddddddddddddd meeeee so thank you also i am new here if there's a club who challenge by giving project for fun that we can work together it would be helpful for improving myself i wanna be a part of it

you should not be using md5 for passwords its too easy to break.

how can i encrypt my pass ?

awesome! that's great.
Getting started is not easy, I've always got time for anyone trying to learn. I don't write core PHP anymore as I use a framework called Laravel. I highly recommend it.
Even through your learning I would still suggest to try and use it, it will have you a lot of time and headache. There's tons of videos/tutorials out there.
A great place to start is https://laracasts.com/series/laravel-8-from-scratch its free
once you've covered that I recommend looking over https://laraveldaily.com/roadmap-learning-path
You can always reach out to me on Twitter https://twitter.com/dcblogdev

thx you for being generous i am going to subscribe on laravel now

you should not be using md5 for passwords its too easy to break.

how can i encrypt my pass ?

Use the PHP function password_hash
password_hash($_POST['password'], PASSWORD_BCRYPT)

you should not be using md5 for passwords its too easy to break.

how can i encrypt my pass ?

Use the PHP function password_hash
password_hash($_POST['password'], PASSWORD_BCRYPT)

thank you for helping, by doing this i can't login, even if i got a class where all the data is initialised before inserting

never mind this can be result easily i have a question. i have the db which have the variables id, account_number, name, password ok and the id is already a primary key which is auto_increment now i have the account_number that i wanna have auto_increment it's possible but not recommended so i wanna know if there's a way when a client register his account_number is auto_generated


Added services' internal routes

Fixes #1867

This PR adds the Internal Routes to the epinio service show command. It will look for the Kubernates services matching the Helm release.

Codecov Report
Base: 51.36% // Head: 8.50% // Decreases project coverage by -42.86% :warning:

Coverage data is based on head (982faa7) compared to base (6f96ecc).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #1879       +/-   ##
==========================================
- Coverage   51.36%   8.50%   -42.87%
==========================================
  Files         179      90       -89
  Lines       14497    9647     -4850
==========================================
- Hits         7447     820     -6627
- Misses       6080    8772     +2692
+ Partials      970      55      -915

Flag
Coverage Δ

acceptance-api
?

acceptance-apps
?

acceptance-cli
?

unittests
8.50% <0.00%> (-0.01%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

 Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Update delete-an-inactive-mailbox.md

Updated document based on MC411428 - After 30 days any inactive mailbox which are in soft-deleted state are permanently deleted and are no longer recoverable.

Learn Build status updates of commit 288627a:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

microsoft-365/compliance/delete-an-inactive-mailbox.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the learn.microsoft.com contributor guidesPost your question in the Learn support channel

Learn Build status updates of commit ff67cf8:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

microsoft-365/compliance/delete-an-inactive-mailbox.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the learn.microsoft.com contributor guidesPost your question in the Learn support channel

Learn Build status updates of commit f250cd1:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

microsoft-365/compliance/delete-an-inactive-mailbox.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the learn.microsoft.com contributor guidesPost your question in the Learn support channel

@JuanGasca Yes, it does seem this was changed recently and not yet updated in the documentation.  Thank you for offering to update the docs - however, there's also a reference to the 183 days in the linked-to More info. So we don't introduce an inconsistency, please update this section as well.

Fixed with https://github.com/MicrosoftDocs/microsoft-365-docs/pull/10295 - closing


Added comment 'Maximum number of categorySet values supported per request is 10', and fixed links to search v1 swagger/API docs.

Data Plane API - Pull Request
NO CHANGES TO ANY API, ONLY THE USER DOCUMENTATION.
Added comment 'Maximum number of categorySet values supported per request is 10' (Task 26531499), and fixed links to search v1 swagger/API docs.
API Info: The Basics
Most of the information about your service should be captured in the issue that serves as your API Spec engagement record.

Link to API Spec engagement record issue:

Is this review for (select one):

[ ] a private preview
[ ] a public preview
[ ] GA release

Change Scope
This section will help us focus on the specific parts of your API that are new or have been modified. Please share a link to the design document for the new APIs, a link to the previous API Spec document (if applicable), and the root paths that have been updated.

Design Document:
Previous API Spec Doc:
Updated paths:

Viewing API changes
For convenient view of the API changes made by this PR, refer to the URLs provided in the table
in the Generated ApiView comment added to this PR. You can use ApiView to show API versions diff.
Suppressing failures
If one or multiple validation error/warning suppression(s) is detected in your PR, please follow the
Swagger-Suppression-Process
to get approval.
❔Got questions? Need additional info?? We are here to help!

 Contact us!
The Azure API Review Board is dedicated to helping you create amazing APIs. You can read about our mission and learn more about our process on our wiki.

💬 Teams Channel
💌 email

Click here for links to tools, specs, guidelines & other good stuff
Tooling

Open API validation tools were run on this PR. Go here to see how to fix errors
Spectral Linting
Open API Hub

Guidelines & Specifications

Azure REST API Guidelines
OpenAPI Style Guidelines
Azure Breaking Change Policy

Helpful Links

Azure DevTools Wiki

Checks stuck in `queued` state?
If the PR CI checks appear to be stuck in `queued` state, please add a comment with contents `/azp run`.
This should result in a new comment denoting a `PR validation pipeline` has started and the checks should be updated after few minutes.

@tjprescott I don't understand this error, these words are already in cSpell.json:


IO - 16-Bit I2C

Update II2C and HardwareI2C to support writing data to 16-bit registers on I2C devices
(Required to implement Time of Flight sensor)

[x] Add overloaded II2C::writeByteToRegister() to support uint16_t register argument
[x] Add overloaded HardwareI2C::writeByteToRegister() to support uint16_t register argument
[x] Implement private writeByteToDevice() function for writing to register of 16 or 8 bits in length
[x] Update surrounding I2C code (dummy_i2c.hpp\.cpp, i2c_commands.hpp\.cpp)
[ ] Test code for support with 8-bit register requests (ie, all currently implemented I2C sensors)
[ ] Test code for support with 16-bit register requests (ie, Time of Flight sensors)

In HardwareI2c::setSensorAddress(), should this:
  sensor_address_ = device_address;
  const int return_value = ioctl(file_descriptor_, I2C_SLAVE, device_address);
  if (return_value < 0) {
    logger_.log(core::LogLevel::kFatal, "Failed to set sensor address");
    return;
  }

Not be this:
  const int return_value = ioctl(file_descriptor_, I2C_SLAVE, device_address);
  if (return_value < 0) {
    logger_.log(core::LogLevel::kFatal, "Failed to set sensor address");
    return;
  }
  sensor_address_ = device_address;

Ie, the value of sensor_address_ is only updated to be device_address if ioctl() returns no errors


chore(dependencies): Update dependency eslint-plugin-jsdoc to v48.2.0

This PR contains the following updates:

Package
Type
Update
Change

eslint-plugin-jsdoc
devDependencies
minor
48.1.0 -> 48.2.0

Release Notes

gajus/eslint-plugin-jsdoc
v48.2.0
Compare Source
Features

check-param-names: Add disableMissingParamChecks option (#1206) (ba642e4)

Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.

[ ] If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


upgraders (upgrade functions) on versions don't work with dexie cloud

Having an upgrader attached to a version in dexie declaration prohibits the system from working.
This is based on customer reports only so far, and no repro is yet created.

Updated docs in https://dexie.org/cloud/docs/best-practices about avoiding upgrade(), navigatging users in how migrations can be avoided.

Sorry to comment on a closed issue but this issue ranks highly on Google for "dexie cloud version upgrade" so seems like the best place to enquire:
Is it feasible to support upgraders for synced tables in a future version of Dexie? It would be a massive improvement to the developer experience in my opinion. I find the suggested options in the best practice docs very limiting in comparison to the convenience of upgraders which seems obsolete for most use cases except those which are completely offline.
If it's not feasible, could you provide a simple explanation as to why just so I understand the limitations?
Many thanks and really appreciate the work on this lib and the cloud addon, it's made my app development so much more frictionless 🙏


[FEATURE] Ability to check ONLY test dependencies

Is your feature request related to a problem? Please describe.
I haven't found a way to use this for a project that contains only test sources (since all sources are in src/test, all classes are put into \target\test-classes). (My use case is a test automation framework used in a multi-module environment).
Right now, I get the error <project_dir>\target\classes does not exist after [INFO] Starting DepClean dependency analysis.
Describe the solution you'd like
A feature flag/parameter similar to <ignoreTests> (e.g. <ignoreSources> or <checkTestsOnly>) that will either skip all checks for target\classes, but will check other source folders, OR will check only target\test-classes.
Describe alternatives you've considered
Configuring Maven build section like described here using <src.dir>src/test/java</src.dir> can be used as workaround.

Ran latest depclean (2.0.3) as you suggested, the issue no longer persists, thank you!


Header expands to fill entire panel

🔍 Is there already an issue for your problem?

[X] I have checked older issues, open and closed

📝 Description
I recently updated from a build that was about six months old, to version 5.6.0 and noticed when there are just a few notifications, there is a header with the text api.github.com that expands to fill all remaining space pushing the notifications down to the bottom of the panel (see screenshot).
If I have more notifications open the header area takes up less space and will expand each time I mark a notification as read.
🪜 Steps To Reproduce

Have a couple notifications, but not enough to fill the panel
Open Gitify, notice that the header is taking up most of the space.

Gitify Version
5.6.0
Operating System
macOS
GitHub Account
GitHub.com
📸 Screenshots

No, just one account. That made me think to uncheck Show account hostname in settings, which seems to have fixed it for me. Thank you!

No, just one account. That made me think to uncheck Show account hostname in settings, which seems to have fixed it for me. Thank you!

Great to hear.
We're further reworking the Accounts module in the upcoming release. I hadn't noticed this UI issue myself, but will keep an eye out for it.


linux.seccomp not supported

From @jodh-intel on August 30, 2016 16:48
See: https://github.com/opencontainers/runtime-spec/blob/master/config-linux.md#seccomp
Copied from original issue: 01org/cc-oci-runtime#193

From @dlespiau on September 9, 2016 9:46
An addition to the 2 point: Syscall numbers are hard hard ABI, a bigger source of mismatch would be different architectures int the host/vm ie x86_64 vs x32 ABIs.
But I think these problems come from trying to solve the issue from the host side: what about forwarding the unresolved seccomp rules to the agent inside the VM?

From @jodh-intel on September 9, 2016 8:55
The seccomp rules specified by config.json refer to the host kernel.
But since the workload is running under a different kernel, there are some interesting scenarios to consider:

What if the guest kernel has no knowledge of a particular syscall specified in config.json?
This implies the guest kernel is older than the host kernel (which further implies that clear-containers.img has  not been updated for a long time).
The default stance should be to disallow running the workload.

What if a syscall number ever changed value?
If the guest kernel version (using the old syscall value) running the workload was again older than the host kernel version (using the updated syscall number), the guest would be unable to know whether the seccomp rules could be applied.
It would be up to the runtime (somehow) to determine this and take appropriate action.

From @grahamwhaley on September 9, 2016 9:54
I was going to note - I don't think the syscall numbers will change in a single architecture - as @dlespiau says, it is a hard well defined ABI, and the kernel is extremely careful to not change it in any way that might break - old deprecated syscall numbers are not re-used for instance.
We will never run a different (non-IA) arch in the client, and I suspect we will never actually run an x32/32-bit client either (fingers crossed). That is something we could potentially investigate in the top 100 docker images - are there any 32bit clients (I can concede that 32bit may be used as a space/size saving etc.).
The other case I can think of is if a syscall is deprecated in our client image kernel, but still used in the client code and host kernel. I think this is a corner case which we can likely ignore at the moment, and syscalls are not instantly deprecated, they are slowly weened out over time with warnings being emitted from the kernel afaik. I think this is a low risk/likelyhood case.


No support custom status code in responses

There should be a way to configure custom (not 200) status code in response like in flask-restplus:
from flask_restplus import Namespace
ns = Namespace('Wallet')
...
@ns.response(201, 'Wallet created')
...
@ns.response(404, 'Wallet not found')
something like:
@doc.response(404, 'Wallet not found')

Hi, I've just submitted a PR for my implementation of this;
def response(code, description=None, examples=None):

fixed in #58


Add a way to see which strategy is in use?

I've been trying to debug my tests and wanted to see which strategy was in use. Turns out I was under the mistaken belief that I was using transaction for everything but the integration specs, and truncation for those. At any rate, in order to debug, I needed to do this:
DatabaseCleaner.instance_variable_get(:@cleaners)[[:active_record, {}]].instance_variable_get(:@strategy).class

It would be nice to have something like:
DatabaseCleaner.strategy

In v1.3.0 that i'm using, it's possible to do
DatabaseCleaner[:active_record].strategy.class

for debugging pursposes.
Which version of database_cleaner are you using? Are you still facing the issue?

I haven't used this in a while, but it sounds like the issue can be closed now.


using destinationFolder throws in non-typescript projects

I think the problem is on the validation of the config value, strapi.dirs.dist.root in javascript projects will be the same as strapi.dirs.app.root since javascript-based projects do not have a '/dist' folder, or at least that's what I'm assuming because no matter what valid value I'd give to destinationFolder, it will always give me this error:
Error: schemas-to-ts ⚠  The given destinationFolder is inside the Strapi dist ...

modifying the src code a bit to log strapi.dirs inside dist/register.js and we get this:
{
  dist: {
    root: 'C:\\Users\\User\\Desktop\\projects\\my-project',
    // ...
  },
  app: {
    root: 'C:\\Users\\User\\Desktop\\projects\\my-project',
    // ...
  }
}

My current solution right now is to alter the value of strapi.dirs.dist.root inside the src code by adding a '//dist' string at the end.

It would be great to fix it ASAP :)

Okay, it's quite easy to update JS project with TS changes.
https://docs.strapi.io/dev-docs/typescript#add-typescript-support-to-an-existing-strapi-project
Now everything works as a charm


add BIOS and IPMI firmware version to node properties

Collects IPMI/iDRAC and BIOS versions for Genesis as well.
MegaRaid FW / Device info also needs to be collected, PR for that should follow tomorrow.
Relates to https://github.com/Shopify/datastores/issues/1987

Looks pretty good to me, really glad you added tests too :heart:
@dwradcliffe as I understand it, genesis should just ignore any data it doesn't know how to parse, right?

genesis should just ignore any data it doesn't know how to parse, right?

correct

Oh but it does know how to handle properties. So these will all be saved.

oh sweet, so then it'll actually display them already!
On Wed, Apr 19, 2017 at 12:21 PM, David Radcliffe<EMAIL_ADDRESS>wrote:

Oh but it does know how to handle properties. So these will all be saved.
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
https://github.com/Shopify/genesis_collector/pull/37#issuecomment-295330749,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAlwd8DbsXRJpkxUkE8V6A9wI4WWBO6Mks5rxjSQgaJpZM4NB5-W
.

I consider reasonable tests non-optional ;) If you're happy with it, please mark reviewed and merge already :)
Stuff shall show up under properties, then.

MegaCli is a different beast, it will need separate viewing and bit more intricate parsing - nothing that can't be solved in an hour, but .. they've basically got interesting stuff like "a running FirmWare version" and "an uploaded and ready to go firmware version", which show up the same - just in separate sections of the non-computerparsable output. boo.
while I'm at it, I'd also add dumping the info of the Logical Drives (RAID level, status), which seem to have caused irritation in some places already (backupservers ...), so I figure a separate PR is warranted.

yeah let's keep those PRs separate.
good stuff @berlincount

Brrr. https://shipit.shopify.io/shopify/genesis_collector/rubygems has a lot of undeployed commits.
@dturn @dwradcliffe @dalehamel are you comfortable with me pulling the trigger here?

The shipit deploy doesn't work, we've just been publishing the gem manually. Feel free to try to fix it or we can just publish.

Ah. Oh. Hm. Please publish :)

deploys work again, the git cache was fscked up