Add a simplified option for shulker boxes as well

Shulker boxes are similar to chests and i think they can lag if you have a ton of them laying around

The performance hit comes from the way a block renders. Chests and shulker boxes are dynamically rendered every frame. They need it that way for smooth animations. Hoppers and barrels are static, they only get updated when they (or blocks in proximity) change.
Also there's a difference between shulker boxes and chests: opening shulker boxes increases their collision box to 1.5 blocks. But the performance gain is probably worth the mismatch between actual and apparent size when you are using shulker boxes in your main storage.


Error in IE when user custom font

ERROR: jsPDF PubSub Error Object doesn't support property or method 'toString' TypeError: Object doesn't support property or method 'toString'.
I have my code
const pdf = new jsPDF('l', 'mm', 'a3');
let base64Str = 'AAEAAAANAIAAAwBQRkZUTXas8jIADxLYAAAAHEdERUYAKR.....';
pdf.addFileToVFS('NotoSansCJKjp-Regular.ttf', base64Str);
pdf.addFont('NotoSansCJKjp-Regular.ttf', 'NotoSansCJKjp', 'normal');
pdf.setFont('NotoSansCJKjp');
pdf.setFontSize(12);
pdf.text('取引報告書及び仮想通貨管理明細簿兼残高報告書', 15, 20);
pdf.save('test.pdf');
base64Str i get in https://raw.githubusercontent.com/sphilee/jsPDF-CustomFonts-support/master/dist/default_vfs.js
please help me

I see it error on function pdf.save
detail is font.metadata.toUnicode in ie have _f,_i,_l,_s,_t. in other brower not have it (_f,_i,_l,_s,_t)

https://github.com/MrRio/jsPDF#use-of-utf-8--ttf

I user it but it same error ERROR: jsPDF PubSub Error Object doesn't support property or method 'toString' TypeError: Object doesn't support property or method 'toString'.

I try used version 1.4.1 it ok. why that version 1.5.3 err? :(

please use jspdf.debug.js to give more information

comment number 2
I see it error on function pdf.save
detail is font.metadata.toUnicode in ie have _f,_i,_l,_s,_t. in other brower not have it (_f,_i,_l,_s,_t)
version 1.5.3 is error but version 1.4.1 is ok.
but i must used version 1.5.3 because i used pdf.autotable
I had sent img

Check this topic:
https://github.com/MrRio/jsPDF/issues/2259
Maybe it will help you

thanks for support.
May be I will used version 1.4.1 for this isue.

If you would supply your code, I could test it locally and provide a solution.

Hello, is there any update to this? I am facing the same issue. PDF generation works in Chrome but not in IE. The generated files are slightly different in size. I use UTF-8 characters with embedded Arial Narrow font. When I generate exactly the same PDF in IE and open it in Adobe Reader, I got a message: The font 'ArialNarrow.ttf' contains a bad /BBox. When I generate the PDF in Chrome, all is good.

I have identified the root cause of this issue. It is in the function toUnicodeCmap in jsPDF source code. It is looping in the codes array and one of the entries is key "objectOnly". In IE this object is undefined:

The script is then expecting each element to be an actual object:
unicode = ('0000' + **map[code].toString(16)**).slice(-4);
Method .toString(16) will cause that error in IE: jsPDF PubSub Error Object doesn't support property or method 'toString'. Because of this, the further execution is aborted and PDF definition of fonts at the bottom of the file is not valid.
I have fixed the code like this:
if((map[code] != null) && (map[code] != undefined)) {
unicode = ('0000' + map[code].toString(16)).slice(-4);
code = ('0000' + (+code).toString(16)).slice(-4);
range.push("<" + code + "><" + unicode + ">");
}
It will simply check for NULL or UNDEFINED and not continue to the critical section. Now the generated PDF will is exactly the same as the one from Chrome. Before the fix, the file was approx 1KB smaller because of the missing section.

Can you create a Pullrequest, please?

Checking for null and undefined is not enough, some objects apparently don't have the toString method on IE11. I had to add && typeof map[code].toString === "function" to the check in order for it to work properly on IE11.

#2318 Here's a PR

Merged PR

In case anyone else comes here, although the fix is applied to master, note that the dist files have not been re-built.
I've forked this project, added the fix to 1.5.3 release (the latest master branch was not stable for me), and updated the dist files. You can use this via:
npm install https://github.com/jdmwood2/jsPDF.git#138a44246e2cf51bee38a66f7d955ee82829b3d5

Hi @Uzlopak , I see this issue still exist in 1.5.3 the below code fixes the issue. Can you please commit and release a new version?
if((map[code] != null) && (map[code] != undefined) && typeof map[code].toString === "function" && Number.isInteger(code)) {           unicode = ('0000' + map[code].toString(16)).slice(-4);           code = ('0000' + (+code).toString(16)).slice(-4);           range.push("<" + code + "><" + unicode + ">");         }       }

I'm still having issues with IE11...I posted about it here: https://stackoverflow.com/questions/62920928/jspdf-issues-with-producing-pdf-and-using-custom-fonts-in-ie11
@Sravan-Nayini Would that code help resolve the problem I'm having? If so, where might I add it? I'm currently using the hosted library via the CDN link.

Could you test it with the files in PR #2804? It should be fixed there. If not, we should fix it.

@HackbrettXXX I'm kind of a noob when it comes to GitHub and things. I haven't been using npm to do any of this work...just an HTML package. Can you please point me in the right direction to get the files from the pull request you linked and use them in my project? Sorry if this is not a good question.

Ok, lets make it easy. I have a prebuilt version on my fork. You can include these script tags in your HTML file:
<script src="https://raw.githubusercontent.com/HackbrettXXX/jsPDF/prebuilt/dist/polyfills.umd.js"></script>
<script src="https://raw.githubusercontent.com/HackbrettXXX/jsPDF/prebuilt/dist/jspdf.umd.js"></script>

Then run your test case. Note that the jsPDF constructor is now under window.jspdf.jsPDF.

@HackbrettXXX Thank you for trying to help me here. I included those scripts. When I used only those scripts, I was unable to generate the PDF at all. I used "var doc = new window.jspdf.jsPDF({..." like you suggested, but still no luck. The console error is "Cannot read property 'jsPDF' of undefined."
I also tried using your scripts in addition to the main script, but still no luck.
Thanks again for taking the time to help me with this!

Ah sorry, forgot that scripts could not be loaded directly from GitHub. Instead, just download the two files and include them in your script tags.

