Dynamically import a stylesheet depending on the environment

Please provide us with the following information:

I'm having a question about how to dynamically import 'scss' files based on the environment which is serving or building.
Example.
I have a /styles/app/app-1.scss.
I have a /styles/app/app-2.scss.
Now i have also 2 environments called app-1 and app-2
I want to be able to say if it's served/builded environment is app-2 for example that it's loading the  /styles/app/app-2.scss stylesheet.
This so I can develop 1 website and depending on how I build it's including the stylesheet for overwriting some parts of the application, style the application.
OS?

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
Mac OSX Sierra

Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here:
cli c30 and node v 7.5.0

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.

The log given by the failure.

Normally this include a stack trace and some more information.

Mention any other details that might be useful.

Thanks! We'll be in touch soon.

Similarly I want to know how to include .less stylesheet files in an angular2 cli project in the current scheme of things.

@agatsoh I believe you already posted the order correctly.
At start up it loads it from styles array in angular-cli.json which is where styles.css is loaded from  lastly your specific stylesUrls within your components.

@agatsoh @masaanli I have found a solution for this, keep in mind this isn't exactly supported by the cli but rather a feature of Webpack.
Example of app.component.ts:
import {Component, OnInit, isDevMode} from '@angular/core';

@Component({
  selector: 'app-root',
  template: '
Testing :)
',
  styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {
  ngOnInit(){
    if(isDevMode()) {
      require("style-loader!./../styles2.css");
    } else {
      require("style-loader!./../styles.css");
    }
  }
}

Where styles2:
h1 {
  color: red;
}

Styles:
h1 {
  color: green;
}

While this may work it was brought to my attention by @filipesilva that there might be some drawbacks to using this solution such as:

Your code not being as portable
Styles may not be processed correctly
Might break if cli changes its loaders

@RicardoVaranda  nice ! Something like this was what I searched for.
But then it's loading a css file. But is there maybe a option to do it when building or serving the project? So it's scss compiled together?

@masaanli Like I have selected above
if(isDevMode()) {
      require("style-loader!./../styles2.css");
    } else {
      require("style-loader!./../styles.css");
    }

You can also do:
if(isDevMode()) {
      require("style-loader!./../styles2.scss");
    } else {
      require("style-loader!./../styles.scss");
    }

Where for example styles2.scss is:
$green : green;

h1 {
  color: $green;
}

But once again the same implications I stated above apply.

@RicardoVaranda
I tested it and it is working!
The problem I discovered is, I use Bootstrap and have in the angular-cli.json my variables defined.
I cannot override them in the app.component (require .scss)
You know maybe a solution for this?

That is because the instance of style-loader is different when called by the cli and when It's called by the require and thus you won't have access to variables from the cli instance and vice versa.
To be honest I think you are over complicating the logic to do this, A better approach for you in my opinion would be to have 2 different styles: styles.scss styles-dev.scss
Inside each of these just do the @import like you mentioned above requiring any other file you need to overwrite. Yes you will have change it in angular cli every time you want to switch between environments but realistically how often are you really switching between both of these.
If you wanted to change environments you would have to turn off the cli and re-run it with the new environment variable anyway with your current setup.

@RicardoVaranda  true, but I have 1 code base and depending on the commando's I wanna be able to say deploy this version or deploy that version. You cannot add logic in the angular-cli json ;) So that's no option for me.

@RicardoVaranda  Do you have any idea how we import .less stylesheets in angular2 ?

Closing as this is now mostly a discussion question instead of an issue.
The CLI doesn't provide you with any preferred way out of the box to dynamically lazy load styles and apply then. You'll have to come up with a strategy yourself. Stack Overflow has great answers for this sort of question.
Functionality that we do have is a way to have a global style that isn't loaded by default in index.html, and instead are just outputted to dist. You can set a global style to be lazy, see https://github.com/angular/angular-cli/blob/master/docs/documentation/stories/global-styles.md for more info. This has actually been around for a while but wasn't documented.
Here are a couple of random web results that show how you apply styles via javascript:

http://stackoverflow.com/questions/574944/how-to-load-up-css-files-using-javascript
http://stackoverflow.com/questions/25767089/adding-a-stylesheet-dynamically
https://www.w3.org/wiki/Dynamic_style_-_manipulating_CSS_with_JavaScript

Approaches that intrinsically depend on webpack loader might work right now but are not officially supported, which means they can stop working at any time or might not work as expected.

@agatsoh Depends on where you want to import them and how. If you mean dynamically like what masaanli was trying to achieve you can use the same solution as I posted above I've tested it by refactoring styles2.scss to be styles2.less and the contents to be:
@green : green;

h1 {
  color: @green;
}

This will load correctly but it's prune to the drawbacks I have posted above.
The priority in which it applies the css is as follows:
Component -> angular-cli styles [] -> index.html
This screenshot might clarify it for you:

Blue is the component styles, red is styles.css being loaded from angular-cli.json and finally green is a link tag from index.html.
Hope this clarifies your queries.

I have used solution from this issue. However when isDevMode  is undefined, it loads both scss files. When I console.log it only goes to the second block. Any idea thy this happens?
    if(isDevMode()) {
      require("style-loader!./../styles2.scss");
    } else {
      require("style-loader!./../styles.scss");
    }

@kujma10 , did you import isDevMode from @angular/core?

I have the same question but different use case. My deploy page is https://username.gitlab.io/admin/ with /admin suffix while development mode is just localhost. I had to use route hash strategy because gitlab not support serve index.html with all route, then I had to create 2 same scss file in my home component, home.component.scss and home.prod.component.scss because the img url in dev mode is differ with prod mode (/assets/img/img.jpg and /admin/assets/img/img.jpg). I tried dynamic load with environment.production but when I run ng serve, it has an error not found home.component.scss. but it work in ng serve --aot and ng build -prod.

Any other workarounds or a solution for this?

Trying to load SCSS file in my TS files gives me an error while build:
Cannot find name 'require'

@matiishyn
You just need to add a Type for the require method, you can also add it to your Global Types if you have (maybe global.d.ts) or directly in your code like so
declare function require(name: string): any;
require('style-loader!./custom-styles.scss');


Controller is missing permissions to watch ksvc objects

A marker is missing which causes an error when trying to run the controller.
https://github.com/dana-team/container-app-operator/blob/bfb2ee4fd62b8a0ee340c5dfcd91e9b2bdec89a8/internals/controllers/capp_controller.go#L34-L36
https://github.com/dana-team/container-app-operator/blob/bfb2ee4fd62b8a0ee340c5dfcd91e9b2bdec89a8/internals/controllers/capp_controller.go#L93-L95

/kind bug

Fixed by #15


Fix composer dependencies to make compatible with laravel 5.4

Fix the dependencies in composer to make it compatible with laravel 5.4

🍻


Android storage on v3 branch

Hey @Salakar , this may be linked to the conversation in https://github.com/fullstackreact/react-native-firestack/pull/109 however I didn't want to hijack the thread in case it wasn't.
Thanks for for all the work put in - everything so far is working fantastic except android storage. I gave this a go on the v3 branch - database worked without any changes however storage seems to throw an exception:
11-20 14:26:01.013  4089  5584 I FirestackStorage: From file: /storage/emulated/0/DCIM/Camera/IMG_20161120_131408.jpg to gs://project-4251246165915577329.appspot.com with name img

11-20 14:26:01.014  4089  5584 I System.out: Transferred 0.0/5175.0(0.0% complete)

11-20 14:26:01.014  4089  5584 I System.out: Transferred 0.0/5175.0(0.0% complete)

11-20 14:26:01.014  4089  5894 W GooglePlayServicesUtil: Google Play Store is missing.

11-20 14:26:01.014  4089  5894 W DynamiteModule: Local module descriptor class for com.google.android.gms.firebasestorage not found.

11-20 14:26:01.014  4089  5894 I DynamiteModule: Considering local module com.google.android.gms.firebasestorage:0 and remote module com.google.android.gms.firebasestorage:0

11-20 14:26:01.014  4089  5894 E NetworkRqFactoryProxy: NetworkRequestFactoryProxy failed with a RemoteException:

11-20 14:26:01.014  4089  5894 E NetworkRqFactoryProxy: com.google.android.gms.internal.zztl$zza: No acceptable module found. Local version is 0 and remote version is 0.

11-20 14:26:01.014  4089  5894 E NetworkRqFactoryProxy: 	at com.google.android.gms.internal.zztl.zza(Unknown Source)

11-20 14:26:01.014  4089  5894 E NetworkRqFactoryProxy: 	at com.google.android.gms.internal.zztl.zza(Unknown Source)

11-20 14:26:01.014  4089  5894 E NetworkRqFactoryProxy: 	at com.google.android.gms.internal.zzaol.<init>(Unknown Source)

11-20 14:26:01.014  4089  5894 E NetworkRqFactoryProxy: 	at com.google.android.gms.internal.zzaol.zzj(Unknown Source)

11-20 14:26:01.014  4089  5894 E NetworkRqFactoryProxy: 	at com.google.firebase.storage.StorageReference.an(Unknown Source)

11-20 14:26:01.014  4089  5894 E NetworkRqFactoryProxy: 	at com.google.firebase.storage.UploadTask.aA(Unknown Source)

11-20 14:26:01.014  4089  5894 E NetworkRqFactoryProxy: 	at com.google.firebase.storage.UploadTask.run(Unknown Source)

11-20 14:26:01.014  4089  5894 E NetworkRqFactoryProxy: 	at com.google.firebase.storage.StorageTask$8.run(Unknown Source)

11-20 14:26:01.014  4089  5894 E NetworkRqFactoryProxy: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)

11-20 14:26:01.014  4089  5894 E NetworkRqFactoryProxy: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)

11-20 14:26:01.014  4089  5894 E NetworkRqFactoryProxy: 	at java.lang.Thread.run(Thread.java:818)

11-20 14:26:01.014  4089  5894 E UploadTask: Unable to create a network request from metadata

Code to attempt upload was as follows
		var storage = firebase.storage();
		storage.setStorageUrl(Project.firebase.storageBucket)
		storage.uploadFile("img", file.uri, {
			contentType: 'image/jpeg',
			contentEncoding: 'base64',
		})
			.then((res) => alert('The file has been uploaded'))
			.catch(err => console.error('There was an error uploading the file', err))

Is there something I'm doing wrong, or perhaps that this won't work without google play services under simulator? Thanks.

Can confirm that this issue was due to google play services not being installed on genymotion. The above code works fine once this is installed. Thanks again

I believe some checks are going to go in at some point to check for required services being installed.

@Ehesp @kyle-ssg yep I've done some work to detect and alert if play services is missing - will push this up Monday =]

Great stuff! Will be keeping an eye out for when v3 gets merged :)


User History Refactoring + Clean up Code

Primarily updated Profile.tsx, Analytics.tsx and routes and controller functions for user history

Refactored axios used in Analytics to services folder
Removed unused routes and controller functions for user history
Removed unused functions, useStates and useEffects in Profile.tsx and Analytics.tsx
Remove console log comments wherever relevant

