Object-oriented style

When I saw the example code, my direct reaction was that it should be in an object-oriented style:
package main

import (
    "fmt"
    "github.com/Luxurioust/excelize"
)

func main() {
    xlsx := excelize.CreateFile()

    sheet2 := xlsx.NewSheet(2, "Sheet2")
    sheet3 := xlsx.NewSheet(3, "Sheet3")

    sheet2.SetCellInt("A23", 10)
    sheet3.SetCellStr("B20", "Hello")

    err := xlsx.Save("~/Workbook.xlsx")
    if err != nil {
        fmt.Println(err)
    }
}

+1
This would also cut down on typing excelize. so much, which is too long to be typing so frequently.

If we're looking at the API anyway shouldn't Open and Save take the standard interfaces (io.Writer and io.Reader) instead of strings to filepaths. That would allow for easier composition (input could be net.Conn or http.Response.Body and outputs similar).

@stengaard I think that's a separate item that should be its own issue. I'd be against having that as the default -- filename strings will be used most frequently by most people, and having to "manually" deal with filehandles would be an extra burden. My vote would be for additional Write() & Read() methods which could be optionally used in the way you suggest.

I put it here mostly because it would already be a breaking change to the exported API, but I agree it's not really what Per is trying to get at.
Regarding adding Read/Write: I would definitely go the other with - simplify API surface area. Specifically:

Rename CreateFile to New - this is the common idiom.
Introduce the Xlsx type and possibly (if needed) Sheet a type
Rename OpenFile to FromReader and let it take only an io.Reader returning an Xlsx. This constructor method would be in charge of also unwrapping the zip stuff hiding that from the user.
Remove ReadZip and ReadZipReader. They are redundant.
Change and rename Save to be a method on Xlsx so that it would implement the io.WriterTo interface. This increases composability.

What I like about this project is that it is a small library. That makes it easy for the programmer to understand. I get that you're worried about leaking file-handles, but ask yourself what the core purpose of this library is? As I see it this library should allow the programmer decode, encode and manipulate XLSX data, it shouldn't be managing files since that seems peripheral to it's purpose.
But hey: your project, your rules. :)

Yes, this issue was actually only about making the API have an object oriented style.
That said, there might be other things that should also be changed. And while I think that it's good to add WriteTo(), I think that Save() should be kept. It makes the supposedly frequent operation of storing the document to disk simple.

We could also consider to use number index rather than something like "A2"?

Hi @ericuni, this library provides a function named CoordinatesToCellName used for converting [X, Y] coordinates to alpha-numeric cell names.


AMX Matmul Scheduling

This should not have been merged in this state. See my comments above. We specifically generate C code... adding -std=c++11 to a C++ compiler in our tests is a sure-fire way to introduce bugs related to small differences in C / C++ semantics. It's one thing to compile test code with a C++ compiler and link it to a SYSTL-generated C library, but a very different thing to compile SYSTL-generated code as C++.

We needed to use C++ compiler for constexpr. I think using C++ compiler for AMX test specifically is fine

As I said:

It's one thing to compile test code with a C++ compiler and link it to a SYSTL-generated C library, but a very different thing to compile SYSTL-generated code as C++.

A change was made to LoopIR_compiler in service of making SYSTL code compilable with a C++ compiler. This not an acceptable change.

The change is not made to LoopIR_compiler?

It's in harness_amx.py

@alexreinking Let me discuss this with @skeqiqevian and we'll get back to you. I think it's possible to just use the C compiler since we decided not to do constexpr magic here (using C++ compiler decision was made when we thought that we needed to do fancy stuff with metaprogramming, but it's not the case anymore). This discussion was super helpful, thank you!


Make drop_params default in llm_config

Short description of the problem this fixes or functionality that this introduces. This may be used for the CHANGELOG
Make drop_params default to improve compatibility with LMs including OpenAI o1.

Give a summary of what the PR does, explaining any non-trivial design decisions
The use of drop_params in our llm.py code was inconsistent, it always dropped params for async completion, and followed system defaults for synchronous completions.
This PR makes behavior consistent:

Always drop params by default
Always follow the configuration values
Never mess with global litellm parameters

Link of any specific issues this addresses
Fixes https://github.com/All-Hands-AI/OpenHands/issues/4005

Sure, you can read up on drop_params here if you're not familiar with it!
https://docs.litellm.ai/docs/completion/input

I just did this same switch of default, because I can't find why would it make sense otherwise. Maybe we'll find out 😅, but it seems safer this way.


Add learned information about setting up webhosting on a VPS

In no particular order:

[ ] Webhooks

[ ] What they are
[ ] webhook package
[ ] testing with curl

[ ] Linux file permissions

[ ] chown
[ ] chmod numbers
[ ] ls -l and ls -ld

[ ] NGINX/Web servers
[ ] UFW
[ ] system services and systemctl

[ ] System services vs user services

[ ] ssh
[ ] ssl certificates

[ ] generation using certbot
[ ] what they are and do

[ ] Vite
[ ] React
[ ] Linux filesystem

More:

[ ] Monoliths - microservices spectrum
[ ] Docker

[ ] Docker compose
[ ] Kubernetes

[ ] Application layer communication

[ ] HTTP
(technically protocol independent)

[ ] gRPC

[ ] Apache Kafka
[ ] Transport agnostic implementations

[ ] REST

[ ] HATEOAS

[ ] GraphQL


Map ALL the packets!

Sorry! I got carried away!
Not all of the packets are mapped yet. Some have a few fields or methods mapped but not the rest, there's a temporary name or two... but I want to put it out there early
Most names are slightly based off of wiki.vg names for things. See https://wiki.vg/Protocol https://wiki.vg/Pre-release_protocol

I'd also like that (but I feel like we should map all the packets first)

but I feel like we should map all the packets first

Uhh, mapping all the packets would gain any additional insight into this - I don't think there's any benefit in waiting personally.

Sorry, this is getting huge!

https://github.com/FabricMC/yarn/commit/b17dbf0abf6c0e2c6bcb7f2c0c41b4aa6f240ff1


feat: adds LspLensToggle command

I would like to use one keybinding to toggle lens on and off.

Thanks!


update gru bias weights

this updates the bias weights allocation mechanism to avoid some compilation issues on MSVC.

You can’t compile constexpr variables inside of a class, IIRC. I tried compiling with that keyword and it didn’t work, so I have to use static const here.
On Jul 15, 2021, at 8:51 AM, jatinchowdhury18 @.***> wrote:

@jatinchowdhury18 commented on this pull request.

In RTNeural/gru/gru.hhttps://github.com/jatinchowdhury18/RTNeural/pull/29#discussion_r670590618:

@@ -96,6 +96,8 @@ class GRULayer final : public Layer
T* zVec;
T* rVec;
T* cVec;

static const int kNumBiasLayers { 2 };

I think this could still be constexpr, no?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/jatinchowdhury18/RTNeural/pull/29#pullrequestreview-707549841, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACQNEAOKET64F75D5QNNVG3TX37X5ANCNFSM5AKUYWBA.


Error when creating a customer payment in a different currency without specifying an exchange rate

The default currency in our Zoho org is CAD but we have many clients (or contacts) for which we set the currency to USD. When I create a customer payment through the UI for an invoice in USD, it uses the current exchange rate by default and I don't have to explicitly specify one. However when I try to do the same through the API it returns this error: "Please enter a valid exchange rate". I think it should use the current exchange rate by default. I create the payment using CustomerPaymentsApi.create().
I'm pretty sure this bug was introduced by the previous commit for issue #5 because this was working fine before. I've noticed that before b4af198e641d924deae989b37183af21fe1c4d47 the exchange rate was only sent in the JSON when exchangeRate > 0 but that condition has been removed so now it is sent all the time, and it looks like this prevents the current exchange rate from being used.
If I may provide a suggestion, maybe beans like the CustomerPayment class should use object wrappers for fields instead of primitive types (e.g. Double instead of double). This would allow to distinguish between a null (value not set) and a zero. Just my two cents.

Hi Dlevis, thanks for the suggestion I will correct it later. Now the issue got fixed with exchangeRate > 0 condition and updated here. Please check with the latest jar.

It works. Thank you.


Wrapping the view around the content.

I have a ListView  which displays the text data from the server. The text can be of any size. What I want to do is if the text is short I want the height of the view to also be short and if the text is long I want the height of the view to be long so that it wraps the content perfectly.I want the view to be dynamic is this possible.

@facebook-github-bot stack-overflow

Hey @birat-bade and thanks for posting this! @Kureev tells me this issue looks like a question that would be best asked on StackOverflow. StackOverflow is amazing for Q&A: it has a reputation system, voting, the ability to mark a question as answered. Because of the reputation system it is likely the community will see and answer your question there. This also helps us use the GitHub bug tracker for bugs only. Will close this as this is really a question that should be asked on SO.


add opt-out and opt-in options to ci using labels

This will change the CI in a few ways.

doesn't run the CI on push with only workflow changes
checks if CI run needed when a draft PR becomes ready for review
checks if CI run needed when a label is added to a PR. in most cases this does not cause the CI to run but it does cause the workflow itself to run.
adds detection for draft status of PRs. By default the CI is skipped for draft PRs.
adds detection for label 'prevent-ci' on PRs (draft or not) to prevent running CI.
adds detection for label 'force-ci' which overrides all of the above and forces CI to be run on subsequent changes (excluding label additions)
force runs the CI once when the 'force-ci' label is added to a PR

note that any label additions will cause the CI to try to run (ie the workflow will run but the jobs are skipped), so if you add any label without 'force-ci' it will change the ci checks to 'skipped' regardless of what they were before.
i think this is not a big deal, the old run results should still be available under 'actions' tab.
if this is a big problem for some reason we can do something about it using another job in the workflow
interestingly the changes seem to work within the context of this PR itself so you can test it here by adding and removing labels
and dummy edits if you want, but before merging we should be careful the about commit noise that would introduce
closes #76

Pull Request Test Coverage Report for Build 311300315

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-1.4%) to 76.681%

Totals

Change from base Build 307704992:
-1.4%

Covered Lines:
2269

Relevant Lines:
2959

💛  - Coveralls


EPS power moved in H3?