@HackbrettXXX Thanks! I downloaded the files and included them in my index file. It let me generate the PDF on Chrome (but the custom fonts didn't work), and I got the "Object doesn't support this action" error in IE11 (no PDF generated).

Ah, yes the font-converter is not yet up-to-date. I quickly updated it: https://raw.githubusercontent.com/HackbrettXXX/jsPDF/modernization/fontconverter/fontconverter.html
Generate your font file again and make sure you choose "UMD" as module format.


Questions about access control ?

Refer to this page, I started tw with the following command on my computer:
tiddlywiki mywiki --listen host=<IP_ADDRESS> credentials="./users.csv" "readers=(anon)" writers=mary
It can be found that visitors cannot edit the Wiki, but there are exceptions:
streams plugin can still works? click the + button, double-click the node, etc...
Is there anything else I need to set?
edit: oh, I see, although it can be modified, it seems that it has not been saved

Nevertheless, it is best if can completely prohibit editing through streams.
Sometimes forget to log in when enter the notes, and then record some content and find that it is not saved. It will be very frustrating...

It's a fair request. I've never used TW with any kind of authentication so I'll have to look into the mechanism for determining if the wiki should be read only.

Fixed in https://github.com/saqimtiaz/streams/commit/4874bf3f42d81d944073bf02e88abb21b4d3cfa3
Let me know if this is still an issue in Stream 0.2.17

good, i will have a try


Add UI/DB for showing molecules that are related by neutral loss

Two issues:

The superscript - character is missing from Roboto, causing OSX Chrome to fall back to Helvetica, making it very difficult to see. Lucida Grande would be a better fallback font.
Chem mod filters aren't wired up.


[BugFix] Show routine load for non-existed job

What type of PR is this：

[x] bug
[ ] feature
[ ] enhancement
[ ] refactor
[ ] others

Which issues of this PR fixes ：

Fixes https://github.com/StarRocks/StarRocksTest/issues/883
Problem Summary(Required) ：

The job name of ShowRoutineLoadStmt is unset with the new analyzer.
The label name contains db/job name, so it's no need to retain db/job name alone.
To fix this problem and simplify the code, this PR removes the db name and job name of the stmt, and replaces them with label name.

[FE PR Coverage Check]
:disappointed: fail : 3 / 7 (42.86%)
file detail

path
covered_line
new_line
coverage
not_covered_line_detail

:large_blue_circle:
com/starrocks/analysis/ShowRoutineLoadStmt.java
3
7
42.86%
[153, 154, 155, 158]

run starrocks_admit_test

@mergifyio rebase

run starrocks_admit_test

[FE PR Coverage Check]
:disappointed: fail : 3 / 7 (42.86%)
file detail

path
covered_line
new_line
coverage
not_covered_line_detail

:large_blue_circle:
com/starrocks/analysis/ShowRoutineLoadStmt.java
3
7
42.86%
[153, 154, 155, 158]

@mergifyio backport branch-2.4


Make sure files defined to include mini header really include the mini header

Some files have already included full header, but we can leave them as they are for the first release.
For further releases, we may change them based on what we designate them to be.

obsolete; we are using full headers in all files.


test: add test_points_to_costmap

Signed-off-by: suchang<EMAIL_ADDRESS>Description
add test_points_to_costmap
Related links

Tests performed

Notes for reviewers

Pre-review checklist for the PR author
The PR author must check the checkboxes below when creating the PR.

[x] I've confirmed the contribution guidelines.
[x] The PR follows the pull request guidelines.

In-review checklist for the PR reviewers
The PR reviewers must check the checkboxes below before approval.

[ ] The PR follows the pull request guidelines.
[ ] The PR has been properly tested.
[ ] The PR has been reviewed by the code owners.

Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.

[ ] There are no open discussions or they are tracked via tickets.
[ ] The PR is ready for merge.

After all checkboxes are checked, anyone who has write access can merge the PR.

Thank you for your PR!
Regarding the title, I think this is not feat but test.

Thank you for your PR! Regarding the title, I think this is not feat but test.

3ks for quick reply. git comments modified.

1/2 /home/runner/work/autoware.universe/autoware.universe/planning/costmap_generator/CMakeLists.txt (600.90ms)
2/2 /home/runner/work/autoware.universe/autoware.universe/planning/costmap_generator/test/test_points_to_costmap.cpp (313.14ms)
Warning: Unknown word (mapx)
planning/costmap_generator/test/test_points_to_costmap.cpp:47:7 Unknown word (mapx)
planning/costmap_generator/test/test_points_to_costmap.cpp:51:17 Unknown word (mapy)
Warning: Unknown word (mapy)
Files checked: 2, Issues found: 2 in 1 files.
Error: 2 spelling issues found in 1 of the 2 files checked.

ci process shows comments in code has unknown words

// gridy
// |  mapx-------
// |            |
// |            |
// |            |
// |            mapy
// |__________________gridx

i do not think this should be modified...

ci process shows comments in code has unknown words

Since spell-check-differential is an optional check, you can ignore it for now.

Since it seems to be still WIP, I'll convert this to draft. :bow:
Please let me know when it's ready.

should i ignore this?

Error: 10 spelling issues found in 6 of the 67 files checked.

i did not modify these files.

/usr/bin/ld: libcostmap_generator_lib.so: undefined reference to `tf2::fromMsg(geometry_msgs::msg::Quaternion_<std::allocator > const&, tf2::Quaternion&)'
collect2: error: ld returned 1 exit status
gmake[2]: *** [CMakeFiles/test_points_to_costmap.dir/build.make:624: test_points_to_costmap] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:242: CMakeFiles/test_points_to_costmap.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2

@storrrrrrrrm

i did not modify these files.

You can ignore existing warnings. Or it would be great if you could fix them in another PR.

i do not have ros humble right now. it seems that origin costmap_generator can not be linked correctly on ros humble

As we'll move to Humble soon, you have to pass the Humble CI.
Please find related PRs and fix the errors. :pray:
https://github.com/autowarefoundation/autoware.universe/pulls?q=is%3Apr+is%3Aclosed+label%3Ahumble

@storrrrrrrrm

i did not modify these files.

You can ignore existing warnings. Or it would be great if you could fix them in another PR.

i do not have ros humble right now. it seems that origin costmap_generator can not be linked correctly on ros humble

As we'll move to Humble soon, you have to pass the Humble CI. Please find related PRs and fix the errors. pray https://github.com/autowarefoundation/autoware.universe/pulls?q=is%3Apr+is%3Aclosed+label%3Ahumble

i downloaded ghcr.io/autowarefoundation/autoware-universe:humble-latest-prebuilt-cuda and create a container,tested the codes,however, i can not reproduce the error that CI reported.everything looks fine.

is there any way i can reproduce the CI error on my local environment so that i can fix it?

@storrrrrrrrm

i did not modify these files.

You can ignore existing warnings. Or it would be great if you could fix them in another PR.

i do not have ros humble right now. it seems that origin costmap_generator can not be linked correctly on ros humble

As we'll move to Humble soon, you have to pass the Humble CI. Please find related PRs and fix the errors. pray https://github.com/autowarefoundation/autoware.universe/pulls?q=is%3Apr+is%3Aclosed+label%3Ahumble

i downloaded the latest docker image and tested the codes in container,however everything looks fine.

how can i reproduce the link error that CI reported so that i could fix it.

i know it sounds weired and incredible, but i found that only add
#ifdef ROS_DISTRO_GALACTIC
#include <tf2_geometry_msgs/tf2_geometry_msgs.h>
#else
#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>
#endif

to objects_to_costmap.hpp  make humble CI passed, add this to points_to_costmap.hpp,CI still shows link error,even if i compiled test_points_to_costmap which has nothing to do with objects_to_costmap.hpp!
i can not tell why, i had done a lot of work to find the point but found nothing.
compared the whole build/costmap_generator directory that generated by compiled with different codes(add include header to objects_to_costmap.hpp or to points_to_costmap.hpp ),nothing helpful found.
anyway, thanks to god, ci finally passed. :weary:

@maxime-clem Could you take a look at this? :pray: If it's okay for you, we can merge this.

thanks for suggestions. since current testcase does not change grid related params like grid_resolution_/grid_length_x_/grid_position_x_,  i set them to const.  my initial thought was i would change these params in future when i add more cases, especially grid_position_x_,grid_position_y_, to test with diffrent grid map. current test case  set grid center to (0,0) which is specific in map frame to make testdata construct and test result check easier.
about why i did not put grid_min_value/grid_max_value/gridmap_layer_name in  fixture class，i think test program is not just to test correctness of the program logic,but also a way to help autoware users to undestand and debug easier,i wanna they can know which params would have effect on costmap generation at  first sight when they read the code. so i leave them there.


dashboard Internal Server Error (500)

I am using you app, its great.
It has some issue, I am not modify any thing, just install until finished and open the "Kubernetes UI" by menu, the web show Error below:
Internal Server Error (500)
Get https://<IP_ADDRESS>:443/api/v1/replicationcontrollers: dial tcp <IP_ADDRESS>:443: getsockopt: connection refused

url: http://<IP_ADDRESS>:8080/api/v1/proxy/namespaces/kube-system/services/kubernetes-dashboard/#/replicationcontrollers
coreos version: stable

I'm facing the same behaviour. Could you please share your solution?

@tianhao have you sorted it out? if you did can you share the solution?

I am not use this app now, I build centos7 vm self, and it's dashboard has the same wrong, because the apiserver-host param was wrong,  I fix my dashboard-controller.yaml file and it work:
...
containers:
      - name: kubernetes-dashboard
        image: gcr.io/google_containers/kubernetes-dashboard-amd64:v1.0.0
        command:
          - "/dashboard"
          - "--port=9090"
          - "--apiserver-host=<IP_ADDRESS>:8080"
...

the point is the apiserver-host param, it is master host's apiserver ip and port. my cluster not use dns, so set ip and port.
may be this app's yaml can fix it.

@tianhao thanks for the answer, I will try to update dashboard-controller.yaml file and see what happens

Internal Server Error (500)
Get https://<IP_ADDRESS>:443/api/v1/replicationcontrollers: dial tcp <IP_ADDRESS>:443: getsockopt: connection refused
Same here rimusz

UPDATE:
Yes, I confirm, the solution from @tianhao WORKS!
I have added the BOLD section into the FILE and issued delete and create commands from iTerm
that opened by "OS shell" dropdown menu.
FILE: coreos-kubernetes-cluster-osx/src/k8s/dashboard-controller.yaml
spec:
  containers:
  - name: kubernetes-dashboard
    image: gcr.io/google_containers/kubernetes-dashboard-amd64:v1.0.1
    **command:
      - "/dashboard"
      - "--port=9090"
      - "--apiserver-host=<IP_ADDRESS>:8080"**
    resources:
      # keep request = limit to keep this container in guaranteed class

kubectl delete -f coreos-kubernetes-cluster-osx/src/k8s/dashboard-controller.yaml
kubectl delete -f coreos-kubernetes-cluster-osx/src/k8s/dashboard-service.yaml
kubectl create -f coreos-kubernetes-cluster-osx/src/k8s/dashboard-controller.yaml
kubectl create -f coreos-kubernetes-cluster-osx/src/k8s/dashboard-service.yaml

@JPalmerGithub would you mind to do the PR for the fix?

fixed in v0.6.3

@rimusz Apologies in advance for my late answer.
I am (and definitely may others) are truly appreciated for your kind efforts and nice app that you kindly donated to open source community. Thank you for the rapid fix.

@JPalmerGithub thanks for the nice words
open source world rocks :)


Accessing Alarm trigger of camera in python code

Hi,
I connected camera to embedded device for doing image processing, I want to know when has no motion detection triggered by camera, then I stop my processing, Is it possible to access alarm triggers in python code?

Hi! How you doing? do yo manage to achieve this?
Thanks!


[UTM] Crash on invalid qemu config

Currently if you have an invalid config such as an ide drive on aarch64 the app crashes. We should show an error message and not crash.

Oooooooh that’s why it crashes

#91 fixes this


Watch alarm widget

Widget of the watch alarm does not change after chime. (Amazfit Verge 1)

is it possible to fix it ?

Probably not because of the way the next alarm is accessed.


Update README.md

Description
Update versioning section.

I'm okay with merging this in, but it's marked as 'draft' atm

@GeeWee I just published the PR

Pull Request Test Coverage Report for Build 2444

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 91.933%

Totals

Change from base Build 2442:
0.0%

Covered Lines:
913

Relevant Lines:
958

💛  - Coveralls


3.1 and PostgreSQL 9.5 issue

Hi,
I'm seeing this when I run pgcluu 3.1 against 9.5:
relation "pg_statistic_ext" does not exist at character 404
STATEMENT:  COPY (SELECT date_trunc('seconds', now()), current_database(), cn.nspname AS schemaname, c.relname AS tablename, sn.nspname AS stat_schemaname, s.stxname AS stat_name, pg_get_userbyid(s.stxowner) AS stat_owner, (SELECT array_agg(a.attname ORDER BY a.attnum) AS array_agg FROM unnest(s.stxkeys) k(k) JOIN pg_attribute a ON a.attrelid = s.stxrelid AND a.attnum = k.k) AS attnames, s.stxkind AS kinds FROM pg_statistic_ext s JOIN pg_class c ON c.oid = s.stxrelid LEFT JOIN pg_namespace cn ON cn.oid = c.relnamespace LEFT JOIN pg_namespace sn ON sn.oid = s.stxnamespace WHERE NOT (EXISTS (SELECT 1 FROM unnest(s.stxkeys) k(k) JOIN pg_attribute a ON a.attrelid = s.stxrelid AND a.attnum = k.k WHERE NOT has_column_privilege(c.oid, a.attnum, 'select'::text))) AND (c.relrowsecurity = false OR NOT row_security_active(c.oid))) TO STDOUT CSV DELIMITER ';';
Can you please check?
Thanks!

Hi Devrim,
That's true, thanks for the report. I forgot to remove this metric when PG < 10. Commit faa1212 fixes it.
Cheers,


KMeans clusters

Hi,
I am using KMeans clustering and I want to plot the different clusters created by KMeans along with the corresponding data to each cluster but I cannot find a way to do that. How can I have access to the clusters of the model?
I am using Tribuo 4.2.
Thank you in advance.
Best regards,
Nikos

Thank you again for your reply! I will work with it.

I do not know if I set this as a bug but here what I have done:
I created this small code where I read a dataset with CVSLoader and I use KMeans to compute the clusters and I get multiple zeros for centroids. Can  you please take a look and comment on this? I check
concrete.csv
ed also with R and python and there should not be any zeros. Thank you again!
Here is the code:
Path csvPath = Paths.get("C:/Users/nikol/Desktop/","concrete.csv");
CSVLoader csvLoader = new CSVLoader<>(',', new LabelFactory() );
MutableDataset dataset = new MutableDataset<>(csvLoader.loadDataSource( csvPath, "Cement"));
KMeansTrainer trainer = new KMeansTrainer(10, /* centroids /
200, / iterations /
Distance.EUCLIDEAN, / distance function /
1, / number of compute threads /
1 / RNG seed */
);
KMeansModel model = trainer.train(dataset);
List<List> centroids = model.getCentroids();
ImmutableFeatureMap out = model.getFeatureIDMap();
for (List centroid : centroids) {
System.out.println(centroid);
}
I have attached the dataset and  the output that I get:
[(Age, 44,449541), (BlastFurnaceSlag, 24,783180), (CoarseAggregate, 925,746483), (CompressiveStrength, 34,370917), (FineAggregate, 844,935780), (FlyAsh, 66,897554), (Superplasticizer, 7,719266), (Water, 176,907951)]
[(Age, 0,000000), (BlastFurnaceSlag, 0,000000), (CoarseAggregate, 0,000000), (CompressiveStrength, 0,000000), (FineAggregate, 0,000000), (FlyAsh, 0,000000), (Superplasticizer, 0,000000), (Water, 0,000000)]
[(Age, 52,893151), (BlastFurnaceSlag, 170,927945), (CoarseAggregate, 943,610137), (CompressiveStrength, 38,615123), (FineAggregate, 729,920000), (FlyAsh, 29,472603), (Superplasticizer, 5,677260), (Water, 190,072329)]
[(Age, 0,000000), (BlastFurnaceSlag, 0,000000), (CoarseAggregate, 0,000000), (CompressiveStrength, 0,000000), (FineAggregate, 0,000000), (FlyAsh, 0,000000), (Superplasticizer, 0,000000), (Water, 0,000000)]
[(Age, 39,026627), (BlastFurnaceSlag, 16,626923), (CoarseAggregate, 1050,206213), (CompressiveStrength, 34,197308), (FineAggregate, 751,695562), (FlyAsh, 68,582840), (Superplasticizer, 5,308876), (Water, 176,890533)]
[(Age, 0,000000), (BlastFurnaceSlag, 0,000000), (CoarseAggregate, 0,000000), (CompressiveStrength, 0,000000), (FineAggregate, 0,000000), (FlyAsh, 0,000000), (Superplasticizer, 0,000000), (Water, 0,000000)]
[(Age, 0,000000), (BlastFurnaceSlag, 0,000000), (CoarseAggregate, 0,000000), (CompressiveStrength, 0,000000), (FineAggregate, 0,000000), (FlyAsh, 0,000000), (Superplasticizer, 0,000000), (Water, 0,000000)]
[(Age, 0,000000), (BlastFurnaceSlag, 0,000000), (CoarseAggregate, 0,000000), (CompressiveStrength, 0,000000), (FineAggregate, 0,000000), (FlyAsh, 0,000000), (Superplasticizer, 0,000000), (Water, 0,000000)]
[(Age, 0,000000), (BlastFurnaceSlag, 0,000000), (CoarseAggregate, 0,000000), (CompressiveStrength, 0,000000), (FineAggregate, 0,000000), (FlyAsh, 0,000000), (Superplasticizer, 0,000000), (Water, 0,000000)]
[(Age, 0,000000), (BlastFurnaceSlag, 0,000000), (CoarseAggregate, 0,000000), (CompressiveStrength, 0,000000), (FineAggregate, 0,000000), (FlyAsh, 0,000000), (Superplasticizer, 0,000000), (Water, 0,000000)]
concrete.csv

Thank you again for your reply! Changing to KMeans++ did the trick. There are no zeros appearing now and the results are as expected.

Ok. Feel free to re-open the issue if you have more issues with KMeans.


Fix #124 with InvariantCulture in double.TryParse()

PR for fix #124

Go ahead and merge it. I made you a contributor. (You might have to accept an invitation or something first.)


Add Spring Boot Profiles and Docker Compose Configuration

This pull request merges the feat/profiles branch into develop, introducing the following updates:

Spring Boot Profiles: Added environment-specific Spring Boot profiles (dev, test, prod) to reviewms, companyms, and jobms. Updated application properties to support these profiles.
Docker Compose: Added a docker-compose.yml file for managing and deploying all three services (reviewms, companyms, and jobms). Configured services with support for the new Spring Boot profiles.

Merged feat/profiles into develop, adding Spring Boot profiles and Docker Compose configuration for service management.


Added support for Cloudflare Turnstile to 2Captcha

Added support for Cloudflare Turnstile to 2Captcha.
Here is a usage example that I used to test :
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using CaptchaSharp.Services;

public class Program
{
    private static readonly HttpClient httpClient = new HttpClient();

    public static async Task Main(string[] args)
    {
        string apiKey = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
        string siteKey = "0x4AAAAAAAVrOwQWPlm3Bnr5";
        string siteUrl = "https://2captcha.com/demo/cloudflare-turnstile";

        var twoCaptchaService = new TwoCaptchaService(apiKey);

        var response = await twoCaptchaService.SolveTurnstileCaptchaAsync(siteKey, siteUrl);
        // Console.WriteLine(response.Response);

        var verificationResponse = await VerifyCaptchaAsync(response.Response);

        Console.WriteLine($"Verification Response: {verificationResponse}");

    }

    private static async Task<string> VerifyCaptchaAsync(string captchaSolution)
    {
        var requestUrl = "https://2captcha.com/api/v1/captcha-demo/cloudflare-turnstile/verify";
        var requestData = $"{{\"response\":\"{captchaSolution}\"}}";

        var request = new HttpRequestMessage(HttpMethod.Post, requestUrl)
        {
            Content = new StringContent(requestData, Encoding.UTF8, "application/json")
        };

        request.Headers.Add("accept", "*/*");
        request.Headers.Add("accept-language", "fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7");
        request.Headers.Add("priority", "u=1, i");
        request.Headers.Add("referer", "https://2captcha.com/demo/cloudflare-turnstile");
        request.Headers.Add("user-agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36");

        var response = await httpClient.SendAsync(request);
        var responseBody = await response.Content.ReadAsStringAsync();

        return responseBody;
    }

}

Hello, thank you for the PR.
I'm currently in the process of making a huge amount of changes to CaptchaSharp to add support for all missing features, so I think it would be best if you waited until the new release to add new functionality to avoid duplication of work, since I already did this exact change locally and was going to push it to the dev branch.
Next time, please open an issue first if it doesn't already exist, and please announce that you're going to work on it, otherwise we end up doing the same things ^^ I'm going to close this since my change will also integrates unit tests, sorry about it.

Also, on another note, please use better commit names instead of Update CaptchaType.cs etc. otherwise it looks like you're editing from GitHub web and the commit has no useful information about the change that is being done. Thanks!


getSignedUrl

https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html

available in 2.6.0


InterpreterSetting: don't crash when sorting settings.

The existing comparator would return -1 for both (a, b) and (b, a),
if both of these settings keys are not present in the template,
and such behaviour violates required comparator properties.
The issue manifests with exception in the form
java.lang.IllegalArgumentException: Comparison method violates its general contract!
at java.util.TimSort.mergeLo(TimSort.java:777)
and prevents server from starting up.
What type of PR is it?
Bug Fix
Questions:

Does the licenses files need update? I don't think, the change is trivial.
Is there breaking changes for older versions? No.
Does this needs documentation? No.

LGTM Thanks @vprus


Update README.md

I have updated the categories section { README.md} file, please review it, and let know me if there is any mistake. and if all is good , then please my pull request thanking you
Checklist:

[ ] I have read freeCodeCamp's contribution guidelines.
[ ] My pull request has a descriptive title (not a vague title like Update index.md)

Closes #XXXXX

add 3 catalog in READ.md file


Blank space between Content & toolbar on lollipop

Hi,
I have seen the issue #680, however I don't have that exactly, but on top.
I always get gap between my sliding content and toolbar on lollipop devices.
All works well on pre-lollipop devices.

See in the screen shot, there is gap between toolbar and textview.
Any help?
Thanks.

Commeting call to setPadding() method in SlidingMenu class file solved my problem.


CI: Better automate release generation

Use Github Actions more to automatically create a release, attach the build artifacts, and use the changelog generated from git-cliff all from just pushing a tag.

Completed in 5455cb5b10ad8fc0700c234c540ac6bdcbb89d45 and 2612f5e4ce4163081f094478089ab90c78ee1fcd


Monitoring V3 Documentation Fixes

Added the missing TOC entries. There still seems to be an issue (blank page) when clicking on the version (V3) on the left hand menu bar, but I'm not sure where that is configured.

I’ll take a look at the blank page issue, and do a PR to fix if possible.

thanks @quartzmo - CC me if you figure that out so I don't do it again. I'm sure it'll be painfully obvious in retrospect 😀


Please include an article that has steps to create a private endpoint using an Azure resource from a different Azure subscription/tenant

It would be helpful to have an article that demonstrates how to create a private endpoint that is using an Azure resource from a different Azure subscription/tenant. It should include the steps to create the private endpoint using the resource ID as well as the steps in the source subscription to approve the request.

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

ID: d16533ae-5e19-5769-4c29-581152f8c30c
Version Independent ID: 3f1b2b47-0bfe-b65c-ad0a-cca3586f7ba7
Content: Quickstart - Create a Private Endpoint using the Azure portal
Content Source: articles/private-link/create-private-endpoint-portal.md
Service: private-link
GitHub Login: @asudbring
Microsoft Alias: allensu

@perktime
Thanks for your feedback! We will investigate and update as appropriate.

Added work item to create new article for this.
#please-close

Added work item to create new article for this.
#please-close


Not finding URL working with sub locales on production

Describe the bug
You must provide a clear and concise description of what the bug is.
not able to load the urls for the sub locales on production
Occurs in next-i18next version
You must provide the npm module version, git tag, or even better the explict commit causing the issue.
"next-i18next": "^4.2.1",
Steps to reproduce
You must provide a reproducible repository, or copy/paste blocks of code which are sufficient to reproduce the bug.
Code I am using on production with npm run build && npm run export of similar repo
https://github.com/jatsgit/multi-doable-form
Expected behaviour
You must provide a clear and concise description of what you expected to happen.
Page should load find with url hit with sub locales, means to
http://localhost:8080/id/ or http://localhost:8080/en/
Screenshots
If applicable, add screenshots or a GIF to help explain your problem.

OS (please complete the following information)

Device: Mac OS Mojovave 10.14.6
Browser: Chrome Version 80.0.3987.149 (Official Build) (64-bit)

Additional context
Add any other context about the problem here.

It's port 3000, not 8080.

Its not related to port buddy 3000 I tried running with port still same.

Well then, I cannot reproduce. Because if I clone your repo, and do npm i && npm run build && npm start, I can see your web app at http://localhost:3000/en/.

First, thanks for replying. Its works that way even on my local, but if we
try building app using,  npm run build && npm run export and then I run
out folder using serve command, then issue comes what I mentioned and
same on Production environment i have deployed code from out folder and
running using port serve -l 8080, so its not working, sub locales, I am not
sure what i missed!
On Wed, 1 Apr 2020 at 22:53, Isaac Hinman<EMAIL_ADDRESS>wrote:

Well then, I cannot reproduce. Because if I clone your repo, and do npm i
&& npm run build && npm start, I can see your web app at
http://localhost:3000/en/.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/isaachinman/next-i18next/issues/674#issuecomment-607333131,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAJ4DK2CV267TGFV2GY6TNLRKNPQJANCNFSM4LZACQPQ
.

Oh, I see what you mean. Of course locale subpaths will not work with a static deployment - they depend upon an Express middleware. If you have any further questions please feel free to post on StackOverflow. Good luck!

Quick questions, I should deploy full code base how I run the app locally i
should run it same on prod too instead of deploying a static will it work
or i have remove serverless from target and rebuild the app and deploy?
On Wed, 1 Apr 2020 at 23:04, Isaac Hinman<EMAIL_ADDRESS>wrote:

Oh, I see what you mean. Of course locale subpaths will not work with a
static deployment - they depend upon an Express middleware. If you have any
further questions please feel free to post on StackOverflow. Good luck!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/isaachinman/next-i18next/issues/674#issuecomment-607339215,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAJ4DK3562VTJOWTLYOQHADRKNQW5ANCNFSM4LZACQPQ
.


feat(forge) _expectRevertCheatcode

Motivation
Ref #6833
Considering that we need a way to write negative tests for cheatcodes internally but making existing expectRevert cheats interact with cheatcodes as well would break a lot of thing and not really a desired feature, this PR adds _expectRevertCheatcode cheats for internal usage.
Solution

Extends ExpectedRevert context to allow 2 kinds of expectations - Default (expects revert from next non-cheatcode call) and Cheatcode (expects revert from next cheatcode call)
This cheatcode shouldn't end up in forge-std, so I've marked it as Experimental.
Updated cheatcode tests to use _expectRevertCheatcode instead of expectRevert

The logic with pending bool might be a little bit confusing, so maybe there is a way to improve it which I haven't figured out yet. I tried to document it clearly

Failing CI is triggered by one of the tests being false-positive earlier and failing on Windows now, not sure how to fix such things :/

@Evalir agreed that expectCheatcodeRevert is better, renamed it and pushed other fixes
pending guidance on whether we want Internal cheats group here

Could you please also summarize what the impact of this change is wrt regular expectRevert?

This PR will not affect existing expectRevert behavior, it simply changes flow in call_end hook making it a bit more explicit about how cheatcode calls are being treated.

pending @Evalir @DaniPopes

we'd def figure out a way to not include this in the vm interface

forge-std script to create Vm.sol interface already excludes Experimental cheats, so I think we can just exclude Internal as well
https://github.com/foundry-rs/forge-std/blob/ae570fec082bfe1c1f45b0acca4a2b4f84d345ce/scripts/vm.py#L32-L34


[Feature] Publish ESM modules

Describe the Feature
It is important for modern build tools (like the storybook vite builder) to expose an ESM build.  The official addon-kit should enable this by default, to ensure that the ecosystem of storybook plugins uses this best-practice.
It sounds like varun from discord is working on this currently, but I thought it might be good to have an issue to track it.

I am Varun from discord 👋🏽
Thanks for creating the issue. I was getting the ESM stuff working in measure first then going to backport it to the kit.


GSAP instead of css and altering the duration

Does anyone know if this is possible?

You can use any tool to make animations
Also you can set duration property to 0 and use your own timings, but smoothstate is not designed to work like this, so it will looks like a hack.
In overall, smoothstate just provides callbacks and you decide how to use them


actions: move message templates to a separate package

The use of templates is probably going to raise with the implementation of more action types and other features where we present a given message so it would be useful if we have all of this in a standalone package for us to avoid repetition and be able to ensure correct behaviour in case of missing values, injection and proper rendering.
As per https://github.com/stacklok/mediator/pull/1232#issuecomment-1771518224.
Related: https://github.com/stacklok/mediator/issues/1242

We don't think this will get scheduled, but someone will come in and fix it when they're touching nearby code.  Removing this paperwork.


Save bugs fix

You now correctly save the scene on play, and don't always save after shuting down.
fixes #469
fixes #470

SonarQube analysis reported 1 issue
Note: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:

 AncientFungus:LGEPR: Cppcheck cannot find all the include files (use --check-config for details)

Now resources are instead dimissed and work is lost when playing since they're reloaded from disk when returning to the editor (but never saved). Either don't load from disk when returning (if they're never altered during gameplay (I don't think they should be?)) or store to memory during play.

iamheman


iOS 12 not work

In front end, encountered error "can't find variable WebViewJavascriptBridge" with iOS 12，don't know what's wrong, anyone has an idea?

I have tried this in iOS 12, but it has no problem.

you need provide more info.

eee......


Forwarded message fail to send

I'm sorry for being such a bother, but I came across another issue.
Below is an example of my basic code that is giving me issues-- it's really basic, so I'm not sure what exactly would be causing issues.  Basically, when I create a new "forwarded" message, it will allow me to save it (which saves it to my drafts folder) but when I use try to send it, I'm getting the following error:
'requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://graph.microsoft.com/v1.0/me/messages/AAMkADliMTc3ZDNiLWZjZmEtNDFjYy04NzcwLWJmZjFiMmJhMDlmYwBGAAAAAACpHnAhRNt-Q4njDfQdqjvXBwAOQfZ77YdrRoTaU4t-LnG7AAAAAAArAABzMA6FP7fBQZ4lrv4MbsYlAAGaPoL5AAA=/send'
I've already (successfully) grabbed the message that I want to forward, as "message".
            forward_message = message.forward()

<EMAIL_ADDRESS>            forward_message.body = email_html
            forward_message.send()

As I mentioned, if I go into outlook, I can see my fully formed email sitting there in my drafts folder if I use save_draft() before I use send(), again, not really sure what I'm doing wrong.

I'm sorry for being such a bother

No problem!

again, not really sure what I'm doing wrong.

Ok i'll try to explain:
message.forward() will just create a draft that is a forward of message. This draft will be saved without modifications. That means, that the recipients are empty. So if you try to send it now, it will fail.
First you have to set the recipients and any other property you need and then call forward.message.save_draft(). Then you are ready to send it.
A simple example:
inbox = account.mailbox().inbox_folder()
msg = inbox.get_message()  # get the first message in the inbox.
forward_message= msg.forward()  # here a request to save a draft with the forward message is done.

<EMAIL_ADDRESS>forward_message.body = 'hi there! this is for u!'
# etc...

forward_message.save_draft()  # all the changes done to the forward_message are saved into the draft.

forward_message.send()  # the message is sent

Thanks.  I literally had that exact code commented out, and I am almost
certain I had tried it previously to no avail, however I just uncommented
my code and it worked the first attempt.
On Thu, Nov 8, 2018 at 11:34 AM Alejandro Casanovas <
<EMAIL_ADDRESS>wrote:

I'm sorry for being such a bother
No problem!
again, not really sure what I'm doing wrong.
Ok i'll try to explain:
message.forward() will just create a draft that is a forward of message.
This draft will be saved without modifications. That means, that the
recipients are empty. So if you try to send it now, it will fail.
First you have to set the recipients and any other property you need and
then call forward.message.save_draft(). Then you are ready to send it.
A simple example:
inbox = account.mailbox().inbox_folder()
msg = inbox.get_message()  # get the first message in the inbox.
forward_message= msg.forward()  # here a request to save a draft with the forward message is done.
<EMAIL_ADDRESS>forward_message.body = 'hi there! this is for u!'# etc...
forward_message.save_draft()  # all the changes done to the forward_message are saved into the draft.
forward_message.send()  # the message is sent
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/janscas/pyo365/issues/14#issuecomment-437088669, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ACLP_uDT1qOBZTHnaJTQoEHqXviuUb2vks5utGspgaJpZM4YUzxC
.

--
Very respectfully,
Jesse L. Pink
<EMAIL_ADDRESS>(567) 274-6520


word wrap in *.vue's

Issue Type: Bug
Word wrap work great and horizontal scrollbar never apears. One exception: a long line in a css rule inside

@shepelevstas Can you add a screenshot?

maybe it's caused by 3 added colorpicker squares in one row?

It really is the colorpickers! Turning off color decorators fixed it, but now I don't have color decorators :))

Duplicate of #32856


multiple translations from project and components do not work together

In my project, i have a de_DE.json, which is included with
$translateProvider.useStaticFilesLoader({
    prefix: 'translation/',
    suffix: '.json'
});

$translateProvider.preferredLanguage('de_DE');

One of the components i use has its own translations, which are included in the javascript code:
angular.module('testmodule').config(['$translateProvider',
  function ($translateProvider) {
    var translations = {
      'testmodule': {
        'ui': {
          'datepicker': {
            'ok': 'Schließen',
            'clear': 'Löschen',
            'currentDate': 'Heute'
          },
          'panel.action': 'Ändern',
          'multiselect': {
            'empty': 'Die Liste ist leer.',
            'noMoreOptions': 'Alle vorhandenen Optionen wurden bereits hinzugefügt.'
          },
          'table.cell': {
            'boolean.true': 'Ja',
            'boolean.false': 'Nein'
          },
          'filter': {
            'booleanValue.true': 'Ja',
            'booleanValue.false': 'Nein'
          }
        }
      }
    };
    $translateProvider.translations('de_DE', translations);
    $translateProvider.translations(translations);
    if ($translateProvider.preferredLanguage) {
      $translateProvider.preferredLanguage('de_DE');
    }
  }
]).value('preferredLanguage', 'de_DE');

Since the javascript code is executed and the translations of my module are loaded first, the actual translations file is never loaded.
It seems like angular-translate only loads the file if there is no other translation information for the selected language.
In my opinon, it should try to load a language file if a parameter is not available for the selected language( e.g. there are german translations, but the parameter common.foo.bar can not be found)

Can #1125 help you getting some ideas? And by "parameter" you mean key?
Completely mixing the multiple translation table "additions" from different sources per language in memory is - as far as I still know - not really possible until now and we've had also some tickets about that (can't find them quickly).

Thank you for your quick answer!
Yes, i meant key, O've edited my Answer.
My issue was actually quite similar to #1125 and I managed to get my code working with the https://github.com/juristr/angular-translate-loader-pluggable library.


Can not decode a local Image, But can scan the image

user ZXingObjec to decode the local image above,  my code like :
        UIImage  *image = [info objectForKey:UIImagePickerControllerOriginalImage];
        ZXLuminanceSource *source = [[ZXCGImageLuminanceSource alloc] initWithCGImage:image.CGImage];
        ZXBinaryBitmap *bitmap = [ZXBinaryBitmap binaryBitmapWithBinarizer:[ZXHybridBinarizer binarizerWithSource:source]];
        NSError *error = nil;
        ZXDecodeHints *hints = [ZXDecodeHints hints];
        ZXMultiFormatReader *reader = [ZXMultiFormatReader reader];
        ZXResult *result = [reader decode:bitmap
                                    hints:hints
                                    error:&error];
        if (result) {
            NSString *contents = result.text;
            ZXBarcodeFormat format = result.barcodeFormat;
        }

Error Domain=ZXErrorDomain Code=1002 "A barcode was not found in this image" UserInfo=0x174469f40 {NSLocalizedDescription=A barcode was not found in this image}
Could you help to solve this problem

Have you tried to set tryHarder, pureBarcode as hint? You could also play around with the rotation.

The following unit tests works for your qr-code:
#import "ZXQRCodeBlackBox7TestCase.h"

@implementation ZXQRCodeBlackBox7TestCase

- (id)initWithInvocation:(NSInvocation *)invocation {
  self = [super initWithInvocation:invocation
                testBasePathSuffix:@"Resources/blackbox/qrcode-7"
                     barcodeReader:[[ZXMultiFormatReader alloc] init]
                    expectedFormat:kBarcodeFormatQRCode];

  if (self) {
    [self addTest:1 tryHarderCount:1 rotation:270.0f];
  }

  return self;
}

- (void)testBlackBox {
  [super runTests];
}

@end

Test Suite 'Selected tests' started at 2015-10-07 00:06:01.980
Test Suite 'ZXQRCodeBlackBox7TestCase' started at 2015-10-07 00:06:01.981
Test Case '-[ZXQRCodeBlackBox7TestCase testBlackBox]' started.
2015-10-07 00:06:01.984 xctest[9875:1200485] Starting Resources/blackbox/qrcode-7/1.jpg
2015-10-07 00:06:02.052 xctest[9875:1200485] Rotation 270 degrees:
2015-10-07 00:06:02.052 xctest[9875:1200485]   1 of 1 images passed (1 required)
2015-10-07 00:06:02.052 xctest[9875:1200485]     0 failed due to misreads, 0 not detected
2015-10-07 00:06:02.052 xctest[9875:1200485]   1 of 1 images passed with try harder (1 required)
2015-10-07 00:06:02.053 xctest[9875:1200485]     0 failed due to misreads, 0 not detected
2015-10-07 00:06:02.053 xctest[9875:1200485] TOTALS:
Decoded 2 images out of 2 (100%, 2 required)
Test Case '-[ZXQRCodeBlackBox7TestCase testBlackBox]' passed (0.072 seconds).
Test Suite 'ZXQRCodeBlackBox7TestCase' passed at 2015-10-07 00:06:02.054.
	 Executed 1 test, with 0 failures (0 unexpected) in 0.072 (0.073) seconds
Test Suite 'Selected tests' passed at 2015-10-07 00:06:02.055.
	 Executed 1 test, with 0 failures (0 unexpected) in 0.072 (0.075) seconds
Program ended with exit code: 0

I seem to be having a similar issue as the user above.  I create my image, and if I scan a printed version or a version that is e-mailed it reads with no issues, but when I try to read it as an image it fails with the same code as above.  I am using the following image:

I am using the same demo code above to test the image.  I am not sure how to convert your test code in to workable code.   I did pull the rotate code out of one of your files to test rotation, but it seemed to have no effect.
Error result:
error	NSError *	domain: @"ZXErrorDomain" - code: 1002	0x000000013622c190
_userInfo	__NSDictionaryI *	1 key/value pair	0x0000000136229720
[0]	(null)	@"NSLocalizedDescription" : @"A barcode was not found in this image"
key	__NSCFConstantString *	@"NSLocalizedDescription"	0x000000019ccef4a0
value	__NSCFConstantString *	@"A barcode was not found in this image"	0x00000001005c4408

My code as follows:
-(void)QRCodeDecodeFromImage:(UIImage *)_image
{
//    CGImageRef imageToDecode = [_image CGImage];
    ZXImage *rotatedImage = [[ZXImage alloc] initWithCGImageRef:[_image CGImage]];
    rotatedImage = [self rotateImage:rotatedImage degrees:270];
    ZXLuminanceSource* source = [[ZXCGImageLuminanceSource alloc] initWithCGImage:rotatedImage.cgimage];
    ZXBinaryBitmap* bitmap =  [[ZXBinaryBitmap alloc] initWithBinarizer:[[ZXHybridBinarizer alloc] initWithSource:source]];

    NSError* error = nil;

    // There are a number of hints we can give to the reader, including
    // possible formats, allowed lengths, and the string encoding.
    ZXDecodeHints* hints = [ZXDecodeHints hints];
    hints.tryHarder = YES;
    hints.pureBarcode = YES;

    ZXMultiFormatReader* reader = [ZXMultiFormatReader reader];
    ZXResult* result = [reader decode:bitmap
                                hints:hints
                                error:&error];
    if (result) {
        // The coded result as a string. The raw data can be accessed with
        // result.rawBytes and result.length.
        NSString* contents = result.text;

        // The barcode format, such as a QR code or UPC-A
        ZXBarcodeFormat format = result.barcodeFormat;
        NSLog(@"BarCode Format: %u\n\n%@",format,contents);
    } else {
        // Use error to determine why we didn't get a result, such as a barcode
        // not being found, an invalid checksum, or a format inconsistency.
    }
}

Has anyone solved this yet? I'm having the same issue. I can interpret a 1D barcode from an image, but not a QR Code. I've tried all kinds of rotations and .tryHarder, but no luck.

@jiazi11
此问题我已找到一个解决方案，解决过程如下：
问题：我使用的方法和你一样，但是只能识别纯二维码等识别度特别高的二维码图片，拍照或者截取的都不行
解决过程：在打开相册时设置picker.allowsEditing = YES;状态即可
代码如下：
`//打开本地照片，选择图片识别

(void)openLocalPhoto
{
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
picker.delegate = self;
//注:若是打开相册识别二维码，必须开启编辑功能，否则识别成功率将大幅度降低
picker.allowsEditing = YES;
[self presentViewController:picker animated:YES completion:nil];
}`


Chrome to pion audio (opus) streaming not working

Your environment.

Version<EMAIL_ADDRESS>and current master (7f300)
Browser: Chrome version 76.0.3809.100 (Official Build) (64-bit)

What did you do?
Updated pion to v2.1.x (it used to work with the old pion ~v1)
See my webrtc-audio-streaming (branch: update-pion-to-v2.1)

Sener (answerer): Chrome browser
Receiver (offerer): Pion
The sender waits for signaling message
The receiver (pion) creates a peer connection and send SDP to the browser

What did you expect?

The sender sends Opus stream
The receiver receives Opus stream and plays it using oto library.

When the receiver is a browser, it works (with the same sender).

What happened?
ICE connection state changes to "Connected", but OnTrack() won't get called.
More than likely I am doing something wrong, but if anyone could give me some insight, that would be appreciated.
Here's some console logs:
LOG: 2019/08/13 00:32:02.574100 rtc: local SDP: v=0
o=- 914858406<PHONE_NUMBER> IN IP4 <IP_ADDRESS>
s=-
t=0 0
a=fingerprint:sha-256 C2:FC:D3:F3:75:0D:5E:64:FD:A8:4C:88:AD:63:0F:A5:F1:B4:EF:8F:F8:03:D2:A3:0A:46:FA:C4:76:08:6D:D8
a=group:BUNDLE 0
m=application 9 DTLS/SCTP 5000
c=IN IP4 <IP_ADDRESS>
a=setup:actpass
a=mid:0
a=sendrecv
a=sctpmap:5000 webrtc-datachannel 1024
a=ice-ufrag:FdJcxuQwDmoDzMgv
a=ice-pwd:TXEqHwlGEkqYWczOzoeOdIrCGKcOmvlX
a=candidate:foundation 1 udp<PHONE_NUMBER> <IP_ADDRESS> 60240 typ host generation 0
a=candidate:foundation 2 udp<PHONE_NUMBER> <IP_ADDRESS> 60240 typ host generation 0
a=end-of-candidates
a=setup:actpass

LOG: 2019/08/13 00:32:02.574182 Signaling State has changed have-local-offer
LOG: 2019/08/13 00:32:03.231354 received remote description
LOG: 2019/08/13 00:32:03.231389 rtc: remote SDP: v=0
o=-<PHONE_NUMBER>13632755 2 IN IP4 <IP_ADDRESS>
s=-
t=0 0
a=group:BUNDLE 0
a=msid-semantic: WMS
m=application 9 DTLS/SCTP 5000
c=IN IP4 <IP_ADDRESS>
b=AS:30
a=ice-ufrag:q5QD
a=ice-pwd:xkl95wu4mLiGhUcU7MPi/eqo
a=ice-options:trickle
a=fingerprint:sha-256 BF:66:19:70:A0:87:14:42:DE:9D:73:7A:27:61:CA:CA:52:AA:66:44:C1:75:59:CE:8E:E1:1F:4B:E5:4D:E6:85
a=setup:active
a=mid:0
a=sctpmap:5000 webrtc-datachannel 1024

LOG: 2019/08/13 00:32:03.231519 Signaling State has changed stable
LOG: 2019/08/13 00:32:03.231540 Connection State has changed checking
LOG: 2019/08/13 00:32:03.231825 received remote candidate
LOG: 2019/08/13 00:32:03.231893 rtc: remote candidate: candidate:2876613781 1 udp<PHONE_NUMBER> 6d8cff14-c958-4016-ac6e-b1e732c833e8.local 63139 typ host generation 0 ufrag q5QD network-cost 999
LOG: 2019/08/13 00:32:03.232374 received remote candidate
LOG: 2019/08/13 00:32:03.232397 rtc: remote candidate: candidate:1717310165 1 udp<PHONE_NUMBER> 6a78376c-14e3-4b1d-aeae-e46c8448e84e.local 63140 typ host generation 0 ufrag q5QD network-cost 999
LOG: 2019/08/13 00:32:04.328450 Connection State has changed connected

@Sean-Der
I have made this suggested change but OnTrack handle still not get called.
Now the log looks more like it.. (made a progress).
LOG: 2019/08/13 01:08:08.167327 Create PeerConnection
LOG: 2019/08/13 01:08:08.177055 rtc: local SDP: v=0
o=- 69145903<PHONE_NUMBER> IN IP4 <IP_ADDRESS>
s=-
t=0 0
a=fingerprint:sha-256 87:CB:4D:54:E1:CC:E3:D2:44:71:6B:06:B8:84:E5:2A:DE:7B:35:0D:49:78:29:F4:5D:E2:7F:5F:E0:72:E3:43
a=group:BUNDLE 0 1
m=audio 9 UDP/TLS/RTP/SAVPF 111
c=IN IP4 <IP_ADDRESS>
a=setup:actpass
a=mid:0
a=ice-ufrag:mvkkoZqqsmkwhQZO
a=ice-pwd:snlyuXvUScubIWtviWRkIyeuAaqFaICq
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:111 opus/48000/2
a=fmtp:111 minptime=10;useinbandfec=1;stereo=1
a=ssrc:281908850 cname:EPskTIaEMlZQdkJY
a=ssrc:281908850 msid:EPskTIaEMlZQdkJY rNqZHbXbsHNBCtiA
a=ssrc:281908850 mslabel:EPskTIaEMlZQdkJY
a=ssrc:281908850 label:rNqZHbXbsHNBCtiA
a=msid:EPskTIaEMlZQdkJY rNqZHbXbsHNBCtiA
a=sendrecv
a=candidate:foundation 1 udp<PHONE_NUMBER> <IP_ADDRESS> 61440 typ host generation 0
a=candidate:foundation 2 udp<PHONE_NUMBER> <IP_ADDRESS> 61440 typ host generation 0
a=end-of-candidates
a=setup:actpass
m=application 9 DTLS/SCTP 5000
c=IN IP4 <IP_ADDRESS>
a=setup:actpass
a=mid:1
a=sendrecv
a=sctpmap:5000 webrtc-datachannel 1024
a=ice-ufrag:mvkkoZqqsmkwhQZO
a=ice-pwd:snlyuXvUScubIWtviWRkIyeuAaqFaICq
a=candidate:foundation 1 udp<PHONE_NUMBER> <IP_ADDRESS> 61440 typ host generation 0
a=candidate:foundation 2 udp<PHONE_NUMBER> <IP_ADDRESS> 61440 typ host generation 0
a=end-of-candidates
a=setup:actpass

LOG: 2019/08/13 01:08:08.177194 Signaling State has changed have-local-offer
LOG: 2019/08/13 01:08:08.185944 received remote description
LOG: 2019/08/13 01:08:08.186006 rtc: remote SDP: v=0
o=-<PHONE_NUMBER>383311610 2 IN IP4 <IP_ADDRESS>
s=-
t=0 0
a=group:BUNDLE 0 1
a=msid-semantic: WMS 873af8da-0ada-47c9-a16c-7183f28782c8
m=audio 9 UDP/TLS/RTP/SAVPF 111
c=IN IP4 <IP_ADDRESS>
a=rtcp:9 IN IP4 <IP_ADDRESS>
a=ice-ufrag:PxUW
a=ice-pwd:xJKJkooDcpyLlvP61dG7OuyL
a=ice-options:trickle
a=fingerprint:sha-256 A9:EB:8D:35:05:69:A8:3D:6C:38:7B:C6:3E:E7:88:32:10:0A:33:2B:B8:82:BE:E2:A6:D1:29:EB:CB:03:C3:57
a=setup:active
a=mid:0
a=sendrecv
a=msid:873af8da-0ada-47c9-a16c-7183f28782c8 a48b04de-4dd7-4648-a4e8-e3cc4cb01dbd
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=fmtp:111 minptime=10;useinbandfec=1
a=ssrc:3036742241 cname:91y9v5cmnZtWe5hZ
m=application 9 DTLS/SCTP 5000
c=IN IP4 <IP_ADDRESS>
b=AS:30
a=ice-ufrag:PxUW
a=ice-pwd:xJKJkooDcpyLlvP61dG7OuyL
a=ice-options:trickle
a=fingerprint:sha-256 A9:EB:8D:35:05:69:A8:3D:6C:38:7B:C6:3E:E7:88:32:10:0A:33:2B:B8:82:BE:E2:A6:D1:29:EB:CB:03:C3:57
a=setup:active
a=mid:1
a=sctpmap:5000 webrtc-datachannel 1024

LOG: 2019/08/13 01:08:08.186278 Signaling State has changed stable
LOG: 2019/08/13 01:08:08.186552 Connection State has changed checking
LOG: 2019/08/13 01:08:09.200257 received remote candidate
LOG: 2019/08/13 01:08:09.200342 rtc: remote candidate: candidate:2876613781 1 udp<PHONE_NUMBER> 6d8cff14-c958-4016-ac6e-b1e732c833e8.local 65188 typ host generation 0 ufrag PxUW network-cost 999
LOG: 2019/08/13 01:08:09.201650 received remote candidate
LOG: 2019/08/13 01:08:09.201692 rtc: remote candidate: candidate:1717310165 1 udp<PHONE_NUMBER> 6a78376c-14e3-4b1d-aeae-e46c8448e84e.local 65189 typ host generation 0 ufrag PxUW network-cost 999
LOG: 2019/08/13 01:08:09.339872 Connection State has changed connected

Never mind. (sender was in weired state)  Now it is working!! @Sean-Der
Thank you!

@enobufs what is the root cause? I am having the same issue: "ICE connection state changes to "Connected", but OnTrack() won't get called."

The root cause was the fix mentioned above. My tool seems to work.  It transfers opus stream from browser to browser or pion. I wonder if this works for you... (it does not do pion to browser tho).


IS XPO no longer getting updates.

I see there are very few updates is the last couple of years is this now a retired project?

@BicycleMark : This repository contains only a few popular demo samples, which do not require much changes, because API is quite stable.
DevExpress XPO ORM itself is an active project that regularly gets updates through https://www.nuget.org/packages/DevExpress.Xpo/ and https://nuget.devexpress.com/. For instance, you can see the list of the resolved issues in the last year in the DevExpress version history.
Our free XPO ORM is also at the core of many commercial DevExpress products like Cross-Platform .NET App UI (XAF), .NET Role-based Access Control API, Dashboards, Reporting, etc. with thousands of users - so it is not going to be retired soon anyway :-)


Failing tests for Mercator coord_system

The tests for the Mercator coord system are failing when run with cartopy 0.17. This looks like it is because the behaviour of cartopy changed ever so slightly with regard to the handling of the latitude_true_scale parameter in the Mercator projection. Previously cartopy used a default value of 0.0 for the proj4 parameter lat_ts if the latitude_true_scale parameter was not passed to the Mercator CRS, whereas from 0.17 it omits the lat_ts parameter from the proj4 definition if latitude_true_scale is not provided.
This is relevant because the tests for the Mercator coord system in iris create a default iris.coord_systems.Mercator() object, convert to a cartopy representation, then compare this to a cartopy.crs.Mercator() instance and expect them to be the same. However, since cartopy 0.17 they will not compare equal because their proj4 parameters will be different (lat_ts=0.0 vs no lat_ts). I believe they are still equivalent since proj4 uses a default lat_ts=0.0 if you don't provide it, they just don't look equal.
We may want to modify our tests to compare apples with apples. An iris.coord_systems.Mercator instance will always pass latitude_true_scale to the cartopy.crs.Mercator constructor when converting to a cartopy CRS, so our test should really compare this to a cartopy.crs.Mercator(latitude_true_scale=0.0) instance, otherwise we are assuming too much about how cartopy handles default arguments.

Thanks @ajdawson, I'm on it.

Closed by #3232, thanks @corinnebosley


Remove some hateful PEP8 errors

and unused variables
and spaces/indentation problems

Coverage decreased (-0.0001%) to 79.964% when pulling 27b5a5355dd63b3f3e32ab564022d803eb764779 on koriaf:master into 0335e38a018122190510f271cab6a50ef9423a9f on Miserlou:master.

Shall I remove all these comments? All why-s covered by my first answer?

Yeah, I'd prefer it if you could take the comments out please. The r""" is okay, I just hadn't seen that before and thought it might be a typo. Sorry about the need to rebase but I wanted to merge in the other PR for today's release.

Okay. I can't rebase without force-pushing the repo and I can't merge because there will be some merge commits. So please destroy this PR, I'll create the new one soon.

Roger that


About performance

How performant is it with a big amount of records? (1M or less for example) or its only for small projects?
thanks

There is no benchmarks yet, but I designed it rather for small systems. Now @anant-svc is project maintainer

@shamuel22
As all know Lazer-Database stores data in JSON string files so it depends on server configuration like PHP version, RAM, Inodes size, Linux 64-bit preferred.
This is for mid-level projects though it depends on AREA you will use in your projects.
Lastly there is no limitation on size of JSON string so Lazer-Database will works faster to get data and save data is bit slower for large data only.

@SaphiLC
As all know Lazer-Database stores data in JSON string files so it depends on server configuration like PHP version, RAM, Inodes size, Linux 64-bit preferred.
This is for mid-level projects though it depends on AREA you will use in your projects.
Lastly there is no limitation on size of JSON string so Lazer-Database will works faster to get data and save data is bit slower for large data only.

@SaphiLC I have ported to PHP 7. Check this page: https://github.com/Lazer-Database/Lazer-Database/issues/42#issuecomment-650882035


ADO.NET Sample App

Added an ADO.NET sample app, which has been tested on Windows, Linux (x86_64 and aarch64), and Mac.  The sample app compiles under multiple versions of .NET, including .NET Framework on Windows and a couple different versions of .NET Core on all platforms.
⚠ This PR should only be merged after Vertica 23.3 has been released.  The current Vertica 12.0.4 ADO.NET client driver does not support .NET Core and is not published to NuGet.

I made some changes to the sample app based on the recent demos I have been doing for the .net core driver.   The SampleApp class has been updated to do basic exception handling and to print out a cleaner form of the result set.   The code that prints result sets has been implemented in a separate class.   This is a cleaner implementation and it avoids distracting people viewing the sample app with code that is not relevant to the sample.


Why are sims behaving differently on iPad Pro?

Kathy recently received an email (please add to issue @oliver-phet) detailing an issue a user found on the new version of the iPad Pro. I recently had an issue where I couldn't load recent (how recent?) versions of sims from phet-dev.colorado.edu on my iPad Pro. See https://github.com/phetsims/QA/issues/329.
I'll look into how recent the versions need to be for the sims not to load.
I think it would be a good idea do testing on iPad Pro before sims are published. Don't know how the logistics of this will work; maybe we should add iPad Pro to the testing matrix, @KatieWoe.

From kathy:

iPad Pro having "unreliable touch and drag responsiveness" using the sims directly on the website.

This seems handled.  Tested on devices in apple store and by @lmulhall-phet.  Closing for now.


Multiline strings

I see that swift-markdown is getting confused by multiline strings. Maybe a good idea is to encode newlines as \n?

Can you elaborate? Is it the """...""" notation?

Oh no, you are right — this issue is very vague (I was doing other stuff and got sloppy, my bad).
Multiline strings in markdown tables seem to trip swift-markdown when parsing the text. I didn't dive deep to debug what exactly is happening but trying to (simply) continue the text on the next line doesn't seem to work. Using a "\n" in the text also didn't seem to be on the right side of swift-markdown.

Ah, cell contents you mean -- yeah, multiline cells aren't possible in any Markdown table implementation I tried.
You basically would need to custom encode/decode string cells IIRC to replace a line break character or character sequence.


Controls GUI Not Showing

My GUI is more basic than the one in the readme. Did I not build it correctly or do I need to be on macOS 14? I would like to run the SD XL models. I am running macOS 13.5 and guessing I could run the non-quantized model even if it would be really slow.

Please use the Diffusion-macOS scheme.

That's exactly right, you need to use the mac target. However, the XL model requires iOS 14. In this app, you could copy this line in the else to have it show up in the UI: https://github.com/huggingface/swift-coreml-diffusers/blob/e5f9a6578d735e7f2bf87a7114a22db45d23b4d6/Diffusion/Common/ModelInfo.swift#L200
However, the XL pipeline is only supported in macOS 14 in apple/ml-stable-diffusion, so you'd need to make modifications there too.

Thanks, that solved my issue.


Streamline Data Feed Architecture

Expected Behavior
The data feed classes should be 99% identical with small differences at the bottom of the stack depending on the data subscription source.
Actual Behavior
Maintenance and support for data feeds are increasingly difficult due to the current data feed abstractions.

Potential Solution
Refactor the data feed to share the subscription management and data synchronization logic.

Checklist

[x] I have completely filled out this template
[x] I have confirmed that this issue exists on the current master branch
[x] I have confirmed that this is not a duplicate issue by searching issues

This has already been implemented through multiple PRs. Detailed information at https://github.com/QuantConnect/Lean/projects/5


[ADD] Use cuban vaccine prophylaxis and medical product

Add in valuesets files vaccine-prophylaxys.json and vaccine-medical-product.json, the cuban medical treatments for covid-19 (Soberana 02, Abdala);
Add in valuesets file vaccine-mah-manf.json, the manufactures of the cuban vaccines;

Thanks for your input.
I will pass it on to the Semantic Sub-Group who define the valuesets.

I will bring this proposal to the Semantic Subgroup today. According to my quick search cuban vaccines has not been approved by EMA nor by FDA or WHO, which is one of inclusion criteria for EU vaccines value set.  It would be helpful if we will have information about the reasons why you are proposing to add them.

@yvcruz there's also the option to define your own HCERT payload just as EU Digital Covid Certificate v1 (eu_dcc_v1). The HCERT container was designed with this in mind.

I will bring this proposal to the Semantic Subgroup today. According to my quick search cuban vaccines has not been approved by EMA nor by FDA or WHO, which is one of inclusion criteria for EU vaccines value set. It would be helpful if we will have information about the reasons why you are proposing to add them.

At this time, all the steps are being taken to have Cuban vaccines recognized and approved by the EU and WHO, and for the purpose of creating green certificates to facilitate the travel of vaccinated people to the EU. We are using this schema repository to fine-tune health certificate creation.
Greetings

@yvcruz there's also the option to define your own HCERT payload just as EU Digital Covid Certificate v1 (eu_dcc_v1). The HCERT container was designed with this in mind.

That was the first step, we already have alternatives that run throughout the national territory, and we are adjusting our solution to different scenarios.
Greetings

@yvcruz could you formulate an official request from a EU member state and address it to the Chair of the SgS<EMAIL_ADDRESS>This would help facilitating discussion in the SgS. Semantically, we can add new vaccines to the value set, however acceptance of such certificate at boarder is purely on the member states' decision. At the other hand, as I wrote, there are several inclusion criteria for the entries and we need sort of justification on each proposal.

Yes, we will go through all the steps to make inclusion effective. This is essential in order to add the test cases of the structures that your standard defines. And validate the effectiveness of our issuer model.
Thank you

@yvcruz @kruzikh is there an update for this, or can I close it?

I'll close this for now on the assumption that there is no update / it's not needed.

Disclaimer: I haven't read the rest of the posts on this topic, just the
last one, as I'm giving a tutorial on AI at the University ATM...
Summary: The valuesets should be removed from ehn-dcc-schema.
IIRC Meinte should have updated the README.md in ehn-dcc-schema many months
ago already to say "please look at ehn-dcc-valuesets instead of here for
the valuelsets"
My PR for a 1.3.1 would have removed the valuesets in ehn-dcc-schema had it
been applied, which it doesn't seem to have been given this new and IMHO
completely understandable PR from a user/dev perspective
Even though I haven't been on the project for many months I will take a
look at this tonight and look at applying the PR to simply remove the
valuesets from ehn-dcc-schema, as my sympathies are very much with the
end-user devs who should at least be able to expect clarity here.
@Hynek

I'll do the change for a 1.3.1 which removes the duplicate  and
Will prepare a 1.3.1 release for.you, which will then need formal
approval from eHN Te h IOP before making the official release. If you still
have the TechIOP meetings Friday morning  you could even raise this issue
and request formal release permission as soon  as tomorrow am

Gaby
Op do 24 feb. 2022 15:44 schreef Ryan Barrett @.***>:

I'll close this for now on the assumption that there is no update / it's
not needed.
—
Reply to this email directly, view it on GitHub
https://github.com/ehn-dcc-development/ehn-dcc-schema/pull/102#issuecomment-1049930319,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ASHCPHNR6GMK6PZYP3M7DRDU4Y73DANCNFSM46MOFSRA
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you commented.Message ID:
@.***>

There's no need - we're cleaning up the remaining PRs / issues this week as per the internal process :-)


Remove verbose description about js2-mode

js2-mode now derives from js-mode. That means the former function will run js-mode-hook, as well as js2-mode-hook.

Please see https://github.com/mooz/js2-mode/blob/5cb52a7de8218bb2d50f67ba422fa7b2d51d1dc6/NEWS.md#20150909.

Hi, @codesuki
I always use your this awesome package! 😆 👍
I found verbose description about js2-mode in README, so I sent this pull request.
I would appreciate if you review this. 🙏
Thanks.

Hey!
Good point, thanks for the correction! :)

Thanks a lot! 😄


add support for specifying an image's platform

closes #76
allow an image's platform to be specified either in the cli or in the api
hauler store add image alpine:latest --platform linux/arm64

apiVersion: content.hauler.cattle.io/v1alpha1
kind: Images
metadata:
  name: myimage
spec:
  images:
    # or fully qualified from any OCI compliant registry for other platforms
    - name: ghcr.io/fluxcd/flux-cli:v0.22.0
      platform:
        os: linux
        architecture: arm64

Note this does not add support for multi platform images, that is being tracked in #104

Replaced by newer PR.


ng-new ask the same questions twice.

🐞 Bug report
Command

[x] new

Is this a regression?
First time I see that. After update to Angular 11 (next) today.
Description
When creating a new project with ng new the CLI ask the same questions twice.
I think this is since the new question about strict-mode.
🔬 Minimal Reproduction

Update the global CLI: npm install -g<EMAIL_ADDRESS>Call ng new.
Enter the name.
Answer the strict-mode question.
Enjoy a Déjà-vu. Same question about the name and strict-mode. Fortunately, it's not an endless loop. Only twice.

🌍 Your Environment

Angular CLI: 11.0.0-next.6
Node: 10.22.0
OS: win32 x64

Angular: 11.0.0-next.5
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1100.0-next.6
@angular-devkit/build-angular   0.1100.0-next.6
@angular-devkit/core            11.0.0-next.6
@angular-devkit/schematics      11.0.0-next.6
@angular/cli                    11.0.0-next.6
@schematics/angular             11.0.0-next.6
@schematics/update              0.1100.0-next.6
rxjs                            6.6.3
typescript                      4.0.3

Windows 10 PowerShell 5.1
Screenshots

Same root cause of https://github.com/angular/angular-cli/issues/19027 which is solved via https://github.com/angular/angular-cli/pull/19029


Single shared config

Hi,
I wondered if we have had a case of proliferation with the configs when splitting the packages.
This is based on PR #18 and extends on it unifying the .conf files in (I hope) a better way.
We still would have the agent not run by default and the server having a config, but also the ability to deploy an own one.
At least I didn't see a drawback to what we have, but a massive win due to removing duplication and confusion.

It seems to me the easiest way to handle the config problem until the split happens on upstream. Thanks a lot @cpaelzer !

Hiya,

This looks odd, I am not sure what caused this but this is what I get when I try to install the -server. I'm taking a further look to understand what's happening.

My bad. I've got everything working; all services seem to be up and running. And that's good! \o/


Kill all subprocesses when Kino smart cell exits

So the question is how to correctly setup a callback when a Kino Smart Cell exits/dies?

This should be addressed in 0fab89ba34568bbe7168133b6c920b7cc19991ae


csv: declare minimum kubernetes version

We need k8s >= 1.23 because of the podresources API.

/hold

/cherry-pick release-4.10

we need a prow configuration fix or to get
https://bugzilla.redhat.com/show_bug.cgi?id=2049603
solved

requires: https://github.com/openshift/release/pull/26447

/retest

/retest
infra issue

/retest

/hold cancel
if CI's happy, let's go with it


arrays used as indices must be of integer (or boolean) type

Hi!
I am inferring the causal effect of weather on store sales.
My data frame consists of all float variables (temperature, pressure, sales quantity, week of the year etc..)

I am using the df.causal.api method with the following parameters:
weSalesDf_api.causal.do(x=x1,outcome='q',dot_graph=str(wSgfs.source.replace("\n"," ")),proceed_when_unidentifiable=True,variable_types=x1_type)
where:
x1={'t':-3,'d':3,'g':980,'h':90,'r':2,'n':1,'i':4,'w':13} x1_type={'t':'c','d':'c','g':'c','h':'c','r':'c','n':'c','i':'c','w':'c','q':'c'}
'q' is the outcome
dot_graph is:

I am getting the following error:
IndexError: arrays used as indices must be of integer (or boolean) type

When i use the 4 step approach the same data frame works fine.
Please can you help me resolve this issue? My primary objective is to estimate the outcome when I specify values for the causal variables.

@rameshiyerv happy to help! do you mind providing a small reproducible example so that I can try it on my computer and find the issue?

@rameshiyerv happy to help! do you mind providing a small reproducible example so that I can try it on my computer and find the issue?

dowhy_api.zip
Thanks for looking into this @amit-sharma , please find sample data attached
Here is the graph  (rest of the values for x, outcome & variable types are in the issue description)
`wSgfs = Digraph()
wSgfs.node('s','Sls_Dt')
wSgfs.node('q','SalesQty')
wSgfs.node('t','temperature')
wSgfs.node('d','dew_point')
wSgfs.node('g','ground_pressure')
wSgfs.node('h','humidity')
wSgfs.node('r','rain')
wSgfs.node('n','snow')
wSgfs.node('i','ice')
wSgfs.node('w','WeekNo')
wSgfs.edges(['sw', 'wt','wd','wg','wh','wr','wn','wi','tq','dq','gq','hq','rq','nq','iq'])
wSgfs.edge('w','q',constraint='false')
wSgfs`

dowhy_api.zip
Thanks for looking into this @amit-sharma , please find sample data attached
Here is the graph  (rest of the values for x, outcome & variable types are in the issue description)
`wSgfs = Digraph()
wSgfs.node('s','Sls_Dt')
wSgfs.node('q','SalesQty')
wSgfs.node('t','temperature')
wSgfs.node('d','dew_point')
wSgfs.node('g','ground_pressure')
wSgfs.node('h','humidity')
wSgfs.node('r','rain')
wSgfs.node('n','snow')
wSgfs.node('i','ice')
wSgfs.node('w','WeekNo')
wSgfs.edges(['sw', 'wt','wd','wg','wh','wr','wn','wi','tq','dq','gq','hq','rq','nq','iq'])
wSgfs.edge('w','q',constraint='false')
wSgfs`

Update:
I tried something and this time i get a different error (may be it will be useful in you issue triage)
I changed the variables type for 'w' to a 'd' since this is the WeekNo it should be categorical ideally.
x1={'t':-3,'d':3,'g':980,'h':90,'r':2,'n':1,'i':4,'w':13} x1_type={'t':'c','d':'c','g':'c','h':'c','r':'c','n':'c','i':'c','w':'d','q':'c'}
With this i get the error - at least one array or dtype is required
full error trace
`INFO:dowhy.causal_graph:If this is observed data (not from a randomized experiment), there might always be missing confounders. Adding a node named "Unobserved Confounders" to reflect this.
INFO:dowhy.causal_model:Model to find the causal effect of treatment ['t', 'd', 'g', 'h', 'r', 'n', 'i', 'w'] on outcome ['q']
WARNING:dowhy.causal_identifier:If this is observed data (not from a randomized experiment), there might always be missing confounders. Causal effect cannot be identified perfectly.
INFO:dowhy.causal_identifier:Continuing by ignoring these unobserved confounders because proceed_when_unidentifiable flag is True.
INFO:dowhy.causal_identifier:Instrumental variables for treatment and outcome:['s']
INFO:dowhy.causal_identifier:Frontdoor variables for treatment and outcome:['n']
INFO:dowhy.causal_identifier:All common causes are observed. Causal effect can be identified.
WARNING:dowhy.causal_identifier:If this is observed data (not from a randomized experiment), there might always be missing confounders. Causal effect cannot be identified perfectly.
INFO:dowhy.causal_identifier:Continuing by ignoring these unobserved confounders because proceed_when_unidentifiable flag is True.
INFO:dowhy.do_sampler:Using WeightingSampler for do sampling.
INFO:dowhy.do_sampler:Caution: do samplers assume iid data.
ValueError                                Traceback (most recent call last)
 in
1 #CausalModel(data=weSalesDf,graph=str(wSgfs.source.replace("\n"," ")),treatment='t',outcome='q')
----> 2 weSalesDf_api.causal.do(x=x1,outcome='q',dot_graph=str(wSgfs.source.replace("\n"," ")),proceed_when_unidentifiable=True,variable_types=x1_type,num_cores=2)
~\AppData\Local\Programs\Python\Python37\lib\site-packages\dowhy\api\causal_data_frame.py in do(self, x, method, num_cores, variable_types, outcome, params, dot_graph, common_causes, estimand_type, proceed_when_unidentifiable, stateful)
116                                              causal_model=self._causal_model,
117                                              keep_original_treatment=keep_original_treatment)
--> 118         result = self._sampler.do_sample(x)
119         if not stateful:
120             self.reset()
~\AppData\Local\Programs\Python\Python37\lib\site-packages\dowhy\do_sampler.py in do_sample(self, x)
142     def do_sample(self, x):
143         self.reset()
--> 144         self.disrupt_causes()
145         self.make_treatment_effective(x)
146         if self.point_sampler:
~\AppData\Local\Programs\Python\Python37\lib\site-packages\dowhy\do_samplers\weighting_sampler.py in disrupt_causes(self)
34                                                               self._target_estimand.get_backdoor_variables(),
35                                                               self._treatment_names,
---> 36                                                               variable_types=self._variable_types)
37         self._df['weight'] = self.compute_weights()
38
~\AppData\Local\Programs\Python\Python37\lib\site-packages\dowhy\utils\propensity_score.py in state_propensity_score(data, covariates, treatments, variable_types)
34                                                                              covariates + treatments[i+1:],
35                                                                              treatment,
---> 36                                                                              variable_types))
37         elif variable_types[treatment] in ['c']:
38             log_propensities[treatment] = np.log(continuous_treatment_model(data.copy(),
~\AppData\Local\Programs\Python\Python37\lib\site-packages\dowhy\utils\propensity_score.py in categorical_treatment_model(data, covariates, treatment, variable_types)
62     model = LogisticRegression(multi_class='ovr', solver='lbfgs')
63     data[treatment], encoder = discrete_to_integer(data[treatment])
---> 64     model = model.fit(data[covariates], data[treatment])
65     scores = model.predict_proba(data[covariates])
66     scores = scores[range(len(data)), data[treatment].values.astype(int)]
~\AppData\Local\Programs\Python\Python37\lib\site-packages\sklearn\linear_model_logistic.py in fit(self, X, y, sample_weight)
1342         X, y = self._validate_data(X, y, accept_sparse='csr', dtype=dtype,
1343                                    order="C",
-> 1344                                    accept_large_sparse=solver != 'liblinear')
1345         check_classification_targets(y)
1346         self.classes = np.unique(y)
~\AppData\Local\Programs\Python\Python37\lib\site-packages\sklearn\base.py in _validate_data(self, X, y, reset, validate_separately, **check_params)
430                 y = check_array(y, **check_y_params)
431             else:
--> 432                 X, y = check_X_y(X, y, **check_params)
433             out = X, y
434
~\AppData\Local\Programs\Python\Python37\lib\site-packages\sklearn\utils\validation.py in inner_f(*args, **kwargs)
70                           FutureWarning)
71         kwargs.update({k: arg for k, arg in zip(sig.parameters, args)})
---> 72         return f(**kwargs)
73     return inner_f
74
~\AppData\Local\Programs\Python\Python37\lib\site-packages\sklearn\utils\validation.py in check_X_y(X, y, accept_sparse, accept_large_sparse, dtype, order, copy, force_all_finite, ensure_2d, allow_nd, multi_output, ensure_min_samples, ensure_min_features, y_numeric, estimator)
800                     ensure_min_samples=ensure_min_samples,
801                     ensure_min_features=ensure_min_features,
--> 802                     estimator=estimator)
803     if multi_output:
804         y = check_array(y, accept_sparse='csr', force_all_finite=True,
~\AppData\Local\Programs\Python\Python37\lib\site-packages\sklearn\utils\validation.py in inner_f(*args, **kwargs)
70                           FutureWarning)
71         kwargs.update({k: arg for k, arg in zip(sig.parameters, args)})
---> 72         return f(**kwargs)
73     return inner_f
74
~\AppData\Local\Programs\Python\Python37\lib\site-packages\sklearn\utils\validation.py in check_array(array, accept_sparse, accept_large_sparse, dtype, order, copy, force_all_finite, ensure_2d, allow_nd, ensure_min_samples, ensure_min_features, estimator)
531
532         if all(isinstance(dtype, np.dtype) for dtype in dtypes_orig):
--> 533             dtype_orig = np.result_type(*dtypes_orig)
534
535     if dtype_numeric:
<array_function internals> in result_type(*args, **kwargs)
ValueError: at least one array or dtype is required`

Update:
I tried something and this time i get a different error (may be it will be useful in you issue triage)
I changed the variables type for 'w' to a 'd' since this is the WeekNo it should be categorical ideally.
x1={'t':-3,'d':3,'g':980,'h':90,'r':2,'n':1,'i':4,'w':13} x1_type={'t':'c','d':'c','g':'c','h':'c','r':'c','n':'c','i':'c','w':'d','q':'c'}
With this i get the error - at least one array or dtype is required
full error trace
`INFO:dowhy.causal_graph:If this is observed data (not from a randomized experiment), there might always be missing confounders. Adding a node named "Unobserved Confounders" to reflect this.
INFO:dowhy.causal_model:Model to find the causal effect of treatment ['t', 'd', 'g', 'h', 'r', 'n', 'i', 'w'] on outcome ['q']
WARNING:dowhy.causal_identifier:If this is observed data (not from a randomized experiment), there might always be missing confounders. Causal effect cannot be identified perfectly.
INFO:dowhy.causal_identifier:Continuing by ignoring these unobserved confounders because proceed_when_unidentifiable flag is True.
INFO:dowhy.causal_identifier:Instrumental variables for treatment and outcome:['s']
INFO:dowhy.causal_identifier:Frontdoor variables for treatment and outcome:['n']
INFO:dowhy.causal_identifier:All common causes are observed. Causal effect can be identified.
WARNING:dowhy.causal_identifier:If this is observed data (not from a randomized experiment), there might always be missing confounders. Causal effect cannot be identified perfectly.
INFO:dowhy.causal_identifier:Continuing by ignoring these unobserved confounders because proceed_when_unidentifiable flag is True.
INFO:dowhy.do_sampler:Using WeightingSampler for do sampling.
INFO:dowhy.do_sampler:Caution: do samplers assume iid data.
ValueError                                Traceback (most recent call last)
 in
