WindowsDriver deferred screen buffer allocation?

@migueldeicaza or anyone else:
In WindowsDriver.cs the creation of the ScreenBuffer happens when WriteToConsole is called.
public bool WriteToConsole (CharInfo [] charInfoBuffer, Coord coords, SmallRect window)
{
	if (ScreenBuffer == IntPtr.Zero) {
		ScreenBuffer = CreateConsoleScreenBuffer (
			DesiredAccess.GenericRead | DesiredAccess.GenericWrite,
			ShareMode.FileShareRead | ShareMode.FileShareWrite,
			IntPtr.Zero,
			1,
			IntPtr.Zero
		);
		if (ScreenBuffer == INVALID_HANDLE_VALUE) {
			var err = Marshal.GetLastWin32Error ();

			if (err != 0)
				throw new System.ComponentModel.Win32Exception (err);
		}

		if (!SetConsoleActiveScreenBuffer (ScreenBuffer)) {
			var err = Marshal.GetLastWin32Error ();
			throw new System.ComponentModel.Win32Exception (err);
		}

		OriginalStdOutChars = new CharInfo [Console.WindowHeight * Console.WindowWidth];

		ReadConsoleOutput (OutputHandle, OriginalStdOutChars, coords, new Coord () { X = 0
	}

	return WriteConsoleOutput (ScreenBuffer, charInfoBuffer, coords, new Coord () { X = window
}

It tears this down in CleanUp:
public void Cleanup ()
{
	ConsoleMode = originalConsoleMode;
	ContinueListeningForConsoleEvents = false;
	if (!SetConsoleActiveScreenBuffer (OutputHandle)) {
		var err = Marshal.GetLastWin32Error ();
		Console.WriteLine ("Error: {0}", err);
	}

	if (ScreenBuffer != IntPtr.Zero)
		CloseHandle (ScreenBuffer);

	ScreenBuffer = IntPtr.Zero;
}

However, WindowsDriver.Init is where this stuff, logically, should happen.
As a result of the current implementation, Init calls Console.Clear before the secondary ScreenBuffer is allocated in WriteToConsole. I believe this is the cause of the bug inflicting out-ConsoleGridView where the output of the the CmdLet gets erased:
https://github.com/PowerShell/GraphicalTools/issues/96
So, the question, before I go and fix this by simplifying, does anyone have a good reason why the creation of the screen buffer was deferred to the first call to WriteToConsole vs. doing it at init time?

FWIW, the urgency of this is lessened given the simple fix in #423 was so simple (just remove the Console.Clear() call. But the way WindowsDriver is implemented is a bit off. It should be refactored such that all init is done in Init and all cleanup in End.

The problem is also concern with the use of Console commands after the creation of the ConsoleDriver. @migueldeicaza had already said that before and it happened with me when I used some Console commands to do some stuffs. There only should be used kernel functions to deal with the buffer in windows.

Won't fix. Closing.


Can we multithred the stdp? or it is already multithreaded?

The stdp is already multithreaded because neurons are processed in parallel


How to use it as type root

Thanks for the great work! Is it possible to be used in typeRoots? I was including the polyfill as global during build process. So the IDE needs type definitions to work.

I couldn't make this work in any way. I think it's because webextension-polyfill already exports a global named browser.
I will investigate if this might be fixed by generating the code that webextension-polyfill normally would from this project natively, so the dependency for webextension-polyfill would be removed and hopefully the conflict. But if that fails, I don't know how to solve this.
Feel free to try this yourself and provide a pull request. I'm not a fan of globals, so the fix needs to work using normal imports.

I'll see what I can do.

Currently types are separated from Static members. Is it OK if I merge them together under the browser.[module] namespace like Chrome?
Note: This will deprecate imoprt { [type] } from 'webextension-polyfill-ts', in favor of browser.[module].[type].

And for anonymous types, how about just keep them anonymous by copying the type definitions around without giving them names.

I was not able to merge them under the browse.module namespace while still keeping the import syntax and separated files working. Feel free to give it a try.
How would you keep the anonymous types around without giving them names? inline? That is very ugly to generate readable documentation for. Aside from that it is useful to have a name for those types, so users can store attributes and variables of them in a type-checked manner.

Yes I meant inline. Don't you think that a "polyfill" should just be a shim for API and could be safely removed when the implementation is mature? If users need to import types from the library and use undocumented type names, wouldn't it be a strong coupling?

webextension-polyfill is a polyfill.. this is a type definition "add-on".
But ignoring this fact.. as long as web-extensions are not in a final state, which all browsers support equally (which I doubt will ever happen), there will always be the need for this kind of project.
Things like Promise polyfills can easily be replaced, because those will probably not change very much in the future. But web-extensions will probably never stop to be extended and modified to fit new needs.
Imho these inline types should never have been inlined in the first place, and I would love to see them strongly typed in future versions of webext.
Users don't need to use these types, but they can. The difference between inline and not is, that if users want to use the types when they are inlined, they would have to define them manually themselves, causing more problems when updated versions are available.
Even if they don't use them directly, they can see the typedoc documentation inside of the IDE and find out about all the properties without having to read the MDN documentation. That wouldn't be possible if they where inlined.
All in all, I think I want to keep extracting inline types, but improve the naming.. maybe define some of the names manually to improve them on a per-case basis.

Yeah I think you got a point. Use a notation or description to indicate a generated type name should do the job.
Since TypeScript doesn't support alias namespace, there seems to be no way to support Chrome-like namespace while keeping the module syntax.


"Stancea" is listed in the drop-down menu

Description:
"Stancea" is listed in the drop-down menu alongside its corresponding county and commune, according to the law
Precondition:
The website is up an running.

Step 1
Type "Stancea" in the search bar.

Expected results
The location is listed in the drop-down menu as "Sat Stancea, CĂLĂRAȘI (Spanțov)".


[Meeting] Mentor Workshop - 16 05

Date: day_name, DD MM
Time: 15:00 - 16:30

• User journey
	○ To user stories
• Blue thing (ticket thing on the top)
	○ Like a milestone
• Can put backend functionality in MVP
• Rating wise, outside of MVP
	○ Make our customers rate the products rather than scraping the ratings
	○ But how do we know that customers have rated the product without buying
	○ Later on, after MVP though
• For the personalized experience
	○ AI cat. Based on previous user searches etc
• Ads
	○ Product they haven’t seen based off items they have searched for etc
	○ AI cat as well
• Special Promotions
	○ Promotions as a wishlist item
		§ When a product is on promotion, we can notify users
• Sellers
	○ List of categories that we support
	○ We would need to vet each website and see if we can scrape them
	○ Seller auth
		§ Ensure that sellers are good candidates for scraping
			□ Find info about the business
		§ Checkboxes instead of a text input
			□ Wants to restrict the seller's ability to choose a certain amount of products
		§ Make sure they are in SA
			□ Easier to implement product wise
• Want to make sure that what's on the homepage helps to make sure customers find what they want
	○ In a carousel
• Similar products
	○ Doesn't have to always be AI
• Tensor flow
• Pytorch
• Product catalogue from the seller
• Ratings on a seller
• Follow a seller
	○ On the homepage. Get all of the products from a seller
	○ Adds to a personalised experience
	○ Notifs from sellers that you have favourited
• Customer analytics
	○ Conversion rate between clicking a product and going to the sellers websites
• Want the seller to have a good user experience , just like customer
• Customer notifying seller that there is an issue about their product
• Sellers get notifications aswell
	○ Customer queries
		§ Send a push notif
			□ See a dropdown, a list of queries
	○ Notifs if they verified or not

• Seller inventory
	○ Sync their webpage again
		§ Of whole website
		§ For a single product, just do a manual entry update
		§ What happens to the manual inputted data is it gets synced again?
• Bake analytics into data layer
	○ Need to make sure we log the info
	○ e.g. from homepage to product page
	○ From product page to their website
	○ Baked into API layer

Django admin panel for staff portal
Need databse for this though
Structure of our models
After seller details and verification
Need to focus on scraping
SRS doc:
We mentioned NoSQL instead of Relational
Django creates models, tables
We can use these models to store in database
Can use Django tables to store in tables
When we scrape and store, we wanna use our models and train our data
Figma design for form completeion
	○ Form completiton
	○ Staff portal is already created
		§ No need for figma designs for that
• Domian diagram or UML diag , more refined in the srs doc
	○ Similar to UML, higher level than UML
• Context diagram is similar to use case
	○ In the miro doc

Friday
• Figma design to be completed
• Update of the SRS doc with new requirement
• Architecture doc
• Models for Seller profile


Missing rank_genes_dropouts.csv

Hi all,
Very nice work on this project, and I really enjoyed your "one rule to rule them all" allusion! I am having an issue with the gene ranking. Details are attached. Is there a way to either 1) get the gene ranking to work or 2) bypass it, since I am using all genes anyway?
Thank you!
P.S. Details. I am using this command with these snake- and config files, and I get this error log. I am running it from the Snakemake/ subdirectory, because I tried running it from the root and then it cannot find the snakefile.
 snakemake --configfile config.yml --use-singularity
Snakefile.txt
config.yml.txt
error.log

I also get text printed to the terminal, but not in the error log:
/bin/sh: syntax error: unterminated quoted string
When I change the rule for gene-ranking to start with " echo GRAAAAAHH || ", I see GRAAAAAHH printed to the terminal, and the unterminated string error goes away. Instead, I see the error bash: Results/test: No such file or directory. But I know the pipeline can find my results folder, because it has placed CV_folds.RData there.

Based on many other tests, I think that bash commands in Singularity are probably running in the wrong working directory, but I have been unable to verify this because commands like "echo $PWD" produce no output (or blank output?). Do you have a recommendation for how to debug this?

I have also tried many variations of the Singularity "bind points"/"bind mounts"/"bind paths", including exactly what you suggest (as far as I am able to correctly fill in the blanks). Can you explain what the bracketed terms mean here?
snakemake \
  --configfile <configfile> \
  --use-singularity \
  --singularity-args '--bind <location of inputs>:<location of inputs> --bind <output directory>:<output directory>'

Hi @concatenize,
In your config.yml.txt you are referring to the inputs using relative paths. The scripts are probably unable to reach that directory as it is not mounted in the container. Indeed using the command you posted in your last message should help resolve this. The bracketed terms should be replaced with the absolute paths to the directories. For example:
snakemake \
  --configfile config.yml.txt \
  --use-singularity \
  --singularity-args '--bind /my/folder/:/my/folder --bind /my/folder/scRNAseq_Benchmark/Snakemake/Results:/my/folder/scRNAseq_Benchmark/Snakemake/Results'

In this case the second bind is probably not neccessary.
As for the "unterminated quoted string" error, I was unable to reproduce this error. Could you try removing this line from that rule:
"echo test > {wildcards.output_dir}/test\n"
And see if the errors remain? This line was just there for testing, it doesn't actually do anything important (and is only there because I forgot to remove it :roll_eyes:).
I hope this helps. If not, let me know!

Thanks for the quick response! I got rid of the "unterminated quoted string" error, but I am still having problems with gene ranking.
Here is my current config file:
output_dir: /Users/concatenize/Desktop/scRNA_data_analysis/scRNAseq_Benchmark/Snakemake/Results
datafile:   /Users/concatenize/Desktop/scRNA_data_analysis/scRNAseq_Benchmark_datasets/Inter-dataset/Brain/MouseV1_HumanMTG/MouseV1_HumanMTG.csv
labfile:    /Users/concatenize/Desktop/scRNA_data_analysis/scRNAseq_Benchmark_datasets/Inter-dataset/Brain/MouseV1_HumanMTG/MouseV1_HumanMTG_Labels34.csv
human: true
tools_to_run:
- singleCellNet
- SVM

Here is the current snakefile.
Snakefile.txt
And the error I am receiving.
singularity_arguments='bash -c set -euo pipefail;  python3 rank_gene_dropouts.py  /Users/concatenize/Desktop/scRNA_data_analysis/scRNAseq_Benchmark_datasets/Inter-dataset/Brain/MouseV1_HumanMTG/MouseV1_HumanMTG.csv  /Users/concatenize/Desktop/scRNA_data_analysis/scRNAseq_Benchmark/Snakemake/Results/CV_folds.RData  /Users/concatenize/Desktop/scRNA_data_analysis/scRNAseq_Benchmark/Snakemake/Results  &> /Users/concatenize/Desktop/scRNA_data_analysis/scRNAseq_Benchmark/Snakemake/Results/rank_genes_dropouts.log'
singularity_binds='|TXcWug:/Users/concatenize/Desktop/scRNA_data_analysis/scRNAseq_Benchmark_datasets|xWWByP:/Users/concatenize/Desktop/scRNA_data_analysis/scRNAseq_Benchmark/Snakemake/Results|dJBAek:/mnt/snakemake|home:/Users/concatenize'
bash: /Users/concatenize/Desktop/scRNA_data_analysis/scRNAseq_Benchmark/Snakemake/Results/rank_genes_dropouts.log: No such file or directory
[    4.730810] reboot: Power down
Waiting at most 5 seconds for missing files.
MissingOutputException in line 65 of /Users/concatenize/Desktop/scRNA_data_analysis/scRNAseq_Benchmark/Snakemake/Snakefile:
Missing files after 5 seconds:
/Users/concatenize/Desktop/scRNA_data_analysis/scRNAseq_Benchmark/Snakemake/Results/rank_genes_dropouts.csv
This might be due to filesystem latency. If that is the case, consider to increase the wait time with --latency-wait.
Shutting down, this might take some time.
Exiting because a job execution failed. Look above for error message
Complete log: /Users/concatenize/Desktop/scRNA_data_analysis/scRNAseq_Benchmark/Snakemake/.snakemake/log/2020-02-06T090700.964709.snakemake.log

This is difficult to follow up on because rank_genes_dropouts.log is blank -- the gene ranking script produces no output at all. Should I insert some print statements to see where rank_gene_dropouts.py gets stuck?

bash: /Users/concatenize/Desktop/scRNA_data_analysis/scRNAseq_Benchmark/Snakemake/Results/rank_genes_dropouts.log: No such file or directory

This line suggests that the Results directory does not exist. Was rank_genes_dropouts.log created during the last run? Because that error sounds to me like the rule failed before it even ran the script, as it could not create the log file to write the stdout/stderr to.
Could you try running it with a completely cleared outputs folder and with the following command:
snakemake \
  --configfile config.yml.txt \
  --use-singularity \
  --singularity-args '--bind /Users/concatenize/Desktop/scRNA_data_analysis/:/Users/concatenize/Desktop/scRNA_data_analysis/'

This line suggests that the Results directory does not exist.

No, it exists.

Was rank_genes_dropouts.log created during the last run?

Yes.

Could you try running it with a completely cleared outputs folder and with the following command?

Yes. This produces a new error: CV_folds.Rdata is missing, and CV_folds.log is created, but it is empty, and there is a bash file claiming that it does not exist. Full log attached.
new_log.txt

I see the bash error is not in the log. It says:
bash: /Users/concatenize/Desktop/scRNA_data_analysis/scRNAseq_Benchmark/Snakemake/Results/CV_folds.log: No such file or directory

It really sounds like there is something wrong with the binding of the output directory.
Snakemake itself is creating those log files, hence why you are seeing them, but they can't be accessed (or created) from within the singularity container.
Which version of singularity are you using? I remember that there were some issues with binding to paths that didn't exist inside the container with versions of singularity before 3.0.0

Sorry for the delay -- I had to go to a meeting. I am using singularity version 3.3.0-rc.1.658.g7427b73f1.dirty on Mac OS 10.14.6.

How does singularity find your containers? It seems you call snakemake, and then snakemake sees the use-singularity flag. In most snakemake rules, then there is a singularity key whose value looks like "docker://scrnaseqbenchmark/baseline:{}".format(dockerTag), where the top of the snakefile sets dockerTag = "latest" #FIXME tagged versions.
How does snakemake then infer that it needs to look in Dockerfiles/baseline? Is it possible that the snakemake actually is not finding the containers?

Reading about singularity, it seems that only Linux is supported. (e.g. in the user guide, it says "Mobility of compute is defined as the ability to define, create and maintain a workflow and be confident that the workflow can be executed on different ... operating systems (as long as it is Linux).")  I'm using a Mac, so maybe I should just move all the code to a Linux machine and try it there.

It is working now on a Linux machine that we have in the lab. You may want to list Linux as an explicit requirement for your snakemake pipeline.

Ah, I didn't realize singularity didn't support Mac OS (although I guess that makes sense since it uses a different kernel). I will add a note about this, thanks for letting us know!
Regarding the containers. Docker images are actually prebuilt and saved online. In this case at docker hub (https://hub.docker.com/u/scrnaseqbenchmark), though there are other repositories that can be used as well (eg. quay.io). Singularity never touches the dockerfiles. These are uploaded to docker hub and then used by docker hub to build the images. Docker and singularity will then pull this image from the repository when you want to use it (and it will cache it, so it won't have to pull it every time).

Ooh, good to know. I will need to follow up on that info about containers, but I will do it on a separate thread.


Performing conversion from 1.7 to 2.1 EXPORT or IMPORT is dropping our UUID property...

Performing conversion from 1.7 to 2.1 EXPORT or IMPORT is dropping our UUID property.  If you perform a query the field in each cluster is named '__uuid' and it's value all contain the character value of 'uuid'.  This appears to be a bug and a huge conversion issue, if uuid is not allowed by our schemata definitions.
Please advise,
Thanks,
Jeff

Hi @jaschenk
I'm not sure I understand the problem, I tried to export your db from 1.7 and import it on 2.1 (from the backup you provided some days ago) and then I executed a simple SELECT on your main superclass. I still can see the correct "uuid" field with original values.
What I exactly did was an
export database

in v 1.7.11, plocal, and an
export database

on latest 2.1 stapshot, in plocal too.
Am I missing something (or just I did not get the point)? How can I reproduce it?
Thanks
Luigi

Sorry, I mean
import database

on 2.1 snapshot

Luigi,
The sequence is correct, but on my db, there is no uuid property.  Only a
property named __uuid which contains a value of 'uuid'.  Our data is gone!
Looking at json file all data is intact.
Please advise,
Thanks,
Jeff
On Sep 23, 2015 11:55 PM, "luigidellaquila"<EMAIL_ADDRESS>wrote:

Sorry, I mean
import database
on 2.1 snapshot
—
Reply to this email directly or view it on GitHub
https://github.com/orientechnologies/orientdb/issues/5007#issuecomment-142832243
.

Hi Jeff,
We can try in two ways:

you can try to build latest 2.1 snapshot from sources (branch 2.1.x, as far as I know this was not a known issue, but maybe it was someway fixed in last days) and launch the import on it. In case it's a problem I can build it locally and provide a binary version
if you could share your export I'd try the import locally and see if I can reproduce the problem

Thanks
Luigi

Luigi,
Attached is the output from the export, plus fixes to any classes named
containing a dot "." were replaced with "_".
The import was against a orientdb-enterprise-2.1.1 version.
Let me pull latest snapshot and build and see what I get on my ends as well.
I also attached a screen shot of what I see in studio.
Thanks,
Jeff
On Thu, Sep 24, 2015 at 6:17 AM, luigidellaquila<EMAIL_ADDRESS>wrote:

Hi Jeff,
We can try in two ways:

you can try to build latest 2.1 snapshot from sources (branch 2.1.x, as
far as I know this was not a known issue, but maybe it was someway fixed in
last days) and launch the import on it. In case it's a problem I can build
it locally and provide a binary version
if you could share your export I'd try the import locally and see if I
can reproduce the problem

Thanks
Luigi
—
Reply to this email directly or view it on GitHub
https://github.com/orientechnologies/orientdb/issues/5007#issuecomment-142924160
.

Luigi,
I have successfully imported our data with the uuid intact using the latest
downloaded zip from github which was the
orientdb-community-2.1.2 version.
Interesting this issue I had encountered was using
the orientdb-enterprise-2.1.1 version I pulled from the orientdb download
site.
All good proceeding.
Many thanks,
Jeff
On Thu, Sep 24, 2015 at 7:26 AM, Jeff Schenk<EMAIL_ADDRESS>wrote:

Luigi,
Attached is the output from the export, plus fixes to any classes named
containing a dot "." were replaced with "_".
The import was against a orientdb-enterprise-2.1.1 version.
Let me pull latest snapshot and build and see what I get on my ends as
well.
I also attached a screen shot of what I see in studio.
Thanks,
Jeff
On Thu, Sep 24, 2015 at 6:17 AM, luigidellaquila<EMAIL_ADDRESS>
wrote:

Hi Jeff,
We can try in two ways:

you can try to build latest 2.1 snapshot from sources (branch 2.1.x,
as far as I know this was not a known issue, but maybe it was someway fixed
in last days) and launch the import on it. In case it's a problem I can
build it locally and provide a binary version
if you could share your export I'd try the import locally and see if I
can reproduce the problem

Thanks
Luigi
—
Reply to this email directly or view it on GitHub
https://github.com/orientechnologies/orientdb/issues/5007#issuecomment-142924160
.

Hi @jaschenk
Perfect, thank you very much.
I'm closing this then
Luigi


How to customize

for example,
if my article title is ceramic cup,
then click view source code for this article
ceramic cup
above is not good for google seo
i need ceramic cup, cermic mug,this is good for google seo
how can i do?

Please post this kind of questions on the forum.
https://forum.bludit.org

i have sent post on forum，waiting for approve
---Original---
From: "Diego @.>
Date: Thu, Jan 4, 2024 02:13 AM
To: @.>;
Cc<EMAIL_ADDRESS>Subject: Re: [bludit/bludit] How to customize <title></title> (Issue #1552)
Please post this kind of questions on the forum.
https://forum.bludit.org
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>


docs: Provide warning about using jest.mock

Fixes #1689 .
Motivation

Someone tried to do
jest.mock("rest-hooks")

But did not provide an implementation for every export. Therefore when @rest-hooks/test tried to create a new class that extends it, it was extending undefined resulting in TypeError: Class extends value undefined is not a constructor or null
Solution

Warn on the debugging docs that this is a bad idea.

Codecov Report

Merging #1973 (6a71eb5) into master (f490c35) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1973   +/-   ##
=======================================
  Coverage   98.48%   98.48%
=======================================
  Files         102      102
  Lines        1916     1916
  Branches      402      402
=======================================
  Hits         1887     1887
  Misses         13       13
  Partials       16       16

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more


fix route: wildcard domain match, add unit test

#65

Codecov Report

Merging #66 into master will increase coverage by 2.7%.
The diff coverage is 100%.

@@            Coverage Diff            @@
##           master      #66     +/-   ##
=========================================
+ Coverage   18.01%   20.71%   +2.7%
=========================================
  Files          40       40
  Lines        3470     3481     +11
=========================================
+ Hits          625      721     +96
+ Misses       2817     2724     -93
- Partials       28       36      +8

Impacted Files
Coverage Δ

pkg/router/routematcher.go
90% <100%> (+81.52%)
:arrow_up:

pkg/router/routeruleimpl.go
18.51% <0%> (+18.51%)
:arrow_up:

pkg/router/virtualhostimpl.go
29.5% <0%> (+29.5%)
:arrow_up:

Continue to review full report at Codecov.

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


Specify additional parameters in the token request?

Attempting to use electron-oauth2 with Azure Active Directory results in an error because the token request to AAD must specify the "resource" (internal terminology) that the token is to be redeemed against. This takes the form of an additional parameter in the token request, but there isn't any way to do this at the moment.
Implementation thoughts:
Since function tokenRequest(data) at index.js:75 does a queryString.stringify(data) call before sending its request, everything is in place except for a way to pass extra data into the data object.

Landed with 2.4.0


fuzzgen-preprocessor compilation error: marked ‘override’, but does not override during cmake build

Getting below error while  compiling fuzzgen-preprocessor. Need suggestions to solve the issue, please. I have listed steps that are followed for reference, correct if needed.
cmake --build .
[1/2] Building CXX object tools/clang/tools/fuzzgen/CMakeFiles/fuzzgen-preprocessor.dir/preprocessor.cpp.o
FAILED: tools/clang/tools/fuzzgen/CMakeFiles/fuzzgen-preprocessor.dir/preprocessor.cpp.o
/usr/bin/c++  -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/clang/tools/fuzzgen -I/opt/llvm-project/clang/tools/fuzzgen -I/opt/llvm-project/clang/include -Itools/clang/include -Iinclude -I/opt/llvm-project/llvm/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -fno-common -Woverloaded-virtual -fno-strict-aliasing -g    -fno-exceptions -fno-rtti -MD -MT tools/clang/tools/fuzzgen/CMakeFiles/fuzzgen-preprocessor.dir/preprocessor.cpp.o -MF tools/clang/tools/fuzzgen/CMakeFiles/fuzzgen-preprocessor.dir/preprocessor.cpp.o.d -o tools/clang/tools/fuzzgen/CMakeFiles/fuzzgen-preprocessor.dir/preprocessor.cpp.o -c /opt/llvm-project/clang/tools/fuzzgen/preprocessor.cpp
In file included from /opt/llvm-project/clang/tools/fuzzgen/preprocessor.cpp:41:
/opt/llvm-project/clang/tools/fuzzgen/preprocessor.h:210:18: error: ‘virtual void IncludesProcessor::InclusionDirective(clang::SourceLocation, const clang::Token&, llvm::StringRef, bool, clang::CharSourceRange, const clang::FileEntry*, llvm::StringRef, llvm::StringRef, const clang::Module*, clang::SrcMgr::CharacteristicKind)’ marked ‘override’, but does not override
210 |     virtual void InclusionDirective(SourceLocation, const Token &, StringRef, bool, CharSourceRange,
|                  ^~~~~~~~~~~~~~~~~~
In file included from /opt/llvm-project/clang/include/clang/Lex/PreprocessingRecord.h:20,
from /opt/llvm-project/clang/include/clang/Frontend/ASTUnit.h:25,
from /opt/llvm-project/clang/include/clang/Frontend/FrontendAction.h:24,
from /opt/llvm-project/clang/include/clang/Frontend/FrontendActions.h:13,
from /opt/llvm-project/clang/tools/fuzzgen/preprocessor.h:44,
from /opt/llvm-project/clang/tools/fuzzgen/preprocessor.cpp:41:
/opt/llvm-project/clang/include/clang/Lex/PPCallbacks.h:120:16: warning: ‘virtual void clang::PPCallbacks::InclusionDirective(clang::SourceLocation, const clang::Token&, llvm::StringRef, bool, clang::CharSourceRange, const clang::FileEntry*, llvm::StringRef, llvm::StringRef, const clang::Module*)’ was hidden [-Woverloaded-virtual]
120 |   virtual void InclusionDirective(SourceLocation HashLoc,
|                ^~~~~~~~~~~~~~~~~~
In file included from /opt/llvm-project/clang/tools/fuzzgen/preprocessor.cpp:41:
/opt/llvm-project/clang/tools/fuzzgen/preprocessor.h:210:18: warning:   by ‘virtual void IncludesProcessor::InclusionDirective(clang::SourceLocation, const clang::Token&, llvm::StringRef, bool, clang::CharSourceRange, const clang::FileEntry*, llvm::StringRef, llvm::StringRef, const clang::Module*, clang::SrcMgr::CharacteristicKind)’ [-Woverloaded-virtual]
210 |     virtual void InclusionDirective(SourceLocation, const Token &, StringRef, bool, CharSourceRange,
|                  ^~~~~~~~~~~~~~~~~~
In file included from /opt/llvm-project/llvm/include/llvm/ADT/STLExtras.h:21,
from /opt/llvm-project/llvm/include/llvm/ADT/StringRef.h:13,
from /opt/llvm-project/clang/include/clang/Basic/DiagnosticIDs.h:20,
from /opt/llvm-project/clang/include/clang/Basic/Diagnostic.h:18,
from /opt/llvm-project/clang/include/clang/Frontend/CompilerInstance.h:14,
from /opt/llvm-project/clang/tools/fuzzgen/preprocessor.h:43,
from /opt/llvm-project/clang/tools/fuzzgen/preprocessor.cpp:41:
/opt/llvm-project/llvm/include/llvm/ADT/SmallVector.h: In instantiation of ‘void llvm::SmallVectorTemplateBase<T, true>::push_back(const T&) [with T = std::pair<void*, long unsigned int>]’:
/opt/llvm-project/llvm/include/llvm/Support/Allocator.h:247:33:   required from ‘void* llvm::BumpPtrAllocatorImpl<AllocatorT, SlabSize, SizeThreshold>::Allocate(size_t, size_t) [with AllocatorT = llvm::MallocAllocator; long unsigned int SlabSize = 4096; long unsigned int SizeThreshold = 4096; size_t = long unsigned int]’
/opt/llvm-project/clang/include/clang/AST/ASTContext.h:651:42:   required from here
/opt/llvm-project/llvm/include/llvm/ADT/SmallVector.h:312:11: warning: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of type ‘struct std::pair<void*, long unsigned int>’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
312 |     memcpy(this->end(), &Elt, sizeof(T));
|     ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/9/utility:70,
from /opt/llvm-project/llvm/include/llvm/Support/type_traits.h:19,
from /opt/llvm-project/llvm/include/llvm/Support/Casting.h:19,
from /opt/llvm-project/clang/include/clang/Basic/LLVM.h:22,
from /opt/llvm-project/clang/include/clang/Basic/DiagnosticIDs.h:18,
from /opt/llvm-project/clang/include/clang/Basic/Diagnostic.h:18,
from /opt/llvm-project/clang/include/clang/Frontend/CompilerInstance.h:14,
from /opt/llvm-project/clang/tools/fuzzgen/preprocessor.h:43,
from /opt/llvm-project/clang/tools/fuzzgen/preprocessor.cpp:41:
/usr/include/c++/9/bits/stl_pair.h:208:12: note: ‘struct std::pair<void*, long unsigned int>’ declared here
208 |     struct pair
|            ^~~~
ninja: build stopped: subcommand failed.
Steps followed:

git clone https://github.com/llvm/llvm-project
git checkout llvmorg-6.0.0
cd llvm-project
mkdir build
cd build
copy the preprocessor directory under llvm-project/clang/tools as fuzzgen
Add below line to llvm-project/clang/tools/CMakeLists.txt
add_clang_subdirectory(fuzzgen)
cmake -DLLVM_ENABLE_PROJECTS=clang -G Ninja ../llvm
cmake --build .

Try to comment out "override" keyword, it works for me.
virtual void InclusionDirective(SourceLocation, const Token &, StringRef, bool, CharSourceRange,
                                    const FileEntry *, StringRef, StringRef, const clang::Module *,
                                    SrcMgr::CharacteristicKind) ;//override;

I also meets with this compilation bug too.It works for me delete the “override”  keyword.


Black HUD. Unusable

Hello im reporting an issue due of a Black HUD and the modules not popping up. The textgui works just fine, but when i toggle it, it doesn't show up anything, just the textgui and nothing else. The entire screen goes dark.
My client brand is: lunarclient:v2.17.3-2439
Here is a image of the issue.

P.S: I have no idea what can cause this. I disabled Fast render, enabled custom guis and etc, etc. I am using weave manager.

P.S: I have no idea what can cause this. I disabled Fast render, enabled custom guis and etc, etc. I am using weave manager.

you need to disable fast renderer and fast math in minecraft settings and then restart minecraft! sorry for the late reply


Compatibility and status of project

Hi everyone,
we are using Laravel 5.4.* together with plastic:latest and Elasticsearch 5.6.10 but we receive errors for every single command that we execute.
What we did so far is:

Configuring $searchable, $documentType, $documentIndex on a model
Creating a mapping for this model
Configuring an index in the plastic conf for the model

Now if we try to execute php artisan mapping:run we get the error:
{"error":{"root_cause":[{"type":"security_exception","reason":"missing authentication token for REST request [/product/product/_mapping]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}}],"type":"security_exception","reason":"missing authen
  tication token for REST request [/product/product/_mapping]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}},"status":401}

If we try to execute  php artisan plastic:populate --index=product we get the following error:
[Elasticsearch\Common\Exceptions\BadRequest400Exception (401)]

The status of the Elasticsearch cluster is the following:
epoch      timestamp cluster                                status node.total node.data shards pri relo init unassign pending_tasks max_task_wait_time active_shards_percent
1533124324 11:52:04  test-cluster yellow          1         1      5   5    0    0        5             0                  -                 50.0%

What are the current compatibilities of this package?
Thanks in advance.

Hi there,
I do not use this package, but was looking around the web for elasticsearch Laravel packages.
When I looked at you question, I could see that you are trying to connect to an instance that is using token based security.  After looking at the code of Plastic, I can tell you that it is not possible at this moment, due to missing config options.
Let me explain where to find it and how to fix it:
Take a look at: https://github.com/sleimanx2/plastic/blob/master/src/Connection.php#L247
There you can see this code:
    private function buildClient(array $config)
    {
        $client = ClientBuilder::create()
            ->setHosts($config['hosts']);
        if (isset($config['retries'])) {
            $client->setRetries($config['retries']);
        }
        if (isset($config['logging']) and $config['logging']['enabled'] == true) {
            $logger = ClientBuilder::defaultLogger($config['logging']['path'], $config['logging']['level']);
            $client->setLogger($logger);
        }
        return $client->build();
    }

It configures the Elasticsearch/Client by setting the folllowing:

$client->setHosts($config['hosts']);
$client->setRetries($config['retries']);
$client->setLogger($logger);

This is your problem; Because it needs run another method on $client.

$client->setConnectionParams($config['connection]);

When you look at the code of the ClientBuilder's build method:
https://github.com/elastic/elasticsearch-php/blob/master/src/Elasticsearch/ClientBuilder.php#L475
You can see that it set's the headers at some point.
        if (is_null($this->connectionFactory)) {
            if (is_null($this->connectionParams)) {
                $this->connectionParams = [];
            }
            // Make sure we are setting Content-Type and Accept (unless the user has explicitly
            // overridden it
            if (isset($this->connectionParams['client']['headers']) === false) {
                $this->connectionParams['client']['headers'] = [
                    'Content-Type' => ['application/json'],
                    'Accept' => ['application/json']
                ];
            } else {
                if (isset($this->connectionParams['client']['headers']['Content-Type']) === false) {
                    $this->connectionParams['client']['headers']['Content-Type'] = ['application/json'];
                }
                if (isset($this->connectionParams['client']['headers']['Accept']) === false) {
                    $this->connectionParams['client']['headers']['Accept'] = ['application/json'];
                }
            }
            $this->connectionFactory = new ConnectionFactory($this->handler, $this->connectionParams, $this->serializer, $this->logger, $this->tracer);
        }

So I suggest that you do the following:
First Update your config

        /*
        |--------------------------------------------------------------------------
        | Hosts
        |--------------------------------------------------------------------------
        |
        | The most common configuration is telling the client about your cluster: how many nodes, their addresses and ports.
        | If no hosts are specified, the client will attempt to connect to localhost:9200.
        |
        */
        'hosts'   => [
            env('PLASTIC_HOST', '<IP_ADDRESS>:9200'),
        ],

       'connection' => [
                 'client' => [
                              'headers' => [
                                   'Authentication' => [ 'Bearer <your_token>' ]
                              ]
                 ]
      ]

..and enable token based auth:
https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-tokens.html
You need to log in and obtain an acces_token, then use laravel to update the config at runtime.
So that the Bearer token gets set.
Second change the code
    private function buildClient(array $config)
    {
        $client = ClientBuilder::create()
            ->setHosts($config['hosts']);
        if (isset($config['retries'])) {
            $client->setRetries($config['retries']);
        }

        // ADD THIS
        if (isset($config['connection'])) {
            $client->setConnectionParams($config['connection']);
        }

        if (isset($config['logging']) and $config['logging']['enabled'] == true) {
            $logger = ClientBuilder::defaultLogger($config['logging']['path'], $config['logging']['level']);
            $client->setLogger($logger);
        }
        return $client->build();
    }

Then you can run the mapping:run with headers set.
@sleimanx2 @dennismende

Ok...I am going on with my life. I was accidentally inspired to take a closer look.
Goodluck 😅


Null is not an object (evaluating 'O.length')

Reproduction
Once I click the city field the entire app crashes, and shows the error above.

should be fixed now

can you please explain how it did happen, and how you managed to fix it.
Thanks in advance.

I am now returning an empty string instead of null for the location https://github.com/benawad/vsinder-api/commit/c762957ece8c65016a5e76a6c906bd9cdb0c1e82


Noob question. How do i print something without a newline?

Hi,
is it possible to print text without a new line?
Thanks.

Hi @gulamf 👋
Yes, you can call write on io.stdout().
stdout = io.stdout()
stdout.write 'abc'
stdout.write 'def'
# abcdef

Thanks.


There are typos and inaccuracies in the gpupdate and gpresult command lines

The document reads: "gpudate.exe /force" (it's missing a "p"). It should read:
gpupdate.exe /force

"gpresult /H >gp.html" is not valid, the ">" redirector should be removed.

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

ID: 76c2487c-044d-1349-708a-5841fcb21ab8
Version Independent ID: b7033454-1a9c-48d4-8004-78415c5feb89
Content: Quality of Service in Microsoft Teams - Microsoft Teams
Content Source: Teams/QoS-in-Teams.md
Service: msteams
GitHub Login: @rmw2890
Microsoft Alias: MyAdvisor

@AndreaBarr I can work on this.


Add regexp_expand text operator

Given the following processor configuration:
pipeline:
  processors:
  - text:
      operator: regexp_expand
      arg: "(?m)(?P<key>\\w+):\\s+(?P<value>\\w+)$"
      value: "$key=$value\n"

And the following input:
# comment line
option1: value1
option2: value2

# another comment line
option3: value3

The following output is generated:
option1=value1
option2=value2
option3=value3

Closes #260

Note that I realise the contributions guidelines state:

Pull requests are always welcome. However, before going through the trouble of implementing a change it's worth creating an issue. This allows us to discuss the changes and make sure they are a good fit for the project.

But given that the relevant issue already exists (#260), and has the expected outcome clearly described (thanks!), I figured there was nothing left to do apart from doing the actual implementation.

This looks great, thanks @JeanMertz!


Export Videos

We have a few places in the app where it might make sense to export a video (the spinning globe, the playing timeline, etc).It would be awesome if we could export a video, perhaps doing something like this

Thanks Tony!
From: Tony Boyles<EMAIL_ADDRESS>Sent: Thursday, September 17, 2020 2:37 PM
To: CDCgov/MicrobeTrace<EMAIL_ADDRESS>Cc: Subscribed<EMAIL_ADDRESS>Subject: [CDCgov/MicrobeTrace] Export Videos (#268)
We have a few places in the app where it might make sense to export a video (the spinning globe, the playing timeline, etc).It would be awesome if we could export a video, perhaps doing something like thishttps://bl.ocks.org/veltman/ff864215009174bc5d164ec3533125c2
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://github.com/CDCgov/MicrobeTrace/issues/268, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHMTDBJFVKOTLTYMKOO5W23SGJJNZANCNFSM4RQ234TQ.

The above solution is a roadmap to generating webm videos (or mpeg, ogg, or mp4 by just tweaking the mime type). We can extend that approach to work for animated gifs with a gif encoder library.


feat(message-list): bottom modifier in loading more loader

Loading more loader can be placed at the bottom of the message list.

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

GitHub release
npm package (@latest dist-tag)

Your semantic-release bot :package::rocket:


Create an AAAA record for React sites

When creating a React site with a customDomain SST creates an A record for it. I'd like to request to also create an AAAA record for it.

I created a pull request. I haven't really tested the code. I'm not sure if this sort of change is welcome/wanted. Happy to put more effort if that's the case. I'm pretty sure it'll work, since the API for creating AAAA records is identical to creating A records. But I also think SST should be consistently supporting IPv6 everywhere it can, so maybe searching for other places where this could be done as well would be a good idea. I'm happy to do that as well.
If this is a welcome change, I'll figure out how to run these changes locally on my computer, test them, etc.

Thanks @pupeno!
Also fixed for API and NextjsSite.


Request class cannot accept $query property in constructor

Hello,
I was trying to build a request body but being locked down on overwriting non compatible types.
<?php
// code
class TheRequest extends Request implements HasBody{
use HasJsonBody;

protected Method $method = Method::POST;

public function __construct(
        protected string $name,
        protected string $query,
)
{
}
// code
}

Error: Type must be '\Saloon\Contracts\ArrayStore' (as in base class '\Saloon\Traits\RequestProperties\HasQuery')
PhpStan: Type string of property Namespace\Requests\TheRequest::$query is not the same as type Saloon\Contracts\ArrayStore of overridden property Saloon\Http\Request::$query.
Is it that I CANNOT use $query property in my request constructor or am missing something?
Bypassing this by assigning myself another property name (eg $qry) besides $query looks nasty as am following an API Spec and didn't intend to go this route.
Partial code provided but request is complete with defaultBody defined

The Request uses the HasRequestProperties trait, which in turn uses the HasQuery trait, which defines the $query property on the class: protected ArrayStoreContract $query;.
Because the Request class already has a $query property defined, your constructor promotion is attempting to redefine it as a different, incompatible type.
Since your class already has the $query property defined (as a different type), you'll either need to rename your constructor parameter (as you've discovered), or you'll need to remove the protected keyword to remove the property promotion. Either way, you'll still need to convert your incoming query string to a query array as used by Saloon.
Two options:

Use a different parameter name and define the defaultQuery() method to use it convert it to the query string to the expected array.

class TheRequest extends Request implements HasBody
{
    use HasJsonBody;

    protected Method $method = Method::POST;

    public function __construct(
        protected string $name,
        protected string $queryString,
    ) {
        //
    }

    protected function defaultQuery(): array
    {
        // @see https://www.php.net/manual/en/function.parse-str.php
        parse_str($this->queryString, $queryArray);

        return $queryArray;
    }
}

Remove the property promotion and just set the internal $query array inside the constructor:

use Saloon\Repositories\ArrayStore;

class TheRequest extends Request implements HasBody
{
    use HasJsonBody;

    protected Method $method = Method::POST;

    public function __construct(
        protected string $name,
        string $query,
    ) {
        // @see https://www.php.net/manual/en/function.parse-str.php
        parse_str($query, $queryArray);

        $this->query = new ArrayStore($queryArray);
    }
}

@derrickobedgiu1 You can't use properties (promotional or not) named headers, query, or body, without following the type already defined in the base request.
There's also some other properties, but these are the common 'message'/request terms.
Other than what @patrickcarlohickman has already suggested, you can also use DTOs like @Sammyjo20 mentions here: https://github.com/saloonphp/saloon/issues/376#issuecomment-1962975230.
In my experience, DTOs works quite well, and are easy to serialise and unserialise in-between processes (like queueing Laravel jobs).
It works fairly well with API specs, but might get a bit tricky if you use a tool to generate things based on something like OpenAPI.
Although, there are tools to do it.
F.ex., Saloon SDK Generator, that's specifically made for Saloon.
Although, I haven't gotten around to test- it dig into it yet.
You could also use something more PHP-generic like JanePHP, although this likely takes a bit more effort.

Hello @patrickcarlohickman & @juse-less , thanks for responses. I'll go ahead and use a different property name. Thanks for the time


Could not find 'spaceship' (< 1.0.0, >= 0.39.0) - did find: [spaceship-1.0.0]

Issue Description
I uninstalled everything.
After installing fastlane, i installed fastlane deliver.
With deliver, spaceship 0.39.0 got installed.
With that, my transfer to itunes connect fails.
I updated spaceship to 1.0.0 but still got the spaceship is outdated message.
After uninstalling 0.39.0 the error
Could not find 'spaceship' (< 1.0.0, >= 0.39.0) - did find: [spaceship-1.0.0]
appeared
Environment
✅ fastlane environment ✅
Stack

Key
Value

OS
10.12.2

Ruby
2.0.0

Bundler?
false

Git
git version 2.8.4 (Apple Git-73)

Installation Source
/usr/local/bin/fastlane

Host
Mac OS X 10.12.2 (16C68)

Ruby Lib Dir
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib

OpenSSL Version
OpenSSL 0.9.8zc 19 Mar 2015

Is contained
false

Xcode Path
/Applications/Xcode.app/Contents/Developer/

Xcode Version
8.0

System Locale

Variable
Value

LANG
de_DE.UTF-8
✅

LC_ALL

LANGUAGE

fastlane files:
No Fastfile found
No Appfile found
fastlane gems

Gem
Version
Update-Status

fastlane
2.1.1
✅ Up-To-Date

Loaded fastlane plugins:
No plugins Loaded
Loaded gems

Gem
Version

slack-notifier
1.5.1

i18n
0.7.0

thread_safe
0.3.5

tzinfo
1.2.2

minitest
5.8.3

activesupport
4.2.5

CFPropertyList
2.3.3

claide
1.0.1

colored
1.2

nanaimo
0.2.2

xcodeproj
1.4.1

rouge
1.11.1

xcpretty
0.2.4

terminal-notifier
1.7.1

terminal-table
1.4.5

plist
3.1.0

addressable
2.3.7

multipart-post
2.0.0

word_wrap
1.0.0

babosa
1.0.2

highline
1.7.8

commander
4.4.0

excon
0.45.4

faraday
0.9.2

unf_ext
<IP_ADDRESS>

unf
0.1.4

domain_name
0.5.25

http-cookie
1.0.2

faraday-cookie_jar
0.0.6

fastimage
1.6.8

gh_inspector
1.0.2

uber
0.0.15

representable
2.3.0

retriable
2.1.0

mime-types
2.4.3

hurley
0.2

little-plugger
1.1.4

multi_json
1.11.0

logging
2.0.0

jwt
1.5.2

memoist
0.14.0

signet
0.7.0

googleauth
0.5.0

thor
0.19.1

httpclient
2.8.0

google-api-client
0.9.8

mini_magick
4.5.1

multi_xml
0.5.5

security
0.1.3

xcpretty-travis-formatter
0.0.4

dotenv
2.1.1

bundler
1.13.6

faraday_middleware
0.10.0

json
1.8.3

rubyzip
1.2.0

generated on: 2016-12-19

Seems to be fixed in newest version

Still not fixed

Yeah, please install fastlane, which now includes the spaceship code, add the following to your Gemfile
gem "fastlane"

and run bundle update

I use lane:
lane :updateAllProfiles do
  match(type: "adhoc", readonly: true)
  match(type: "development", readonly: true)
  match(type: "appstore", readonly: true)
end

fastlane finished with errors
rubies/ruby-2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/dependency.rb:310:in `to_specs': Could not find 'spaceship' (< 1.0.0, >= 0.25.1) - did find: [spaceship-1.0.0] (Gem::MissingSpecVersionError)

@NikKovIos you didn't share your Gemfile. Also you can run [sudo] gem uninstall spaceship

I don't use Gemfile. Is it necessary? Doing fastlane match xxx do the job without Gemfile.
I've tried to reinstall spaceship already.

@NikKovIos not reinstalling, try uninstalling. It's all just one gem now. Run gem cleanup and gem uninstall fastlane_core spaceship credentials_manager and then gem update fastlane 👍

Still
rubies/ruby-2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/dependency.rb:308:in to_specs': Could not find 'spaceship' (< 1.0.0, >= 0.25.1) among 127 total gem(s) (Gem::MissingSpecError)`
What i did:

gem uninstall fastlane_core spaceship credentials_manager
gem uninstall fastlane
gem cleanup
gem install fastlane
gem update fastlane

gem list doesn't have spaceship. Does have fastlane (2.6.0).

@NikKovIos can you run which fastlane

also, you might want to use the pre-packaged fastlane: download.fastlane.tools

which fastlane:
.rvm/gems/ruby-2.3.0/bin/fastlane

Maybe since that doesn't work, you should try using bundler: Follow the CocoaPods Guide (https://guides.cocoapods.org/using/a-gemfile.html), but add fastlane as gem instead 👍

At last! Works.
What have i done:

bundle init
In Gemfile
source "https://rubygems.org"
gem "xcode-install"
gem "spaceship"
gem "fastlane"
bundle install
be fastlane updateAllProfiles
(where be is alias for bundle exec and updateAllProfiles is my lane)

@KrauseFx Thanks for help!

@NikKovIos please remove spaceship from the Gemfile, and run bundle update, that should be the way to make it work 👍

Yep!


vscode could not perform as well on mac as on windows 7.

I tried 1.17 edition at first. However, I just could not type code on the editor.
Then I went back to 1.16 ed. It could type. However, after installing the plugins, I found it could not offer code hints and on some clicks it reports some error as follows :
"Cannot read property 'value' of null"

VSCode Version: Code 1.16.1 (27492b6bf3acb0775d82d2f87b25a93490673c6d, 2017-09-14T16:24:39.530Z)
OS Version: Darwin x64 16.7.0
Extensions:

Extension
Author (truncated)
Version

markdown-toc
Ala
1.5.6

vscode-markdownlint
Dav
0.10.1

vscode-pandoc
Dou
0.0.8

python-docs
Muk
0.8.0

include-autocomplete
ajs
0.0.4

code-gnu-global
aus
0.2.2

vscode-python-docstring
aza
0.0.5

django-html
bib
1.2.0

django-snippets
bib
1.1.0

markdown-preview-github-styles
bie
0.1.0

flask-snippets
cst
0.0.4

python-snippets
cst
0.0.5

algorithm-mnemonics-vscode
dav
1.0.2

jupyter
don
1.1.3

python
don
0.7.0

python-extension-pack
don
1.0.0

code-runner
for
0.7.2

code-python-isort
fre
0.0.3

mdmath
goe
2.0.7

CppSnippets
har
0.0.12

Python-autopep8
him
1.0.2

vscode-auto-open-markdown-preview
hnw
0.0.4

vscode-flake8
jay
0.0.4

clangcomplete
kub
0.0.6

cmake-tools-helper
mad
0.1.1

MagicPython
mag
1.0.12

cppcheck
mat
0.2.1

markdown-shortcuts
mdi
0.8.1

vscode-clang
mit
0.2.2

vscode-ai
ms-
0.1.2

cpptools
ms-
0.13.1

wordcount
ms-
0.1.0

reloaded-cpp
rel
0.1.6

preview-vscode
sea
1.3.4

markdown-preview-enhanced
shd
0.2.9

vscode-table-formatter
shu
1.2.1

spellchecker
swy
1.2.13

python
tht
0.2.3

python-extended-snippets
tus
0.0.1

cmake-tools
vec
0.10.2

vscode-arduino
vsc
0.2.9

jinja
who
0.0.8

clang-format
xav
1.6.0

markdown-pdf
yza
0.1.7

markdown-all-in-one
yzh
0.10.3

(1 theme extensions excluded)

Steps to Reproduce:

install the vscode as default set
install python plugins

Reproduces without extensions: Yes/No

Does this only happen after you install the python extension? How about if you disable all extensions?

on version 1.17, I reinstalled it many time, but just could not type in the editor except  TAB and BACKSPACE key.
on version 1.16, all the functions around the python plugins do not work. I suspect that there must be some defects in vscode

It seems that the buttons do not work

From those errors, it seems like you have some misbehaving extensions. Can you try disabling all extensions by running the Extensions: Disable all installed extensions command in VS Code and then restarting the editor. After disabling all extensions, does this still happen

I find that the 'code runner' plugin is disabled, and there is no button , no errors. (ed 1.16)
However, whenever I turn on any plugins, they seem do not work
By the way, ed 1.17 could not type on the editor in any case so that I give up this edition

Sorry, I don't understand the problem. So when you have any plugin enabled, code stops working?

It could type in 1.17.2 and all the plugins could be load correctly.
By the way, when all plugin enabled in 1.16, code could type while plugins do not work


Support for DAC MCP4725

I need to output an analog voltage to control a battery charger. I got this chip already running with a python script but it seems very difficult to access this script via blocky/javascript so could you please supoort this chip in your module ? address is 0x60

Waiting for hardware:
one MCP4725 ordered at AliExpress, expected delivery in 30-50 days,

Good! Waiting for the module :)
I am trying to connect ADS1015 but the adapter finds nothing, see:
i2c.0 | 2019-05-15 22:30:46.132 | info | Search found: []
i2c.0 | 2019-05-15 22:30:36.414 | info | starting.  Your user "pi" has the rights to access the I2C bus while the user running ioBroker (probably "iobroker", but check your ps -aux) doesn't have these rights. The following command may solve the issue (I haven't tested it myself):
sudo usermod -G i2c iobroker

Apparently there is an issue with access rights. Your user "pi" has the rights to access the I2C bus while the user running ioBroker (probably "iobroker", but check your ps -aux) doesn't have these rights. The following command may solve the issue (I haven't tested it myself):
sudo usermod -G i2c iobroker

This fixed it. I am now able to read ADS1115  Thanks x1000

Unfortunately shipping with Yanwen didn't work. Reordered today, expected delivery in 30-50 days

Package arrived from China... I will implement it soon.


[SPARK-39446][MLLIB][FOLLOWUP] Modify constructor of RankingMetrics class

What changes were proposed in this pull request?

Merged the two constructor into one using RDD[_ <: Product].

Why are the changes needed?

To make code simpler.
To support even more inputs.
The previous code treats rel as an empty array when rel is not provided, which is not that beautiful. This change removes this.

Does this PR introduce any user-facing change?
NO

How was this patch tested?

Can one of the admins verify this patch?

Merged to master


[RELAY]Switch from CompileEngine to TECompiler in Interpreter

This continues on:
[RFC][Relay] TECompiler: Rewrite existing compile engine to match updated compiler flow
and #7518, this time just replacing CompileEngine with TECompiler in the Interpreter,
using the JIT helper added to help the transition.
Some whitespace improvements while there.

@areusch could you trigger the ci workflow?

@jroesch for review

CC @icemelon9 for review :-)

Thanks @mbs-octoml @xqdan @jroesch! It is merged


feat(problems/interviews): shortest_common_prefixes

I do Not remember which interview was this for.

:tada: This issue has been resolved in version 1.1.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Drop Helmex-update in favor of common/bash and make it gitops ready

Is your feature request related to a problem? Please describe the problem.
Git clone and commit are now bundled together into Helmex-update. This makes it impossible to use those functions in other  settings (like non-Helm GitOps).
Describe the feature/solution you'd like
Drop helmex-update and add support for a proper use of secrets for git cloning in common/bash. This will enable us to rewrite the current experiment using helmex-update using the following three tasks, and also other non-helm based GitOps.

Bash task to git clone using a token (so that 3 below becomes possible)
Bash task to edit yamls locally
Bash task to  commit / push

Will this feature/solution bring new benefits for Iter8 users? What are they?
Enables non-Helm based GitOps.
Does this issue require a design doc/discussion? If there is a link to the design document/discussions, please provide it below.
Yes, please see above.
How will this feature be tested?

[ ] Unit tested. E2e tested as part of tutorials. Manually tested as well.

How will this feature be documented?

[ ] Iter8.tools end user documentation.

Note: Please see #941

Note: To begin with, we plan to drop the experiment that uses Helmex-update, and reintroduced  it subsequently using a run task. This seems far easier than having to change "in place"


chore(deps): update module github.com/caarlos0/env/v11 to v11.3.1

This PR contains the following updates:

Package
Type
Update
Change

github.com/caarlos0/env/v11
require
patch
v11.3.0 -> v11.3.1

Release Notes

caarlos0/env (github.com/caarlos0/env/v11)
v11.3.1
Compare Source
Changelog
Bug fixes

f329e88: fix: Options.Environment: Do not merge with default env (#353) (@oxzi)
9bf044a: fix: retract 11.3.0 (@caarlos0)

Other work

4ebfdad: ci: fix gitignore (@caarlos0)

Released with GoReleaser Pro!

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

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

This PR has been generated by Renovate Bot.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>5
Details

0 of 0   changed or added relevant lines in 0 files are covered.
4 unchanged lines in 1 file lost coverage.
Overall coverage decreased (-0.2%) to 59.1%

Files with Coverage Reduction
New Missed Lines
%

pkg/config/env.go
4
79.65%

Totals

Change from base Build<PHONE_NUMBER>3:
-0.2%

Covered Lines:
1234

Relevant Lines:
2088

💛  - Coveralls


Don't require Golang

Users shouldn't need to have Go installed in order to use the midiserver
Tasks:

[x] https://github.com/geomyidia/erl-midi-server/issues/7
[x] Add Go bin directory in priv
[x] Add target to download correct binary
[x] Update LFE code to build correct binary name
[x] Update docs on how to build midiserver from source and how to run it from pre-compiled binaries
[ ] Testing

Almost done ...


Pivot always resets

First of all, thank you for your work! This plugin is very useful, I do have an issue with it though. Every time I select a new item, the pivot position resets, which is quite cumbersome. Often times, items are in packs and share similar placement parameters, which is why saving them is helpful. Best regards!

I pushed some updates which should produce the behavior you suggested. If you have a chance I would love to hear if it works the way you wanted. Otherwise I'll probably give it a week or so and then submit this new version for publication

Wow, that was superfast! Thank you very much! I am sorry, but how can I test the new version?

If you have club access you can download a zip of this repo then rename the file extension from .zip to .op or you could clone the repo into your Plugins folder.


5.71: Program cannot find stage assets for Brawlhalla

The program throws the following error when loading the Brawlhalla stage assets:

Traceback (most recent call last):
  File "C:\Users\wolfy\Git\TournamentStreamHelper\src\TSHGameAssetManager.py", line 503, in LoadStageImage
    img = Image.open(stage.get("path"))
  File "C:\Users\wolfy\AppData\Local\Programs\Python\Python39\lib\site-packages\PIL\Image.py", line 3236, in open
    fp = builtins.open(filename, "rb")
FileNotFoundError: [Errno 2] No such file or directory: './user_data/games/bh/stage_icon/BG_Avatar.png'

Traceback (most recent call last):
  File "C:\Users\wolfy\Git\TournamentStreamHelper\src\TSHGameAssetManager.py", line 503, in LoadStageImage
    img = Image.open(stage.get("path"))
  File "C:\Users\wolfy\AppData\Local\Programs\Python\Python39\lib\site-packages\PIL\Image.py", line 3236, in open
    fp = builtins.open(filename, "rb")
FileNotFoundError: [Errno 2] No such file or directory: './user_data/games/bh/stage_icon/BG_MiamiDome.png'

Traceback (most recent call last):
  File "C:\Users\wolfy\Git\TournamentStreamHelper\src\TSHGameAssetManager.py", line 503, in LoadStageImage
    img = Image.open(stage.get("path"))
  File "C:\Users\wolfy\AppData\Local\Programs\Python\Python39\lib\site-packages\PIL\Image.py", line 3236, in open
    fp = builtins.open(filename, "rb")
FileNotFoundError: [Errno 2] No such file or directory: './user_data/games/bh/stage_icon/BG_Steam.png'

Traceback (most recent call last):
  File "C:\Users\wolfy\Git\TournamentStreamHelper\src\TSHGameAssetManager.py", line 503, in LoadStageImage
    img = Image.open(stage.get("path"))
  File "C:\Users\wolfy\AppData\Local\Programs\Python\Python39\lib\site-packages\PIL\Image.py", line 3236, in open
    fp = builtins.open(filename, "rb")
FileNotFoundError: [Errno 2] No such file or directory: './user_data/games/bh/stage_icon/BG_HBCross.png'

Traceback (most recent call last):
  File "C:\Users\wolfy\Git\TournamentStreamHelper\src\TSHGameAssetManager.py", line 503, in LoadStageImage
    img = Image.open(stage.get("path"))
  File "C:\Users\wolfy\AppData\Local\Programs\Python\Python39\lib\site-packages\PIL\Image.py", line 3236, in open
    fp = builtins.open(filename, "rb")
FileNotFoundError: [Errno 2] No such file or directory: './user_data/games/bh/stage_icon/BG_DemonIsland.png'
Traceback (most recent call last):
  File "C:\Users\wolfy\Git\TournamentStreamHelper\src\TSHGameAssetManager.py", line 503, in LoadStageImage
    img = Image.open(stage.get("path"))
  File "C:\Users\wolfy\AppData\Local\Programs\Python\Python39\lib\site-packages\PIL\Image.py", line 3236, in open
    fp = builtins.open(filename, "rb")
FileNotFoundError: [Errno 2] No such file or directory: './user_data/games/bh/stage_icon/BG_Fangwild2.png'
Traceback (most recent call last):
  File "C:\Users\wolfy\Git\TournamentStreamHelper\src\TSHGameAssetManager.py", line 503, in LoadStageImage
    img = Image.open(stage.get("path"))
  File "C:\Users\wolfy\AppData\Local\Programs\Python\Python39\lib\site-packages\PIL\Image.py", line 3236, in open
    fp = builtins.open(filename, "rb")
FileNotFoundError: [Errno 2] No such file or directory: './user_data/games/bh/stage_icon/BG_BloodMoon.png'

Traceback (most recent call last):
  File "C:\Users\wolfy\Git\TournamentStreamHelper\src\TSHGameAssetManager.py", line 503, in LoadStageImage
    img = Image.open(stage.get("path"))
  File "C:\Users\wolfy\AppData\Local\Programs\Python\Python39\lib\site-packages\PIL\Image.py", line 3236, in open
    fp = builtins.open(filename, "rb")
FileNotFoundError: [Errno 2] No such file or directory: './user_data/games/bh/stage_icon/BG_Brawlhaven.png'

This is probably due to the Brawlhalla stage assets being in JPG format and not PNG

I'll fix from the assets side for now, since we're too dependent on images being PNGs

Should now be addressed with the latest assets update when pulled, plus with a fix I introduced lately to also not throw an error if we can't find the assets of certain stages (Not existing, etc.)


Add property enableXmlTransform

I discovered this property by having Debug mode turned on in pipelines.  Prior to it being set to true in my yaml, the transforms wouldn't actually happen.  Once I passed this in as true, then they did.  It seemed like it was missing from the documentation

Docs Build status updates of commit d9d60d7:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

task-reference/file-transform-v2.md
:white_check_mark:Succeeded

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

I'm sure this will be obvious to you (whoever you are), but it wasn't to me.  This version @2 is the one missing it.  The version @1 task has this element in it.  Not sure if that helps at all, but I got confused when I happened on the @1 and saw it was already there.

@nickdevore Thank you for the feedback on this task. For this new task reference, the YAML syntax block and the task inputs are generated from the source code for the task which is open source. Here is the V2 task that is missing the enableXmlTranform input.
https://github.com/microsoft/azure-pipelines-tasks/blob/master/Tasks/FileTransformV2/task.json
Here is the V1 task with that task input highlighted:
https://github.com/microsoft/azure-pipelines-tasks/blob/master/Tasks/FileTransformV1/task.json#L41
(Apologies for the duplication if you are aware of these links already)
In V2, it looks like that parameter is hardcoded to true:
https://github.com/microsoft/azure-pipelines-tasks/issues/12088
To confirm, you are using the FileTransform@2 task, but it doesn't perform properly for you unless you add back the enableXmlTransform input and set it to true? I can make an update to the documentation once we find a root cause, but it sounds like this might be a bug in the task, so the place to start might be by filing a product issue here: https://github.com/microsoft/azure-pipelines-tasks/issues and including the debug log and the part of the pipeline that uses this task.
Please let me know and

@nickdevore I'm closing this PR per my previous notes, please reactivate it if my previous comments did not resolve the issue for you. Thank you.


Remove single paragraph tags from td and th tags

Same issue.
https://github.com/InteractiveDesignAndDevelopment/cs-news-export/issues/9

The fix for this runs too slowly. The export can't complete in 15 minutes. I don't know how long it would take, but I don't think it could be worth it.


Stateful user-defined accessors

If anybody decorates a stateful class with @register_dataarray_accessor or @register_dataset_accessor, the instance will lose its state on any method that invokes _to_temp_dataset, as well as on a shallow copy.

In [1]: @xarray.register_dataarray_accessor('foo')
   ...: class Foo:
   ...:     def __init__(self, obj):
   ...:         self.obj = obj
   ...:         self.x = 1
   ...:
   ...:

In [2]: a = xarray.DataArray()

In [3]: a.foo.x
Out[3]: 1

In [4]: a.foo.x = 2

In [5]: a.foo.x
Out[5]: 2

In [6]: a.roll().foo.x
Out[6]: 1

In [7]: a.copy(deep=False).foo.x
Out[7]: 1

While in the case of _to_temp_dataset it could be possible to spend (substantial) effort to retain the state, on the case of copy() it's impossible without modifying the accessor duck API, as one would need to tamper with the accessor instance in place and modify the pointer back to the DataArray/Dataset.
This issue is so glaring that it makes me strongly suspect that nobody saves any state in accessor classes. This kind of use would also be problematic in practical terms, as the accessor object would have a hard time realising when its own state is no longer coherent with the referenced DataArray/Dataset.
This design also carries the problem that it introduces a circular reference in the DataArray/Dataset. This means that, after someone invokes an accessor method on his DataArray/Dataset, then the whole object - including the numpy buffers! - won't be instantly collected when it's dereferenced by the user, and it will have to instead wait for the next gc pass. This could cause huge increases in RAM usage overnight in a user application, which would be very hard to logically link to a change that just added a custom method.
Finally, with https://github.com/pydata/xarray/pull/3250/, this statefulness forces us to increase the RAM usage of all datasets and dataarrays by an extra slot, for all users, even if this feature is quite niche.
Proposed solution
Get rid of accessor caching altogether, and just recreate the accessor object from scratch every time it is invoked. In the documentation, clarify that the __init__ method should not perform anything computationally intensive.

Demonstation on the circular reference issue:
import gc
import weakref
import xarray

class C:
    pass

@xarray.register_dataset_accessor('foo')
class Foo:
    def __init__(self, obj):
        self.obj = obj

ds = xarray.Dataset()
w = weakref.ref(ds)
print("No accessor, in scope:", w() is not None)
del ds
print("No accessor, descoped:", w() is not None)

ds = xarray.Dataset()
ds.foo
w = weakref.ref(ds)
print("with accessor, in scope:", w() is not None)
del ds
print("with accessor, descoped:", w() is not None)
gc.collect()
print("with accessor, after gc pass:", w() is not None)

Output:
No accessor, in scope: True
No accessor, descoped: False
with accessor, in scope: True
with accessor, descoped: True
with accessor, after gc pass: False

Interesting, thanks!
As an accessor maintainer, I can ensure that at least one accessor implementation is storing state ;-). But this state is based on the xarray object itself: for example, we derive georeferencing information and store the names of the coordinate variabless we know are going to be useful to us later. That is, every new call to init based on a modified object will trigger a new parsing, and we don't come into the situation you describe above.
Getting rid of the caching logic would mean some performance loss to us, yes, but I don't know if it's "worse" than the circular reference issue you describe or not.

@fmaussion could you change your accessor code to store its state in Dataset.attrs instead?

store the names of the coordinate variabless we know are going to be useful to us later.
So you work on the assumption that no new variables will be added after the first invocation of your accessor? Or do you have logic that invalidates your cache every time the state of the coords changes?

The circular reference issue could also be worked around in a user-friendly way by having the decorator automatically add methods to the decorated class, copying the design of @dataclass:
import weakref

class C:
    def __init__(self, owner):
        self._owner = weakref.ref(owner)
        if hasattr(self, "__post_init__"):
            self.__post_init__()

    @property
    def owner(self):
        out = self._owner()
        if out is None:
            raise AttributeError("Orphaned accessor")
        return out

could you change your accessor code to store its state in Dataset.attrs instead?

Yes, although attrs would be bad as well because they are lost in many operations. The current "best practice" would be to use coords for this, as in https://github.com/pydata/xarray/issues/1271#issuecomment-280574680
I never bothered to get this done (my library is quite niche and not mean to become widely used), but if we remove the caching mechanism in xarray, it would be one more incentive to make the switch.

So you work on the assumption that no new potentially useful coords will be added after the first invocation of your accessor?

Yes. In almost all use cases I know of this won't happen. Typically, the users have to create (or open) an xarray object that salem understands before calling the accessor anyway.

Or do you have logic that invalidates your cache every time the state of the coords changes?

No. I didn't think about that before today ;-). But you are right: if users of salem's accessor change the coordinates after calling the accessor, then bad things might happen. Experience shows that this rarely happens (never happened to me), but I can see how this can fire back.
Altogether, these are good arguments to remove the caching mechanism I believe.

Hi all,
I recently encountered an issue that look like this with accessor, but not sure.
Here is a peace of code that reproduces the issue.
Starting from a class with the core of the code and an accessor to implement the user API:
import xarray

class BaseEstimator():
    def fit(self, this_ds, x=None):
        # Do something with this_ds:
        x = x**2
        # and create a new array with results:
        da = xarray.DataArray(x).rename('fit_data')
        # Return results:
        return da

    def transform(self, this_ds, **kw):
        # Do something with this_ds:
        val = kw['y'] + this_ds['fit_data']
        # and create a new array with results:
        da = xarray.DataArray(val).rename('trf_data')
        # Return results:
        return da

@xarray.register_dataset_accessor('my_accessor')
class Foo:
    def __init__(self, obj):
        self.obj = obj
        self.added = list()

    def add(self, da):
        self.obj[da.name] = da
        self.added.append(da.name)
        return self.obj

    def clean(self):
        for v in self.added:
            self.obj = self.obj.drop(v)
            self.added.remove(v)
        return self.obj

    def fit(self, estimator, **kw):
        this_da = estimator.fit(self, **kw)
        return self.add(this_da)

    def transform(self, estimator, **kw):
        this_da = estimator.transform(self.obj, **kw)
        return self.add(this_da)

Now if we consider this workflow:

ds = xarray.Dataset()
ds['ext_data'] = xarray.DataArray(1.)

my_estimator = BaseEstimator()
ds = ds.my_accessor.fit(my_estimator, x=2.)

print("Before clean:")
print("xr.DataSet var  :", list(ds.data_vars))
print("accessor.obj var:", list(ds.my_accessor.obj.data_vars))

print("\nAfter clean:")
# ds.my_accessor.clean() # This does nothing to ds but clean the accessor.obj
# ds = ds.my_accessor.clean() # Cleaning ok for both ds and accessor.obj
ds_clean = ds.my_accessor.clean() # Cleaning ok on new ds, does nothing to ds as expected but clean in accessor.obj
print("xr.DataSet var    :", list(ds.data_vars))
print("accessor.obj var  :", list(ds.my_accessor.obj.data_vars))
print("Cleaned xr.DataSet var:", list(ds_clean.data_vars))

We have the following output:
Before clean:
xr.DataSet var  : ['ext_data', 'fit_data']
accessor.obj var: ['ext_data', 'fit_data']

After clean:
xr.DataSet var    : ['ext_data', 'fit_data']
accessor.obj var  : ['ext_data']
Cleaned xr.DataSet var: ['ext_data']

The issue is clear here: the base space dataset has the 'fit_data' variable but not the accessor object: they've been "disconnected" and it's not apparent to users.
So if users later proceed to run the "transform":
ds.my_accessor.transform(my_estimator, y=2.)

they get an KeyError raised because the 'fit_data' is not in the accessor, although it still appears on the list of the ds variables.
Sorry for this long post, I'm not sure it's relevant to this issue but it seems so to me.
I don't see a solution to this from the accessor developer side, except for not "interfering" with the content of the accessed object.

@gmaze Dataset.drop does not mutate the state of the original object, so it's conceptually wrong for your clean() method to mutate the accessor state too. It should be:
    def clean(self):
        return self.obj.drop(self.added)

@crusaderky thanks for the explanation, that's a solution to my pb.
Although I understand that since accessor will be created from scratch, a dataset copy won't propagate the accessor properties (in this case the list of added variables):
ds = xarray.Dataset()
ds['ext_data'] = xarray.DataArray(1.)

my_estimator = BaseEstimator() # With "clean" method from @crusaderky
ds.my_accessor.fit(my_estimator, x=2.)
ds.my_accessor.transform(my_estimator, y=3.)

ds2 = ds.copy()

ds = ds.my_accessor.clean()
ds2 = ds2.my_accessor.clean()

print(ds.data_vars)
print(ds2.data_vars)

gives:
Data variables:
    ext_data  float64 1.0
Data variables:
    ext_data  float64 1.0
    fit_data  float64 4.0
    trf_data  float64 7.0

"Cleaning" the dataset works as expected, but the copy (ds2) has en empty list of added variables so the "clean" method doesn't have the expected result. We have the same behavior for deep copy.
Would that make any sense that the xr.DataSet.copy() method also return a copy of the accessors ?

Would that make any sense that the xr.DataSet.copy() method also return a copy of the accessors ?

It's been discussed above in this same thread. It's impossible without breaking the accessor API, as it would require you (the accessor developer) to define a copy method.
The more high level discussion is that the statefulness of the accessor is something that is OK to use for caching and performance improvements, and not OK for storing functional information like yours.
Have you considered storing a flag in Variable.attrs instead?

    def add(self, da):
        da.attrs["_cleanable"] = True
        self.obj[da.name] = da
        return self.obj

    def clean(self):
        return self.obj.drop([
            k for k, v in self.obj.variables.items()
            if v.attrs.get("_cleanable")
        ])

Ok, I get it. Probably the accessor is not the best solution in my case.
And yes, an attribute was in fact my first implementation of the add/clean idea. But I was afraid it would be less reliable than the internal list over a long term perspective (but that was before getting in the troubles described above).
But why is asking accessor developers to define a copy method an issue ? That wouldn't be mandatory but only required in situations where propagating functional informations could be useful. Sorry if that's a naive question for you guys.

Thing is, the whole thing is undefined.
What does the accessor state contain? As a xarray developer, I don't know.
Is it variable names? Is it references to objects that make up the Dataset, e.g. Variables or the attrs dict? Is it objects whose contents rely on the current state of the Dataset, e.g. aggregated measures? Is it objects whose contents rely on historical events (like in your case)?
Dataset.copy() will create a copy of everything up to and excluding the numpy arrays. In order to allow you to retain accessor state, we'd need to plant a hook in it and invoke some agreed duck-type API in your object that basically states, "I called copy(), and this is the new object I created, please create a copy of yourself accordingly making extra sure you don't retain references to components of the previous object".
And then there are all the other methods that currently nuke the accessor state - including many in-place ones - because they could potentially invalidate it. What should they do? Invoke a special API on the accessor? If not, why should copy() trigger special accessor API and e.g. roll() shouldn't?
Planting accessor-refresher hooks in every single method that currently just wipes it away is out of question as it would need to be almost everywhere and - more importantly - it would be born broken.

Alright, I think I get it, thanks for the clarification @crusaderky


When using add_column foreign key does not use the default_name method

I'm using add_column at several places to add references
add_column :activities, :user_id

When doing so, the SQL generated by schema_plus is something like:
FOREIGN KEY ("user_id") REFERENCES "users" ("id")

However when doing the same during table creation, it generates SQL with constraint name:
CONSTRAINT fk_activites_user_id FOREIGN KEY ("user_id") REFERENCES "users" ("id")

The former SQL forces Postgres to use default name for the constraint which is not same as the default name by SchemaPlus. Previously this was not the case. It would be great if SchemaPlus can generate similar SQL for add_column as it does when creating table, since this is a breaking change.
Thanks

I think the solution is to change the add_foreign_key method to set default name. Something like this
        def add_foreign_key(*args) # (table_name, column, to_table, primary_key, options = {})
          options = args.extract_options!
          case args.length
          when 2
            from_table, to_table = args
          when 4
            ActiveSupport::Deprecation.warn "4-argument form of add_foreign_key is deprecated.  use add_foreign_key(from_table, to_table, options)"
            (from_table, column, to_table, primary_key) = args
            options.merge!(column: column, primary_key: primary_key)
          end

          options = options.dup
          options[:column] ||= foreign_key_column_for(to_table)
          options[:name]   ||= ForeignKeyDefinition.default_name(from_table, options[:column])

          foreign_key_sql = add_foreign_key_sql(from_table, to_table, options)
          execute "ALTER TABLE #{quote_table_name(from_table)} #{foreign_key_sql}"
        end

@kushkella Yes that looks right.  Care to add a (failing) spec that tests this, then make the above fix?

Sure, will do.


Don't silently download nonexistent files

If a plugin specifies files that don't exist then Lapce will silently download them, and write to the file (for example): "404: Not Found". I experienced this with the gruvbox plugin (I've reported the issue to them, though). It would be better to simply not download it and report the error to the user.

This one is quite old. Lapce doesn't download files anymore, it's up to the plugin maintainers to properly handle Http code.


Specialization bugs in recursive union types

In a couple of places, we are not distinguishing correctly between different instances of RecursivePointer.
This test fails for gen_llvm and gen_wasm for two different reasons.

When we use gen_wasm, the equality procedures are generated somewhere else that doesn't have the same issue (compiler/mono/src/code_gen_help/equality.rs)
Dev backends: equality procedure calls
For the dev backends, the IR for the equality procedures is generated in compiler/mono/src/code_gen_help/equality.rs.
It correctly generates IR for two separate procedures, but the IR for the calls to those procedures is not specific enough. In both cases we get the following:
    CallType::ByName {
        ret_layout: Builtin(Bool),
        arg_layouts: [Builtin(List(RecursivePointer)), Builtin(List(RecursivePointer))],
        ..
    },

But the ProcLayout uses an expanded version of the RecursivePointer, so we have problems matching the call to the right procedure
ProcLayout {
    arguments: [
        Builtin(List(Union(NonNullableUnwrapped([
            Builtin(Int(I64)),
            Builtin(List(RecursivePointer)),
        ])))),
        Builtin(List(Union(NonNullableUnwrapped([
            Builtin(Int(I64)),
            Builtin(List(RecursivePointer)),
        ])))),
    ],
    result: Builtin(Bool),
};

This now compiles. A test should be added.


SET in C++ using Standard Template Library (STL) [Documentation]

Description
All information related to SET in C++ via documentation and with proper explanation along with codes.
Domain
C/CPP
Type of Contribution
Documentation
Code of Conduct

[X] I follow Contributing Guidelines & Code of conduct of this project.

/assign


Changes on Doc doesn't reflect on deck after syncing

Hi,
I have a deck with 473 cards. I edited the doc to

add new cards and
fix some typos and add indentations that I was missing to split two questions that were showing in the same screen so it became two questions as originally intended.

Then I synced again my desktop anki to download the changes. I can see the new cards added but I don't see the edits on old cards. Is there any process that I'm missing?
And related to my first question, If a question is modified Anki "knows" that it is the same question as before and keeps the schedule for asking or is it resetting the schedule as it was a new card?
Thanks!

Hey,
So your edits should come through. If you make and edit to a card two different would things would happen:

If you edit the Answer of a card then the card should keep it's existing history and be updated
If you edit the Question section of a card then it is considered to be deleted and re-added. In this case the history of the card is lost and a new card is created. Unfortunately this is a fundamental limitation in the way in which cards are mapped from sheets and then stored in Anki. I believe at some point in 2.1.x version there was a new way in which cards were uniquely identified but this is not currently supported.

Is there any specific edits you are not seeing or possibly could you share the deck even privately and I can have a look!

Hi! Thanks for the anwer.
So if I understood the card is mapped by the words used in the question and the order which appears in the doc is not important. Is that right?
And sure, you can take a look: https://docs.google.com/document/d/1jkOVZBZTH6ruhzbAntlqGWDj6rJgsNY56QMRqiCV7Yo/edit?usp=sharing
It's only reading, if you need to be admin let me know and I can send it privately.
Thanks!

I'm adding some extra details about the info that is not updating in my deck
I made a capture of one of the changes that I cannot see reflected after syncing.
https://imgur.com/a/GUNHF8g
Please let me know if I can provide any other info.
Regards,
Carlos

I think I found one possible reason why this happens.
I created the Doc with the title "X" and then at some point I modified the title of the google doc and the Deck as well. From that moment on I started having problems with syncing. Going back and matching google doc and deck title it all seems to work fine now.
Actually I thoung the only thing that mattered was the url of the google doc since it is the only data the addon requires but it seems to me that the different titles (google doc and deck) play some role in the process.
Regards,
Carlos

Changing the deck name would def create an issue of some kind. The add-on can't really handle changes to the name of the deck. If you had card in the old deck there is a good chance any edits to them would be ignored.
The add-on would try and remove the card from a deck where it does not exist and then would not be able to add it to a new deck as there would be a clash related to the "question" section of the card already existing.
I unfortunately won't get any time this weekend to look at it but will have a proper look at it next week!
Thanks for sharing the deck anyway I'm sure I won't need any elevated privileges

I'm still having some issues updating decks with other decks that haven't had any name changes so I'm guessing that is not the reason.
Thanks for your help again.

Hi I think I know why the sync issue happens. If you check the Google Docs published example, you will see on the top right hand corner "Automatically updated every 5 minutes". https://docs.google.com/document/d/e/2PACX-1vQawILe70vt1oZCLn9SdyF9Wo0i7-gQ2owGeghXHxhjx9e8_WclLotuU8mFLglZ1QQUDnmBnhRTabte/pub
Is there a way to reduce it to immediately?


[Snyk] Security upgrade st from 0.2.4 to 1.2.2

This PR was automatically created by Snyk using the credentials of a real user.Snyk has created this PR to fix one or more vulnerable packages in the `npm` dependencies of this project.

Changes included in this PR

Changes to the following files to upgrade the vulnerable dependencies to a fixed version:

package.json
package-lock.json

Vulnerabilities that will be fixed
With an upgrade:

Severity
Priority Score (*)
Issue
Breaking Change
Exploit Maturity

644/1000  Why? Mature exploit, Has a fix available, CVSS 4.3
Open Redirect npm:st:20171013
Yes
Mature

(*) Note that the real score may have changed since the PR was raised.
Check the changes in this PR to ensure they won't cause issues with your project.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.
For more information:
🧐 View latest project report
🛠 Adjust project settings
📚 Read more about Snyk's upgrade and patch logic

Learn how to fix vulnerabilities with free interactive lessons:
🦉 Open Redirect

Lib cagado


minor code improvements, read description

Fixes:

ineffectual assignment to err
Pebi and Exbi variables are never used
Printf-style function with dynamic format string and no further arguments should use print-style.

@zhsj please review & accept.
Thanks,
Gerasimos Maropoulos

Merged in ab7810ecffa1eae68db1c130a91667539b70b855


Add subclass_sets argument to macro expansion

This is needed in macro expansion to determine whether merging nested coercions is allowed.

Coverage remained the same at 93.256% when pulling 399a99b7bc16aa1a0b135e12ba6a025d1a8435d7 on subclass_sets_plumbing into 8026ed54a62dab449d56b72aad3b959ebcc1134b on macro_system.


Run e2e tests against OpenShift 4

Epic: #2694
We currently only test against different Kubernetes versions, not OpenShift.
We should add testing to run on OpenShift 4 just like we do with Kubernetes.
OpenShift 4 is very differently managed in this way than OpenShift 3 as here we can use  CodeReady Containers.
https://github.com/code-ready/crc

Poking around and getting familiar with how the e2e tests are running normally. CRC spins up a VM, could this be a problem running in your CI infrastructure?

We run our CI environment in Kubernetes (GKE) where we rely on Docker-in-Docker. VMs would require us to enable nested virtualization, this could cause some issues in cause of a crash in the tests where libvirt running inside a container won't be properly cleaned up.
From my understanding @munnerz had some experience with this.

/close


Poor Performance

Hi Ado,
Thank you for the great library. I was considering your library for my new .NET MAUI project. I created a new project using the template maui-reactor-appshell
I added a simple collectionview that contains 500 simple items and I show it in a label, unfortunately, when I click on the counter button, it takes about 2-3 seconds to update and has very poor performance.
I created another sample project using the default .NET MAUI template and added the collection view and it has blazing performance.
You can checkout the repo.
Could you please let me know how we can make it performant ?

Hi, thanks, the problem is that you are creating a new list every time the component is rendered.
Create the list one time and render it in the collection view, you can use the state (or a property).
Something like this:
class MainPageState
{
    public int Counter { get; set; }
    public List<int> Items {get; set;}
}

class MainPage : Component<MainPageState>
{
    protected override OnMounted()
    {
        State.Items = Enumerable.Range(0,500).ToList();
    }

    public override VisualNode Render()
    {
        return new ContentPage
        {
            new ScrollView
            {
                new VerticalStackLayout
                {
                    new Image("dotnet_bot.png")
                        .HeightRequest(200)
                        .HCenter()
                        .Set(Microsoft.Maui.Controls.SemanticProperties.DescriptionProperty, "Cute dot net bot waving hi to you!"),
                    new HandyTextBox()
                    .Label("FooBar")
                    ,
                    new Label("Hello, World!")
                        .FontSize(32)
                        .HCenter(),

                    new Label("Welcome to MauiReactor: MAUI with superpowers!")
                        .FontSize(18)
                        .HCenter(),

                    new Button(State.Counter == 0 ? "Click me" : $"Clicked {State.Counter} times!")
                        .OnClicked(()=>SetState(s => s.Counter ++))
                        .HCenter(),
                         new CollectionView()
                        .ItemsSource(State.Items,o=>new Label().Text(o.ToString()))
                        .Background(Microsoft.Maui.Controls.Brush.Red)
                        .HeightRequest(500)
                        .WidthRequest(500)
                }
                .VCenter()
                .Spacing(25)
                .Padding(30, 0)
            }
        }
        .Background(Microsoft.Maui.Controls.Brush.White);
    }
}

Thank you so much Ado, Let me try it. I am very excited for it

Thanks, It worked


clarify App.makeSingleInstance signature

The generated signature for app.makeSingleInstance looks like this:
makeSingleInstance(callback: (argv?: string[], workingDirectory?: string) => void): void;

There's a couple of things that I'd like to clarify:

having argv and workingDirectory optional here suggests we need to validate they're not undefined. Is that accurate?
The return type of this method should be boolean as per the docs:

This method returns false if your process is the primary instance of the application and your app should continue loading. And returns true if your process has sent its parameters to another instance, and you should immediately quit.

Will track the first thing (optional params) in #48 and the second thing I just put a PR up to Electron to fix.

https://github.com/electron/electron/pull/9432/files