Mismatching models and data fetching

Describe the bug
A new snippet is being saved in SnippetRequest collection but snippets are being fetched from Snippet collection.
To Reproduce
Steps to reproduce the behavior:

Go to 'app/api/snippets/route.ts'
Scroll down to 'GET' and 'POST' requests
See error

Expected behavior
It should either save in both or should fetch from Snippets collection. If there is a prior list of snippet collections like a template then that should be provided but since when running on local system their is no such thing it is causing many issues.
Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

OS: [e.g. iOS]
Browser [e.g. chrome, safari]
Version [e.g. 22]

Smartphone (please complete the following information):

Device: [e.g. iPhone6]
OS: [e.g. iOS8.1]
Browser [e.g. stock browser, safari]
Version [e.g. 22]

I am currently working on it so @notsoocool assign it to me under gssoc-extnd and hacktoberfest.

I can save the same snippet in both collection that would be easier or I can change every api call like in bookmark.
A.
import { NextResponse } from "next/server";
import Snippet from "@/lib/db/snippetModel";
import SnippetRequest from "@/lib/db/snippetRequestModel";
import dbConnect from "@/lib/db/connect";
import { currentUser } from "@clerk/nextjs/server";

export async function GET() {
	try {
		await dbConnect();
		const snippets = await Snippet.find({});
		console.log("Fetched Snippets"); // Add debug log
		return NextResponse.json(snippets);
	} catch (error) {
		console.error("Error fetching snippets:", error); // Add debug log
		return NextResponse.json(
			{ error: "Error fetching snippets" },
			{ status: 500 }
		);
	}
}

export async function POST(req: Request) {
    try {
        await dbConnect();
        const { title, language, code, description, tags, category, difficulty, usage } = await req.json();
        // console.log("Request body:", { title, language, code, description, tags, category, difficulty, usage }); // Log the incoming data
        // console.log("Database Connection Status:", mongoose.connection.readyState);

        const user = await currentUser();
        const userId = user?.id;

        if (!userId) {
            return NextResponse.json(
                { error: "User not authenticated" },
                { status: 401 }
            );
        }
        const newSnippet = new SnippetRequest({
            title,
            language,
            code,
            description,
            tags,
            category,          // Ensure this is included
            difficulty,        // Ensure this is included
            usage,             // Ensure this is included
            submittedBy: userId,
        });

        await newSnippet.save();

        const newsnippet = new Snippet({
            title,
            language,
            code,
            description,
            tags,
            category,          // Ensure this is included
            difficulty,        // Ensure this is included
            usage,             // Ensure this is included
            // submittedBy: userId,
        });

        await newsnippet.save();

        return NextResponse.json(
            { message: "Snippet submitted for approval" },
            { status: 201 }
        );
    } catch (error) {
        console.error("Error saving snippet request:", error); // Log the error
        return NextResponse.json(
            { message: "Failed to add snippet" },
            { status: 500 }
        );
    }
}

OR
B.
import { NextResponse } from "next/server";
import Snippet from "@/lib/db/snippetModel";
import dbConnect from "@/lib/db/connect";
import { currentUser } from "@clerk/nextjs/server";
import SnippetRequest from "@/lib/db/snippetRequestModel";

export async function PATCH(req: Request, { params }: { params: { id: string } }) {
	const { id } = params;

	try {
		const user = await currentUser();
		const userId = user?.id;

		if (!userId) {
			return NextResponse.json({ error: "User not authenticated" }, { status: 401 });
		}

		await dbConnect();

		// Step 1: Find the snippet by ID
		let snippet = await Snippet.findById(id);

		// Step 2: If snippet doesn't exist, check SnippetRequest collection
		if (!snippet) {
			const snippetReq = await SnippetRequest.findById(id);

			if (!snippetReq) {
				// If snippet not found in either collection, return error
				return NextResponse.json({ error: "Snippet not found" }, { status: 404 });
			}

			// Step 3: Create a new snippet in Snippet collection using SnippetRequest data
			snippet = await Snippet.create({
				title: snippetReq.title,
				language: snippetReq.language,
				code: snippetReq.code,
				description: snippetReq.description,
				tags: snippetReq.tags,
				category: snippetReq.category,
				difficulty: snippetReq.difficulty,
				usage: snippetReq.usage,
				bookmarkedBy: [userId], // Start with the current user bookmarking it
			});

		} else {
			// Step 4: If the snippet exists, toggle the bookmark
			const isBookmarked = snippet.bookmarkedBy.includes(userId);
			if (isBookmarked) {
				// User is already bookmarked, remove userId
				snippet.bookmarkedBy = snippet.bookmarkedBy.filter((uid) => uid !== userId);
			} else {
				// User is not bookmarked, add userId
				snippet.bookmarkedBy.push(userId);
			}
		}

		// Step 5: Save snippet with the updated bookmarkedBy array
		const updatedSnippet = await Snippet.findByIdAndUpdate(
			snippet._id, // Use the newly created snippet or existing one
			{ bookmarkedBy: snippet.bookmarkedBy }, // Only update the bookmarkedBy field
			{ new: true } // Return the modified document
		);

		return NextResponse.json(updatedSnippet, { status: 200 });
	} catch (error) {
		console.error("Error updating bookmark:", error);
		return NextResponse.json({ error: "Error updating bookmark" }, { status: 500 });
	}
}

Hi @inkerton ,
Thank you for your detailed report! However, I wanted to clarify a bit about the role of the SnippetRequest collection in our system.
The SnippetRequest model was specifically created for admin review purposes. When a user submits a new snippet, it is stored in SnippetRequest first so that an admin can approve or reject the submission. Once approved, the snippet is then moved to the main Snippet collection, which is where all active snippets are fetched from for display.
Therefore, the behavior you're experiencing is actually intended: snippets should be fetched from the Snippet collection, not SnippetRequest. The latter is only for unapproved submissions that are pending admin review.

@inkerton
If you have any more questions, feel free to ask me. I'll plan to close this issue and PR after an hour.

how do I approve the snippets i am running it on local right now. Explain that process to me since on sign in their is no role assigned or asked and I was working on bookmarks page. I won't be able to fetch the snippets.

How do I get admin access while running it locally? @notsoocool

Hi @inkerton,
The admin role is only limited to certain users, so it's not required for working on the bookmarks page. You won't need admin permission to access the bookmarks, as they are stored in theSnippetmodel, not the SnippetRequest model.
To access the bookmarks, you can fetch snippets directly from the Snippet model. Each snippet has a field that tracks which users have bookmarked it. You can use this field to filter and display only the snippets bookmarked by the current

as you can see on the Left side the Snippet Model has boomarkedBy field but on the right side in SnippetRequest model there is no such field. So no need of admin role, required to implement this feature.
Let me know if you need more details on how to implement this, and feel free to reach out if you have any further questions!
Still if you need admin perms do tell me i will temporarily give it to you


Broken proxy module

Using the proxy module would fail with a etherscan.client.EmptyResponse.
This is because Client.connect() is expecting data.get('status') == '1' which is not the case for the proxy module.
See https://api.etherscan.io/api?module=proxy&action=eth_blockNumber&apikey=YourApiKeyToken for example returns:
{"jsonrpc":"2.0","id":83,"result":"0x56c811"}

The recent pull requests #35 seems to fix this, if no one needs python 2.7 it can be merged.

If you guys drop Python2 support, then think about updating the tox file so integration tests stay green.

dropped, closed.


Game crashes when rendering the Trident as an item entity - 1.19

crash-2023-06-12_17.36.44-client.txt
This issue happens both with and without game renderer modifications.

This is fixed in the latest release (1.2.19).

Oh sorry. I dind't notice that the 1.2.19 was available on 1.19 since I use Modrinth.

Ah! I’ll release it there as well. I always forget ;-;


Active container should be able to select non-view containers

Right now the active container will only point to view containers, which is sufficient for basic use of the tiling aspects, but we need a way for the user to select multiple containers. While easy to implement in the back end, it is blocked by #72 since we need a way to give visual feedback to the user on which windows are currently selected.

Tiling system is going away and will be done in Lua entirely.


Swagger PR for Adding 2021-04-01-preview API version

MSFT employees can try out our new experience at OpenAPI Hub  - one location for using our validation tools and finding your workflow.

Changelog
Please ensure to add changelog with this PR by answering the following questions.

What's the purpose of the update?

[ ] new service onboarding
[x] new API version
[ ] update existing version for new feature
[ ] update existing version to fix swagger quality issue in s360
[ ] Other, please clarify

When you are targeting to deploy new service/feature to public regions? Please provide date, or month to public if date is not available yet. April, 2021
When you expect to publish swagger? Please provide date, or month to public if date is not available yet. May, 2021
If it's an update to existing version,  please select SDKs of specific language and CLIs that require refresh after swagger is published.

[ ] SDK of .NET (need service team to ensure code readiness)
[ ] SDK of Python
[ ] SDK of Java
[ ] SDK of Js
[ ] SDK of Go
[ ] PowerShell
[ ] CLI
[ ] Terraform
[x] No, no need to refresh for updates in this PR

Contribution checklist:

[x] I commit to follow the Breaking Change Policy of "no breaking changes"
[x] I have reviewed the documentation for the workflow.
[x] Validation tools were run on swagger spec(s) and errors have all been fixed in this PR. How to fix?

If any further question about AME onboarding or validation tools, please view the FAQ.
ARM API Review Checklist

[x] Ensure to check this box if one of the following scenarios meet updates in the PR, so that label “WaitForARMFeedback” will be added automatically to involve ARM API Review. Failure to comply may result in delays for manifest application. Note this does not apply to data plane APIs, all “removals” and “adding a new property” no more require ARM API review.

Adding new API(s)
Adding a new API version
[x] Ensure to copy the existing version into new directory structure for first commit (including refactoring) and then push new changes including version updates in separate commits. This is required to review the changes efficiently.
Adding a new service

[ ] Please ensure you've reviewed following guidelines including ARM resource provider contract and REST guidelines. Estimated time (4 hours). This is required before you can request review from ARM API Review board.

[x] If you are blocked on ARM review and want to get the PR merged with urgency, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.

Breaking Change Review Checklist
If there are following updates in the PR, ensure to request an approval from Breaking Change Review Board as defined in the Breaking Change Policy.

[ ] Removing API(s) in stable version
[ ] Removing properties in stable version
[ ] Removing API version(s) in stable version
[ ] Updating API in stable or public preview version with Breaking Change Validation errors
[ ] Updating API(s) in public preview over 1 year (refer to Retirement of Previews)

Action: to initiate an evaluation of the breaking change, create a new intake using the template for breaking changes. Addition details on the process and office hours are on the Breaking change Wiki.
Please follow the link to find more details on PR review process.

/azp run

@mvvsubbu, as discussed, please do the following to avoid cross version breaking change:

In 2018-04-01, split the APIs from 2 services into 2 json files.
Update existing readme.md for the file change.
For tag package-2021-04-01-preview, please include 2021-04-01-preview/databricks.json and the json file of another service in previous API version

