Mainly, packaged extensions

I am unsure about some stuff regarding the packaged extension, namely the warning when running webpack:
Critical dependencies: the request of a dependency is an expression.

This is emitted for glslify, but the packaged extension still seems to run.
Secondly the 'vscode.prepublish' script is probably run by you @stevensona, but I don't know for sure.
Closes #83
Closes #86 by fixing the documentation
Closes #81 by providing a cubemap loading feature
Adds a "Create Portable GLSL Preview" feature which exports the generated file (with some modifications) to html right next to the shader

Now this also closes #85

Sorry for delay on this--it has been kind of crazy around here with the pandemic.
I'm not familiar with the warning but did read through this.
You're right it does seem like it works anyway. If we have any issues, we can rollback.
Cheers.

No worries, I totally understand. It's the same surreal situation here.


Deep modules location mis-proccessed.

terrascan version: Latest (2c964d54cb798d1dd5de05836af13ca5684ffb7c)
Operating System: OS X (Darwin MacBook-Pro.local 18.7.0 Darwin Kernel Version 18.7.0: Mon Aug 31 20:53:32 PDT 2020; root:xnu-4903.278.44~1/RELEASE_X86_64 x86_64)

Description
I have  a situation where I am using several modules together.  For simplicity, we will just call them m1, m2, and m3. m1 is consumed from my main terraform template and it consumes m2 and m3. When I try and run terrascan, it incorrectly parsers the directory in the module as relative to absRootDir instead of relative to the location of m1.
The file system would look like this
/tf/template.tf
/tf/modules/m1/main.tf
/tf/modules/m2/main.tf
/tf/template.tf  contains a call like:
module "m1" {
    source "./modules/m1/"
}

/tf/modules/m1/main.tf contains a call like
module "m2" {
    source "../m2/"
}

That works just fine in terraform and it parses them correctly.

What I Did
When I run terrascan on the directory though, I get the following error
$ terrascan scan -t aws
2020-10-29T10:08:46.046-0700	error	v12/load-dir.go:110	failed to build unified config. errors:
<nil>: Failed to read module directory; Module directory /tf/m2 does not exist or cannot be read.

I tossed some debugging in to see how it is parsing it internally into the module walker function:
2020/10/29 10:16:11 req.Path.String(), is m1
2020/10/29 10:16:11 req.SourceAddr, is ./modules/m1
2020/10/29 10:16:11 Created path to module as  /tf/modules/m1
2020/10/29 10:16:11 processing local module "./modules/m1"
2020/10/29 10:16:11 req.Path.String(), is m1.m2
2020/10/29 10:16:11 req.SourceAddr, is ../m2
2020/10/29 10:16:11 Created path to module as  /tf/m3
2020/10/29 10:16:11 processing local module "../m2"

The code added at the end of the if statement at line 84 in pkg/iac-providers/terraform/v12/load-dir.go to generate the above is:
log.Println("req.Path.String(), is", req.Path.String())
log.Println("req.SourceAddr, is", req.SourceAddr)
log.Println("Created path to module as ", pathToModule)
log.Printf("processing local module %q", req.SourceAddr)

I think the mistake is this code here (still in the if statement that starts at 84):
pathArr := strings.Split(req.Path.String(), ".")
pathArr = pathArr[:len(pathArr)-1]
pathToModule = filepath.Join(absRootDir, filepath.Join(pathArr...), req.SourceAddr)

Instead of looking at the req.Path.String, it should be looking at req.Parent.SourceAddr.  If that were used instead, it would result in pathToModules containing the following values:
absRootDir = "/tf/"
req.Parrent.SourceAddr = "./modules/m1"
req.SourceAddr = "../m2"

which would get combined with the filepath.Join to result in
pathToModule = "/tf/modules/m2"

The commit above is a working fix, I haven't had a chance to look at how you are handling testing in here so I haven't created a PR.

Hi @salexpdx ,
We had an exact same issue in the past and the PR raised by @guilhem for the same.
Moreover, I tried the same scenario again on my local setup with the latest master. I am not able reproduce the same.
Here's how my directory structure looks lik:
➜  ~ tree tf-example
tf-example
├── cloudfront
│   └── main.tf
└── root
    └── main.tf

root/main.tf:
➜  ~ cat tf-example/root/main.tf
provider "aws" {
  region = "us-east-1"
}

module "cloudfront" {
  source = "../cloudfront"
}

cloudfront/main.tf:
➜  ~ cat tf-example/cloudfront/main.tf
resource "aws_cloudfront_distribution" "s3-distribution-TLS-v1" {
  origin {
    domain_name = "aws_s3_bucket.b.bucket_regional_domain_name"
    origin_id   = "local.s3_origin_id"

    s3_origin_config {
      origin_access_identity = "origin-access-identity/cloudfront/ABCDEFG1234567"
    }
  }

  enabled = true

  default_cache_behavior {
    allowed_methods  = ["DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT"]
    cached_methods   = ["GET", "HEAD"]
    target_origin_id = "local.s3_origin_id"

    forwarded_values {
      query_string = false

      cookies {
        forward = "none"
      }
    }
    viewer_protocol_policy = "https-only"
  }

  ordered_cache_behavior {
    path_pattern     = "/content/immutable/*"
    allowed_methods  = ["GET", "HEAD", "OPTIONS"]
    cached_methods   = ["GET", "HEAD", "OPTIONS"]
    target_origin_id = "local.s3_origin_id"

    forwarded_values {
      query_string = false
      headers      = ["Origin"]

      cookies {
        forward = "none"
      }
    }

    compress               = true
    viewer_protocol_policy = "allow-all"
  }

  ordered_cache_behavior {
    path_pattern     = "/content/*"
    allowed_methods  = ["GET", "HEAD", "OPTIONS"]
    cached_methods   = ["GET", "HEAD"]
    target_origin_id = "local.s3_origin_id"

    forwarded_values {
      query_string = false

      cookies {
        forward = "none"
      }
    }

    viewer_protocol_policy = "allow-all"
  }

  restrictions {
    geo_restriction {
      restriction_type = "whitelist"
      locations        = ["US", "CA", "GB", "DE"]
    }
  }

  viewer_certificate {
    cloudfront_default_certificate = true
    minimum_protocol_version       = "TLSv1" #expected version is TLSv1.1 or TLSv1.2
  }
}

locals {
  s3_origin_id = "myS3Origin"
}

Running terrascan on this directory structure:
➜  ~ terrascan scan -t aws -d ~/tf-example/root
results:
  violations:
  - rule_name: cloudfrontNoHTTPSTraffic
    description: Use encrypted connection between CloudFront and origin server
    rule_id: AWS.CloudFront.EncryptionandKeyManagement.High.0407
    severity: HIGH
    category: Encryption and Key Management
    resource_name: s3-distribution-TLS-v1
    resource_type: aws_cloudfront_distribution
    file: ../cloudfront/main.tf
    line: 1
  - rule_name: cloudfrontNoHTTPSTraffic
    description: Use encrypted connection between CloudFront and origin server
    rule_id: AWS.CloudFront.EncryptionandKeyManagement.High.0407
    severity: HIGH
    category: Encryption and Key Management
    resource_name: s3-distribution-TLS-v1
    resource_type: aws_cloudfront_distribution
    file: ../cloudfront/main.tf
    line: 1
  - rule_name: cloudfrontNoLogging
    description: Ensure that your AWS Cloudfront distributions have the Logging feature enabled in order to track all viewer requests for the content delivered through the Content Delivery Network (CDN).
    rule_id: AWS.CloudFront.Logging.Medium.0567
    severity: MEDIUM
    category: Logging
    resource_name: s3-distribution-TLS-v1
    resource_type: aws_cloudfront_distribution
    file: ../cloudfront/main.tf
    line: 1
  count:
    low: 0
    medium: 1
    high: 2
    total: 3

That example only shows a single module depth.  I created a quick test case that shows the issue when you embed a module within a module. https://github.com/salexpdx/terrascan/commit/68c7601094869c0f2b8ebfa92f6ae41e15e78578
terraform init
Initializing modules...
- m1.m2 in modules/m2
- m1.m3 in modules/m3

Initializing the backend...

Initializing provider plugins...
- Checking for available provider plugins...
- Downloading plugin for provider "aws" (hashicorp/aws) 2.58.0...

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.

terraform plan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

module.m1.module.m2.data.aws_iam_policy_document.readbuckets: Refreshing state...

------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # module.m1.aws_s3_bucket.bucket will be created
  + resource "aws_s3_bucket" "bucket" {
      + acceleration_status         = (known after apply)
      + acl                         = "private"
      + arn                         = (known after apply)
      + bucket                      = "tf-test-project-dev"
      + bucket_domain_name          = (known after apply)
      + bucket_regional_domain_name = (known after apply)
      + force_destroy               = false
      + hosted_zone_id              = (known after apply)
      + id                          = (known after apply)
      + policy                      = jsonencode(
            {
              + Statement = [
                  + {
                      + Action    = [
                          + "s3:GetObject",
                        ]
                      + Effect    = "Allow"
                      + Principal = "*"
                      + Resource  = [
                          + "arn:aws:s3:::tf-test-project-dev/*",
                        ]
                      + Sid       = "PublicRead"
                    },
                ]
              + Version   = "2012-10-17"
            }
        )
      + region                      = (known after apply)
      + request_payer               = (known after apply)
      + website_domain              = (known after apply)
      + website_endpoint            = (known after apply)

      + versioning {
          + enabled    = (known after apply)
          + mfa_delete = (known after apply)
        }
    }