1 #CausalModel(data=weSalesDf,graph=str(wSgfs.source.replace("\n"," ")),treatment='t',outcome='q')
----> 2 weSalesDf_api.causal.do(x=x1,outcome='q',dot_graph=str(wSgfs.source.replace("\n"," ")),proceed_when_unidentifiable=True,variable_types=x1_type,num_cores=2)
~\AppData\Local\Programs\Python\Python37\lib\site-packages\dowhy\api\causal_data_frame.py in do(self, x, method, num_cores, variable_types, outcome, params, dot_graph, common_causes, estimand_type, proceed_when_unidentifiable, stateful)
116                                              causal_model=self._causal_model,
117                                              keep_original_treatment=keep_original_treatment)
--> 118         result = self._sampler.do_sample(x)
119         if not stateful:
120             self.reset()
~\AppData\Local\Programs\Python\Python37\lib\site-packages\dowhy\do_sampler.py in do_sample(self, x)
142     def do_sample(self, x):
143         self.reset()
--> 144         self.disrupt_causes()
145         self.make_treatment_effective(x)
146         if self.point_sampler:
~\AppData\Local\Programs\Python\Python37\lib\site-packages\dowhy\do_samplers\weighting_sampler.py in disrupt_causes(self)
34                                                               self._target_estimand.get_backdoor_variables(),
35                                                               self._treatment_names,
---> 36                                                               variable_types=self._variable_types)
37         self._df['weight'] = self.compute_weights()
38
~\AppData\Local\Programs\Python\Python37\lib\site-packages\dowhy\utils\propensity_score.py in state_propensity_score(data, covariates, treatments, variable_types)
34                                                                              covariates + treatments[i+1:],
35                                                                              treatment,
---> 36                                                                              variable_types))
37         elif variable_types[treatment] in ['c']:
38             log_propensities[treatment] = np.log(continuous_treatment_model(data.copy(),
~\AppData\Local\Programs\Python\Python37\lib\site-packages\dowhy\utils\propensity_score.py in categorical_treatment_model(data, covariates, treatment, variable_types)
62     model = LogisticRegression(multi_class='ovr', solver='lbfgs')
63     data[treatment], encoder = discrete_to_integer(data[treatment])
---> 64     model = model.fit(data[covariates], data[treatment])
65     scores = model.predict_proba(data[covariates])
66     scores = scores[range(len(data)), data[treatment].values.astype(int)]
~\AppData\Local\Programs\Python\Python37\lib\site-packages\sklearn\linear_model_logistic.py in fit(self, X, y, sample_weight)
1342         X, y = self._validate_data(X, y, accept_sparse='csr', dtype=dtype,
1343                                    order="C",
-> 1344                                    accept_large_sparse=solver != 'liblinear')
1345         check_classification_targets(y)
1346         self.classes = np.unique(y)
~\AppData\Local\Programs\Python\Python37\lib\site-packages\sklearn\base.py in _validate_data(self, X, y, reset, validate_separately, **check_params)
430                 y = check_array(y, **check_y_params)
431             else:
--> 432                 X, y = check_X_y(X, y, **check_params)
433             out = X, y
434
~\AppData\Local\Programs\Python\Python37\lib\site-packages\sklearn\utils\validation.py in inner_f(*args, **kwargs)
70                           FutureWarning)
71         kwargs.update({k: arg for k, arg in zip(sig.parameters, args)})
---> 72         return f(**kwargs)
73     return inner_f
74
~\AppData\Local\Programs\Python\Python37\lib\site-packages\sklearn\utils\validation.py in check_X_y(X, y, accept_sparse, accept_large_sparse, dtype, order, copy, force_all_finite, ensure_2d, allow_nd, multi_output, ensure_min_samples, ensure_min_features, y_numeric, estimator)
800                     ensure_min_samples=ensure_min_samples,
801                     ensure_min_features=ensure_min_features,
--> 802                     estimator=estimator)
803     if multi_output:
804         y = check_array(y, accept_sparse='csr', force_all_finite=True,
~\AppData\Local\Programs\Python\Python37\lib\site-packages\sklearn\utils\validation.py in inner_f(*args, **kwargs)
70                           FutureWarning)
71         kwargs.update({k: arg for k, arg in zip(sig.parameters, args)})
---> 72         return f(**kwargs)
73     return inner_f
74
~\AppData\Local\Programs\Python\Python37\lib\site-packages\sklearn\utils\validation.py in check_array(array, accept_sparse, accept_large_sparse, dtype, order, copy, force_all_finite, ensure_2d, allow_nd, ensure_min_samples, ensure_min_features, estimator)
531
532         if all(isinstance(dtype, np.dtype) for dtype in dtypes_orig):
--> 533             dtype_orig = np.result_type(*dtypes_orig)
534
535     if dtype_numeric:
<array_function internals> in result_type(*args, **kwargs)
ValueError: at least one array or dtype is required`

Hi @amit-sharma ,
Any initial thoughts on the issue? Are there any alternative approached you would like me to try (my primary objective is to estimate the outcome when I specify values for the causal variables)?
If you would like to triage this together that will work too.
Thanks,
Ramesh

Hi @amit-sharma ,
Any initial thoughts on the issue? Are there any alternative approached you would like me to try (my primary objective is to estimate the outcome when I specify values for the causal variables)?
If you would like to triage this together that will work too.
Thanks,
Ramesh

Same for me.
It usually occurs by running do_sampler without covariates in the causal model.
This code may reproduce ValueError: at least one array or dtype is required.
I used 0.8 version.
df = dowhy.datasets.linear_dataset(
    beta=10,
    num_common_causes=0,
    num_samples=500,
    num_treatments=1,
    treatment_is_category=False,
    treatment_is_binary=True,
    stddev_treatment_noise=10,
    stddev_outcome_noise=5,
)

intervention_variable = "v0"
target_variable = "y"
model = dowhy.CausalModel(
    data=df_dataset,
    treatment=intervention_variable,
    outcome=target_variable,
    graph=gml_graph,
    test_significance=None,
)

sampler = WeightingSampler(
    df,
    causal_model=model,
    keep_original_treatment=True,
    variable_types={
        "v0": "b",
        "y": "c",
    },
)

interventional_df = sampler.do_sample(x=None)

If v0 is a continuous type, it would raise  IndexError: arrays used as indices must be of integer (or boolean) type.

@amit-sharma
Forgot to attach a mention.
Thank you!


feat: Add log api

What this PR does / why we need it:
Add your description
Which issue(s) this PR is related to (optional, link to 3rd issue(s)):
Fixes #
Reference to #

Special notes for your reviewer:
/cc @your-reviewer

Release note:

NONE

/hold

/hold cancel


Try building Python statically on Linux.

Currently, Linux packages are built against either glibc or musl libc libraries.
Building statically against the libc library would have two main benefits:

only one Linux package for arch
a more modern toolchain could be used for building (currently we build on Amazon Linux 2 for glibc-based distributions).

Starting point: https://wiki.python.org/moin/BuildStatically.
Other pointers:

https://generalpurposeio.wordpress.com/2015/12/06/compiling-python-and-libpython-statically-using-musl-libc/
https://stackoverflow.com/questions/1150373/compile-the-python-interpreter-statically/1155092
https://github.com/python-cmake-buildsystem/python-cmake-buildsystem

I am not sure if having static glibc on Alpine / musl does not defeat the purpose of having a musl based environment in the first place.
Also... we need to see the depenencies between linux kernels and glibc / musl versions

A more powerful way, which would also enable easy cross-compiling: https://andrewkelley.me/post/zig-cc-powerful-drop-in-replacement-gcc-clang.html

I am not sure if having static glibc on Alpine / musl does not defeat the purpose of having a musl based environment in the first place.

Was actually thinking of building statically against musl, which seems to be more straightforward. Building statically against glibc is frown upon, I remember this: https://stackoverflow.com/questions/57476533/why-is-statically-linking-glibc-discouraged


Make preprocessor dictionary available to the diagnostic script

The preprocessor settings (levels, target_grid, etc.) used by a given diagnostic shall be made available to the diagnostic script itself via the temporary file (ncl.interface for NCL diagnostics).

Given the solutions proposed in PR #181, would it be reasonable to put the preprocessor dictionary in a preproc_info file, similar to diag_script_info and variable_info?

Sure, that is possible. What is the use of case of giving this information to the diagnostic?
I think it might be good to not share too much unnecessary information, to avoid getting a tightly coupled system.

Information such as the target level are often used in the diags to name output files or for labelling purposes on the plot.

The target pressure level(s) can simply be read from the file containing the preprocessed data. Could you give more examples?
I'm still not convinced that this is a good idea, because it makes it much harder to change small things in the preprocessor, e.g. if we would want to rename the preprocessor 'levels' to 'pressure_levels' at some point, because we think that is more clear, all diagnostics that depend on using this variable would break.

In general, all the information contained in the preprocessor dictionary could be useful in the diagnostics for labelling and output filenaming purposes.
Another example in addition to the one above could be a diagnostic comparing different regridding methods, which would need to display this information on the plots.
I understand your concern, but since the dictionary keys would be uniquely identified by a preproc_info variable in the diag scripts, a search-and-replace preproc_info@oldname --> preproc_info@newname should not be big issue.
We could also wait until the backend is finalized before address this, to reduce the probability of further changes in the preproc dictionary.

I can only second Mattia, all preprocessor settings need to be made available to the diagnostics. This is required not only for putting meaningful labels and titles on the plots but in particular for keeping the provenance standards we introduced in v1.1. These include, for instance, detailed figure captions where information on regridding, masking, etc. is required. I do not see any problems in terms of a "too tight coupling" since this would be simply passing through more detailed meta-data to the diagnostics than what is currently already done.

We have an open issue about implementing provenance: issue #240, as part of the solution to that issue, provenance information (including all settings used to preprocess the data) will be supplied to diagnostic scripts.

I'm not sure we will pass provenance info to the diagnostics in #240.
But agree with @mattiarighi  and @axel-lauer that passing preprocec settings is probably simplest solution for this issue. Downside is dependency on preproc dictionary.
Would it make sense to access the dict with a function so it is easy to spot any occurrences of access?

As we use the version 2 for creating figures for the next IPCC AR6 WGI draft, it is a very important to solve this issue as soon as possible.
We need, for example, the perfmetrics plot, which has entries for the variable ta in different levels. At the moment it is not possible to distinguish between them in the plot.

I do not think that I will have time to implement this within the next month.
However, I can think of one solution and one workaround for this pressure level needed in perfmetrics issue:

Solution: The extract levels function should (hopefully this is implemented) keep the selected level as an auxiliary coordinate, and you should be able to read it from the preprocessed netcdf file.
Workaround: Specify the pressure level in the diagnostic script section of the recipe as well, e.g.

diagnostics:
  ta850:
    ...
    variables:
      ta:
        preprocessor: pp850
    ...
    scripts:
      cycle:
        script: perfmetrics/main.ncl
        pressure_level: '850 hPa'
        ...