Improve performance of proposal builder by not DB inserting active set if not necessary

Motivation
Closes #6418
The first proposal created by a node for any identity triggers persisting the activeset that is used by all identities of the node. This can be a slow process (especially when many ATXs are received by the node) and is usually not necessary, because the activeset is most likely already in the DB.
This PR moves persisting the active set to the beginning of an epoch and avoids a DB write if not necessary (which will usually be the case).
Description
All uses of WithTx have been renamed to WithTxImmediate (because they are). A new WithTx was added that starts a normal instead of an immediate transaction.
This transaction is used to first do a select on the available active sets in the DB and only write the used active set if it doesn't exist yet. Since most nodes use the same active set that is pre-shared this will almost never trigger an actual insert preventing the requirement to acquire a DB write lock and speed up the process.
Additionally I fixed an issue where if beginning a transaction failed (because for instance the TX was canceled already via context), the connection used was not returned to the DB pool. This fixes the flaky TestSyncer test in the malsync package and ensures this doesn't happen during normal node operation.
Test Plan
existing tests pass
TODO

[x] Explain motivation or link existing issue(s)
[x] Test changes and document test plan
[x] Update documentation as needed
[x] Update changelog as needed

bors try

bors try

bors merge


Closes https://github.com/DockYard-Academy/beta_curriculum/issues/153

@BrooklinJazz created a WIP PR. I have also added the script file which I used to automate adding git section to files. I'll remove this when PR is ready to merge.
Please review :)

@aayushmau5 This is looking great! Let me know when it's not WIP. I'll handle the merge conflicts and merge. (otherwise, you'll have to keep resolving them, so I'll just do it right before I approve and merge)

@BrooklinJazz sure!
I'll remove the script file, then I think it will be ready to merge.

Also @aayushmau5 I wonder if we can keep the script file?
We could add a quick check to see if the current file already contains the git message. Otherwise, run the file change as normal.
This way, we can use the script for new content. It's also a good example for future scripts.
Extra bonus points if you create a mix task to run the script!

@BrooklinJazz alright. That makes sense.
I'll do that :). Perhaps put these scripts into utils directory or create a scripts directory as well.

A scripts directory or putting it into utils works for me! I don't have a strong preference

Thank you for the awesome work @aayushmau5! I'll go through and handle conflicts then merge once I have some time! Signing off for tonight 😴

@BrooklinJazz created mix task for the script, mix add_git_section. Please review :)

Great Work!


NetworkHelper Fixes

Now checks that class extends Packet rather than is Packet now actually adds on the extended id size to the packet size when needed

I can agree with these new mixins as well
Leaves global packet modification as an easy thing to do


Implement a filter that solves the wave equation

Coverage increased (+0.2%) to 85.94% when pulling ca0e79b7846751fb590a8ea46addba35334cb361 on wave-filter into fa0e3d08a1d48d05ccada9eb9ac82d967677753d on master.


[Android] Deprecated OKHeaders from OKHttp

On compiling with RN 0.31, I have this error message :
C:\Dev\node_modules\react-native-fetch-blob\android\src\main\java\com\RNFetchBlob\RNFetchBlobReq.java:48: error: cannot find symbol
import okhttp3.internal.http.OkHeaders;
                            ^
  symbol:   class OkHeaders
  location: package okhttp3.internal.http
Note: C:\Dev\node_modules\react-native-fetch-blob\android\src\main\java\com\RNFetchBlob\RNFetchBlobUtils.java uses or overrides a deprecated API.

:react-native-fetch-blob:compileReleaseJavaWithJavac FAILED

After a little investigation, OKHeaders.java was removed from version 3.4.0
https://github.com/square/okhttp/tree/parent-3.4.0/okhttp/src/main/java/okhttp3/internal/http
Last version to include it is  3.3.1
https://github.com/square/okhttp/tree/parent-3.3.1/okhttp/src/main/java/okhttp3/internal/http
I don't know what's best here :

Either inform users to downgrade okhttp to use 3.3.1
Modify the RNFetchBlobReq.java to use HttpHeaders that replace OKHeaders.

Don't know the potential drawbacks of either method, will let you make that choice ;-)

Trying to use
   compile 'com.squareup.okhttp3:okhttp:3.3.1'
didn't work actually...

@mlumbroso , thank you so much for doing the investigation 👍  I haven't tried the library on RN 0.31 yet, but I'll try to figure out where the problem is 😏

@mlumbroso , I've fixed the issue by removing the import state, please try install latest version 0.8.2 I suppose it should work properly now.

I believe it is still not fixed as I am getting errors like:
node_modules\react-native-fetch-blob\android\src\main\java\com\RNFetchBlob\Response\RNFetchBlobDefaultResp.java:12: error: package okhttp3 does not exist
import okhttp3.Call;

Also, I've found that lib's
build.gradle file has
dependencies {
    compile 'com.facebook.react:react-native:+'
    //{RNFetchBlob_PRE_0.28_DEPDENDENCY}
}

and changing it to
dependencies {
    compile 'com.facebook.react:react-native:+'
    compile 'com.squareup.okhttp3:okhttp:3.4.1'
}

fixes the problem

@tadas-subonis , Thank you for your information. I'll reopen this issue in case someone getting the same error, I'll take some time to fix this issue.

Added OkHttp dependency cddd160

Add Android OkHttp dependency that overrides react-native's OkHttp dependency may lead to app crash when using Debug Mode, therefore I removed the dependency again, and use another way to fix this problem.
See commit

it is still not fixed as I am getting errors like:
RNFetchBlobBody.java:21: package okhttp3 does not exist import okhttp3.MediaType;               ^ .../node_modules/react-native-fetch-blob/android/src/main/java/com/RNFetchBlob/RNFetchBlobBody.java:22: package okhttp3 does not exist import okhttp3.RequestBody;
On compiling with RN 0.31

@czciou , which version of react-native-fetch-blob are you using ?

No problem on updating to the last release, seems fixed to me :-)

Okay, let's close this issue.

Using react-native-fetch-blob 0.9.6 and I'm still getting this issue :(
(...) node_modules/react-native-fetch-blob/android/src/main/java/com/RNFetchBlob/RNFetchBlobBody.java:20: error: package okhttp3 does not exist import okhttp3.MediaType;
RN 0.33.0

Scrap last comment. I made a brand new project and after installing rnfb lib there it was working so there must've been something wrong with the android project in my previous project.


Add padStart langlib function to string.bal

Please refer to : https://github.com/ballerina-platform/ballerina-spec/commit/a411a67b2216422f685d4fff27baedfcacd06a41

added 1 more point to add padZero function too. @SandaruJayawardana


react-scripts 4.0.1 is very slow

Describe the bug
react-scripts 4.0.1 is very slow on start and reload, by and without FAST_RELOAD, yarn start takes more than 2 minute now after update.
Did you try recovering your dependencies?

yes
Which terms did you search for in User Guide?

(Write your answer here if relevant.)
Environment

Ubuntu v20.10
Node v12.18.2 LTS
yarn v1.22.5
Steps to reproduce

update react-scripts to v4.0.1
using typescript
large scale project

Unfortunately without any sort of reproduction steps we can't help diagnose the slow compilation you're experiencing. You may want to take a look at https://github.com/facebook/create-react-app/issues/9886 to see if you're experiencing the same issues, and post your findings in there.

You just have to create a blank project using npx create-react-app slow-issues and start it using npm start.
I personally have around 7 seconds of compiling time on a blank project.
Version of CRA
npx create-react-app --version
npx : 67 installed within 7.081s
4.0.1

This is indeed a problem @ianschmitz, and I've confirmed what @imsandez reported above.
Also, I've opened an issue with the eslint-webpack-plugin since it's originating from there.
Adding
  "resolutions": {
    "react-scripts/eslint-webpack-plugin": "2.3.0"
  }

At the end of package.json and yarn again will fix the issues. It is currently being discussed here: https://github.com/webpack-contrib/eslint-webpack-plugin/issues/52

@eek Thank you ! As a beginner, I'd specify the package.json file of the react-scripts dependancy in the node modules folder (I thought about the package.json file at the root of the project but of course it didn't work).
I followed your instructions:

set "threads: false" in react-scripts' webpack.config.js
added "resolution" in react-scripts' package.json file
npm install

Went from more than 2mins to start the project to 6s...thank you so much !