I did a quick EPS test, and I think EPS Power is in holding register 39217 (and possibly 39216 if it's a 32-bit value - which would make the H1_G2 the same as the H3_PRO, counting against one of the 3 phases I guess). It may always have been there, or this may be new as of Manager 1.44 - I've no way of testing that unfortunately.
Originally posted by @paultweedy77 in https://github.com/nathanmarlor/foxess_modbus/discussions/666#discussioncomment-10520750

@paultweedy77 I'd find it very odd if just the EPS power has moved out to 39217 (and things like EPS current have stayed put). Sure the H3 uses that register, but as you say it uses it for the T phase.
I guess they might have moved it out if they wanted to make it a 32-bit register and needed more room... Apparently the G2 has a max capacity of 33kW, which just exceeds a 16-bit register. I would have expected them to move rpower as well though, in that case.
Are you certain that the EPS power has moved out to 39217, and nothing else EPS-related (or power-related) has moved?

The only thing I'm certain about is that register contains the correct EPS power figure when in EPS mode, and is 0 otherwise. My suspicion is that it's unintentional and shouldn't be relied on, and that the change in behaviour of register 31012 in Manager 1.44 is a bug.


fix: misc light mode fixes on send and transactions

@7i7o re-requesting review due to bumping version in components; had to remove height and width from icon prop
https://github.com/arconnectio/components/pull/23


analyzer no longer removes the whitespace before the /// in comments

computeDocumentationComment no longer removes the whitespace before the /// in comments.
  /// Start a synchronous operation labeled [name]. Optionally takes
  /// a [Map] of [arguments]. This operation must be finished before
  /// returning to the event queue.

returns
"/// Start a synchronous operation labeled [name]. Optionally takes\n  /// a [Map] of [arguments]. This operation must be finished before\n  /// returning to the event queue."
Note the whitespace after \n. This was not the case in the previous version.

Please attach the file you see the problem it.

Dup of dart-lang/dartdoc#947.

@srawlins not quite a dupe. This is the root cause for https://github.com/dart-lang/dartdoc/issues/947

@scheglov  https://github.com/dart-lang/sdk/blob/master/sdk/lib/developer/timeline.dart

Ah... Now I understand.
This is AsDesigned.
This method returns comment for this element as it appears in the original source.
This means with all the beginning / ending delimiters, spaces, etc.
It's up to the client to strip all this stuff for the specific use.

@scheglov , this behavior has changed from previous versions of the analyzer.  It used to trim the whitespace before the ///

True, it used too.
But it wasn't promised.


[BUG?] Snippet replacement auto trim whitespace

When the replacement field in a snippet have some trailing whitespaces, it will be trimed when expanded. \\forall... will become \forall etc.(whitespace denoted as .).
I don't know if it's intended behavior, but it makes sense to let users decide whether they want a trailing space, right? My use case is to let fa. auto expand to \forall. (whitespace denoted as .).
Edit: It seems that this only happens in inline math.

This is done on purpose so that triggering a snippet in inline math doesn't cause you to exit math mode. See #25.

What about adding a zero-width char like \u200b or \hspace{0pt} before the last $ in mk snippet?
e.g.
{trigger:"mk",replacement:"$$0\\hspace{0pt}$$1",options:"tAw"}
Then we can safely allow trailing spaces in inline math .
Or maybe adding an option to disable auto trim space in inline math?

I don't like the idea of polluting users' code with zero-width characters (at least, not by default!). But yeah, the code should probably check whether the cursor is at the end of the equation before running auto-trim.

Or maybe adding an option to disable auto trim space in inline math?

Sure, it can be considered for a future release! Any PRs are also welcome.


Meltano API can only run on port 5000

Migrated from GitLab: https://gitlab.com/meltano/meltano/-/issues/375
Originally created by @mbergeron on 2019-02-12 14:30:36

I've been working on WSGI support with gunicorn and I found out that the UI can only connect to localhost:5000.
This seems to be a chicken/egg problem, because the application root has to be set at compilation time with Webpack, but we don't know the API endpoint until we actually start it.
There is most probably a solution out there, injecting some JS somewhere in the mix that would solve that.
/cc @jschatz1

View 6 previous comments from the original issue on GitLab


Gene annotation track appears to clear canvas incorrectly before re-rendering

Version:
SERVER_VERSION: 1.7.0
WEBSITE_VERSION: 0.6.26
LIBRARY_VERSION: 1.0.1
MULTIVEC_VERSION: 0.1.10
HGTILES_VERSION: 0.2.2
CLODIUS_VERSION: 0.9.1
TIME_INTERVAL_TRACK_VERSION: 0.1.8

Steps to reproduce
Option 1: Change colors of gene annotation track.
Option 2: Zoom out to genome wide overview, then zoom into a region and zoom out again.
Observed behavior

Option 1: Original markers are overplotted (issue with transparency) and new markers appear to be shifted.

Option 2: Markers are much denser in region that was zoomed into.

Expected behavior

No overplotting, no unexpectedly dense regions of markers.

Option #1 is fixed in v1.1.2. Somewhere along the way this introduced an issue with the multivec track (https://github.com/hms-dbmi/higlass/issues/282).
Having a hard time reproducing option #2.

This issue seems to be fixed (tested with v1.7.2).


[PT Run] Folder plugin doesn't have context menu for first entry

Actual behavior
A the moment the result plugin didn't allows to open path in console for the first entry (entered path) if the search query ends with \. Instead this result has no buttons and a description how you can search within the folder.

📝 Provide a description of the new feature
We could add a description hint as first result and show the entered folder (typed in search query) as extra result after the information hint. This result then can has the buttons for open in console and copy path.

If you'd like to see this feature implemented, add a 👍 reaction to this post.

@htcfreek, i updated the title to clarify this, is this heart of the issue, correct?

PT v0.23.0 is released.


ONG claiming error states

Unlike Android/Desktop, it will let users sync even if the claimable amount is <0.02
I think we need to stop users from claiming here as it is costing more than they will receive.
Also after sync state, if user has claimable ONG but no ONG to pay the fee with and they click claim then it still shows success even though it didn't succeed.
Can we make it the same as on desktop, and block the user completely from pushing the claim button like on desktop with an error message like this?

done


How to get BotData in IActivityLogger.LogAsync method when returning response to user.

Bot Info

SDK Platform: .NET
SDK Version: 3.14.0
Active Channels: Webchat
Deployment Environment: On-premise (Windows Server 2016 Standard)

Issue Description
I am logging all conversation between user and bot  (request and response) through  IActivityLogger.LogAsync  method. And I do have some information in BotState stored using SQL server. I am able to read BotState data from request using DialogModule.BeginLifetimeScope. However, when return response I do see BotState object is empty / null.
After debugging I noticed that IAddress object does not have same objects when sending response back to the user. How can I get bot state data when returning response.

Request (IAddress)
Response (IAddress)

internal sealed class ActivityLogger : IActivityLogger
{
	async Task IActivityLogger.LogAsync(IActivity activity)
	{
		try
		{
			var message = activity.AsMessageActivity();
                        if(message != null)
			{
                                using (var dialoge = new DialogModuleService(message))
				{
					//username is null when sending response back to user.
					var userName = await dialoge.GetValue("UserNameKey", BotStoreType.BotUserData, "default-user");
				}
			}
		}
		catch (Exception e) { }
	}
}

internal sealed class DialogModuleService : IDisposable
{
	private readonly ILifetimeScope _dialog;

	private readonly AddressKey _key;

	private bool disposedValue;

	internal DialogModuleService(IMessageActivity message)
	{
		_dialog = DialogModule.BeginLifetimeScope(Conversation.Container, message);

		_key = new AddressKey
		{
			BotId = message.Recipient.Id,
			ChannelId = message.ChannelId,
			UserId = message.From.Id,
			ConversationId = message.Conversation.Id,
			ServiceUrl = message.ServiceUrl
		};
	}

	internal async Task<T> GetValue<T>(string property, BotStoreType storeType, T defaultValue)
	{
		try
		{
			var botDataStore = _dialog.Resolve<IBotDataStore<BotData>>();
			var data = await botDataStore.LoadAsync(_key, storeType, CancellationToken.None);
			return data == null ? defaultValue : data.GetProperty<T>(property);
		}
		catch
		{
			return defaultValue;
		}
	}

	protected virtual void Dispose(bool disposing)
	{
		if (disposedValue) return;

		if (disposing)
		{
			_dialog?.Dispose();
		}

		disposedValue = true;
	}

	public void Dispose() => Dispose(true);
}

   public sealed class AddressKey : IAddress
    {
        public string BotId { get; set; }
        public string ChannelId { get; set; }
        public string ConversationId { get; set; }
        public string ServiceUrl { get; set; }
        public string UserId { get; set; }
    }

Would you please answer the following questions.
Question

How do I get BotState info when sending response back to user.
Is it possible to assign or sync UserId and BotId in Response same as request.

Take a look at this sample, It shows logging of activities going both to and from the bot in the output window.

This happens because state is stored based on the user, not the bot.  I am looking into a solution for you.

@JasonSowers Thanks. I will try your approach.

Sorry @JasonSowers The above code does not return BotState  when sending response back to user.
NOTE  : I've tested in bot emulator.

I will take a deeper look for you.

In the emulator the bot Id is set by the emulator and not read from the web config.  make these changes to the code to make it work in the emulator as well:
        public DialogModuleService(IMessageActivity message)
        {
            _dialog = DialogModule.BeginLifetimeScope(Conversation.Container, message);
            if (message.From.Id.Contains(ConfigurationManager.AppSettings["BotId"]) || (message.ChannelId == ChannelIds.Emulator && message.From.Id != "default-user"))
            {
                _key = new AddressKey
                {
                    BotId = message.From.Id,
                    ChannelId = message.ChannelId,
                    UserId = message.Recipient.Id,
                    ConversationId = message.Conversation.Id,
                    ServiceUrl = message.ServiceUrl
                };
            }
            else
            {
                _key = new AddressKey
                {
                    BotId = message.Recipient.Id,
                    ChannelId = message.ChannelId,
                    UserId = message.From.Id,
                    ConversationId = message.Conversation.Id,
                    ServiceUrl = message.ServiceUrl
                };
            }

        }

Thank you @JasonSowers I will try the above pattern and keep you posted.

@JasonSowers Thanks.. this works in emulator. I can see now botstate data. However, I will leave the ticket open until I finish testing in web-chat interface.

Once again, thank you for your.

@deepumi I'm going to close this issue, please open a new issue if you need further assistance

@JasonSowers Sure, thank you!


Tests

#166
Almost everything from run_tests.py except the suggestion...

Excellent work! :+1:
@homu r+

I think homu needs a rest :P

@homu retry

Let me try
Dear @homu r+ please

@homu r+

@homu r+

@homu r+

@homu r+

@homu r+

@homu r+

@homu r+

:pushpin: Commit 32ef326 has been approved by sru

:hourglass: Testing commit 32ef326 with merge 113ed02...

:sunny: Test successful - status


docs: (take 2) Move external deps rst generation and cve scan to bazel

Signed-off-by: Ryan Northey<EMAIL_ADDRESS>Commit Message: docs: (take 2) Move external deps rst generation and cve scan to bazel
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Deprecated:]
[Optional API Considerations:]