LGTM!


Fix py27-isms which prevent Black parsing our code

Coverage increased (+0.002%) to 76.852% when pulling fe98791fc55bb68465ddfa83ccc3102d16dfec7e on pre-blacken into f77b79e73a119a018a5005ff2658ef1c9b60aadc on master.


[JimBot] Update package version in use

Summary
The focus of these changes is to update the version of the package used by Actions to deploy the changes recently made to remove the "CXP Attention" rule and tweak the "needs-team-triage" criteria to ignore issues with an assignment already made.

The following pipelines have been queued for testing:java - templatejava - template - testsjs - templatenet - templatenet - template - testspython - templatepython - template - tests You can sign off on the approval gate to test the release stage of each pipeline. See eng/common workflow

/check-enforcer override

The sync PRs have been generated, approved, and merged.  The step is hanging for some reason, so I'm going to override and merge.


Feature: Add conditional tooltip for edit button in exam exercise row

Checklist
General

[x] I tested all changes and their related features with all corresponding user types on a test server.
[x] This is a small issue that I tested locally and was confirmed by another developer on a test server.
[x] Language: I followed the guidelines for inclusive, diversity-sensitive, and appreciative language.
[x] I chose a title conforming to the naming conventions for pull requests.

Client

[x] Important: I implemented the changes with a very good performance, prevented too many (unnecessary) REST calls and made sure the UI is responsive, even with large data (e.g. using paging).
[x] I strictly followed the client coding and design guidelines.
[x] Following the theming guidelines, I specified colors only in the theming variable files and checked that the changes look consistent in both the light and the dark theme.
[x] I added multiple screenshots/screencasts of my UI changes.
[x] I translated all newly inserted strings into English and German.

Motivation and Context

The Edit button for quizzes in exams should not be clickable while the exam is running.
As discussed in #9865, there was some confusion regarding the disabled Edit button.
To make things clearer, I've added a tooltip for such cases.
Closes #9865.
Description

Added a conditional ngbTooltip and a translation key examStartedNoEdit for the text.
Steps for Testing

Prerequisites:

1 Instructor
1 Course with an exam
Create a quiz exercise in this exercise group

Log in to Artemis
Navigate the Course
Click on Manage -> Exams -> Exercise Groups
Take a look at the Edit button of the quiz in the exercise group

Testserver States

[!NOTE]
These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Click on the badges to get to the test servers.

Review Progress

Performance Review

[ ] I (as a reviewer) confirm that the client changes (in particular related to REST calls and UI responsiveness) are implemented with a very good performance even for very large courses with more than 2000 students.
[ ] I (as a reviewer) confirm that the server changes (in particular related to database calls) are implemented with a very good performance even for very large courses with more than 2000 students.

Code Review

[ ] Code Review 1
[ ] Code Review 2

Manual Tests

[ ] Test 1
[ ] Test 2

Exam Mode Test

[ ] Test 1
[ ] Test 2

Performance Tests

[ ] Test 1
[ ] Test 2

Test Coverage

Screenshots

Summary by CodeRabbit

New Features

Added tooltips to the edit button for quizzes, indicating that editing is not allowed once the exam has started.
Introduced new messages in English and German to inform users about editing restrictions during an ongoing exam.

Bug Fixes

Minor formatting update for consistency in the JSON structure.

Please unstale.

I am closing this PR because it originates from a branch in a forked repository, and our test server cannot be deployed on branches from forked repositories. I have already transferred the changes to a new branch in the main repository and will open a new PR from there.


Added :custom_id mailjet API option.

I forgot to add the CustomID API option which we use.
Doc is here: https://dev.mailjet.com/guides/#send-an-email-with-a-custom-id
I took the chance to make a little refactoring in the mailjet test file.

Cheers. I'm traveling at the moment and will have to make the release later. You can use the lib via github dependency for now.

@augnustin thanks for the PR, it's out in 0.24

Thanks for merging. I think we're good with Mailjet API integration for now. :smile:


chore(release): Release 1.4.0

1.4.0 (2020-05-28)
Features