@eek Thank you ! As a beginner, I'd specify the package.json file of the react-scripts dependancy in the node modules' folder (I thought about the package.json file at the root of the project but of course it didn't work).
I followed your instructions:

set "threads: false" in react-scripts' webpack.config.js
added "resolution" in react-scripts' package.json file
npm install

Went from more than 2mins to start the project to 6s...thank you so much !

I can't find webpack.config.js, can you help me with that?

@eek Thank you ! As a beginner, I'd specify the package.json file of the react-scripts dependancy in the node modules' folder (I thought about the package.json file at the root of the project but of course it didn't work).
I followed your instructions:

set "threads: false" in react-scripts' webpack.config.js
added "resolution" in react-scripts' package.json file
npm install

Went from more than 2mins to start the project to 6s...thank you so much !

I can't find webpack.config.js, can you help me with that?

@eek Thank you ! As a beginner, I'd specify the package.json file of the react-scripts dependancy in the node modules' folder (I thought about the package.json file at the root of the project but of course it didn't work).
I followed your instructions:

set "threads: false" in react-scripts' webpack.config.js
added "resolution" in react-scripts' package.json file
npm install

Went from more than 2mins to start the project to 6s...thank you so much !

Hi guys, I don't see any "threads: false" in my webpack.config.js file. Where can I find this? or where can I manually add it?

my react-script is too slow help me

If you use WSL, you should create a folder in WSL system (e.i. /home/user/folder), because /mnt/... is very slow.
If you use remote server check its load with command htop. If it's ok, your system is slow, upgrade it :)

If you use WSL, you should create a folder in WSL system (e.i. /home/user/folder), because /mnt/... is very slow.
If you use remote server check its load with command htop. If it's ok, your system is slow, upgrade it :)

thank you for the answer, but I noticed that the problem came from my operating system, by the way I was using windows 11, now I am going back to windows 10 and there is no more this problem thank you

I've already changed my  start script to
  ...
  "scripts": {
    "start": "DISABLE_ESLINT_PLUGIN=true react-scripts start",
  },

to skip linting entirely, so then I assume the
  "resolutions": {
    "react-scripts/eslint-webpack-plugin": "2.3.0"
  }

change wouldn't affect startup time in my case?

If you use WSL, you should create a folder in WSL system (e.i. /home/user/folder), because /mnt/... is very slow.
If you use remote server check its load with command htop. If it's ok, your system is slow, upgrade it :)

thank you for the answer, but I noticed that the problem came from my operating system, by the way I was using windows 11, now I am going back to windows 10 and there is no more this problem thank you

I think my laptop was slow, I bought it 7 years ago. The new one works perfectly fine and react scripts don't have this problem anymore.

If you use WSL, you should create a folder in WSL system (e.i. /home/user/folder), because /mnt/... is very slow.
If you use remote server check its load with command htop. If it's ok, your system is slow, upgrade it :)

thank you for the answer, but I noticed that the problem came from my operating system, by the way I was using windows 11, now I am going back to windows 10 and there is no more this problem thank you

I think my laptop was slow, I bought it 7 years ago. The new one works perfectly fine and react scripts don't have this problem anymore.

ok

If you use WSL, you should create a folder in WSL system (e.i. /home/user/folder), because /mnt/... is very slow.
If you use remote server check its load with command htop. If it's ok, your system is slow, upgrade it :)

thank you for the answer, but I noticed that the problem came from my operating system, by the way I was using windows 11, now I am going back to windows 10 and there is no more this problem thank you

I think my laptop was slow, I bought it 7 years ago. The new one works perfectly fine and react scripts don't have this problem anymore.

ok

Yes

I reinstall node js and it's good

If you use WSL, you should create a folder in WSL system (e.i. /home/user/folder), because /mnt/... is very slow. If you use remote server check its load with command htop. If it's ok, your system is slow, upgrade it :)

Same for me! Thaks fo the tip!
WSL Ubuntu 20.04 on  /mnt/...

@eek Thank you ! As a beginner, I'd specify the package.json file of the react-scripts dependancy in the node modules' folder (I thought about the package.json file at the root of the project but of course it didn't work).
I followed your instructions:

set "threads: false" in react-scripts' webpack.config.js
added "resolution" in react-scripts' package.json file
npm install

Went from more than 2mins to start the project to 6s...thank you so much !

 Hi guys, I don't see any "threads: false" in my webpack.config.js file. Where can I find this? or where can I manually add it?

I know this has been there for 2 years, but I followed @eek 's answer and added :

in webpack.config.js of react-scripts package, I also added react-scripts/eslint-webpack-plugin :

And ran Npm install, I don't know if that changed anything, but I went from 20+ min to run my app with npm start to ~2-3 min to run it.
Not yet optimal, but that's way better.


Difference in Activities from SigProfilerExtractor and SigProfilerAssignment

Hi,
I used SigProfilerExtractor v1.1.21 for de novo exctraction of CN signatures and sigProfilerAssignment v0.0.30 on the same samples used for the extraction. I compared the activities assigned to the samples in the De_Novo_Solution from the extraction and the Activities in the denovo_fit results from SigProfilerAssignment (no decomposition into COSMIC because I'm using other features). The activities are completely different even if I'm using the same penalties in both tools. How is it possible? What should I change to match them?

Hi @micoli98,
Thanks for reaching out. Could you please provide your output directories so that we can take a closer look? You can send via e-mail<EMAIL_ADDRESS>Thanks!

Thank you, I just sent them to that email

Hi @micoli98,
I reviewed your output files from SigProfilerExtractor and SigProfilerAssignment and then reproduced the environment with package versions listed in your JOB_METADATA.txt file. Samples.txt and De_Novo_Signatures.txt were used for input and SigProfilerAssignment's denovo_fit() was ran. The output activity matrix was the same as the activity matrix from SigProfilerExtractor. I suspect the input file for SigProfilerAssignment and SigProfilerExtractor may have been different during your run. Please reach out if you have any additional questions.
Thanks!


[BUG]  App with sqlite3.dll, only works as admin

:information_source: Info

Version: v2.8.1
:speech_balloon: Description

After flutter build windows i put sqlite3.dll on output folder. Then run flutter pub run msix:create.
Then make install with msix in a new clean computer.
In app folder c:\program files\windowsapps\myapp the sqlite3.dll is there, alright.
But if i run the app from start menu, app cannot load dll.
If i run from the folder, then app can load dll and works correctly.
If i run from start menu as admin, then app can load dll and works correctly.
So i think problem is related with some permissions to run with capabilities to execute thirty party dlls, but i can't find in documentation.
I'm using https://pub.dev/packages/sqflite_common_ffi package, and if i run .exe from folder, with sqlite3.dll on same folder as .exe, work correctly. Only with msix instalation and then run from start menu as common user is problem.
:scroll: Pubspec.yaml
name: xxxxxxxxx
description: A new Flutter project.
publish_to: 'none'
version: 1.0.0+1

environment:
  sdk: ">=2.15.1 <3.0.0"

dependencies:
  flutter:
    sdk: flutter

  cupertino_icons: ^1.0.2
  webview_windows: ^0.1.2
  webview_flutter: ^3.0.0
  flutter_vector_icons: ^1.0.0
  sqflite: ^2.0.1
  path: ^1.8.0
  sqflite_common_ffi: ^2.1.0
  file_picker: ^4.3.1
  archive: ^3.1.6
  html: ^0.15.0
  charset: ^0.2.0
  hive: ^2.0.5
  http: ^0.13.4
  path_provider: ^2.0.8
  xml: ^5.3.1
  url_launcher: ^6.0.17
  flutter_easyloading: ^3.0.3
  move_to_background: ^1.0.2
  cryptography: ^2.0.5
  share_plus: ^3.0.4
  bitsdojo_window: ^0.1.1+1

dev_dependencies:
  flutter_test:
    sdk: flutter

  flutter_launcher_icons_maker: "^0.10.1"
  msix: ^2.8.1

flutter_icons:
  android: true
  ios: true
  windows: true
  remove_alpha_ios: true
  image_path: "assets/icon/icon.png"
  image_path_android: "assets/icon/android_icon.png"
  image_path_ios: "assets/icon/ios_icon.png"

flutter:
  uses-material-design: true
  assets:
    - assets/nocover.png
    - assets/nocover.jpg
  fonts:
    - family: Roboto Mono
      fonts:
        - asset: assets/RobotoMono-Regular.ttf
    - family: M1
      fonts:
        - asset: assets/fonts/mplus-1m-regular.ttf
    - family: Ubuntu
      fonts:
        - asset: assets/fonts/UbuntuMono-R.ttf

msix_config:
  display_name: XXXXX
  publisher_display_name: XXXX
  logo_path: "assets/icon/icon.png"

Hey
Can you please try this with the assets_directory_path folder,
See: https://github.com/YehudaKremer/msix#file_folder-dll-files-and-assets-ffi-library
Let see if its resolve the admin problem

Hey
Can you please try this with the assets_directory_path folder, See: https://github.com/YehudaKremer/msix#file_folder-dll-files-and-assets-ffi-library
Let see if its resolve the admin problem

I already tried, but the packe put the dll in a subfolder
how can i do to make package put the dll in root folder?

Please try this:
https://github.com/YehudaKremer/msix/issues/72#issuecomment-1003711861

Please try this: #72 (comment)

Tried, but problem still works.
But i found the problem.
Not related to your package, sorry for this.
But if somebody need the solution, here a explanation:
When chosse the path of database file, if we use this function databaseFactoryFfi.getDatabasesPath() then the location of final release return c:\windows\system32\.dart_tool\sqflite_common_ffi\databases. But this directory require admin permissions to read/write.
So for fix, i change my code to use path_provider and get the directory with getApplicationSupportDirectory() function. Then everything works now.
Here my peace of code for who need help:
BEFORE:
 Future<Database> openConnection() async {
    sqfliteFfiInit();

    final databasePah = await databaseFactoryFfi.getDatabasesPath();  <<< HERE THE PROBLEM

    var databasePathFinal = join(databasePah.path, _DATABASE_NAME);

    DatabaseFactory databaseFactory = databaseFactoryFfi;

    _db = await databaseFactory.openDatabase(databasePathFinal,
           options: OpenDatabaseOptions( ...
           ...

AFTER:
 Future<Database> openConnection() async {
    sqfliteFfiInit();

    final databasePah = await pathprovider.getApplicationSupportDirectory();   <<< HERE THE SOLUTION

    var databasePathFinal = join(databasePah.path, _DATABASE_NAME);

    DatabaseFactory databaseFactory = databaseFactoryFfi;

    _db = await databaseFactory.openDatabase(databasePathFinal,
           options: OpenDatabaseOptions( ...
           ...

Wonderful👍
Thanks for sharing your solution


Unable to generate signed apk

Your Environment

Plugin version: 3.1.0
Platform: Android
OS version:
Device manufacturer and model:

Running in Simulator:
Cordova version (cordova -v): --- Capacitor with navite plugin
Cordova platform version (cordova platform ls): ---
Plugin configuration options:
Link to your project:

Context

Trying generating signed apk in android studio.
Expected Behavior

Actual Behavior

Gets error:

Type org.apache.commons.io.Charsets is defined multiple times
com.android.tools.r8.CompilationFailedException: Compilation failed to complete

Possible Fix

Steps to Reproduce

Plugins:
@mauron85/cordova-plugin-background-geolocation (3.1.0)
cordova-plugin-actionsheet (2.3.3)
cordova-plugin-badge (0.8.8)
cordova-plugin-device (2.0.3)
cordova-plugin-dialogs (2.0.2)
cordova-plugin-ionic (5.4.7)
cordova-plugin-whitelist (1.3.4)
cordova-sms-plugin (1.0.0)
uk.co.workingedge.phonegap.plugin.launchnavigator (5.0.4)
Context

Problem appears only on signed apk
Debug logs

I'm able to sign my app, but I'm not using all your plug-ins.
Here's my app package.json file:
https://github.com/IsraelHikingMap/Site/blob/4ed26c9817f1deab55a7a6e80e7e9d4ba006ddb7/IsraelHiking.Web/package.json#L52
Might be a plugin collision, I don't know...

I got the error from:
"cordova-plugin-ionic": "5.4.7",
"cordova-plugin-whitelist": "^1.3.4"
they're added by initializing ionic appflow service

Resolved by editing dependencies and plugin.xml

I've created fork to solve this problem
https://github.com/darron1217/cordova-plugin-background-geolocation/tree/bugfix
You can install it by npm install https://github.com/darron1217/cordova-plugin-background-geolocation.git#bugfix

Awesome work @darron1217 that saved the day!
I had the same issue while trying to sign the app. It was working without signing.
Can we get this merged @mauron85? 🙏
In appflow now I have progress, and getting the same thing mentioned here https://github.com/mauron85/cordova-plugin-background-geolocation/issues/562#issuecomment-588174021

@vuk-nikolic I'm having the same issue too. There is a workaround suggested here but I haven't tried it #728 and it seems a bit hacky. Seems like a Capacitor bug, as I have the strings.xml file in the right place, but somehow those values aren't being seen when packaging this plugin.

I’m not a maintainer of the project (or connected to it).
In the workaround that worked for me I physically copied the file to plugin’s location for string.xml
Can’t really help you more than that, I do not know plugin’s internals.
In our case it was a bit of a pain to make it work with capacitor/ionic combo.
Vuk Nikolić
phone: +381641189891 (Serbia)
phone: +18152909799 (USA)
skype: vuk.nikolic
On 12 Oct 2020, 15:25 +0200, Todd Miller<EMAIL_ADDRESS>wrote:

@vuk-nikolic I'm having the same issue too. There is a workaround suggested here but I haven't tried it #728 and it seems a bit hacky. Seems like a Capacitor bug, as I have the strings.xml file in the right place, but somehow those values aren't being seen when packaging this plugin.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

@vuk-nikolic could you elaborate a bit more please, I am facing the same issue and got stuck on the
AAPT: error: resource string/mauron85_bgloc_content_authority (aka capacitor.android.plugins:string/mauron85_bgloc_content_authority) not found.

@vuk-nikolic could you elaborate a bit more please, I am facing the same issue and got stuck on the
AAPT: error: resource string/mauron85_bgloc_content_authority (aka capacitor.android.plugins:string/mauron85_bgloc_content_authority) not found.

@LgArcida  this is how you fix it

sorry @LgArcida, unfortunately we're no longer using this plugin.

@vuk-nikolic Also, if you're using Capacitor, the app will still die after 5 minutes of being in the background because Capacitor turns off timers when going into the background. Not a problem on iOS though. Just saw you're not using it anymore, what plugin did you switch to?

We're using capacitor and paid version of https://github.com/transistorsoft/cordova-background-geolocation-lt

I've created fork to solve this problem https://github.com/darron1217/cordova-plugin-background-geolocation/tree/bugfix
You can install it by npm install https://github.com/darron1217/cordova-plugin-background-geolocation.git#bugfix

Hi Darron, I installed your repo and even forked my own and did the same modification. However, in Appflow build it says it can't find the gitmodule files. I reckon it's because the gitmodules didn't get installed. Did you encounter this problem?

This plugin is practically dead. We are maintaining a fork under here if anyone is interested:
https://github.com/HaylLtd/cordova-background-geolocation-plugin

This plugin is practically dead. We are maintaining a fork under here if anyone is interested: https://github.com/HaylLtd/cordova-background-geolocation-plugin

Thanks for the info and maintaining the plugin.
Does your repo support Capacitor? As ionic's official plugin is based on mauron85's plugin with their awesome-cordova-plugin as an interface, I'm afraid Capacitor won't be able to run with your plugin.

I'm still not using capacitor, so I don't know.
But if you send a PR to help fixing what's missing I'll be happy to review it :-)

@HarelM  I don't think its something to be done with your repo. I just submitted a request to ionic's repo asking them to move onto your repo.
==============================
My workaround
After years not being able to build thru Appflow I took 2 weeks updated my App to Capacitor. Spent more than a week digging why Appflow still couldn't build with Capacitor. I tried capacitor background geolocation plugin, but it uses Google APIs but my devices do not have Google APIs. I tried migrating mauron85's functions into capacitor plugin but the result was not good enough. So if you are facing the same situation, do what I write below.
For others using capacitor that got errors from Appflow:

android/capacitor-cordova-android-plugins/src/main/res/xml/authenticator.xml:7: AAPT: error: resource mipmap/ic_launcher (aka capacitor.android.plugins:mipmap/ic_launcher) not found.
android/capacitor-cordova-android-plugins/src/main/AndroidManifest.xml:20:1-199: AAPT: error: resource string/mauron85_bgloc_content_authority (aka capacitor.android.plugins:string/mauron85_bgloc_content_authority) not found.
Error: ENOENT: no such file or directory, stat<EMAIL_ADDRESS>
I have got an workaround at my repo:https://github.com/txlife/cordova-plugin-background-geolocation
Fork your own repo or simply use mine.
What I have done is:

Copied android/common submodule's files into the repo as local files. Since no one is maintaining the original repo so it does not make any difference. This solves Problem #3.
Modified plugin.xml, added

<resource-file src="android/common/src/main/res/values/strings.xml" target="res/values/strings.xml" />

3.Updated strings.xml with:
<?xml version="1.0" encoding="utf-8"?>
<resources>
  <string name="mauron85_bgloc_account_name">$ACCOUNT_NAME</string>
  <string name="mauron85_bgloc_account_type">$ACCOUNT_TYPE</string>
  <string name="mauron85_bgloc_content_authority">$CONTENT_AUTHORITY</string>
  <string name="mauron85_bgloc_account_label">$ACCOUNT_LABEL</string>
  <string name="mauron85_bgloc_icon">$ICON</string>
  <string name="mauron85_bgloc_small_icon">$SMALL_ICON</string>
</resources>

4.Updated authenticator.xml with:
<?xml version="1.0" encoding="utf-8"?>
<account-authenticator
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:accountType="@string/mauron85_bgloc_account_type"
    android:icon="@string/mauron85_bgloc_icon"
    android:smallIcon="@string/mauron85_bgloc_small_icon"
    android:label="@string/mauron85_bgloc_account_label"/>

Now the appflow should be able to build.
The method mentioned here might also work, it seems working to me but didn't try thru appflow. It basically does the same thing.
In my repo, I also used @darron1217 's modifications to resolve the issues of this original post. I didn't fork darron's repo was because I thought his repo was causing issues but actually it was not the case.
==================
For cordova users you might want to try https://github.com/mauron85/cordova-plugin-background-geolocation/issues/707#issuecomment-1030029784


Improvement of language

There is room to improve the language in the tutorial.
I plan to work through the tutorial pages and suggest changes where things could be formulated in a clearer way.

Being able to share more easily (going down the list here)
is transformative because it allows projects to scale to a new
level.
@sunnivin: I do not quite understand this sentence. What is meant with a new level in this context? I understand whit it is trying to say, though.

Being able to share more easily (going down the list here)
is transformative because it allows projects to scale to a new
level.
@sunnivin: I do not quite understand this sentence. What is meant with a new level in this context? I understand whit it is trying to say, though.

Thank you for the issue @ziu1986 .
This lesson was made at a point where my schedule was very hectic so I guess there is a lot of potential for improvement. I will also cycle back on the language, but if you find something unclear I'm really happy to have a PR:)

Being able to share more easily (going down the list here)
is transformative because it allows projects to scale to a new
level.

@sunnivin: I do not quite understand this sentence. What is meant with a new level in this context? I understand whit it is trying to say, though.

This is a bad copy-and-paste done in a hurry. The point of the episode is to argue for the big list of positive impacts code reviews can do for a project/team.

Thank you for the issue @ziu1986 .
This lesson was made at a point where my schedule was very hectic so I guess there is a lot of potential for improvement. I will also cycle back on the language, but if you find something unclear I'm really happy to have a PR:)

Being able to share more easily (going down the list here)
is transformative because it allows projects to scale to a new
level.

@sunnivin: I do not quite understand this sentence. What is meant with a new level in this context? I understand whit it is trying to say, though.

This is a bad copy-and-paste done in a hurry. The point of the episode is to argue for the big list of positive impacts code reviews can do for a project/team.

Point to improve the workflow:
If you (@ziu1986,) could write the episode number/file name where you detected an error it would be much faster for me to detect and perform the suggested changes.

Point to improve the workflow:
If you (@ziu1986,) could write the episode number/file name where you detected an error it would be much faster for me to detect and perform the suggested changes.

Point to improve the workflow:
If you (@ziu1986,) could write the episode number/file name where you detected an error it would be much faster for me to detect and perform the suggested changes.

I will make sure that I'll do this in my PR :-)

Point to improve the workflow:
If you (@ziu1986,) could write the episode number/file name where you detected an error it would be much faster for me to detect and perform the suggested changes.

I will make sure that I'll do this in my PR :-)

Point to improve the workflow:
If you (@ziu1986,) could write the episode number/file name where you detected an error it would be much faster for me to detect and perform the suggested changes.

I will make sure that I'll do this in my PR :-)

And to avoid duplication. Please make sure that you are working on the latest version. I have done some cleaning myself ;)

Point to improve the workflow:
If you (@ziu1986,) could write the episode number/file name where you detected an error it would be much faster for me to detect and perform the suggested changes.

I will make sure that I'll do this in my PR :-)

And to avoid duplication. Please make sure that you are working on the latest version. I have done some cleaning myself ;)


Module compiled with Swift 5.2.4 cannot be imported by the Swift 5.3.2 compiler

I'm getting this error while building the code.
Xcode Version: 12.3

Are you using Carthage? If so you need to tell Carthage to rebuild the dependencies. Otherwise you need to do a clean build in Xcode.

@ffried  I'm using CocoaPods in my project. I have tried everything clean project, restart, etc.

Are you using toolchains? Or simply a standard Xcode installation? Are you having multiple versions of Xcode installed on your machine?
What's the output of xcode-select -p? Is that the same Xcode you're trying to build with?

No, I'm not using toolchains.
Yes, I have two xcodes 11.7 & 12.3
Output for xcode-select -p:   /Applications/Xcode.app/Contents/Developer
Yes

Ok, that's weird.
What does swift --version say?
Have you tried deleting derived data and module cache yet?

DerivedData -> ~/Library/Developer/Xcode/DerivedData/YourProjectName-someSuffix
ModuleCache ->  ~/Library/Developer/Xcode/DerivedData/ModuleCache.noindex

swift --version
Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1<IP_ADDRESS>)
Target: x86_64-apple-darwin20.2.0
I tried to clear both things.

Actually, before updating to Xcode 12.3, I was building the project on Xcode 11.7. Getting this error when I run on Xcode 12.3

It seems like there's a binary built with Xcode 11.7 (which contained Swift 5.2.4) referenced somewhere.
Could you please check the following for me:

In the project navigator (left pane, first tab), select your project.
Then select the target you're trying to build.
Go to Build Phases
Expand the "Link Binary With Libraries" build phase.
Find CocoaLumberjackSwift and right-click it.
Select "Show in Finder"

If you don't end up somewhere in DerivedData, you likely need to re-link the dependency.

Since you're using CocoaPods, you might need to check this in the Pods Project. Not sure how CocoaPods splits things up nowadays...

@nitinkumardb
CocoaPods is strongly connected to Xcode (version). So you need to change Xcode version to 12.3 first.
# Select your Xcode 12.3's path.
sudo xcode-select -s /Applications/Xcode_12.3.app/Contents/Developer

Then, please make sure that your Swift version has changed to 5.3.2 and CocoaPods version is 1.4.0 or later
swift --version
pod --version

Next, please clean data, cache, and Pofile.lock
rm -rf ~/Library/Developer/Xcode/DerivedData
pod deintegrate
pod cache clean
rm Podfile.lock

Finally rebuild!
pod repo update
pod install

I hope this information is helpful for you:)

@sushichop I have tried these steps but bad luck, still getting the same error.

@nitinkumardb It's strange...
Did you build using Xcode 12.3 only ? If your answer is yes, please check SWIFT_VERSION about Pods' project. Or you may need to uninstall Xcode 11.3...


Right side of the clock is hidden in mobile view

Admin 5.1.15
info Adapter 1.9.7
Right side of the clock is hidden by the text area bloc of day and date.

just cosmetic ... we will not change that


Updating from 1.x: How to replace .lists.merge_var_add?

Hi, thanks for this gem!
I'm in the process of updating versions and the old code base used to do something like
Gibbon::API.new(list.mailchimp_api_key).lists.merge_var_add(id: list.mailchimp_list_id, tag: 'PLAN', name: 'Plan')

which went to api.mailchimp.com/2.0/lists/merge-var-add
I haven't found a replacement in the new version that I could call on e.g.
 Gibbon::Request.new(api_key: list.mailchimp_api_key)

How can I do this?

Hi @SubandiK. As Gibbon wraps Mailchimp's API directly, you'll want to look at their API docs for merge fields. There's some info on how to add merge fields there that should help.
It should be something like
gibbon.lists(list_id).merge_fields.create(body: {...})

where body is populated w/ the params based on the API docs

Thanks, yeah that will work too! Was just thinking I'm missing something obvious here.


Add GETH_HEADERS to be set as a config environment variable

Motivation
When connecting to remote/hosted nodes, they often require some form of authentication. This is either in the URL as a query or url parameter.
However, in the case of BlockDaemon, it’s an HTTP header X-Auth-Token.
Solution
I found the only way to address this was to add another environment variable GETH_HEADERS that allows you to pass in a comma separated list of key:values.
Open questions
None

I've added some checks to the configuration_test.go -> let me know if that's ok, happy to add more or change.

@akramhussein configuration tests look good! can we add a test for the client as well i.e. when the configuration contains geth headers, they get set in the geth calls? 🙏
Also, sometimes the builds get stuck like they have on your last commit.  :)

Sure - where should this test go, in client_test.go?

I might need some guidance here as go isn't a language I have much experience with.
In client_test.go I've added a test like below, but I'm not actually checking anything right now.
The other tests use a mock JSONRPC and client GraphQL to run checks on, however GethHeaders is only set via NewClient.
func TestHeadersSet(t *testing.T) {
	cfg := &configuration.Configuration{
		Params:                 params.MainnetChainConfig,
		GethURL:                "http://blah",
		SkipGethAdmin:          true,
		GethHeaders: []*HTTPHeader{
			{Key: "X-Auth-Token", Value: "12345-ABCDE"},
			{Key: "X-Api-Version", Value: "2"},
		},
	}

	c, err := NewClient(cfg.GethURL, cfg.Params, cfg.SkipGethAdmin, cfg.GethHeaders)

	ctx := context.Background()

	rawTx, err := ioutil.ReadFile("testdata/submitted_tx.json")
	assert.NoError(t, err)

	tx := new(types.Transaction)
	assert.NoError(t, tx.UnmarshalJSON(rawTx))

	assert.NoError(t, c.SendTransaction(
		ctx,
		tx,
	))
}

Further the interface for the Client that is constructed (rpc.DialHTTPWithClient) and the that defined in the parent Client struct are different. Finally, fetching the headers does not seem supported on rpc.DialHTTPWithClient.

Hi @septerr - do you have any thoughts on above?
Also, I've tried to re-trigger a build with empty commits but doesn't seem to work :(

Hi @akramhussein ,
Let's shelve the client test for now. I am checking with some folks about why the build is not working. Sorry for the delay in response.

Hi @akramhussein, if it is not too much trouble, can you try creating a new PR with these changes to get past the build issue? 🙏 🙏 🙏

Hi @septerr - tried it here https://github.com/coinbase/rosetta-ethereum/pull/49 (not sure it has helped though). They are the same commits. I can try and generate new commit shas. However, the PR #47 is also having same issue so don't think it's that.

Ahhh! Thanks for the info! I'll keep trying to work with folks to figure out what's going on.


Robustify \setoperatorfont

Currently we just use \setoperatorfont\mathrm as the default.
But if someone writes \setoperatorfont\mathcal, and \mathcal is set up to be a wrapper for \symcal, it won't work correctly. This could be fixed by using the same \math@bgroup trickery that math group commands use internally.
OTOH, I wonder if \setoperatorfont should instead have interface:
\setoperatorfont { font name } [ font features ]

just like \setmathrm etc. That would make the code easier at the expense of more code repetition for the user.

I think this was basically addressed in 95d5cb18808549a141178e3b9d7813718bd2babc


Add a DRYRUN=1 and a INTERACTIVE=1 option to running zwift.

DRYRUN
This will simply print the docker command that it would execute if DRYRUN was not specified. Makes it easier for people to debug containers.
INTERACTIVE
This will replace the -d flag with -it and set --entrypoint bash so that the container becomes fully interactive and it's possible to debug step by step within the container. This would also make it easier to debug issues within the container.

Inspired by #154


Add mDNS Host Candidate support

This only does parsing, does not generate them.
In the future this option will be exposed via the SettingEngine,
including the ability to opt out of mDNS completely for security/scaling
concerns
Relates to pion/webrtc#699

Codecov Report

Merging #722 into master will increase coverage by 0.92%.
The diff coverage is 85.71%.

@@            Coverage Diff             @@
##           master     #722      +/-   ##
==========================================
+ Coverage   76.43%   77.35%   +0.92%
==========================================
  Files          57       57
  Lines        3730     3886     +156
==========================================
+ Hits         2851     3006     +155
+ Misses        633      632       -1
- Partials      246      248       +2

Impacted Files
Coverage Δ

ice_go.go
91.48% <100%> (ø)
:arrow_up:

icecandidate.go
66.1% <80%> (+1.58%)
:arrow_up:

dtlstransport.go
70.74% <0%> (+1.36%)
:arrow_up:

sctptransport.go
72.72% <0%> (+1.39%)
:arrow_up:

peerconnection.go
74.18% <0%> (+3.27%)
:arrow_up:

Continue to review full report at Codecov.

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


fix(Revit,Navis): resolve unsafe dll error

Description & motivation

Changes:

hook up OnAssemblyResolve logic to load dlls before any other logic

To-do before merge:

Screenshots:

Validation of changes:

Checklist:

[x] My pull request follows the guidelines in the Contributing guide?
[x] My pull request does not duplicate any other open Pull Requests for the same update/change?
[x] My commits are related to the pull request and do not amend unrelated code or documentation.
[x] My code follows a similar style to existing code.
[ ] I have added appropriate tests.
[ ] I have updated or added relevant documentation.

References
https://speckle.community/t/speckle-2-for-revit-could-not-load/5301/5

#relate #2338

#relate #2338

Do you think this resolves your issue @chuongmep ?

@jsdbroughton confirm, problem resolved in my company computer after pull this request.


DWPose might run very slowly

UserWarning: DWPose: Onnxruntime not found or doesn't come with acceleration providers, switch to OpenCV with CPU device. DWPose might run very slowly
warnings.warn("DWPose: Onnxruntime not found or doesn't come with acceleration providers, switch to OpenCV with CPU device. DWPose might run very slowly")

I think it is duplicate of  "Onnxruntime not found or doesn't come with acceleration providers" #75

@ekka007 Close this to avoid duplication. You can post your issue at https://github.com/Fannovel16/comfyui_controlnet_aux/issues/75


[#15] Added Goals to PSaG file

Added goals. Also changed the formatting of the stretch goals to match.

Looks good. Are there any other specific goals that we might want with the mobile application itself (GUI)?

Looks good with the updated formatting. Are there any other specific goals that we might want with the mobile application itself (GUI)?

Sure, I can add a little more info to the mobile app stretch goal.


add custom user agent

Contributing to the Azure SDK
Please see our CONTRIBUTING.md if you are not familiar with contributing to this repository or have questions.
For specific information about pull request etiquette and best practices, see this section.

@digimaun any thoughts?

Are there any service SDKs in the dotnet mono repo that have a dedicated user agent property in client options?  Currently looks non-standard to me.
The goal of having an identifiable user agent for test should be possible with existing client options.


Automatic merging support

See https://github.com/openpolitics/manifesto/issues/353

Added with rake merge nightly task, which merges any proposals which are passed. Rationale for this is that instead of merging instantly, it gives a few hours grace before the merge will happen the next night.


Check sudo before any doing, but after help

PR https://github.com/rust-lang/rustup.sh/pull/70 has imperfections:

Impossible to show --help if you aren't root
Impossible to install with MinGW
Impossible to install Rust to home directory if you haven't root rights
Impossible to use sudo: false for Travis

This PR check we can do sudo before any doing (if --disable-sudo not set).
Fixes https://github.com/rust-lang/rust/issues/36850
and better way to fix https://github.com/rust-lang/rust/issues/24052

Related:
https://github.com/travis-ci/travis-ci/issues/6654
https://github.com/rust-lang/rustup.sh/issues/72

Thanks!


Upload coverage to codecov in CI

Welcome to Codecov :tada:
Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.
Thanks for integrating Codecov - We've got you covered :open_umbrella:


Add subset tag for CellxGene usage

Investigate whether we can mine CxG Census to find all CL terms in use on CxG.  If yes, build GA pipeline to mine CxG for a CL term list + ROBOT pipeline to tage CL terms with subset tag: cellxgene_subset. (If not possible - request functionality from CxG Census?)
@anitacaron - this is very similar to what we already do for HRA.  Can you point @hkir-dev  to existing pipelines?

The pipeline for HRA is in the ccf-validation-tools. It might be better to use the subset pipeline from ODK, the same as the other subsets here, e.g. eye, kidney, etc.

Or generate a component from the ROBOT template.

I prepared an experimental project https://github.com/hkir-dev/cellxgene-cell-reporter
A nightly build GitHub action is generating

A robot template: https://github.com/hkir-dev/cellxgene-cell-reporter/blob/main/templates/cellxgene_subset.tsv
An ontology: https://github.com/hkir-dev/cellxgene-cell-reporter/blob/main/cellxgene_subset.owl

@anitacaron how can we integrate this to CL?

[ ] 1. Update the cl-odk.yaml following this example: https://github.com/obophenotype/cell-ontology/blob/bf0391d3a173c552873beab5d202fb5daa95f4c1/src/ontology/cl-odk.yaml#L113-L116

The template file should be in src/templates. ODK will generate the owl file in the src/ontology/components, no need to add it.

[ ] 2. Inside src/ontology, run sh run.sh make update_repo

[ ] 3. Add the component URL to the catalog: example https://github.com/obophenotype/cell-ontology/blob/bf0391d3a173c552873beab5d202fb5daa95f4c1/src/ontology/catalog-v001.xml#L21

[ ] 4. Add the component URL as an import in the cl-edit (in alphabetical order): example Import(<http://purl.obolibrary.org/obo/cl/components/kidney_upper_slim.owl>)

[ ] 5. Add a rule to update the template in cl.Makefile: the example is downloading a component because there isn't a template, but in your case, you should download the template. (In the next ODK version, this step won't be necessary; we'll be able to just pass the link to an external template in the cl-odk.yaml file)
https://github.com/obophenotype/cell-ontology/blob/bf0391d3a173c552873beab5d202fb5daa95f4c1/src/ontology/cl.Makefile#L230-L235

[ ] 6. Inside src/ontology, run sh run.sh make components/{owl file name} to generate the owl file

Let me know if you need further help.


Do not override WindowBits for level 1 if WindowBits is lower than 13

This fixes the current 2.0.x branch in this regard. It is a single commit, so it can be cherry-picked for https://github.com/zlib-ng/zlib-ng/pull/1393

I think that whole if statement can go bye-bye. Looking back, I think it was commit 951764a1 that allowed any size of window with deflate quick algorithm.

@nmoinvaz
Done. I amended the commit. Either this commit or https://github.com/zlib-ng/zlib-ng/commit/ce6789c7e093e8e6bb6fc591bbdf0f805999bdb9 can be merged into the latest 2.0.x release to fix the problem.


UI: Re-design pages and components to make them modular

Basically Pages should have control of API calls and data, and no concerns with business logic
Whereas Components should be data-dumb but rich with business logic, they should accept data from pages and use handlers for RESTful operations
A step towards making modular and reliable components
Page to be refactored:

[x] Dataset Details
[x] Topic Details
[x] Dashboard Details
[x] Pipeline Details
[ ] Database Details
[ ] Service Details
[ ] Services Page
[ ] Teams Page
[ ] Tags Page
[x] Explore Page
[x] Landing Page

@vivekratnavel lets add what we discussed in this ticket.

@vivekratnavel, is this issue still relevant?


Clean up the examples readme

A few changes:

Remove the search tip (it relies on searching for the new keyword which we no longer use)
Remove mentioning of examples that are either stale or only used for internal purposes (such as test)
Cross-link to the samples repo
Wrap all lines to 80-cols

LGTM


Intermittent producer test scenarios

Updating to the latest C producer
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Codecov Report

Merging #584 into master will decrease coverage by 4.57%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #584      +/-   ##
==========================================
- Coverage   64.60%   60.02%   -4.58%
==========================================
  Files          32      106      +74
  Lines        1404    13716   +12312
==========================================
+ Hits          907     8233    +7326
- Misses        497     5483    +4986

Impacted Files
Coverage Δ

...credential-providers/IotCertCredentialProvider.cpp

src/DefaultDeviceInfoProvider.h

tst/main.cpp

src/StreamDefinition.cpp

src/CallbackProvider.h

src/ThreadSafeMap.h

src/common/PutFrameHelper.cpp

src/ClientCallbackProvider.h

src/CachingEndpointOnlyCallbackProvider.cpp

.../credential-providers/RotatingCredentialProvider.h

... and 125 more

Continue to review full report at Codecov.

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


Support for a command to rename current note

This plugin was just what I've been looking for. Is there any way to expose a command to rename the currently opened note? Most of my notes aren't in folders. Would be great if one could select multiple notes and run that command as well. Just some thoughts!

What do you mean not in folders? You mean they're in the root of your vault? If so you could add / (forward slash) in the included folders list in the settings. This will rename all MD files in the root of your vault.

Thanks for the reply! They are in the root, but since I'm just starting a new vault I don't have to think about having all my files automatically renamed, though there is of course the alternative situation in which someone does want all their files, in a folder or otherwise. I realize that the usecase I'm actually thinking about is that sometimes I want to title files manually, rather than having them be titled after the first line. But if I try to rename a file, and then edit it, it gets renamed again, as you said. I see why this is useful, if there's a way to persist a manually renamed title.

I see. For now, the only way to do this is with folders since the renaming is done automatically on specified folders. I might add the option to disable automatic renaming and make it manual instead in the future if there's enough demands for it :)

Sounds good! Thanks again for a great plugin!


Plugin not working anymore ?

The plugin was working fine for me until now.
I'm now unable to connect since 2021-03-31 (last message I got was at 23:50). When I use /discord connect I get no message at all and no new buffers opening (neither in irc-mode nor in discord-mode). I tried to restart weechat without plugin (weechat --no-plugin) and with a default configuration (weechat -t). I'm using this automatic build for linux (commit e62ad49)
My discord account is still working with the web client, so I can confirm I've not been banned, and my auth token is still the same.
I tried to /debug set weecord 10 but I could not get any debug info anyway. I don't know if there's another way to do that.

Ok, so I am unable to reproduce the buffers not opening (all of my server buffers open correctly) and all the messages load, however new messages to not appear until the buffer is closed and reopened (the message events are received, but don't seem to be processed. I'll have to try and figure out what's causing that).
Is it server buffers that aren't working,  dm channels, or both?
The version of the discord library being used is very old as well as using a deprecated version of the gateway, which could be causing theses problems.
Unfortunately this version has very limited logging and it's not exactly easy turn on (And it only logs discord api related events, nothing client level)

I've only be using server buffers (specific Guild->channel that I added to my autojoined list) and that's what not working for me anymore. I never tried to use DM channels (and I'm not sure how I can use them?).
I'm not really comfortable with building rust from source, but I guess I'll have to if I want some logs.
In the meantime should I try to upgrade to this build on the mk3 branch, or should I stay on master ?

The mk3 branch should have everything master has at this point, and will become the default branch soon (it has no major issues as far as I know), the biggest things that need to be done is revamping the commands (they are kinda clunky right now) and adding usage instructions.
If you would like to try the mk3 branch, the the biggest difference I can think of is you have to join a channel the commands are:
/discord server add <server_name> (only needed once per server)
/discord server autoconnect <server_name>
/discord channel autojoin <server_name> <channel_name>
While the commands will change soon, the config format should not.
Otherwise, I would be happy to make a ci build with logging enabled if you would like to go that route.

I'm up for a build with logging enabled if you can provide that.
I'll try the mk3 branch too.

I tried the mk3 branch, wiping my weecord config first.
After my /plugin load weecord I got a ignoring \`: invalid filter directive` error line, that I ignored.
I set my token like with the master branch using /discord token<PHONE_NUMBER>...
/discord server list does not seem to give me any result. I tried some /discord server add My_server but was met with discord: could not find guild: My_server. There's no /discord connect anymore, is that normal? No new buffer has been created at all, apparently.

The invalid filter directive warning is interesting, I'm not sure how that happened.
Secondly, the commands are currently very unintuitive, and is why I need to rework them.
The server list command is to list servers you have "joined" (servers need to be "joined"/"added" similar to how you need to add irc servers).  I will either reword those commands or make the output indicate "added" servers and list servers that can be joined.
As for adding the server, did you use tab completion for the server name?  The new version is more strict with respect to special characters and expects tab completion to be used.

I did try to use tab completion with /discord server add <tab>, but was only proposed irrelevant suggestions (namely: the irc channels I'm in...).

That is.. very odd.  I can only get that to happen if there is extraneous text in the command (i.e. /discord server add f <tab> gets irc suggestions)
Also, the master branch should have logging enabled as of commit 8574281 and build.
Run with the environment variable RUST_LOG=trace,tungstenite::protocol::frame=warn,rustls=warn,h2=warn to get verbose logging but without most of the needless details.

I ran RUST_LOG=trace,tungstenite::protocol::frame=warn,rustls=warn,h2=warn weechat
Then, in buffer [1: weechat] :
> /discord server add Godot_Engine
> could not find guild: Godot_Engine
> /plugin unload weecord
> Extension "weecord" déchargée
> /plugin load weecord
> discord: Unable to setup logging, trace window will be empty!: a global default trace dispatcher has already been set
> Extension "weecord" chargée

(As you may notice I'm french, but I'm not sure that's relevant. "chargée" means "loaded" and "déchargée" means "unloaded").

Sorry, I didn't make it clear, only the master branch will respect RUST_LOG, mk3 uses the config weecord.general.log_directive (and will require a different directive)
(Now that I think of it, mk3 probably should use RUST_LOG somehow..)
Also, due to how weechat loads plugins (dylib caching is enabled), mk3 logging fails when reloading the plugin.  weechat must be fully exited, or the /upgrade command used.
The "Godot_Engine" server, what is its name in discord?

The "Godot_Engine" server, what is its name in discord?
"Godot Engine"
I tried several other writing, and also tried a discord name without white space ("SHOWTIME.").
Just to clarify, I should download the build you linked and try to /discord token 123, /discord connect, am I right ?

Yes, the build I linked to should be the same as master has been, except it will respect RUST_LOG environment variables.
The mk3 branch no longer has the connect command, to disconnect, the plugin can be unloaded.

Out of curiosity, would you happen to be in a "large" number of servers (maybe more than 20 or so?).  At some point the discord api has seemed to behave differently when large amounts of servers are involved.

I'm in exactly 19 servers. :]
I'm using the build you linked, ran:
RUST_LOG=trace,tungstenite::protocol::frame=warn,rustls=warn,h2=warn weechat
In [1:weechat] I get
> Extensions chargées : alias, buflist, charset, exec, fifo, fset, irc, logger, lua, perl, python, relay, ruby, script, spell, trigger, weecord, xfer

Then:
> /discord token ABCDEf.12341ab_c_d
> discord: Set Discord token
> /discord connect
[nothing happens]
> /discord disconnect
> discord: Disconnected
> /discord connect
[nothing happens]
> /discord connect
> discord: Already connected
> /discord disconnect
> discord: Disconnected
> /plugin unload weecord
> Extension "weecord" déchargée
> /plugin load libweecord
[crash occurs]
thread '<unnamed>' panicked at 'Logger initialization failed with Logger initialization failed', src/lib.rs:41:37
                                                 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
       fatal runtime error: failed to initiate panic, error 5
                                                             [1]    2161488 abort (core dumped)  RUST_LOG=trace,tungstenite::protocol::frame=warn,rustls=warn,h2=warn weechat

The weird part is it was working fine 2 days ago. Is there a cache of data somewhere for weecord that I could get rid of to start off clean?

Interesting... it should write a log file to your current directory.
There is no cache sadly, although, that does remind me of something I should have thought of earlier.  Your timing lines up pretty closely with the rollout of the new "Stage channels".
A quick test (on mk3) shows that at the presence of stage channel completely breaking loading, so I suspect that may be the issue.

The issue should now be fixed on both branches, if it isn't, feel free to reopen and I'll see what I can do.

Yes, it works! Thank you so much!


”Rusca Montană”, ”Ruschița” are listed in the drop-down menu

Description:
When user writes ”Rusca Montană”, ”Ruschița” the locations appear in the drop-down menu next to the comune and the county witch is a part according to the law.
Precondition:
The website is up an running.

Step 1
Write in the search bar "Rusca Montană"

Expected results
The location appears in the drop-down menu as "Sat Rusca Montană, CARAȘ-SEVERIN(Rusca Montană)".

Step 2
Press "x" button.

Expected results
The location was deleted from the search bar.

Step 3
Write in the search bar "Ruschița"

Expected results
The location appears in the drop-down menu as "Sat Ruschița, CARAȘ-SEVERIN(Rusca Montană)".


Add optional template rendering to pages

class Users::IndexPage < BasePage
  assign users : UserQuery

  render_template # Assumes ./index_template.ecr

  # or specify template
  render_template "./some_other_extension.rss.ecr
end

Or maybe at compile time it checks for the template and renders that if it's in the default location. Only use render_template only when rendering something other than the default

Relevant conversation on Gitter:
https://gitter.im/luckyframework/Lobby?at=5a106f57cc1d527f6b880c2c

@tarvit I will try to explain why support of template engines is important for me.
Actually there are benefits in generating by crystal code and I see them: close integration with app code, ability to call any code directly without passing parameters, control validity by compiler.
But there are disadvantages in this approach. Actually html page belongs to a another layer from architectural standpoint - view layer. and having it integrated in app and coupled with it closes possibility to make srict borders between the layers.
so why templates a better: they physically are not code. they have no access to all app code so we have a strict border between layers and interface of communication berween view and action class is defined and is transparent. templates have single responsibility and can not perform any other action than generate response based on params passed to them
another disadvantage I noticed is hard integration of simple html snippets into app because you need to recode them. slim and coffee script have converters so it is easier to adapt plain js and html to your app
also if your markup is complex you need to generate tons of code to simply add some angular or bootstrap classes. and simple code related to markup will be mixed with potentially important code of view logic.

Paul Smith @paulcsmith 12:41
@tarvit I think those are some valid points. Some I agree with and other I'm not as sure about. I can't see anything about the way Lucky handles views that is more/less of a boundary between your app and the view layer. In a template you can also call any code. Nothing stops you from running queries or saving forms in them. It's up to the developer not to do that. So I think that's about the same either way. If anything I'd say there is more explicit interface between your code and the view because you must explicitly declare what a page needs in order to be initialized. So it encourages being clear about what the page/view needs in order to work.
I totally agree that one pain point is translating HTML to code is hard because there isn't something that converts it like there is for Slim or CoffeeScript. I rarely need to do that though, but maybe others do? If so I think we could create a converter to help people at. That would be a good idea.
Could you give an example of what you mean by
also if your markup is complex you need to generate tons of code to simply add some angular or bootstrap classes. and simple code related to markup will be mixed with potentially important code of view logic.
It seems writing bootstrap or angular would be just as easy as HTML. I can do div class: "nav" or div "v-on:click": "counter += 1" for a vue.js component. I don't think this is much harder than doing it with HTML. If anything I think it is less code. But maybe I'm misunderstanding what you mean?
If it's about the generated code, then it actually isn't more or less. When you use .ecr or slang or any of the other templating languages it translated them to code as well. So Lucky and those templating languages work similarly in that regard. They're both pretty fast, and they both generate Crystal code under the hood

Paul Smith @paulcsmith 12:47
I think the advantages of doing it with Crystal methods and classes is large. You can use regular methods to extract code. You can use classes for more complicated HTML if you want. It also makes it so you can define abstract methods on the class. For example you could force the page to implement a page_title method so that you never forget a title for a page. That is something that is hard/impossible to do with templating languages. Or at least, more awkward. So I think the advantages outweigh the disadvantages. But I agree there definitely are some! It may depend on how often you translate existing HTML to Lucky. I personally rarely do that so it hasn't been an issue.

+1 for optional template/layout abstraction and choice (https://github.com/jeromegn/kilt)

Yeah I think we should go ahead and do this.  I don't think it will be a lot of work and it is a nice option to have

Perfect. For the record, another nice thing of the HTML DSL is that it does not require a separate set up files. Templates are very handy for importing pre-existing content or external (non-dev, html-file-editor) editing.
Someday though, the DSL together with crystal-to-javascript conversion could be very good for an absolute top notch in-browser/frontend content management. I mean the new generation of CMS, like https://www.neos.io/features/editing-content.html

BTW: With templates, route could not only default the path according to the name of the class, but also render a template from the folder structure.
For example selecting from to the files, according to enabled template language, class (inheritance), display mode, format, and special mode:
https://web.archive.org/web/20160424053516/http://zenadmin.org/en/documentation/Wiki/list334.html

This PR https://github.com/luckyframework/website/pull/129 documents how to use templates. Plus we can always expand on the guides. Maybe this can be closed?

Let’s leave it open for now. I’m thinking we should have an official lucky_template shard that adds a macro and documents things a bit. It’d be a tiny package but I think having that would be nice
What do you think?

On Sep 14, 2019, at 11:56 AM, Jeremy Woertink<EMAIL_ADDRESS>wrote:
This PR luckyframework/website#129 documents how to use templates. Plus we can always expand on the guides. Maybe this can be closed?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Oh yeah, that makes sense. I like it.

Handled in the guides :D https://github.com/luckyframework/website/pull/129


Inconsistent naming of tracks

I'm having a problem getting the names of tracks to show up consistently.
It seems to me that normally the tracks get the same name as the first event on them, which would be good if I didn't want two different tracks producing the same event name sleep on both client and service. This causes the tracks to merge! Also the events do not show up under the process but instead are loose.
The solution seems to be doing a 1ms sleep after calling PERCETTO_INIT, then registerting the tracks. Then calling TRACE_EVENT_BEGIN_ON_TRACK and TRACE_EVENT_END_ON_TRACK this causes the tracks to get the name from PERCETTO_TRACK_DEFINE not the name of the first event.

An API to name tracks anything other then the name used in say PERCETTO_TRACK_DEFINE would also be nice.

Are you tracing from multiple threads?
Calling TRACE_EVENT_BEGIN_ON_TRACK before PERCETTO_TRACK_DEFINE would be undefined behavior.
Are you starting tracing before starting the process that you are tracing? It looks like there is a bug in that case that could lead to track metadata missing if the track is registered after the first trace event on the same thread. However it looks like things should work if you register just after PERCETTO_INIT.

Yes I'm tracing from multiple threads. What the app does:

Calls PERCETTO_INIT followed by multiple calls to PERCETTO_REGISTER_TRACK, this is done from a constructor (__attribute__((constructor(101)))) so before my main is called.
It does a bunch of initialisation this takes about 1 second (to clarify I don't do any tracing until after a second or so).
The app finally reaches the code that issues TRACE_EVENTs and events to tracks.
All calls to TRACE_EVENT and tracks are made from static libraries that are not in the compilation unit declaring the tracks.

What I have found:

PERCETTO_CATEGORY_IS_ENABLED returns false immediately following the calls to PERCETTO_INIT and PERCETTO_REGISTER_TRACK.
Waiting 1ms is enough to make PERCETTO_CATEGORY_IS_ENABLED return true.
Doing any kind of tracing, say TRACE_EVENT(category, __func__) in the function that calls PERCETTO_INIT after doing a 1ms sleep is enough to "name" the tracks and have them show up.

The below is the init function, remove the hack part will consistently produce the wrong names for the tracks.
void
u_tracer_maker_init(void)
{
	int ret = PERCETTO_INIT(PERCETTO_CLOCK_MONOTONIC);
	if (ret != 0) {
		return;
	}

	I_PERCETTO_TRACK_PTR(rt_cpu)->name = "RT 1 Sleep";
	I_PERCETTO_TRACK_PTR(rt_compositor)->name = "RT 2 Allotted time";
	I_PERCETTO_TRACK_PTR(rt_gpu)->name = "RT 3 GPU";
	I_PERCETTO_TRACK_PTR(rt_margin)->name = "RT 4 Margin";
	I_PERCETTO_TRACK_PTR(rt_error)->name = "RT 5 Error";
	I_PERCETTO_TRACK_PTR(rt_info)->name = "RT 6 Info";
	I_PERCETTO_TRACK_PTR(rt_present)->name = "RT 7 Present";

	I_PERCETTO_TRACK_PTR(ft_cpu)->name = "FT 1 App";
	I_PERCETTO_TRACK_PTR(ft_draw)->name = "FT 2 Draw";

	PERCETTO_REGISTER_TRACK(rt_cpu);
	PERCETTO_REGISTER_TRACK(rt_compositor);
	PERCETTO_REGISTER_TRACK(rt_gpu);
	PERCETTO_REGISTER_TRACK(rt_margin);
	PERCETTO_REGISTER_TRACK(rt_error);
	PERCETTO_REGISTER_TRACK(rt_info);
	PERCETTO_REGISTER_TRACK(rt_present);

	PERCETTO_REGISTER_TRACK(ft_cpu);
	PERCETTO_REGISTER_TRACK(ft_draw);

	/*
	 *
	 * Hack to get consistent names.
	 *
	 */

	os_nanosleep(1000 * 1000);

	// But also shows when the app was started.
	XRT_TRACE_MARKER();
}

Could you try a quick test with building against v0.1.3 to see if the bug goes away? I'm wondering if this regressed with f63e7f8ce37289fa23af6a3e1e0ce3b3f08dde2f.

Neither reverting that commit or resetting to v0.1.3 fixes the issue if I leave out that hack.

I am building Percetto in release mode.

I tried to reproduce in a few ways, but did not see any bug.
To rule out incremental state update issues, try adding this to your trace config:
incremental_state_config: {
clear_period_ms: 500
}
That will force all the perfetto metadata (including track names, ids, etc) to be added to the trace output every 500ms, so if there's just a glitch on the first 500ms then the events should still look correct after that.
If you can share a bad trace and a good trace with me it might help get to the bottom of it. (Could send to me at jbates at chromium.org)

The below is my config, I tried to remove both flush_period_ms and incremental_state_config and that didn't help.
flush_period_ms: 30000

incremental_state_config {
	clear_period_ms: 500
}

buffers: {
	size_kb: 63488
	fill_policy: RING_BUFFER
}

data_sources: {
	config: {
		name: "track_event"
		target_buffer: 0
	}
}

Something is wrong with percetto state in your setup. The s_percetto.tracks global data is dumped into each incremental state. In the with_hack trace data that you have, I see s_percetto.tracks correctly dumped in the one incremental state (thanks to your sleep+trace_event), but in subsequent (or prior) ones it looks like s_percetto.tracks is zeroed out. This could happen in a couple ways:

something is stomping on percetto's global state (seems unlikely).
same track globals are being shared between multiple percetto instances. This could happen if percetto is linked into multiple shared libraries. In one instance of percetto, custom tracks are registered, but in the other instance, the same tracks are used for tracing but never registered.

If you have multiple shared libraries, percetto/perfetto state can not be shared between them. With the attribute((constructor)) approach in a large codebase might there be some unexpected state/symbol leakage? In your trace, there appear to be two percetto instances, with one defining the tracks and the other tracing on those tracks.
Also percetto/perfetto instances are created for the duration of the process - they don't yet support destruction/shutdown. If you have a dso being loaded and unloaded that could also lead to bugs.

I am pretty sure that there is only a single instance of the track variables and percetto. So it's a executable. I check the symbols and only see one set of my track variables.
Is percetto using any attribute((constructor)) in it's code?

Hmm that is strange. Percetto only has POD global data and no use of
attribute constructor. I'm not sure about perfetto SDK though.
On Tue, May 4, 2021, 6:57 PM Jakob Bornecrantz @.***>
wrote:

I am pretty sure that there is only a single instance of the track
variables and percetto. So it's a executable. I check the symbols and only
see one set of my track variables.
Is percetto using any attribute((constructor)) in it's code?
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
https://github.com/olvaffe/percetto/issues/15#issuecomment-832364466,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AA7QVAF77ZMPELBAAEWRMWLTMCQXBANCNFSM44BDTFAQ
.

Yeah something is going on with the fact that I'm using the following code:
#define U_TRACE_TARGET_INIT(WHICH)                                                                                \
	void __attribute__((constructor(101))) u_trace_maker_constructor(void);                                        \
                                                                                \
	void u_trace_maker_constructor(void)                                                                           \
	{                                                                                \
		u_tracer_maker_init(WHICH);                                                                            \
	}

If I put the call of u_trace_marker_init inside of the main function instead it works.

Any shared libraries involved?

I link to a bunch of shared libraries, but none that have any Perfetto/Percetto code.

This turned out to be me initialising Percetto in a c static constructor.


[MM-40431] Add telemetry to follow/unfollow

Summary
Add telemetry for:

follow
unfollow
autofollow
autounfollow

Ticket Link
Fixes: https://mattermost.atlassian.net/browse/MM-40431
Checklist

[X] Telemetry updated
[ ] Gated by experimental feature flag
[X] Unit tests updated

Going to merge this one without the second review just so I can include it in v1.22.


Change throw to warn log on queue checks

[x] @rsandor

I don't think _assertHaveAllTasks is required any more.
Reading the documentation for the function:

Helper function to ensure we have all required task handlers for the queue array with which the class was defined.

From what I can tell, we do not accept passing in a map of task handlers in the constructor any longer. Therefore, since the set methods must be called, logging a warning in setAllTasks when a valid function isn't passed in should be enough.
However, I think that starting w/o tasks (the test you changed from rejecting to warning) should probably error-level log that there are no task handlers defined, but still start. Thoughts on that?

I agree with all your points. Server.prototype._subscribeAll will still try to subscribe a worker to each queue returned by hermes.getQueues() -- which causes an error since not all the queues will have workers.
I'm thinking of modifying _subscribeAll to filter for only queues with defined workers. Thoughts?

there are two options for a user when using a hermes client to assign handlers to queues:

manually set tasks for each queue name (multiple calls)
make one call to setAllTasks to set the handlers for a bunch of queues

We can actually assume that the user could do both. I think that it's probably not likely the case, but you can.
With that in mind, and with the knowledge that it uses the getQueues() function, I think that _subscribeAll should be unchanged, but _subscribe should log a warning if a queue does not have a handler. Then we can safely drop _assertHaveAllTasks...

@bkendall Okay, I removed _assertHaveAllTasks and its tests. I also added a check for a handler in _subscribe

Taking a quick look, please hold for a moment

:100: good work @cflynn07

@rsandor tyty

@rsandor I tagged but I'm not an owner on npm, could you publish this?


An extension for dispatching custom events

Summary
As (briefly) discussed here, there should be an extension for dispatching events. This extension will pretty much be a more stable version of the internal event dispatching system.
What is the feature request for?
The core library
The Problem
As discussed in #748, the event dispatching system is not public for users to use. This is a problem because there are some users that would like to dispatch events of their own and using an undocumented feature for that is unsafe.
The Ideal Solution
Make a new extension named ext.dispatcher or ext.events that is like the internal event dispatching system except:

it's easier to use
it's documented and more stable

The Current Solution
You can access nextcord.Client.dispatch (it's technically not a private method) but as said before, it's unstable and prone to changes at any time.
Additional Context
This should probably be included in another package because not much users would need this extension anyways.

I understand that using undocumented stuff is bad and all, but Client.dispatch(event, args, kwargs) is very, very mature and is very unlikely to change (at least without the real reason for it). I use it widely in my own bot (though it uses other d.py fork :^) and didnt have any issues for months already, so i guess it applies to nextcord as well.

for anyone that could be interested i (and @ItsAleph) made https://github.com/Snipy7374/dispatcher that is currently able to dispatch custom events for the Bot class and its subclasses (so AutoShardedBot too)
additionally this extension support every discord.py fork; soon Client (and its subclasses) will be supported too

I have the opinion that a whole extension isn't all too beneficial, and simply creating a generic dispatcher which Client (and so, Bot) inherits from would be the best idea.
It provides a whole separate API that bot devs can use to dispatch events without passing the client everywhere, but also removes the need of wrapping Client.dispatch just to add some docs and unnecessary handling.

I have the opinion that a whole extension isn't all too beneficial, and simply creating a generic dispatcher which Client (and so, Bot) inherits from would be the best idea.
It provides a whole separate API that bot devs can use to dispatch events without passing the client everywhere, but also removes the need of wrapping Client.dispatch just to add some docs and unnecessary handling.

It isn't unnecessary handling, the extension is already extending functionalities that aren't supported by the libraries and, in the future, it'll provide additional features.
If it was an extension that just wraps Client.dispatch I would have I would have been agree with you.

What extended functionality? All I see is it provides a try get listeners which is already possible directly.
It seems to just be a stripped down wrapping of the bot dispatcher, which a built-in generic dispatcher would solve. I was mostly talking about this original issue, where this really should not be an extension.

FYI i use Bot.dispatch in my bot for several disnake versions in a row with zero changes, an di believe situation is the same in nextcord too. dispatch is very unlikely to change anytime soon, so its 99% safe to use it.


Port checkdates

Ports the C++ program CheckDates to Python and includes it in the toolkit. Closes #89.
#87 should be merged first.

@maxnz – I merged master back into this branch since I merged #87 into master, so you'll need to pull to avoid merge conflicts

Coverage decreased (-1.5%) to 63.25% when pulling d58c83c6368dc9982b7b3d32a388a424cf2c04fd on port-checkdates into be722a2a4e413df3ac4c78dfd1f7c61758201ee2 on master.


Custom cropInitialCropWindowPaddingRatio

Is it possible to set initial crop window padding ratio only for Left and Right?
if yes, how can i achive this?
thanks

not at the moment


max tag is not working if string contains unicode characters or emojis

Package version eg. v9, v10: v10
Issue, Question or Enhancement: Issue
Code sample, to showcase or reproduce:

import "github.com/go-playground/validator/v10"

type DemoStruct struct {
   Name string `json:"name" validate:"required,max=255"`
}

Above max validation is fails if the value of field Name is "😃😆🤣😊😍🥰णतथदढणणतथदढणतथदढणतथदढणतथदढणतथदढणतथदढणतथदढणतथदढणतथदढणतथदढणतथदढणतथदढणतथदढणतथदढणतथदढणतथद你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好1234567890abcdefghijklmnopqrstuvwxyz~!@#$%^&*()-_=+[]{}|;:,./<>?ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijabcde"
But max tag validation is working fine if I use only Numbers or Alphabets or AlphaNumeric string.
Please have a look and let me know the best possible resolution for this.

Relates to https://github.com/go-playground/validator/pull/946


[server] Handle database deadlocks when storing reports

Closes #2655 and Closes #2653

When we use multiple server instances and we try to run multiple storage
to each server which contain at least two same reports which have source
code comments it is possible that the following exception will be thrown:
(psycopg2.extensions.TransactionRollbackError) deadlock detected
Neither of the two processes can continue, and they will wait for each other
indefinitely. PostgreSQL in this case will terminate one transaction with
the above exception. For this reason in case of failure we will wait some
seconds and try to run the storage again.
For more information see #2655 and #2653 issues on github.

I have a bit of a hard time understanding what is going on.
We should never have deadlocks if we always acquire the locks in the same order.
So do we have duplicate reports in the results that are being sent to the server?
Is the source of the problem that the duplicate reports are being processed in a different order in the two transactions?
Is there a way to solve the root cause of the problem? I.e. either deduplicate report before sending to the server or make sure that all of the transactions are processing the duplicats in the same order.

@Xazax-hun the problem is not with the report duplication.
The current locking is not fine grained enough because it is only a run level lock.
If you use the same run name the run level lock will block the second storage until the first is done.
This is ok.
The problem is when a review status is set for a report. The review status is connected to a report hash (not to a run) and that hash can exists in multiple runs. If the same report set is stored into multiple runs at the same time, the run level lock will not revert back any store both store will be started but there will be a problem when they try to update the same review status entry, or try to insert new review status values for the same report hash.
We discussed multiple solutions. A queue based storage would solve this issue so only one report set is stored each time but it would require a lot more architectural changes.
This is an improvement with not too much changes, this could still lead to storage rollbacks if a store did not finish after the retry period but at least it will not deadlock and the user can try to store the results again after some time.

@gyorb Done.


thunk doesn't seem to work with svg child elements

My render functions looks like this:

function renderSvg (lines) {
    return h(
        'svg',
        {
            style: {
                height: '200px',
                width: '200px',
                'background-color': 'white'
            },
            attrs: {
                xmlns: 'http://www.w3.org/2000/svg',
                viewBox: '0 0 200 200'
            }
        },
        renderLineGroup(lines)
    )
}

function renderLineGroup (lines) {
    const strokeWidth = 1
    const dashArray = '4 2'

    return h(
        'g',
        {},
        lines.map((l, idx) => thunk('line', `line_${idx}`, renderLine, [ l.x1, l.x2, l.y1, l.y2, strokeWidth, dashArray ]))
        //lines.map((l, idx) => renderLine(l.x1, l.x2, l.y1, l.y2, strokeWidth, dashArray))
    )
}

function renderLine (x1, x2, y1, y2, strokeWidth, dashArray) {
    return h('line', {
        style: {
            'stroke-width': strokeWidth,
            stroke: 'red'
        },
        attrs: { x1, x2, y1, y2, 'stroke-dasharray': dashArray }
    })
}

This constructs the svg tag as expected, but it doesn't actually draw. So strange! Here's what it looks like when rendering via thunk:

when I comment out the lines.map line and uncomment the one that doesn't use thunk, I see what I'd expect:

this could potentially be a side effect of #388

The issue is that the virtual node returned from thunk doesn't have any children, it does everything through prepatch
thunk.ts line 58:
return h(sel, {
    key: key,
    hook: { init, prepatch },
    fn: fn,
    args: args
  })

Which means addNS skips it, since it just checks for children.
However, addNS will add a data.ns to the thunk vnode, so if prepatch was changed so that it calls addNS on its children when it creates them, that might fix it. I think that would require adding something like:
if (thunk.data.ns) addNS(thunk.data, thunk.children, thunk.sel);

or similar to copyToThunk (also importing addNS).
I will check it but I can't right now.
That's also a bit hacky, it might be a bit nicer to add an isSVG attribute to VNode, though that might be undesirable.
addNS doesn't seem particularly efficient either - it traverses the whole vnode tree (though only once each patch per svg element). Though it probably doesn't have that much of an effect.

Ok this diff fixes it:
diff --git a/src/package/h.ts b/src/package/h.ts
index b53a85a..0d9c7de 100644
--- a/src/package/h.ts
+++ b/src/package/h.ts
@@ -6,7 +6,7 @@ export type VNodeChildElement = VNode | string | number | undefined | null
 export type ArrayOrElement<T> = T | T[]
 export type VNodeChildren = ArrayOrElement<VNodeChildElement>

-function addNS (data: any, children: VNodes | undefined, sel: string | undefined): void {
+export function addNS (data: any, children: VNodes | undefined, sel: string | undefined): void {
   data.ns = 'http://www.w3.org/2000/svg'
   if (sel !== 'foreignObject' && children !== undefined) {
     for (let i = 0; i < children.length; ++i) {
diff --git a/src/package/thunk.ts b/src/package/thunk.ts
index c632eeb..c09e17b 100644
--- a/src/package/thunk.ts
+++ b/src/package/thunk.ts
@@ -1,5 +1,5 @@
 import { VNode, VNodeData } from './vnode'
-import { h } from './h'
+import { h, addNS } from './h'

 export interface ThunkData extends VNodeData {
   fn: () => VNode
@@ -16,10 +16,12 @@ export interface ThunkFn {
 }

 function copyToThunk (vnode: VNode, thunk: VNode): void {
+  const ns = thunk.data ? thunk.data.ns : null;
   (vnode.data as VNodeData).fn = (thunk.data as VNodeData).fn;
   (vnode.data as VNodeData).args = (thunk.data as VNodeData).args
   thunk.data = vnode.data
   thunk.children = vnode.children
+  if (ns) addNS(thunk.data, thunk.children as VNode[], thunk.sel);
   thunk.text = vnode.text
   thunk.elm = vnode.elm
 }

I'm just trying to figure out how to make a pull request (I never have done before).

@macarc I could jam these changes into a PR if that is helpful. @mightyiam any thoughts on the acceptability of this change?

Thanks, I got it working, I'm just working on #388 now (since they're both based around the same problem I think) and then I'll submit if that's all right with @mightyiam


[zh-cn]sync manage-deployment.md secret.md api-concepts.md

content/zh-cn/docs/concepts/cluster-administration/manage-deployment.md
content/zh-cn/docs/concepts/configuration/secret.md
content/zh-cn/docs/reference/using-api/api-concepts.md

/approve

@my-git9 Sorry for another PR sneak in before yours. Please rebase.

/close

/reopen


Test CsvGraphSources configured with an empty directory

During the training somebody reported that pointing the csv-based PGDSs to an empty directory produced an error due to some missing directory. These should (attempt to) create any missing expected directories.

I tried to verify that behavior. When writing the graph into an empty folder, the nodes and relationships folders are generated by the specific CSVFileHandler implementation. An exception is raised when one tries to read a graph from an empty folder. However, since the data source expects at least one node file + schema, we would need to change that code in order to create an empty node scan if no data is present. I wonder if this is a common use case to support, i.e. reading an empty graph via a data source.

I didn't mean we should support reading an empty graph if the directory is missing. I mean we should just not crash, but just state that there are no graphs in there yet.


sprites dataset

Hi, I'm trying to use the sprites dataset. Thanks for uploading it.
There are many mat files, such as sprites_200.mat.
I use h5py to read the file.
There are following keys: [u'#refs#', u'labels', u'masks', u'sprites']
I managed to get some numpy arrays from it

data = [mat[e[0]][:] for e in mat['sprites']]
img = data[10]
img.shape
(9, 10800)
scipy.misc.imsave('/tmp/test_%d.jpg' % i, np.reshape(img_i, [60, 60, 3]))

However, the image is very low resolution and each image contains 9 characters.
Could you advice what's the correct way to open the dataset?

It's better to open mat file in matlab (which has free trial version) to see the structure of the mat file. I also remember that there was a program that can open mat file by it self without matlab.


min-apk > 26 on Android after 4.3.0

On the 4.2.3 version, everything was okay, but when I tried to upgrade to 4.3.0, I got the following error when I try to build my app:
Error:com.android.builder.dexing.DexArchiveBuilderException: Error while dexing javax/ws/rs/client/FactoryFinder.class
Error:com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)

We bumped to Java 8: https://knowm.org/open-source/xchange/xchange-change-log/
Maybe you need to update your JDK???

@timmolter Sorry for the delayed reply.
I already use JDK8 on Android Studio. To be sure I updated it to the last version but the problem persists...
The error message just changed a little bit:
Error:com.android.builder.dexing.DexArchiveBuilderException: Error while dexing.
Error:com.android.tools.r8.ApiLevelException: Default interface methods are only supported starting with Android N (--min-api 24): java.lang.Object javax.ws.rs.client.CompletionStageRxInvoker.delete()
Error:Execution failed for task ':app:transformClassesWithDexBuilderForDebug'.

com.android.build.api.transform.TransformException: com.android.builder.dexing.DexArchiveBuilderException: com.android.builder.dexing.DexArchiveBuilderException: Failed to process /Users/xxxx/.gradle/caches/modules-2/files-2.1/javax.ws.rs/javax.ws.rs-api/2.1/426a0862406536e690c7caa8bb6ed32191986fac/javax.ws.rs-api-2.1.jar

Do you know which version of the JDK8 is used ? Maybe I should have the exact same one 😅
Thank you.

As it seems the Android runtime (ART / Dalvik) don't support all features of Java 8 on older versions. To be clear, this has nothing to do with the software you use on your developer machine, that's the runtime inside the Android device which executes the application (https://source.android.com/devices/tech/dalvik/).
Here is a list of APIs in Java 8 which will only work on API level 24 and higher: https://developer.android.com/studio/write/java8-support.html
I'm not sure if and how you can get libraries working on older Android versions which use these Java 8 APIs.

@piatekjulien It would be an interesting test to see if you temporarily bumped up the min API level to 24, and then tried. Or as your error message suggested >=26.
But I googled that error and it looks related to Guava. Try: https://stackoverflow.com/questions/45873274/google-guava-invokedynamic-requires-min-sdk-version-26
So I think it's more likely a guava issue on your end.

@timmolter @johnzweng Thanks a lot for your help !
I was able to run it on API 21 by adding these lines to my build.gradle file :
buildToolsVersion '26.0.2'
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
This URL was very useful https://developer.android.com/studio/write/java8-support.html
By the way, thank you for this fabulous Library.


UI: Fix styling of control widgets, eg, "Show missing data" button

[ ] remove ALL CAPS styling
[ ] check correct sentence case of labels that were previously all-capsified
[ ] don't gray out the text
[ ] don't have the text respond to hover/focus

Question: should the widget button itself be brought into focus on mouse-over, even if the text isn't?
Question: hack this now or await input from @eikonomega ?
Source: 2021-08-18 dev mtg

i think this is needed in phase 1, so cant want for our overall styling upgrade

@bobular Can I get clarification on the scope of this ticket? Is this just for the "show missing data" (not verbatim) button, or, for instance, for any place that still has all-caps styling?
Also, the current behavior regarding your first question is that the switch widget (separate from the text label) does focus on hover, which I'm fine with keeping.

Sorry for the delay - didn't see this until now.
I'm pretty sure the ALL-CAPS should be gone from the entire app.
Yes keep the button focus on hover - I think it's useful feedback that distinguishes active buttons from disabled/greyed out ones.

I'd prefer that the text changes from grey to black when there are points with no data for the strata vars. But it is not a high priority for phase 2

Ah yes, sorry I didn't quite implement that to the specs.  The button grays out as desired, but not the text.

I removed the #574 subtask now that it has its own ticket that @asizemore is working on. Please re-review or close as appropriate.

On beta. Website, the text does not change its color when I active and inactive. Tested in several studies, got the same result.


Suggestion: predefined intervals in saturn datepicker

Like:
yesterday
last 7 days
last 30 days
this month
last month
...

I guess, it can be done in the same way as custom header  component, but it will be the footer component. You could try, and make pull request

7.3.0


Re-export issue with hasOwnProperty.

It would be an issue if there is a method exported from the current module named hasOwnProperty:
function __export(m) {
    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}

Personally I would write it as:
function __export(m) {
    var hasOwnProperty = Object.prototype.hasOwnProperty;
    for (var p in m) if (!hasOwnProperty.call(exports, p)) exports[p] = m[p];
}

If anyone actually creates a property called hasOwnProperty, I have to assume they understand the implications and have implemented it in some reasonable way.