@moderation i see now why this PR passes CI even with the breaking change
https://github.com/envoyproxy/envoy/blob/b627768769fba47406bb86c394c7719a4f6f808a/ci/check_repository_locations.sh#L5-L13
the code is only hit if something changes in a bazel file grepped to repository_locations
im wondering how best to test without actually running the code
ill add a fix and try and make it explicit that these vars essentially exported
i guess re testing, i would prefer addressing after we have updated the py formatting #15403

cc @mattklein123 @htuch

can you explain what change you made to ensure CI catches this in future?

unfortunately i didnt
i made it more explicit that the vars were exported from bazel to other python modules as that is what i had missed
in terms of testing i would like to address the linting first and then i would be happy to add some unit tests - pref defined with pytest - but that should be pretty straightforward
ive opened a ticket to track python unit testing here  #15453

SG, thanks for the explanation.


Google Sign In 4.5.1 - ServerAuthCode returns null value

The serverauthcode still coming null in the new version of plugin.
GoogleSignIn _googleSignIn = GoogleSignIn(
      scopes: [
        'email',
       'https://www.googleapis.com/auth/contacts.readonly',
       'https://mail.google.com',
      ],
    );
    try {
      GoogleSignInAccount googleSignInAccount = await _googleSignIn.signIn();
      GoogleSignInAuthentication googleSignInAuthentication =
          await googleSignInAccount.authentication;
      String code = googleSignInAuthentication.serverAuthCode;
      print(code);
    } catch (error) {
      print(error);
    }

Flutter doctor
[✓] Flutter (Channel stable, v1.17.1, on Mac OS X 10.15.4 19E287, locale en-GB)
    • Flutter version 1.17.1 at /users/faiyyazkhatri/StudioProjects/flutter
    • Framework revision f7a6a7906b (8 days ago), 2020-05-12 18:39:00 -0700
    • Engine revision 6bc433c6b6
    • Dart version 2.8.2

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at /users/faiyyazkhatri/Library/Android/sdk
    • Platform android-29, build-tools 29.0.3
    • ANDROID_HOME = /users/faiyyazkhatri/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.4.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.4.1, Build version 11E503a
    • CocoaPods version 1.9.1

[✓] Android Studio (version 3.6)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 45.1.1
    • Dart plugin version 192.8052
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)

[✓] Connected device (1 available)
    • iPhone 11 Pro Max • 690EC0B1-6D79-42BE-8447-4746C5E2FAAD • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-4 (simulator)

• No issues found!

Code Sample
// Copyright 2019 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// ignore_for_file: public_member_api_docs

import 'dart:async';
import 'dart:convert' show json;

import "package:http/http.dart" as http;
import 'package:flutter/material.dart';
import 'package:google_sign_in/google_sign_in.dart';

GoogleSignIn _googleSignIn = GoogleSignIn(
  scopes: <String>[
    'email',
    'https://www.googleapis.com/auth/contacts.readonly',
  ],
);

void main() {
  runApp(
    MaterialApp(
      title: 'Google Sign In',
      home: SignInDemo(),
    ),
  );
}

class SignInDemo extends StatefulWidget {
  @override
  State createState() => SignInDemoState();
}

class SignInDemoState extends State<SignInDemo> {
  GoogleSignInAccount _currentUser;
  String _contactText;

  @override
  void initState() {
    super.initState();
    _googleSignIn.onCurrentUserChanged.listen((GoogleSignInAccount account) {
      setState(() {
        _currentUser = account;
      });
      if (_currentUser != null) {
        _handleGetContact();
      }
    });
    _googleSignIn.signInSilently();
  }

  Future<void> _handleGetContact() async {
    setState(() {
      _contactText = "Loading contact info...";
    });
    final http.Response response = await http.get(
      'https://people.googleapis.com/v1/people/me/connections'
      '?requestMask.includeField=person.names',
      headers: await _currentUser.authHeaders,
    );
    if (response.statusCode != 200) {
      setState(() {
        _contactText = "People API gave a ${response.statusCode} "
            "response. Check logs for details.";
      });
      print('People API ${response.statusCode} response: ${response.body}');
      return;
    }
    final Map<String, dynamic> data = json.decode(response.body);
    final String namedContact = _pickFirstNamedContact(data);
    setState(() {
      if (namedContact != null) {
        _contactText = "I see you know $namedContact!";
      } else {
        _contactText = "No contacts to display.";
      }
    });
  }

  String _pickFirstNamedContact(Map<String, dynamic> data) {
    final List<dynamic> connections = data['connections'];
    final Map<String, dynamic> contact = connections?.firstWhere(
      (dynamic contact) => contact['names'] != null,
      orElse: () => null,
    );
    if (contact != null) {
      final Map<String, dynamic> name = contact['names'].firstWhere(
        (dynamic name) => name['displayName'] != null,
        orElse: () => null,
      );
      if (name != null) {
        return name['displayName'];
      }
    }
    return null;
  }

  Future<void> _handleSignIn() async {
    try {
      GoogleSignInAccount googleSignInAccount = await _googleSignIn.signIn();
      GoogleSignInAuthentication googleSignInAuthentication =
          await googleSignInAccount.authentication;
      String code = googleSignInAuthentication.serverAuthCode;
      print('serverAuthCode: $code');
    } catch (error) {
      print(error);
    }
  }

  Future<void> _handleSignOut() => _googleSignIn.disconnect();

  Widget _buildBody() {
    if (_currentUser != null) {
      return Column(
        mainAxisAlignment: MainAxisAlignment.spaceAround,
        children: <Widget>[
          ListTile(
            leading: GoogleUserCircleAvatar(
              identity: _currentUser,
            ),
            title: Text(_currentUser.displayName ?? ''),
            subtitle: Text(_currentUser.email ?? ''),
          ),
          const Text("Signed in successfully."),
          Text(_contactText ?? ''),
          RaisedButton(
            child: const Text('SIGN OUT'),
            onPressed: _handleSignOut,
          ),
          RaisedButton(
            child: const Text('REFRESH'),
            onPressed: _handleGetContact,
          ),
        ],
      );
    } else {
      return Column(
        mainAxisAlignment: MainAxisAlignment.spaceAround,
        children: <Widget>[
          const Text("You are not currently signed in."),
          RaisedButton(
            child: const Text('SIGN IN'),
            onPressed: _handleSignIn,
          ),
        ],
      );
    }
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: const Text('Google Sign In'),
        ),
        body: ConstrainedBox(
          constraints: const BoxConstraints.expand(),
          child: _buildBody(),
        ));
  }
}

I/flutter (10569): serverAuthCode: null

flutter doctor -v
[✓] Flutter (Channel dev, 1.19.0-1.0.pre, on Mac OS X 10.15.4 19E287, locale
    en-GB)
    • Flutter version 1.19.0-1.0.pre at /Users/tahatesser/Code/flutter_dev
    • Framework revision 456d80b9dd (10 days ago), 2020-05-11 11:45:03 -0400
    • Engine revision d96f962ca2
    • Dart version 2.9.0 (build 2.9.0-7.0.dev 092ed38a87)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at /Users/tahatesser/Code/SDK
    • Platform android-29, build-tools 29.0.3
    • ANDROID_HOME = /Users/tahatesser/Code/SDK
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_212-release-1586-b4-5784211)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.5)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.5, Build version 11E608c
    • CocoaPods version 1.9.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 3.6)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 45.1.1
    • Dart plugin version 192.8052
    • Java version OpenJDK Runtime Environment (build
      1.8.0_212-release-1586-b4-5784211)