rangeinput: creates form RangeInput component, test, and stories (#194) (8e0179f), closes #81
add dateInput component for forms (#144) (bc5eccc)
add Footer component #142 (#146) (94c3ed8)

Bug Fixes

accept id and name props for Search component input field (#183) (c39c085), closes #162
export Search component (2508829)
extends header menu to accept list props for corresponding id (#188) (85a1780), closes #165
removes the usa-search class name from the form component (#184) (8cb5121), closes #163
update gov banner to uswds version 2.7.0 (c5bd62c)

Warnings

:warning:

Changes were made to yarn.lock, but no plain text yarn audit output was found in PR description. - Can you run yarn audit in your branch and paste the results inside a markdown code block?

  Generated by :no_entry_sign: dangerJS against 8793abd5da42320050589f0cb7dc6a2157aef246


Errors after upgraded to v2

I've just updated to v2.0.0 and adapted setup to make it works.
Read the release notes and also readme to check the diff/what should I do.
Current config files

docker-compose.yml:
  webhook:
    restart: unless-stopped
    container_name: webhook
    image: tarampampam/webhook-tester
    ports:
      - "8003:8080/tcp"
    command: serve --port 8080 --storage-driver redis --pubsub-driver redis --redis-dsn redis://redis:6379/0 --auto-create-sessions
    depends_on:
      redis: {condition: service_healthy}

Caddy:
webhook.mydomain.com {
        import logging

        reverse_proxy / :8003 {
                header_up Host {host}
                header_up X-Real-IP {remote_host}
                header_up X-Forwarded-Ssl "on"
        }
        reverse_proxy /socket.io :8003 {
                transport http {
                        versions 1.1
                }
                header_up Upgrade {http_upgrade}
                header_up Connection "Upgrade"
                header_up Host {host}
        }
        reverse_proxy /ws :8003 {
                header_up Host {host}
                header_up Upgrade websocket
                header_up Connection Upgrade
        }
}

My goal is always have a "default fixed session" as I've setup it in other webhook services and dont need to change time in time.
I used to pass --create-session arg with a easy id 00000000-0000-0000-0000-000000000000 but as I understand it, auto-create-sessions only restore the last ones, right? No way to create a default one?
When accessing the site got errors.
in some moment I could not create any session when accessing webhook.mydomain.com, in other moments it created but could not access any way, refreshing the page many times (and lot errors)
Screenshots

On open root site:

After tried the "create" button with default values (same output with destroy enabled and disabled):

Help dialog not helping at all (it could display the current version too):

Refreshing for a time and then stops in root again without a session:

In docker logs just repeating info access:
{"level":"info","ts":1733833161.0066981,"logger":"http","msg":"HTTP request processed","useragent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.1.1 Safari/605.1.15","host":"webhook.mydomain.com","method":"GET","url":"/","content type":"text/html; charset=utf-8","remote addr":"<IP_ADDRESS>:47996","method":"GET","duration":0.000158}
after this I tried with minimum args:
command: serve --port 8080
Still same errors.
I dont know what I'm doing wrong here, any help could be useful.
I also believe has some bugs but also misconfigured some part I dont know.
A reverse proxy info/helper could avoid some mistakes, I checked the only one I found #305 but it has more than a year ago and in v2 peharps changed any config.

Thank you for providing such a detailed description of the issue, it's incredibly helpful.
Regarding session auto-creation - when implementing this feature, I assumed a static session ID wouldn't be needed since sessions are now automatically created when a request is received. This design allows users to avoid pre-creating specific session IDs, enabling the webhook tester to capture requests seamlessly. However, I'm curious to understand the challenges you're facing with this approach. Could you elaborate on why having a "default fixed session" is essential for your use case?
As for the Caddy configuration - are you using Caddy as the frontend web server? If so, could you share the reasoning behind adding /ws and /socket.io rules? This context might help identify potential misconfigurations.

since sessions are now automatically created when a request is received.

Thanks, it'd solve my question! I didn't know
Reading the readme again, it's there:

--auto-create-sessions | automatically create sessions for incoming requests

My bad! Sorry

I've just pulled the v2.0.1 and recreate the container, it's working now! 🎉
config

docker-compose.yml:
  webhook:
    restart: unless-stopped
    container_name: webhook
    image: tarampampam/webhook-tester
    ports:
      - "8003:8080/tcp"
    command: start --storage-driver redis --pubsub-driver redis --redis-dsn redis://redis:6379/0 --auto-create-sessions
    depends_on:
      redis: {condition: service_healthy}

Caddyfile:
webhook.mydomain.com {
    reverse_proxy :8003
}

Updating in real time with alerts:

New request received
From [ip] with method POST

Wonderful. Thank you again for make the webhook available and also for keeping it updated.

However, I'm curious to understand the challenges you're facing with this approach. Could you elaborate on why having a "default fixed session" is essential for your use case?

The parameter "auto create sessions" is enough and it's ok for me now. Thank you again.
About my need of "default fixed session" is:
I use a third part API and I need to setup the webhooks (in sandbox/testing environment), it is done sending a POST with the url for each one of events types (~5).
So:

POST ... domain.com/0000/event1 ...
POST ... domain.com/0000/event2 ...
[3, 4, 5 ..]

Done. All events in single place, I can see them all together in same session just checking "path", always. Today and next week.
If I'd need to change it every time, with the random id, I'd send a DELETE for each event and then send each POST again with the new url.
Loop it each time the id changes...
I'm closing this issue as no problem left.


Various fixes and improvements

Closes #2529
Closes #2540
Closes #2389
Closes #2553
Closes #2573
Closing NuGet bumps

still get the same problem with the latest version
2024-10-15T18:47:44.319753+02:00 lxma635 fworch-ui:  2024-10-15T18:47:44+02:00 Error - Read Config (MainLayout.razor in line 335), User: admin, Role: admin, Error reading or processing Config.
2024-10-15T18:47:44.320061+02:00 lxma635 fworch-ui:   ---
2024-10-15T18:47:44.320173+02:00 lxma635 fworch-ui:  Exception thrown:
2024-10-15T18:47:44.320253+02:00 lxma635 fworch-ui:   JsonException
2024-10-15T18:47:44.320339+02:00 lxma635 fworch-ui:  Message:
2024-10-15T18:47:44.320431+02:00 lxma635 fworch-ui:   The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. Path: $ | LineNumber: 0 | BytePositionInLine: 0.
2024-10-15T18:47:44.320541+02:00 lxma635 fworch-ui:  Stack Trace:
2024-10-15T18:47:44.320621+02:00 lxma635 fworch-ui:   at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, JsonReaderException ex)
2024-10-15T18:47:44.320709+02:00 lxma635 fworch-ui:     at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
2024-10-15T18:47:44.320824+02:00 lxma635 fworch-ui:     at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 utf8Json, JsonTypeInfo`1 jsonTypeInfo, Nullable`1 actualByteCount)
2024-10-15T18:47:44.321034+02:00 lxma635 fworch-ui:     at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 json, JsonTypeInfo`1 jsonTypeInfo)
2024-10-15T18:47:44.321135+02:00 lxma635 fworch-ui:     at FWO.Ui.Pages.Settings.SettingsModelling.OnInitializedAsync() in /usr/local/fworch/ui/files/FWO.UI/Pages/Settings/SettingsModelling.razor:line 300
2024-10-15T18:47:44.326987+02:00 lxma635 fworch-ui:  FWORCHAlert - source: "ui", userId: "4", title: "Read Config", description: "Error reading or processing Config. . See log for details!", alertCode: "UiError"
2024-10-15T18:47:44.327226+02:00 lxma635 fworch-ui:  2024-10-15T18:47:44+02:00 Debug - API call (GraphQlApiConnection.cs in line 129), Sending API call  in role : query getOpenAlerts {  alert (where: {ack_by: {_is_null: true}} order...
2024-10-15T18:47:44.329229+02:00 lxma635 fworch-ui:  2024-10-15T18:47:44+02:00 Debug - API call (GraphQlApiConnection.cs in line 129), Sending API call  in role : mutation addUiLog(  $user: Int!  $severity: Int!  $suspectedCause: ... with variables: {"user":4,"severity":2,"suspectedCause":"Read Conf...
2024-10-15T18:47:44.349990+02:00 lxma635 fworch-ui:  2024-10-15T18:47:44+02:00 Debug - API call (GraphQlApiConnection.cs in line 129), Sending API call  in role : mutation addAlert(  $source: String!  $userId: Int  $title: String... with variables: {"source":"ui","userId":4,"title":"Read Config","d...

i tested this with a new install and it worked.

@tpurschke there already is a try catch everywhere in the scheduler


more buttons Windows

hello, I am new to programing
how I can modify this to have more then 8 buttons(I need 32 or more) in Windows?
when I change this in boot.py:

0x95, 0x20,  #   Report Count (8)  new value 0x20
0x05, 0x09,  #   Usage Page (Button)
0x19, 0x01,  #   Usage Minimum (0x01)
0x29, 0x20,  #   Usage Maximum (0x08)  new value 0x20

I can see 32 buttons in windows Devices and printers> Pico> Game controllers, but the buttons not work there
but it works just fine in Linux

You will need to change the Hid_XAC_Gamepad.py code as well. It’s written to handle only 3 bytes ( 1 byte for 8 buttons and 2 for joystick). You will need to change it to accept 6 bytes and handle the button press for other additional buttons.Hope this helps.

thank You for reply! xD
so for 32 buttons i need 4 bytes report? (no axis needed)

self._report = bytearray(4)
self._last_report = bytearray(4)

it throw an error:

Traceback (most recent call last):
File "code.py", line 29, in
File "hid_xac_gamepad.py", line 60, in init
File "hid_xac_gamepad.py", line 91, in reset_all
File "hid_xac_gamepad.py", line 101, in _send
ValueError: Buffer incorrect size. Should be 3 bytes.

this is the code
def _send(self, always=False):
        """Send a report with all the existing settings.
        If ``always`` is ``False`` (the default), send only if there have been changes.
        """

        struct.pack_into('<BBB', self._report, 0, self._buttons_state)

        if always or self._last_report != self._report:
            self._gamepad_device.send_report(self._report)

            # Remember what we sent, without allocating new storage.
            self._last_report[:] = self._report

full code here:

code.py
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT

"""
====================================================

* Author(s): Adafruit Industries
* Edited: Milad Hajihassan
"""

# Setup and usage Guide in details:

# 1) Install CircuitPython 7 or above in your board : https://circuitpython.org/downloads
# 2) Add the __init__.py file under \lib\adafruit_hid directory of CIRCUITPY drive
# 3) Add the boot.py file inside main directory of CIRCUITPY drive
# 4) Add the code.py file inside main directory of CIRCUITPY drive
# 5) Add the hid_xac_gamepad.py file inside main directory of CIRCUITPY drive
# 6) Hard reset the board using the reset button or software reset.
# You may need to remove the device in Windows for it to update the HID profile

import time
import board
import digitalio
import analogio
import usb_hid

from hid_xac_gamepad import Gamepad

gp = Gamepad(usb_hid.devices)

# Create some buttons. The physical buttons are connected
# to ground on one side and these and these pins on the other.
button_pins = (board.GP2, board.GP6, board.GP10,)

# Map the buttons to button numbers on the Gamepad.
# gamepad_buttons[i] will send that button number when buttons[i]
# is pushed.
gamepad_buttons = (1, 2, 3,)

buttons = [digitalio.DigitalInOut(pin) for pin in button_pins]
for button in buttons:
    button.direction = digitalio.Direction.INPUT
    button.pull = digitalio.Pull.UP

while True:
    # Buttons are grounded when pressed (.value = False).
    for i, button in enumerate(buttons):
        gamepad_button_num = gamepad_buttons[i]
        if not button.value:
            gp.press_buttons(gamepad_button_num)
            print(" pressed", gamepad_button_num, end="")
        if button.value:
            gp.release_buttons(gamepad_button_num)
            print(" released", gamepad_button_num, end="")

    time.sleep(0.1)

boot.py
# SPDX-FileCopyrightText: 2021 Milador
#
# SPDX-License-Identifier: MIT

"""
`Gamepad`
====================================================

* Author(s): Milad Hajihassan
"""

import usb_hid
import usb_midi
import usb_cdc
import storage

storage.remount("/", readonly=False)

m = storage.getmount("/")
m.label = "ETS_CP"

storage.remount("/", readonly=True)

storage.enable_usb_drive()

XAC_GAMEPAD_REPORT_DESCRIPTOR = bytes((
    0x05, 0x01,  # Usage Page (Generic Desktop Ctrls)
    0x09, 0x05,  # Usage (GamePad)
    0xA1, 0x01,  # Collection (Application)
    0x85, 0x05,  #   Report ID (5)
    0x15, 0x00,  #   Logical Minimum (0)
    0x25, 0x01,  #   Logical Maximum (1)
    0x35, 0x00,  #   Physical Minimum (0)
    0x45, 0x01,  #   Physical Maximum (1)
    0x75, 0x01,  #   Report Size (4)
    # 0x95, 0x08,  #   Report Count (8)
    0x95, 0x20,  #   Report Count (32)
    0x05, 0x09,  #   Usage Page (Button)
    0x19, 0x01,  #   Usage Minimum (0x01)
    # 0x29, 0x08,  #   Usage Maximum (0x08)
    0x29, 0x20,  #   Usage Maximum (0x08)
    0x81, 0x02,  #   Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
    # 0x05, 0x01,  #   Usage Page (Generic Desktop Ctrls)
    # 0x26, 0xFF, 0x00,  #   Logical Maximum (255)
    # 0x46, 0xFF, 0x00,  #   Physical Maximum (255)
    # 0x09, 0x30,  #   Usage (X)
    # 0x09, 0x31,  #   Usage (Y)
    # 0x75, 0x08,  #   Report Size (8)
    # 0x95, 0x02,  #   Report Count (2)
    # 0x81, 0x02,  #   Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
    0xC0,        # End Collection
))

xac_gamepad = usb_hid.Device(
    report_descriptor=XAC_GAMEPAD_REPORT_DESCRIPTOR,
    usage_page=0x01,           # Generic Desktop Control
    usage=0x05,                # Gamepad
    report_ids=(5,),           # Descriptor uses report ID 5.
    in_report_lengths=(3,),    # This gamepad sends 3 bytes in its report.
    out_report_lengths=(0,),   # It does not receive any reports.
)

# Disable CDC if needed
# usb_cdc.disable()

# Disable midi if needed
usb_midi.disable()

usb_hid.enable((xac_gamepad,))

hid_xac_gamepad.py
# SPDX-FileCopyrightText: 2018 Dan Halbert for Adafruit Industries
#
# SPDX-License-Identifier: MIT

"""
`Gamepad`
====================================================

* Author(s): Dan Halbert
* Edited: Milad Hajihassan
"""
import sys
if sys.implementation.version[0] < 7:
    raise ImportError('{0} is not supported in CircuitPython 7.x or lower'.format(__name__))

import struct
import time

from adafruit_hid import find_device

class Gamepad:
    """Emulate a generic gamepad controller with 8 buttons,
    numbered 1-8 and one joystick controlling
    ``x` and ``y`` values.

    The joystick values could be interpreted
    differently by the receiving program: those are just the names used here.
    The joystick values are in the range 0 to 255.
"""

    def __init__(self, devices):
        """Create a Gamepad object that will send USB gamepad HID reports.

        Devices can be a list of devices that includes a gamepad device or a gamepad device
        itself. A device is any object that implements ``send_report()``, ``usage_page`` and
        ``usage``.
        """
        self._gamepad_device = find_device(devices, usage_page=0x1, usage=0x05)

        # Reuse this bytearray to send mouse reports.
        # Typically controllers start numbering buttons at 1 rather than 0.
        # report[0] buttons 1-8 (LSB is button 1)
        # report[1] joystick 0 x: 0 to 255
        # report[2] joystick 0 y: 0 to 255
        self._report = bytearray(4)

        # Remember the last report as well, so we can avoid sending
        # duplicate reports.
        self._last_report = bytearray(4)

        # Store settings separately before putting into report. Saves code
        # especially for buttons.
        self._buttons_state = 0

        # Send an initial report to test if HID device is ready.
        # If not, wait a bit and try once more.
        try:
            self.reset_all()
        except OSError:
            time.sleep(1)
            self.reset_all()

    def press_buttons(self, *buttons):
        """Press and hold the given buttons. """
        for button in buttons:
            self._buttons_state |= 1 << self._validate_button_number(button) - 1
        self._send()

    def release_buttons(self, *buttons):
        """Release the given buttons. """
        for button in buttons:
            self._buttons_state &= ~(1 << self._validate_button_number(button) - 1)
        self._send()

    def release_all_buttons(self):
        """Release all the buttons."""

        self._buttons_state = 0
        self._send()

    def click_buttons(self, *buttons):
        """Press and release the given buttons."""
        self.press_buttons(*buttons)
        self.release_buttons(*buttons)

    def reset_all(self):
        """Release all buttons and set joystick to zero."""
        self._buttons_state = 0
        self._send(always=True)

    def _send(self, always=False):
        """Send a report with all the existing settings.
        If ``always`` is ``False`` (the default), send only if there have been changes.
        """

        struct.pack_into('<BBB', self._report, 0, self._buttons_state)

        if always or self._last_report != self._report:
            self._gamepad_device.send_report(self._report)

            # Remember what we sent, without allocating new storage.
            self._last_report[:] = self._report

    @staticmethod
    def _validate_button_number(button):
        if not 1 <= button <= 32:
            raise ValueError("Button number must in range 1 to 32")
        return button

oh ... i missed this
in_report_lengths=(3,),
it works now! Thanks!

i changed this '<BBB' to '<I' , and now it works!

not sure what this means but it have size of 4 so i tried and miracle happens! xD

i changed report to 8 bytes and struct.pack_into('<Q', self._report, 0, self._buttons_state)
and now i have 64 buttons! xD

@ramaxa9 Great work! Sorry for late reply. Yes, each size indicates a byte. The key is to make sure you don't mess the order buttons with joystick axis's. Now ,it's easier if you just have buttons and you just want to make sure the number of buttons in the report match the number of bytes. It seems you got it. Let me know if you run to other issues.


Update README.md with correct withoutCountryCode

I was trying to use this amazing library and i found i couldn't get this working based on the readme withoutCountryCode is the correct config

Thanks for your fix!


Cannot import or connect to database in Studio - HTTP Auth

OrientDB Version: 2.2.17
Java Version: openjdk version "1.8.0_121"
OS: Alphine 3.5.2
(I'm using the Docker image)
Expected behavior
Attempt to create or import a database, using admin/admin as user/pass as instructed in docs.
Actual behavior
Presented with HTTP auth which I cannot get past.

Did you configure the DOCKER ENV with the root password ?
ORIENTDB_ROOT_PASSWORD=yourpass

I did, yes.
I tried with and without it set.
On 30 Mar 2017 01:50, "Robert Felker"<EMAIL_ADDRESS>wrote:

Did you configure the DOCKER ENV with the root password ?
ORIENTDB_ROOT_PASSWORD=yourpass
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/orientechnologies/orientdb/issues/7285#issuecomment-290260538,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAW0AiioTWJGI2RnFGVGLVF6SffIhov7ks5rqu42gaJpZM4Mthob
.

hi @dannykopping
did you try to use the root user?

Hey, yes i did
On 30 Mar 2017 13:17, "Enrico Risa"<EMAIL_ADDRESS>wrote:

hi @dannykopping https://github.com/dannykopping
did you try to use the root user?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/orientechnologies/orientdb/issues/7285#issuecomment-290380946,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAW0An4PHR3UnTqDAwSNECT8iDRTrrf8ks5rq49EgaJpZM4Mthob
.

Do you still have problem with root user?

Yes i do
On 30 Mar 2017 14:47, "Enrico Risa"<EMAIL_ADDRESS>wrote:

Do you still have problem with root user?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/orientechnologies/orientdb/issues/7285#issuecomment-290400093,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAW0AlGZ6zYkFtSTp60YLwAgQsHrUFftks5rq6R5gaJpZM4Mthob
.

hi @dannykopping
are you able to connect with console?


Fix: Order amount with currency

Related to https://github.com/MyceliumGear/straight-server/pull/60
Now for Payout providers that take fees to generate an address and use their own exchange rate we save the order amount_with_currency as a String and skip saving the exchange_rate to avoid differences in the rates.

@AlexeyShepelev Updated the PR after your comments, updated the other related PRs as well, in admin and widget apps.


[SPARK-11293] Fix shuffle memory leaks in Spillable collections and UnsafeShuffleWriter

This patch fixes multiple memory leaks in Spillable collections, as well as a leak in UnsafeShuffleWriter. There were a small handful of places where tasks would acquire memory from the ShuffleMemoryManager but would not release it by the time the task had ended. The UnsafeShuffleWriter case was harmless, since the leak could only occur at the very end of a task, but the other two cases are somewhat serious:

ExternalSorter.stop() did not release the sorter's memory. In addition, BlockStoreShuffleReader never called stop() once the sorter's iterator was fully-consumed. Put together, these bugs meant that a shuffle which performed a reduce-side could starve downstream piplelined transformations of shuffle memory.
ExternalAppendOnlyMap exposes no equivalent of stop() and its iterators do not automatically free its in-memory data upon completion. This could cause aggregation operations to starve other operations of shuffle memory.

This patch adds a regression test and fixes all three leaks. I'd like to backport this patch to Spark 1.5.x and possibly to other maintenance releases.

/cc @andrewor14 @rxin @davies @mateiz

Merged build triggered.

Merged build started.

Test build #44281 has started for PR 9260 at commit f775445.

Test build #44281 has finished for PR 9260 at commit f775445.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds the following public classes (experimental):\n  *     // to its own URLs over the parent class loader (see Executor's createClassLoader method).\n

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44281/
Test FAILed.

Merged build triggered.

Merged build started.

Test build #44288 has started for PR 9260 at commit 4bfa7e4.

Test build #44288 has finished for PR 9260 at commit 4bfa7e4.

This patch fails PySpark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44288/
Test FAILed.

Jenkins, retest this please.

Merged build triggered.

Merged build started.

Test build #44291 has started for PR 9260 at commit 4bfa7e4.

Test build #44291 has finished for PR 9260 at commit 4bfa7e4.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44291/
Test PASSed.

Looks good to me. Probably ask someone who is more familiar with this part of the code for the final sign-off.

I've gone ahead and merged #9127, which contains something similar to these changes, but updated to reflect the memory manager unification. I still think that we should consider merging this patch as it stands now into 1.5.x and 1.4.x.

Ping @yhuai, any objection to merging this to 1.5? A similar fix has already been incorporated into master as part of my memory manager consolidation patch. We could also choose not to merge / backport this patch, since AFAIK nobody has complained about this issue.

Is it risky? Looks not?
If it is safe patch, wow about we add the check in Task.scala first to make sure that 1.5 does throw the exception? Then, we add the fix and get it merged?

@yhuai I think it's pretty low-risk. I'm going to close this PR and will continue work over at #9427, which is opened against branch-1.5.


Tabbed items redesign (Sphinx design

Here are the designs for the tabbed interfaces: Tabbed Items
I added dark mode as well a slight shadow on the active tab for some elevation

need to add the view for the default tabbed component cc/ @smeragoel

I have added different examples and tab order annotations as well. @gabalafou can you have a look at the designs and let me know if there's something that is unclear or should be discussed? You'll find the designs here: Tabbed Interfaces

Merged into feature branch


Publish into crates.io

We need to publish this crate into crates.io
It the must do thing that wasn't yet accomplished.
What do you think? It still be a toy project that shouldn't appear in places like crates?
Do you have some plans to enhance the library? We did a great job, the library has a single code standard, good readme, nice code conduct and so on... But is it alive?
I understand that you have your own life, but if you don't commit at least once a month then it's probably better to not give people a hope that there is something like that. I neither have an answer what's the right way, It's just a question that appeared suddenly in my head.

Hey, @Pzixel, apologies first for the slow response. The busiest time for me has passed, and I can return back to work :) And thanks for handling the PR/issues.
I have thought about publishing on crates.io. But hesitated to do so given lack of coverage in terms of functionality.
Also the current process of manually implementing wrappers doesn't feel right to me (it is a good starting point for toy projects though).
I have also re-evaluated the options of automatically generating bindings and failed again. Do you have any luck?
While I was doing some digging into bindgen, I noticed gocv, which has already implemented all the C wrappers needed for Go to use. So I experimented a bit with bindgen Rust APIs from there. You can find the work in progress here: code and doc.
The generated bindings documented as opencv_sys crate is available (https://nebgnahz.github.io/rustcv/opencv_sys/index.html) and accessible as ffi module. As a result, adding new functionality is a pure Rust task (so folks who are not familiar with C/C++ don't need to worry about it):
e.g. median_blur:
/// Blurs an image using the median filter.
pub fn median_blur(src: &Mat, dst: &mut Mat, size: i32) {
    unsafe { ffi::MedianBlur(src.inner, dst.inner, size) }
}

The hope is that there will be one place that all developers can contribute to for the C wrapper (i.e. gocv) and both Rust/Go will generate bindings from there.
Since this approach is not compatible with cv-rs, I made it a separate repo for now. If it is a viable approach, we can either merge the implementation here or provide a redirect message from this repo there.
What do you think?

What if we just reuse these python scripts without rewriting them into something else? I believe that we can ask developers to just install python and end with it. If we use "bindgen CLI" for this we wouldn't face the big problems cause we will have all headers pregenerated into repository, just like "Cargo.lock".

I spent some time looking into the python generated and didn't figure out a nice way of directly using it. To interface Python, the generated code has the following signature
// template: static PyObject* pyopencv_cv_xxxx(PyObject* , PyObject* args, PyObject* kw)
static PyObject* pyopencv_cv_AKAZE_create(PyObject* , PyObject* args, PyObject* kw);
static PyObject* pyopencv_cv_PSNR(PyObject* , PyObject* args, PyObject* kw);
// ...

And within the function body, args are parsed with PyArg_ParseTupleAndKeywords. berak also mentioned:

i tried to eat my own dog-food recently, trying to automate opencv wrappers for gocv, but after putting in like 60 hrs on some (current 1038 lines) python script, based on gen2.py, results are only 70%correct. this IS terribly hard !

So at this point, I am uncertain if another 60 hrs (or even more) would be helpful.
I do think join force with gocv is a good step forward, e.g. this issue: https://github.com/hybridgroup/gocv/issues/100.

Re: NEVER EVER USE BINDGEN CRATE.
I have been using bindgen for a few other projects recently and see the issues with using bindgen crate; but as the source/wrapper code evolves and bindgen evolves, commenting and committing the generated code does not seem to be viable to me. Can you elaborate here?

I do think join force with gocv is a good step forward

I do believe it's a step forward indeed. But I also think we may try to have a bigger leap forward. Maybe it's too unrealistic and optimistic, I'd just like to know your opinion on this matter. Maybe spending another 60hrs doesn't worth it, but maybe it is. For what it worth having a opencv-sys crate to be completely autogenerated is a huge win in all senses. Of course we would require to wrap it in rust traits and so on then, but it would be so much simpler. Having it on top of the native opencv script would be a guaranty of the most compatible and complete shim.

I have been using bindgen for a few other projects recently and see the issues with using bindgen crate; but as the source/wrapper code evolves and bindgen evolves, commenting and committing the generated code does not seem to be viable to me. Can you elaborate here?

I only can retranslate the words I heard from the people that worked on it and that I have already written above. If you want some more concrete examples of what could go wrong I could ask them.

I am with you about trying it out; but my Python-ability is limited. If you have something, I am happy to help, though. Also when I say "join force with gocv", I mean joining force on generating opencv-sys as well. I am sure it will benefit gocv as well.

I think we may even transform python wrapper itself into rust wrapper, it probably could be more efficient way to achieve the goal, don't you think?
I want to try to run this script first and see what it generates because I didn't do it even once.

I've asked some help from the opencv team itself, let's see what's their positions is.
I wrote some of my considerations here: https://github.com/opencv/opencv/issues/11666

Close for now


Returns Error with every request

Whenever i request a download with file link for example
Golder retriever
or This
the library always returns the connection error.
the code i am using for making the request is
int downloadId = PRDownloader.download("https://firebasestorage.googleapis.com/v0/b/privato-dfb2c.appspot.com/o/images%2Fyoung-golden-retriever-1404848.jpg?alt=media&token=694fec85-3cc2-48df-9dd3-9a3e6c2987dd", getPath(), "tempfile.jpg")
                        .build()
                        .setOnStartOrResumeListener(new OnStartOrResumeListener() {
                            @Override
                            public void onStartOrResume() {
                                downloadAudio.setIndeterminate();
                            }
                        })
                        .setOnPauseListener(new OnPauseListener() {
                            @Override
                            public void onPause() {

                            }
                        })
                        .setOnCancelListener(new OnCancelListener() {
                            @Override
                            public void onCancel() {

                            }
                        })
                        .setOnProgressListener(new OnProgressListener() {
                            @Override
                            public void onProgress(Progress progress) {
                                downloadAudio.setDeterminate();
                                downloadAudio.setProgress((int) (progress.currentBytes * 100 / progress.totalBytes));
                            }
                        })
                        .start(new OnDownloadListener() {
                            @Override
                            public void onDownloadComplete() {
                                downloadAudio.setFinish();
                            }

                            @Override
                            public void onError(Error error) {
                                downloadAudio.setIdle();
                                Timber.e(error.toString());
                            }
                        });````

Have you added the permission to write on storage and internet?

Yes, manifest has the permission for internet and I have asked for  Read and write permission using Ted, and they are also present in the manifest.

happens to me too, can u fix it as fast as u can ??

Beacuse is htt

是的，清单具有互联网许可，我已经使用Ted要求读写权限，并且它们也存在于清单中。
Bea

Yes, manifest has the permission for internet and I have asked for Read and write permission using Ted, and they are also present in the manifest.

Beacuse you use http in Android Pie

nope. I had cleartexttraffic allowed


httpd possible a race condition for lru purge enable (IDFGH-2680)

esp-idf version - tag v4.0
When the server has a lot of open connections (for testing I run several browsers on several computers and connect to the http server).
I expect that the lru purge enable option to allow next clients to connect. Unfortunately, this does not happen. The browser is waiting for a response, and on the server side I see a lot of logs printing over and over:

D (749094) httpd: httpd_server: processing listen socket 48
D (749104) httpd_sess: httpd_sess_close_lru: fd = 54
D (749104) httpd: httpd_server: doing select maxfd + 1 = 61
D (749114) httpd: httpd_server: processing ctrl message
D (749114) httpd: httpd_process_ctrl_msg: work
D (749124) httpd_sess: Skipping session close for 54 as it seems to be a race condition

my http server configuration:
	config.backlog_conn = 0;
	config.lru_purge_enable = true;
	config.task_priority = 5;

This logs are printing when lru_counter is 0. Maybe in httpd_sess_close_lru, when searching the smallest lru, zero should not be assigned ?
This patch works for me, but I don't know if it's correct.
--- a/components/esp_http_server/src/httpd_sess.c
+++ b/components/esp_http_server/src/httpd_sess.c
@@ -342,7 +342,7 @@ esp_err_t httpd_sess_close_lru(struct httpd_data *hd)
         if (hd->hd_sd[i].fd == -1) {
             return ESP_OK;
         }
-        if (hd->hd_sd[i].lru_counter < lru_counter) {
+        if (hd->hd_sd[i].lru_counter < lru_counter && hd->hd_sd[i].lru_counter) {
             lru_counter = hd->hd_sd[i].lru_counter;
             lru_fd = hd->hd_sd[i].fd;
         }

@patrykkrz , we will check this, but what happens if you keep config.backlog_conn at the default value of 5? Is the observation same?

When backlog_conn is 5, I have the same effect. But I think, I need more tries to repeat.

I can confirm I am experiencing the same issue. HTTPD config:
httpd_config_t config = HTTPD_DEFAULT_CONFIG();         config.uri_match_fn = httpd_uri_match_wildcard;         config.task_priority = 8;          config.lru_purge_enable = true; // purge least recently used request         config.stack_size = 16384;
I experience httpd using lots of CPU time (but not causing WDT).
With the following message:
'
D (15:04:13.821) httpd_sess: Skipping session close for 57 as it seems to be a race condition
D (15:04:13.829) httpd: httpd_server: processing listen socket 51
D (15:04:13.835) httpd_sess: httpd_sess_close_lru: fd = 57
D (15:04:13.841) httpd: httpd_server: doing select maxfd+1 = 61
D (15:04:13.848) httpd: httpd_server: processing ctrl message
D (15:04:13.853) httpd: httpd_process_ctrl_msg: work
'
I will try @patrykkrz patch, and let you know.

I can confirm I am experiencing the same issue. I'm also tring to use the patch by Patrykkrz and it works!

I can confirm I am experiencing the same issue. I'm also tring to use the patch by Patrykkrz but now I have this assert fail: "assertion "invalid state" failed: file "/home/gdvecchia/esp/esp-idf/components/lwip/lwip/src/core/tcp.c", line 1758, function: tcp_kill_state"

It's another problem: https://github.com/espressif/esp-idf/issues/1194
Try this: https://github.com/SLICAN/esp-idf/commit/062241512564c75aa5ad6a613842e4842d99f04d


./run ide watch displays white screen

Run the ./run ide watch on a clean repository. A blank window appears.
This seems to be caused by hardcoding path to tailwind.css in https://github.com/enso-org/enso/commit/6f29262f90027995efbe8d5eee6d831496e97ad7#diff-57b07427fa0b3aa82b74d34fad7c62a14fb874dba1ca7a0e45cb86c67a021938R20

See https://github.com/enso-org/enso/pull/5972#issuecomment-1471916821

@somebody1234

the way to go here is probably to edit the bundle.ts and watch.ts to build tailwind. it doesn't seem to have a programmatic api though so there might be a better way

Both are just wrappers for app/ide-desktop/lib/content/esbuild-config.ts — it should do the thing and use output_path rather than ../../../../../../dist/gui/assets.
Perhaps there's a plugin for esbuild that can do that for us? (e.g. https://www.npmjs.com/package/esbuild-plugin-tailwindcss )

For anyone affected / blocked please remove <link rel="stylesheet" href="/tailwind.css" /> from app/ide-desktop/lib/content/src/index.html which the authentication option is disabled
you will be able to work normally with IDE watch while we are preparing the fix

potential fix just committed. no idea if it works because it's still building...


Allow to use AeroShake to activate zones

Today we can use shift or right-mouse-button to activate/de-activate enable the Fancy Zone "magent" effect.
I propose an option to activate/deactivate similiar to "Aero Shake" - i.e., shaking the mouse back and forth a few times. It seems very intuitive to me.

Tracked in https://github.com/microsoft/PowerToys/issues/6611

no plans to implement this


Trying to get Cement library to work with bracelets

Hi there, I have about 10 bracelets of EU model Cement 1.1 that I'm trying to test this library with (fresh batteries by the way). I'm using a Mega 2560 with no level shifter.
I'm having some small success with your basic.ino file, if I send a CLI command:
1 - black, wakeup!
and then
3 - gold, fade in, fast
the bracelets wake up after about 10 seconds and light up gold and fade in and out. I've tested all the CLI commands and the only commands that seem to respond are:
1 - black, wakeup!
3 - gold, fade in, fast
c - blue, fade, random slow
g - white, fade in, fast
h - test-signal
all the others do nothing.
Ultimately I'm trying to send a custom RGB and FX value to the bracelets programatically, and it seems your Pixmob_Cement library is perfect for this - however your example doesn't seem to do anything to my bracelets.
I just get "done" in the console and no bracelet activity.
`/*       testscript for PixMob waveband - (RF enabled crowd pixel)
library - edition
2024 sueppchen, Serge_45
TX:
arduino pro micro /ATmega32u4
levelshifter
cc1101 radio module
send custom color with attaack and release
*/
#define RED    255      // 0 - 255
#define GREEN  255      // 0 - 255
#define BLUE   255      // 0 - 255
#define ATTACK   1      // 0 -  7 (0 = fast)
#define HOLD     7      // 0 -  7 (7 = forever)
#define RELEASE  0      // 0 -  7 (0 = background color)
#define RANDOM   0      // 0 -  7 (0 = no random)
#define GROUP    0      // 0 - 31 (0 = all batches)
// ------------ global ------------
#include <pixmob_cement.h>
// ------------ I/O ------------
#define CLI_SPEED 115200                                           //ATmega328 = nano, Mini Pro
#define TX 6                           // data output
// ------------ TX ----------
Pixmob batch;
// ------------------ SETUP ------------------- arduino setup
void setup() {                                    //SETUP
Serial.begin(CLI_SPEED);                     // debug
delay(3000);
batch.begin(TX);

Serial.println("done");
delay(1000);

batch.setFXtiming(ATTACK, HOLD, RELEASE, RANDOM);
batch.sendColor(RED, GREEN, BLUE, GROUP);
}

//
// ------------------ MAIN --------------------
void loop() {
batch.refresh();
delay(40);
}
`
Do you know what might be causing this? Any help in the right direction would be very much appreciated.

ok, while the basic.ino script is working here - lets find the difference between us:
I am using pro mini (leonardo) ATmega32u4
I am using Texas Instruments CC1101 board with level-shifter
my batches are EU-version
connected hardware-SPI with SlaveSelect=10, TX=7

you can not use
"hold forever" and "background color" together.
try  the example as it is and then change the values...
often the batch is not used with full brightness to save battery life. so when you send 100% white you draw 120mA power only for the LEDs(20mA each LED) - the inner resistance of the batteries will drop the input voltage under operating level and the batc

I’m not using a level shifter currently (got one on order) and I don’t have a logic analyzer unfortunately. Mine are EU batches also.
My CC1101 is a E07-M1101D-SMA. It’s wired as follows:

The code was updated to use pin 6 as is highlighted, however I’ve also tried pin 7 with no difference.
Given that basic.ino partially works (as mentioned earlier) for lighting up to gold, blue or white - my thought was the wiring should be mostly okay?
I’ve tried a number of different values together on the code example, I’ve even tried removing the FX line and only sending the setColour. I’ve also tried the code as is originally there to no avail.

As an update, I've had some partial success. It suddenly started working when I removed the if (ELECHOUSE_cc1101.getCC1101()) { check.
However the results seems really hit and miss when using basic_color.ino compared to basic.ino. I can sometimes get some of the bracelets to light up but not all of them usually - whereas with basic.ino they all light up consistently.
I've got a level shifter coming today so hopefully that might solve some of the buginess, but will report back.

While I’m working on the other stuff, I wanted to ask:
void valueInput(){                                                // get plain values         index=0x0;         Serial.print("1 mode   (0-3f)"); byteArray[2][1] =  ((uint8_t) readCliHex() ) & 0x3f;         Serial.print("2 green  (0-3f)"); byteArray[2][2] =  ((uint8_t) readCliHex() ) & 0x3f;         Serial.print("3 red    (0-3f)"); byteArray[2][3] =  ((uint8_t) readCliHex() ) & 0x3f;          Serial.print("4 blue   (0-3f)"); byteArray[2][4] =  ((uint8_t) readCliHex() ) & 0x3f;          Serial.print("5 attack (0-7)");  byteArray[2][5] = (((uint8_t) readCliHex() ) & 0x7) << 3;          Serial.print("5 random (0-7)");  byteArray[2][5] += ((uint8_t) readCliHex() ) & 0x7;          Serial.print("6 release(0-7)");  byteArray[2][6] = (((uint8_t) readCliHex() ) & 0x7) << 3;          Serial.print("6 hold   (0-7)");  byteArray[2][6] += ((uint8_t) readCliHex() ) & 0x7;          Serial.print("7 Group  (0-3f)"); byteArray[2][7] =  ((uint8_t) readCliHex() ) & 0x3f;     }   void plainInput(){         Serial.print("input mode   (0-3f)"); byteArray[2][1] = ((uint8_t) readCliHex()) & 0x3f;         Serial.print("input green  (0-3f)"); byteArray[2][2] = ((uint8_t) readCliHex()) & 0x3f;         Serial.print("input red    (0-3f)"); byteArray[2][3] = ((uint8_t) readCliHex()) & 0x3f;         Serial.print("input blue   (0-3f)"); byteArray[2][4] = ((uint8_t) readCliHex()) & 0x3f;         Serial.print("input rise   (0-3f)"); byteArray[2][5] = ((uint8_t) readCliHex()) & 0x3f;         Serial.print("input fall   (0-3f)"); byteArray[2][6] = ((uint8_t) readCliHex()) & 0x3f;         Serial.print("input group  (0-3f)"); byteArray[2][7] = ((uint8_t) readCliHex()) & 0x3f;     }
for the rise, fall, attack, release, etc. - what does the 0-3f and 0-7 equate to? Is this HEX for the seconds?

ok, I am back but I really can not help you - because I do not have your setup to test the stuff. (I do have many arduinos but there is no ATmega256 which has more peripherals than other ATmega chips.
you can check if the hardware-spi has the same pins...  maybe have a look at the Pixmob::begin( ...) function in the library and adjust the pins to your need.
the if(ELECHOUSE_cc1101.getCC1101()){        check is to be shure the communication is ok. so if that fails your SPI-wiring has some faults. check that. you wrote that you used the CC1101 without levelshifter - maybe you killed it. it is only 3.9V on every pin. --> see datasheet page 8, table 1 ,,Absolute Maximum Ratings"
"Under no circumstances must the absolute maximum ratings given in Table 1 be violated. Stress
exceeding one or more of the limiting values may cause permanent damage to the device."
try the advanced.ino from root directory of the project. there you can send custom values.
a table for the rise/ hold and release values can be found in the wiki.

I ended up getting this working, using a level shifter and a new CC1101.
It only works when the bracelet is like 10-20 cm in range of the antenna - which isn’t ideal and it’s pretty spotty too. My guess is the antenna included with the CC1101 isn’t designed for 868Mhz. I’ve ordered a new one off Amazon though which is specifically designed for it - hopefully that’s the range issue.
Thanks for all your help troubleshooting though.

if you have an VNA you could rematch the antenna section. there is a reference in the datasheet at page 25 and 26.
the frequency is actual only a guess with integer multiplicators of the XTAL. I have not been on a pixmob even to check that since I started with this project.


chashmap: use debug_map

uses debug_map. This should theoretically enable pretty printing requests from user but I can't seem to get it to work :/
Maybe someone else can see why?

Can now pretty print the hashmap, e.g.:
before, can't pretty print:
"hello" => Data { val: 0 }"foo" => Data { val:<PHONE_NUMBER>352704000 }"more" => Data { val: 32760 }"bilz" => Data { val:<PHONE_NUMBER>5600 }"borp" => Data { val:<PHONE_NUMBER>84000 }"zoom" => Data { val:<PHONE_NUMBER>00 }"cadabra" => Data { val: 8648640 }"soon" => Data { val: 786240 }"dog" => Data { val: 840 }"food" => Data { val: 15 }"world" => Data { val:<PHONE_NUMBER>058112000 }"baz" => Data { val:<PHONE_NUMBER>9696000 }"zilp" => Data { val:<PHONE_NUMBER>400 }"abra" => Data { val: 345945600 }"zam" => Data { val:<PHONE_NUMBER> }"bar" => Data { val:<PHONE_NUMBER>69088000 }

after, regular and pretty:
{"baz": Data { val:<PHONE_NUMBER>872000 }, "world": Data { val:<PHONE_NUMBER>58784000 }, "bar": Data { val:<PHONE_NUMBER>616000 }, "zam": Data { val:<PHONE_NUMBER> }, "zilp": Data { val:<PHONE_NUMBER>400 }, "zoom": Data { val:<PHONE_NUMBER>00 }, "bilz": Data { val:<PHONE_NUMBER>5600 }, "borp": Data { val:<PHONE_NUMBER>84000 }, "foo": Data { val:<PHONE_NUMBER>2928000 }, "abra": Data { val: 345945600 }, "cadabra": Data { val: 8648640 }, "dog": Data { val: 840 }, "more": Data { val: 32760 }, "soon": Data { val: 786240 }, "hello": Data { val: 0 }, "food": Data { val: 15 }}

{
    "hello": Data {
        val: 0
    },
    "soon": Data {
        val: 786240
    },
    "cadabra": Data {
        val: 8648640
    },
    "borp": Data {
        val:<PHONE_NUMBER>84000
    },
    "bilz": Data {
        val:<PHONE_NUMBER>5600
    },
    "dog": Data {
        val: 840
    },
    "food": Data {
        val: 15
    },
    "world": Data {
        val:<PHONE_NUMBER>58784000
    },
    "zam": Data {
        val:<PHONE_NUMBER>
    },
    "more": Data {
        val: 32760
    },
    "baz": Data {
        val:<PHONE_NUMBER>872000
    },
    "foo": Data {
        val:<PHONE_NUMBER>2928000
    },
    "zoom": Data {
        val:<PHONE_NUMBER>00
    },
    "bar": Data {
        val:<PHONE_NUMBER>616000
    },
    "abra": Data {
        val: 345945600
    },
    "zilp": Data {
        val:<PHONE_NUMBER>400
    }
}

Ping!

See my review comments. They don't seem to have been completed yet :)

Hmmm I don't seem to see any comments? And i definitely didn't get notified if so :/

@m4b Very weird. Don't you see these comments:

@ticki No. I'm 99% sure that you haven't clicked the "complete review" option (which was added semi-recently to github), which is why the comments say "pending" :)

And on that note, what exactly do you mean by fixing the comment?

@m4b Oh hah, a few weeks back you could just leave comments without completing the review.

Technology: not even once
:D

@ticki ping, I sincerely don't know what you'd like fixed exactly with the comments. Let me know and I'll fix it asap, would like to see this merged so can pretty print.

I'm so sorry that this have been laying for so long, I've been on vacation and a bunch of other stuff. I'll merge now.

No worries at all, hope your vacation was good ! :D


Lab 4: Pipeline containing notebook fails with error 2010

Module: 00
Lab/Demo: 04
Task: Modify the pipeline
Step: 07
While trying to run the pipeline containing a notebook, I get an error on the notebook activity saying "2010 User configuration issue. Hit unexpected exception, please retry.” Tried retrying and refreshing browser page. Tried removing the parameter specified in step 6, same error. I select the notebook from a drop-down list so not much else I can edit. The notebook runs fine when run from the notebook editor.

Repro steps:

Follow lab tutorial until Modify the pipeline step 7

Hello @Matlock1000D
Thanks for reporting this issue. We´ll look into it and let you know when we have a fix.

I have experienced the very same issue today. Notebook runs without any errors when executed in Notebook editor and fails each time when I try to run a pipeline.
I got some additional information by clicking on the output symbol of the failed activity (see screenshot). It says something about invalid LakehouseWorkspaceId... Can it be due to the fact that all my fabric ressources are created inside "My Workspace"? I do not have the rights to create additional workspaces so I am forced to complete all lab sessions inside my own personal workspace.

In my case I have a dedicated workspace, but still get the error. I tried again just now, but the problem persist. Thank you @marynakrylova for pointing out the way to get a more detailed error message. I checked and seem to be getting the same one, though I don't know what could be done.

I am also experiencing this issue while working through the pipleline tutorial.  The notebook runs successfully on it's own, but not when run in a pipeline.  LakehouseWorkspaceId is not populated in the input JSON.

Got the same "error 2010" when running this today. Details from the error message:
"Spark SQL queries are only possible in the context of a lakehouse. Please attach a lakehouse to proceed"
In my case, I had to re-open the Lakehouse item. I briefly saw a message in the upper right that it was either reconnecting or reopening a session to the LH. After that, the pipeline ran fine.
In the Input JSON for that activity, there's not any reference to LakehouseWorkspaceId, but there is a workspaceId value.

Hello  @Matlock1000D
Are you still seeing this issue?
I have tried to reproduce it now and it seems to be fixed.

Thanks for following up! I don't have access to that Fabric environment anymore, but good to know that it's been addressed.


CryptographyDeprecationWarning: Use PrivateKeyTypes Instead

Hey @zblurx,
While packaging dploot for Kali Linux, I discovered the following warning:
$ dploot -h
/usr/lib/python3/dist-packages/dploot/triage/certificates.py:12: CryptographyDeprecationWarning: Use PrivateKeyTypes instead
  from cryptography.hazmat.primitives.asymmetric.types import PRIVATE_KEY_TYPES
usage: dploot [-h] [-debug] [-quiet]
              {certificates,credentials,masterkeys,vaults,backupkey,rdg,triage,machinemasterkeys,machinecredentials,machinevaults,machinecertificates,machinetriage,browser,wifi}
              ...

DPAPI looting remotely in Python

[...]

If this warning could be addressed and released as v2.1.5, it'd be great, and I'd sincerely appreciate it.
Thanks in advance.

Hey @Arszilla, the actual version of dploot is 2.2.5 and the issue is fixed in the actual version. I can release a binary for 2.2.5 if you need.

Here is the release for 2.6.0 with a working binary : https://github.com/zblurx/dploot/releases/tag/2.6.0.
I let you close the issue if it is good for you !

@zblurx One issue I see is your README.md. It says/mentions Tamas Jos. I assume that's a typo?

Haha I had copy pasted the license text stupidly. Fixed now

I just repushed the 2.6.0 release.

Everything seems to work fine. I've pushed/published 2.6.0 to GitLab: https://gitlab.com/arszilla/dploot
Thanks a bunch, @zblurx!


Permission denied during installation process in ./bootstrap.sh

Thank you very much for providing this script
Steps to Reproduce:

Clone the repository.
Run ./bootstrap.sh.
Provide the root password when prompted.
Observe the error message.

Expected Behavior:
The script should successfully copy and set the correct permissions for wifi-loc-control.sh without any permission errors.
Actual Behavior:
The script fails to copy wifi-loc-control.sh to /usr/local/bin/ due to a permission denied error.
Environment:

macOS version: [macOS 14.6.1]
Shell: [zsh]
Terminal: [iTerm2]

Additional Information:
It seems that the script either doesn't have the required permissions or there's a problem with the file path during the installation process. Please look into this issue and advise on how to resolve it.

I ran into the same issue. I worked around it by manually running every line in bootstrap.sh.
For me, the only line that returned the permission denied error was line 15:
cp -f $SCRIPT_NAME $INSTALL_DIR.


fixing test to pass with node 18

Description
In order to ensure that we are able to support node 18, we want to have passing unit tests. Node 15+ doesn't support uncaught promises or errors within tests. I changed it to only return a string instead and gave a description so it only fails for the name check for the given test.
Issues Resolved
#485
Check List

[x] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

remote integ tests failing in main cause core made breaking changes, I checked locally all integration tests pass


Ability to toggle markup.goldmark.renderer.unsafe in individual calls to markdownify?

Use case:

I have a static site I'd like to migrate to Hugo. It has both user-submitted comments (using staticman) and a decent number of posts with inline HTML.
I'd like to set markup.goldmark.renderer.unsafe = true while rendering content written by me (posts), but not while rendering content written by readers.
I can't find if there's a way to do that with the existing functions, but it appears not.

Proposed solution (I am a Hugo newbie so not attached to it at all, just throwing something out there):

Add an optional second argument, an OPTIONS dict, to the markdownify function (based on the precedent of transform.Unmarshal).
Currently the only supported option if "unsafe".
If passed, this overrides the value of unsafe set in config.toml.
In the future, other markdown options could be supplied via the same arg.

I would be happy to implement this if the maintainers think this is a good idea and not too difficult to build. Let me know!
And thanks for making Hugo, it's super awesome <3

(Another potential option would be a "block": true to disable the behavior in which single-paragraph markdown blocks have their wrapping <p> element stripped; this would also make it easier to build consistent markdown comments, per the discussion in #3040 .)

(After reading some source code I found the RenderString function, which might be a better place to add this to and already supports a block mode?)

I still want to do this and am still excited about contributing if someone tells me whether this plan is good!


Autostart on reboot

⚠ Please verify that this feature request has NOT been suggested before.

[X] I checked and didn't find similar feature request

🏷 Feature Request Type
Other
🔖 Feature description
start uptime kuma automatically by reboot linux.
✔ Solution
a script
❓ Alternatives
No response
📝 Additional Context
No response

You can just create a systemd service, this is an example for ubuntu, It's probably roughly the same for other distros that are debian based.

https://github.com/louislam/uptime-kuma/wiki/Systemd-Unit-File Here you are, just saw that there are already docs for that
This built in to uptime kuma doesn't really make that much sense

Agree, also pm2 or docker did the job already.


PowerRename cannot refresh file list after renaming

PowerRename cannot refresh file list after renaming. I have to press F5 button to see the changes of filename.

@wjsir
PowerRename doesn't refresh the Explorer view, this is not something that can be fixed by PowerToys, send the feedback using the Windows Feedback Hub application.

@wjsir
PowerRename doesn't refresh the Explorer view, this is not something that can be fixed by PowerToys, send the feedback using the Windows Feedback Hub application.


[SUP-688] Fix nested interactive controls in data table column headers

Currently, axe dev tools warn about nested interactive controls when viewing a data table. This is because, in the column heading, button to show the column actions menu is nested inside a button to sort the table by that column. Moving the menu button outside of the sort button fixes the issue.

I found a rendering bug where the actions menu is rendered on top of the column width adjuster when the column isn't wide enough to fit everything. The column width adjuster seems to receive all clicks so I can't actually activate the menu unless I expand the column width to avoid the overlap.

I found a rendering bug where the actions menu is rendered on top of the column width adjuster when the column isn't wide enough to fit everything.

Nice catch. Should be fixed in https://github.com/DataBiosphere/terra-ui/pull/3333/commits/fed782caeef2d867d9a94a50b01edc6d8b62a1cc.


Test failures (TestNode, TestNodeID)

I'm getting the following test failures with Golang 1.10:
=== RUN   TestNode
--- FAIL: TestNode (0.00s)
        uuid_test.go:306: NodeInterface returned an empty string
=== RUN   TestNodeID
--- FAIL: TestNodeID (0.00s)
        uuid_test.go:376: NodeInterface "user" after SetInteface

All works for me.
$ go version
go version go1.10.3 darwin/amd64
$ go test
PASS
ok  	github.com/google/uuid	0.011s

These tests fail if the running environment doesn't have any network interfaces (e.g., container, VM).

On Linux, you can simulate this with:
sudo ip netns add tmp
sudo ip netns exec tmp go test ./...

I expect darkfeline's change to be incorporated into v1.1 which might not be that far out.

Closing this as V1.1 has the changes.

@pborman #34 has not been merged yet, and v1.1.0 does not have the change.  Did you mean a different tag?

Hmm, let me take a look.

Okay, I just published v1.1.1 with darkfeline's fixes.  Tested on Linux with suggest code snippets above.


Provide configuration as default for wishlist, closes #621

So I've removed it from config too. We have to think in the future how we put it in application.conf. Play provides all the reference.conf more or less copied. I was thinking too on just leaving it clear that they'll find all in reference.conf, to avoid confusion.
Let's see, for now I'll avoid duplication and just leave it there.

Closes #621


Use mix blend mode isolation on code sections.

Code comments are styled with mix-blend-mode: multiply, which currently forces the whole page to be put into a blend mode composition surface, because nothing else on the page creates a stacking context. Doing blending on the whole page hurts performance. It also causes a performance problem specific to Firefox: Firefox doesn't support the "multiply" blend mode in the compositor yet, so it can't accelerate scrolling. (At least starting with Firefox 44 - Firefox up to version 43 has buggy accelerated multiply blending support, so it was turned off in Firefox 44, see bug 1135271.)
Adding isolation: isolate to the code section allows scrolling to be accelerated in recent Firefox versions and makes composition cheaper in all browsers.

This seems like a good thing to add, but I'm going to let @LeaVerou give her blessing.

Merged, thanks!!


include luxon date time options to date

Proposed changes
Including the luxon date time options increases the developer's possibilities in other scenarios, here are some of them:

It is required to receive a date in ISO format and the validation result must return the time zone specified by the developer (ex: UTC):
{ published_at: schema.date({   format: 'iso',   opts: {     zone: 'UTC'   } }) }
input: 2023-09-28T17:05:05.903-04:00
output: 2023-09-28T21:05:05.903Z

It is required to receive a date in ISO format and the validation result to return a DateTime object with the same input time zone, not necessarily the default time zone as it currently works, (assume default time zone in UTC):

{   published_at: schema.date({     format: 'iso',     opts: {       setZone:  true     }   }) }
input: 2023-09-28T17:05:05.903-04:00
expected output equals to input: 2023-09-28T17:05:05.903-04:00
current output: 2023-09-28T21:05:05.903Z

Reuse a schema in different parts ensuring the same output format, consider a data enrichment scenario where you have a validation scheme that includes a date with ISO format, in step 1 a DateTime object is created with a different time zone to the default, it is validated and everything is ok, the user serializes the response and saves it in some storage as json, then in step 2 he recovers the serialized result, makes some changes and wants to use the same schema to validate, like now the field validated as date is a string, the validator internally creates a new DateTime that will remain with the default time zone, when serializing again to continue the sequence of steps, the stored data will be in a different format than the one initially set

Types of changes
What types of changes does your code introduce?
Put an x in the boxes that apply

[ ] Bugfix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist
Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

[X] I have read the CONTRIBUTING doc
[X] Lint and unit tests pass locally with my changes
[X] I have added tests that prove my fix is effective or that my feature works.
[ ] I have added necessary documentation (if appropriate)

Further comments
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

@RomainLanz Is it possible to review this, I would like to stop using the fork


sc-controller: fix broken svg icons

Motivation for this change
See #98116
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change
[x] Tested compilation of all pkgs that depend on this change
[x] Tested execution of all binary files
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[x] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

cc: @orivej @timjrd

I'm going ahead and merge this early because the software is broken in release-20.09.

Backport ca3477ec936


Poloniex returns error... but the amount is ok

Hello, I'm getting this error:
Traceback (most recent call last):
  File "bot.py", line 174, in <module>
    myOrder=polo.createLimitSellOrder ("ETH/BTC", 0.001566 , 0.06126141)
  File "/Library/Python/2.7/site-packages/ccxt/exchange.py", line 917, in createLimitSellOrder
    return self.create_limit_sell_order(symbol, *args)
  File "/Library/Python/2.7/site-packages/ccxt/exchange.py", line 905, in create_limit_sell_order
    return self.create_order(symbol, 'limit', 'sell', *args)
  File "/Library/Python/2.7/site-packages/ccxt/exchanges.py", line 16067, in create_order
    }, params))
  File "/Library/Python/2.7/site-packages/ccxt/exchanges.py", line 16134, in request
    response = self.fetch2(path, api, method, params, headers, body)
  File "/Library/Python/2.7/site-packages/ccxt/exchange.py", line 228, in fetch2
    return self.fetch(request['url'], request['method'], request['headers'], request['body'])
  File "/Library/Python/2.7/site-packages/ccxt/exchange.py", line 266, in fetch
    self.handle_rest_errors(e, e.code, text, url, method)
  File "/Library/Python/2.7/site-packages/ccxt/exchange.py", line 314, in handle_rest_errors
    self.raise_error(error, url, method, exception if exception else str(http_status_code), details)
  File "/Library/Python/2.7/site-packages/ccxt/exchange.py", line 213, in raise_error
    details,
ccxt.errors.ExchangeNotAvailable: poloniex POST https://poloniex.com/tradingApi 422   {"error":"Total must be at least 0.0001."}

So, as you can see, I'm trying to sell 0.001566 ETH, but Poloniex says that I'm trying to sell less than 0.0001. I guess that this is a Poloniex problem, but as it is breaking the program, I wonder if something like a workaround could be done in ccxt, something like return an error and not an exception (to let the program continue with the execution).
It could be also some kind of transformation of the values that happens inside ccxt, I don't know

@werewere hi!
Poloniex says: Total must be at least 0.0001
Now, let's see: total = price * amount
So:
0.001566 * 0.06126141 = 0.00009593536 ← this total value is less than 0.0001

I guess that this is a Poloniex problem, but as it is breaking the program, I wonder if something like a workaround could be done in ccxt,

something like return an error and not an exception (to let the program continue with the execution).

The usual flow for most of coders is to use the try/except block, to catch exceptions and continue execution normally (retrying later or whatever is desired for normal execution). Browse through examples/py to learn how to use exceptions with ccxt, or google for "python exceptions tutorial", because this is a question again comes from a lack of basic programming skills.
My advice is: you should learn Python first, and only when you know it very well, only after that you should try it for algorithmic trading. You could, theoretically, learn by trying to use ccxt for your needs, but if you don't understand your programming language completely, some concepts may be confusing to you. Exceptions are very useful and common, they give much more control over the execution flow than returned error values, and exceptions are easily handled if you know how to use them properly (they even have special syntax for convenience in most of languages).

Oh, I thought that "total" was referred to the amount, not the multiplication amount*price, now I see the problem. Absolutely true, I made the wrong order.
Yup, I have worked with exceptions, but I always prefer return values to control my code, the code seems more clean to my eyes. I think it is just my preference :)  I'm mainly a C programmer so you're right, I'm learning python while I do things for algorithmic trading... I guess I prefer to do things "on the wild".
Thanks a lot for your help!

I have worked with exceptions, but I always prefer return values to control my code, the code seems more clean to my eyes. I think it is just my preference :)

This is exactly what most of C coders say when they start learning exceptions ) I though the same a while ago ) But still, think this way: why would people invent them? My guess is: because in some cases they may actually be more useful than error values that existed previously. You've chosen an OOP language to learn, and the concept of exception is built into its core fundamentals. Getting used to them is just a matter of practice. Some people out there even build fortune corporations based on exceptions, lol...


Release creates extra files without os reference

See

what are those? Maybe we can trace it to the build that introduced those artefacts.

Potentially fixed by https://github.com/evcc-io/evcc/pull/2598

These are .deb files in addition to .tar.gz


chore(ci): bumped rn2md to latest master.

What type of PR is this?
/kind cleanup
Any specific area of the project related to this PR?
/area CI
Does this PR require a change in the driver versions?

What this PR does / why we need it:
Which issue(s) this PR fixes:

Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?:

NONE

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: FedeDP
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [FedeDP]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

/milestone 0.15.0

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: Andreagit97, FedeDP
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [Andreagit97,FedeDP]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Rebased on top of master.

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: Andreagit97, FedeDP
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [Andreagit97,FedeDP]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: Andreagit97, FedeDP, leogr
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [Andreagit97,FedeDP,leogr]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


remove disable/reenable warnings include guards

see https://github.com/wwu-numerik/dune-stuff/issues/20

Is fixed by now.


Table header with rowspan

Hi, I would like to create a datatable with 2 level table header (i.e. rowspan=2). Would that library caters for this? Thanks.

Please use the form for Github Issues in the future.
Can you explain your use case? Perhaps this could be accomplished currently w/ some trickery.

I have the same issue. Trying to create a header that looks something like this:

This is possible in regular datatables (https://datatables.net/examples/advanced_init/complex_header.html), but I would love to know if this could be accomplished with angular2-data-table (even w/ some trickery). Thanks!

Ya, you could do this with header templates. Just make empties where you want the row span w/ css.


Sample image for carousel in home page

We are looking for images to replace the default images of asp.net core. The images must not violate any copyright

https://pixabay.com/en/photos/?q=banner&order=popular


Fold description by default

We would put emphasis on content of collections and let's fold description by default

@yangwao put emphasis on collectors, what exactly does this mean?

@yangwao put emphasis on collectors, what exactly does this mean?

It was a typo, it should be there "We would put emphasis on the content of collections and let's fold description by default"
So let's use fold component from Buefy to fold Description by default :)


android-tools in required packages

hey, it's a very cool project first of all!
Why are android-tools in the required packages, is it really required?
pacman -Syu --needed hyprland hyprpaper hypridle waybar sddm hyprlock konsole dunst libnotify fastfetch ttf-firacode-nerd ttf-jetbrains-mono-nerd pamixer bash-completion cliphist slurp grim github-cli libmtp gvfs-mtp android-tools ntfs-3g noto-fonts-emoji

Hi,
android-tools, it's not strictly required for this Hyprland setup. I added it (and some other packages) because I typically use them in my personal workflow and wanted to make sure I don't forget them during future setups. If you don't need android-tools or any other packages, feel free to skip them when installing.
Thanks.


vis question

When I use 3Rscan dataset, how should I fill  --scene_idx  in.
CUDA_VISIBLE_DEVICES=0 python vis_demo/online_demo.py --scene_idx scene000  --config /home/coastz/codes/ ESAM/configs/ESAM-E_CA/ESAM-E_online_3rscan_CA_test.py --checkpoint /home/coastz/codes/ESAM/checkpoint/ESAM-E_CA_online_epoch_128.pth usage: online_demo.py [-h] [--scene-idx SCENE_IDX] [--config CONFIG] [--checkpoint CHECKPOINT] [--device DEVICE] [--use_vis USE_VIS] online_demo.py: error: unrecognized arguments: --scene_idx scene000

After I used the modified demo, the following problems occurred. I added them to my sys.path and still got errors.
File "/home/coastz/codes/ESAM/oneformer3d/img_backbone.py", line 3, in
from ultralytics import YOLO
ModuleNotFoundError: No module named 'ultralytics'
Traceback (most recent call last):
File "/home/coastz/anaconda3/envs/ESAM/lib/python3.8/site-packages/mmengine/config/config.py", line 466, in fromfile
import_modules_from_strings(**cfg_dict['custom_imports'])
File "/home/coastz/anaconda3/envs/ESAM/lib/python3.8/site-packages/mmengine/utils/misc.py", line 84, in import_modules_from_strings
raise ImportError(f'Failed to import {imp}')
ImportError: Failed to import oneformer3d
File "/home/coastz/anaconda3/envs/ESAM/lib/python3.8/site-packages/mmengine/config/config.py", line 478, in fromfile
raise ImportError(err_msg) from e
ImportError: Failed to import custom modules from {'imports': ['oneformer3d']}, the current sys.path is:
/home/coastz/codes/ESAM/vis_demo
/home/coastz/anaconda3/envs/ESAM/lib/python38.zip
/home/coastz/anaconda3/envs/ESAM/lib/python3.8
/home/coastz/anaconda3/envs/ESAM/lib/python3.8/lib-dynload
/home/coastz/.local/lib/python3.8/site-packages
/home/coastz/anaconda3/envs/ESAM/lib/python3.8/site-packages
/home/coastz/anaconda3/envs/ESAM/lib/python3.8/site-packages/pointops-1.0-py3.8-linux-x86_64.egg
/home/coastz/codes/ESAM
/home/coastz/codes/ESAM/oneformer3d
/home/coastz/codes/ESAM/FastSAM/ultralytics
/tmp/tmp0gjvy9do
/home/coastz/anaconda3/envs/ESAM/lib/python3.8/site-packages/MinkowskiEngine
/home/coastz/codes/ESAM/FastSAM/ultralytics

"It seems that this is because you haven't installed the ultralytics library. You can try running pip install ultralytics==8.0.120."


Get-GSUserLicense CatchAll parameter

Hello,
please, add the CheckAll parameter (ref. #270) to psgsuite.io documentation (link: Get-GSUserLicense).
Thank you,
Luca

Thanks, @lucafabbri365 ! For context now -- without specifying a license SKU, Get-GSUserLicense iterates through each license SKU until it finds a match, at which point it returns immediately. If you include -CheckAll, it continues checking each SKU instead to find all licenses assigned to users. Most users will typically have a single license assigned, but using -CheckAll is recommended when working with domains that regularly assign multiple licenses to users (e.g. adding an additional storage tier).

That being said, I'll need to see why the Docs site doesn't list the additional parameter help. It's on the function help:

I'll take a look at this when we do the next release and see what's going on.


GH-14969: [R][Docs] Enable pkgdown built-in search

Rationale for this change
Enable local search of pkgdown site.
What changes are included in this PR?
Remove some files that are not currently in use.
Are these changes tested?
There is no test, but the following functions can be run to verify that the site is working properly.
pkgdown::init_site("r")
pkgdown::build_search("r")
pkgdown::build_home("r")

Are there any user-facing changes?
No. Document changes only.

Closes: #14969

@github-actions crossbow submit preview-docs

I am wondering if r/pkgdown/templates/navbar.html is also not currently in use and could be removed. (which seems to have nothing to do with fixing this issue)

Preview: http://crossbow.voltrondata.com/pr_docs/36374/r/
It seems that search box works. Is this expected behavior?

It seems that search box works. Is this expected behavior?

Yes, I think it is working well.

@thisisnic @paleolimbot Can we merge this?

Sorry for the delay on this, have been on holiday.

I am wondering if r/pkgdown/templates/navbar.html is also not currently in use and could be removed. (which seems to have nothing to do with fixing this issue)

Unsure without looking into this if it's a custom template or not, but open to removing it if it's not used - let's discuss in another issue.
Not a criticism but an FYI - I would have approved this sooner with a bit more information confirming that we no longer use the tabset functionality that is implemented in extra.js, but I had a scan through the code and it appears we no longer use this, so it looks good to remove it.
Thanks for investigating and fixing this @eitsupi, it'll be helpful to have the search functionality working now!
Before I merge this, would you mind removing {.tabset} on line 90 in vignettes/developers/setup.Rmd?  If you don't get to it before I get back, I'll push the change to the branch.

@github-actions crossbow submit preview-docs

Preview: http://crossbow.voltrondata.com/pr_docs/36374/r

Where can I look to find out this URL? (I recall it being listed in the GitHub Actions log, but I just looked and couldn't find it)

See the summary view: https://github.com/ursacomputing/crossbow/actions/runs/5465384142#summary-14796723867

See the summary view: ursacomputing/crossbow/actions/runs/5465384142#summary-14796723867

Oh, I get it. Thanks.


Parameters and Arguments in Python

Description
To Describe briefly about Parameters and Arguments in python
Domain
Python_Domain
Type of Contribution
Documentation
Code of Conduct

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

/assign


Disable one pointless eslint TS rule on JS files.

Signed-off-by: Jérôme Benoit<EMAIL_ADDRESS>

Oh wow! nice
I haven't thought about overrides
Sorry ^^'


Fix fermion cases in blocksparse SVD

Some previously working cases of the SVD for auto fermion stopped working due to changes in NDTensors/src/blocksparse/linearalgebra.jl. This PR changes those lines of code back to a correctly working version and restores the corresponding tests which were marked as broken.
With this PR, all four "matrix" cases of the SVD should again be working.
The other cases which are still marked as broken are also likely conceptually correct as long as one correctly conjugates certain mixed arrows with a parity tensor before determining whether U or V are unitary. So in a sense it is those last two tests which are broken, not the ITensor code. (This PR does not address those tests; just mentioning it for context.)

Thanks for catching that, that was my mistake.

Codecov Report
All modified lines are covered by tests :white_check_mark:

Comparison is base (e571300) 85.39% compared to head (1ccc3a8) 67.34%.
 Consider uploading reports for the commit 350370b to get more accurate results

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1212       +/-   ##
===========================================
- Coverage   85.39%   67.34%   -18.05%
===========================================
  Files          89       88        -1
  Lines        8426     8388       -38
===========================================
- Hits         7195     5649     -1546
- Misses       1231     2739     +1508

see 36 files with indirect coverage changes

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Add Python 3.10 wheels

Update build-test-package.yml with Python 3.10 build config for Windows, Linux

Closed in #38