@mvvsubbu, as discussed, please do the following to avoid cross version breaking change:

In 2018-04-01, split the APIs from 2 services into 2 json files.
Update existing readme.md for the file change.
For tag package-2021-04-01-preview, please include 2021-04-01-preview/databricks.json and the json file of another service in previous API version

Fixed the comment

@lirenhe I fixed the comments and still the CI checks are failing. I looked at them, they are tool related issues. Please review them and approve the PR.
Once approved we want to take these changes to Private repo and merge there (Ideally we should have started there, given that we have started here want to complete approval here and using this approval want to merge in private repo), as the feature is still in private preview.

/azp run

The breaking change is a false alarm as the operations are moved into another file.

/azp run

/azp run

/azp run

/azp run

/azp run

/azp run

/azp run


Hide merge commits from "changes since last review"

Like with the web view, changes from merge commits shouldn't be shown when viewing changes since the last review.

I would like to see this too. Whenever changes from main are merged into a current working branch, those changes then become noise within the view "Changes since last review." The PR Extension is unusable then. Because I don't want to use "review all changes" because I don't want to keep re-reviewing code changes I've already seen.

Yes, it's a pity that there is no such checkbox, it would be very convenient. I hope this will be added to github someday

Totally agree, that would be amazing to have such ability.


Rebuild packages from conda-build break

The following package was still broken from the conda-build kerfluffle.

deepchem

The following package could not build due to other conda related problems:

parmed

MD5 Mismatch, the tarball on GitHub changed its MD5 signature.
If a new version is cut, the MD5 will be updated and wont be an issue.
If we have to rebuild the current version this will be a problem.
cc @swail package maintainer in case this is important.

All other packages were able to conda build without the placeholder length error. There were a few that could not build due to various other errors that seem to be program specific, and not related to the conda problems.
Its worth noting that the nightli.es would never have caught this since it does not actually try rebuilding packages unless the version or build number is incremented.

Apparently I am still missing some packages. I'll keep updating them as I find them

Tagging @rbharath re deepchem.
Can we just copy the openbabel package to the omnia channel?

Can we just copy the openbabel package to the omnia channel?

Do they support centos 5 :)

Do they support centos 5 :)

Oof, good point.

Is DeepChem now building without problems? The version on here is a ways behind HEAD, so I'll probably be making a version bump soon so we update the package on here as well.
For DeepChem purposes, should be fine to just use Anaconda openbabel.

Is DeepChem now building without problems?

Nope. See https://github.com/omnia-md/conda-recipes/pull/679

Once the OpenBabel package has been rebuilt and pushed to the omnia channel, I'll restart the build for this one.

Okay. Slightly different problem. See #681

Odd. The linux builds seem to have issues fetching the tarbal from github, but the osx ones appear to be working correctly, I've restarted the job once already and am running it again just in case it was something odd with GithHub. Has anyone seen this before?

The unix builds work now, but the OSX builds do not because the 1.4GB CUDA files are taking too long to download from nvidia right now, causing travis to time out.

Go ahead and merge. I might be able to stage those files on S3


[PAPERCUT] Sw 16379/5.2/save record after row edit

Description
Please describe your pull request:

Why is it necessary?
What does it improve?
Does it have side effects?

Questions
Answers

BC breaks?
yes/no

Tests pass?
yes/no

Related tickets?
If this PR fixes an existing Issue ticket, please add its complete issue URL.

How to test?
Please describe how to best verify that this PR is correct.

Just for the record, this is a replacement for #772.


Multi input not work correctly on mobile

Expected Behavior
App can handle multi input fields, open keyboard on one press and hide on one press.
Current Behavior
Only one input can work. If create more than 1 input fields, keyboard will not open, HTML input have active when tap on it and typing not work correctly.
Possible Solution
I'm create each HTML input for every input component:
private _keyboard: HTMLInputElement;

// constructor
 this.on('pointertap', () => {
      this.activation = true;
      utils.isMobile.any && this.handleActivation(); // handleActivation always call before this function called.
});

if (utils.isMobile.any) {
            window.addEventListener('touchstart', () => this.handleActivation());
            this._keyboard = document.createElement('input');

            document.body.appendChild(this._keyboard);
            this._keyboard.setAttribute('id', 'v-keyboard' + Utils.shortUuidv4());

            this._keyboard.style.opacity = '0';
            this._keyboard.style.position = 'absolute'; // move out screen.
            this._keyboard.style.top = '-1000px';

            this._keyboard.oninput = () => {
                let value = this._keyboard.value;

                const maxLength = this.options.maxLength;

                if (maxLength && value.length > this.options.maxLength) {
                    value = value.substring(0, maxLength);
                    this._keyboard.value = value;
                }

                this.value = value;

                this.onChange.emit(this.value);
            };
        }
// constructor -- end

private _startEditing(): void {
    this.tick = 0;
    this.editing = true;
    this.placeholder.visible = false;
    this._cursor.alpha = 1;

    if (utils.isMobile.any) {
        this._keyboard.focus();
        this._keyboard.click();
        this._keyboard.value = this.value;
    }

    this.align();
}

private stopEditing(): void {
       // ...
    if (utils.isMobile.any) {
        this._keyboard?.blur();
    }

}

This how I fix it. Thanks for your time.
I'm not check on iOS device yet.
Steps to Reproduce
Create 2 or more input in one time.
Environment

version: 0.5.8

im also experiencing this while creating a PixiComponent using @pixi/react with Input component from this package, is it still not fixed yet in latest version?

@dwihp2 not fixed yet.

@hungluongkong, thanks for your effort.
Keep in mind that there was another issue with iPhone, if we are setting the input field alpha to 0, the keyboard will be shown and hidden instantly, so better to avoid setting it but just move it out of the screen.
@dwihp2, Doing a release with this fix now, will ping pixi/react devs to update it after my release.


Fix memory leak

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

v1.3.0
GitHub release

Your semantic-release bot :package::rocket:


[spike][React] Download a blob file

Generate a simple we that will generate a hello world file with docx and we will show a button (no need to be styled) that will download the file