[✓] VS Code (version 1.45.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.10.2

[✓] Connected device (7 available)
    • SM M305F                  • 32003c30dc19668f                     •
      android-arm64  • Android 10 (API 29)
    • Android SDK built for x86 • emulator-5554                        •
      android-x86    • Android 10 (API 29) (emulator)
    • Taha’s iPhone             • 00008020-001059882212002E            • ios
      • iOS 13.5
    • iPhone 11                 • F067D2F5-5386-4EBE-8600-326B40C64462 • ios
      • com.apple.CoreSimulator.SimRuntime.iOS-13-5 (simulator)
    • macOS                     • macOS                                •
      darwin-x64     • Mac OS X 10.15.4 19E287
    • Web Server                • web-server                           •
      web-javascript • Flutter Tools
    • Chrome                    • chrome                               •
      web-javascript • Google Chrome 81.0.4044.138

• No issues found!

@Faiyyaz you can pull these changes,it works for me now. https://github.com/flutter/plugins/pull/2792

@zeeshanhussain i don't want to pull any outside commit bcoz even i have one of my commit and a commit of another user with me which works but i want to use official plugin bcoz if they make any updation in future then we need to implement in our commit as well so its better to wait and get this issue solved in official repo itself.

@zeeshanhussain I pulled your code but still get null for serverAuthCode am I missing something ? Testing on iOS simulator.

@scaraux my changes were only for android, you can pull this for iOs https://github.com/flutter/plugins/pull/2788

As you can see here:
https://github.com/flutter/plugins/blob/master/packages/google_sign_in/google_sign_in_web/lib/google_sign_in_web.dart#L135-L146
Web has never had this feature (although it seems it may be implemented, if you can request offline access after authenticating).
I'm reviving #62474 to track progress of the web implementation, if anybody wants to tackle it ASAP. I'll assign the "new feature" label as well.

Is there any work around for getting serverAuthCode on android/iOS??
let's just say my future depends on it 😅.
Thanks for all your efforts you are doing a great job 👌🏻

Is there any work around for getting serverAuthCode on android/iOS??
let's just say my future depends on it .
Thanks for all your efforts you are doing a great job 👌🏻

You can pick these pull requests
https://github.com/flutter/plugins/pull/2788
https://github.com/flutter/plugins/pull/2792

Is there any work around for getting serverAuthCode on android/iOS??
let's just say my future depends on it 😅.
Thanks for all your efforts you are doing a great job 👌🏻

I merged the changes from the 2 PRs into one so that it's easier to use.
You can just add google_sign_in your project like
(in your pubspec.yaml file)
  google_sign_in:
    git:
      url: https://github.com/aseef17/plugins.git
      path: packages/google_sign_in/google_sign_in
      ref: master

And add a dependacy override for google_sign_in_platform_interface
dependency_overrides:
  google_sign_in_platform_interface:
    git:
      url: https://github.com/aseef17/plugins.git
      path: packages/google_sign_in/google_sign_in_platform_interface

To get this to work in for iOS, you have to add a new key in your GoogleService-Info.plist file
<key>SERVER_CLIENT_ID</key>
<string>YOUR_CLIENT_ID_HERE</string>

You can find it in your firebase project settings or you can just check your google-services.json file
It'll be under "oauth_client" object with the name "client_id"
This has been tested on both Android and iOS to obtain the serverAuthCode.
Hope this helps until the current PRs are merged
NOTE:- This is a current fork of the plugins in their current state and I have no intention to update them with the newer updates from the Flutter Team

[google_sign_in 4.5.6] I still get serverAuthCode as null.

[google_sign_in 4.5.6] I still get serverAuthCode as null.

use the solution provided by : @aseef17

Is there any work around for getting serverAuthCode on android/iOS??
let's just say my future depends on it 😅.
Thanks for all your efforts you are doing a great job 👌🏻

I merged the changes from the 2 PRs into one so that it's easier to use.
You can just add google_sign_in your project like
(in your pubspec.yaml file)
  google_sign_in:
    git:
      url: https://github.com/aseef17/plugins.git
      path: packages/google_sign_in/google_sign_in
      ref: master

And add a dependacy override for google_sign_in_platform_interface
dependency_overrides:
  google_sign_in_platform_interface:
    git:
      url: https://github.com/aseef17/plugins.git
      path: packages/google_sign_in/google_sign_in_platform_interface

To get this to work in for iOS, you have to add a new key in your GoogleService-Info.plist file
<key>SERVER_CLIENT_ID</key>
<string>YOUR_CLIENT_ID_HERE</string>

You can find it in your firebase project settings or you can just check your google-services.json file
It'll be under "oauth_client" object with the name "client_id"
This has been tested on both Android and iOS to obtain the serverAuthCode.
Hope this helps until the current PRs are merged
NOTE:- This is a current fork of the plugins in their current state and I have no intention to update them with the newer updates from the Flutter Team

@darshankawar is there anything you can do on your end? PRs have been sitting for months, ready to be merge. Google Sign in is a standard and so is the server auth code.

It is possible to fix this problem without the need to change the implementation of the google_sign_in Flutter plugin, at least on Android.
If you check the sources of the Android implementation, specifically: GoogleSignInPlugin.java#L488, you can see that the plugin will populate both the serverAuthCode and idToken properties from the GoogleSignInAccount result.
Then, check the documentation of GoogleSignInAccount#getServerAuthCode() - the value will be set only if it's being requested when building sign in options: (GoogleSignInOptions.Builder.requestServerAuthCode(String))[https://developers.google.com/android/reference/com/google/android/gms/auth/api/signin/GoogleSignInOptions.Builder#requestServerAuthCode(java.lang.String)].
Now, going back to the plugin sources, you can see that the plugin will request these ids, if the clientId property is defined in resources: GoogleSignInPlugin.java#L333
So, ultimately to have these props being non-null on Android, you simply have to add a resource file in the $PROJECT_ROOT/android/app/src/res/values/strings.xml with content:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="default_web_client_id">XXX</string>
</resources>

Where XXX is client id from appropriate OAuth 2.0 Client IDs from here: https://console.cloud.google.com/apis/credentials.
I didn't need this on iOS, so really don't know how to fix it there.

It is possible to fix this problem without the need to change the implementation of the google_sign_in Flutter plugin, at least on Android.
If you check the sources of the Android implementation, specifically: GoogleSignInPlugin.java#L488, you can see that the plugin will populate both the serverAuthCode and idToken properties from the GoogleSignInAccount result.
Then, check the documentation of GoogleSignInAccount#getServerAuthCode() - the value will be set only if it's being requested when building sign in options: (GoogleSignInOptions.Builder.requestServerAuthCode(String))[https://developers.google.com/android/reference/com/google/android/gms/auth/api/signin/GoogleSignInOptions.Builder#requestServerAuthCode(java.lang.String)].
Now, going back to the plugin sources, you can see that the plugin will request these ids, if the clientId property is defined in resources: GoogleSignInPlugin.java#L333
So, ultimately to have these props being non-null on Android, you simply have to add a resource file in the $PROJECT_ROOT/android/app/src/res/values/strings.xml with content:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="default_web_client_id">XXX</string>
</resources>

Where XXX is client id from appropriate OAuth 2.0 Client IDs from here: https://console.cloud.google.com/apis/credentials.
I didn't need this on iOS, so really don't know how to fix it there.

@t-kozak i didn't work. only  did work by changing the impl.

@t-kozak i didn't work. only  did work by changing the impl.

[google_sign_in 4.5.9] I still get serverAuthCode as null in both android & ios

Is there any work around for getting serverAuthCode on android/iOS??
let's just say my future depends on it sweat_smile.
Thanks for all your efforts you are doing a great job 👌🏻

I merged the changes from the 2 PRs into one so that it's easier to use.
You can just add google_sign_in your project like
(in your pubspec.yaml file)
  google_sign_in:
    git:
      url: https://github.com/aseef17/plugins.git
      path: packages/google_sign_in/google_sign_in
      ref: master

And add a dependacy override for google_sign_in_platform_interface
dependency_overrides:
  google_sign_in_platform_interface:
    git:
      url: https://github.com/aseef17/plugins.git
      path: packages/google_sign_in/google_sign_in_platform_interface

To get this to work in for iOS, you have to add a new key in your GoogleService-Info.plist file
<key>SERVER_CLIENT_ID</key>
<string>YOUR_CLIENT_ID_HERE</string>

You can find it in your firebase project settings or you can just check your google-services.json file
It'll be under "oauth_client" object with the name "client_id"
This has been tested on both Android and iOS to obtain the serverAuthCode.
Hope this helps until the current PRs are merged
NOTE:- This is a current fork of the plugins in their current state and I have no intention to update them with the newer updates from the Flutter Team

This solution works :+1: , but now i wish to migrate my app to null safety and since this fork depends on non null safe versions of packages I am facing issues with dependency resolution. @aseef17 is it possible for you to update the fork just this one time as null safety is a very big feature, or do you suggest any other method?

This solution works 👍 , but now i wish to migrate my app to null safety and since this fork depends on non null safe versions of packages I am facing issues with dependency resolution. @aseef17 is it possible for you to update the fork just this one time as null safety is a very big feature, or do you suggest any other method?

@ManasviPatidar
May I know what are issues you are facing. I recently did an update to null safety for one of my client projects and was able to resolve this without the need of updating the package?

Running "flutter pub get" in my_app...
Because every version of google_sign_in_platform_interface from git depends on quiver ^2.0.0 and camera >=0.8.0 depends on quiver ^3.0.0, google_sign_in_platform_interface from git is incompatible with camera >=0.8.0.
So, because prescription_app depends on both camera ^0.8.1 and google_sign_in_platform_interface from git, version solving failed.

I have the same issue regarding quiver dependency:
Because every version of google_sign_in_platform_interface from git depends on quiver ^2.0.0 and every version of dio_http_cache from git depends on quiver ^3.0.0, google_sign_in_platform_interface from git is incompatible with dio_http_cache from git.

@aseef17's workaround has done well for a while, but version solving has become an issue as we've updated other dependencies in our project. Integrating GoogleSignInPlatform has not helped either, as getTokens also returns a null serverAuthCode.

I'll try to update the dependencies by this weekend. I still don't understand why the Flutter team has not integrated this yet though.

@aseef17 Obviously I didn't expect you to have to do that kind of work, but of course I appreciate it.

Is there any work around for getting serverAuthCode on android/iOS??
let's just say my future depends on it 😅.
Thanks for all your efforts you are doing a great job 👌🏻

I merged the changes from the 2 PRs into one so that it's easier to use.
You can just add google_sign_in your project like
(in your pubspec.yaml file)
  google_sign_in:
    git:
      url: https://github.com/aseef17/plugins.git
      path: packages/google_sign_in/google_sign_in
      ref: master

And add a dependacy override for google_sign_in_platform_interface
dependency_overrides:
  google_sign_in_platform_interface:
    git:
      url: https://github.com/aseef17/plugins.git
      path: packages/google_sign_in/google_sign_in_platform_interface

To get this to work in for iOS, you have to add a new key in your GoogleService-Info.plist file
<key>SERVER_CLIENT_ID</key>
<string>YOUR_CLIENT_ID_HERE</string>

You can find it in your firebase project settings or you can just check your google-services.json file
It'll be under "oauth_client" object with the name "client_id"
This has been tested on both Android and iOS to obtain the serverAuthCode.
Hope this helps until the current PRs are merged
NOTE:- This is a current fork of the plugins in their current state and I have no intention to update them with the newer updates from the Flutter Team

This solution works for me in mobile device however in web I still got null value

It would be great to get this issue fixed as it is a blocker for anyone who wants to do server-side authentication for Google sign-in.
I did a null-safe version that is working for me. Just add the git dependency:
google_sign_in:
    git:
      url: https://github.com/serverpod/plugins.git
      path: packages/google_sign_in/google_sign_in
      ref: serverpod

It's possible you also need to add to your GoogleService-Info.plist (didn't try without):
<key>SERVER_CLIENT_ID</key>
<string>YOUR_CLIENT_ID_HERE</string>

You can find it in your firebase project settings or you can just check your google-services.json file
It'll be the object with the name "client_id".

google_sign_in:
git:
url: https://github.com/serverpod/plugins.git
path: packages/google_sign_in/google_sign_in
ref: serverpod

I can confirm this works without GoogleService-Info.plist for those who aren't using Firebase.
It's pretty astonished this issue, which essentially makes server side authentication impossible, has gone unaddressed over almost a dozen new versions.

Is there any work around for getting serverAuthCode on android/iOS??
let's just say my future depends on it 😅.
Thanks for all your efforts you are doing a great job 👌🏻

I merged the changes from the 2 PRs into one so that it's easier to use.
You can just add google_sign_in your project like
(in your pubspec.yaml file)
  google_sign_in:
    git:
      url: https://github.com/aseef17/plugins.git
      path: packages/google_sign_in/google_sign_in
      ref: master

And add a dependacy override for google_sign_in_platform_interface
dependency_overrides:
  google_sign_in_platform_interface:
    git:
      url: https://github.com/aseef17/plugins.git
      path: packages/google_sign_in/google_sign_in_platform_interface

To get this to work in for iOS, you have to add a new key in your GoogleService-Info.plist file
<key>SERVER_CLIENT_ID</key>
<string>YOUR_CLIENT_ID_HERE</string>

You can find it in your firebase project settings or you can just check your google-services.json file
It'll be under "oauth_client" object with the name "client_id"
This has been tested on both Android and iOS to obtain the serverAuthCode.
Hope this helps until the current PRs are merged
NOTE:- This is a current fork of the plugins in their current state and I have no intention to update them with the newer updates from the Flutter Team

[google_sign_in 4.5.6] I still get serverAuthCode as null.

use the solution provided by : @aseef17

Is there any work around for getting serverAuthCode on android/iOS??
let's just say my future depends on it 😅.
Thanks for all your efforts you are doing a great job 👌🏻