Plan: 1 to add, 0 to change, 0 to destroy.

------------------------------------------------------------------------

Note: You didn't specify an "-out" parameter to save this plan, so Terraform
can't guarantee that exactly these actions will be performed if
"terraform apply" is subsequently run.

terrascan output
../../../../../../bin/terrascan scan -t aws
2020-10-30T09:33:46.429-0700	error	v12/load-dir.go:110	failed to build unified config. errors:
<nil>: Failed to read module directory; Module directory /.../terrascan/pkg/iac-providers/terraform/v12/testdata/deep-modules/m2 does not exist or cannot be read., and 1 other diagnostic(s)


toolkit is freezing YNAB for me.

Name of Defective Feature
Toolkit is disabling YNAB
System Settings (Required)
ToolKit Version:
Operating System (Mac/Windows/Etc): Mac
Browser (Chrome/Firefox/Safari):Chrome
Browser Version:
Other Extensions:
Export of Toolkit Settings (Bottom Left of Settings Page)
[paste settings here]

Steps to Reproduce the Behavior
Please write down the steps necessary to reproduce the behavior you're seeing. Please be as thorough as possible.

Expected Behavior
What did you expect would happen after completing the steps?
Actual Behavior
What actually happened after you completed the steps.

Not really sure what this means but I suspect it's related to Issue #892. @sdale80 please look at #892 and report back if that's is the same thing you're seeing. If so, please close this issue. Thanks.

YNAB released an update which broke many features this looks to be one of them. I'm going to tag issues #892 so that we have reference to this issue and close this one. If you still experience the issue after our next release, please reopen.


Flashlights are manufactured with charged power cell inside

Flashlights are made in protolathe with charged power cell inside. Not only that, but normally the cell itself is MUCH more expensive to make than flashlight itself, and requires gold!
Additionally making flashlight is cheap as hell from $$$ side (~38.38$ costs cargo to order materials for it) and sells for ALOT (168$, which means ~130$ for each sold flashlight)

For additional context. I found it on my private test server. And then double checked on Wizard's Den Salamander if this wasn't fixed already

I think the easiest solution to this problem would be to buff the material cost for manufacturing a flashlight. It should be something like this:

400 steel
400 glass
200 plastic
10 gold

This was calculated by adding the material cost of a power cell with those of a flashlight. I'll try to address this in my own branch.

I think the easiest solution to this problem would be to buff the material cost for manufacturing a flashlight. It should be something like this:

400 steel
400 glass
200 plastic
10 gold

This was calculated by adding the material cost of a power cell with those of a flashlight. I'll try to address this in my own branch.

I think the easiest solution to this problem would be to buff the material cost for manufacturing a flashlight. It should be something like this:
* 400 steel

* 400 glass

* 200 plastic

* 10 gold

This was calculated by adding the material cost of a power cell with those of a flashlight. I'll try to address this in my own branch.

i would suggest just making a prototype variation of the flashlight that starts without a cell inside of it. Then, simply switch the lathe recipe result to be that prototype.

I think the easiest solution to this problem would be to buff the material cost for manufacturing a flashlight. It should be something like this:
* 400 steel

* 400 glass

* 200 plastic

* 10 gold

This was calculated by adding the material cost of a power cell with those of a flashlight. I'll try to address this in my own branch.

i would suggest just making a prototype variation of the flashlight that starts without a cell inside of it. Then, simply switch the lathe recipe result to be that prototype.

just make it spawn without a cell

just make it spawn without a cell

i would suggest just making a prototype variation of the flashlight that starts without a cell inside of it. Then, simply switch the lathe recipe result to be that prototype.

just make it spawn from the lathe without a cell

Will do.

i would suggest just making a prototype variation of the flashlight that starts without a cell inside of it. Then, simply switch the lathe recipe result to be that prototype.

just make it spawn from the lathe without a cell

Will do.


REMOTE_ADDR behind Proxy - Modsec doesn't receive fastcgi_param adjusted values.

We are running ModSec behind an Nginx Reverse Proxy, but not Nginx -> Apache.
We have Nginx up front as a caching reverse proxy, and we are passing back to an Nginx FastCGI/PHP-FPM Backend.
ModSec sits on the back, guarding the dynamic requests only. In general its turned out to be an excellent solution, inspired from Trustwaves performance recommendations but without needing to involve anything else in the stack, rather its just an interesting Nginx configuration.
https://www.trustwave.com/en-us/resources/blogs/spiderlabs-blog/modsecurity-performance-recommendations/
Any cached requests fly, with only dynamic requests suffering from the ModSec weight.
However... the inability to access and rewrite REMOTE_ADDR in the back is problematic.
Basic config:
upstream proxy {
     server <IP_ADDRESS>:8080;
}

server {
    listen 443 ssl http2};
    listen [::]:443 ssl http2;

    server_name site.url;

    ... skip cache whatever else here ...

    location / {
        proxy_cache_bypass $skip_cache;
        proxy_no_cache $skip_cache;
        proxy_cache PROXYCACHE;
        more_set_headers 'X-Grid-Cache-TTL $cache_ttl';
        more_set_headers 'X-Grid-Cache-Skip $skip_reason';
        more_set_headers 'X-Grid-Cache $upstream_cache_status';
        set $http_x_accel_expires $cache_ttl;
        proxy_hide_header X-Powered-By;
        proxy_set_header Host $host;
        proxy_set_header X-Original-Host $http_host;
        proxy_set_header X-Original-Scheme $scheme;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://proxy;
    }
}