The task consists in:
· Generate a "Hello World" in docx format, using this library (https://github.com/dolanmiu/docx).
· Download it using a button on the PC of the user.
IMPORTANT: The "Hello World" is generated directly in docx format, not needed to do a conversion from JSON to docx in this story.

Task done here (https://github.com/SergioGordillo/LemoncodeMasterFrontend/tree/main/TFM).


Parse pragma solidity version numbers

Many Solidity features depend on the version of the compiler. So, parse the version pragma and in another PR we will use this information.
This PR adds pragmas to the ast and we test it with a graphviz dot file.

@LucasSte @xermicus let me know if you're interested in reviewing this, else I will merge it

@LucasSte @xermicus let me know if you're interested in reviewing this, else I will merge it

I'm reviewing it.


[LIVY-666] [WIP] Support named interpreter groups

What changes were proposed in this pull request?
Currently, a session contains only one interpreter group. For a new REPL of the same type, a new session has to be created. In order to support use case of multiple REPLs attached to the same spark application with separate variable scoping (similar to scoped interpreter mode in Zeppelin: https://zeppelin.apache.org/docs/0.8.0/usage/interpreter/interpreter_binding_mode.html#scoped-mode), this change adds support for having multiple interpreter groups in a session. The interpreter group on which the execution has to done can be specified via the statement execution API.
The detailed proposal is on the Jira: https://issues.apache.org/jira/browse/LIVY-666
The changes are backward compatible.
How was this patch tested?
Tested manually on laptop by running Livy standalone. Tried running a few commands and verified the functionality.
Created a scala session:
curl -i -X POST -H "Content-Type: application/json" -d '{"name":"test", "kind":"scala"}' localhost:8998/sessions
curl localhost:8998/sessions/0/statements -X POST -H 'Content-Type: application/json' -d '{"code":"val a=5", "interpreterGroup":"g1"}'
curl localhost:8998/sessions/0/statements -X POST -H 'Content-Type: application/json' -d '{"code":"print(a)", "interpreterGroup":"g1"}'
prints 5
curl localhost:8998/sessions/0/statements -X POST -H 'Content-Type: application/json' -d '{"code":"print(a)", "interpreterGroup":"g2"}'
'a' is not defined
I have added a few unit tests but couldn't run those since other tests are failing. Verifying that the tests work as expected is in progress.

@jerryshao Please help reviewing this

@namanmishra91 thanks for your work, did you finish all your works?
@yiheng @runzhiwang would you please help to review, thanks.

Also have you tried multiple scala/python/R interpreters in one context?

Basic backend support and API modifications have been done as part of this PR. It will be good to modify/add few new APIs for better debuggability etc. as described in the proposal that are not included yet.
Should I add those as well in this PR itself? I thought that will make this PR huge and will be difficult to review. Hence I think its better to have a separate PR for enhancements on top of this.

@namanmishra91 thanks for your work, did you finish all your works?

Also have you tested multiple scala/python/R interpreters in one context?

As shown in proposal, this implementation supports only one interpreter for each type per context. Is there a use-case to have multiple interpreters of same type under one context?

The travis errors seem unrelated. I see "java.lang.OutOfMemoryError: GC overhead limit exceeded" in all the failed travis jobs. Is there a configuration that needs to be set?

@namanmishra91 hi, the travis error has not seen before, it maybe caused by this pr.

@runzhiwang Sure, looking into it.

Would this need some changes on Zeppelin too?
cc @zjffdu
Would this feature be useful outside of Zeppelin? (if yes, then perhaps "interpreter group" should be called as something more generic)
Thank you

Thanks @Tagar for ping me. I think this feature would be useful for Zeppelin. And you are right, the concept in livy here is different from Zeppelin. In Zeppelin one InterpreterGroup includes multiple sessions, while in Livy here one Session includes multiple InterpreterGroup. I am afraid it is difficult for 2 projects align concepts, but it may be fine as long as each project contributor what is the underlying difference. If anyone has another proper name to replace interpreter group, I would love to hear.

Do we need to change the Session recovery process?


Read serving data for CrossReferences method [phab:D651]

Created by schroederc at 2015-12-15 18:48:26:
This change implements a table reader for the serving data written by
#903.  The previous CrossReferences implementation (using multiple
recursive Nodes/Edges calls) has been moved to the storage/xrefs
package.

schroederc wrote at 2015-12-15 19:47:54:
Remove log line; fix NO_REFERENCES case

schroederc wrote at 2015-12-15 20:13:06:
Observe CrossReferencesRequest.anchor_text option

zarko commented inline (context lost during migration) at 2015-12-15 20:40:15:
The values that this can take should be defined somewhere in the schema.

zarko accepted this revision at 2015-12-15 20:40:15

schroederc closed via commit 42ed49eb77ee8c7e1ddfb7345ed66bf92250c8c2 at 2015-12-15 20:48:19


Fixed a syntax error

My first ever fix on github. I think I'm doing this right but I honestly have no idea.

[x ] I have read freeCodeCamp's contribution guidelines.
[x ] My pull request has a descriptive title (not a vague title like Update index.md)
[x? ] My pull request targets the master branch of freeCodeCamp.
[ x] None of my changes are plagiarized from another source without proper attribution.
[x ] All the files I changed are in the same world language (for example: only English changes, or only Chinese changes, etc.)
[x ] My changes do not use shortened URLs or affiliate links.

Closes #XXXXX

Why did you create an index2.md file?

@RavDevDad Why did you create an index2.md file? You should just update the existing index.md for this article. Also, while you are fixing the article, the Hint 1 needs to be changed also.

For some reason it wound't let me submit the change unless I changed the file name on top? The submit area was greyed out on the bottom. I'm sorry for the mess up.

Thank you for opening this pull request.
This is a standard message notifying you that we’ve reviewed your pull request and have decided not to merge it. We would welcome future pull requests from you.
We attempted to resolve the issue with your PR, but you deleted the branch or fork, so we were unable to push the changes back to your branch.   If you would still like to make the changes, please create a new PR.
Thank you and happy coding.


Fix all a11y tests (we use dev17 now)

After we switched to dev17, all of the a11y tests are failing now. Tests need some changes - especilly with the raw data - products' names, prices, etc

Might be fixed by @hackergil on the backend side


fix(env): dont track envs set by cargo in dep-info file

What does this PR try to resolve?
Don't track environment variables set by Cargo1 in Cargo's dep-info file.
This patch is quite hacky since the "set-by-Cargo" env vars are
hardcoded. However, not all environment variables set by Cargo are
statically known. To prevent the actual environment variables applied to
rustc invocation get out of sync from what we hard-code, a debug time
assertion is put to help discover missing environment variables earlier.
Fixes #14798
How should we test and review this PR?
A new test is added to show no rebuild triggered.
Try adding a random new env here and see if a debug build fails.

:umbrella: The latest upstream changes (presumably 69e595908e2c420e7f0d1be34e6c5b984c8cfb84) made this pull request unmergeable. Please resolve the merge conflicts.

Going to close this.

It is not good that a patch relying on debug assertions
We may want to track metadata by Cargo's dep-info file, insteado of manual track in fingerprint. https://github.com/rust-lang/cargo/pull/14811#discussion_r1880431940
CARGO_RUSTC_CURRENT_DIR has been removed. If other folks has bumped into the same situation of setting internal envs in [env] table, we can at least tell them it is not supported.

CARGO_RUSTC_CURRENT_DIR may come back because file! is being specified, see rust-lang/rust#134442


Re-structure georaster.py and move functions from xdem

These are two related issues:

Some features of xdem should be moved to geoutils since they are rather generic. This was brought up in xdem issue #157.
As discussed with @atedstone and @erikmannerfelt, the functions should be saved in georaster.py. But to avoid georaster to turn into a mess, the definition of the Raster class should be moved to a separate file (_raster.py is suggested).

Consequence: After the change, the Raster class will not be available via geoutils.georaster.Raster anymore, but only via geoutils.Raster.

To be done:

[ ] georaster.py to be replaced by georaster folder/submodule.
[ ] Add __init__.py
[ ] Move interpolate.py in from xdem
[ ] Move generic spatial tools in from xdem (probably in _.py type files)
[ ] Move Raster to _raster.py


[BUG] various code lines have ^^^^^^^^^^^ under them / timeout / pool / return self

I am not good with coding.
The program worked for months before this. I think these errors started with the chrome version changing from 112 to 114 through autoupdate. I dont know how to downgrade and dont really want to. I downloaded the 114 chromedriver to replace the 112 chromedriver in c\windows. I have selenium 3.14.1.
Please help!

Fixed with v3.0 #188


Table width is not honored

The attribute of width for table is not performed. Is this attribute not supported ?
[width="50%"]
|=======================
|Col 1|Col 2      |Col 3

|1    |Item 1     |a

|2    |Item 2     |b

|3    |Item 3     |c

|=======================

asciidoctor-pdf changes this adoc into this image.

It's not implemented yet in Asciidoctor PDF. I ran into the same problem
just yesterday. Thanks for reporting!

Thank you very much.
I tested using Asciidoctor PDF 1.5.0.alpha.9.
[.text-center]
.ほげほげ一覧
[width="50",cols="<1,^1,^1",options="header,strong"]
|=======================
|Col 1|Col 2      |Col 3
|1    |Item 1     |a
|2    |Item 2     |b
|3    |Item 3     |c
|=======================

ああああ

[.text-center]
.ほげほげ
[align="center",width="50",options="header"]
|=======================
|Col 1|Col 2      |Col 3
|1    |Item 1     |a
|2    |Item 2     |b
|3    |Item 3     |c
|4    |Item 4     |d
|=======================

asciidoctor-pdf changes this adoc into this image.The width of table is 50%!!!

Thanks for testing!!


Bundling JRE with Launch4j

On this page you claim that Launch4j can be used to bundle a JRE with your JAR file. However, after spending about an hour using the tool and Googling around, I've discovered this to be far from simple.
(For example, see here, here, and here).
The Launch4j tool lets you specify a relative "Bundled JRE Path", which sounds like a relative path within the jar file to the JRE. For example, within my jar I have included a folder "jre" which contains a complete JRE (v1.8.0_31). However, specifying "jre" as the path only tells Launch4j to look in the folder outside the jar, instead of looking within the jar as you would expect from the word "bundled". Copious stackoverflow posts confirm that this is an issue, and that others have combined Launch4j along with another install wrapper so they can include the JRE folder adjacent their jar file after the install. This way, Launch4j can find the JRE.
In short, this is neither desirable nor expected behavior: I want to include the entire JRE within my JAR, and point Launch4j into the jar file.
TL;DR Please provide a brief tutorial or a few pointers describing how to bundle a JRE within a JAR and point Launch4j to that JRE.
To confirm that you are actually using the desired JRE (not the system JRE and not the JRE in a local folder, but the actual JRE bundled within the jar), you should be able to view properties of the javaw process from Task Manager and see the path of the process is in some temporary extracted location, not in "Program Files.....".

Please give this a try: https://github.com/libgdx/packr
Feel free to patch up the Wiki page, it's editable by anyone.

Thanks for the quick response, will give it a try.


[Help] looking for image captioning model based on transformer

Hi, im looking for a image captioning model based on transformer. Does it exist in tensor2tensor?

I have the same question!

Just following up on this. It's definitely there (MSCoco is available as a dataset after all) and it was used for Conceptual Captions baselines. If anyone has an example training script though (for any dataset), that would be awesome.


Use admonitions in several pages

There were several places where the use of admonitions is still not applied; this greatly improves the guidance in the documentation.

The action (check-translation) is failing due to your repository permission not allowing writing, as discussed in other PRs

Add manually to test if the action works
'{"labels":["requires-translation-es","requires-translation-fr","requires-translation-it","requires-translation-ja","requires-translation-ko","requires-translation-pt-br","requires-translation-ru","requires-translation-sk","requires-translation-zh-cn","requires-translation-zh-tw"]}',

The action (check-translation) is failing due to your repository permission not allowing writing, as discussed in other PRs

The permissions of my repository don't affect anything in the PRs; the rules in this repository do. That's why in this PR (#1588) it works fine, because it was @crandmck who opened it.

Please resolve the merge conflicts and we can land this, thanks!

@crandmck done


Support for 3.73

Doesn't seem to work on 3.73. I imagine this is needing the offsets in the switch statement.
(Can you let me know how to find those offsets per version? I can test it if you like.)

I hacked the code to force the same offsets used in 3.65/3.68 for my 3.73. It works!
Not sure what the NID is so it can be added to the switch statement.... however maybe the logic should be to use those offsets UNLESS 3.60 is detected (then use the other offsets).

I hacked the code to force the same offsets used in 3.65/3.68 for my 3.73. It works!
Not sure what the NID is so it can be added to the switch statement.... however maybe the logic should be to use those offsets UNLESS 3.60 is detected (then use the other offsets).

Can you send me a modified file?

@czolgista1990 Yep. Download the suprx file from here
https://github.com/SaintSkeeta/vita-ps4linkcontrols/releases/download/r7a/ps4linkcontrols.suprx


Add rudimentary Jinja2 template tag support

The following tags and filters are supported at this point. More may be added as they are required:

wagtailcore:

pageurl()
slugurl()
wagtail_version()
|pageurl

wagtailimages:

image()

Django template tags have been translated to Jinja functions, rather than custom tags. Functions are easier to use compared to template tags, and can be composed and combined for greater flexibility.
The template tag libraries have been grouped as Jinja Extensions, which are loadable via the extensions option. An example Django Jinja2 configuration is:
TEMPLATES = [
    # ...
    {
        'BACKEND': 'django.template.backends.jinja2.Jinja2',
        'APP_DIRS': True,
        'OPTIONS': {
            'extensions': [
                'wagtail.wagtailcore.templatetags.jinja2.core',
                'wagtail.wagtailimages.templatetags.jinja2.images',
            ],
        },
    },
]

Inspired by https://github.com/minervaproject/wagtail-jinja2/

@timheap Nice work, the functions are indeed way easier to implement/understand/maintain so I think it's a good strategy. After using wagtail+jinja for a week now, here is the list of things to consider in my opinion:

wagtailuserbar function: It will probably require to add a settings to override the [default template] (https://github.com/torchbox/wagtail/blob/master/wagtail/wagtailadmin/templatetags/wagtailuserbar.py#L47) and create a new template wagtailadmin/templates/wagtailadmin/userbar/frame_jinja.html to have a jinja version of https://github.com/torchbox/wagtail/blob/master/wagtail/wagtailadmin/templates/wagtailadmin/userbar/frame.html
A way to render the blocks and richtext fields as safe html: Right now, in order to render blocks with the proper context and the html fields, I had to implement the following tags:

from django_jinja import library
import jinja2

@library.global_function
@jinja2.contextfunction
def render_stream_child(context, stream_child):
    # Use the django_jinja to get the template content based on its name
    template = get_template(stream_child.block.meta.template)
    # Create a new context based on the current one as we can't edit it directly
    new_context = context.get_all()
    # Add the value on the context (value is the keyword chosen by wagtail for the blocks context)
    new_context['value'] = stream_child.value
    # Render the template with the context
    html = template.render(context=new_context)
    # Return the rendered template as safe html
    return jinja2.Markup(html)

@library.global_function
@jinja2.contextfunction
def render_html(context, html):
    return jinja2.Markup(html)

...
{% for stream_child in page.body %} {# body is a StreamField #}
    {{ render_stream_child(stream_child) }}
{% endfor %}

{{ render_html(page.rich_text) }}
...

For the richtextfield, I tried using the safe filter, the same way we were doing it for django but it was raising ascii exceptions. The block rendering implementation is a bit more tricky and it will probably need some refactoring to get the current context and extend it, as oppose to just defining a context with self and value.

@arthurio: The |richtext filter I've added works fine for me, including on non-ascii content. I am about to test StreamFields, but they should hopefully just work.
I just added the wagtailuserbar() function, which completes the set of front end template tags. I have the following template to test things with, all of which works in the expected manner:
<!DOCTYPE html>

<meta charset="utf-8">

<title>{{ page.title }}</title>

{{ wagtailuserbar() }}

{{ page.title }}

Rich text using |richtext

{{ page.body|richtext }}

Image using image()

{{ image(page.image, "width-200") }}

Links

Link to pageurl(page.link)
Link to slugurl("about")

wagtailuserbar()

Should be up there ↗

Documentation has been added! Feedback is welcome.
Is everyone happy with the organisation of the Jinja extensions in wagtail.wagtailapp.templatetags.jinja2.name? The path is quite long, but it does mean that all the template tag code is kept in the same location. You only have to add the extensions once in your settings, so a long import path probably is not a problem.

Also: Following the discussion in #1571, there was some support for changing the use of self in templates to be page/value/field_panel through out the documentation, in order to present a consistent template experience for both Django and Jinja templates. Is that worth discussing in this PR, or should that discussion wait for another time?

Fixed the typos that @tomdyson found. Thanks!

It all looks good to me, and I'm happy with the organisation of the extensions. Great work, @timheap!
I think we should continue the  self -> page/value/field_panel discussion here, or it risks getting lost in the merged #1571 PR. Last time @gasman voted for

Put a note in a conspicuous place saying "Use self in Django templates, but use page in Jinja"

but now that we are offering full support for Jinja2, perhaps we should upgrade this to

Rewrite all the documentation to use the new page variable, so the documentation works for both template languages

or, as a middle way, include a warning in our conspicuous note that the self -> page change is coming in 1.3.

I was looking for some tests to copy for the Jinja template tags, and I couldnt find much! It seems the |richtext filter does not actually have a test. The various components of it do, but not the filter being used in an actual template. I'll add some for Jinja at least.

Have some tests. This is the last bit of work for this pull request. If the tests all pass, and there is no more feedback, then this PR is complete.

@timheap I made the comments about wagtailuserbar because I thought you were doing the full jinja support (admin side as well), but if it's just for the front-end then disregard. Last thing, were you able to test that the context was the same in the page and in the blocks? If not, I can try to reproduce with your PR and write some tests.

I'll add some tests for stream fields shortly. Just so there is no confusion about the expected contents of a StreamField template context, @gasman explains why the StreamField template context can not inherit from the context of the page it is being rendered in: https://groups.google.com/d/msg/wagtail/3BkKoKqTqeM/GOrgBfRPBgAJ

I added the __html__ method to StreamValues, so they play nicely with autoescaping in Jinja templates: http://jinja.pocoo.org/docs/dev/api/#jinja2.Markup. Now you can just write {{ page.stream_field }} in your Jinja template and it will not be escaped.
Using Jinja templates to render a Block with the template Meta attribute works without any modifications, and successfully renders blocks using the value context variable:
class ImageBlock(blocks.StructBlock):
    image = ImageChooserBlock()
    caption = blocks.TextBlock()

    class Meta:
        template = 'blocks/image.html'

{# app/jinja2/blocks/image.html #}

    {{ image(value.image, "width-100") }}

{{ value.caption }}

Tested this both with a new project and started porting an exising one, no issues to report. Great work @timheap!

omg this is just what i was looking for


controlMetricsGoroutineCount

What this PR does / why we need it:
controlMetricsGoroutineCount
If yes, write the release branches name in the below format and submit the related cherry-pick PR:

release/3.9

cc @ioito

/lgtm


Typo in readme

Add volto-accordion-block to your Volto project

thanks!
https://github.com/mbarde/volto-fullcalendar-block/commit/a131e83bb66a2fc60bcd1305f0d01a519c8b948b


⚠ GitLab Server has degraded performance

In fd0eaf2, GitLab Server (https://gitlab01.its-telekom.eu) experienced degraded performance:

HTTP code: 200
Response time: 6156 ms

Resolved: GitLab Server performance has improved in 61f17bf.


Better instructions for using defaults

I've been trying to get defaults to work, but so far i cant seem to get it working the way i would like to.
My default.toml file is just
[linux] [linux.installs] cmd: sudo pacman --needed --noconfirm -S {{ name }}
But how do i actually get a dot for a particular application to use it?
Assuming i just want to install something, without any other actions (no linking etc.)
Do i just put in an empty file in the respective folder, or do i put something in it?

Hey,
yes just putting an empty vscode/dot.toml file in the dotfiles repository it should run the command sudo pacman --needed --noconfirm -S vscode.
I'll try to clarify that in the docs :)
BTW when using toml you don't need the [linux] header just [linux.installs] is enough.


Social media links

We need to setup social media presences and get them linked to in the footer. I would suggest:

Github
Facebook
Twitter

At a minimum. We can decide on more as the need grows.
Once the accounts are made, we set up links in https://github.com/NextGen-Coop/ngc-website/blob/a1ac3fa191254b092941cf434878ff3db23688ea/_includes/social.html#L1 and names in https://github.com/NextGen-Coop/ngc-website/blob/a1ac3fa191254b092941cf434878ff3db23688ea/_config.yml#L22

Can you assign me this issue?

Can you assign me this issue?

Hi @aditya28sarin
While I appreciate your offer, this repo is intended for members of our cooperative to build and learn things for our public website.  We're still in the startup phase, so I'm unsure if we are legally able to pursue offshore team members.  I will check the possibility though, and if so you are welcome to join our cooperative.

Hi @aditya28sarin
While I appreciate your offer, this repo is intended for members of our cooperative to build and learn things for our public website.  We're still in the startup phase, so I'm unsure if we are legally able to pursue offshore team members.  I will check the possibility though, and if so you are welcome to join our cooperative.


The default run images MUST be encoded in the builder and not in the pack CLI config

New config.toml:
default-stack-id = "io.buildpacks.stacks.bionic"

[[stacks]]
  id = "io.buildpacks.stacks.bionic"
  build-image = "packs/build"
  run-images = ["packs/run", "gcr.io/packs/run"]

[[builders]]
  image = "packs/sample"
  run-images = ["example.com/packs1/run", "example.com/packs2/run", "gcr.io/packs2/run",]

Need new command:
pack configure-builder <builder> -r example.com/packs1/run -r example.com/packs2/run

NOTE: this replaces the run image list every time
For pack inspect-builder:
...
Run images:
  example.com/packs1/run (local)
  example.com/packs2/run (local)
  gcr.io/packs2/run (local)
  packs/run
  gcr.io/packs/run

Notes

The stacks list in config.toml MUST only be used in pack create-builder, and not in pack build.
The builders list in config.toml MUST only be used in pack build (or pack inspect-builder), and not in pack create-builder.
-r is option, no -r flags means no run images. No configuration removes the entry for the builder in config.toml.
The final list, searched in order, would be:
["example.com/packs1/run", "example.com/packs2/run", "gcr.io/packs2/run", "packs/run", "gcr.io/packs/run"]

Acceptance Criteria
Given The above config.toml file without the builders section
When I run pack build gcr.io/user/myapp --builder packs/sample
Then gcr.io/packs/run is used to export the final image
Given The above config.toml file with the builders section
When I run pack build gcr.io/user/myapp --builder packs/sample
Then gcr.io/packs2/run is used to export the final image
Given The above config.toml file with the builders section
When I run pack build example.com/user/myapp --builder packs/sample
Then example.com/packs1/run is used to export the final image

A couple of questions:

How would users remove the set of override run images for a builder? A new command?
Should we provide a way to list the set of builders that have overrides?

Updated OP.

How we think we will work through this:

[ ] update create-builder to add current stack's run images to builder metadata
[ ] add inspect-builder to list run images baked into builder
[ ] add configure-builder to update config.toml with run images for builder
[ ] updated inspect-builder to list run images from config.toml for builder


fix(console): use apb clock source for uart when power management is disabled (IDFGH-6952)

Console sets UART clock source to REF_TICK on ESP32 and ESP32S2 by default, however, APB clock frequency does not change when power management is disabled. Using APB clock source allows higher baud rates for UART console.
Related issues: #5450 #7583

Relates to PR #3402

Thanks for your contribution.

sha=f86dd8892c3b8c2348418102092359635d2c4f99

@suda-morris


Docs: post cleanup bugfixes

Summary
Clean up issues that resulted from the doc's style update and were found in the following weeks:

[x] Sidebar clips off the bottom items, on certain browsers, after scrolling
[x] Search button isn't properly centered on certain browsers
[x] Fix search box text getting clipped on mobile

Checklist

[x] If code changes were made, then they have been tested

[x] I have updated the documentation to reflect the changes
[x] I have formatted the code properly by running task lint or pre-commit run --all-files

[x] This PR fixes an issue
[ ] This PR adds something new (e.g. new method or parameters)
[ ] This PR is a breaking change (e.g. methods or parameters removed/renamed)
[x] This PR is not a code change (e.g. documentation, README, ...)

Nobody saw that.


Use a stable sort algorithm

Hi!
Array.prototype.sort() is NOT stable... https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort :cry:
That is causing unexpected results when sorting... Luckily we can use _.sortBy() instead! https://lodash.com/docs#sortBy :smile:
It's ok for you to make the switch?
Thanks!

Sure! PR is welcome.

Ok! Working on it :)

@bebraw I've just launched npm test (without making any change) and I get:

:confused:

@nuragic That's something Jest related likely... I nuked my deps and reinstalled them and the tests worked for me. I suppose that's one more reason to drop Jest from this project.
Can you try to replace the sorting function with this?
var sortBy = require('lodash').sortBy;

var sort = (data, column) => {
    if(!column) {
        return data;
    }

    var property = column.property;

    var ret = sortBy(data.concat(), (o) => o[property]);

    if(column.sort < 0) {
        ret.reverse();
    }

    return ret;
};

If this works well for you, we can go with it.

I've seen that error before and I think it has to do with the version of node and jest. I don't think it's compatible with 13 yet.

@bebraw I have a simpler one, basically:
_.sortByOrder(data, [property], [column.sort]);

I'll push it today if I'm able to solve that weird jest error...
P.S. multi-column ordering would be very nice to have later :)

@nuragic Ah, cool! That should be more effective too. :)
I agree on multi-column ordering. I wonder if that's possible with the current setup.

Implemented in 0.6.5 (currently in beta).


[List builder]

What package is this for?

[X] React
[ ] Angular

Summary
IBM Maximo MRO Inventory Optimization will shortly require the List builder component as specified in the design https://pages.github.ibm.com/ai-applications/design/components/listbuilder/overview/
Specific timeline issues / requests
We would like to be able to start using this component in April.
You will consider this component complete when...

[X] It's available as an export of this library
[ ] Additional criteria you may have [e.g. Fully responsive, Accessible to
WCAG 2.0, etc.]

Available extra resources
It's possible that our team can help to implement this component,

@stulscott - can you please further elaborate the requirements here?
Would something like the select user modal work: https://next.carbon-addons-iot-react.com/?path=/story/watson-iot-selectusersmodal--default-modal?

Hi @katedraper, yes that looks just like the List builder. I'll check it out. It might be suitable. Thanks!

We will need to export this component. I will convert this issue in order to do so


Slower than TF?

I'm testing the speed-up of ResNet on TF and PyTorch.
In TF, typically it can converge within 80k steps, which is 80k batches, and when we set batch-size=128, that should be around ~205 epochs in PyTorch.
One interesting thing is, in TF I can finish 80k steps in about 6 hours. But in PyTorch, running 200 epochs took me around 13 hours. And this will expand to around 20 hours if I want to test 300 epochs.
I thought PyTorch should be much faster than TF. Does anyone knows the solution to this? BTW. I'm using ec2 g2.2xlarge.
Here is the ResNet20 TF implementation

This is interesting. Do you have per-epoch timings? That would be easier to compare I think.

@TheShadow29 Thanks for replying.
I noticed the author has been updating this repo. One thing I didn't try before is using cudnn.benchmark = True, which helps a lot.
Besides this may somehow relate to the machine. I have two gpu card in my local machine, and using the latest version it took ~20 s/epoch on 1080 and ~90 s/epoch on K40. I guess the one I tested before is also affected by this. (ec2 instance sometimes can be a little slow)

One thing I didn't try before is using cudnn.benchmark = True, which helps a lot.

Woah, I din't know that. I am slightly unfamiliar with ec2 instances. Does g2.2xlarge have one K40? Also, which Resnet are you using on Pytorch (Resnet18/34)? I am currently trying a mobile net implementation (https://github.com/TheShadow29/pyt-mobilenet). I will try to play with the resnet models as well and update the results.


Fix include of malloc_hook_c.h in malloc_hook.h

malloc_hook.h includes malloc_hook_c.h as <gperftools/malloc_hook_c.h>.
This requires the compiler to have designated src/ as a standard
include directory (-I), which may not always be the case.
Instead, include it as "malloc_hook_c.h", which will search in the same
directory first. This will always work, regardless of whether src/ was
designated a standard include directory.

I don't think I agree with your logic about src/ but merged anyways since It won't hurt.

Thanks for contribution btw.
And I'm curious about your use-case and what was broken for you. Feel free to elaborate.

See here:
https://codereview.chromium.org/1607303002/diff/80001/base/allocator/allocator_extension.cc
In the Chromium code, there is a copy of gperftools under
src/third_party/tcmalloc/chromium/. Its include files under gperftools/ are
included by other modules in the codebase using the full path shown in the
patch above.
When I attempted to include malloc_hook.h, I got that file not found
message about <gperftools/malloc_hook_c.h>.
On Fri, Jan 29, 2016 at 11:54 PM, Aliaksey Kandratsenka (aka Aliaksei
Kandratsenka<EMAIL_ADDRESS>wrote:

Thanks for contribution btw.
And I'm curious about your use-case and what was broken for you. Feel free
to elaborate.
—
Reply to this email directly or view it on GitHub
https://github.com/gperftools/gperftools/pull/766#issuecomment-177096975
.

Thanks.


Tracking with js-aruco on HoloJS

Hello,
I'm trying to do tracking with the js-aruco library using the RGB camera.
The goal is to place a simple 3D cube on a tag in the HoloJS world.
I have some problems with the registration, there is always a shift with the 3D object.
The world of the RGB camera is the same as the HolographicCamera in ThreeJS?
Someone already had this kind of problem? Or someone ever done tracking on HoloJS? :sweat_smile:
Here a small example
let frame = new Image();
let detector = new AR.Detector();
let tagSize = 0.52; // tag size, mm in aruco, m in HoloJS
let cube = new THREE.Mesh( new THREE.BoxBufferGeometry( tagSize, tagSize, tagSize ), new THREE.MeshNormalMaterial() );

frame.onload = function () {
    let canvas = document.createElement('canvas');
    canvas.width = frame.width;
    canvas.height = frame.height;
    let ctx = canvas.getContext('2d');
    ctx.drawImage(frame, 0, 0);
    let imageData = ctx.getImageData(0, 0, frame.width, frame.height);
    // detect markers
    detectTag(imageData);
}
frame.src = "camera://local/default";

function detectTag(imageData) {
    let markers = detector.detect(imageData);
    if (markers.length > 0) {
        let posit = new POS.Posit(modelSize, canvas.width);
        let corners = markers[0].corners;
        // corners must be centered on canvas
        for (var i = 0; i < corners.length; ++i) {
            corner = corners[i];
            corner.x = corner.x - (imageData.width / 2);
            corner.y = (imageData.height / 2) - corner.y;
        }
        let pose = posit.pose(corners);
        let rotation = pose.bestRotation
        let translation = pose.bestTranslation
        updateCube(rotation, translation);
    }
}

function updateCube(rotation, translation){
    cube.rotation.x = -Math.asin(-rotation[1][2]);
    cube.rotation.y = -Math.atan2(rotation[0][2], rotation[2][2]);
    cube.rotation.z = Math.atan2(rotation[1][0], rotation[1][1]);
    cube.position.x = translation[0];
    cube.position.y = translation[1];
    cube.position.z = -translation[2];
    cube.updateMatrix();
    cube.applyMatrix(camera.matrixWorld);
    cube.updateMatrix();
}

When extracting the 3D coordinates from a photo, where does js-aruco place the origin of the coordinate system? For HoloJS, (0,0,0) in your scene is actually 2 meters in front of you:
WorldOriginRelativePosition = float3(0, 0, -2);
Try changing it to (0,0,0) to bring the scene origin roughly to the same position as the RGB camera and you might have better alignment.
Another possibility is that the 3D coordinates extracted from the photo by js-aruco do no match HoloLens's world tracking system.

When extracting the 3D coordinates from a photo, where does js-aruco place the origin of the coordinate system? For HoloJS, (0,0,0) in your scene is actually 2 meters in front of you:
WorldOriginRelativePosition = float3(0, 0, -2);
Try changing it to (0,0,0) to bring the scene origin roughly to the same position as the RGB camera and you might have better alignment.
Another possibility is that the 3D coordinates extracted from the photo by js-aruco do no match HoloLens's world tracking system.

WorldOriginRelativePosition   How did you get it


WiP Separate the scalalib from the Scala.js library.

See https://github.com/scala/improvement-proposals/pull/54
For now this is only the first step: applying the IR cleaner to the scalalib so that it does not refer to the Scala.js library anymore. It is still bundled in the same artifact.
I identified two annoying things:

We have to abandon the Scala.js-specific optimization of mutable.Buffer. Not sure how much good that did.
We have to disable the optimization of Scala varargs using a js.Array-based seq.

Other than that, it is a bit of copy-paste, but not too bad.
@gzm0 Opinions on how this looks so far?

I agree with you overall assessment of what is problematic. Do we have any chance of benchmarking whether it matters?

For vararg optimization I guess it's only a code size concern.
For mutable.Buffer maybe some performance benchmarking would be nice :-/

For vararg optimization I guess it's only a code size concern.

Paradoxically, it improves code size in 2.12 (but worsens it in 2.13). Less things can be inlined as local loops because of that change. IMO it's more for performance: js.ArrayWrapper is a lighter wrapper than ArrayOps (which is a wrapper over an Array, itself a wrapper on a JS Array).

For mutable.Buffer maybe some performance benchmarking would be nice :-/

Yes, but we never had any benchmarks for that. scalajs-benchmark has benchmarks for immutable collections only. mutable.Buffer in particular is a bit weird because we decided to (hopefully) optimize it based on a "it would be nice". If it happened today, I don't think we would make that change like that.

Paradoxically, it improves code size in 2.12 (but worsens it in 2.13). Less things can be inlined as local loops because of that change. IMO it's more for performance: js.ArrayWrapper is a lighter wrapper than ArrayOps (which is a wrapper over an Array, itself a wrapper on a JS Array).

Feels like we should make scala.Array @inline :)

scala.Array is magic. It doesn't exist as a class in the IR. But we might want to virtualize ArrayValues nodes in the optimizer in the same way that we virtualize JSArray nodes.


Add entries for GCC High and DoD

Please add lines to the table for GCC High and DoD like the below in section 'Connect to Exchange Online PowerShell by using MFA':
Office 365 offering ConnectionUri parameter value AzureADAuthorizationEndPointUri parameter value
Office 365 Not used Not used
Office 365 Germany https://outlook.office.de/PowerShell-LiveID https://login.microsoftonline.de/common
Office 365 GCC High https://outlook.office365.us/powershell-liveid https://login.microsoftonline.us/common
Office 365 DoD https://webmail.apps.mil/powershell-liveid https://login.microsoftonline.us/common

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

ID: 65e527db-a4c2-782e-5a5f-ad8b3159a977
Version Independent ID: f2de1272-5e37-c59f-fcb9-34fa66b0d268
Content: Connect to Exchange Online PowerShell using multi-factor authentication
Content Source: exchange/docs-conceptual/exchange-online/connect-to-exchange-online-powershell/mfa-connect-to-exchange-online-powershell.md
Service: exchange-online
GitHub Login: @chrisda
Microsoft Alias: chrisda

@officedocsbot assign @yogkumgit

@kerbos, OK. Done. Thanks for the feedback.


Adding Aspect Fit/Fill to Image Resizing Processor

Hi @onevcat!
Thanks for this awesome library! It's really impressive! :)
I was playing with the ResizingImageProcessor in my app to resize images preload in a UITableView, and there were 2 resizing modes I was looking to use:

Aspect fit: where the image stays at the same aspect ratio, but it scaled down to completely fit inside `targetSize.
Aspect fill: where the image is kept at the same ratio, but scaled to fill the bounds of targetSize, with the outlying edges getting cropped.

I'd be happy to volunteer to add these. If you'd like that, would it be worth extending ResizingImageProcessor, or making them separate structs?
Thanks!

Hi, thanks for considering contributing!
That's great if you could implement it! I think just extending the ResizingImageProcessor to contains additional properties would be a totally fine and better way.
Since it should not be a breaking change, so please add this as an option and keep current implementation for default using. Currently, the input size will be respected without aspect fitting or filling. So I guess just add an enum in the ResizingImageProcessor to indicate the resizing strategy might be a good idea. I suggest an interface like:
struct ResizingImageProcessor {
    enum ContentMode {
        case none // This will be the default one
        case aspectFit
        case aspectFill
    }

    init(targetSize: CGSize, mode: ContentMode = .none) { ... }
}

How do you think about it?

Hi @onevcat, @TimOliver,
I just had to implement this feature this morning for my project functional scope.
Would you like me to share and make the PR for this or @TimOliver do you want to implement this one ?
Let me know

👍  @Drusy It's great to hear that you are interested in it too. I'd like to receive a p-r from you!
However, since @TimOliver was earlier and might be still working on this, let's keep for a while to see Tim's comment now. :)

@onevcat of course, keep me updated :)

Hey @Drusy, and @onevcat! Thanks for that!
Oh cool! No, I hadn't started it yet. I'm on a deadline to ship an app this week, so I would have had to have started it next week at the earliest.
If you've already got an implementation, then by all means, don't let me stand in the way! :)

@TimOliver Great! Thank you.
@Drusy :)

added #599

@onevcat After reading @BrikerMan PR, I actually didn't know the existence of a such method func resize(to size: CGSize, for contentMode: UIViewContentMode) -> Image. If I would, I would probably have done the same.
Here is my PR #600 for this feature using your size proxy (no UIKit)

@TimOliver @BrikerMan @Drusy Thank you all! #600 was merged and I will prepare a release for it later today.
func resize(to size: CGSize, for contentMode: UIViewContentMode) -> Image is now a UIKit specified helper method and we could merge it to the general resize one with new ContentMode enum, to improve readability. That should be another story and maybe I could find some time later for it.

Awesome! Great work all! :D


[Move Prover] Allow specification that only certain functions may change certain state.

🚀 Feature Request
It would be helpful to have a feature where we can assert that function do not change certain state (or only change certain state).
Motivation
For safety of Move programs, it would be useful to be able to assert that only a few specific functions are allowed to change specific state.  An example is role based security, where we are currently specifying using three ideas: the role, the state being changed, and the functions that are allowed to change that state.  It is useful to have the third component to guard against someone accidentally (or maliciously) adding something to a function that makes an unauthorized state change.
This is currently implemented with a schema and applies, which is a bit ugly.  I imagine the syntax can be improved, and that the reasoning can be handled much more efficiently by combining approximate static analysis with SMT solving.
Pitch
I don't have a specific proposal for syntax.  One possibility would be to generalize modifies to work on symbolic path sets, which could use * to represent "any field on index".

An example is role based security, where we are currently specifying using three ideas: the role, the state being changed, and the functions that are allowed to change that state

In both traditional RBAC and our Diem variant, the function is actually not part of the spec. Typically, we want to say something like "only an account with TreasuryCompliance role can increase total_value". Refining this specification with the function(s) that can increase total_value feels like overspecification that will frustrate safe code evolution/refactoring (at least to me). For example, you might want to rename the function that increases total_value, or add a new function that still includes the role check, but (e.g.) emits a new event or checks some tier constraints.
Both of these are safe changes w.r.t the access control spec, yet both of them would require the programmer to change the function name(s) in the spec. By contrast, if the access control spec does not include function names, it does not need to be updated at all during these changes.
If you have the role-based specification without a function name, I don't think the scenario you describe where someone adds a malicious function that violates the spec is possible. Is there a different scenario where including the function name is useful?
I should add that I fully agree with the discomfort with the current apply scheme and would also like to see it replaced, but preferably not by another spec construct that also includes function names.

Responding to Sam's comment:  The use case for RBAC is arguable, although I don't the theory of RBAC necessarily captures all the safety considerations that we would like to take into account.
But I can make a more generic argument.  When specifying an API, it's perfectly absolutely necessary to specify the behavior of functions by name.  Of course, that causes some friction when you want to change an API, but we accept that.  A complete specification of functions would include the state they are NOT allowed to change, but there's no good way to do that without a lot adding a lot of quantified formulas to every function.
At some future point, we may want to specify APIs of library modules separately, and allow third parties to supply implementations of those APIs, with extensions (I'm thinking about something like Ethereum tokens here).  But we don't want the extensions to be able to perform privileged operations.
Perhaps another option would be to affirmatively specify the state that a function is allowed to change, so, if that state is not listed, it can't be changed.  That was the original semantics I had in mind for the "modifies" statement, but the version we have has different semantics.  The types that can be modified are derived automatically by analysis, and the "modifies" spec is used to limit changes to a particular address.

it's perfectly absolutely necessary to specify the behavior of functions by name.

I certainly agree that a specification has to be associated with each API function. But when does the grammar of the specification language need function names? A natural language description of an API might say something like "you must always call f before g"), but I imagine the spec would be alongs the lines of f() ensures P, g() requires P, where P is some predicate about state.

Perhaps another option would be to affirmatively specify the state that a function is allowed to change, so, if that state is not listed, it can't be changed.

Like this idea; it will force specifications to be (more) complete. This is similar to the way separation logic specs work, except without the need for explicit modifies. Because a separation logic formula must always describe the entire memory, a postcondition for function f looks like  * any(whereanyis.a predicate that describes any memory). This specification says thatfis not allowed to change any state except`, without any quantification.


[QA] Mac | Application Crashes or Stuck at Loading Screen When Teleporting to Meta GamiMall

Explorer Alpha build version:
v.04.0
Issue Description:
When attempting to teleport to the Meta GamiMall scene at coordinates (145, 60), the application either crashes or gets stuck at the loading screen at 60%, eventually returning the user to the starting scene without teleporting. After multiple attempts (at least 6), the scene finally loads successfully.
Steps to reproduce:

Launch the Explorer
Use the teleport command to go to Meta GamiMall at coordinates (145, 60).

Expected behavior:
The user should be able to teleport to the Meta GamiMall scene at coordinates (145, 60) without the application crashing or getting stuck at the loading screen.
Current behavior:
LOGS
https://github.com/decentraland/unity-explorer/assets/146741383/84441408-9ee9-45da-939c-3a3d6793f114
Platforms / OS:

[ ] Windows 11
[ ] Windows 10
[❌] Mac Sonoma
[ ] Mac (specify the version on Additional Notes)

Additional Notes:
Macbook M1 Pro Sonoma 14.5

it's duplicate of https://github.com/decentraland/unity-explorer/issues/1236


NIFI-9079: Set log level to WARN for Apache Atlas client logs

https://issues.apache.org/jira/browse/NIFI-9079
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes:

[x] Is there a JIRA ticket associated with this PR? Is it referenced
in the commit message?

[x] Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.

[ ] Has your PR been rebased against the latest commit within the target branch (typically main)?

[x] Is your initial contribution a single, squashed commit? Additional commits in response to PR reviewer feedback should be made on this branch and pushed to allow change tracking. Do not squash or use --force when pushing to allow for clean monitoring of changes.

For code changes:

[ ] Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder?
[ ] Have you written or updated unit tests to verify your changes?
[ ] Have you verified that the full build is successful on JDK 8?
[ ] Have you verified that the full build is successful on JDK 11?
[ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
[ ] If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly?
[ ] If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly?
[ ] If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties?

For documentation related changes:

[ ] Have you ensured that format looks appropriate for the output in which it is rendered?

Note:
Please ensure that once the PR is submitted, you check GitHub Actions CI for build issues and submit an update to your PR as soon as possible.

Thanks @turcsanyip for the improvement and @pvillard31 for the review. Merging to main.


Check if video is stored locally or not before saving transcodes

Fixes https://github.com/neon-jungle/wagtail-videos/issues/106 and https://github.com/neon-jungle/wagtail-videos/issues/65
Transcoding will now check if the file is stored using Django's Storage.
If so it will use its URL instead of its absolute path.

Created this PR as https://github.com/neon-jungle/wagtail-videos/pull/107 was not updated


Can CommentList and render add to the Draw?

What problem does this feature solve?
Now the commentList is in Main.ts, Can it be used as a property of Draw.ts and render in Draw?
What does the proposed API look like?
interface IComment {
id: string
content: string
userName: string
rangeText: string
createdDate: string
}
export interface IEditorData {
header?: IElement[]
main: IElement[]
footer?: IElement[]
comm?: IComment[]
}

The comment feature is only implemented using the internal API of the editor and is not related to the core layer of the editor. Just refer to the demo and implement it yourself


setup bootstrap-react

Naming Rules
Name your PR like this:
Description
React bootstrap installed on the terminal
Related to
Fixes #1
Checklist:

[ ] My code follows the style guidelines of this project
[ ] I have carefully reviewed my own code
[ ] I have commented on my code
[ ] I have updated any documentation

The description of the PR contains a lot of unecessary info from the template. I think the template is more of a guide than a template, meaning.

The Naming rules sections refers strictly to the PR name and doesn't need to appear in the description.
The checklist if for the author of the code to go thorugh and make sure the 4 criteria are met, again no need to be included in the actual PR
Seems like the issue linking using the # works with github Issues which we don't use at the moment, so I'd suggest just pasting the link of the board ticket you are addressing.


TorchSharp models exhibit higher loss than identical PyTorch models during training

I'm working on an F# port of Andrej Karpathy's minGPT from PyTorch to TorchSharp. The port (called MinGptSharp) is intended to match the original version as closely as possible, but I've noticed the resulting models perform worse than identical models built with minGPT. To be specific, the training loss for a TorchSharp/MinGptSharp model is significantly higher than the loss for the corresponding PyTorch/minGPT model after the same number of iterations. For example, for identicial character-level language models (original, port) trained on Tiny Shakespeare, the PyTorch version has a training loss of 1.99580 after 500 iterations, while the corresponding TorchSharp model has a training loss of 2.42897.
It's entirely possible that I made mistakes in porting the code to F# and TorchSharp, but I've spent multiple hours stepping through both models side-by-side, and can find no discrepancies. To debug the problem, I switched to a simpler project that sorts numbers (original, port), and carefully tweaked both versions so they were totally deterministic: both had the same random seed, training data, and initial weights. After the initial forward pass, both models produced identical logits and loss, down to the last decimal digit. However, after a few iterations, the models began to diverge, with the PyTorch model always having a smaller loss. I suspect the divergence occurs either during back-propagation (loss.backward()) or optimizer descent (optimizer.step()), but I haven't been able to nail it down exactly.
Other possible differences I've considered include:

Package versions. I'm using version 2.0.1 of PyTorch and version 0.100.4 of TorchSharp. It's hard to see how this could lead to the differences I'm seeing, though. The GPT models I'm running should behave essentially the same on any underlying version of LibTorch.
Optimizers. I tried switching to a different optimizer, but the problem persisted.
Data loaders. I configured both loaders to be deterministic in order to eliminate them as a possible difference. I also tried running both loaders with shuffling enabled, which produces better results, but the TorchSharp model is still worse.
CPU vs. CUDA. I configured both versions to run on GPU only, in order to eliminate CUDA as a source of error.
Rounding errors. Both versions use LibTorch on the same hardware and operating system (Windows 11), so should exhibit the same rounding behavior (as evidenced by the identical loss and logits of the first forward pass through the model).

I understand that this might not be a TorchSharp issue, per se, but I'm posting it here in case anyone has any ideas. For me, it's a showstopper at the moment, so I'd certainly appreciate guidance. I will continue investigating and will update this issue if I find anything. Thanks.

I had one for a while now and I believe it did not have major differences in loss. You can use it as a sanity check to validate if the issue is somehow with PyTorch or with your implementation: https://github.com/losttech/Torch.MinGPT
I noticed you have your own BPE implementation (mine does not, would love to see your BPE as a NuGet package). Could it be the source of the difference?

Thank you, I will check that out.
My BPE is a port of the one in Karpathy's repos, but it turns out that none of his code actually uses it, so I haven't had a chance to use mine either. (The language model that has this problem uses character-level encoding, so BPE isn't needed.)

Quick update for anyone who might be interested in this: I have confirmed that the gradients are different after the first backward pass, even though the loss and all the parameters are identical between the two models.

 Calling model.zero_grad() doesn't seem to work. I switched to optimizer.zero_grad() instead, and the outputs are not the same. I'm going to close this issue and open another one with a simple repro example.

.


update docs so that instructions for manually creating a DigitalOcean Droplet are within the developer docs

Migrated from GitLab: https://gitlab.com/meltano/meltano/-/issues/1738
Originally created by @dmor on 2020-02-13 22:53:05

Orphaned page found here:
https://www.meltano.com/tutorials/manual-digitalocean-droplet.html#logging-into-your-droplet

View 2 previous comments from the original issue on GitLab


Support for isodep contactless cards

Hello,
Thanks for this library.
Does this library support isodep and iso 14443 type A cards, for example desfire cards
And for example  mifare ultralight cards? Support read write these cards?

I have no idea as I don’t own those.


[Possible bug] CORS operation respect, support client url (same as location.hostnome)

There seems to be an issue on configurations where webui operates behind NAT. Reproduce.

Bring up st2web under vagrant. Required vagrant config is:
config.vm.network "forwarded_port", guest: 80, host: 8080
config.vm.network "forwarded_port", guest: 443, host: 8443

Network mode should be NAT (forward), not bridged!

Connect to https://localhost:8443 on the host node and try to login with console open. Requests do not regard correct proto+hostname part which is https://localhost, but it actually should be equal to the one on client side (location.hostname or whatever). So for example /auth/tokens method of course fail.
Request URL:https://localhost/auth/tokens
Request Headers
Provisional headers are shown
Access-Control-Request-Headers:accept, authorization
Access-Control-Request-Method:POST
Origin:https://localhost:8443
Referer:https://localhost:8443/
User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/48.0.2564.82 Chrome/48.0.2564.82 Safari/537.36

However config.js can not be used to change the paths for these kind of requests (client-side), because server side requests are relative to the server (where endpoints can be reached as https://localhost/smth or whatever is in config.js) at the same point client side requests should not use the same endpoint address, but rather use hostname part available from the client.
cc: @enykeev

I had very hard time understanding the point of this issue when if was initially filled and the time didn't help either.
As far as I can tell, CORS behaves correctly in this case. Thing you need to keep in mind when dealing with the CORS is that it it revolves around what browser perceive as Origin, not the server. If you type https://localhost:8443/ in browser address bar, this is what origin is going to be no matter how many different proxies you have in between. Also, keep in mind that origin is not proto+hostname, but proto+hostname+port.
Going to close it for now considering this doesn't look like a bug to me. Feel free to reopen.


prevent some bound variables from appearing in fold zeros

I'm introducing a construct where a new name is bound before a let-fold:
feature salary ~> group fold (k, foo) = (group date ~> count) ~> let fold s = 42 : foo + s ~> s

But if the user uses foo instead of 42 in the foldZero:
feature salary ~> group fold (k, foo) = (group date ~> count) ~> let fold s = foo : foo + s ~> s

This is syntactically ok and type correct, but I'm not sure what the semantics should be. The generated Core isn't well-typed because foo is mentioned where it's not in scope.
I saw this happening because the inliner inlines functions like sum
feature salary ~> group fold (k, foo) = (group date ~> count) ~> sum foo
==>
feature salary ~> group fold (k, foo) = (group date ~> count) ~> let x = foo ~> let fold s = 0 : foo + s ~> s

The Core gen pushes the let x = foo inside the zero of the fold, triggering this problem... I'm not sure how to handle this, @amosr ?

actually, looks like you've already fixed it in the Source checker. Just needed the right temporality for the new bindings!

Sorry in advance for brevity.
Yep, the temporality of the initial of a fold should be Pure, and the foo should be Element. So using foo should not be allowed to happen in the initial because it'd force it to be Element.
However - it may very well be that removing the bindings is equivalent and gives better error messages.
But you're right - having the Element temporality should fix it :point_right:

temporality feels like poor man's linear types? :money_with_wings:

umm. well, kind of. linear logic and the temporality are both kinds of modal logic, so there's definitely some relation. yeah, I guess it is very similar


Add Kodiak bot for PRs?

Been using https://kodiakhq.com on Formik and it really helps. I think it would help out a lot as you can approve a PR and it will automerge it once checks have finished and update other PRs as well. It's really really useful.
@agilgur5 Let me know if you want me to set it up. It requires protecting master and making certain tests required. If you want to see the impact checkout https://github.com/vercel/next.js, https://github.com/formium/formik, or this https://github.com/jaredpalmer/tsdx-monorepo I put together.

Thanks for the recommendation. Updating PRs is potentially useful a la Bors, but auto-merging would not be because I do a rebase merge or a squash merge pending the PR (if it is organized as independent commits or not), and with squash merges and contributor PRs, I am often re-writing the description since the PR/commit descriptions do not tend to be detailed or change over the lifetime of the PR.
It looks like it may also add a comment, which I'm not a fan of -- I've gotten ~200+ unnecessary notifications) from the Vercel bot (the vast majority of which don't even touch the website), which is extremely annoying and frustrating to me and some other contributors.

It requires protecting master and making certain tests required

I would quite like to have branch protection set-up and make tests required in any case, as I've mentioned in https://github.com/formium/tsdx/issues/702#issuecomment-660696221 . If you could set that up or make me a member such that I can do that myself, that would be helpful.
I'd have to leave admin override on for reviewer rule though since no one is available to review my PRs.


Streets of Arkham support (1.4)

Atlas images have changed, so Valkyrie is bugged until MoM 1.4 support is released.

I notice that chemical symbols are a new option for master mind.  We can add that.

ImagePuzzle1_background image has been removed.  This will be broken if used by old scenarios (not a lot that can be done).

Anyone able to tell me what the keywords are for the new items?

I also need photos of both sides of the tokens to work out who is who.

I will get my copy tonight or tomorrow morning and will get help you then.

Do I understand correctly. You just need the text on the new items and the front/back picture of the new NPCs?

Needs to match up name with the icons so as long you flipped them all in the same places, that works.
He just needed the type (evidence, relic, firearm, etc), so I think we're good there. Surprised no new common item unless relics are common items.

Fixing it up now

Horror and Awareness numbers are also required.

Monster Front
https://imgur.com/a/r1WIw
Monster Back
https://imgur.com/a/1i8OV

Great, thanks for your help.

Does anyone know what the deal is with the Elixir?  It is listed as a unique item, but the border is a different colour and it isn't in RhOmicron's list.

btw... "Azure Flame" as a spell, and there is a Road to Legend quest full of "Green Flame".  I think someone at FFG likes Acquisitions Inc.

Another question, which tiles back on to which other tiles?:
TILE_DINER_MAD25,Diner 
TILE_EXHIBIT_ENTRANCE_MAD25,Exhibit Entrance 
TILE_YARD_1_MAD25,Yard 1 
TILE_MAIN_EXHIBIT_MAD25,Main Exhibit 
TILE_LAB_MAD25,Lab 
TILE_BANDSTAND_MAD25,Bandstand 
TILE_LOBBY_MAD25,Lobby 
TILE_EXHIBIT_3_MAD25,Exhibit 3 
TILE_CLASSROOM_1_MAD25,Classroom 1 
TILE_LIBRARY_MAD25,Library 
TILE_GENERAL_SHOP_MAD25,General Shop 
TILE_STUDIO_MAD25,Studio 
TILE_SEWER_1_MAD25,Sewer 1 
TILE_LIBRARY_ARCHIVES_MAD25,Library Archives 
TILE_PRINTING_PRESS_MAD25,Printing Press 
TILE_EXHIBIT_2_MAD25,Exhibit 2 
TILE_STREET_CORNER_MAD25,Street Corner 
TILE_RESEARCH_LIBRARY_MAD25,Research Library 
TILE_SEWER_2_MAD25,Sewer 2 
TILE_CHAPEL_MAD25,Chapel 
TILE_SPEAKEASY_MAD25,Speakeasy 
TILE_PORTRAIT_HALL_MAD25,Portrait Hall 
TILE_MAGIC_SHOP_MAD25,Magic Shop 
TILE_OFFICE_MAD25,Office 
TILE_YARD_2_MAD25,Yard 2 
TILE_BEDROOM_MAD25,Bedroom 
TILE_ALLEY_MAD25,Alley 
TILE_EXHIBIT_1_MAD25,Exhibit 1 
TILE_CURIOSITY_SHOP_MAD25,Curiosity Shop 
TILE_HALL_STAIRS_MAD25,Hall Stairs 
TILE_WAREHOUSE_MAD25,Warehouse 
TILE_CLASSROOM_2_MAD25,Classroom 2 
TILE_CLASSROOM_3_MAD25,Classroom 3 
TILE_LOUNGE_MAD25,Lounge 

Yet another question!
Do the sewers count as inside or outside? (text colour)

Outstanding work:
Is the elixir a unique item?  How is it used?
Are the sewer tiles inside or outside (only used as an editor aid)?
Which sides are the reverse of which other sides (only used as an editor aid)?
Add MAD25 Mythos events (can be done later)
Add all monsters activations (currently only one per new monster, this should be done before release)
Add monster health values (This should be done before release)

Elixir - Spell "At the start of your turn you may improve 1 skill of your choice(new tokens). If you do, flip this card.
Sewer tiles - Inside (brown)
Tiles
Stairs / Curiosity Shop
Printing Press / Exhibit 2
Speakeasy / Portrait Hall
Street Corner / Research Library
Sewer 1 / Library Archives
Sewer 2 / Chapel
Shop Office, Magic Shop / Office
Exhibit 1 / Alley
Classroom 2 / Warehouse
Lounge / Classroom 3
Bedroom / Yard 2

Medium Tiles -
Lobby / Exhibit 3
Yard 1 / Main Exhibit
Classroom 1 / Library
Bandstand / Lab
Shop Storage, General Shop / Studio, Studio Storage
Large Tile -
Kitchen, Diner / Exhibit Entrance

Great thanks!  Now I just have to work out how to deal with a unique spell?

1.6.0c has all but monster activations, monster health and extra mythos events.


Request Time out and connection error

Hi,
i am facing the request time out error. can anybody suggest what shud i do to reconnect or get rid of this problem ?
negotiate failed Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo={NSUnderlyingError=0x7fde4ce6e300 {Error Domain=kCFErrorDomainCFNetwork Code=-1001 "The request timed out." UserInfo={NSErrorFailingURLStringKey=<IPADDRESS>/signalr/signalr/negotiate?clientProtocol=<IP_ADDRESS>&connectionData=%5B%7B%22Name%22%3A%22chathub%22%7D%5D, NSErrorFailingURLKey=<IPADDRESS>/signalr/signalr/negotiate?clientProtocol=<IP_ADDRESS>&connectionData=%5B%7B%22Name%22%3A%22chathub%22%7D%5D, _kCFStreamErrorCodeKey=-2102, _kCFStreamErrorDomainKey=4, NSLocalizedDescription=The request timed out.}}, NSErrorFailingURLStringKey=<IPADDRESS>/signalr/signalr/negotiate?clientProtocol=<IP_ADDRESS>&connectionData=%5B%7B%22Name%22%3A%22chathub%22%7D%5D, NSErrorFailingURLKey=<IPADDRESS>/signalr/signalr/negotiate?clientProtocol=<IP_ADDRESS>&connectionData=%5B%7B%22Name%22%3A%22chathub%22%7D%5D, _kCFStreamErrorDomainKey=4, _kCFStreamErrorCodeKey=-2102, NSLocalizedDescription=The request timed out.}

2016-02-28 04:28:59.797 <PROJECT NAME>[98321:1499886] CONNECTION:	negotiation failed Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo={NSUnderlyingError=0x7fde4ce6e300 {Error Domain=kCFErrorDomainCFNetwork Code=-1001 "The request timed out." UserInfo={NSErrorFailingURLStringKey=<IPADDRESS>/signalr/signalr/negotiate?clientProtocol=<IP_ADDRESS>&connectionData=%5B%7B%22Name%22%3A%22chathub%22%7D%5D, NSErrorFailingURLKey=<IPADDRESS>/signalr/signalr/negotiate?clientProtocol=<IP_ADDRESS>&connectionData=%5B%7B%22Name%22%3A%22chathub%22%7D%5D, _kCFStreamErrorCodeKey=-2102, _kCFStreamErrorDomainKey=4, NSLocalizedDescription=The request timed out.}}, NSErrorFailingURLStringKey=<IPADDRESS>/signalr/signalr/negotiate?clientProtocol=<IP_ADDRESS>&connectionData=%5B%7B%22Name%22%3A%22chathub%22%7D%5D, NSErrorFailingURLKey=<IPADDRESS>/signalr/signalr/negotiate?clientProtocol=<IP_ADDRESS>&connectionData=%5B%7B%22Name%22%3A%22chathub%22%7D%5D, _kCFStreamErrorDomainKey=4, _kCFStreamErrorCodeKey=-2102, NSLocalizedDescription=The request timed out.}

2016-02-28 04:28:59.798 <PROJECT NAME>[98321:1499886] CONNECTION:	connection did receive error Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo={NSUnderlyingError=0x7fde4ce6e300 {Error Domain=kCFErrorDomainCFNetwork Code=-1001 "The request timed out." UserInfo={NSErrorFailingURLStringKey=<IPADDRESS>/signalr/signalr/negotiate?clientProtocol=<IP_ADDRESS>&connectionData=%5B%7B%22Name%22%3A%22chathub%22%7D%5D, NSErrorFailingURLKey=<IPADDRESS>/signalr/signalr/negotiate?clientProtocol=<IP_ADDRESS>&connectionData=%5B%7B%22Name%22%3A%22chathub%22%7D%5D, _kCFStreamErrorCodeKey=-2102, _kCFStreamErrorDomainKey=4, NSLocalizedDescription=The request timed out.}}, NSErrorFailingURLStringKey=<IPADDRESS>/signalr/signalr/negotiate?clientProtocol=<IP_ADDRESS>&connectionData=%5B%7B%22Name%22%3A%22chathub%22%7D%5D, NSErrorFailingURLKey=<IPADDRESS>/signalr/signalr/negotiate?clientProtocol=<IP_ADDRESS>&connectionData=%5B%7B%22Name%22%3A%22chathub%22%7D%5D, _kCFStreamErrorDomainKey=4, _kCFStreamErrorCodeKey=-2102, NSLocalizedDescription=The request timed out.}

2016-02-28 04:28:59.798 <PROJECT NAME>[98321:1499886] PRADEEP MANSHA Connection Error Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo={NSUnderlyingError=0x7fde4ce6e300 {Error Domain=kCFErrorDomainCFNetwork Code=-1001 "The request timed out." UserInfo={NSErrorFailingURLStringKey=<IPADDRESS>/signalr/signalr/negotiate?clientProtocol=<IP_ADDRESS>&connectionData=%5B%7B%22Name%22%3A%22chathub%22%7D%5D, NSErrorFailingURLKey=<IPADDRESS>/signalr/signalr/negotiate?clientProtocol=<IP_ADDRESS>&connectionData=%5B%7B%22Name%22%3A%22chathub%22%7D%5D, _kCFStreamErrorCodeKey=-2102, _kCFStreamErrorDomainKey=4, NSLocalizedDescription=The request timed out.}}, NSErrorFailingURLStringKey=<IPADDRESS>/signalr/signalr/negotiate?clientProtocol=<IP_ADDRESS>&connectionData=%5B%7B%22Name%22%3A%22chathub%22%7D%5D, NSErrorFailingURLKey=<IPADDRESS>/signalr/signalr/negotiate?clientProtocol=<IP_ADDRESS>&connectionData=%5B%7B%22Name%22%3A%22chathub%22%7D%5D, _kCFStreamErrorDomainKey=4, _kCFStreamErrorCodeKey=-2102, NSLocalizedDescription=The request timed out.}

2016-02-28 04:28:59.798 <PROJECT NAME>[98321:1499886] CONNECTION:	connection did receive error Error Domain=com.SignalR.SignalR-ObjC.SRHubProxy Code=0 "Connection was disconnected before invocation result was received." UserInfo={NSLocalizedFailureReason=NSInternalInconsistencyException, NSLocalizedDescription=Connection was disconnected before invocation result was received.}

After this SignalR does not connection anytime.
Can any body help me out in this ?
Thanks in advance

Hi,
It was my issue i was trying to open connection on multiple pages at the same time.So due to that i was facing the issue.Apart from this everything is working fine. Some time there is an issue with SREventSourceStreamReader.m     Line No:90
*== > NSData buffer = [stream propertyForKey:NSStreamDataWrittenToMemoryStreamKey]; Error

(void)stream:(NSStream *)stream handleEvent:(NSStreamEvent)eventCode {
dispatch_async(dispatch_get_main_queue(), ^{
switch (eventCode) {
case NSStreamEventOpenCompleted: {
_reading = processing;
[self onOpened];
} case NSStreamEventHasSpaceAvailable: {
if (![self processing]) {
return;
}
          NSData *buffer = [stream propertyForKey:NSStreamDataWrittenToMemoryStreamKey];
          /*if ([buffer length] >= 4096) {
              [self close];
              return;
          }*/
          buffer = [buffer subdataWithRange:NSMakeRange(_offset, [buffer length] - _offset)];

          NSInteger read = [buffer length];
          if(read > 0) {
              // Put chunks in the buffer
              offset = offset + read;

              [_buffer add:buffer];
              while ([_buffer hasChunks]) {
                  NSString *line = [_buffer readLine];

                  // No new lines in the buffer so stop processing
                  if (line == nil) {
                      break;
                  }

                  SRServerSentEvent *sseEvent = nil;
                  if(![SRServerSentEvent tryParseEvent:line sseEvent:&sseEvent]) {
                      continue;
                  }

                  [self onMessage:sseEvent];
              }
          }
          break;
      } case NSStreamEventErrorOccurred: {
          [self onClosed:[stream streamError]];
          break;
      }
      case NSStreamEventEndEncountered:
      case NSStreamEventNone:
      case NSStreamEventHasBytesAvailable:
      default:
          break;
  }

});
}

Regards,
Pradeep.


ETAG invalidation

Hello,
i'm facing strange behavior and i'm not sure is it a bug or desired behavior according to response headers.
Just doing 4 sequential requests for same resource/uri:
0. Cleanup client cache directory

Sending GET request - 200, ETAG was returned with response
Sending GET request - 304 (ETAG from 1 response was added to this request)
Manually change resource on the server which causes server-side ETAG update
Sending same GET request again - 200 (ETAG from 2 response was added to this request), server returns new ETAG in response because content was changed on step 3
Sending same GET request again - 200 (ETAG from 2 response was added to this request), i.e. client has not updated own cache for step 4 response. From now all new requests will be send with 'old' ETAG.

I'm using okhttp/2.4.0 and IIS 8.0 (ETAG caching is powered by CacheCow). Also i can confirm that both standard BCL .NET HttpClient and Apache Java Http Client will re-validate cache on 4th step.
Here is headers for all requests/responses (without some not interesting info like user agent, etc)
1.
GET http://localhost:5577/api/FeatureClasses HTTP/1.1
Cache-Control: max-age=0
accept: text/json; charset=utf-8
Host: localhost:5577
Connection: Keep-Alive
Accept-Encoding: gzip
--------
HTTP/1.1 200 OK
Cache-Control: public, must-revalidate, max-age=0
Transfer-Encoding: chunked
Content-Type: text/json; charset=utf-8
Content-Encoding: gzip
Last-Modified: Sat, 20 Jun 2015 08:16:44 GMT
ETag: W/"01115072cae94526b5023bae8d28bbd2"
Vary: Accept-Encoding

2.
GET http://localhost:5577/api/FeatureClasses HTTP/1.1
Cache-Control: max-age=0
accept: text/json; charset=utf-8
Host: localhost:5577
Connection: Keep-Alive
Accept-Encoding: gzip
If-None-Match: W/"01115072cae94526b5023bae8d28bbd2"
--------
HTTP/1.1 304 Not Modified
Cache-Control: no-cache
Pragma: no-cache
Expires: -1
ETag: "01115072cae94526b5023bae8d28bbd2"

3.
GET http://localhost:5577/api/FeatureClasses HTTP/1.1
Cache-Control: max-age=0
accept: text/json; charset=utf-8
Host: localhost:5577
Connection: Keep-Alive
Accept-Encoding: gzip
If-None-Match: "01115072cae94526b5023bae8d28bbd2"
--------
HTTP/1.1 200 OK
Cache-Control: public, must-revalidate, max-age=0
Transfer-Encoding: chunked
Content-Type: text/json; charset=utf-8
Content-Encoding: gzip
Last-Modified: Sat, 20 Jun 2015 08:16:50 GMT
ETag: W/"00a90191ec19428abdbe3aedebfbc62e"
Vary: Accept-Encoding

4.
GET http://localhost:5577/api/FeatureClasses HTTP/1.1
Cache-Control: max-age=0
accept: text/json; charset=utf-8
Host: localhost:5577
Connection: Keep-Alive
Accept-Encoding: gzip
If-None-Match: "01115072cae94526b5023bae8d28bbd2"
--------
HTTP/1.1 200 OK
Cache-Control: public, must-revalidate, max-age=0
Transfer-Encoding: chunked
Content-Type: text/json; charset=utf-8
Content-Encoding: gzip
Last-Modified: Sat, 20 Jun 2015 08:16:50 GMT
ETag: "00a90191ec19428abdbe3aedebfbc62e"
Vary: Accept-Encoding

NOTE: it seems for me that weak etags is not an origin of such behavior.

Are you reading the complete response body in step 4? OkHttp needs you to consume the response body to trigger the cache to be updated.

I've created a test case for your scenario here:
https://github.com/square/okhttp/pull/1713/files
The test passes. If you'd like to provide a different test case that fails, please do. Otherwise I'm closing this bug because I cannot reproduce the problem.

Actually i have not readed/closed 304 responses body (some kind of optimization to not waste time on deserialization) so it cause such behavior.
Thank you for your help.