I merged the changes from the 2 PRs into one so that it's easier to use.
You can just add google_sign_in your project like
(in your pubspec.yaml file)
  google_sign_in:
    git:
      url: https://github.com/aseef17/plugins.git
      path: packages/google_sign_in/google_sign_in
      ref: master

And add a dependacy override for google_sign_in_platform_interface
dependency_overrides:
  google_sign_in_platform_interface:
    git:
      url: https://github.com/aseef17/plugins.git
      path: packages/google_sign_in/google_sign_in_platform_interface

To get this to work in for iOS, you have to add a new key in your GoogleService-Info.plist file
<key>SERVER_CLIENT_ID</key>
<string>YOUR_CLIENT_ID_HERE</string>

You can find it in your firebase project settings or you can just check your google-services.json file
It'll be under "oauth_client" object with the name "client_id"
This has been tested on both Android and iOS to obtain the serverAuthCode.
Hope this helps until the current PRs are merged

i implement this,,still my  serverauthcode is comming null.

@OhTerryTorres your proposed solution doesn't work on Android. Do you have any ideas why?

@OhTerryTorres your proposed solution doesn't work on Android (but works on iOS). Do you have any ideas why?

I got it working on Android but the server throws Error fetching OAuth2 access token, message: 'unauthorized_client: Unauthorized'

I tried @vlidholt 's branch but after I hit login, the simulator would always crash. However, when I ran the same code but with the default google_sign_in library (5.0.7), I got null as the response when trying to get the serverAuthCode. Does any know why the simulator would crash?

Its been over a year, why isn't this fixed?  However is everyone else getting the refresh token without the server auth code?

For those looking to implement this, these are the steps I took:
Part 1: Fork repo

