Discussion: Formalizing approach to storing date and time values

Current Situation
AllReady stores campaign/event/task dates as the .NET DateTimeOffset type

DateTimeOffset is a .NET Framework type that represents a particular point in time relative to UTC. It is a Date and Time with an Offset relative to UTC.  (https://msdn.microsoft.com/en-us/library/system.datetimeoffset.aspx)
Each Campaign has a Windows/.NET TimeZoneID specifying the timezone where the campaign is located. For example, a campaign in Seattle would have the TimeZoneID = "Pacific Standard Time"
A Campaign / Event / Task start and end date / time is stored as a DateTimeOffset with the offset set to the UTC offset according to the TimeZoneID of the campaign.
For example, consider the following campaign located in Seattle

Event
Start Date Time with Offset
End Date Time with Offset

Event 1
10/23/2016 5:00 PM -7:00
10/23/2016 8:00 PM -7:00

Event 2
12/20/2016 5:00 PM -8:00
12/20/2016 8:00 PM -8:00

Note the offset is different depending of whether or not the date and time falls during daylight savings time for the Seattle area. AllReady calculates this offset whenever date/time values are saved by calling TimeZoneInfo.GetUtcOffset for date/time that was specified by the user.
//TODO: Add example here of how and why the offset if adjusted when values are saved

Potential Risks
Thank you to Jon Skeet for pointing out the following potential problems

Since the offset for a particular DateTimeOffset is calculated and stored when a user creates (or modifies) a Campaign / Event / Task, there is the potential that changes to time zone rules could cause problems. As an example, if an event were scheduled several months in advance and changes to the daylight savings time rules for that timezone changed after the event was created, the offset for that event might not be stored correctly.
AllReady uses Windows timezones which are updated via regular Windows Updates. These updates happen regularly but updates are typically not as timely as the IANA timezone database which is used by the Noda Time framework
Both these issues could be resolved if we used the Noda time framework, stored values as local date time values and did time zone conversions on every read. // TODO: Add example if we decide this is the path forward
Noda Time framework currently does not support .NET Core. Version 2.0 of Noda Time does support .NET core but it is currently in Alpha. It is considered stable but we should expect some API changes.

Display Campaign / Event / Task date time values

The default behavior in AllReady is to display Campaign / Event / Task dates in the timezone where the campaign is located. Since the values are stored as a DateTimeOffset, this means we simply display the value using .ToString(). No additional timezone adjustments are necessary.
To avoid confusing, we display the TimeZone after any date/time values as shown here:

Optionally, a user can specify their local TimeZone in their user profile. If a user has specified their local timezone, we also display the Campaign / Event / Task datetimes in their local timezone as shown here:

TODO: // Add example code showing how this conversion happens

Date Time formats

AllReady currenlty only supports the en-US culture, meaning that DateTime values are always displayed in MM/dd/yyyy format. This includes the input fields where users enter DateTime values.
From Startup.cs

 // Configure the HTTP request pipeline.
var usCultureInfo = new CultureInfo("en-US");
app.UseRequestLocalization(new RequestLocalizationOptions
{
     SupportedCultures = new List<CultureInfo>(new[] { usCultureInfo }),
     SupportedUICultures = new List<CultureInfo>(new[] { usCultureInfo })
});

This can be extended in the future by adding more supported cultures at startup. The challenge here however is in aligning ASP.NET's request culture (and associated DateTime format) with the momentjs DateTime format used by the eonasdan-bootstrap-datetimepicker UI component for datetime input fields.
Currently, the datetimepicker is setup to display in the 'L' format for Dates and 'L LT' formats for DateTime. Since we don't include any additional momentjs locales, this forces the DateTime pictures to use the MM/dd/yyyy format.

 $(".datepicker").datetimepicker({
    format: 'L',
    showClose: false,
    toolbarPlacement: 'bottom'
});

$(".datetimepicker").datetimepicker({
    format: 'L LT',
    showClose: false,
    sideBySide: true,
   toolbarPlacement: 'bottom'
});

ASP.NET Core request culture: https://docs.asp.net/en/latest/fundamentals/localization.html
momentjs locales http://momentjs.com/docs/#/i18n/
Datetimepicker control https://eonasdan.github.io/bootstrap-datetimepicker/#bootstrap-3-datepicker-v4-docs

This is a great summary! I've dealt with this issue several times, as has any developer dealing with events on a multi-regional or global scale. I've used Noda Time recently, and was pleasantly surprised with how it simplified things like timezone conversions.
However, one thing about your summary confuses me. In the 3rd bullet point underneath Potential Risks, you state the following:

Both these issues could be resolved if we used the Noda time framework, stored values as local date time values and did time zone conversions on every read.

Are you sure the stored values would be in local time, and not UTC? Storing in UTC has been a best practice for a long time, and even suggested as such by Jon Skeet. Can you please clarify this point?

@joelhulen, I was part of the email exchange with Jon Skeet, and in this email, he mentioned that storing local time, then converting to correct timezone'd DateTime would work on reads and writes.
But, storing the values as UTC and converting on reads writes would work as well... at my current job, that's exactly our approach to this problem... we store everything as UTC and have a abstraction injected into whatever class need to covert on reads/writes for DateTime values.
We could still use DateTimeOffset, but like @dpaquette mentioned above, the one place we could get into trouble with that is if we create a future event as DateTimeOffset, time zone rules change, and now our stored offset is wrong.

thanks for doing this @dpaquette

As an example, if an event were scheduled several months in advance and changes to the daylight savings time rules for that timezone changed after the event was created, the offset for that event might not be stored correctly

I just want to point out that this is a very outside edge case, with low frequency and chance of occurrence ( @tonysurma please correct me here if need be ). I'm not suggesting we completely negate the fact that it may come into play; however, we need to remember that local times don't tend to change so wholesale changes shouldn't be predicated on that use case.
That said, everyone kinda gets UTC, so from a simplicity standpoint I get the argument for devs coming on board the project and not having the DateTimeOffset friction. But UTC by no means solves the problem we're talking about, so we still need to know whether or not we actually need to be concerned about time zone rule changes. @tonysurma?

@mgmccarthy Storing the Campaign / Event / Task dates as UTC would bring up the same problem as DateTimeOffset. By converting to UTC at the time of saving a Campaign / Event / Task, we are effectively doing the exact same thing as calculating the Offset at the time of the change. If a timezone rule changed, the value saved in UTC time would now be 1 hr off when we converted it back to local time.

@dpaquette, you are right. We're still using the time zone info we have available at the time to do the conversion from "user's local time" to UTC to store in the db.
so the decision to make is, are the time zone rules changing (which should not happen that often) be considered important enough to the project to:

wait for a ASP.NET Core compatible NodaTime and use that?
store LocalDateTime in the db... then convert when reading? (I think Jon Skeet mentioned that)
keep everything as DateTimeOffset? (which would required the work to be done in Issue #1386). If we stay with what we have now, we need to consider DateTimeOffset as a barrier to entry to new contributors (but I don't think it will be)

Just an update on this. I will be working on some code samples for this on Sunday so we can hopefully get this nailed down.

See PR #1416 for current WIP related to this issue. Proposing a approach that uses a custom model binder to do the adjustment for the Campaign or Event's timezone. This pulls the logic out of the controllers / command handlers and ensures the date time offsets are set correctly BEFORE they ever reach the controller.
I will be adding some documentation and unit tests later this week but wanted to share what I had working so far.

@dpaquette, this a great approach. Not only does it centralize the logic, but it makes it easy for new contributors to join w/out having to understand how we handle DateTime... they just need to understand when to use the attribute.
For the record, it looks like the model binder is meant to be used on write operations?

Looks good @dpaquette. What's really handy is that what you've done regarding binding pretty much matches what I've job for a work requirement I had and have started writing up for my blog. So at least my approach looks good for that too!

I wrote an extensive blog on this subject that seems appropriate for the problems here. Of course a lot of it is inspired by everything that John Skeet already solves in nodatime, but in summary what I think is useful for this project is this:

do definitely centralize and wrap all datetime logic in your own implementation of an IDateTimeProvider. Then write meaningful functions in there that mean they are easily maintainable and self-documenting, such as .GetUserDateTimeNow, GetUserDateNow, GetLocationDateTimeNow, GetLoggingDateTimeNow. This class indeed needs to be injected so that it can be tested properly. Also make sure that if you use Now in a workflow/controller, use the DateTimeProvider at the top level to get the Now, and then pass on that value instead of asking for Now at several points in the controller because ... Now changes, obviously (but it is frequently forgotten).

many of your datetimes for this project seem to be tightly coupled to your entities. Time is nothing without context, and in this case the context seems relatively simple.

For instance, a campaign takes place at a specific location. So all you really need are datetimes that do not have any localisation specified (similar to the basic DateTimeKind.Unspecified), so long as you can connect them to a location for which you known the timezone information, you are good.
Similarly, if a user specifies when he or she is available, then the start and endtime will be relative to her timezone. But here it should not matter whether the timezone changes or not. If I start to work at 7am in the summer, I don't suddenly get up at 6am in the winter. If I sent an email at 10am in the summer, I don't want to have the sent date tell me it was sent at 9am if I happen to look at the email in the winter. A store that opens at 7:00 in the summer also opens at 7 in the winter. Etc.
Using DateTimeKind.Unspecified all the way through your application (webclient to sql) means that you can also prevent issues at various transitions - your json date should not have timezone or utc indicators, and your SQL and EntityFramework interaction doesn't have to compensate for it, and you can use the most basic datetime field (as SQL's default datetime is basically DateTimeKind.Unspecified as well).
(Hopefully this helps rather than confuses!)

@dpaquette have we finalized the approach here and documented it somewhere in the wiki etc.?  If so then with all the info on this issue (maybe link to it from the wiki?) we can close this.  Thanks all!

@tonysurma No, we haven't documented anything yet. Longer term approach is to transition to NodaTime one v2 is released. I will try to get this documented soon so we can close the loop on this.
@niwrA thanks for the blog post and additional info!


Terraform commands undefined in Go script run in CircleCI

I am trying to get Terratest to work in CircleCI and face the following problem:

end2end_test.go looks as follows
package test

import (
	"testing"

	"github.com/gruntwork-io/terratest/modules/terraform"
	"github.com/stretchr/testify/assert"
)

func TestTerraformHelloWorldExample(t *testing.T) {

	// Construct the terraform options with default retryable errors to handle the most common
	// retryable errors in terraform testing.
	terraformOptions := terraform.WithDefaultRetryableErrors(t, &terraform.Options{
		// Set the path to the Terraform code that will be tested.
		TerraformDir: "../",
	})

	// Clean up resources with "terraform destroy" at the end of the test.
	defer terraform.Destroy(t, terraformOptions)

	// Run "terraform init" and "terraform apply". Fail the test if there are any errors.
	terraform.InitAndApply(t, terraformOptions)

	// Run `terraform output` to get the values of output variables and check they have the expected values.
	output := terraform.Output(t, terraformOptions, "hello_world")
	assert.Equal(t, "Hello, World!", output)
}

and my config.yml like this:
# Use the latest 2.1 version of CircleCI pipeline process engine.
# See: https://circleci.com/docs/2.0/configuration-reference
version: 2.1

jobs:
  build:
    # only build the circleci branch for now
    docker:
      # specify the version
      - image: circleci/golang:1.14
      - image: hashicorp/terraform
    working_directory: /go/src/terratest_poc
    steps:
      - checkout
      - run: ls && pwd
      - run: cd test && go get -v -d -t
      - run: cd test && go test -v -timeout 30m

I am wondering why terraform.WithDefaultRetryableErrors is apparently undefined although I imported github.com/gruntwork-io/terratest/modules/terraform.

I would double check the version of terratest that is defined in your go.mod file or checked out in your vendor folder. You are most likely pulling in an older version of terratest that doesn't include that function.

I would double check the version of terratest that is defined in your go.mod file or checked out in your vendor folder. You are most likely pulling in an older version of terratest that doesn't include that function.

Thanks a lot! This solved the issue! Do you also know how to fix the issue that terraform executable is not found, although I installed the Docker image?

Multiple images in circleci don't stack together, and it works more like docker-compose. The jobs run only in the first container (in your case, circleci/golang:1.14). See this post for more details on how multiple images work.
So what you need to do is either:

Create a docker image that contains both golang and terraform
Install terraform explicitly into the circleci/golang image.

You should be able to do the latter with the following snippet in your job steps:
steps:
  - checkout
  - run:
      name: install terraform
      command: |
        mkdir -p ~/terraform
        wget https://releases.hashicorp.com/terraform/${version}/terraform_${version}_linux_amd64.zip
        unzip -o terraform_${version}_linux_amd64.zip -d ~/terraform
        chmod u+x ~/terraform/terraform*
        mv ~/terraform/terraform* /usr/local/bin
  - # other run steps

Ah you can also use the CircleCI orb for terraform.

Ah you can also use the CircleCI orb for terraform. Note that for this, all you need is the terraform/install step.

Thank you! For future reference, here is my config.yml which now works flawlessly:
# Use the latest 2.1 version of CircleCI pipeline process engine.
# See: https://circleci.com/docs/2.0/configuration-reference
version: 2.1

orbs:
  terraform<EMAIL_ADDRESS>
jobs:
  build:
    docker:
      # specify the version
      - image: circleci/golang:1.14
    working_directory: /go/src/terratest_poc
    steps:
      - checkout
      - terraform/install:
          arch: amd64
          os: linux
          terraform_version: 0.14.2
      - run: cd test && go get -v -d -t
      - run: cd test && go test -v -timeout 30m


TFLu: remove -fno-builtin compiler flag

What is the motivation for this patch?  Would be good if there was a description in the commit log!

Good point, I will add a description. The motivation is that it disables optimization of standard C library functions, which may cause problems.

Thanks for looking into this Mans! The background to this flag being present is that it helps us avoid code that introduces function calls like exit() that are not present on bare metal platforms without an OS. We normally link with --no-stdlib on those platforms, but because builtins are inserted inline during compilation, it's easy to accidentally use them and either end up with invisible code bloat or obscure linker errors caused by libc functions the builtins themselves call.
Could you add a bit more about the binary size or other optimization problems you see with this flag enabled? Maybe we can turn it on in particular circumstances.

I didn't know that was the background of the flag.
For many binaries, the file size is about 7% (~6% with cmsis-nn tag) percent bigger with the flag enabled.
There is also this issue reported with some significant performance improvement for cmsis-nn without the flag:
https://github.com/tensorflow/tensorflow/issues/37361
CMSIS-NN use optimized builtins for memset and memcpy frequently.

Gentle ping for review


Fix charts CI workflow by adding helm

Relevant issues:

rancher/tasks#172
#71, #72
#69

Helm install was taken from rancher/rancher-operator


ports error after going into developer mode

 [webpack-dev-server] [HPM] Error occurred while proxying request <IP_ADDRESS>:3000/api/events?org= to http://localhost:7000/ [ECONNREFUSED] (https://nodejs.org/api/errors.html#errors_common_system_errors)
That's the error which is shown if any one has knowledge about that kindly help me out.
--source from where i try developer mode After all the installation error define in start when in run "yarn run start:cvat-ui"
Source https://opencv.github.io/cvat/docs/contributing/development-environment/

Perhaps you did not start backend process

sorry what do you mean?

Please, follow step by step guide carefully: https://opencv.github.io/cvat/docs/contributing/development-environment/
If you have an issue on a specific step, ask questions providing all the details.


Improve username behavior

Fixes #<issue_number_goes_here>

It's a good idea to open an issue first for discussion.

[ ] Tests pass
[ ] Appropriate changes to README are included in PR

...


curl error 7

Hi,
We are just trying to create document using hapi browser/hapiclient-php (https://dev.slimpay.com/hapi/browser#create-documents) . But we get that error  : cURL error 7: Failed to connect to api-sandbox.slimpay.net port 443: Timed out
have you any ideas about that error

Hi Benhy,
Our Sandbox server might have been a little slow at the time you tried to send your request. I just tried it now and it seems to work fine. Could you give it another try and tell us if you keep getting an error?
Best wishes for 2016,
Youssef - SlimPay.

Hi,
We are just trying to create document using hapi browser/hapiclient-php (https://devslimpaycom/hapi/browser#create-documents) But we get that error : cURL error 7: Failed to connect to api-sandboxslimpaynet port 443: Timed out
have you any ideas about that error

Reply to this email directly or view it on GitHubhttps://github.com/SlimPay/hapiclient-php/issues/1.
[https://avatars3.githubusercontent.com/u/4624830?v=3&s=400]https://github.com/SlimPay/hapiclient-php/issues/1
curl error 7 · Issue #1 · SlimPay/hapiclient-phphttps://github.com/SlimPay/hapiclient-php/issues/1
github.com
Hi, We are just trying to create document using hapi browser/hapiclient-php (https://dev.slimpay.com/hapi/browser#create-documents) . But we get that error : cURL error 7: Failed to connect to api...

Hello youssef,
thanks for your reply  and best whishes
we try again but before we added  in the guzzle (contrustor  somethings like default =>[proxy.adress])  and we don't get the same error .
So what is the best way to define proxy using hapiClient-php ?
We try another exemple create an order to sign an document (https://dev.slimpay.com/hapi/browser#create-orders) , with ourscredit, ourssecret
define an document template
but getting 403 forbidden

The Guzzle Client is configured for a default and generic use. For specific configurations, you can use $hapiClient->getClient() to retrieve the GuzzleHttp\Clienthttp://guzzle.readthedocs.org/en/5.3/index.html. Since it is passed by reference, any change to its configuration will be passed to the following $hapiClient calls. E.g. $hapiClient->getClient()->setDefaultOption('proxy', '<IP_ADDRESS>:10');
Regarding the 403 forbidden, you are trying to use a document template (given in the example) that belongs to democreditor. Since you are using your own app, you would have to upload your own document template in your Back Office.
If you do not have access yet, you can ask for a Back Office access on the test platform by sending a request to<EMAIL_ADDRESS>Don't forget to specify the platform (test) and your App ID.

De : Benhy D<EMAIL_ADDRESS>Envoyé : mardi 5 janvier 2016 14:51
À : SlimPay/hapiclient-php
Cc : YoussefBO
Objet : Re: [hapiclient-php] curl error 7 (#1)
Hello youssef,
thanks for your reply and best whishes
we try again but before we added in the guzzle (contrustor somethings like default =>[proxy.adress]) and we don't get the same error .
So what is the best way to define proxy using hapiClient-php ?
We try another exemple create an order to sign an document (https://dev.slimpay.com/hapi/browser#create-orders) , with ourscredit, ourssecret
define an document template
but getting 403 forbidden

Reply to this email directly or view it on GitHubhttps://github.com/SlimPay/hapiclient-php/issues/1#issuecomment-168990724.

Hello Youssef,
thanks  a lot for your help, the mistake was the creditorReference definition  we find the good one and all it ok
Best regards :+1:

Hello @benhbenny  i have the same problem in the same application in localhost ?

Hi @yagami271. Normally  since  guzzle v6 version you may use PHP putenv  to set your proxy environnement in locolhost. putenv('HTTPS_PROXY='.$your_proxy);.  Otherwise your can use $hapiClient->getClient()->setDefaultOption('proxy', $proxy); as suggested by YoussefBO

@benhbenny  the solution
We cant set the proxy of the Client because HapiClient instanciate client with only baseUrl.
The the client search the Env vairbale HTTPS_PROXY,
so i set it but still not working
i restart my camputer and it's work
hope it's help others ...


Add bulk write method for stream.

This implements a method necessary now that FilterOutputStream has been removed from inheritance hierarchy.

Hmm, something fooey has happened. Running the failsafe tests locally succeeded. I see there is this error
storeFileAndVerifyReturnedInfo(org.commonjava.indy.folo.ftest.content.StoreAndVerifyReturnedPathInfoForTrackedHostedRepoTest)  Time elapsed: 0.63 sec  <<< ERROR!

java.lang.RuntimeException: java.net.BindException: Address already in use

Caused by: java.net.BindException: Address already in use

Can the tests be re-run please ?

I retest it.
You can click the details and it will take you to Jenkins, login, there is a 'Rerun' button on the top bar.

Let's hold this for a while until the indy 2.3 is out. I will merge it later.

Let's hold this for a while until the indy 2.3 is out. I will merge it later.

:+1:

@ruhan1 Sorry, I just saw this, and wanted to mention that with the 1.4-SNAPSHOT version of Galley, the MavenContentFilteringTransferDecorator is broken. If you stick with Galley 1.3 you will probably be ok for now.

@jdcasey Jeremy and I talked. Yes. We will stick with galley 1.3 for now.


ippsample on Windows

Hi Michael, Not sure if your interested but I was able to build ippsample on Windows 10 using the cygwin development environment, much to my surprise ;) I had to make some minor changes, mostly casts and a #define _GNU_SOURCE for a missing (non posix i guess) asprintf function.
It also appears to be running just fine, although I still have to run some tests.
Regards,
Daryl

We do intend for the sample code to run on Windows (as much as is possible given its limitations) and there is a Visual Studio project (that I admit have not updated in a while) for building the sample code.
Supporting Visual Studio builds is our primary focus - Cygwin is an interesting approach but if we don't produce native applications using the Microsoft tools then we have "failed" as far as the project is concerned...
If you can send a diff (or a pull request) containing your changes to make it compile with Cygwin, I'll see about merging them.
Thanks!

Hi Michael, You will find attached the the diffs I made to compile
ippsample using cygwin.
On 7/5/16 5:24 AM, Michael R Sweet wrote:

We do intend for the sample code to run on Windows (as much as is
possible given its limitations) and there is a Visual Studio project
(that I admit have not updated in a while) for building the sample code.
Supporting Visual Studio builds is our primary focus - Cygwin is an
interesting approach but if we don't produce native applications using
the Microsoft tools then we have "failed" as far as the project is
concerned...
If you can send a diff (or a pull request) containing your changes to
make it compile with Cygwin, I'll see about merging them.
Thanks!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/istopwg/ippsample/issues/12#issuecomment-230463523,
or mute the thread
https://github.com/notifications/unsubscribe/AA_wdaQiNpUcmuFsf-45Y-ysxwwU31q2ks5qSkzvgaJpZM4JCrqW.

diff --git a/cups/debug.c b/cups/debug.c
index a25e4b1..0e6b2db 100644
--- a/cups/debug.c
+++ b/cups/debug.c
@@ -109,7 +109,7 @@ _cups_debug_printf(const char format,	/ I - Printf-style format string */

Filter as needed...
*/

if (isdigit(format[0]))

if (isdigit((unsigned char)format[0]))
level = *format++ - '0';
else
level = 0;
@@ -192,7 +192,7 @@ _cups_debug_puts(const char s)		/ I - String to output */

Filter as needed...
*/

if (isdigit(s[0]))

if (isdigit((unsigned char)s[0]))
level = *s++ - '0';
else
level = 0;
diff --git a/cups/http-addrlist.c b/cups/http-addrlist.c
index a8237eb..7335cb2 100644
--- a/cups/http-addrlist.c
+++ b/cups/http-addrlist.c
@@ -757,7 +757,7 @@ httpAddrGetList(const char hostname,	/ I - Hostname, IP address, or NULL for p
else if (isdigit(*service & 255))
portnum = atoi(service);
else if ((port = getservbyname(service, NULL)) != NULL)

 portnum = ntohs(port->s_port);

 portnum = ntohs((uint16_t)port->s_port);

else if (!strcmp(service, "http"))
portnum = 80;
else if (!strcmp(service, "https"))
diff --git a/cups/http-support.c b/cups/http-support.c
index 2af4814..ae7c844 100644
--- a/cups/http-support.c
+++ b/cups/http-support.c
@@ -2030,14 +2030,14 @@ http_copy_decode(char       dst,	/ O - Destination buffer */
*/
     src ++;

if (isalpha(*src))

  quoted = (tolower(*src) - 'a' + 10) << 4;

if (isalpha((unsigned char)*src))

  quoted = (tolower((unsigned char)*src) - 'a' + 10) << 4;
else
  quoted = (*src - '0') << 4;

     src ++;

if (isalpha(*src))

  quoted |= tolower(*src) - 'a' + 10;

if (isalpha((unsigned char)*src))

  quoted |= tolower((unsigned char)*src) - 'a' + 10;
else
  quoted |= *src - '0';

diff --git a/cups/language.c b/cups/language.c
index f1afecc..88a6e36 100644
--- a/cups/language.c
+++ b/cups/language.c
@@ -1601,11 +1601,11 @@ cups_unquote(char       d,		/ O - Unquoted string */
if (*s == '\')
{
s ++;

 if (isdigit(*s))

 if (isdigit((unsigned char)*s))
 {

*d = 0;

while (isdigit(*s))

while (isdigit((unsigned char)*s))
{
*d = *d * 8 + *s - '0';
s ++;
diff --git a/server/ippserver.h b/server/ippserver.h
index 03ac18e..32ba6e1 100644
--- a/server/ippserver.h
+++ b/server/ippserver.h
@@ -19,7 +19,7 @@

#define _IPP_PRIVATE_STRUCTURES 0	/* Disable private IPP stuff /
#define _CUPS_NO_DEPRECATED 1		/ Disable deprecated stuff */
+#define _GNU_SOURCE  		        /* Work around for missing asprintf function */
/*

Include necessary headers...


Log File once deleted is not created again

When file transport is used and logs are outputted to a log file. Now if this log file gets deleted it doesn't create itself again until and unless the app is restarted.

If this is on a Unix based OS, I suspect this may be because while the file appears to be deleted, the inode still exists, so Stream will act as if the file still exists.
Details and suggestion can be found here: http://stackoverflow.com/questions/19301438/node-js-detecting-a-file-opened-with-fs-createwritestream-becoming-deleted

I also encountered this bug, will it fix it？


MLHR-1863 #resolve #comment Make time buckets comparable.

@chandnisingh please review

@chandnisingh moved comparator inside TimeBucket


feat(CI): add timeout to CI

Should solve #4727.

Can we do this for tests too?

Can we add these to tests workflows too?

@DaniPopes Yes sure, I've just extended, tell me if this is better or if you see other places with this should be set like that? For me this seems good like that, I've pushed the timeout to 60 minutes at the most critical places.

It's missing integration I think
Also a tip @tcoratge use "resolve" or similar keywords so the issue gets automatically closed on merge: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests

It's missing integration.yml I think then we're good Also a tip @tcoratge use "resolve" or similar keywords so the issue gets automatically closed on merge: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests

Done, thanks for the tip, I don't know why I was thinking that "solve" did the same job but I should have checked if the issues closed automatically...


BTRX - Extra properties fix

Changes

Created two object classes for Project Extra Properties and for Consent Group Extra Properties
Each class, has a builder that receives a Map of extra properties and returns the specific object type
Changed some default values for the Ui

[x] Submitter: Verify all tests go green, including CI tests
[ ] Submitter: Get a thumb from @rushtong
[ ] Submitter: Merge to develop using github's "Squash and Merge" feature
[ ] Submitter: Delete branch after merge

@rushtong  this is ready for your review


AllocBoxToStack should notify the PassManager of new functions.

In preparation for fixing this bug.

Separate general SIL utilities, liveness, escape analysis,
and promotion.
Give promotion routines access to the current pass.

Ideally, the current pass would be accessible via TLS. In the meantime,
pass routines should always have access to a state object that
encapsulates the pass information corresponding to a single invocation
of the pass.
Access to the pass' state should be consistent and idiomatic; it should
not depend on the where we are in the call stack. This makes the code much easier to understand and refactor, and it enables exploratory changes.

@swift-ci test.

@swift-ci smoke test compiler performance.

Build failed
Swift Test Linux Platform
Git Sha - 9500014f62427fdbb7eb2675c8716c9199be2023

@swift-ci test linux platform.

@swift-ci smoke test compiler performance.

@eeckstein AFAICT "smoke test compiler performance" did not do anything. In this case,  I don't expect this to change compilation time modulo bugs, and all benchmark binaries are identical, so nothing to worry about. But I'm wondering how to test compilation time in my next PR.

@graydon any idea why "smoke test compiler performance" didn't work?


Test multiple files

It would be nice if there was a to test multiple files at once.

You should be able to currently. You just pass in multiple parameters in the cli:
$ dak file1.js file2.js file3.js folder1 folder2 folder2/tests

Guess i should be more specific. It might be useful to have a configuration file of some kind. List the files/folders we want. run the dak command with no args. Get results

npm scripts?
{
   "test": "npm run static && npm run lint && ava",
   "static": "dak file1.js file2.js file3.js folder1 folder2 folder2/tests"
}

$ npm test
$ npm run static

That's a reasonable solution, still a little clunky since it'll have to be updated with each new file.


automatically navigate to main

For binaries where main is defined and identified, navigate there on startup rather than staying at the entry-point

Implement automatic navigation to main function when opening a new binary:

[ ] 1. Settings should include a list of symbol names to search for.
[ ] 2. Only function symbols should be allowed.
[ ] 3. Settings should have an "enable" checkbox (checked by default).

Implemented in dev build 3377.


🐛 BUG:  WARN  deprecated<EMAIL_ADDRESS>Please use @jridgewell/sourcemap-codec instead

Which Cloudflare product(s) does this pertain to?
Wrangler
What version of Wrangler are you using?
2.17.0
What operating system are you using?
Mac
Describe the Bug
WARN  deprecated<EMAIL_ADDRESS>Please use @jridgewell/sourcemap-codec instead

I'm not sure what the issue being reported is here, so I'm going to close it for now. If you're still running into issues feel free to comment with more details and we can investigate further!


set the machine_controller_workers metric to an actual value

What this PR does / why we need it:
We define a metric but have not set its value since refactoring the MC to use controller-runtime in #592. This PR restores setting the metric value.
Optional Release Note:
Fix machine_controller_workers metric always being 0.

/test all


Illegal instruction in Linux

This code works in macOS, but results in Illegal instruction in Linux (official Swift 4.2.1 Docker image):
import Foundation
import Signals

let semaphore = DispatchSemaphore(value: 0)

class Signaler {
    static func execute() {
        semaphore.signal()
    }
}

// crashes even if closure is empty
Signals.trap(signals: [.int, .term]) { s in
    print("Trapped \(s)")
    Signaler.execute()
}

print("Now we wait")
semaphore.wait()
print("Bye!")

However, classic signal works fine both in macOS and Linux:

import Foundation

let semaphore = DispatchSemaphore(value: 0)

class Signaler {
    static func execute() {
        semaphore.signal()
    }
}

let trap: @convention(c) (Int32) -> Void = { s in
    print("Received signal \(s)")
    Signaler.execute()
}

signal(SIGINT, trap)
signal(SIGTERM, trap)

print("Now we wait")
semaphore.wait()
print("Bye!")

I’m having a similar issue, any luck on this?


feat(keybindings): add keybindings for output panel

Looks great. For completeness, should we also include 0-9 and also every non-printing key like bspc and del? I know, for example, that lightspeed.nvim uses the backspace key for "search repeat".

Definitely enough for this edge case :eyes:


Testing problems found in Laval with Gen 2 Setup

Wells,
Here is a set of problems found when testing
List - Defect Log 20190614.xlsx

sorry but this repo is still not released, and if you found error, don't use attachment which may contain virus


[docs] #191: Update triggers page

Signed-off-by: Ekaterina Mekhnetsova<EMAIL_ADDRESS>Closes #191

The broken link is not actually broken, you can check in the preview that it works: https://iroha-2-docs-git-fork-outoftardis-doc-191-0x009922.vercel.app/guide/advanced/triggers.html


Port question, no ACK on sended command

Hello, I have question how this router works... (PX4-Gazebo-QgroundControl)
I want to route mavlink to another PC where is a C# application to control the drone (I tested it with QgroundControl and it works fine, receiving/sending on port 14550) but I need it to be on port 7909.
I started it with line
mavlink-routerd <IP_ADDRESS>:7909 -e <IP_ADDRESS>:14550
I am getting messages to my C# application but I dont get any ACK on sending commands from my side.
I think of next problems:

something wrong in sended mavlink (crc) (probably not since I can comunicate correctly without using mavlink-router)
something wrong in destinaton (targetsystem, targetcomponent, I use number 1 for both)
something wrong with ports, my sended commanda are also on port 7909 is this ok? Do I need to call something more in command line.

Thank you for any kind of info to solve my problem.

I found out that the problem is the port.
My application was sending on 7909 but it should send to the port where the receive data came in my case port 58252


689 convert to ophyd async ipin

Fixes #689
Instructions to reviewer on how to test:

run dodal connect i04
make sure the device is connected
make sure the device is readable in a run (plans in mx_bluesky)

Checks for reviewer

[ ] Would the PR title make sense to a scientist on a set of release notes
[ ] If a new device has been added does it follow the standards
[ ] If changing the API for a pre-existing device, ensure that any beamlines using this device have updated their Bluesky plans accordingly
[ ] Have the connection tests for the relevant beamline(s) been run via dodal connect ${BEAMLINE}

@stan-dot please squash and merge and rewrite the squashed commits to something sensible


Pre-trained model

Hi
Do you have a pre-trained model, that i can use directly?
Any help is highly appreciated.

Hi! Unfortunately, I don't have a pre-trained model. It took me ~50mins to train on 1080Ti.


Attack goal function details

Hey, what's the reason behind using the difference in scores for the attack goal function instead of the PDR?
https://github.com/microsoft/promptbench/blob/3daaf2d3734ec8c08302f73b93e640973a1edd41/promptbench/prompt_attack/goal_function.py#L276-L279
Also, why has maximizable=True not been passed to the goal function?
https://github.com/microsoft/promptbench/blob/3daaf2d3734ec8c08302f73b93e640973a1edd41/promptbench/prompt_attack/goal_function.py#L242-L248

Using PDR is also beneficial, I think it has a similar impact as the score differences.
In the adversarial prompts goal function, the maximizable argument is redundant.


Stabilize route test

Increase test timeout and make it configurable for slow CI.

Release Note
NONE

@bouskaJ I've run openshift test twice, and we are getting this failure:
--- FAIL: TestTektonLikeBehavior (66.69s)

Do you mind having a look and see why it is affected by this change?

@bouskaJ I've run openshift test twice, and we are getting this failure:
--- FAIL: TestTektonLikeBehavior (66.69s)

Do you mind having a look and see why it is affected by this change?

@squakez
I have investigated it a little and it seems that that is not a problem of this PR but the problem is in the release-1.6.x. I have created a very simple PR to invoke the CI action on the release-1.6.x and it failed as well (see https://github.com/bouskaJ/camel-k/pull/12).
I am not an expert but I have a feeling that we build the  docker.io/apache/camel-k:1.6.2-SNAPSHOT https://github.com/bouskaJ/camel-k/runs/5846804729?check_suite_focus=true#step:9:1458 but the tekton pod is pulling docker.io/apache/camel-k:1.6.1-SNAPSHOT (see https://github.com/apache/camel-k/blob/release-1.6.x/e2e/support/test_support.go#L1140 and https://github.com/apache/camel-k/blob/release-1.6.x/pkg/util/defaults/defaults.go#L26). Did I miss something?

Good catch. Generally the defaults.go is updated via codegen which is only triggered in release cycles. I am not sure if this step is meant to be manual though. I'm regenerating the defaults in a separate PR, later we should rebase. Keep tuned.

To rebase once #3174 is merged, thanks!

@bouskaJ please, rebase, the issue should have been fixed.

@squakez we have
--- FAIL: TestKameletBindingScale (110.67s)
    --- PASS: TestKameletBindingScale/Update_binding_scale_spec (2.49s)
    --- PASS: TestKameletBindingScale/Scale_kamelet_binding_with_polymorphic_client (10.28s)
    --- FAIL: TestKameletBindingScale/Scale_kamelet_binding_with_Camel_K_client (0.02s)
    ```
    Can you rerun the CI?


Add MarcelloDB

Hi,
I'm the author of MarcelloDB, I thought it would fit right in your collection of db's.
It's a .net embedded nosql db, so I added to right below the other .net db's. Hope that's fine.
Thanks,
Mark

Looks good. Thanks a lot!


Remove banner advising new abstract deadline

This PR should be merged after Friday 20.

Closed in favor of #36


Investigate how to handle icons in dark themes

As I'm licensing icons from Flaticon, which doesn't come with different themes, either

need to find an alternative icon source,
need a programatic way to make them look good in different styles

There seemed to be no good way at runtime to alter an SVG. So went for switching the path fill mode to white as an inverted scheme.


ci: bump cargo-semver-checks to 0.24.0

What does this PR try to resolve?
Bump cargo-semver-checks to 0.24.0. See https://github.com/obi1kenobi/cargo-semver-checks/releases/tag/v0.24.0
Also remove workaround since the issue was fixed in upstream.
How should we test and review this PR?
Additional information

Thanks!
@bors r+

:pushpin: Commit 60539e94dc31d436d180f570ca62ba796003f1d2 has been approved by ehuss
It is now in the queue for this repository.

:hourglass: Testing commit 60539e94dc31d436d180f570ca62ba796003f1d2 with merge 0871c0e2f4b6d4f95b7408fb8cef8ad3c9c8d834...

:sunny: Test successful - checks-actions
Approved by: ehuss
Pushing 0871c0e2f4b6d4f95b7408fb8cef8ad3c9c8d834 to master...


Error after run

pkg/prelude/bootstrap.js:1261
      return wrapper.apply(this.exports, args);
                     ^

TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator))
    at new Parser (/snapshot/gitlab-pipeline-local/dist/parser.js)
    at Object.<anonymous> (/snapshot/gitlab-pipeline-local/dist/index.js)
    at Module._compile (pkg/prelude/bootstrap.js:1261:22)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:993:10)
    at Module.load (internal/modules/cjs/loader.js:813:32)
    at Function.Module._load (internal/modules/cjs/loader.js:725:14)
    at Function.Module.runMain (pkg/prelude/bootstrap.js:1316:12)
    at internal/main/run_main_module.js:17:11

Ahaaaa... Can you provide med with your .gitlab-ci.yml or just the part of it that fails the parsing.

image: php:5.6

services:
  - mysql:latest

build:
  stage: build
  cache:
    key: ${CI_COMMIT_REF_SLUG}-composer
    paths:
      - vendor/
  script:
    - curl -sS https://getcomposer.org/installer | php
    - php composer.phar install --prefer-dist --no-ansi --no-interaction --no-progress --no-scripts
  artifacts:
    paths:
      - vendor/
      - .env

test:
  stage: test
  dependencies:
    - build
  script:
    - vendor/bin/codecept

I believe that you miss a stages: [build, test]

and unfortunately image and services "tags" aren't supported yet.

https://github.com/firecow/gitlab-local-pipeline/commit/29c5d5d19191f9e50d5fd4bfac2010f46508c5ca
Prints a pretty error, if "stages" tag is missing.

I will implement services and image soon. Hang on :-D

I'm closing this


move from python2 to python3

closes #194 and closes #1041 and closes #988

some bugs discovered that the tests missed. DO NOT merge yet.

bugs squashed, waiting for build to complete just to be sure


Exceptions on disposing WebsocketLink

There seems to be an issue with disposing WebSocketLink on android and web.
Android
On disposing connection, StreamSubscription is not cancelled for the listen used in _connect method, this is causing the onDone method to be called after disposing the connection. this raises an expception saying an event cannot be added once it is closed.
[ +189 ms] E/flutter (18672): [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: Bad state: Cannot add new events after calling
close
[        ] E/flutter (18672): #0      _BroadcastStreamController.add (dart:async/broadcast_stream_controller.dart:243:24)
[        ] E/flutter (18672): #1      Subject._add (package:rxdart/src/subjects/subject.dart:141:17)
[        ] E/flutter (18672): #2      Subject.add (package:rxdart/src/subjects/subject.dart:135:5)
[        ] E/flutter (18672): #3      WebSocketLink._connect.<anonymous closure> (package:gql_websocket_link/src/link.dart:221:36)
[        ] E/flutter (18672): #4      _rootRun (dart:async/zone.dart:1346:47)
[        ] E/flutter (18672): #5      _CustomZone.run (dart:async/zone.dart:1258:19)

Android and Web
A DOMException is throw on sending a closeReason other than normal closure - 1000, in this case  going away - 1001.
DOMException: Failed to execute 'close' on 'WebSocket': The code must be either 1000, or between 3000 and 4999. 1001 is neither.

Will you accept a PR which solves this by :

Cancelling stream subscription on dispose
Sending an optional closeReason to the WebSocketLink while creating one, so the the user can customize it without having to change the current spec.

I have the same problem.
The problem is this line in gql_websocket_link-0.3.1\lib\src\link.dart
await _channel?.sink.close(websocket_status.goingAway);
if you change it to
await _channel?.sink.close(websocket_status.normalClosure);
then it works.
Can you fix this?


🐛 fix interrupt of sequence star/random + improve docs

Description
Usually, any sequence node that fails should correctly interrupt its running children, if there are any. This worked correctly for sequence and reactive sequence but not for sequence star nor sequence random.
Also addressed docs, which hopefully closes #248

@rxlecky incorporated your feedback here: https://github.com/bitbrain/beehave/pull/249/commits/b07b02d8f6c3c522e4cbb25ffbf2546fbf136e7d


Advancing 0.13.0-rc1 release to status: admiral

Advancing 0.13.0-rc1 release to status: admiral

e2e seems to be failing


Drop the & from swift init scripts

This is causing a very weird traceback on mitaka, and it's not
necessary. swift-init does the right thing anyway.

:+1:


How to override AzureKeyVaultEndpoint from Azure Configuration?

Question
How to override AzureKeyVaultEndpoint from Azure Configuration?
Relevant parts of the log file
I want to override appsettings.json AzureKeyVaultConfiguration AzureKeyVaultEndpoint values from Azure Configuration.
Currently, it loads AzureKeyVaultEndpoint from appsettings.json even if I had overridden it from Azure.
Is this something I can handle from Azure? like ConnectionStrings It is take from Azure Configuration.

You need to change this code in program.cs
            var configurationBuilder = new ConfigurationBuilder()
                .SetBasePath(Directory.GetCurrentDirectory())
                .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true);

by adding
.AddEnvironmentVariables();
after the .AddJsonFile() method call.
Skoruba will then pick up environmental variables which are set in Azure App Service Configuration.

This functionality already exists in program.cs
            var configurationBuilder = new ConfigurationBuilder()
                .SetBasePath(Directory.GetCurrentDirectory())
                .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true);

            if (isDevelopment)
            {
                configurationBuilder.AddUserSecrets<Startup>();
            }

            var configuration = configurationBuilder.Build();

            configuration.AddAzureKeyVaultConfiguration(configurationBuilder);
            configurationBuilder.AddCommandLine(args);
            configurationBuilder.AddEnvironmentVariables();

            return configurationBuilder.Build();

This method configurationBuilder.AddEnvironmentVariables(); should overwrite anything acquired from appsettings.json if the Environmental Variable is set correctly in your Azure App Service Configuration.


Add three more communities

Suggesting additions of four more communities:

Design Twitter
Dev Front-End
Open data

thanks!


update example to glutin 0.30

glutin 0.28 API got scrapped due to Android issues.
It would be nice if the example gets a bump to the new glutin 0.30 api.
At least it was confusing for me as a newcomer.

Open to a PR to change this

I've started dabbling with this here, though I've run into a bunch of problems:

glutin's API changed a lot
Many things moved to winit, so we need to include that
winit can work with other libs, so we need more glue code (glutin-winit)
The flow of events is quite a bit different. make_current now happens inside the event loop, while in the sample a current context is expected to be present before we enter the event loop (all the GL resources are created there).
This leads to a runtime panic like this:

Reading GL_VERSION failed. Make sure there is a valid GL context currently active.
stack backtrace:
   0: rust_begin_unwind
             at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:595:5
   1: core::panicking::panic_fmt
             at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panicking.rs:67:14
   2: glow::native::Context::from_loader_function_cstr
             at /home/krzysztof/devel/glow/src/native.rs:56:13
   3: glow::native::Context::from_loader_function
             at /home/krzysztof/devel/glow/src/native.rs:108:9
   4: test::main
             at ./src/main.rs:63:22

Additionally, I'm not at all familiar with any of the libraries involved. Most of this is scraped/copy-pasted together from docs and sample code.
My main motivation is to make a little game, and wanting to use egui for UI and OpenGL ES for regular rendering.
I guess a way to fix this would be to move the GL resource creation somewhere else (similar to what the glutin window example does IIRC), but that would break the web and SDL2 samples (which is why I created a "new" sample).
I'd appreciate some help. :)

@CarePackage17 awesome, yeah we should probably split off the examples anyway. I helped somebody get started with glutin and glow a couple days ago with this sample https://github.com/grovesNL/nikeedev-rs-opengl/blob/help/src/main.rs in case it's helpful

Your sample code looks a lot more readable, whereas the thing I cobbled together might work on more platforms (by virtue of the glutin sample having a bunch of special cases + raw-window-handle being a requirement on Windows IIUC).
I've updated my fork and it runs fine on Ubuntu 23.10 as of now. I want to test it on Windows as well, because it'd be nice to have that out of the box too.
I guess the main question is how portable do you want the sample to be? My impression with the original sample is that it should work across desktop and web...but then again, you also suggested splitting the samples, so having one of them not work on all platforms might not be bad/can be improved in the future.
Should I open a PR?

Looks like you also modified glutin's example to use glow, which is what I did.
Ideally there would also be a quick start for Android added to glow; you'd pretty much just have to copy the rest of the example from glutin.
So far I got glow working on Android 8.1+.
I suspect cargo apk has an issue on Android 5.1, or at least the library won't load without any reason why; just so you know.

Fixed by #276


Add throwing version of NIOAsyncSequenceProducer

Motivation
We recently introduced a NIOAsyncSequenceProducer to bridge a stream of elements from the NIO world into the async world. The introduced type was a non-throwing AsyncSequence. To support all use-cases we also need to offer a throwing variant of the type.
Modification

Introduce a new NIOThrowingAsyncSequenceProducer that is identical to the NIOAsyncSequenceProducer except that it has a Failure generic parameter and that the next() method is throwing.
Extract the StateMachine from both AsyncSequenceProducers and unify them.
There is one modification in behaviour: didTerminate is now only called after nil or the error has been consumed from the sequence.

Result
We now have a throwing variant of the NIOAsyncSequenceProducer.

@swift-nio-bot test this please


"Couldn't sign you in" Google account login fails in headless mode in Google Cloud Functions

Hi everyone,
I'm trying to make a script that would login to Medium to export article's stats. Medium allows Google authentication so I'm using that. It runs without any issue on my laptop (MacOS) but I get the message (attached to this issue) that I couldn't sign in when run in Google Cloud Functions. Basically this login failure message appears after the screen where you enter your username.

Puppeteer version: 1.18.1 (also tested with 1.19.0, same result)
Platform / OS version: Google Cloud Functions
Node.js version: 8

What steps will reproduce the problem?
I deployed the code below to Google Cloud Functions.
exports.exportMediumStats = (req, res) => {
  const puppeteer = require('puppeteer');
  const url = "https://medium.com/m/signin?redirect=https%3A%2F%2Fmedium.com%2F&operation=login";
  let image;

  // Main function that will scrap Medium stats page using puppeteer
  async function main() {
    const browser = await puppeteer.launch({
      headless: true,
      args: ['--no-sandbox', '--disable-setuid-sandbox'],
    });
    const page = await browser.newPage();
    await page.goto(url, { waitUntil: "networkidle2" });
    console.log('Clicking on google login...');
    await page.click('.button--withChrome.button--large');
    await page.mainFrame().waitForSelector('#identifierId');
    console.log('Typing email...');
    await page.type('#identifierId', process.env.MEDIUM_USERNAME);
    await page.mainFrame().waitForSelector('#identifierNext');
    console.log('Clicking next button...');
    await page.click('#identifierNext');
    await page.waitFor(3000);
    image = await page.screenshot();

    console.log('Closing browser...');
    await browser.close();
  }

  main()
  .then(url => {
    res.setHeader("content-type", "image/jpeg");
    res.status(200).send(image);
  })
  .catch(err => {
    console.error(err);
    res.status(500).send("An Error occured" + err);
  })
};

What is the expected result?
I should get the screen where I would type my password.
I works perfectly on my local machine in both non-headless and headless modes.
Also it used to work on Google Cloud Functions at the beginning but it doesn't for some time now.
What happens instead?
The login fails with a message displayed in the attached picture below.
The failure message is:
Couldn't sign you in
For your protection, you can't sign in from this device.
Try again later, or sign in from another device.

@ksimir I'd imagine that this due to some anti-bot behaviour on Google's end. Try altering the User-Agent header.

I got the same problem when use
const browser = await puppeteer.connect({         browserWSEndpoint: 'wss://chrome.browserless.io/'     });

Maybe you can try https://github.com/berstend/puppeteer-extra/tree/master/packages/puppeteer-extra-plugin-stealth or https://intoli.com/blog/making-chrome-headless-undetectable/

I’ve hit this problem previously.
It appears to be some sort of bot detection.
What worked for me was not setting the userAgent, and running non-headless.
Either spoofing the userAgent or running headless would cause me to hit this issue.
Best of luck.

I’ve hit this problem previously.
It appears to be some sort of bot detection.
What worked for me was not setting the userAgent, and running non-headless.
Either spoofing the userAgent or running headless would cause me to hit this issue.
Best of luck.

Hi,
How did you  avoid  the  (presumably) IP whitelisting? My issue is that when I test  in local everything works but  when I move the program to production environment it tries  to send me an email with a code even though I haven't got 2 factor auth activated

Hi!
I have got the same problem. I run puppeteer in the non-headless mode and also implemented the recommendation from this article https://intoli.com/blog/making-chrome-headless-undetectable/
After all the steps, I still receive this message.
Is anyone have a solution to this problem? I would really appreciate any help.
Have a nice day :)

Hi all!
I fixed this issue on my AWS server (ubuntu 18) .
Firstly, follow this https://github.com/berstend/puppeteer-extra/tree/master/packages/puppeteer-extra-plugin-stealth
Secondly, due to  Amazon Linux machine missing some Chrome packages. You need to install them
https://medium.com/mockingbot/run-puppeteer-chrome-headless-on-ec2-amazon-linux-ami-6c9c6a17bee6
https://stackoverflow.com/questions/48480143/installing-chromium-on-amazon-linux

Hey. I was able to solve the problem!
I am running my script on Digital Ocean Droplet with Ubuntu 18

I followed this instruction https://github.com/berstend/puppeteer-extra/tree/master/packages/puppeteer-extra-plugin-stealth

Then I installed xvfb https://www.npmjs.com/package/xvfb to run puppeteer in headfull mode

Then the most important. Without these steps, Google will still block you.

I installed chrome instance via command line

Launch browser with chrome-launcher package

Code example

        const puppeteer = require("puppeteer-extra")
        const pluginStealth = require("puppeteer-extra-plugin-stealth")
        puppeteer.use(pluginStealth())
        const chromeLauncher = require('chrome-launcher');
        const axios = require('axios');
        const Xvfb = require('xvfb');

        const xvfb = new Xvfb();
        xvfb.startSync();
        const chromeConfig = {
                chromePath: "/usr/bin/google-chrome-stable"
        }

        const chrome = await chromeLauncher.launch(chromeConfig);
        const response = await axios.get(`http://localhost:${chrome.port}/json/version`);
        const { webSocketDebuggerUrl } = response.data;
        const browser = await puppeteer.connect({ browserWSEndpoint: webSocketDebuggerUrl });

        //log in into google account....

Good luck! :)

Weirdly, if I use puppeteer-extra and puppeteer-extra-plugin-stealth, it triggers the detection for me. Without them, it's running fine.
I'm running it on Google Cloud CE instance.

hi. let use puppetee 1.0.0 and with chromium 65.0.3312.0. I'm Has solved that problem. Have a nice day :)

65.0.3312.0

I can't find this chromium version.  Please give me link to download

65.0.3312.0

I can't find this chromium version that already built. Please give me link to download

You Can download https://drive.google.com/file/d/1_kxVGWopc37UkNTehCoHMZB5ps2j_sCM/view?usp=sharing . and try it.

65.0.3312.0

I can't find this chromium version that already built. Please give me link to download

You Can download https://drive.google.com/file/d/1_kxVGWopc37UkNTehCoHMZB5ps2j_sCM/view?usp=sharing . and try it.

what revision is this version? 65033120? BrowserFetcher, requires me to revision number

65.0.3312.0

I can't find this chromium version that already built. Please give me link to download

You Can download https://drive.google.com/file/d/1_kxVGWopc37UkNTehCoHMZB5ps2j_sCM/view?usp=sharing . and try it.

what revision is this version? 65033120 not work. BrowserFetcher, requires me to revision number. I use c#, by the way

Have you downloaded the link I provided? I use nodejs and it works

65.0.3312.0

I can't find this chromium version that already built. Please give me link to download

You Can download https://drive.google.com/file/d/1_kxVGWopc37UkNTehCoHMZB5ps2j_sCM/view?usp=sharing . and try it.

what revision is this version? 65033120 not work. BrowserFetcher, requires me to revision number. I use c#, by the way

Have you downloaded the link I provided? I use nodejs and it works

I downloaded and launched, but it still doesn’t work for me. Probably because I use PurpeterSharp

Ok . You traill download it https://drive.google.com/file/d/1grA3HXc7hDAjSf6fOBJ6S6sv7Hw0y42d/view.

Hey all,
I have a solution with headless that you can run on the server/CI: 4732

bump

who can fix ?

If the site does not want automated logins, there is not much we can do. Try using community packages that could help to work around the issue.


NFT Mints - Silver & Core

We need a silver layer for NFT Project Mints with a core view.
The silver layer implementation is up to the analyst. Each project mint may follow a distinct message structure, so it is advised the primary and secondary work closely on the investigation stage.
Terra projects and active marketplaces may be found on:

https://terrasco.pe/mainnet/projects
https://www.terra.money/ecosystem

The core view that is exposed for querying should follow the structure in Direction below.
To Do

[ ]  Assign primary & secondary analysts
[ ]  Design the schema for this table
[ ]  Get confirmation on schema
[ ]  Build schema
[ ]  Schema build review
[ ]  Submit Pull Request for review by pod

Direction

Column
Data Type
Tests
Documentation

block_id
number
not null, sequence gaps, number format
Also known as block height. The block_id, which indicates the length of the blockchain, increases after the addition of each new block.

block_timestamp
timestamp
One day recent, not null, timestamp format
The date and time the block was recorded.

blockchain
string
not null, string/varchar format
The name of the blockchain.

chain_id
string
not null, string/varchar format
The version of the blockchain.

tx_id
string
not null, string/varchar format
A unique key that identifies a transaction. Called "TxHash" on block explorers.

tx_succeeded
boolean
not null
TRUE if the transaction was successful, FALSE otherwise.

minter
string
not null, string/varchar format
The wallet address of the user that minted the NFT

contract_address
string
not null, string/varchar format
The contract address of the NFT project

token_id
number
not null, number format
The # of the token received in the mint

mint_price
number
not null, number format
The price of the mint in tokens

currency
string
not null, string/varchar format
The currency used to mint the NFT

decimal
number
not null, number format
Divide the amount by POW(10, decimal) to get the amount used in the transaction. This value can be NULL, as decimals are hand curated from an outside source and not found on-chain.

unique_key
string
not null, string / varchar format
The unique key of the table

Contribution Reward
Per the S3 approach, this falls into the project category and contribution incentive will be handled through Coordinape. Expected collaboration is 3-4 individuals with a primary Analyst, primary PR Reviewer and possible secondaries for either the Analyst or Review side of the work.
Issue reward pool: $1,200 in LUNA (token amount determined at time of payment)

I'll get this one and I heard @liltims77 wants to tag along as a secondary analyst.

yeah


Changing splash screen

Currently splash screen looks like this

I changed it to look like this, nothing wild

Yes, I would like to work on this.

Already done in my Pull Request #1075

@shreyasnbhat Hi. I guess you pull request was to center the Tabs in viewpager as it was there in pull request title, here we follow one pull request per issue, so it would be great if you could ask mentor. Thanks.

This would be better. :)
The logo must be bigger than that.
Just Check the Issue #1058
I had posted a suggestion.

What ever you and mentors feel like doing, I'm okay.

Hey @heysadboy  and @shreyasnbhat .
Ideally we suggest everyone to ask before starting to work on an issue which is already open.
Also there should be 1 : 1 mapping between issues and pull requests.
Hence, there can only be one issue fixed in a Pull Request (most of the times)
Hope that makes sense :)


Suggestion: ScalarField

I'm not sure whether this is a dupe of Value Types, I'd like to see a class that somewhat acts like a ComplexType, but should have the following feature set:

No ID
Stored in DB as a single Primitive field
Can be null/not null

I thought of having an interface recognized by EF that when implemented, treats the entity as a complex type (but allows the referring property to be nullable), and only creates one column in the database ignoring the fields in this class. I'm not asking for these fields to be searchable, But sometimes they just need to be stored and take up less columns.
Most of the options below (except for null/not null) can be  achieved with ComplexTypes and use of NotMapped, but it gets really dirty having to decorate all the properties and trying to avoid devs to mess with the DB property, especially when sharing the models in other platforms that do not necessarily use all these attributes, requiring to wrap all those attributes in #if NET462 etc. attrs.
This option allows many fields to be stacked in the DB as a single DB and just stick there without the hassle of taking up many columns. Merely a syntactic sugar, with the addition of allowance of null/not null.
Maybe nullability can be determined in whether the container is a reference type or a value type, but that leads to more complications so I'm gonna leave it alone.
interface IScalarField<TPrimitive> //TPrimitive is what's stored in the DB
{
  TPrimitive Serialize(); //EF will get the value from here
  void Deserialize(TPrimitive persistent); //EF will invoke this when loading entity
}

I'm just gonna type in a couple of examples, so consider this really pseudo because I'm not even gonna highlight this on the IDE.

public Temperature : IScalarField<string>
{
  public decimal Value { get; set; }
  public bool IsCelsius { get; set; }
  char separator = '|';
  public string Serialize() => $"{Value}{separator}{IsCelsius ? 'C' : 'F'};
  public void Deserialize(string persistent)
  {
    var split = string.Split('|', StringSplitOptions.RemoveEmptyEntries);
    Value = decimal.Parse(split[0]);
    IsCelsius = bool.Parse(split[1]);
  }
}

public ScalarTimeSpan : IScalarField<long>
{
  public TimeSpan Value { get; set; }
  public long Serialize() => Value.Ticks;
  public void Deserialize(long persistent) => Value = new TimeSpan(persistent);
}

3:
public ScalarStringCollection : Collection<string>, IScalarField<string>
{
  //override add/set fields to validate separators
  string Serialize() => string.Join(Environment.NewLine, Items);
  void Deserialize(string persistent)
  {
    var split = string.Split(Environment.NewLine, StringSplitOptions.RemoveEmptyEntries);
    AddRange(split);
  }
}

Usage:
public class Entity
{
  public Temperature Temp { get; set; }
  public ScalarStringCollection AllergiesList { get; set; }
  public ScalarTimeSpan Occurrence { get; set; }
}

I once worked on a project that manipulates and stores MIDI data, and also faced a similar issue where you want to store many MIDI flags as a single byte or int. This pattern could have saved a lot of the dirt.
I sure want to hear about better options or what I'm missing.

Possible dupe of #242


Import Synapse React Client components

Fixes #3

This is an incompatibility with Angular v6. They removed support (shim) of process and global variables in browser.

I had the same issue and after a couple of searches I just realize that this error is caused by a breaking change of Webpack 5 (bumped in Angular 12). In previous versions assets were loaded with loaders, now Assets Modules replace all those loaders doc

Unable to load SRC svg images
./node_modules/synapse-react-client/dist/assets/icons/person.svg:1:0 - Error: Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
> <svg width="31" height="31" viewBox="0 0 31 31" fill="none" xmlns="http://www.w3.org/2000/svg">
| <path d="M0 30.9994C0 22.6107 6.80089 15.8099 15.19 15.8099C23.5791 15.8099 30.38 22.6107 30.38 30.9999L0 30.9994Z" fill="#ABABAC"/>
| <path d="M15.4224 13.795C19.2318 13.795 22.3199 10.7069 22.3199 6.8975C22.3199 3.08812 19.2318 0 15.4224 0C11.613 0 8.5249 3.08812 8.5249 6.8975C8.5249 10.7069 11.613 13.795 15.4224 13.795Z" fill="#ABABAC"/>

./node_modules/synapse-react-client/dist/assets/icons/study-active.svg:1:0 - Error: Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
> <svg width="75" height="84" viewBox="0 0 75 84" fill="none" xmlns="http://www.w3.org/2000/svg">
| <path d="M49.8545 69.3071C49.8545 71.1413 51.3411 72.6337 53.1663 72.6337C54.9914 72.6337 56.4765 71.1413 56.4765 69.3071C56.4765 67.4714 54.9914 65.979 53.1663 65.979C51.3411 65.979 49.8545 67.4714 49.8545 69.3071ZM54.1625 69.3071C54.1625 69.8596 53.7153 70.3091 53.1655 70.3091C52.6142 70.3091 52.167 69.8596 52.167 69.3071C52.167 68.7531 52.6142 68.3037 53.1655 68.3037C53.7153 68.3037 54.1625 68.7531 54.1625 69.3071Z" fill="#DDDDDF"/>
| <path d="M46.1641 28.21H36.1562V30.5346H46.1641V28.21Z" fill="#DDDDDF"/>

./node_modules/synapse-react-client/dist/assets/icons/study-complete.svg:1:0 - Error: Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
> <svg width="73" height="83" viewBox="0 0 73 83" fill="none" xmlns="http://www.w3.org/2000/svg">
| <path d="M47.8545 68.3071C47.8545 70.1413 49.3411 71.6337 51.1663 71.6337C52.9914 71.6337 54.4765 70.1413 54.4765 68.3071C54.4765 66.4714 52.9914 64.979 51.1663 64.979C49.3411 64.979 47.8545 66.4714 47.8545 68.3071ZM52.1625 68.3071C52.1625 68.8596 51.7153 69.3091 51.1655 69.3091C50.6142 69.3091 50.167 68.8596 50.167 68.3071C50.167 67.7531 50.6142 67.3037 51.1655 67.3037C51.7153 67.3037 52.1625 67.7531 52.1625 68.3071Z" fill="#DDDDDF"/>
| <path d="M44.1641 27.21H34.1562V29.5346H44.1641V27.21Z" fill="#DDDDDF"/>
...

One approach to get closer to Agora setup could be to configure Angular to build using webpack.


[Bug] Bip39 Wallet generation is not this same as solana-keygen

Describe the bug
I was trying to use SolNet 0.4.12 to generate some wallets which could be imported to Phantom Web Wallet.
However when generating wallets using the library the private keys from the store cannot be imported and are marked as invalid format. Wallets generated by solana-keygen are imported properly.
I tried using automatically generated mnemonics as well as replicating passphrase and word list from the solana-keygen.
The content of the json file generated by the   SecretKeyStoreService.SaveKeystore() is not this same as the one generated by solana-keygen (even when this same words and passphrase is used).
To Reproduce
Use solana-keygen to generate new wallet and save the json file.
Use this same passphrase and word list to generate new wallet using the library
var mnem = "......";   <- put your words list here
**var passPhrase  = "test" **<- replace with pass phrase used in the solana-keygen
var wallet = new Wallet(mnem, WordList.English, passPhrase , SeedMode.Bip39);
Save the wallet using secureKeyStore
_secretKeyStoreService.SaveKeystore(filePath, wallet);
Compare the two json files.
Expected behavior
The content of two generated json files should be this same and the private keys generated by the library should be importable to Phantom wallet.
Desktop (please complete the following information):

OS: Windows10
Browser: Chrome
Version 0.4.12

Please advise if I am missing something or using the library in invalid way.

Unless something changed in solana-keygen you should be using SolanaKeyStoreService and then importing the private key in Phantom, I think that might be what you're looking for? The SecretKeyStoreService implements the web3 secret storage definition here

Hi
Many thanks for an answer - I am using the SolanaKeyStoreService. My secretKeyStoreSerivce is defined like this:
private readonly SolanaKeyStoreService _secretKeyStoreService = new ();
Apologies if the name was a bit confusing.

Hi guys... any update on this?

Hey @Palkos83, thanks for reporting this. We have been completely swamped so took me a little bit before I had time to dive into this. I have figured out the issue and will be patching this today + issuing a new release, stay tuned for 0.4.13 :)

For reference, below is the code snippet I used to dig into this, the hardcoded values were the input to solana-keygen
public class KeyGenerationExample : IExample
    {
        private static string Passphrase = "lol";
        private static string Address = "EXgiwtp6Kr253eaCaNosVXsG8agTHmx1tCWti2awxJxh";
        private static string Words = "perfect try illness mistake dad wage atom habit assume item melt alarm";
        private static SolanaKeyStoreService solanaKeyStoreService;

        public KeyGenerationExample()
        {
            solanaKeyStoreService = new();
        }

        public void Run()
        {
            var mnemonic = new Mnemonic(Words);
            var w = new Wallet.Wallet(mnemonic, Passphrase, Wallet.SeedMode.Bip39);

            Console.WriteLine(w.Account);

            solanaKeyStoreService.SaveKeystore("testfile1", w);

            var w2 = solanaKeyStoreService.RestoreKeystoreFromFile("testfile1", Passphrase);
            Console.WriteLine(w2.Account);
            solanaKeyStoreService.SaveKeystore("testfile1w2", w2);

        }
    }

v0.4.13 has been released and fixes this issue, thanks for reporting :)

Cheers. Many thanks for the fast response.


⚠ gorzdrav.org has degraded performance

In 98636f6, gorzdrav.org (https://gorzdrav.org) experienced degraded performance:

HTTP code: 200
Response time: 2421 ms

Resolved: gorzdrav.org performance has improved in 55e32ef.


Prefer a Map

The complexity for indexOf is O(n), but for a Map.has() is O(1).
So the more URL will be hit, the more this plugin will slow down
https://github.com/manju4ever/fastify-impressions/blob/67edec149e9b68fdbb0e8b2fc69836a8cf4723c1/index.js#L12

Fix pushed to 1.0.4


Update Footer.tsx

updating footer

@priyankarpal  pls verify this one

doesn't make any sense

Before
After


Make idle connection timeout configurable

Currently we have the inactive timeout value hardcoded in the code, see: https://github.com/sosedoff/pgweb/blob/b6167ce422ee26113222503df60932adc2736ba2/pkg/client/client.go#L369
This should be configurable using 2 new cli options:

--disable-connection-idle-timeout - Turn off the feature
--idle-timeout - Set the timeout value

Can I take this?

Go for it!

I am sorry, but I am not able to figure out how I should fix this. Any help?

If you still want to implement this feature, here's a few things to do:

add cli option --idle-timeout (int) to specify maximum connection idle time in minutes, default to 3 hours (180 mins)
add option --disable-connection-idle-timeout (bool) to disable the timeout feature altogether
adjust the logic in the session cleanup worker here: https://github.com/sosedoff/pgweb/blob/master/pkg/api/session_cleanup.go

Is fixing client.IsIdle() func up to using with 2 new clli flags enough?
Or i missunderstood session cleanup worker?

Yeah, 2 new flags should control how the cleanup worker terminates idle connection. If we have --disable-connection-idle-timeout set to false we should just turn off the worker here https://github.com/sosedoff/pgweb/blob/master/pkg/cli/cli.go#L201

https://github.com/ldinc/pgweb/commit/3067b06bf6e8b7f0efd6849983bd4205ddb48915
Or better change timeout minutes from float64 to int?

This has been implemented via the following flags:
--no-idle-timeout  Disable connection idle timeout (false)
--idle-timeout=    Set connection idle timeout in minutes (180)


Is it possible to translate a "sub-attribute" ?

Hi!
amazing this integration! thank you so much!
I was wondering if it works even with a "sub-attribute". I have the "weather.forecast_casa" integration with these attributes:
temperature: 12.3
dew_point: 9.8
temperature_unit: °C
humidity: 84
cloud_coverage: 100
pressure: 1020.9
pressure_unit: hPa
wind_bearing: 359.7
wind_speed: 6.5
wind_speed_unit: km/h
visibility_unit: km
precipitation_unit: mm
forecast:
- **condition: cloudy**
  datetime: '2024-02-16T11:00:00+00:00'
  wind_bearing: 359.7
  temperature: 12.3
  templow: 9.7
  wind_speed: 7.2
  precipitation: 0
  humidity: 84
- condition: sunny
  datetime: '2024-02-17T11:00:00+00:00'
  wind_bearing: 15.2
  temperature: 17.8
  templow: 5.6
  wind_speed: 12.6
  precipitation: 0
  humidity: 62
- condition: sunny
  datetime: '2024-02-18T11:00:00+00:00'
  wind_bearing: 77.9
  temperature: 17.4
  templow: 5.3
  wind_speed: 12.6
  precipitation: 0
  humidity: 67
- condition: cloudy
  datetime: '2024-02-19T11:00:00+00:00'
  wind_bearing: 173.4
  temperature: 14.1
  templow: 5.9
  wind_speed: 11.9
  precipitation: 0.4
  humidity: 76
- condition: partlycloudy
  datetime: '2024-02-20T11:00:00+00:00'
  wind_bearing: 0.1
  temperature: 16.7
  templow: 5.3
  wind_speed: 18
  precipitation: 0.1
  humidity: 57
- condition: sunny
  datetime: '2024-02-21T11:00:00+00:00'
  wind_bearing: 179.3
  temperature: 14.6
  templow: 3
  wind_speed: 12.2
  precipitation: 0
  humidity: 64

attribution: Weather forecast from met.no, delivered by the Norwegian Meteorological Institute.
friendly_name: Forecast FrustyHome
supported_features: 3

And how you can see the bold "condition" is under the first "forecast". If I use this statement:
{{ state_attr('weather.forecast_casa', 'forecast')[0].condition }}
I have "cloudy" as an output... how could I use your integration to translate it? I tried with :
test: {{ ct_state_attr_translated("weather.forecast_casa", "forecast[0].condition", "en") }}
but the output is "None"
Is it possible to use your integration to translate this "sub-attribute" (I don't know how to call it :D ) ?
Thanks!

No, it's not possible (there's no such translations in HA). But there's a workaround:
check all available translations using:
{{ ct_all_translations("en") }}

find translations for weather entities, create a matching key using desired attributes and translate it using ct_translated:
{{ ct_translated("component.weather.entity_component._.state." + state_attr('weather.forecast_casa', 'forecast')[0].condition, "en") }}

just perfect!! thank you so much! ;)

You're welcome 😉


Improvements to zwave lock platform

Description:
Improvements to the zwave lock platform.
Locks that uses the notification cc does not provide state in the old command_class_door_lock.
It is still used as a fallback for devices using this command_class.
Also support for attribute how the lock was locked/unlocked via the notification cc.
Available datas are:
'Manual Lock',
'Manual Unlock',
'RF Lock',
'RF Unlock',
'Keypad Lock',
'Keypad Unlock',
'Unknown Event'

Looks good over here 👍


Use faster hash function and track collisions?

In this Reddit comment, it is suggested that C#'s hashmap implementation outperforms Rust's on a particular benchmark because C#'s uses a fast-but-dos-vulnerable hash function by default, tracks the number of collisions, and switches to a dos-resistant hash function above a certain threshold of collisions. I am taking the comment author's word for it that this is C#'s behavior (from a brief skim of the source code, it seems like maybe this is where it's implemented?). Regardless, it sounds like a reasonable idea:

Roughly speaking, a hash table is DoS resistant if an attacker is not able to significantly alter its performance characteristics (such as making lookup and insertion behave as linear time operations); if an attacker is only able to make hash table operations, say, a few times slower, this is probably fine for most applications - even those that are exposed to untrusted inputs
The overhead of tracking the number of collisions is likely small compared to the performance gains of a non-dos-resistant hash function
This is just speculation, but intuition tells me that it ought to be possible to choose a collision threshold that is both fairly low (and thus doesn't allow an attacker to pessimize hashmap performance that significantly) and is still higher than the number of collisions that will be encountered during most non-malicious workloads

Has an approach like this ever been considered for hashbrown? Given that both hashbrown and the standard library make no stability guarantees about their default hash function, this ought to be a backwards-compatible change. Finally, users who are especially concerned with DoS resistance could still pick a specific hash function in order to retain today's DoS resistance behavior.

I think a better solution would be to just improve the performance of SipHash. This was attempted in https://github.com/rust-lang/rust/pull/69152 but didn't land due to the increased compilation times.
I'm concerned that adding more complexity to the hasher might be a net slowdown (it's definitely going to negatively affect compilation times). However feel free to give it a try if you think it can be an improvement.

Sounds good! Likely won't be any time soon that I'll have time to take a stab at this - if anyone else reads this and is interested, don't hold back on my account.


Updating NodeRed breaks Node

Hello
I noticed my Roomba stopped working a while ago. I've been testing stuff for a while now and I noticed the node doesn't seem to be doing anything. I can send any command I want into either the basic- or get-node. They don't seem to be doing anything. There is no output in the debug-whatsover and no errors are shown.
Is there a possilibty it's not compatible with one of the recent updates to Node Red? I run Node.Js v 18 and Node Red v3.02.
As a way of troubleshooting I ran my flows in a new docker container with Node Red v3.01 and Node.Js 16 which worked without any issues.
Any help would be greatly appreciated.
Regards

See PR https://github.com/somebuddy87/node-red-contrib-roomba980/pull/5 to meke it work


[Task]: Fix flakiness of cypress/e2e/Regression/ServerSide/GenerateCRUD/MySQL2_Spec.ts

SubTasks
Tested flakiness in this PR https://github.com/appsmithorg/appsmith/pull/33856

Hey team! Please add your planning poker estimate with Zenhub @AmanAgarwal041 @carinanfonseca @rishabhrathod01 @rohan-arthur @sneha122


Re-organized theme, Glide Add, Login indicator, Fix crash at user-detail, etc

Also fixed some sites that have potenial null-ptr problems.
Add login indicator when login.
Use TextInputEditText and TextInputLayout to handle input error on "hello".
Chinese support for "register unsuccessfully".
Support "enter" login instead dismiss keyword and click manually.
Use Glide to load "checkcode", but not works , can not get image, check backend is needed.
Re-organized theme files of the app, specify a theme to "hello" pages.
Reduce class structor of activites.

using glide to show check code?  i think it may let register failure,because i use okhttp request checkcode use cookie. are you sure register (request check code)still work?

@

@Thereisnospon The idea of using Glide is that this library brings stable image-loading process. OK, it might be some confused collections on me, but I'd reset this change when cookie will be used for this train.  Some reason of this change is that I've never seen an image or something like when the app tries to get "check code" from server.
? Might be good this http://stackoverflow.com/questions/28106527/glide-adding-header-to-request

@XinyueZ  i fixed it (checkcode)


fix: detect case-sensitive filesystems correctly under yarn PnP

yarn in PnP mode uses a virtual filesystem, and adding the preferUnplugged: true flag forces it to write this package to the real filesystem. This is needed so the case-sensitive detection logic in resolve.js works properly.

Can you link to the documentation here?
This sounds like a bug in yarn PnP, to be honest; why should i add bytes to the package.json for all users, when yarn could fix it for yarn pnp users?

No, this is intentional in yarn: https://github.com/yarnpkg/berry/issues/1762
Juat a little background: The virtual filesystem in yarn is an optimization, so when installing packages you are not making a gazillion real filesystems calls like npm does to create the node_modules folder.
This field in package.json simply tells yarn to place this package somewhere on the real filesystem.
Also, IMO a few extra bytes in the package.json is pretty trivial. It's also arguably not unreasonable to decentralize this kind of data across potentially millions of packages, rather than centralize this kind of data in one place.

On the contrary; the minority of yarn users are who should pay the cost, not everyone else.

Just out of curiosity (I’m not intending to defend yarn or fight any ideological battle here), but do you aim for this package to specifically only support npm, or does it aim to be as support as many users as possible given there are three package managers in the JS ecosystem (npm, pnpm, yarn)?
If this package only supports npm, then sure, even adding a single byte in this package to support any other package manager would be inconveniencing the only users of this package, who should be using npm.

There’s one package manager that is the standard and has the majority, and whose behavior is correct by definition; I’m happy to support the others when it doesn’t hurt the primary audience.
If yarn’s virtual filesystem does not exactly mimic the native one, then it has a bug, and it should be fixed.

There’s one package manager that is the standard and has the majority, and whose behavior is correct by definition

If yarn’s virtual filesystem does not exactly mimic the native one, then it has a bug, and it should be fixed.

While I can appreciate that standpoint, I’m not sure how widespread this opinion that by /definition/ every single npm implementation detail is automatically standard and correct, and there is no room for package managers to differ.
If you take a look at the PnP page (https://yarnpkg.com/features/pnp#compatibility-table), you can see a large variety of packages like webpack, eslint, babel, prettier, gulp all have added explicit compatibility with yarn PnP.

I’m happy to support the others when it doesn’t hurt the primary audience.

Firstly, I’m open to alternative suggestions here. For example, instead of a metadata field in package.json, could this package detect PnP via process.versions.pnp and set the value of CASE_SENSITIVE_FS to true in that case?
Can you define what you mean by hurt? For example, would adding even a single byte to the download that would be unnecessary for a npm user be harmful?

Certainly the mechanism in this PR is likely the least intrusive one available (altho yarn-specific metadata should really be inside a yarn object, instead of littering the top level with stuff)
Some of it is philosophical - just because some major packages have been effectively strong-armed into adding this metadata, doesn't mean that endorsing this dark pattern is something I want to do as a package author.

Okay. I'm trying to think of other ways to try to solve this, such as passing an explicit configuration option to tell this package whether the filesystem is case-sensitive or not (instead of having it detect it automatically), or perhaps using pkg-dir to detect the case-sensitivity of the project's package.json (which of course is on the real filesystem):
-const CASE_SENSITIVE_FS = !fs.existsSync(path.join(__dirname.toUpperCase(), 'reSOLVE.js'));
+const CASE_SENSITIVE_FS = !fs.existsSync(path.join(pkgDir.sync(__dirname).toUpperCase(), 'pacKAGE.json'));

If package.json is always on the local filesystem, that seems like totally reasonable thing to check instead, if that bypasses yarn's bug.

if that bypasses yarn's bug.

It's possible to mount the node_modules folder to a different drive using a different file system when using npm as well, shouldn't the check be testing on the file getting linted instead?

Absolutely, that's a really good point. Want to make that change?

shouldn't the check be testing on the file getting linted instead?

Can you elaborate more on what you mean?
There are special-cases likepackage.json or files inside a published npm package where you could assume a case, but for a user-generated file, it could be named anything -- like MyRAnDoMFiLE.js -- and it's not clear to me how you could tell a file access succeeding on a case-sensitive filesystem (because the file is /really/ named like that) or on a case-insensitive filesystem (because the filesystem doesn't care.)
I'm sure there may be operating system APIs that could do this, but does nodejs expose any of them?

I don't think node has any API to expose that, unfortunately.
One technique would be to find a filename, and a variant, that don't exist - write one, and check to see if the variant suddenly exists - but this would just be another heuristic, not a guarantee.
We could use fs.readdir(path.dirname(currentFilename)) - and find a filename that exists, but who has a capitalization variant that does not exist - and then see if the variant exists directly?

@charlessuh any interest in updating the check?

It looks like there is already logic in fileExistsWithCaseSync to query an expected filename, and see if the filename is the same case when you list the directory via readdir: https://github.com/import-js/eslint-plugin-import/blob/main/utils/resolve.js#L53-L56.
However, note this function returns early when CASE_SENSITIVE_FS is true. I've updated this PR to stop checking that variable -- so case sensitivity is now queried on a per-file basis.

@charlessuh hm, removing the utils change doesn't cause any of the tests to fail. Is there any way we could add a test for that?


Fix deployment problems

For some reason this version doesn't deploy successfully. I thought I was just a problem with an out-of-date version of node in the GitHub Action for deployment, but that doesn't seem to be the case. Not sure what the problem is.

Actually it is working correctly. It's just that none of the recent commits have changed what is produced by the build so there is nothing new to commit to the gh-pagea branch.


generating const configs with bash script

We found environment variables are not passed in powershell task when using VSTS Linux agent. The PR replaces deployment/createconstants.ps1 with CreateConstants.sh bash script to generate const configs.

Codecov Report

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

@@           Coverage Diff           @@
##           master      #91   +/-   ##
=======================================
  Coverage   52.24%   52.24%
=======================================
  Files          96       96
  Lines        1405     1405
=======================================
  Hits          734      734
  Misses        671      671

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 7147c02...13445dd. Read the comment docs.

Coverage remained the same at 48.746% when pulling 13445dd9fca12a791c14338f1992507b6e4da94a on createconst_with_bash into 7147c029077b6c62bdf2cb9af2b69badad123215 on master.

Only modified createconstants.ps1 in deployment directory is removed. The original createconstants.ps1 is still in cfg directory for fallback. Windows agent supports Bash task too. However, I am fine with keeping the copy in cfg directory after the Build working just in case we can use it in some ways.


Registration Does Not Appear when an event is placed in 'Other Opportunities & Training Tab'

There is an issue with the registration process rendering when a logged-in user opens an event listed in the Other Opportunities & Trainings Tab. We would like for events on this tab to mimic AP registration when the "prevent registration tab" is not selected.
Additionally, change heading on this tab to "The following are events, trainings or resources of interest offered by MARE and other partner agencies. "

Registration was explicitly turned off for these events.  Turning registration back on should be trivial.


Update README.md

Added a brief instruction for stopping the bot and checking its resource usage.

thanks


Some questions about the code

Dear author, thank you for your outstanding contribution. I would like to ask a few questions. Firstly, what can the checkpoint.pth file and eval.pth file be used for here? Secondly, I have tried to write visualization code for model results, but due to my lack of understanding of some parameters, many problems have arisen, making it difficult to obtain images similar to those obtained by the author in the paper, May I ask if the author can provide visual code for running out of the model? If so, it would be greatly appreciated. Looking forward to your prompt reply, thank you!

Thanks for your interest in our work.
The 'checkpoint.pth' file saves and can be used to resume the training status such as optimizer and model parameters. While the 'eval.pth' file preserves the evaluation results. You can check the main.py for details.
For the second question, we haven't tidied up the code for the visualization yet.
Maybe you can refer to the visualization code located at the following site.
https://github.com/leoxiaobin/deep-high-resolution-net.pytorch/blob/master/visualization/plot_coco.py

Hello, author. I tried this code, but it requires a JSON file for predicting the results. The code you provided did not generate the corresponding file. Is there any method to generate a JSON file for predicting the results? Looking forward to your reply.

Yes. If you directly use their code, you need to convert the output of your model into a JSON file and then run visualization. But, you can also try to integrate their visualizing part into our eval function to build a demo.

Thank you for the author's reply. I tried to visualize in the 'evaluate' section of 'engine', but a lot of points were drawn on the graph, approximately 850: 17 x 50, which means that there are 50 instances included, which may be related to 'label'. However, in my 'result', all 'labels' are tensors of 50 ones, which do not match the ones in the targets. I found the post-processing code and found that the code used to distinguish categories is' labels=topk'_ Indexes% out_ Logits. shape [2] ',' topk_ Indexes' are all odd numbers, 'out'_ Logits. shape [2]=2 ', so all labels are 1. Logically speaking, there should be as many people as there are on the way. May I ask what may be the reason for this and how can we solve it? Looking forward to the author's recovery, thank you.

Perhaps you should filter the output based on the predicted score rather than simply selecting the top 50.

What is the threshold

You can manually set it. The closer you get to 1, the fewer candidate poses there will be.

Hello author, I am glad to receive your reply. I tried to set the score threshold to 0.4, but some of the key points of some characters in the images were not drawn. However, I set the threshold to 0.3. Although the key points on this image were drawn, others without people were also marked with points, so I am not sure how much I should set this threshold to, nor am I sure if the author has encountered similar problems, Or is the model I reproduced myself not good enough? Looking forward to the author's reply, thank you.

Try to set a small threshold and use NMS to remove any duplication.

In the model or where I drew the picture？

You can modify the post-process part, using a small threshold to filter the output poses by their scores, as well as adopting NMS to remove any duplication among them.

Ok, thank you for your reply. I'll try it first


Allow for downvotes?

It would be convenient to be able to have a downvoting option. (I note that Hacki has this feature.)

Would be a nice addition. A slight complication is that downvoting is not available for users until they reach 501 karma, and the app currently does not keep track of a logged in user's karma count.

Maybe a minimal solution could be to have it as an "opt-in" feature in the settings, with a warning about it not working in the case of having under 501 karma?

Implemented in 1c5c896179985b9cb4294794fd9cf66775a0b2ef with an opt-in setting.


Transformed bitmap plots

WIP for transformed bitmap plots
for now, only includes the ability to create and combine 2D affine transform buffers
support will need to be added to vdp-gl to accept an affine transform to apply when drawing a bitmap
as of 20th May, preliminary attempt at transformed bitmap plotting added.  unfortunately at this time the drawing system in vdp-gl appears to crash immediately after plotting - the cause of this issue has not yet been tracked down

this test program should draw a transformed bitmap, in 16-bit BBC BASIC.  NB you need to have resources/pacman1.rgb from the Quark BBC BASIC repository for this to work:
10 REM transformed bitmap plot test
20 MODE 8
25 col = 2 : col2 = 9 : tcol = 5
30 MB% = &40000
40 W% = 16 : H% = 16
50 DIM graphics 1024
60 OSCLI("LOAD ../resources/pacman1.rgb "+STR$(MB% + graphics))
190 REM send RGBA2222 data to VDP buffer 2
195 offset% = 0 : byte% = 0 : bit% = 0
196 VDU 23, 0, &A0, 2; 2
200 VDU 23, 0, &A0, 2; 0, W%*H%;
210 FOR I%=0 TO (W%*H%*3)-1 STEP 3
220   r% = ?(graphics+I%+0) DIV 64
230   g% = ?(graphics+I%+1) DIV 64
240   b% = ?(graphics+I%+2) DIV 64
250   a% = r% OR g% OR b%
260   p% = a% * 64 + b% * 16 + g% * 4 + r%
270   VDU p%
280 NEXT
290 REM set buffer to be a bitmap
300 VDU 23, 27, &20, 2;
310 VDU 23, 27, &21, W%; H%; 1
320 REM set up some transform buffers
330 VDU 23, 0, &A0, 10; 2
340 REM rotate by 10 degrees
350 VDU 23, 0, &A0, 10; &20, 2, &C0, 5;
360 REM main transform - translate by half width and height, then scale by 2
370 VDU 23, 0, &A0, 11; 2
380 VDU 23, 0, &A0, 11; &20, 5, &C0, -8; -8;
390 VDU 23, 0, &A0, 11; &20, 4, &C0, 2; 2;
400 REM Set the transform to be used
410 VDU 23, 0, &96, 1, 11;
420 MOVE 640, 512
430 REM plot bitmap in a loop, incrementing the angle every time
440 REM REPEAT
450   PLOT &E9, 0, 0
460   REM VDU 23, 0, &A0, 11; &20, 2, &C0, 5;
470   REM *FX 19
480 REM UNTIL FALSE

to get this code to work in ADL BBC BASIC you'd just need to remove the MB% stuff