server {
    listen 8080;
    listen [::]:8080;

    server_name site.url;

    allow <IP_ADDRESS>;
    deny all;

    ... root, logs, index, whatever ...

    modsecurity on;
    port_in_redirect off;

    location / {
        modsecurity_rules_file /etc/nginx/modsec/main.conf;
         try_files $uri $uri/ /index.php?$args;
         ... etc ...
    }

    location ~ \.php$ {
        modsecurity_rules_file /etc/nginx/modsec/main.conf;
        try_files $uri =404;
        fastcgi_split_path_info ^(.+\.php)(.*)$;
        include fastcgi_params;
        include /etc/nginx/extra.d/php-context.conf;
        include /etc/nginx/extra.d/*-php-context.conf;
        fastcgi_param HTTPS on;
        fastcgi_pass unix:/var/run/php/php73-site.url.sock
        http2_push_preload on;
    }
}

So the problem is that when an event happens, its logged as the localhost <IP_ADDRESS>
This is not so much of a big deal, as i can target rule exceptions using the ID and things like headers, or setting cookie values:
SecRule REQUEST_HEADERS:X-Real-IP "@pm <IP_ADDRESS> <IP_ADDRESS>" \
   "id:3,\
    phase:2,\
    nolog,\
    allow,\
    pass,\
    ctl:ruleRemoveById=949110"

But... modsec sees everything as <IP_ADDRESS> - this is the source IP - the REMOTE_ADDR.
Now I can rewrite this for PHP functions quite easily using the fastcgi_param directive. I can set this in values up front even and pass back through, variety of ways one for example:
fastcgi_param REMOTE_ADDR $realip_remote_addr;

So using a test.php file
<?php var_export($_SERVER)?>

I can output things and see that as far as PHP processing is concerned I have managed to rewrite the REMOTE_ADDR value back to the real IP... however doing this with fastcgi_params is all post Modsec.
It seems ModSec runs phase earlier.  Is there anyway to rewrite this prior to ModSec accessing the value?
The real issue is having to set the DOS functions to deal with the fact that ModSec sees every single request as coming from the same IP.
Am I missing something, is there a reason that ModSec can't access these values after fastcgi_params has adjusted them?

duplicate, github freakout.


Errors: "ERR_FS_FILE_TOO_LARGE" and "Cannot create a string longer than 0x3fffffe7 characters"

So far this excellent library has been great (thanks!).  But I've recently been trying to convert grib files from this page to json, within a node.js environment.  It seems to be choking on the size of the grib file (or rather the resulting json)... I guess that they are big (e.g. 88 MB) but not completely extreme in the scheme of things (they are supplied by MeteoFrance in that format/size so they must think this is generally usable).
Specifically, I am getting the following error on one of the Europe/SP2 grib files (downloadable using the drop-down selections at the bottom of the above page):
RangeError [ERR_FS_FILE_TOO_LARGE]: File size<PHONE_NUMBER>) is greater than possible Buffer:<PHONE_NUMBER> bytes
	at FSReqCallback.readFileAfterStat [as oncomplete] (fs.js:282:11)
	at FSReqCallback.callbackTrampoline (internal/async_hooks.js:126:14) {
  code: 'ERR_FS_FILE_TOO_LARGE'
}

And on a Europe/SP1 grib file I seem to get a slightly different error:
Error: Cannot create a string longer than 0x3fffffe7 characters
	at Object.slice (buffer.js:604:37)
	at Buffer.toString (buffer.js:801:14)
	at stripBom (/root/workspace/meteofrancegetter/node_modules/jsonfile/index.js:122:51)
	at /root/workspace/meteofrancegetter/node_modules/jsonfile/index.js:29:12
	at /root/workspace/meteofrancegetter/node_modules/graceful-fs/graceful-fs.js:123:16
	at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:63:3)
	at FSReqCallback.callbackTrampoline (internal/async_hooks.js:126:14) {
  code: 'ERR_STRING_TOO_LONG'
}

These seem to be different to the error I reported here... different error and the solution there (increasing bufferSize) doesn't help here.
Maybe there is a simple solution to overcoming the limits I'm hitting?  Fingers crossed...

What is your command line exactly ? Are you using a filter on a specific parameter (you should for large files) ? You can also try to limit output precision to 2 digits with -p 2. I will try to run it on my side as well.

I'm not applying any parameter filter because I need to extract all parameters.  But maybe it would still be better (or at least it may avoid the problem) to apply a different filter in turn, on the same file, rather than trying to process all parameters in one go?  I'll try with -p 2.

Yes you need to process each parameter separately, probably using fs, fp and fv. This will also allow for paralell processing.

I'll try filtering on fs and fv too, but surely filtering on fc and fp (which I already tried) should have made enough of a difference to prevent the error?

I think I discovered a slight quirk in the way that the filter values are interpreted.  In my post a couple of entries up, I use numerical values of 0 for the filter items fc and fp, and was surprised that the errors were still caused... I thought that this should limit to only the temperature parameter.
But it seems that, to be properly interpreted, we need to pass these as string values '0' instead:
{
	data: true,
	names: true,
	precision: 2,
	fc: '0',
	fp: '0',
	output: 'output.json',
	bufferSize: 32 * 1024 * 1024
}

With string values for these filters, it works fine.  If you agree, perhaps it would be an idea for the library to use .toString() internally to avoid this gotcha?

Good catch, as we are using options as args of execFile it should be strings. I will fix that with a conversion to string. Thanks for feedback.

when will the above fix (conversion to string) be available as an actual release?

Done https://github.com/weacast/weacast-grib2json/releases/tag/v1.0.3


Android issue with syncing large attachments

I'm experiencing an Android issue in RN 60.5 that's not present in the demo RN 59.1.
https://github.com/craftzdog/pouchdb-react-native-demo
iOS does not have this issue.
When syncing an attachment (image) of size from 1mb to 10mb it works fine in the demo and successfully syncs. However, when running the identical code using RN 60.5 and any file over 1.6mb, I get an error:
Possible Unhandled Promise Rejection (id: 0):
TypeError: Cannot read property 'length' of null
TypeError: Cannot read property 'length' of null
    at parseHexString
    at SQLTask.sqlCallback
    at blob
    at onSuccess
    at tryCallOne
    at blob
    at blob
    at _callTimer
    at _callImmediatesPass
    at Object.callImmediates

I'm pretty sure this issue comes from something failing within the WebSQL transaction process:
https://github.com/nolanlawson/node-websql/blob/ab6d7e06e00909046b98250da71248802935a284/lib/websql/WebSQLTransaction.js#L54
I have the same setup in the demo app and the RN 60.5 test app with the same code MainApplication.java change:
try {
  Field field = CursorWindow.class.getDeclaredField("sCursorWindowSize");
  field.setAccessible(true);
  field.set(null, 100 * 1024 * 1024); //the 100MB is the new size
} catch (Exception e) {
  if (e != null) {
    e.printStackTrace();
  }
}

There also seems to be an identical issue listed here, but this from 2016:
https://github.com/pouchdb/pouchdb/issues/5500#issue-167407541
I have searched for differences between RN 59.1 and 60.5, but can't find any reason why there would be a difference.

Does it also happen with<EMAIL_ADDRESS>

@craftzdog I also tested with the latest<EMAIL_ADDRESS>but still experienced the issue. I also noticed that the Android studio logs indicated it was CursorWindow issue...even with the MainApplication.java fix.
Would a demo RN app be enough to inspect? I can get that updated tomorrow if it would be helpful.

Hello,
I was experiencing this issue with RN 61.5 & react-native-sqlite-2: 3.0.1. I solved the problem downgrading react-native-sqlite-2 to 2.0.4 and increasing the cursor as is described in the README:
try {   Field field = CursorWindow.class.getDeclaredField("sCursorWindowSize");   field.setAccessible(true);   field.set(null, 100 * 1024 * 1024); //the 100MB is the new size } catch (Exception e) {   if (DEBUG_MODE) {     e.printStackTrace();   } }
Hope this helps.

Since react-native-sqlite-2 >= 3.0.0 uses sqlite-android for its SQLite engine, the package of CursorWindow class should be io.requery.android.database instead of android.database.CursorWindow.

I am facing the same issue even changing the libary to io.requery.android.database

@swhamilton Yes, please.

@Dhurzo thanks for sharing, you saved my day! I had the same issue and I was able to make it work downgrading to 2.0.4 and following the instructions in README to increase file size.

@Dhurzo thanks for sharing, you saved my day! I had the same issue and I was able to make it work downgrading to 2.0.4 and following the instructions in README to increase file size.

Hello,
I was experiencing this issue with RN 61.5 & react-native-sqlite-2: 3.0.1. I solved the problem downgrading react-native-sqlite-2 to 2.0.4 and increasing the cursor as is described in the README:
try { Field field = CursorWindow.class.getDeclaredField("sCursorWindowSize"); field.setAccessible(true); field.set(null, 100 * 1024 * 1024); //the 100MB is the new size } catch (Exception e) { if (DEBUG_MODE) { e.printStackTrace(); } }
Hope this helps.

@Dhurzo thanks for sharing, you saved my day! I had the same issue and I was able to make it work downgrading to 2.0.4 and following the instructions in README to increase file size.

Hello,
I was experiencing this issue with RN 61.5 & react-native-sqlite-2: 3.0.1. I solved the problem downgrading react-native-sqlite-2 to 2.0.4 and increasing the cursor as is described in the README:
try { Field field = CursorWindow.class.getDeclaredField("sCursorWindowSize"); field.setAccessible(true); field.set(null, 100 * 1024 * 1024); //the 100MB is the new size } catch (Exception e) { if (DEBUG_MODE) { e.printStackTrace(); } }
Hope this helps.

@Dhurzo thanks for sharing, you saved my day! I had the same issue and I was able to make it work downgrading to 2.0.4 and following the instructions in README to increase file size.

Unfortunately, it turns out that sqlite-android does not support changing the default cursor window size.
Use v2 instead to solve this issue.
I'm not planning to revert this change because I'd rather want the performance.

Close the cursors opened previously, the code above seems valid, but investigating further I noticed that some cursors still needed to close.


Component Doesn't Update when Containing Scope Get Updates

Note: for support questions, please use one of these channels: https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#question. This repository's issues are reserved for feature requests and bug reports.
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
The component does not get updated and the $onChanges won't get called;
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://plnkr.co or similar (template: http://plnkr.co/edit/tpl:yBpEi4).
once request came from server, i fill an array, and then pass the new/exists item to a scope object( i call it activeChat ).
the chat box has a message field,i set it on my component:
<im-text-box
    func-on-enter="ctrl.Events.sendPrivateMessage()"
    message="ctrl.View.ActiveChat.CurrentInput"></im-text-box>

once the activeChat get changed, it won't get updated inside the component... i tried both '<' and '='
/**
 * Created by Hassan on 1/24/2017.
 */
(function() {

    function controller() {
        var self = this;

        self.View = {
            /**
             * @type {null|string}
             */
            HtmlMessage: null,
            /**
             * @type {null|boolean}
             */
            HasMessage: null
        };

        self.Methods = {
            toMessage: function (html) {
                return html;
            },
            toHtml: function (string) {
                return string;
            },
            /**
             * @returns {void}
             */
            checkHasMessage:function (){
                if(self.View.HtmlMessage==null) {
                    self.View.HasMessage = false;
                    return;
                }

                self.View.HasMessage = self.View.HtmlMessage.removeHtmlTags().replace(""&qout;","").trim().length > 0;
            }
        };

        self.Events = {
            onEnter: function () {
                if(self.funcOnEnter()){
                    // If Clear Text Box
                }
            },
            updateModel: function (event) {
                self.View.HtmlMessage = event.target.innerHTML;

                self.Methods.checkHasMessage();

                self.message = self.Methods.toMessage(self.View.HtmlMessage);
            }
        };

        self.$onInit = function () {
            self.View.HtmlMessage= self.message;
        };

        self.$onChanges  = function () {
             //doesn't break on changes
        };
    }

    controller.$inject = [];

    angular.module("chatSystem").component("imTextBox", {
        bindings: {
            funcOnEnter: "&",
            message: "="
        },
        controller: controller,
        template: `

Write a message...

        `
    });
})();

What is the expected behavior?
Once the containing block change, its changes affect the components too.
also i require to do single binding on start, but when parent component changed, i wish to rebind if any draft exists on newly activated chat.
What is the motivation / use case for changing the behavior?
i have no idea, i'm new to component.
Which versions of AngularJS, and which browser / OS are affected by this issue? Did this work in previous versions of AngularJS? Please also test with the latest stable and snapshot (https://code.angularjs.org/snapshot/) versions.
1.5.9 then 1.6.1
Other information (e.g. stacktraces, related issues, suggestions how to fix)

Hi, your issue reads like a support question. This github repo is only for bug reports and feature requests. Please try one of the listed Support Channels. Thanks!


Doesn't create a subdirectory with "pipenv requirements" command

Issue description
Hello!
I'm having a problem generating requirements.txt based on Pipfile.lock file.
Dummy sample of Pipfile.lock with problem package:
"my_shiny_custom_package": {
            "git"<EMAIL_ADDRESS>            "ref": "123451234512345123451234512351234513245",
            "subdirectory": "src/my_shiny_custom_package"
},

You can see the expected and actual results of running pipenv requirements > requirements.txt below
Expected result
Sample of requirements.txt:
my_shiny_custom_package @ git+https://${GITHUB_ACCESS_TOKEN}@github.com/custom-python-packages.git@123451234512345123451234512351234513245#subdirectory=src/my_shiny_custom_package

Actual result
Sample of requirements.txt:
my_shiny_custom_package @ git+https://${GITHUB_ACCESS_TOKEN}@github.com/custom-python-packages.git@123451234512345123451234512351234513245

Thanks for this report -- it should be possible to fix this in  the new code paths.

@Azaze1l Can you tell me if you re-lock does the sub-directory fragment remain?   I need to know if there are two things to fix or just one.

@matteius, shure!
I've updated to the 2023.8.21 version and run pipenv lock
As a result I've got package declaration without sub-directory fragment:
        "observability": {
            "git"<EMAIL_ADDRESS>            "ref": "67391ad25d4ce344c4994d5696435b73e3248b15"
        },

Also, package declaration in Pipfile looks like this:
[packages]
observability = { subdirectory = "src/observability", ref = "observability-v1.0.0", git =<EMAIL_ADDRESS>}

Thanks for the added details -- will be helpful towards patching it.

I'm having a similar issue and its causing pip sync to fail as it cannot find a setup.py or pyproject.toml
Pipfile.lock
        "dynamixel-sdk": {
            "git": "https://github.com/omelia-wetaworkshop/DynamixelSDK",
            "ref": "46ba665b7fb44f039c503e902803b963270c9ff5",
            "subdirectory": "python"
        },

pipenv sync log:
[pipenv.exceptions.InstallError]: Collecting dynamixel-sdk@ git+https://github.com/omelia-wetaworkshop/DynamixelSDK@46ba665b7fb44f039c503e902803b963270c9ff5 (from -r /tmp/pipenv-e2bzah8p-requirements/pipenv-wpfdjomw-reqs.txt (line 1))
[pipenv.exceptions.InstallError]:   Cloning https://github.com/omelia-wetaworkshop/DynamixelSDK (to revision 46ba665b7fb44f039c503e902803b963270c9ff5) to /tmp/pip-install-_j_5jfni/dynamixel-sdk_aae0390a392f4d50b8ca60ce916a9659
[pipenv.exceptions.InstallError]:   Resolved https://github.com/omelia-wetaworkshop/DynamixelSDK to commit 46ba665b7fb44f039c503e902803b963270c9ff5
[pipenv.exceptions.InstallError]: Running command git clone --filter=blob:none --quiet https://github.com/omelia-wetaworkshop/DynamixelSDK /tmp/pip-install-_j_5jfni/dynamixel-sdk_aae0390a392f4d50b8ca60ce916a9659
[pipenv.exceptions.InstallError]:   Running command git rev-parse -q --verify 'sha^46ba665b7fb44f039c503e902803b963270c9ff5'
[pipenv.exceptions.InstallError]:   Running command git fetch -q https://github.com/omelia-wetaworkshop/DynamixelSDK 46ba665b7fb44f039c503e902803b963270c9ff5
[pipenv.exceptions.InstallError]:   Running command git checkout -q 46ba665b7fb44f039c503e902803b963270c9ff5
[pipenv.exceptions.InstallError]: ERROR: dynamixel-sdk@ git+https://github.com/omelia-wetaworkshop/DynamixelSDK@46ba665b7fb44f039c503e902803b963270c9ff5 from git+https://github.com/omelia-wetaworkshop/DynamixelSDK@46ba665b7fb44f039c503e902803b963270c9ff5 (from -r /tmp/pipenv-e2bzah8p-requirements/pipenv-wpfdjomw-reqs.txt (line 1)) does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found.

Downgraded to 2023.7.23 and it syncs without errors


Explain that Speaker Notes won't work in Safari

I should add in the Speaker Notes slide in the Sample deck an explicit disclaimer: This feature is not expected to work in Safari.
https://caniuse.com/#feat=broadcastchannel

Works in Safari now


Too few packages

This PR implements the TOO_FEW_PACKAGES check suggested in issue #286.
The current implementation gets triggered if there is only one package that has too much classes (more than 8) while ignoring empty packages.
If there are multiple packages (that aren't empty), the check won't be triggered.

Hence this PR is not merged and the fix rather small, i took the liberty of fixing #292 in this PR as well.
Commit 391a7f8 should fix the typo.


Lab 5 question 4

Hello all! for level 4 im having trouble passing a testcase where
Log.of(5).flatMap(x -> Log.of(x)).equals(Log.of(5)) // monad right identity
is giving false rather than true
public <R> Log<R> flatMap(Function<? super T, ? extends Log<? extends R>> mapper) {
    if (this.value == null) {
        return Log.of(null, "null");
    } else {
        Log<? extends R> lg = mapper.apply(this.value);
        return Log.<R>of(lg.getValue(),this.log + "\n" + lg.getLog());
    }
}

public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }
    if (obj instanceof Log<?>) {
        Log<?> other = (Log<?>) obj;
        if (this.getValue().equals(other.getValue())) {
            return this.getLog().equals(other.getLog());
        }
    }
    return false;
}

with the following as my code. to be honest I cant really decipher whats wrong I saw something about empty strings is the flatmap but to be honest im not sure how that works any assistance would be really appreciated thank you!

i'm not sure if its recommended to equate this.value == null here

maybe try using an optional to check null?

the issue is the blank spaces in the cases when either one of the logs are empty so your current method will give outputs that have blank lines between them which then might not be equal to the other thing. So basically you need to account for this using some if statements or using Optional
e.g
Log[6]
add 1
VS
Log[6]
add 1

Hi, this happens because of the concatenation of the "\n". This is because when you use the flatMap, you are adding an additional "\n". As such, when comparing with an empty string, it is not the same.
A suggestion could be to create a private method to return the "\n" output only if both strings are not empty.
e.g.
if (this.log.isEmpty()) {
return newLog;
} else if (newLog.isEmpty()) {
return this.log;
} else {
return this.log + "\n" + newLog;
}

the issue is the blank spaces in the cases when either one of the logs are empty so your current method will give outputs that have blank lines between them which then might not be equal to the other thing. So basically you need to account for this using some if statements or using Optional
e.g Log[6]
add 1
VS
Log[6] add 1

i agree! i recommend using optional though, as something similar might come out for PA2 so you should learn how to do it here

the issue is the blank spaces in the cases when either one of the logs are empty so your current method will give outputs that have blank lines between them which then might not be equal to the other thing. So basically you need to account for this using some if statements or using Optional
e.g Log[6]
add 1
VS
Log[6] add 1

so basically even if they have this difference they should still return true yes

the issue is the blank spaces in the cases when either one of the logs are empty so your current method will give outputs that have blank lines between them which then might not be equal to the other thing. So basically you need to account for this using some if statements or using Optional
e.g Log[6]
add 1
VS
Log[6] add 1

so basically even if they have this difference they should still return true yes

You need to make it such that it doesnt have this difference

Hi, this happens because of the concatenation of the "\n". This is because when you use the flatMap, you are adding an additional "\n". As such, when comparing with an empty string, it is not the same.
A suggestion could be to create a private method to return the "\n" output only if both strings are not empty.
e.g.
if (this.log.isEmpty()) { return newLog; } else if (newLog.isEmpty()) { return this.log; } else { return this.log + "\n" + newLog; }

hi! in regards to this would newLog be the log you get after using flatMap?


az aks get-credentials fails on empty or non-existent KUBECONFIG

Describe the bug
Command Name
az aks get-credentials
Errors:
'clusters'
Traceback (most recent call last):
python3.8/site-packages/knack/cli.py, ln 206, in invoke
    cmd_result = self.invocation.execute(args)
cli/core/commands/__init__.py, ln 608, in execute
    raise ex
cli/core/commands/__init__.py, ln 666, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
cli/core/commands/__init__.py, ln 659, in _run_job
    six.reraise(*sys.exc_info())
...
cli/command_modules/acs/custom.py, ln 1182, in merge_kubernetes_configurations
    _handle_merge(existing, addition, 'clusters', replace)
cli/command_modules/acs/custom.py, ln 1117, in _handle_merge
    if existing[key] is None:
KeyError: 'clusters'

To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

Put any pre-requisite steps here...
az aks get-credentials --overwrite --resource-group {} --name {}

Expected Behavior
Environment Summary
macOS-10.15.2-x86_64-i386-64bit
Python 3.8.1
Shell: bash

azure-cli 2.0.79 *

Also tried with 2.0.80
Additional Context

For any other internet people that find this when they're too tired to think, removing your KUBECONFIG file (e.g. rm ~/.kube/config) and re-running the get-credentials command appears to fix things.


Add Portuguese translation

I've translated the en.ts file to Portuguese (Portugal). Is there any ongoing work on translations?
pt.zip

Muito brigado!
Not that I know of, just voluntary submitted stuff as far as I know.

hi @tiagofilipenunes,
we actually are working on several languages at the moment.
i'll compare your text to the translations we have.
thanks for the contribution!


Audio example: crashes on exit

I'm on Windows 10 64-bit compiling with nuwen MinGW GCC 5.3, and my build script looks like this.
Every time I close the application, whether by pressing escape or by standard means, it crashes. This is the entire output from the application:
AL lib: (WW) UpdateDeviceParams: SSE performs best with multiple of 4 update sizes (882)
Audio Renderer: OpenAL Soft by OpenAL Community
OpenAL version: 1.1 ALSOFT 1.17.2
Renderer: AMD Radeon(TM) R7 Graphics by ATI Technologies Inc.
OpenGL version: 4.5.13416 Compatibility Profile Context 15.300.1025.1001
Using optional features:
    GL_ARB_ES2_compatibility
    GL_ARB_direct_state_access
    GL_ARB_get_texture_sub_image
    GL_ARB_invalidate_subdata
    GL_ARB_multi_bind
    GL_ARB_separate_shader_objects
    GL_ARB_texture_storage
    GL_ARB_texture_storage_multisample
    GL_ARB_vertex_array_object
    GL_EXT_direct_state_access
    GL_EXT_texture_filter_anisotropic
    GL_KHR_debug
Using driver workarounds:
    amd-nv-no-forward-compatible-core-context
    no-layout-qualifiers-on-old-glsl
Hrtf status: Audio::Context::HrtfStatus::UnsupportedFormat
Hrtf enabled: false
Hrtf specifier:

Running it in GDB just gives Program received signal SIGSEGV, Segmentation fault. and a corrupt stack frame.

Hrtf status: Audio::Context::HrtfStatus::UnsupportedFormat
Hrtf enabled: false
Hrtf specifier:

That's worrying me a bit here. For me on Windows 10 + MinGW-w64 5.1.0 (i686-posix-dwarf-rev0) this works fine :)
I will see if I can get this to crash by playing around with the hrtf settings a bit.

This does not seem to be related to the hrtf settings. Btw: To use hrtf you need to copy contents of openal-soft/hrtf to %appdata%/openal/hrtf and use headphones.
@mosra I cannot reproduce, could you have a look?

yup .. just need to eat something first :D

Related to

Container::Array instances returned from plugin crash on dangling deleter pointer after a plugin is unloaded

in mosra/magnum#108. And the fix is hard.

This does not seem to be related to the hrtf settings. Btw: To use hrtf you need to copy contents of openal-soft/hrtf to %appdata%/openal/hrtf and use headphones.

Hrtf status: Audio::Context::HrtfStatus::Detected
Hrtf enabled: true
Hrtf specifier: default-44100.mhr

Yep, the only difference I notice is that the directional audio is slightly more obvious (or maybe there is no difference and I just can't tell).

@LB-- You should theoretically be able to differentiate not only left/right as in stereo but additionally front/back/top/bottom (there is an area in which there is so called "front-back-confusion", where you cannot tell whether a source is coming from the front or back. This also happens IRL, but "experience" is usually able to correct this, example: if you drink a glass of water, the sound will most likely not coming from the back of your head.).
Works best with in-ears.

Fixed with mosra/corrade@43397de88223c398b485a512d8c55c64c3b1b4ff. Sorry it took so long.


Use ReactVapor's Checkbox in facets instead of input

Reuse one of ReactVapor's own component.
Before, clicking on the checkbox didn't toggle the change in the facets, only clicking the label worked.
Looks like this change will not be breaking behaviour outside of ReactVapor, but I'm still curious.
To test, go checkout connected facets in the demo and click on the checkbox.

Codecov Report

Merging #490 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #490      +/-   ##
==========================================
+ Coverage   99.74%   99.74%   +<.01%
==========================================
  Files         213      213
  Lines        5194     5196       +2
  Branches     1216     1216
==========================================
+ Hits         5181     5183       +2
  Misses         13       13

Impacted Files
Coverage Δ

src/components/facets/FacetRow.tsx
100% <100%> (ø)
:arrow_up:

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 aec2ff4...d2d0b14. Read the comment docs.


Add support for code consoles

Fixes #49
Something that does not exist in the classic notebook by default, but is nice to have as a very minimalist web based code prompt on a single page.
Also related to https://github.com/jupyterlite/jupyterlite/issues/148

TODO

[x] Add package scaffolding
[x] Add new handler and template
[x] Add to the file browser menu
[ ] Fix console creation flow

Sooo.... you going to have any way to link this to an editor?

Sooo.... you going to have any way to link this to an editor?

You mean a text editor like the screenshot in this comment?

The scope for now for this PR would be to have basic support for the ephemeral consoles just like in lab. But the side-by-side text editor + console output could be implemented as a federated extension to start with maybe?

This should also fix https://github.com/jupyterlab/retrolab/issues/104 with notebook - console interactions working across browser tabs:
https://user-images.githubusercontent.com/591645/131314806-104b4284-57fc-4410-86ba-aae6488a46be.mp4

Maybe it could make sense to add the console favicon to Jupyter Server directly: https://github.com/jupyter-server/jupyter_server/tree/master/jupyter_server/static/favicons

But the side-by-side text editor + console output could be implemented as a federated extension to start with maybe?

Or maybe something to do upstream in JupyterLab directly. Similar to https://github.com/jupyterlab/jupyterlab/pull/10648

Seems to be working find on Binder, including the console favicon:
https://user-images.githubusercontent.com/591645/131338813-b6731215-be62-4422-9fdf-f6c500d11cbd.mp4

Sounds like this it would be a great upstream feature to have.


[Prod QA] Help page style fixes

Details

Fixed Issues
$ https://github.com/Expensify/App/issues/14124
$ https://github.com/Expensify/App/issues/13681
Tests

Run the help site - instructions
Verify that the page headers are using our new font
Verify that hovering the LHN links lightens its color
Verify that the text in cards wrap into multiple lines when the browser window is narrow
Verify that the cards are the same width

[x] Verify that no errors appear in the JS console

Offline tests
N/A
QA Steps
Same as tests

[ ] Verify that no errors appear in the JS console

PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

[x] Android / native
[x] Android / Chrome
[x] iOS / native
[x] iOS / Safari
[x] MacOS / Chrome / Safari
[x] MacOS / Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is correct English and approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] I verified that if a function's arguments changed that all usages have also been updated correctly
[x] If a new component is created I verified that:

[x] A similar component doesn't exist in the codebase
[x] All props are defined accurately and each prop has a /** comment above it */
[x] The file is named correctly
[x] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[x] The only data being stored in the state is data necessary for rendering and nothing else
[x] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[x] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[x] All JSX used for rendering exists in the render method
[x] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)

[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

Screenshots/Videos

Web

Mobile Web - Chrome

Mobile Web - Safari

Desktop

iOS

Android

Looking good, thanks @luacmartins!

@luacmartins I believe C+ review is not required here, if needs to be done share the instructions as I can't access the instructions in the PR Steps, thanks!

@Santhosh-Sellavel ah you can follow the instructions in this README to get set up.

Ah, this should be quick I guess. I've already done this setup once.

Reviewer Checklist

[x] I have verified the author checklist is complete (all boxes are checked off).
[x] I verified the correct issue is linked in the ### Fixed Issues section above
[x] I verified testing steps are clear and they cover the changes made in this PR

[x] I verified the steps for local testing are in the Tests section
[x] I verified the steps for Staging and/or Production testing are in the QA steps section
[x] I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)

[x] I checked that screenshots or videos are included for tests on all platforms
[x] I included screenshots or videos for tests on all platforms
[x] I verified tests pass on all platforms & I tested again on:

[x] Android / native
[x] Android / Chrome
[x] iOS / native
[x] iOS / Safari
[x] MacOS / Chrome / Safari
[x] MacOS / Desktop

[x] If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
[x] I verified proper code patterns were followed (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is correct English and approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I verified that this PR follows the guidelines as stated in the Review Guidelines
[x] I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] If a new component is created I verified that:

[x] A similar component doesn't exist in the codebase
[x] All props are defined accurately and each prop has a /** comment above it */
[x] The file is named correctly
[x] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[x] The only data being stored in the state is data necessary for rendering and nothing else
[x] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[x] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[x] All JSX used for rendering exists in the render method
[x] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)

[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

[x] Verify that the page headers are using our new font
[x] Verify that hovering the LHN links lightens its color
[x] Verify that the text in cards wrap into multiple lines when the browser window is narrow
[x] Verify that the cards are the same width

Web
https://user-images.githubusercontent.com/85645967/211889388-f916abf8-67ec-4eb4-975d-01da22009dfb.mov

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

🚀 Deployed to staging by @marcaaron in version: 1.2.54-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to production by @AndrewGable in version: 1.2.54-2 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

@luacmartins @shawnborton or @marcaaron - Can you run prod QA on this? Thanks!

@AndrewGable just tested and seems to work well!


Incorrect Flask test leads to testFailed reported without testStarted

https://youtrack.jetbrains.com/issue/PY-26026

given the following test file:
from flask_testing import TestCase
class TestFoo(TestCase):
    def test_add(self):
        self.assertEqual(1 + 2, 3)

running tests in PyCharm or from command line yield the following exception:
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/lib/python2.7/unittest/__main__.py", line 12, in <module>
    main(module=None)
  File "/usr/lib/python2.7/unittest/main.py", line 95, in __init__
    self.runTests()
  File "/usr/lib/python2.7/unittest/main.py", line 232, in runTests
    self.result = testRunner.run(self.test)
  File "/usr/lib/python2.7/unittest/runner.py", line 151, in run
    test(result)
  File "/usr/lib/python2.7/unittest/suite.py", line 70, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib/python2.7/unittest/suite.py", line 108, in run
    test(result)
  File "/usr/lib/python2.7/unittest/suite.py", line 70, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib/python2.7/unittest/suite.py", line 108, in run
    test(result)
  File "/usr/lib/python2.7/unittest/suite.py", line 70, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib/python2.7/unittest/suite.py", line 108, in run
    test(result)
  File "/home/shalupov/.local/lib/python2.7/site-packages/flask_testing/utils.py", line 131, in __call__
    self._pre_setup()
  File "/home/shalupov/.local/lib/python2.7/site-packages/flask_testing/utils.py", line 137, in _pre_setup
    self.app = self.create_app()
  File "/home/shalupov/.local/lib/python2.7/site-packages/flask_testing/utils.py", line 122, in create_app
    raise NotImplementedError

which is totally fine.
but teamcity-messages reports testFailed without testStarted message:
[testCount count='1']
[testFailed message='Error' name='test_foo.TestFoo.test_add' details='Traceback (most recent call last):|n  _TRACE_BACK_HERE_NotImplementedError|nNotImplementedError|n']
[testFinished name='test_foo.TestFoo.test_add']


No such file or directory: inception_moments.pkl

Hi, I am running the differentiable data aug. with biggan model. I get this error
  File "/vf/users/duongdb/data-efficient-gans/DiffAugment-biggan-cifar/dnnlib/util.py", line 422, in open_file_or_url     return open(file_or_url, 'rb') FileNotFoundError: [Errno 2] No such file or directory: 'SomeDataSetName_inception_moments.pkl'
where the SomeDataSetName is my own dataset. Do I need to run the file calculate_inception_moments.py in ajbrock's biggan github?
Thanks.

The code should be able to compute the inception moments automatically, see these lines

The code should be able to compute the inception moments automatically, see these lines

Thank you.

Thank you.


[PoC] Quick starts

Proof of concept to integrate OpenShift style quick starts into ODH

@jschuler is this PR still needed?  Can we close it?

Fixed in another PR.


Huge error

Traceback (most recent call last):
File "/home/jay/Moriarty-Project/Moriarty.py", line 179, in
microsoft_mail(options.phone_number,options.microsoft_mail_address,options.mail_password)
File "/home/jay/Moriarty-Project/Moriarty.py", line 59, in microsoft_mail
driver = uc.Chrome(options=options)
File "/home/jay/.local/lib/python3.9/site-packages/undetected_chromedriver/init.py", line 51, in new
instance.init(*args, **kwargs)
File "/usr/lib/python3/dist-packages/selenium/webdriver/chrome/webdriver.py", line 95, in init
RemoteWebDriver.init(
File "/usr/lib/python3/dist-packages/selenium/webdriver/remote/webdriver.py", line 152, in init
self.start_session(capabilities, browser_profile)
File "/usr/lib/python3/dist-packages/selenium/webdriver/remote/webdriver.py", line 249, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/usr/lib/python3/dist-packages/selenium/webdriver/remote/webdriver.py", line 318, in execute
self.error_handler.check_response(response)
File "/usr/lib/python3/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 89
Current browser version is 88.0.4324.182 with binary path /usr/bin/chromium
I installed the program without sudo permission everything was good but when i run the program with my outlook and pass it doesn't work. Is this tool still getting updated or abandoned?

Tool has been updated. You won't be encountering with errors.


Validating non string query parameters

Hello,
I'm trying to validate a request containing two query parameters.

Upon doing so i am receiving a RequestQueryArgumentMismatch due to the query arguments of the request not being a type 'integer', and a 'string' given.
As of version 3.0 of openapi, query parameters can be specified as an integer along with other non string data types, i would have thought the PSR-7 validator would be able to look at a query parameter and check if it is an integer within a string.
https://swagger.io/docs/specification/describing-parameters/

Since query parameters are always going to be presented by the request object as strings, the validation is different to how it would be performed on a JSON payload with its many data types. I guess validation even for integers, floats, doubles etc. would just be about pattern matching.
If scientific notation is accepted as valid number formats, then it gets even more complicated, so I'm not going there ;-)

Yeah, good question! It makes sense to validate types as OpenAPI specification allows us describing it in details. However as @judgej points out, it can be a nontrivial thing.

After some considerations I am adding this type juggling from string->integer and similar.

it's actually not really type juggling but deserialisation. If you think about this as two steps involved:

deserialize request parameter following what is in the spec
validate the result

in case of an integer the deserialization would fail if it is not numeric.

If scientific notation is accepted as valid number formats, then it gets even more complicated, so I'm not going there ;-)

It's more easy in case of PHP, you could check for is_numeric($value) :)

Added these rules:

type:boolean matches case insensitive true or false
type:number matches both integers and floats with/without signs
type:integer matches numbers consisted of numbers only with an optional sign

Added these rules:

type:boolean matches case insensitive true or false
type:number matches both integers and floats with/without signs
type:integer matches numbers consisted of numbers only with an optional sign

Thank you for adding this! I am testing the changes now. :)

If nothing comes up, I am going to tag this evening.

If nothing comes up, I am going to tag this evening.

Tested the changes again with the same query parameters and it is now validating the request correctly with no exceptions. :)

tagged 0.13.9


All the Scans module not working

I am able to use the tool for individual scan modules like
1. Nmap :white_check_mark:
2. Dirsearch :white_check_mark:
3. Nikto :white_check_mark:
However, if I select Option A: All the Scans, I am getting the below error. :x:
:large_blue_diamond: When tried with only google.com
Unable to init server: Could not connect: Connection refused  Failed to parse arguments: Cannot open display:

:large_blue_diamond: When tried with https://google.com
File "webmap.py", line 130, in <module>     ipall = socket.gethostbyname(targetall) socket.gaierror: [Errno -2] Name or service not known

Have you installed the gnome terminal ?
sudo apt-get install gnome-terminal

Have you installed the gnome terminal ?
sudo apt-get install gnome-terminal

Yes, I am already using the latest version of gnome-terminal. Still facing the issue mentioned above.

Yes, I am already using the latest version of gnome-terminal. Still facing the issue mentioned above.

Please check the attach video for your reference.
https://user-images.githubusercontent.com/57536491/103570507-38adda00-4eef-11eb-85b2-d6626d5c4f13.mov

Please check the attach video for your reference.
https://user-images.githubusercontent.com/57536491/103570507-38adda00-4eef-11eb-85b2-d6626d5c4f13.mov

HI GiJ03,
I looked for a fix to your issue and I found that was a common issue.
Sometimes gnome-terminal is laggy.
Can you try to launch gnome-terminal ?
$ sudo gnome-terminal
If you have the same issue
Fix 1
Try to reinstall gnome-terminal using the following commands
$ sudo apt-get remove gnome-terminal
$ sudo apt-get purge gnome-terminal
Then you can install it
$ sudo apt-get install gnome-terminal
Fix 2
You have to change this file /etc/ssh/sshd_config (with root permissions). Just add
X11Forwarding yes
After saving the file, initialize a new terminal or reboot the system.
Fix 3
Try to run the following command on your terminal
$ export DISPLAY=:0.0

HI GiJ03,
I looked for a fix to your issue and I found that was a common issue.
Sometimes gnome-terminal is laggy.
Can you try to launch gnome-terminal ?
$ sudo gnome-terminal
If you have the same issue
Fix 1
Try to reinstall gnome-terminal using the following commands
$ sudo apt-get remove gnome-terminal
$ sudo apt-get purge gnome-terminal
Then you can install it
$ sudo apt-get install gnome-terminal
Fix 2
You have to change this file /etc/ssh/sshd_config (with root permissions). Just add
X11Forwarding yes
After saving the file, initialize a new terminal or reboot the system.
Fix 3
Try to run the following command on your terminal
$ export DISPLAY=:0.0

The error socket.gaierror: [Errno -2] Name or service not known shouldn't have anything to do with the terminal, SSH, nor the display. It's typically the result of a network-level issue while attempting to resolve the provided hostname to an IP address.
@GiJ03 This can be quite hard to troubleshoot because no two networks behave the same, but the first thing I'd check is your /etc/resolv.conf to make sure all of your nameservers are working and can resolve domains just fine. To test them you can use dig @<resolver IP> <address to resolve> (eg: dig @<IP_ADDRESS> www.google.com).
@Anteste it might be a good idea to enclose this particular call inside a try/except block, and maybe retry once before bailing out. You can catch it specifically with socket.gaierror.

The error socket.gaierror: [Errno -2] Name or service not known shouldn't have anything to do with the terminal, SSH, nor the display. It's typically the result of a network-level issue while attempting to resolve the provided hostname to an IP address.
@GiJ03 This can be quite hard to troubleshoot because no two networks behave the same, but the first thing I'd check is your /etc/resolv.conf to make sure all of your nameservers are working and can resolve domains just fine. To test them you can use dig @<resolver IP> <address to resolve> (eg: dig @<IP_ADDRESS> www.google.com).
@Anteste it might be a good idea to enclose this particular call inside a try/except block, and maybe retry once before bailing out. You can catch it specifically with socket.gaierror.

@eburgueno : Thanks! However, I am able to ping google.com. This means there is no issue with my resolv.conf right?

@eburgueno : Thanks! However, I am able to ping google.com. This means there is no issue with my resolv.conf right?

@GiJ03 ping can be a good indicator of your local network health status. You probably want to leave it running in the background to make sure your rtt is consistent. As for dig, you need to check which nameservers are configured in your /etc/resolv.conf and use those instead of @<IP_ADDRESS>

@GiJ03 ping can be a good indicator of your local network health status. You probably want to leave it running in the background to make sure your rtt is consistent. As for dig, you need to check which nameservers are configured in your /etc/resolv.conf and use those instead of @<IP_ADDRESS>

@eburgueno : I have tried with the nameserver that is configured in my resolv.conf as well. Still the issue persists.

@eburgueno : I have tried with the nameserver that is configured in my resolv.conf as well. Still the issue persists.

@GiJ03 my apologies. I just re-read your report and I think I know what's going on, at least for the second issue you had (the socket.gaierror: [Errno -2] Name or service not known error). The problem is with the https:// prefix:
$ dig @<IP_ADDRESS> google.com|grep status
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 47494
$ dig @<IP_ADDRESS> https://google.com|grep status
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 41593

Similar behaviour with python's socket.gethostbyname:
$ python
Python 3.9.1 (default, Dec  8 2020, 00:00:00)
[GCC 10.2.1 20201125 (Red Hat 10.2.1-9)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> socket.gethostbyname('google.com')
'<IP_ADDRESS>'
>>> socket.gethostbyname('https://google.com')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known

Perhaps parsing user-provided URLs to extract the root domain could be a (separate) feature request :)
As for your original issue, please try the following:
# python
(...)
>>> import os
>>> os.system('gnome-terminal -- bash -c "echo it works! && bash"')

That should bring up a new gnome-terminal with the line "it works!" at the top, then a shell prompt.

@GiJ03 my apologies. I just re-read your report and I think I know what's going on, at least for the second issue you had (the socket.gaierror: [Errno -2] Name or service not known error). The problem is with the https:// prefix:
$ dig @<IP_ADDRESS> google.com|grep status
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 47494
$ dig @<IP_ADDRESS> https://google.com|grep status
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 41593

Similar behaviour with python's socket.gethostbyname:
$ python
Python 3.9.1 (default, Dec  8 2020, 00:00:00)
[GCC 10.2.1 20201125 (Red Hat 10.2.1-9)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> socket.gethostbyname('google.com')
'<IP_ADDRESS>'
>>> socket.gethostbyname('https://google.com')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known

Perhaps parsing user-provided URLs to extract the root domain could be a (separate) feature request :)
As for your original issue, please try the following:
# python
(...)
>>> import os
>>> os.system('gnome-terminal -- bash -c "echo it works! && bash"')

That should bring up a new gnome-terminal with the line "it works!" at the top, then a shell prompt.

@eburgueno : Thanks man! It worked now! We can close this issue now.

@eburgueno : Thanks man! It worked now! We can close this issue now.


Author thumbnail is not used in the post footer

The author thumbnail is used just in the mail page, in the posts list.

relate to https://github.com/vjeantet/hugo-theme-casper/issues/89


Beaker Executor should not run steps it's already running

🚀 The feature, motivation and pitch
@dirkgr: When it detects that a step it needs is already running (but it’s not itself running it), it should not schedule that step, but still wait for its completion. Maybe print a link every once in a while so the user can check and make sure it’s really running.
Alternatives
Just let the workspace handle that. Workspaces do already have a mechanism for not running multiple of the same cacheable step at once. But the Beaker executor will still happily submit experiments for the same cacheable step, which can waste a lot of time.
Additional context
We can implement this in the Beaker executor by searching for experiments in the workspace that match the name of the step. Then just check the status of the most recent matching experiment.

match the name of the step

You mean "match the id of the step"


Fixed types for TS 3.6.2

The library doesn't work with recent versions of TS.
See #62
How Has This Been Tested?
npx tsc --noEmit
Checklist:

[x] I have read the CONTRIBUTING document.
[ ] I have updated the documentation accordingly.
[ ] I have added tests to cover my changes.
[ ] I have run yarn validate to ensure that tests, typescript and linting are all in order.

@benmvp or @jcreamer898 Do either of you have thoughts on this? I don't see any issues with it, but I know little TS.

Thanks for the PR!

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Spelling

Under "Back up your Microsoft Entra Connect configuration" it should be "rollback" not "role-back"

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

ID: fab65962-15ad-f425-ed08-ffe652bea4da
Version Independent ID: c8292ca0-1831-e004-3741-b2a535dbe520
Content: Migrate Microsoft Entra Connect to Microsoft Entra Cloud Sync - Microsoft Entra ID
Content Source: docs/identity/hybrid/cloud-sync/migrate-azure-ad-connect-to-cloud-sync.md
Service: active-directory
Sub-service: hybrid
GitHub Login: @billmath
Microsoft Alias: billmath

@cathyethoca
Thanks for reporting this! We have created a PR for this issue and the changes should go live soon.


Templates functionality

Allow to define default lists (e.g. per bug category) and append it automatically to a newly created bug report.

This function would be perfect option.
We're using MantisBT in our company mostly for managing process flow and we usually have the same "to-do-list" in every issue. With possibility to define default to-do list attached to every reported issue it would make this small but extremely useful plug-in for us.
Any chance for udpate in this matter?

Definitely. The further development of this plugin is strictly dependent on people's interest in using it. If this feature is desired, it is definitely worth adding 👍🏻


Make scripts executable

Git understands file attributes and even sees them as a change. Make the scripts executable in git so that new users don't have to manually do it

Thanks for letting me know, git update-index --chmod=+x whitelist.sh is this the correct flag to make it executable?

Depending on git version and os or shell, you can just chmod +x whitelist.sh and then commit the change like any other change. But what
you have seems like it would work too.
On Fri, Aug 30, 2019, 8:52 AM Anudeep<EMAIL_ADDRESS>wrote:

Thanks for letting me know, git update-index --chmod=+x whitelist.sh is
this the correct flag to make it executable?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/anudeepND/whitelist/issues/110?email_source=notifications&email_token=AAJVSIAGLJAWVXSIRDOCWOTQHEQYZA5CNFSM4IPG2LM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5RW2IY#issuecomment-526609699,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAJVSIEMBOZ5QUMABT3ZQ2TQHEQYZANCNFSM4IPG2LMQ
.

@DukeyToo Sorry for the late reply, it is been added in fb7fe3d7c28b88ec56d5768008e3e35f0541d50d


dfx deploy --argument only works with raw as an argument-type

When trying to receive arguments from the init() function, I noticed that sending idl arguments with "dfx deploy" doesn't work, while sending raw didc encoded arguments worked as expected.
This is the rust code running on the canister:
#[init]
fn init(foo: String) {
    ic_cdk::print(format!("Init: {:?}", foo));
}

When running the following commands, it always results in an error:
dfx start --clean
dfx canister create ic_test
dfx canister install --argument '("Test")' ic_test

[OR]

dfx deploy ic_test --argument '("Test")'

Results in
Error: The Replica returned an error: code 5, message: "Canister rrkah-fqaaa-aaaaa-aaaaq-cai trapped explicitly: Custom(No more values on the wire, the expected type text is not opt, reserved or null)"

When using a didc encoded parameter, I get the desired response:
$ didc encode '("Test")'
4449444c0001710454657374

$ dfx deploy ic_test --argument 4449444c0001710454657374 --argument-type raw

[Canister rrkah-fqaaa-aaaaa-aaaaq-cai] Init: "Test"

I have ran all these tests with the following versions:
$ dfx --version
dfx 0.9.3

$ didc --version
didc 0.1.4

For context, see this forum post: https://forum.dfinity.org/t/how-to-pass-install-arguments-from-dfx/12977

I think you forget to update the did file to include the init args, e.g.
service : (text) -> {
  your_canister_method: ...
}

@chenyan-dfinity, you are of course correct! Adding (text) -> for my service in the .did file solved the problem, and now the two options (IDL and RAW) both work! Thank you.
I haven't even thought about the did file, since I use the following pattern to export the did interface:
// Auto export the candid interface
candid::export_service!();

#[query(name = "__get_candid_interface_tmp_hack")]
#[candid_method(query, rename = "__get_candid_interface_tmp_hack")]
fn __export_did_tmp_() -> String {
    __export_service()
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn check_candid() {
        let expected = String::from_utf8(std::fs::read("ic_test.did").unwrap()).unwrap();

        let actual = __export_service();

        if actual != expected {
            println!("{}", actual);
        }

        assert_eq!(
            actual, expected,
            "Generated candid definition does not match expected did file"
        );
    }
}

Is the _export_did_tmp() supposed to pickup and output the proper service definition? For the moment it just outputs "service: {}" ... I even tried decorating the init() fn like so:
#[candid_method(update)]
#[init]
fn init(foo: String) {
    ic_cdk::print(format!("Init: {:?}", foo));

The __export_did_tmp() picks up the init fn, adds it to the service, but the service signature still doesn't include the parameters. Perhaps this is something not considered at the time?

You can use #[candid_method(init)] for the init function.
We have plans to add candid_method into the CDK, so that users don't need to do this manually.

Thank you! I can confirm that #[candid_method(init)] works as expected!


Showing All Messages The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.2.99.

Hello, I included the Promise Kit in my project via Swift PM. I'm using Xcode 12.2. But then it started showing the error I mentioned in the title. Will you update the version or how can I solve this problem? Thanks for your help.

@mxcl Any updates on this? I can try to help you also if needed!

It's not possible to fix this without breaking all our extensions, to fix we would need a simultaneous release of all our packages, which is somewhat troublesome to pull off.
Really the only solution is a major version bump.

Thanks to package.swift for swift 5.3 where iOS SDK is v9 - this warning is fixed in 6.14.0.

Only fixed for SwiftPM, not Carthage or Pods, but I don’t think we can fix those without major breakage / tedium.


Implement cluster provisioning for Azure

Summary

Write a script to create a one resource group with a storage account to store the Terraform files.
Write a script to run Terraform deployment for AKS.

Implemented with #4.


Possible to change substitution matrix?

Is it possible to change, for example the substitution matrix of the Levenshtein algorithm?
So for example that the distance between O and D is lower than between O and E.

It's not implemented yet. What is the main goal? Keyboard combinations?

Also it's not obvious what to do with deletions, insertions and swapping. Which distance should we use for these cases? However, we can easily implement it for Hamming.

It is for optical character recognition, because for example an O looks more like a D than an E.

Thank you for details. Please, try Editex with custom letter_groups attribute.

Thanks, that's what I was looking for!

Does it really work? I see, I haven't tested Editex yet. I'm going to test it in the PR for this issue.
BTW, could you contribute your substitution matrix?
class OpticalEditex(Editex):
   ...

That's what I tested:
import textdistance

test = [("0D", "0D"), ("Ode", "Odb"), ("D0", "0D"), ("E0", "00"), ("0000", "EEE0"), ("0001", "DDD1"), ("0001", "D0D1"), ("NNE", "NGE")
        , ("123", "1234"), ("MWMW", "MMMM"), ("0SM", "Q5W"), ("0SM", "DSN"), ("00", "00123")]
editex = textdistance.Editex()

editex.letter_groups = (
        frozenset('0DQ'),
        frozenset('PR'),
        frozenset('B8'),
        frozenset('98'),
        frozenset('1I7'),
        frozenset('MNW'),
        frozenset('2Z'),
        frozenset('5S6'),
        frozenset('VU'),
        frozenset('VY'),
        frozenset('4A'),
        frozenset('CG'),
        frozenset('EF'),
        frozenset('KX'),
    )
editex.all_letters = frozenset('0123456789ABCDEFGHIJKLMNPQRSTUVWXYZ')

for a, b in test:
    print("#" * 40)
    print("1: " + a + " 2: " + b)
    print("editex: " + str(editex(a, b)))

Results:
########################################
1: 0D 2: 0D
editex: 0
########################################
1: Ode 2: Odb
editex: 2
########################################
1: D0 2: 0D
editex: 2
########################################
1: E0 2: 00
editex: 2
########################################
1: 0000 2: EEE0
editex: 2
########################################
1: 0001 2: DDD1
editex: 1
########################################
1: 0001 2: D0D1
editex: 2
########################################
1: NNE 2: NGE
editex: 2
########################################
1: 123 2: 1234
editex: 2
########################################
1: MWMW 2: MMMM
editex: 2
########################################
1: 0SM 2: Q5W
editex: 3
########################################
1: 0SM 2: DSN
editex: 2
########################################
1: 00 2: 00123
editex: 6

So the only weird behavior seems at 1: 0000 2: EEE0 and 1: 0001 2: DDD1 where it counts as 1 operation.

I've tested and improved Editex. See #27. Please, update textdistance to the v.4.1.2:
python3 -m pip install -U --no-cache-dir textdistance

And update your code:
editext = Editex(
  groups=(
        frozenset('0DQ'),
        frozenset('PR'),
        frozenset('B8'),
        frozenset('98'),
        frozenset('1I7'),
        frozenset('MNW'),
        frozenset('2Z'),
        frozenset('5S6'),
        frozenset('VU'),
        frozenset('VY'),
        frozenset('4A'),
        frozenset('CG'),
        frozenset('EF'),
        frozenset('KX'),
    ),
    ungrouped=frozenset('3HJLOT'),
)

Thank you!

Nice to help you. Tell your friends about textdistance. Have a good day :)


Adding NOQA Option

This PR adds the option to leave long import lines long and to add a NOQA option.

WIP, forgot something

Now its ready for review/merge

:+1:

Looks great! Thanks!


installation fail with HASS on BLUE

Hi !
Here the error i've got :
Échec de l'installation de l'extension
The command '/bin/bash -o pipefail -c pip3 install --no-cache-dir -r requirements.txt' returned a non-zero code: 1
thx.

it seem that the requirements.txt file is missing ?

I'm not including the python code with this container. It's built on installation time. The app is pulled from here: https://github.com/robmarkcole/coral-pi-rest-server/archive/refs/tags/v1.0.zip
It might simply not work on your specific environment.


abort the correct verb when smart_merge fails

in case of error, git merge --abort is hardcoded but sometimes you have to do git rebase --abort
+ log format copied from graft_branch

Cheers!


getting raw output

I'm just looking into using this framework to help with packaging up pester tests into modules (obviously!)
One thing I currently do is with pester is output the results using https://github.com/RamblingCookieMonster/PSHTMLTable
you can see in the readme.md I submitted an example for formatting pester output.
I can probably parse rawoutput to get the test results (just working on this) but I don't see the test counts - is it feasable to get this information or support something like passthru?

@davidwallis3101 If you're looking for a summary of the test results would this work for you?
# Run OVF tests
$tests = Get-OperationValidation -ModuleName '<YourOVFModule>'
$results = $tests | Invoke-OperationValidation

# Create summary of test results
$resultTypes = $results | Group-Object -Property Result
$summary = @{
    Passed  = ($resultTypes | Where Name -eq 'Passed').Count
    Failed  = ($resultTypes | Where Name -eq 'Failed').Count
    Skipped = ($resultTypes | Where Name -eq 'Skipped').Count
    Pending = ($resultTypes | Where Name -eq 'Pending').Count
    Total   = ($resultTypes | Measure-Object -Property Count -Sum).Sum
}

Thanks, that helped - I have managed to replicate what I had previously using just pester - so I'm good to go using this now 👍
if anyone is interested this is the powershell to invoke my tests with params and format the output:
# Define Params for calling OVF with
$ovfParams = @{
    ServerName = "MyServer";
    Credentials = (get-credential);
    PatchingGroup="A_NewServer"
}

# Run OVF tests
$tests = Get-OperationValidation -ModuleName 'ServerBuildValidation'
$results = $tests | Invoke-OperationValidation -Overrides $ovfParams

# Create summary of test results
$resultTypes = $results | Group-Object -Property Result

$summary = @{
    Passed       = ($resultTypes | Where-Object Name -eq 'Passed').Count
    Failed       = ($resultTypes | Where-Object Name -eq 'Failed').Count
    Skipped      = ($resultTypes | Where-Object Name -eq 'Skipped').Count
    Inconclusive = ($resultTypes | Where-Object Name -eq 'Inconclusive').Count
    Pending      = ($resultTypes | Where-Object Name -eq 'Pending').Count
    Total        = ($resultTypes | Measure-Object -Property Count -Sum).Sum
}

# Format cells where the value is greater than 0
$params = @{ ScriptBlock = {$args[0] -gt 0} }

# Produce a summary table
$summaryTable = $summary | Select-Object `
     @{Name="Passed Count";Expression={$_.Passed}},
     @{Name="Failed Count";Expression={$_.Failed}},
     @{Name="Skipped Count";Expression={$_.Skipped}},
     @{Name="Pending Count";Expression={$_.Pending}},
     @{Name="Inconclusive Count";Expression={$_.Inconclusive}},
     @{Name="Total Count";Expression={$_.Total}} | New-HtmlTable |
        Add-HTMLTableColor -Argument "Failed" -Column "Failed Count" -AttrValue "background-color:#ffb3b3;" @params |
        Add-HTMLTableColor -Argument "Passed" -Column "Passed Count" -AttrValue "background-color:#c6ffb3;" @params |
        Add-HTMLTableColor -Argument "Skipped" -Column "Skipped Count" -AttrValue "background-color:#9f5fb3;" @params |
        Add-HTMLTableColor -Argument "Inconclusive" -Column "Inconclusive Count" -AttrValue "background-color:#5c73b3;" @params

#Compose the html adding the necessary headers
$HTML = New-HTMLHead
$HTML += "
Post Build Test Summary
"
$HTML += $summaryTable
$HTML += "
Post Build Test Results
"

# Create a seperate table for each describe block
foreach ($section in ($results | Select-Object -ExpandProperty RawResult | Select-Object Describe -Unique)) {
    # Add a title based on the descibe block name
    $HTML += ("
{0}
" -f $section.Describe)

    # Get the pester test results
    $rawResults = $results | Select-Object -ExpandProperty RawResult | Where-Object -FilterScript { $_.Describe -eq $section.Describe }

    # Create a table with the specified columns and apply colouring to the result column
    $HTML += $rawResults | Select-Object Context, Name, Result, FailureMessage |
        New-HtmlTable |
            Add-HTMLTableColor -Argument "Failed" -Column "Result" -AttrValue "background-color:#ffb3b3;" |
            Add-HTMLTableColor -Argument "Passed" -Column "Result" -AttrValue "background-color:#c6ffb3;" |
            Add-HTMLTableColor -Argument "Skipped" -Column "Result" -AttrValue "background-color:#9f5fb3;" |
            Add-HTMLTableColor -Argument "Inconclusive" -Column "Result" -AttrValue "background-color:#5c73b3;"
}

$html = Close-HTML $html

#test it out
set-content C:\users\davidw\documents\test.html $HTML
& 'C:\Program Files\Internet Explorer\iexplore.exe' C:\users\davidw\documents\test.html

And outputs something like this (obviously these aren't my actual tests!!)

Thanks
David


PayPal educators/instructors

Paypal has huge community of educators within the organization who gives guest lectures to school and universities students.

@ rahulmsinghvi I am sorry, merging this request would contradict the repository rules. Could you please contact<EMAIL_ADDRESS>directly by email to resolve the issue?

Thanks @philipto I will follow up.