Fork flutter/plugin (https://github.com/flutter/plugins.git)
Add a second remote repo from Aseef17 (https://github.com/aseef17/plugins.git)
Merge second remote repo into master
Add dependency override for google_sign_in_platform_interface in the pubspec.yaml

dependency_overrides:
  google_sign_in_platform_interface:
    git:
      url: https://github.com/aseef17/plugins.git
      path: packages/google_sign_in/google_sign_in_platform_interface

Push to origin

Part 2: Create Client ID

Go to Google OAuth Console
Create a new Client ID for Web Applications
Save the Client ID and Client Secret

Part 3a: Setup Android

Add the new Client ID to string.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="default_web_client_id">XXX</string>
</resources>

If you have Firebase, update new google-services.json which now has the new Client ID (optional)

Part 3b: Setup iOS

Manually add the new Client ID to GoogleService-Info.plist

<key>SERVER_CLIENT_ID</key>
<string>YOUR_CLIENT_ID_HERE</string>

Part 4: Override dependencies

Override google_sign_in and google_sign_in_platform_interface in your project with your fork repo

  google_sign_in:
    git:
      url: https://github.com/your_repo/plugins.git
      path: packages/google_sign_in/google_sign_in
      ref: branch or specific_commit
  google_sign_in_platform_interface:
    git:
      url: https://github.com/your_repo/plugins.git
      path: packages/google_sign_in/google_sign_in_platform_interface
      ref: branch or specific_commit```

I am getting
Error 400: invalid_request
Custom scheme URIs are not allowed for 'WEB' client type

I am using SERVER_CLIENT_ID.
Do @zeeshanhussain @aseef17 know how to resolve this?

@vanfresh Hi,  could you please help me little bit.
After all suggested changes I have started to catch the error:
flutter: PlatformException(google_sign_in, Your app is missing support for the following URL schemes: {MY_WEB_CLIENT_ID_REVERSED}, NSInvalidArgumentException, null)
Lost connection to device.

It would be great to get this issue fixed as it is a blocker for anyone who wants to do server-side authentication for Google sign-in.
I did a null-safe version that is working for me. Just add the git dependency:
google_sign_in:
    git:
      url: https://github.com/serverpod/plugins.git
      path: packages/google_sign_in/google_sign_in
      ref: serverpod

It's possible you also need to add to your GoogleService-Info.plist (didn't try without):
<key>SERVER_CLIENT_ID</key>
<string>YOUR_CLIENT_ID_HERE</string>

You can find it in your firebase project settings or you can just check your google-services.json file It'll be the object with the name "client_id".

Thanks for your work, it works fine on Android and iOS. On the other hand, I cannot launch the application on the iOS simulator because of an error. You know why?

building for iOS Simulator, but linking in object file built for iOS, file '/ios/Pods/GoogleSignIn/Frameworks/GoogleSignIn.framework/GoogleSignIn' for architecture arm64


Add .NET environment variables to windows image

Description
Improvement
Adds .NET environments variables that are already being added in the Linux image.
This will remove some noise in the output and squeeze out some performance.
Related issue:
I started a discussion post, but I never received any feedback.
Check list

[ ] Related issue / work item is attached
[ ] Tests are written (if applicable)
[ ] Documentation is updated (if applicable)
[ ] Changes are tested and related VM images are successfully generated

/azp run windows2019, windows2022

Thanks!


Add monitoring

Seems like the tour is down for at least the last ten minutes. Just a ping whether your are aware of this?

No I wasn't. Thanks for the hint. I will reuse this issue for adding monitoring.

Added monitoring using https://uptimerobot.com/. Checks are in a 5 minute interval and a mail sent when the host is down. Anyone having server credentials could be added as an emergency contact at a later stage.


[Feature Request] CACHE-DB-PATH parameter

Ability to define separate location for the db and the chunks.

Thank you @PiscisSwimeatus
It's in the last beta:
Docs updated too: https://github.com/ncw/rclone/blob/master/docs/content/cache.md#--cache-chunk-pathpath
It should be backwards compatible in the sense that if someone was giving a db-path until now will still work for them without having the need to specify a chunk-path. If you want them separate though, you can specify both options or just the last really.


Support openai latest package version & support change split window size

Thanks for this great code. I think it would be great to upgrade code to support latest openai package. By doing so, we can not only support official openai api, but also auzure gpt api and local gpt-like api with vllm.
I have dev some code to support this on my fork repo. Any suggestions to contribute to this repo?

Hey @Duan-JM , appreciate the positive feedback.  Definitely open a PR with those changes and I'll take look, to see if we can get those merged in.  At some point i'll add some notes about "how to contribute" but generally speaking, but here's my draft of "how to contribute to a GitHub repo":

How to Contribute to [Repository Name]

Fork the Repository:

Click on the "Fork" button at the top right corner of the repository page. This will create a copy of the repository in your GitHub account.

Clone the Forked Repository:

Open your terminal and run the following command to clone the repository to your local machine:git clone https://github.com/your-username/repository.git

Create a Branch:

Create a new branch to work on your changes:git checkout -b your-feature-branch

Make Changes:

Make the necessary changes in your local repository using your preferred text editor.

Commit Changes:

Commit your changes with a clear and concise message:git commit -m "Description of your changes"

Push Changes:

Push your changes to your forked repository on GitHub:git push origin your-feature-branch

Open a Pull Request:

Visit the original repository on GitHub and click on the "New Pull Request" button.
Choose your branch and provide a descriptive title and summary of your changes.
Submit the pull request.

Review Process:

We'll review your changes and provide feedback.
Make necessary adjustments based on feedback.

Requirements for Code Changes:

Ensure the code works in vanilla Vim (not just neovim).
Preserve existing features.


Simplify schema by using definitions

Towards https://github.com/giantswarm/roadmap/issues/1949
The diff got out of hand here. But the idea is to add definitions object which is then referenced with $ref. The final file looks like below.
I also added additionalProperties: false because as of right now the schema was only protecting from wrong types, but anything could be specified.
{
    "$schema": "http://json-schema.org/schema#",
    "definitions": {
        "app": {
            "additionalProperties": false,
            "type": "object",
            "properties": {
                "appName": {
                    "type": "string"
                },
                "catalog": {
                    "type": "string"
                },
                "chartName": {
                    "type": "string"
                },
                "clusterValues": {
                    "type": "object",
                    "properties": {
                        "configMap": {
                            "type": "boolean"
                        },
                        "secret": {
                            "type": "boolean"
                        }
                    }
                },
                "extraConfigs": {
                    "type": "array",
                    "items": {
                        "properties": {
                            "kind": {
                                "type": "string"
                            },
                            "name": {
                                "type": "string"
                            }
                        }
                    }
                },
                "forceUpgrade": {
                    "type": "boolean"
                },
                "inCluster": {
                    "type": "boolean"
                },
                "namespace": {
                    "type": "string"
                },
                "version": {
                    "type": "string"
                }
            }
        },
        "userConfig": {
            "additionalProperties": false,
            "type": "object",
            "properties": {
                "configMap": {
                    "type": "object",
                    "properties": {
                        "values": {
                            "type": "string"
                        }
                    }
                }
            }
        }
    },
    "additionalProperties": false,
    "type": "object",
    "properties": {
        "apps": {
            "type": "object",
            "properties": {
                "certExporter": {
                    "$ref": "#/definitions/app"
                },
                "clusterResources": {
                    "$ref": "#/definitions/app"
                },
                "metricsServer": {
                    "$ref": "#/definitions/app"
                },
                "netExporter": {
                    "$ref": "#/definitions/app"
                },
                "nodeExporter": {
                    "$ref": "#/definitions/app"
                },
                "observabilityBundle": {
                    "$ref": "#/definitions/app"
                }
            }
        },
        "clusterName": {
            "type": "string"
        },
        "managementCluster": {
            "type": "string"
        },
        "organization": {
            "type": "string"
        },
        "userConfig": {
            "type": "object",
            "properties": {
                "netExporter": {
                    "$ref": "#/definitions/userConfig"
                },
                "nodeExporter": {
                    "$ref": "#/definitions/userConfig"
                }
            }
        }
    }
}

@marians Can you check this too?

For what you are doing here with definitions, in the latest JSON Schema draft there is the $defs convention. See https://json-schema.org/understanding-json-schema/structuring.html#defs
This would require bringing the $schema value to the latest version, which I'd recommend anyway and which is also what we want with cluster apps in general, as it has an influence on interpretation and validation.


Limit size on justifications

This isn't a perfect solution because there's some error during JSON marshalling, but I don't think we should take the overhead of marshalling the JSON.
Fixes GH-170

Ping @yolocs


A TypeError occurred while running training scripts.

When I was running bash scripts/train_teaser_cat.sh in my Linux server, I got a TypeError. My virtual environment in conda already installed: Python 3.7.12, pytorch 1.7.1, cudatoolkit 10.1.243, torchvision 0.8.2, and ninja 1.10.2. I already tried higher version of pytorch 1.8.1, but it has another problem of subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status. So I returned to the pytorch 1.7.1 environment. I have been troubled by the TypeError problem for several days. Can someone help me solve it? Thanks.
Logs in detail:
(test3) yuanWang@server-TiTan:~/GANtest1$ bash scripts/train_teaser_cat.sh
Traceback (most recent call last):
  File "train.py", line 6, in <module>
    from eval import Evaluator
  File "/data4/yuanWang/GANtest1/eval/__init__.py", line 1, in <module>
    from .evaluation import Evaluator
  File "/data4/yuanWang/GANtest1/eval/evaluation.py", line 7, in <module>
    from run_metrics import get_vgg_features, make_eval_images
  File "/data4/yuanWang/GANtest1/run_metrics.py", line 13, in <module>
    from training.networks.stylegan2 import Generator
  File "/data4/yuanWang/GANtest1/training/networks/__init__.py", line 2, in <module>
    from .misc import *
  File "/data4/yuanWang/GANtest1/training/networks/misc.py", line 1, in <module>
    from . import stylegan2
  File "/data4/yuanWang/GANtest1/training/networks/stylegan2.py", line 8, in <module>
    from .op import FusedLeakyReLU, fused_leaky_relu, upfirdn2d
  File "/data4/yuanWang/GANtest1/training/networks/op/__init__.py", line 1, in <module>
    from .fused_act import FusedLeakyReLU, fused_leaky_relu
  File "/data4/yuanWang/GANtest1/training/networks/op/fused_act.py", line 15, in <module>
    os.path.join(module_path, "fused_bias_act_kernel.cu"),
  File "/data4/yuanWang/anaconda3/envs/test3/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1091, in load
    keep_intermediates=keep_intermediates)
  File "/data4/yuanWang/anaconda3/envs/test3/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1269, in _jit_compile
    is_standalone=is_standalone,
TypeError: bump_version_if_changed() got an unexpected keyword argument 'is_python_module'

Maybe try removing your cache? It should be in ~/.cache/torch_extensions/

Hello! I tried removing all cache file in /.cache/torch_extensions/ and all generated cache folder named __pycache__ in code folder. I renamed GANSketching folder to GANtest1 to storage code. After that, I got the identical error logs.
After the last run, I opened the fused folder in /.cache/torch_extensions/ and found no file in it. It was empty.
Could you please tell me if your code was compiled and executed in Linux environment? If I directly use the CUDA operator you have compiled, can I make the code run normally? Thanks! @PeterWang512

Directly using the compiled code might not work, because I think each machines can have different compiled code. You might want to check this thread to make sure if you are able to make a PyTorch CUDA extension: https://github.com/rosinality/stylegan2-pytorch/issues/1#issuecomment-674079837


Aies Patches

Let's tag these before committing, since all other unfrozen netkans currently have tags.

Let's tag these before merging, since all other unfrozen netkans currently have tags.
https://github.com/KSP-CKAN/CKAN/wiki/Suggested-Tags

I'll add the tags once I get the errors fixed.

@HebaruSan I'm trying to reach you on IRC:
https://webchat.esper.net/?channels=ckan#chan-2

I'm not on IRC. There's a Discord now though:
https://discord.gg/Mb4nXQD


[Feature Request] Set as false of  the editable  property of datePicker is  dones not work

Existing Component
Yes
Component Name
DatePicker
Description
I want to make the input lable is not editable, so i setting the DatePicker's editable property is false,but it dones not work!

It's not supported.


Some addPermittedSubclass methods call invalid addSuperinterface inside.

What happened?
TypeSpec.addPermittedSubclass(Type permittedSubclass) and TypeSpec.addPermittedSubclass(TypeMirro permittedSubclass) incorrectly call TypeSpec.addSuperinterface(... superinterface, boolean avoidNestedTypeNameClashes) instead of TypeSpec.addPermittedSubclass(... superinterface, boolean avoidNestedTypeNameClashes):
https://github.com/palantir/javapoet/blob/9fb628c4b52ea9ec73ac6cb36dedddda4eba6d9f/javapoet/src/main/java/com/palantir/javapoet/TypeSpec.java#L756-L758
https://github.com/palantir/javapoet/blob/9fb628c4b52ea9ec73ac6cb36dedddda4eba6d9f/javapoet/src/main/java/com/palantir/javapoet/TypeSpec.java#L771-L773
What did you want to happen?
They should call the TypeSpec.addPermittedSubclass(... superinterface, boolean avoidNestedTypeNameClashes).

That looks like a bug! Would you like to PR a fix? (I think you’ve opened a pr, but into your own fork)

Oh yeah, my bad. Fixed the PR.


Update Julia Jarvis March to use points from Graham Scan

This uses the points from https://github.com/algorithm-archivists/algorithm-archive/blob/4313e7eb3d2faa152590c631d180d06a5c85f46d/contents/graham_scan/code/julia/graham.jl#L50
It revealed a bug in this implementation that needs to be fixed.

Could you elaborate on the bug a bit?

Sure. The output from the Python code is
(-14, -14)
(15, -9)
(9, 9)
(0, 14)
(-6, 15)
(-10, 11)

but, from the same initial points, the Julia output is
Pos[Pos(-14.0, -14.0), Pos(15.0, -9.0), Pos(-6.0, 15.0), Pos(-14.0, -14.0)]

I haven't bothered to debug this. If someone sees the obvious fix, feel free to modify this PR or issue a new one.

So I was looking at this today. There is definitely a bug in some implementations, but it is unclear what that is because the python code is radically different. We can rewrite the julia code to match the python code, but right now we probably need a better way of defining all the points to find the convex hull.
I really need to revise these chapters anyway, so I'll bump that up on the list.
I feel like we had this discussion somewhere on github before, but I can't find it. Sorry!

The discussion was in https://github.com/algorithm-archivists/algorithm-archive/pull/708#issuecomment-633322788. What solution do you think is better, that one, or this hard-coded set? The points inside or on a circle from a square grid makes more sense to me.

I agree. The only caveat is that we need to somehow ensure all output is the same. A hard-coded set is easier to do that with.

Yes, also my thoughts. Well, we are already going on a system of trust with PR review. One thing that might help is sorting the output. Ideally the output is also not big, which is easily checked.

[lang: julia]


ChatBox

[Enter feedback here]

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

ID: 85af7a99-672c-0438-dcc2-e8edfaf70c54
Version Independent ID: 85af7a99-672c-0438-dcc2-e8edfaf70c54
Content: Use ASP.NET Core SignalR with Blazor
Content Source: aspnetcore/blazor/tutorials/signalr-blazor.md
Product: aspnet-core
Technology: aspnetcore-tutorials
GitHub Login: @guardrex
Microsoft Alias: riande
BlazorServerSignalRApp.zip

Hello @TanHoang0210 ... This is for opening issues pertaining to the documentation on our repo. We don't have a "docs chat" feature. For chat and community support, we recommend the usual public support channels ...

Stack Overflow (tag: blazor)
ASP.NET Core Slack Team
Blazor Gitter


[Bug]: Occasionally losing manual resizing

Before you make the issue, confirm that

[X] You are running the master build from GitHub actions
[X] You have read the FAQ and the usage instructions
[X] You have searched pull requests and issues and have found none similar to your issue
[X] This problem comes from a failure in the tiling system and not a missing feature

Describe the bug
Opening the task switcher (Alt+Tab) or the application launcher (Meta key) often undoes manual resizing.
I observe a similar behavior with other kinds of windows, like notifications, even though the tilePopups config is off.
To reproduce
I'm not always able to reproduce it, but I gathered the logs of when it happens. It seems to happen in both the master (nightly) build and the build from the KDE store.

Having Polonium engine as Binary Tree (haven't tried other engines).
Tile at least 2 windows.
Manually resize a tiled window using Polonium keyboard shortcuts or mouse.
Switch windows with Alt+Tab
The new size is lost upon releasing Alt (thus closing the task switcher).

Expected behavior
Switching windows should not trigger a retiling / should not resize windows.
Log output
Apr 11 00:21:30 desktop kwin_wayland[623340]: qml: Polonium INF: Polonium started!
Apr 11 00:21:30 desktop kwin_wayland[623340]: qml: Polonium DBG: Config is {"debug":true,"tilePopups":false,"filterProcess":["krunner","yakuake","kded","polkit","plasmashell","zoom","org.kde.plasmashell"],"filterCaption":[""],"timerDelay":200,"keepTiledBelow":true,"borders":0,"maximizeSingle":false,"resizeAmount":52,"saveOnTileEdit":false,"engineType":0,"insertionPoint":2,"rotateLayout":false}
Apr 11 00:21:30 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/ui/osd.qml:42: TypeError: Cannot read property 'gridUnit' of undefined
Apr 11 00:21:30 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/ui/osd.qml:41: TypeError: Cannot read property 'gridUnit' of undefined
Apr 11 00:21:30 desktop kwin_wayland[623340]: qml: Polonium DBG: Creating new engine for desktop {"desktop":"17d69135-591a-4cd6-a298-b91f5a1e509f","activity":"53b79edd-f407-4872-b174-30ffe3afee52","output":"DP-1"}
Apr 11 00:21:30 desktop kwin_wayland[623340]: qml: Polonium DBG: Creating new engine for desktop {"desktop":"901c86b4-f36a-470e-8f2b-c8eea5a30596","activity":"53b79edd-f407-4872-b174-30ffe3afee52","output":"DP-1"}
Apr 11 00:21:30 desktop kwin_wayland[623340]: qml: Polonium DBG: Creating new engine for desktop {"desktop":"7d4ea842-8cb2-4d17-bc8e-4dfc4514ff77","activity":"53b79edd-f407-4872-b174-30ffe3afee52","output":"DP-1"}
Apr 11 00:21:30 desktop kwin_wayland[623340]: qml: Polonium DBG: Creating new engine for desktop {"desktop":"db765dfd-69ec-4c99-9a1a-abf4a71665b9","activity":"53b79edd-f407-4872-b174-30ffe3afee52","output":"DP-1"}
Apr 11 00:21:30 desktop kwin_wayland[623340]: qml: Polonium DBG: Creating new engine for desktop {"desktop":"17d69135-591a-4cd6-a298-b91f5a1e509f","activity":"53b79edd-f407-4872-b174-30ffe3afee52","output":"HDMI-A-1"}
Apr 11 00:21:30 desktop kwin_wayland[623340]: qml: Polonium DBG: Creating new engine for desktop {"desktop":"901c86b4-f36a-470e-8f2b-c8eea5a30596","activity":"53b79edd-f407-4872-b174-30ffe3afee52","output":"HDMI-A-1"}
Apr 11 00:21:30 desktop kwin_wayland[623340]: qml: Polonium DBG: Creating new engine for desktop {"desktop":"7d4ea842-8cb2-4d17-bc8e-4dfc4514ff77","activity":"53b79edd-f407-4872-b174-30ffe3afee52","output":"HDMI-A-1"}
Apr 11 00:21:30 desktop kwin_wayland[623340]: qml: Polonium DBG: Creating new engine for desktop {"desktop":"db765dfd-69ec-4c99-9a1a-abf4a71665b9","activity":"53b79edd-f407-4872-b174-30ffe3afee52","output":"HDMI-A-1"}
Apr 11 00:21:31 desktop kwin_wayland[623340]: qml: Polonium DBG: Window systemsettings removed
Apr 11 00:21:31 desktop kwin_wayland[623340]: qml: Polonium DBG: Removing window systemsettings from desktops {"desktop":"7d4ea842-8cb2-4d17-bc8e-4dfc4514ff77","activity":"53b79edd-f407-4872-b174-30ffe3afee52","output":"HDMI-A-1"}
Apr 11 00:21:31 desktop kwin_wayland[623340]: qml: Polonium DBG: Rebuilding layout for desktops {"desktop":"7d4ea842-8cb2-4d17-bc8e-4dfc4514ff77","activity":"53b79edd-f407-4872-b174-30ffe3afee52","output":"DP-1"},{"desktop":"7d4ea842-8cb2-4d17-bc8e-4dfc4514ff77","activity":"53b79edd-f407-4872-b174-30ffe3afee52","output":"HDMI-A-1"}
Apr 11 00:21:31 desktop kwin_wayland[623340]: qml: Polonium DBG: Window systemsettings removed
Apr 11 00:21:31 desktop kwin_wayland[623340]: qml: Polonium DBG: Removing window systemsettings from desktops {"desktop":"7d4ea842-8cb2-4d17-bc8e-4dfc4514ff77","activity":"53b79edd-f407-4872-b174-30ffe3afee52","output":"HDMI-A-1"}
Apr 11 00:21:31 desktop kwin_wayland[623340]: qml: Polonium DBG: Rebuilding layout for desktops {"desktop":"7d4ea842-8cb2-4d17-bc8e-4dfc4514ff77","activity":"53b79edd-f407-4872-b174-30ffe3afee52","output":"DP-1"},{"desktop":"7d4ea842-8cb2-4d17-bc8e-4dfc4514ff77","activity":"53b79edd-f407-4872-b174-30ffe3afee52","output":"HDMI-A-1"}
Apr 11 00:21:31 desktop kwin_wayland[623340]: qml: Polonium DBG: Window systemsettings removed
Apr 11 00:21:31 desktop kwin_wayland[623340]: qml: Polonium DBG: Removing window systemsettings from desktops {"desktop":"7d4ea842-8cb2-4d17-bc8e-4dfc4514ff77","activity":"53b79edd-f407-4872-b174-30ffe3afee52","output":"HDMI-A-1"}
Apr 11 00:21:31 desktop kwin_wayland[623340]: qml: Polonium DBG: Rebuilding layout for desktops {"desktop":"7d4ea842-8cb2-4d17-bc8e-4dfc4514ff77","activity":"53b79edd-f407-4872-b174-30ffe3afee52","output":"DP-1"},{"desktop":"7d4ea842-8cb2-4d17-bc8e-4dfc4514ff77","activity":"53b79edd-f407-4872-b174-30ffe3afee52","output":"HDMI-A-1"}
Apr 11 00:21:32 desktop kwin_wayland[623340]: qml: Polonium DBG: Window kitty hooked into script
Apr 11 00:21:32 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:2412: TypeError: Type error
Apr 11 00:21:32 desktop kwin_wayland[623340]: qml: Polonium DBG: Window kitty hooked into script
Apr 11 00:21:32 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:2412: TypeError: Type error
Apr 11 00:21:32 desktop kwin_wayland[623340]: qml: Polonium DBG: Window kitty hooked into script
Apr 11 00:21:32 desktop kwin_wayland[623340]: qml: Polonium DBG: Window kitty added
Apr 11 00:21:32 desktop kwin_wayland[623340]: qml: Polonium DBG: Adding window kitty to desktops {"desktop":"7d4ea842-8cb2-4d17-bc8e-4dfc4514ff77","activity":"53b79edd-f407-4872-b174-30ffe3afee52","output":"HDMI-A-1"}
Apr 11 00:21:32 desktop kwin_wayland[623340]: qml: Polonium DBG: Rebuilding layout for desktops {"desktop":"7d4ea842-8cb2-4d17-bc8e-4dfc4514ff77","activity":"53b79edd-f407-4872-b174-30ffe3afee52","output":"DP-1"},{"desktop":"7d4ea842-8cb2-4d17-bc8e-4dfc4514ff77","activity":"53b79edd-f407-4872-b174-30ffe3afee52","output":"HDMI-A-1"}
Apr 11 00:21:32 desktop kwin_wayland[623340]: qml: Polonium DBG: QRectF(3440, 45, 2400, 1350) QRectF(3444, 49, 1194, 1342)
Apr 11 00:21:32 desktop kwin_wayland[623340]: qml: Polonium DBG: QRectF(3440, 45, 2400, 1350) QRectF(3444, 49, 2392, 1342)
Apr 11 00:21:32 desktop kwin_wayland[623340]: qml: Polonium DBG: Rebuilding layout for desktops {"desktop":"7d4ea842-8cb2-4d17-bc8e-4dfc4514ff77","activity":"53b79edd-f407-4872-b174-30ffe3afee52","output":"HDMI-A-1"}
Apr 11 00:21:50 desktop kwin_wayland[623340]: qml: Polonium DBG: Window kitty hooked into script
Apr 11 00:21:50 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:2412: TypeError: Type error
Apr 11 00:21:50 desktop kwin_wayland[623340]: qml: Polonium DBG: Window kitty hooked into script
Apr 11 00:21:50 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:2412: TypeError: Type error
Apr 11 00:21:50 desktop kwin_wayland[623340]: qml: Polonium DBG: Window kitty hooked into script
Apr 11 00:21:50 desktop kwin_wayland[623340]: qml: Polonium DBG: Window kitty added
Apr 11 00:21:50 desktop kwin_wayland[623340]: qml: Polonium DBG: Adding window kitty to desktops {"desktop":"7d4ea842-8cb2-4d17-bc8e-4dfc4514ff77","activity":"53b79edd-f407-4872-b174-30ffe3afee52","output":"HDMI-A-1"}
Apr 11 00:21:50 desktop kwin_wayland[623340]: qml: Polonium DBG: Rebuilding layout for desktops {"desktop":"7d4ea842-8cb2-4d17-bc8e-4dfc4514ff77","activity":"53b79edd-f407-4872-b174-30ffe3afee52","output":"DP-1"},{"desktop":"7d4ea842-8cb2-4d17-bc8e-4dfc4514ff77","activity":"53b79edd-f407-4872-b174-30ffe3afee52","output":"HDMI-A-1"}
Apr 11 00:21:50 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:21:50 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:1861: TypeError: Type error
Apr 11 00:21:50 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:21:50 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:1861: TypeError: Type error
Apr 11 00:21:50 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:21:50 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:1861: TypeError: Type error
Apr 11 00:21:50 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:21:50 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:1861: TypeError: Type error
Apr 11 00:21:50 desktop kwin_wayland[623340]: qml: Polonium DBG: QRectF(3440, 45, 1200, 1350) QRectF(3444, 49, 1194, 1342)
Apr 11 00:21:50 desktop kwin_wayland[623340]: qml: Polonium DBG: Rebuilding layout for desktops {"desktop":"7d4ea842-8cb2-4d17-bc8e-4dfc4514ff77","activity":"53b79edd-f407-4872-b174-30ffe3afee52","output":"HDMI-A-1"}
Apr 11 00:21:50 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:21:50 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:1861: TypeError: Type error
Apr 11 00:21:50 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:21:50 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:1861: TypeError: Type error
Apr 11 00:21:50 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:21:50 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:1861: TypeError: Type error
Apr 11 00:21:50 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:21:50 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:1861: TypeError: Type error
Apr 11 00:21:50 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:21:50 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:1861: TypeError: Type error
Apr 11 00:21:50 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:21:50 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:1861: TypeError: Type error
# manual resize
Apr 11 00:21:56 desktop kwin_wayland[623340]: qml: Polonium DBG: Changing size of QRectF(4640, 45, 1200, 1350)
Apr 11 00:21:56 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:21:56 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:1861: TypeError: Type error
Apr 11 00:21:56 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:21:56 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:1861: TypeError: Type error
Apr 11 00:21:56 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:21:56 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:21:56 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:1861: TypeError: Type error
Apr 11 00:21:56 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:21:56 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:1861: TypeError: Type error
Apr 11 00:21:56 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:21:56 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:21:56 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:1861: TypeError: Type error
Apr 11 00:21:56 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:21:56 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:1861: TypeError: Type error
Apr 11 00:21:56 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:21:57 desktop kwin_wayland[623340]: qml: Polonium DBG: Layout modified for tile QRectF(3440, 45, 2400, 1350)
# alt+tab pressed
Apr 11 00:22:00 desktop kwin_wayland[623340]: qml: Polonium DBG: Window  hooked into script
Apr 11 00:22:00 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:2412: TypeError: Type error
Apr 11 00:22:00 desktop kwin_wayland[623340]: qml: Polonium DBG: Window  hooked into script
Apr 11 00:22:00 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:2412: TypeError: Type error
Apr 11 00:22:00 desktop kwin_wayland[623340]: qml: Polonium DBG: Window  hooked into script
Apr 11 00:22:00 desktop kwin_wayland[623340]: qml: Polonium DBG: Window  added
Apr 11 00:22:00 desktop kwin_wayland[623340]: qml: Polonium DBG: Adding window  to desktops
Apr 11 00:22:00 desktop kwin_wayland[623340]: qml: Polonium DBG: Rebuilding layout for desktops {"desktop":"7d4ea842-8cb2-4d17-bc8e-4dfc4514ff77","activity":"53b79edd-f407-4872-b174-30ffe3afee52","output":"DP-1"},{"desktop":"7d4ea842-8cb2-4d17-bc8e-4dfc4514ff77","activity":"53b79edd-f407-4872-b174-30ffe3afee52","output":"HDMI-A-1"}
Apr 11 00:22:00 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:22:00 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:1861: TypeError: Type error
Apr 11 00:22:00 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:22:00 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:1861: TypeError: Type error
Apr 11 00:22:00 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:22:00 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:1861: TypeError: Type error
Apr 11 00:22:00 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:22:00 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:1861: TypeError: Type error
Apr 11 00:22:00 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:22:00 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:1861: TypeError: Type error
Apr 11 00:22:00 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:22:00 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:1861: TypeError: Type error
Apr 11 00:22:00 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:22:00 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:1861: TypeError: Type error
Apr 11 00:22:00 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:22:00 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:1861: TypeError: Type error
Apr 11 00:22:00 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:22:00 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:1861: TypeError: Type error
Apr 11 00:22:00 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:22:00 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:1861: TypeError: Type error
Apr 11 00:22:00 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:22:00 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:1861: TypeError: Type error
Apr 11 00:22:00 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:22:00 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:1861: TypeError: Type error
# alt+tab released
Apr 11 00:22:08 desktop kwin_wayland[623340]: qml: Polonium DBG: Window  removed
Apr 11 00:22:08 desktop kwin_wayland[623340]: qml: Polonium DBG: Removing window  from desktops
Apr 11 00:22:08 desktop kwin_wayland[623340]: qml: Polonium DBG: Rebuilding layout for desktops {"desktop":"7d4ea842-8cb2-4d17-bc8e-4dfc4514ff77","activity":"53b79edd-f407-4872-b174-30ffe3afee52","output":"DP-1"},{"desktop":"7d4ea842-8cb2-4d17-bc8e-4dfc4514ff77","activity":"53b79edd-f407-4872-b174-30ffe3afee52","output":"HDMI-A-1"}
Apr 11 00:22:08 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:22:08 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:1861: TypeError: Type error
Apr 11 00:22:08 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:22:08 desktop kwin_wayland[623340]: qml: Polonium DBG: Window  removed
Apr 11 00:22:08 desktop kwin_wayland[623340]: qml: Polonium DBG: Removing window  from desktops
Apr 11 00:22:08 desktop kwin_wayland[623340]: qml: Polonium DBG: Rebuilding layout for desktops {"desktop":"7d4ea842-8cb2-4d17-bc8e-4dfc4514ff77","activity":"53b79edd-f407-4872-b174-30ffe3afee52","output":"DP-1"},{"desktop":"7d4ea842-8cb2-4d17-bc8e-4dfc4514ff77","activity":"53b79edd-f407-4872-b174-30ffe3afee52","output":"HDMI-A-1"}
Apr 11 00:22:08 desktop kwin_wayland[623340]: qml: Polonium DBG: Window  removed
Apr 11 00:22:08 desktop kwin_wayland[623340]: qml: Polonium DBG: Removing window  from desktops
Apr 11 00:22:08 desktop kwin_wayland[623340]: qml: Polonium DBG: Rebuilding layout for desktops {"desktop":"7d4ea842-8cb2-4d17-bc8e-4dfc4514ff77","activity":"53b79edd-f407-4872-b174-30ffe3afee52","output":"DP-1"},{"desktop":"7d4ea842-8cb2-4d17-bc8e-4dfc4514ff77","activity":"53b79edd-f407-4872-b174-30ffe3afee52","output":"HDMI-A-1"}
Apr 11 00:22:08 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:22:08 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:1861: TypeError: Type error
Apr 11 00:22:08 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:22:08 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:1861: TypeError: Type error
Apr 11 00:22:08 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:22:08 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:1861: TypeError: Type error
Apr 11 00:22:08 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:22:08 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:1861: TypeError: Type error
Apr 11 00:22:08 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:22:08 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:1861: TypeError: Type error
Apr 11 00:22:08 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:22:08 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:1861: TypeError: Type error
Apr 11 00:22:08 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:22:08 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:1861: TypeError: Type error
Apr 11 00:22:08 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:22:08 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:1861: TypeError: Type error
Apr 11 00:22:08 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:22:08 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:1861: TypeError: Type error
Apr 11 00:22:08 desktop kwin_wayland[623340]: qml: Polonium DBG: resizing layout
Apr 11 00:22:08 desktop kwin_wayland[623340]: file:///home/lucas/.local/share/kwin/scripts/polonium/contents/code/main.mjs:1861: TypeError: Type error
Apr 11 00:22:08 desktop kwin_wayland[623340]: qml: Polonium DBG: Layout modified for tile QRectF(3440, 45, 2400, 1350)

Screenshots and videos
No response
Additional context
The logs have lots of TypeError: Type error, maybe related to Polonium re-installs? They started happening when I tried the KDE store version, but persisted after switching back to the nightly build.

Strange that there's a type error, that hasn't happened for me. I feel #139 is relevant here perhaps

I saw that issue, but my callback delay is already set to the max value.

I see in the logs that Polonium is "adding" a window without a class, title, or process name (idk which polonium is logging) - I guess that's the task switcher and it's probably what's causing an unwanted retiling when this window is gone. Is this expected behavior? Any way to exclude this nameless window from tiling?

I see the same behavior on my side, using the task switcher (alt-tab) makes this reproduce 100% of the time for me, though I see the resizing happen when the task switcher is opened, rather than upon release / the task switcher closes.

though I see the resizing happen when the task switcher is opened

I can confirm - the behavior is erratic, the undesirable resizing when the task switcher opens is also common here.

Happens all the time. To give something to reproduce:

open a window, resize, switch desktops, switch back -> size is not remembered.
open a window, resize, open another window -> size is not remembered

The video below shows the issue:
https://github.com/zeroxoneafour/polonium/assets/34311583/6eac5492-efa6-4488-a052-4118e76d6e0b
The only thing that helps to remember size is setting the callback to the max value and to wait at least 3 seconds after resizing before opening another window or switching desktops.
@zeroxoneafour why not just calling a save for the layout after a resizing action?

This also happens when you open KRunner.

This also happens when you open KRunner.

Cannot reproduce this with KRunner.


Differing "Inspect syntax"

For a slight simplification of the program from #5, when clicking Inspect ...
The original CodeWorld site shows stuff like this:

while the mirror site shows stuff like this:

I suspect that there is some "switch" that decides between "Math syntax" and "Haskell syntax", and that the mirror site uses "Math syntax" here even when in "Haskell mode".

This issue will be gone when we finally get our DNS name. But in the meantime we should probably default to Haskell syntax (so it will be wrong for https://autotool.fmi.uni-due.de/codeworld).
@nimec01 Can you figure out which redirects require amendment?

This diff here is the culprit: https://github.com/fmidue/codeworld/commit/d65a7c311cbb0fdb8d04e939c0db0eb2c513231e#diff-abd7686eb82a633a64458affaaec108837d1d549f83c241af262aa02b66202c2L1976
I did not include the mode in the URL. The debug part of codeworld-api hence did not know that this was generated using the Haskell mode.
foreign import javascript unsafe "/\\bmode=haskell\\b/.test(location.search)"
    haskellMode :: Bool

I will open a pull request to fix that.

I still see

on https://autotool.fmi.uni-due.de/haskell

The changes in #11 don't seem to be applied in this deployed version (no mode parameter in the iframe URL). It seems to me that only the library changes (#10) changes were applied. Perhaps a problem during deployment? @marcellussiegburg  The web/ directory in the keter archive might be an old one. This would also explain why #8 is still a thing.
A look into the requested scripts indeed shows that the web/ resources are old.

I redeployed CodeWorld. I am pretty sure this issue (and also #8 are gone now). To rule out caching or other weird stuff: @nimec01 Can you please confirm that the issue is gone (for good) now?

@nimec01 Can you please confirm that the issue is gone (for good) now?

Both the guide and the inspection now work as expected.


Commit data ingestion

Hi Marius,
Sometimes, after I load some data into cubes, I noticed computer memory usage increases a lot.
After read this postgresql article , I found this could be related:

I recently helped a client with serious PostgreSQL problems. Their database is part of an application that configures and monitors large networks; each individual network node reports its status to the database every five minutes. The client was having problems with one table in particular, containing about 25,000 rows — quite small, by modern database standards, and thus unlikely to cause problems.
However, things weren’t so simple: This table was growing to more than 20 GB every week, even though autovacuum was running.  This solved the problem in the short term — but by the end of the week, the database had returned to be about 20 GB in size.  Clearly, something needed to be done about it.
I’m happy to say that I was able to fix this problem, and that the fix wasn’t so difficult. Indeed, the source of the problem might well be obvious to someone with a great deal of PostgreSQL experience. That’s because the problem mostly stemmed from a failure to understand how PostgreSQL’s transactions work, and how they can influence the functioning of VACUUM, the size of your database, and the reliability of your system. I’ve found that this topic is confusing to many people who are new to PostgreSQL, and I thus thought that it would be a useful to walk others through the problem, and then describe how we solved it.

Is it necessary to do some extra commit after using tm1.cubes.cells.write_values_through_cellset ?

Hi @kaleming,
No special kind of commit is required.
I have not seen this behaviour. When using the write_values_through_cellset method, TM1py does create cellsets in TM1 and they do require some additional RAM. However TM1py also removes them and either way all your cellsets are destroyed after you explicitly logout from the instance.
Perhaps you can play with the technical dimension order of the cube, to lower the overall memory footprint of the cube.


Matchkind/Error decls

We need to write a pass that checks that error and matchkind names are not repeated in a given program.

The typechecker already catches this. Right now it gives a kind of unhelpful error message saying "constant already defined!"


each 'id' should only appear once

h2 tags in line 5 and line 11 both have id 'ENDPOINTS', I suppose the h2 tag  in line 5 has a wrong id.

thanks!


message_scroll: Hide scroll to bottom button with using keypress.

Fixes:  https://github.com/zulip/zulip/issues/21844
CZO: https://chat.zulip.org/#narrow/stream/49-development-help/topic/Scroll.20to.20bottom.20button.20flashes.20repeatedly.20after.20scrolling.20.E2.86.91

Screenshots and screen captures:
Updated Animation from jQuery to CSS,
https://user-images.githubusercontent.com/63820270/177474318-eb43c15e-265f-408d-b813-418c5015fd73.mov
Self-review checklist

[x] Self-reviewed the changes for clarity and maintainability
(variable names, code reuse, readability, etc.).

Communicate decisions, questions, and potential concerns.

[ ] Explains differences from previous plans (e.g., issue description).
[ ] Highlights technical choices and bugs encountered.
[ ] Calls out remaining decisions and concerns.
[ ] Automated tests verify logic where appropriate.

Individual commits are ready for review (see commit discipline).

[x] Each commit is a coherent idea.
[x] Commit message(s) explain reasoning and motivation for changes.

Completed manual review and testing of the following:

[ ] Visual appearance of the changes.
[ ] Responsiveness and internationalization.
[ ] Strings and tooltips.
[ ] End-to-end functionality of buttons, interactions and flows.
[ ] Corner cases, error conditions, and easily imagined bugs.

Update the PR with the above review!

Tested on current Firefox, Firefox Dev and Chrome. It works as expected (when scrolling with keyboard the button does not appear at all, when scrolling with mouse the button appears and does not fade in/out unnecessarily).

This is great! I renamed some of the variables for readability, and will merge this shortly.