text:
Best way to display multi-line blocks?

I've been playing around with presenterm for a coding presentation I have coming up, and I was wondering if there's a good way to render multi-line things like ASCII art without using images or potentially code blocks?

To be more specific, I want to use things like stylized ASCII text or QR codes in my presentation, but I can't find a satisfactory way to insert those in a way that I feel looks good. Putting them in code blocks like in the photo above works in terms of getting them to render in the presentation, but then they have the colored background; I can remove the background using themes/config, but I want the background for the actual code blocks, just not these "display" blocks, and I can't find a way to conditionally format anything in the documentation.
Apologies if this is a vague/strange question, I'm happy to clarify if that would help.
I can think of some ways to potentially implement this if it doesn't exist, but I'm not sure if any of them are idiomatic for the project, or if this idea is even within the scope of the project at all.

I was kind of able to achieve this using the 4-whitespaces for a line-break and   for the leading spaces, and the result isn't bad. That said, the code for it is pretty messy, and has to be adjusted by hand to achieve the desired result.

 ██████  ██████       ██████  ██████  ██████  ███████ ███████
██    ██ ██   ██     ██      ██    ██ ██   ██ ██      ██
██    ██ ██████      ██      ██    ██ ██   ██ █████   ███████
██ ▄▄ ██ ██   ██     ██      ██    ██ ██   ██ ██           ██
 ██████  ██   ██      ██████  ██████  ██████  ███████ ███████
    ▀▀

I don't think the above method allows for centering the text, either; you could do three columns and use only the middle one, but the left-justified text in the middle column would still be slightly off. If there's a better way to achieve this, I'd still love to know it.

This is where I would use +exec_replace added in #330.
However, I can see that it currently adds an execution background color and has a min width, which I would say is unexpected behaviour.
```bash +exec_replace
echo "https://github.com/mfontanini/presenterm" | qrencode -t utf8i
```
Currently results in this:

Where ansiutf8i is:

@mfontanini Perhaps +exec_replace should not draw a background color?

Thanks for commenting here, I was going to suggest this too. On the background color: I think maybe a new +transparent_background or +no_background option would make sense here? e.g. use +exec_replace +no_background. Otherwise maybe you do want a background sometimes? I dunno, I've never used exec_replace and have no real use cases.

Personally, I'm a fan of the +no_background flag. While I'm sure it will have a small impact on the complexity of presentations that choose to use it, I think it could be useful in a couple different situations. It would most likely solve my use case.

Thanks for commenting here, I was going to suggest this too. On the background color: I think maybe a new +transparent_background or +no_background option would make sense here? e.g. use +exec_replace +no_background. Otherwise maybe you do want a background sometimes? I dunno, I've never used exec_replace and have no real use cases.

Sounds great! Only want to point out that there is some ambiguity with whether it'll remove the background from the codeblock or the output pane, or both :)

I think transparent for both makes the most sense from an end-user perspective. Setting a +no_background flag on a code block only to have the output pane still have a background feels like it would raise eyebrows, at least personally.
Alternatively, there could be a +no_exec_background flag as well as a +no_background flag to be clearer, but I wonder if there's a real use case for that level of granularity. It seems to open the door to the idea of having override flags for every styling property, which, while I would use, I'm not sure many would.

Sorry it took me a bit to get to this. I created #363 to address the issue. I ended up creating +no_margin instead of +no_background because of the comments raised above. This is what you actually want: you don't want presenterm to add extra margin, you just want whatever output the program that you run generates to be displayed as-is. Running qrencode now yields something like.

Apologies, I don't think I explained my original issue very clearly. The +no_margin flag is a great addition to presenterm, so I'm happy that the discussion has born fruit! However, #363 doesn't solve the particular issue I'm having.
What I'm looking for is to be able to display text in some kind of raw, unprocessed form. Markdown automatically does things like squashing whitespaces and italicizing words with asterisks (*) around them, which is great, but I want to display arbitrary multi-line text (like ASCII art/text) without the automatic formatting and processing, so that it displays exactly the text I put into it. The QR code was one example of that usage, but the ASCII text is actually more interesting to me than running the bash to generate the QR code.
The best solution I could find was to use code blocks, which display all the text put into them as written (with some exception). My problem with this approach, however, is the code blocks backgrounds, which I don't want present when putting something in a code block for "display purposes" (i.e. large ASCII text for a large header). However, as far as I have found, backgrounds on code blocks are only changeable at a theme-level (which affects every code block in the entire presentation), and not an individual block-level. Thus, there is no way that I know of to have my actual code snippets in a code block with a background, but put for-display text (like ASCII art/text) in a code block without a background.
The only other solution I found was the one I mentioned in my second comment where I did it in regular Markdown using   tags and a certain number of spaces at the end of the line. However, that process was both difficult and mired with drawbacks, so I really think it's worse than the code blocks solution.
While I think the +no_margin flag is awesome, and would probably be super useful in addition to what I'm asking about, it doesn't solve my original issue. I think the suggested +no_background flag is closer to what I'm looking for than the +no_margin flag.
Like I said previously, it's fine if this isn't within the scope of the project; I'm not contractually obligated to use presenterm or anything like that! I just think the project is awesome, and I figured I'd throw my two-cents in as to how it might potentially be improved. Again, apologies for the miscommunication on my part.

Sorry, I got stuck on the QR code example which I think looks alright because there's no background in between characters. But looking at some text -> ascii art example it makes sense that +no_background is what you want. I'll see if maybe I pack what I did with no_margin into a no_background that does both things (remove background and margins; this sounds the same but internally it has a different meaning).

The QR code example is honestly awesome, and frankly cooler than my original request, so I can't say I blame you! And I think if I were generating the ASCII text from an API call or something similar, then the +no_margin flag would probably help me more than my current approach of just copy-pasting the ASCII from somewhere else.

Alright this should be fixed now. This doesn't yet work well in combination with exec or exec_replace but you're not using those so you should be good. If something looks off, please let me know! See #368 for example usage.

Looks awesome, thank you! Does exactly what I was hoping! Sorry again for the confusion!

No worries! Glad it worked as expected :tada:!

authors: DrunkenToast chris-t-jansen mfontanini

repo: mfontanini/presenterm


text:
Sendreport mail contains only the updates of the last server of a list of -computername

Hello
Good work with this module  :-)
Here is a little bug that I found.
I executed this command
get-wulist -ComputerName srv-infor-app1,int-infor-app1,dev-infor-app1 -WindowsUpdate -SendReport -PSWUSettings @{SmtpServer="smtp.xxxx.xx";From="yyy@xxx.ch";To="yyy@xxx.ch"} -Verbose
The updates are listed in the console

I receive the mail, but only the updates of the last server in the list are listed

My configuration :
PS C:> $psversiontable
Name                           Value

PSVersion                      5.1.19041.3570
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.19041.3570
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
PS C:> Get-Module PSWindowsUpdate
ModuleType Version    Name                                ExportedCommands

Binary     2.2.1.3    PSWindowsUpdate                     {Add-WUServiceManager, Enable-WURemoting, Get-WindowsUpdate, Get-W...

I confirm it was a bug. It resolved in new version.

source: gharchive/issue

license: MIT

license_type: permissive

license_source: github-api


text:
Upgrade to fastify v4

Hi, we're currently using this plugin to handle our sessions since it allows for custom sign/unsign functions.
Fastify 4 has been released yesterday and we cannot upgrade everything to fastify 4 since this plugin is not yet compatible with it.
I don't think there is actually anything to update code-wise, just upgrading should be fine.

Landed in 0.16.0. Please let me know if you encounter any issues.

repo: mgcrea/fastify-session


text:
add css lint task

As discussed here #556. This is the css lint task implementation. I messed up and created #561 from the master branch, so this includes all of #561's changes. That one should be merged / rejected first.
linters:

stylelint
doiuse
colorguard

LGTM, great job!
Do you think we can make csslint make sure the project is following Google's style guide?

https://github.com/mgechev/angular2-seed/pull/561 seems part of this PR. Lets close it.

@tsm91 what do you think about the Google style guide? Are there any ready-to-use configuration files? If not, we can stick to the current rules we already have.

Do you think we can make csslint make sure the project is following Google's style guide?

I think so. Would make sense to use the google css guidelines. In fact the stylelint-config-standard uses some part of Google's style guides.
Unfortunately i haven't found a stylelint rule implementation of it. I am sure it is possible but it would take a lot of work.

#561 seems part of this PR. Lets close it.

Yeah sorry, i was working in the master branch instead of creating a separate one -,-

1, The postcss-assets should be mentioned somewhere in the readme to avoid confusion and point out the URL resolution possibilities.
2, The Add-custom-Gulp-task
 wiki page should also be updated, to add sass and source maps. Since you only need to drop 3 .pipe to build.html_css.ts it should be another wiki article. And the add custom task article should be changed to add some other rudimentary task.

I'm wondering if postcss-assets will have more negative rather than a positive impact on the seed.
In general I find it very useful and I'd include it in my project. On the other hand, it brings one more level of indirection and may be confusing for the developers who are not familiar with it.
// cc @ludohenin @nareshbhatia @Bigous

Correct, it is certainly possible. In fact it is very handy to just write resolve() to font-face and background urls and it will resolve the file no matter where it is inside of /src/assets.
I think it is very easy to pick it up, also this is an opt-in feature so it is not necessary to use it. A few lines of comment right above background: resolve("more.svg"); would clear the confusion i think.

I'm not familiar with postcss stuffs so difficult to say. If it's an opt-in then that's probably fine.

Postcss takes a bit of mental remapping compared to most of the current tools. That said, it's powerful / fast and pluggable which makes it attractive. I've only tinkered with it & I have thus far been impressed.
IMO - So long as it is opt-in and well documented, I think it has a place here. It's rapidly gained in popularity and the plugin ecosystem seems to double every time I go look.

@tsm91 a rebase will be required. There are a lot of changes because of the latest refactoring which aims bigger modularity of the seed so resolving the merge conflicts will not be trivial...
If you want you can open a new PR. about postcss-assets, how about not including them in the build process but adding a sample integration page in the wiki? How does it sound?

@tsm91 @mgechev - I agree with the sample integration page idea for postcss-assets keeps things nice and pre/post processor agnostic.
@tsm91 - As a side note, having just done this with a pre-refactoring branch. It was significantly faster to create a new branch and recommit the changes than it was to try and work them into a rebase.

@tsm91 any updates?

@d3viant0ne @mgechev hey guys, sorry i am in a middle of a moving process
had to paint the walls of the flat, package up my stuff, but i will do this today and re-submit the PR
i will close this one and open a new one, the re-base process seem to be scary :D

No worries. There were some huge changes in the seed so I agree that a new PR will be an easier option. Looking forward for it! Btw, lets not include postcss-assets initially. I'll be happy if we have a wiki article for it (since I'll be one of the users of it) but the level of indirection it brings could be a bit frustrating.

@mgechev roger that, i wont include postcss-assets only as a wiki tutorial

@tsm91 sounds awesome! Looking forward for it!

css-lint disappeared?

source: gharchive/pull-request

license: mit

license_source: bigquery


text:
Feature request: A rule to turn private variables and methods if unused outside the class

@Component({
  template: `
    <div *ngIf="aMethod()">
      {{ x }}
    </div>
  `
})
class AppComponent {
  aMethod() {
    this.bMethod();
  }

  bMethod() { // failure here indicating that you can turn this in a private variable
    // ...
  }
}

PS: This rule may not be trivial to implement, since people could be using this method outside the template, in another component, for example.

Can the linter try to change it to private in a dry run of type checking and then check if it broke something? That seems like the easiest way to know if the user is using it somewhere.

repo: mgechev/codelyzer


text:
🛑 Merchant APP (Terms & Conditions API) is down

In 5e59d29, Merchant APP (Terms & Conditions API) (https://gateway.wavemoney.io/v2/merchant-api/merchant-term-and-condition-content/get-latest) was down:

HTTP code: 404
Response time: 210 ms

Resolved: Merchant APP (Terms & Conditions API) is back up in 90a7223 after 11 minutes.

repo: mgmgpyaesonewin/strapi-upptime


text:
🛑 Merchant APP (API Version API) is down

In 3704be8, Merchant APP (API Version API) (https://gateway.wavemoney.io/v2/merchant-api/url-version/entity/merchant) was down:

HTTP code: 403
Response time: 15 ms

Resolved: Merchant APP (API Version API) is back up in 92f5abd.


text:
🛑 Traffic Dashboard Mediahuis België is down

In 9ba91c7, Traffic Dashboard Mediahuis België (https://traffic.mediahuis.be/api/system/status) was down:

HTTP code: 503
Response time: 329 ms

Resolved: Traffic Dashboard Mediahuis België is back up in 9b5120c after 5 minutes.

repo: mh-data-science/upptime


text:
🛑 Traffic Dashboard Mediahuis Nederland is down

In 7a8bebc, Traffic Dashboard Mediahuis Nederland (https://traffic-tmg.mediahuis.nl/api/system/status) was down:

HTTP code: 503
Response time: 24846 ms

Resolved: Traffic Dashboard Mediahuis Nederland is back up in 72a3ae4 after 7 minutes.


text:
AttributeError: 'CLIP' object has no attribute 'get_visual_features'

I tried to run the example notebook but got this error for CLIP model.

I have this problem too.

Have you solved this problem? I met same problem.

I think you should:
pip uninstall clip
pip install git+https://github.com/mhamilton723/CLIP.git


text:
Vulnerability with hidden files on linux?

1. What version of Caddy are you running (caddy -version)?
0.9.4
2. What are you trying to do?
Testing hidden file vulnerability.
3. What is your entire Caddyfile?
None
4. How did you run Caddy (give the full command and describe the execution environment)?
Centos 7 (x64)
5. What did you expect to see?
I tried viewing files named as these listed below which are hidden:
.htaccess
.htpasswd
.test
.hidden/.test2 (folder with a hidden file)
I tested it with an hidden directory and I received a 404 (expected result):
.hidden (mentioned above)
6. What did you see instead (give full error messages and/or log)?
I saw the full content of these files.
7. How can someone who is starting from scratch reproduce this behavior as minimally as possible?
Nothing special to do. Install version 0.9.4 and test.
Note
I'm new to Caddy (I've been testing it for two days). I wouldn't expect these files to be readable and viewable online. Is it a feature, is there a setting to make hidden files return a 404 or is it a security vulnerability?
I've looked at the code in  caddy/caddyhttp/staticfiles/fileserver.go
I think these lines or the function called may be incorrect:
if fs.IsHidden(d) {
return http.StatusNotFound, nil
}
(*) Btw, I think the 404 on hidden directories is an undocumented feature (I couldn't find it mentioned in the docs).
May be related to #458 or #370.

May be related to #458.

May be related to #458.

I just tested and if Caddy is installed in your root directory or your root directory contains your ssh keys they are viewable online by default.
Such as if they're installed in directories such as these:
.ssh/authorized_keys
That behavior may also be a security risk.

I just tested and if Caddy is installed in your root directory or your root directory contains your ssh keys they are viewable online by default.
Such as if they're installed in directories such as these:
.ssh/authorized_keys
That behavior may also be a security risk.

Caddy will serve static files in the root of your site, which defaults to the cwd. If you don't want Caddy to read them, don't put them in the website folder, or change the file permissions so that the Caddy user can't read them. This is certainly not a vulnerability in Caddy. Thanks for looking into it!

Caddy will serve static files in the root of your site, which defaults to the cwd. If you don't want Caddy to read them, don't put them in the website folder, or change the file permissions so that the Caddy user can't read them. This is certainly not a vulnerability in Caddy. Thanks for looking into it!

I didn't understand at first that caddyfile commands replaces .htaccess behavior.
I've read more from the docs and understand it being as it is with any files except .htpasswd files.
I read this: https://caddyserver.com/docs/basicauth
There is no mention that .htpasswd files are viewable by default in this doc.
What is the recommended way to protect these file?
Is it using rewrite? (https://caddyserver.com/docs/rewrite)

I didn't understand at first that caddyfile commands replaces .htaccess behavior.
I've read more from the docs and understand it being as it is with any files except .htpasswd files.
I read this: https://caddyserver.com/docs/basicauth
There is no mention that .htpasswd files are viewable by default in this doc.
What is the recommended way to protect these file?
Is it using rewrite? (https://caddyserver.com/docs/rewrite)

I didn't understand at first that caddyfile commands replaces .htaccess behavior.

I didn't understand at first that caddyfile commands replaces .htaccess behavior.

I didn't understand at first that caddyfile commands replaces .htaccess behavior.

Right, Caddy isn't Apache.

I've read more from the docs and understand it being as it is with any files except .htpasswd files.

I want to rip out that functionality; I hate .htpasswd...

There is no mention that .htpasswd files are viewable by default in this doc.

Why should it? Don't put .htpasswd in your site folder if you don't want it served.
You could use rewrite, too, I guess. Whatever floats your boat. :)

I didn't understand at first that caddyfile commands replaces .htaccess behavior.

Right, Caddy isn't Apache.

I've read more from the docs and understand it being as it is with any files except .htpasswd files.

I want to rip out that functionality; I hate .htpasswd...

There is no mention that .htpasswd files are viewable by default in this doc.

Why should it? Don't put .htpasswd in your site folder if you don't want it served.
You could use rewrite, too, I guess. Whatever floats your boat. :)

Thanks a lot for the answers. I really like Caddy.
I have a few sites I'm considering transferring and some of them unfortunately use .htpasswd as well as cgi.
.htpasswd, cgi and fail2ban have proven reasonably stable and secure for my budget over the years.
The fact that I can compile, understand the code a bit (I'm not a golang developer, but want to learn it this year) and that the docs are good makes caddy a really good option.

Thanks a lot for the answers. I really like Caddy.
I have a few sites I'm considering transferring and some of them unfortunately use .htpasswd as well as cgi.
.htpasswd, cgi and fail2ban have proven reasonably stable and secure for my budget over the years.
The fact that I can compile, understand the code a bit (I'm not a golang developer, but want to learn it this year) and that the docs are good makes caddy a really good option.

Thanks. I'm trying to come up with an easier replacement for .htpasswd that can integrate directly with Caddy's basic auth functionality. If you have ideas/suggestions I'd be happy to hear them. :+1:

Thanks. I'm trying to come up with an easier replacement for .htpasswd that can integrate directly with Caddy's basic auth functionality. If you have ideas/suggestions I'd be happy to hear them. :+1:

Strengths of basicauth's are:

Ease of use
Browser support
Server support

Cons:

Questionable security (vulnerable to bruteforce attacks and the .htpasswd file is a risk too)
Lack of templating
Speed issue with bigger files (non-issue for most sites)
No group feature
No real expiration feature (beside closing the browser)
Logout feature is hard to implement on all browsers
Password change for users is hard to implement
Potential use of multiple files

It depends what you wish to improve from the current features.
OAuth, a custom solution built on something like sqlite or another solution may be other options, but specs would have to be detailed.

Strengths of basicauth's are:

Ease of use
Browser support
Server support

Cons:

Questionable security (vulnerable to bruteforce attacks and the .htpasswd file is a risk too)
Lack of templating
Speed issue with bigger files (non-issue for most sites)
No group feature
No real expiration feature (beside closing the browser)
Logout feature is hard to implement on all browsers
Password change for users is hard to implement
Potential use of multiple files

It depends what you wish to improve from the current features.
OAuth, a custom solution built on something like sqlite or another solution may be other options, but specs would have to be detailed.

OAuth would be a separate middleware entirely, and indeed there has been some work to integrate OAuth into Caddy as a plugin (/cc @captncraig I think was doing it).
Could you elaborate on these points? I'm not clear on them:

Templating
Speed issue with bigger files
Group feature
Why password change is hard to implement
Potential use of multiple files

Basicauth could probably be improved with:

Built-in rate limiting, e.g. a number of failed logins and we block the IP for some time.
Configurable "session" expiration
An external file listing users and passwords and maybe even authorized paths, like .htpasswd but less cryptic and maybe more powerful

OAuth would be a separate middleware entirely, and indeed there has been some work to integrate OAuth into Caddy as a plugin (/cc @captncraig I think was doing it).
Could you elaborate on these points? I'm not clear on them:

Templating
Speed issue with bigger files
Group feature
Why password change is hard to implement
Potential use of multiple files

Basicauth could probably be improved with:

Built-in rate limiting, e.g. a number of failed logins and we block the IP for some time.
Configurable "session" expiration
An external file listing users and passwords and maybe even authorized paths, like .htpasswd but less cryptic and maybe more powerful

Built-in rate limiting, e.g. a number of failed logins and we block the IP for some time.

That would be good. It would eliminate the need for an extra layer (and dependency) such as fail2ban that isn't that easy to configure.

Configurable "session" expiration

Would be good too. Allowing a "logout" possibility that works accross all browser may be implemented alongside that feature. It's not a joy to develop on Apache especially for IE.
Ref: http://stackoverflow.com/questions/1163868/how-to-logout-when-using-htaccess-and-htpasswd-authentication
Ref: http://stackoverflow.com/questions/449788/http-authentication-logout-via-php

An external file listing users and passwords and maybe even authorized paths, like .htpasswd but less cryptic and maybe more powerful

That would be good too.

Sure, I'll try to elaborare more on these. I'm not an expert on .htpasswd though. Maybe an intermediate level user.
Templating
.htpasswd uses browser's internals to display the prompt for login and password. PHP or another language could be used to make a more elaborate solution (with a design that is richer), but .htpasswd doesn't provide such possibilities by itself.
Speed issue with bigger files
See this: https://httpd.apache.org/docs/2.4/en/howto/auth.html#possibleproblems
(I can't confirm 100% if it applies to Caddy too, but I would believe so at least if it's http and not using http/2.)

Because of the way that Basic authentication is specified, your username and password must be verified every time you request a document from the server. This is even if you're reloading the same page, and for every image on the page (if they come from a protected directory). As you can imagine, this slows things down a little.

Group feature
BasicAuth could support groups with options such as these:

AuthUserFile "/usr/local/apache/passwd/passwords"
AuthGroupFile "/usr/local/apache/passwd/groups"
Require group GroupName`

Ref: https://httpd.apache.org/docs/2.4/en/howto/auth.html#lettingmorethanonepersonin
Ref: https://httpd.apache.org/docs/2.4/en/mod/mod_authz_groupfile.html
That's the Apache way of handling it. That usage is limited to "allowing these groups access", it doesn't provide ways to "limit" these groups differently based on these groups. Implementing this or something else would require development.
Why password change is hard to implement
BasicAuth by itself doesn't provide  a way to "add", "modify" or "delete" users. It also doesn't provide a way to edit passwords. Such features would have to be implemented. Wouldn't be hard per-se, but more a tedious task as it would have to be tested on every OS.
Apache handled it this way: https://httpd.apache.org/docs/current/en/programs/htpasswd.html
Potential use of multiple files
.htpasswd allows for usage such as both of these using two .htpasswd on one domain:

domain.com/protected
domain.com/admin

or

domain.com/protected/admin

Adding , modifying or removing a "basicauth" directive means having to restart Caddy or send it a "USR1":
https://caddyserver.com/docs/basicauth
Ref: https://caddyserver.com/docs/cli
If that server is a media or data server it may mean lost of connection or download for some users. It's possibly a minor issue or a non-issue with Caddy.

Built-in rate limiting, e.g. a number of failed logins and we block the IP for some time.

That would be good. It would eliminate the need for an extra layer (and dependency) such as fail2ban that isn't that easy to configure.

Configurable "session" expiration

Would be good too. Allowing a "logout" possibility that works accross all browser may be implemented alongside that feature. It's not a joy to develop on Apache especially for IE.
Ref: http://stackoverflow.com/questions/1163868/how-to-logout-when-using-htaccess-and-htpasswd-authentication
Ref: http://stackoverflow.com/questions/449788/http-authentication-logout-via-php

An external file listing users and passwords and maybe even authorized paths, like .htpasswd but less cryptic and maybe more powerful

That would be good too.

Sure, I'll try to elaborare more on these. I'm not an expert on .htpasswd though. Maybe an intermediate level user.
Templating
.htpasswd uses browser's internals to display the prompt for login and password. PHP or another language could be used to make a more elaborate solution (with a design that is richer), but .htpasswd doesn't provide such possibilities by itself.
Speed issue with bigger files
See this: https://httpd.apache.org/docs/2.4/en/howto/auth.html#possibleproblems
(I can't confirm 100% if it applies to Caddy too, but I would believe so at least if it's http and not using http/2.)

Because of the way that Basic authentication is specified, your username and password must be verified every time you request a document from the server. This is even if you're reloading the same page, and for every image on the page (if they come from a protected directory). As you can imagine, this slows things down a little.

Group feature
BasicAuth could support groups with options such as these:

AuthUserFile "/usr/local/apache/passwd/passwords"
AuthGroupFile "/usr/local/apache/passwd/groups"
Require group GroupName`

Ref: https://httpd.apache.org/docs/2.4/en/howto/auth.html#lettingmorethanonepersonin
Ref: https://httpd.apache.org/docs/2.4/en/mod/mod_authz_groupfile.html
That's the Apache way of handling it. That usage is limited to "allowing these groups access", it doesn't provide ways to "limit" these groups differently based on these groups. Implementing this or something else would require development.
Why password change is hard to implement
BasicAuth by itself doesn't provide  a way to "add", "modify" or "delete" users. It also doesn't provide a way to edit passwords. Such features would have to be implemented. Wouldn't be hard per-se, but more a tedious task as it would have to be tested on every OS.
Apache handled it this way: https://httpd.apache.org/docs/current/en/programs/htpasswd.html
Potential use of multiple files
.htpasswd allows for usage such as both of these using two .htpasswd on one domain:

domain.com/protected
domain.com/admin

or

domain.com/protected/admin

Adding , modifying or removing a "basicauth" directive means having to restart Caddy or send it a "USR1":
https://caddyserver.com/docs/basicauth
Ref: https://caddyserver.com/docs/cli
If that server is a media or data server it may mean lost of connection or download for some users. It's possibly a minor issue or a non-issue with Caddy.

Built-in rate limiting would be nice.

Update on this topic?

There have been some corrections or adjustments to Caddy's BasicAuth directive since then, but few new features.
I've been contributing and using loginsrv (an independent Caddy plugin) for projects in production for the past few months to get most features listed above. It is available as a plugin.

Thank you @magikstm!

authors: jazoom magikstm mholt thalesfsp

repo: mholt/caddy


text:
Add support for default (wildcard) error page

Add ability to specify default (fallback) error page in Caddyfile  via '*' as status code. This addresses #752

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.

This is looking great! Thank you so much @evvvvr.

@evvvvr I'll give you collaborator status so you can continue to help with Caddy as you are able to - it'll be easier for you now since you can create branches on this repository instead of having to fork the project. Also, please remember to review the contributing guidelines - most notably, that we like to have at least 2 collaborators approve a PR before it is merged, and to squash PRs with multiple small commits.
Really appreciate your contribution, again!

@mholt Thank You!

authors: CLAassistant evvvvr mholt


text:
Add a new fallback_delay sub-directive to the proxy directive

1. What does this change do, exactly?
A previous PR I made (#2305) just enabled DualStack in the default dialer that was being used in reverse proxies to improve initial connection speed, or connection speed after the TLS handshake timeout had already passed.
In the Go standard library's net package, the net.Dialer uses a fallback delay as part of its implementation of "Happy Eyeballs" when DualStack is enabled. This fallback delay is just a measure of how much of a head start the first connection gets before allowing another "racer" to attempt a second connection.
By default when this duration is not set the fallbackDelay function in the net package defaults to returning 300 * time.Millisecond.
It would be useful to configure this fallback delay duration from a caddyfile instead of having to edit the source and recompile.
So this PR just adds a new fallback_delay sub-directive to the existing proxy directive, which gets used in the NewSingleHostReverseProxy function in the reverseproxy.go file to overwrite the default value if it's different from the one set on the default dialer.
The default dialer has been left with this value unset so it can always use the default Go standard library's implementation, since it's possible the Go standard library could change it in the future, in which case we would probably want to pick up those changes by default.
2. Please link to the relevant issues.
This PR relates directly to issue #2306 and is a result of a previous PR I made (#2305).
3. Which documentation changes (if any) need to be made because of this PR?
A change to the proxy documentation (https://caddyserver.com/docs/proxy) would be needed to add an explanation of the new sub-directive.
4. Checklist

[x] I have written tests and verified that they fail without my change
[ ] I have squashed any insignificant commits
[x] This change has comments for package types, values, functions, and non-obvious lines of code
[x] I am willing to help maintain this change if there are issues with it later

I checked the first box about tests, but what I mean here is that I updated the existing tests, checked that they failed, and then added the new directive and tested again.

Thanks for these high quality contributions! I will try to look at them soon, but it's likely another collaborator will have a chance before I do.

Thanks for the review! That helps speed things up. And thank you again for the contribution!

authors: jakelucas mholt


text:
Barometer doesn't look at other boards in first effect

Effect says to consider bonuses on any board:
  $bonuses = self::getBonuses();
  if (self::isFirstOrThirdEdition()) {
    foreach (self::getOtherPlayerIds() as $playerId) {
      $bonuses = array_merge($bonuses, self::getBonuses($playerId));
    }
  }
  if ($bonuses) {

The bonuses for other boards are only used in first and third editions.

Fixes https://boardgamearena.com/bug?id=97212.

authors: micahstairs ultimatefiend

repo: micahstairs/bga-innovation


text:
How to keep application specific migration

If i want to run specific migrations in one of the project or all migrations in another project

You can pass the --database and --path options to the nomad command when you run it

authors: michaeldyrynda siddheshr

repo: michaeldyrynda/vagabond


text:
ERROR: MethodError: no method matching push!(::Type{Array{Array{Int64,1},195}}, ::Array{Int64,1})

issue with running this function
function ClosestDispatch(p::DeploymentProblem, drivetime::DataFrame)
candidates = Array(Vector{Int},p.nregions)
I = 1:p.nlocations
for region in 1:p.nregions
!!!     candidates[region] = I[vec(p.coverage[region,:])]  !!!
end
ClosestDispatch(drivetime, candidates)
end

Potential fix:
function ClosestDispatch(p::DeploymentProblem, drivetime::DataFrame)
candidates = Any[]
I = 1:p.nlocations
for region in 1:p.nregions
push!(candidates, I[vec(p.coverage[region,:])])
end
ClosestDispatch(drivetime, candidates)
end

authors: farmerguycf zandertedjo

repo: michaelhilborn/AmbulanceDeployement


text:
simple config dir check

Looks bad but, It seems that the script can't find Project.Projects_Directory on first build and halts at File.WriteAllText. However If you'd manually create the dir, build again, then AGAIN also delete the dir, the saving will work fine forever, so its weird.
summary:
File.WriteAllText can create both the file and directory just not when building first time, for some reason.

Thanks for fixing this, Had no idea this was an issue as I've had the directory for a while now.

Thanks for fixing this, Had no idea this was an issue as I've had the directory for a while now.

repo: michaelsakharov/Prowl


text:
Allow typing seconds with keyboard.

This is a patch for the enhancement request #13
The period key [1] becomes a toggle to switch between 'input minutes mode' and 'input seconds mode'.
So, you can...

type 4.5 to set the timer to 4 minutes 5 seconds
type 2.34 to set the timer to 2 minutes 34 seconds

Please let me know if there is anything you want me to change.
[1] I don't have a keypad, but the decimal key should work as well.

This is great! Thanks a lot.

Glad I could contribute. Thank you for the new release!

authors: harawata michaelvillar

repo: michaelvillar/timer-app


text:
🛑 gitlab.cta-observatory.org is down

In b4d22cf, gitlab.cta-observatory.org (https://gitlab.cta-observatory.org) was down:

HTTP code: 500
Response time: 11197 ms

Resolved: gitlab.cta-observatory.org is back up in f4dd529.

repo: michelangelobottura/ctaoit-upptime


text:
Feature request: app shortcuts in folder

The app shortcuts is invalid when app is placed in a folder. I think it will be better to add the feature.
Could you please put it into your plan?

I deliberatly disable it, but I can activate it,  just wait!

Can you explain how the App shortcuts work? I searched and found a description for pixel Launcher but i didnt get it to work with Flick Lauscher.
Thanks!

Just long click on app in workspace!

Thanks! But what do i have to do then? What do i have to write in the lines? I did and nothing happend.

authors: michelelacorte neolovich unpin

repo: michelelacorte/FlickLauncher


text:
Fix for pivoting empty datasets

Removes plugin crashes for time series plots with empty datasets. As in https://github.com/michelin/snowflake-grafana-datasource/issues/53

Thanks for you contribution.
I fixed this issue before the error was returned.
See #71

authors: WojtekWaga devnied

repo: michelin/snowflake-grafana-datasource


text:
ValueError is raised with custom reaction identifiers

When trying to build a community, I always get a ValueError similar to the one below.
ValueError: ('The model already contains a reaction with the id:', 'ABC_RXN__smaAA1')
Files causing this can be found at https://gitlab.com/mostueve/micom-error-files

Hi, thanks for providing a reproducible example. That helped a lot. Micom makes some adjustments to the IDs and that did not work for the models you provided. I fixed that in version 0.9.13, and updating to that version will make your setup work. You will see some SBML errors and the micom logs since your models are invalid SBML (missing a model ID), but it will read anyways. Those message will disappear if you set a model id in your SBML.
Anyways it will build the community and can obtain solutions.
Test run

In [1]: import micom

In [2]: import pandas as pd

In [3]: tax = pd.read_csv("pandas_metacyc.csv", sep="\t")

In [4]: com = micom.Community(tax)
  0%|                                                                                | 0/4 [00:00<?, ?models/s]ERROR:root:'' is not a valid SBML 'SId'.
INFO:micom:converting IDs for smaAA1
INFO:micom:adding reactions for smaAA1 to community
INFO:micom:adding metabolite GLC_m to external medium
INFO:micom:adding metabolite WATER_m to external medium
INFO:micom:adding metabolite PROTON_m to external medium
INFO:micom:adding metabolite OXYGEN__MOLECULE_m to external medium
INFO:micom:adding metabolite Pi_m to external medium
INFO:micom:adding metabolite MN2_m to external medium
INFO:micom:adding metabolite ZN2_m to external medium
INFO:micom:adding metabolite CU2_m to external medium
INFO:micom:adding metabolite CA2_m to external medium
INFO:micom:adding metabolite SULFATE_m to external medium
INFO:micom:adding metabolite AMMONIA_m to external medium
INFO:micom:adding metabolite ADP_cof_m to external medium
INFO:micom:adding metabolite GDP_cof_m to external medium
INFO:micom:adding metabolite NAD_cof_m to external medium
INFO:micom:adding metabolite NADP_cof_m to external medium
INFO:micom:adding metabolite THF_cof_m to external medium
INFO:micom:adding metabolite CO__A_cof_m to external medium
INFO:micom:adding metabolite Acceptor_cof_m to external medium
INFO:micom:adding metabolite Oxidized__ferredoxins_cof_m to external medium
INFO:micom:adding metabolite Ox__NADPH__Hemoprotein__Reductases_cof_m to external medium
INFO:micom:adding metabolite Cytochromes__C__Oxidized_cof_m to external medium
INFO:micom:adding metabolite Oxidized__Plastocyanins_cof_m to external medium
 25%|███████████████████████████████████████████▎                                                                                | 1/4 [00:08<00:26,  8.67s/models]INFO:micom:reading model from ecl_com.xml
ERROR:root:'' is not a valid SBML 'SId'.
INFO:micom:converting IDs for eclAA4
INFO:micom:adding reactions for eclAA4 to community
INFO:micom:updating import rate for external metabolite GLC_m
INFO:micom:updating import rate for external metabolite WATER_m
INFO:micom:updating import rate for external metabolite PROTON_m
INFO:micom:updating import rate for external metabolite OXYGEN__MOLECULE_m
INFO:micom:updating import rate for external metabolite Pi_m
INFO:micom:updating import rate for external metabolite MN2_m
INFO:micom:updating import rate for external metabolite ZN2_m
INFO:micom:updating import rate for external metabolite CU2_m
INFO:micom:updating import rate for external metabolite CA2_m
INFO:micom:updating import rate for external metabolite SULFATE_m
INFO:micom:updating import rate for external metabolite AMMONIA_m
INFO:micom:updating import rate for external metabolite ADP_cof_m
INFO:micom:updating import rate for external metabolite GDP_cof_m
INFO:micom:updating import rate for external metabolite NAD_cof_m
INFO:micom:updating import rate for external metabolite NADP_cof_m
INFO:micom:updating import rate for external metabolite THF_cof_m
INFO:micom:updating import rate for external metabolite CO__A_cof_m
INFO:micom:updating import rate for external metabolite Acceptor_cof_m
INFO:micom:updating import rate for external metabolite Oxidized__ferredoxins_cof_m
INFO:micom:updating import rate for external metabolite Ox__NADPH__Hemoprotein__Reductases_cof_m
INFO:micom:updating import rate for external metabolite Cytochromes__C__Oxidized_cof_m
INFO:micom:updating import rate for external metabolite Oxidized__Plastocyanins_cof_m
 50%|██████████████████████████████████████████████████████████████████████████████████████▌                                                                                | 2/4 [00:20<00:19,  9.66s/models]INFO:micom:reading model from ppu_com.xml
ERROR:root:'' is not a valid SBML 'SId'.
INFO:micom:converting IDs for ppuAA7
INFO:micom:adding reactions for ppuAA7 to community
INFO:micom:updating import rate for external metabolite GLC_m
INFO:micom:updating import rate for external metabolite WATER_m
INFO:micom:updating import rate for external metabolite PROTON_m
INFO:micom:updating import rate for external metabolite OXYGEN__MOLECULE_m
INFO:micom:updating import rate for external metabolite Pi_m
INFO:micom:updating import rate for external metabolite MN2_m
INFO:micom:updating import rate for external metabolite ZN2_m
INFO:micom:updating import rate for external metabolite CU2_m
INFO:micom:updating import rate for external metabolite CA2_m
INFO:micom:updating import rate for external metabolite SULFATE_m
INFO:micom:updating import rate for external metabolite AMMONIA_m
INFO:micom:updating import rate for external metabolite ADP_cof_m
INFO:micom:updating import rate for external metabolite GDP_cof_m
INFO:micom:updating import rate for external metabolite NAD_cof_m
INFO:micom:updating import rate for external metabolite NADP_cof_m
INFO:micom:updating import rate for external metabolite THF_cof_m
INFO:micom:updating import rate for external metabolite CO__A_cof_m
INFO:micom:updating import rate for external metabolite Acceptor_cof_m
INFO:micom:updating import rate for external metabolite Oxidized__ferredoxins_cof_m
INFO:micom:updating import rate for external metabolite Ox__NADPH__Hemoprotein__Reductases_cof_m
INFO:micom:updating import rate for external metabolite Cytochromes__C__Oxidized_cof_m
INFO:micom:updating import rate for external metabolite Oxidized__Plastocyanins_cof_m
 75%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▊                                           | 3/4 [00:32<00:10, 10.27s/models]INFO:micom:reading model from hfr_com.xml
ERROR:root:'' is not a valid SBML 'SId'.
INFO:micom:converting IDs for hfrAA6
INFO:micom:adding reactions for hfrAA6 to community
INFO:micom:updating import rate for external metabolite GLC_m
INFO:micom:updating import rate for external metabolite WATER_m
INFO:micom:updating import rate for external metabolite PROTON_m
INFO:micom:updating import rate for external metabolite OXYGEN__MOLECULE_m
INFO:micom:updating import rate for external metabolite Pi_m
INFO:micom:updating import rate for external metabolite MN2_m
INFO:micom:updating import rate for external metabolite ZN2_m
INFO:micom:updating import rate for external metabolite CU2_m
INFO:micom:updating import rate for external metabolite CA2_m
INFO:micom:updating import rate for external metabolite SULFATE_m
INFO:micom:updating import rate for external metabolite AMMONIA_m
INFO:micom:updating import rate for external metabolite ADP_cof_m
INFO:micom:updating import rate for external metabolite GDP_cof_m
INFO:micom:updating import rate for external metabolite NAD_cof_m
INFO:micom:updating import rate for external metabolite NADP_cof_m
INFO:micom:updating import rate for external metabolite THF_cof_m
INFO:micom:updating import rate for external metabolite CO__A_cof_m
INFO:micom:updating import rate for external metabolite Acceptor_cof_m
INFO:micom:updating import rate for external metabolite Oxidized__ferredoxins_cof_m
INFO:micom:updating import rate for external metabolite Ox__NADPH__Hemoprotein__Reductases_cof_m
INFO:micom:updating import rate for external metabolite Cytochromes__C__Oxidized_cof_m
INFO:micom:updating import rate for external metabolite Oxidized__Plastocyanins_cof_m
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4/4 [00:45<00:00, 11.18s/models]

In [5]: sol = com.cooperative_tradeoff(fraction=0.5)
INFO:micom:setting growth rate constraint for smaAA1
INFO:micom:minimal growth rate smaller than tolerance, setting to zero.
INFO:micom:setting growth rate constraint for eclAA4
INFO:micom:minimal growth rate smaller than tolerance, setting to zero.
INFO:micom:setting growth rate constraint for ppuAA7
INFO:micom:minimal growth rate smaller than tolerance, setting to zero.
INFO:micom:setting growth rate constraint for hfrAA6
INFO:micom:minimal growth rate smaller than tolerance, setting to zero.
INFO:micom:adding L2 norm to None
INFO:micom:finished adding tradeoff objective to None
INFO:micom:solver returned the status numeric, returning the solution anyway.
INFO:micom:Starting crossover...
INFO:micom:constraining growth rates.
INFO:micom:finding closest feasible solution
INFO:micom:resetting growth rate constraint for hfrAA6
INFO:micom:resetting growth rate constraint for ppuAA7
INFO:micom:resetting growth rate constraint for eclAA4
INFO:micom:resetting growth rate constraint for smaAA1

In [6]: sol
Out[6]: <CommunitySolution 5.152 at 0x129b2e9b0>

In [7]: sol.members
Out[7]:
              abundance  growth_rate  reactions  metabolites
compartments
eclAA4              0.6     7.359998       3246         1531
hfrAA6              0.2     2.453333       3411         1538
medium              NaN          NaN         22           22
ppuAA7              0.1     1.226668       3051         1493
smaAA1              0.1     1.226667       2626         1262

Cool, thanks a lot! Now it is working.

authors: cdiener mostueve

repo: micom-dev/micom


text:
Deserialization error publishing a LaserScan on ESP32 at certain message sizes

Issue template

Hardware description: a ESP32-WROOM-32 board connected to a Docker
RTOS: Arduino "ESP32 Dev Module" board, default settings, with Micro-ROS
Installation type: Docker microros/micro-ros-agent:humble Docker image, v2.0.6-humble precompiled Micro-ROS Arduino library, Arduino IDE 1.8.13 (Windows)
Version or commit hash: Humble

Steps to reproduce the issue

Edit the sketch below to specify your WiFi SSID, password and IP of your PC that will run a Micro-ROS agent. Use the Arduino IDE (Windows) to compile and upload the sketch to an ESP32 module.
Launch the Micro-ROS agent. In my case, I'm using a Windows machine with Docker-for-Windows installed. Here is the Windows shell command to launch the Docker Micro-ROS agent image.

docker run --name uros-agent -it -p 8888:8888/udp microros/micro-ros-agent:humble udp4 -p 8888

ESP32 connects to the Micro-ROS agent and starts publishing a dummy LaserScan message on /scan topic.  Launch a Docker bash session to observe LaserScan getting published successfully.

docker exec -it uros-agent bash
ros2 topic echo /scan  # in Micro-ROS container bash

ISSUE 1. Edit the sketch to change BUF_LEN value from 1000 to 500. Compile and upload the sketch.

//#define BUF_LEN 1000 // works
#define BUF_LEN 500 // causes Micro-ROS agent deserialization error

ISSUE 1. ESP32 connects to the Micro-ROS agent. The Micro-ROS agent reports "deserialization error".
ISSUE 2. Undo the sketch code changes from step 4. Edit the sketch to use rclc_publisher_init_best_effort() instead of rclc_publisher_init_default(), see below. Compile and upload the sketch and open the Arduino serial monitor to see the debug messages. Make sure the Micro-ROS agent is running (step 2).

// rclc_publisher_init_default() works
//  RCCHECK(rclc_publisher_init_default(&publisher, &node,
 //   ROSIDL_GET_MSG_TYPE_SUPPORT(sensor_msgs, msg, LaserScan), TOPIC_NAME));

// rclc_publisher_init_best_effort() causes rcl_publish() to error out
RCCHECK(rclc_publisher_init_best_effort(&publisher, &node,
  ROSIDL_GET_MSG_TYPE_SUPPORT(sensor_msgs, msg, LaserScan), TOPIC_NAME));

ISSUE 2. ESP32 connects to the Micro-ROS agent successfully, but the Arduino serial monitor prints "rcl_publish() error", i.e. the call to rcl_publish().
ISSUE 3. Open the micro-ros_publisher_wifi example in the Arduino IDE, edit the WiFi SSID, password and Micro-ROS agent IP, compile and upload the code to ESP32. Make sure the Micro-ROS agent is running (step 2).
ISSUE 3. ESP32 connects to the Micro-ROS agent successfully. Launch a Docker bash to observe the int32 messages getting published to /topic_name, at first, successfully.

docker exec -it uros-agent bash
ros2 topic echo /topic_name  # in Micro-ROS container bash

ISSUE 3. Wait for a couple of minutes or so until "ros2 topic echo /topic_name" freezes and does not output message data anymore.

Expected behavior
LaserScan message gets successfully published, as in step 3 for issues 1 and 2.
int32 message gets successfully published - and does not freeze after a while - for issue 3.
Actual behavior
Issue 1: Micro-ROS agent receives LaserScan messages, but reports "deserialization error" and thus fails to publish the received messages.
Additional information
The LaserScan dummy publisher sketch is based on the micro-ros_publisher_wifi Micro-ROS Arduino example.
Note that in issue 1, changing just one line of code (BUF_LEN from, say, 1000 to 500 or 600) breaks the successful operation. If I set BUF_LEN to 400 or 800, the sketch works fine.
Note that in issue 2, replacing rclc_publisher_init_default() with rclc_publisher_init_best_effort() for the LaserScan dummy publisher breaks the operation. However, the original micro-ros_publisher_wifi example works fine with rclc_publisher_init_best_effort().
Note that in issue 3, the official micro-ros_publisher_wifi example stops working (specifically, the Micro-ROS agent stops receiving messages) simply after waiting for a couple of minutes or so.
I've searched Micro-ROS issues before opening this ticket and I've noticed a couple of related issues, but I haven't been able to find a solution that would work for me.
Any help would be much appreciated!
// docker run --name uros-agent -it -p 8888:8888/udp microros/micro-ros-agent:humble udp4 -p 8888
// docker exec -it uros-agent bash
// ros2 topic echo /scan
#include <micro_ros_arduino.h>
#include <stdio.h>
#include <rcl/rcl.h>
#include <rcl/error_handling.h>
#include <rclc/rclc.h>
#include <rclc/executor.h>
#include <sensor_msgs/msg/laser_scan.h>

#if !defined(ESP32)
#error This example is only avaible for ESP32 Dev module
#endif

#define FRAME_ID "lds"
#define TOPIC_NAME "scan"
#define NODE_NAME "uros_node"
#define BUF_LEN 1000 // 400 and 1000 work, 500...600 give "deserialization error"
#define LED_PIN 2
#define RCCHECK(fn) { rcl_ret_t temp_rc = fn; if((temp_rc != RCL_RET_OK)){error_loop();}}
#define RCSOFTCHECK(fn) { rcl_ret_t temp_rc = fn; if((temp_rc != RCL_RET_OK)){}}

rcl_publisher_t publisher;
rclc_support_t support;
rcl_allocator_t allocator;
rcl_node_t node;

sensor_msgs__msg__LaserScan laserScanMsg;
struct timespec tv = {0};
static float memory[BUF_LEN];
static float dist_offset = 0.15;

void setup() {
  Serial.begin(115200);
  set_microros_wifi_transports((char*)"YOUR_WIFI_SSID", (char*)"your_wifi_password",
    (char*)"192.168.1.YOUR-UROS-PC-IP", 8888);

  pinMode(LED_PIN, OUTPUT);
  digitalWrite(LED_PIN, HIGH);

  laserScanMsg.header.frame_id.data = (char*)FRAME_ID;
  laserScanMsg.header.frame_id.capacity = strlen(laserScanMsg.header.frame_id.data);
  laserScanMsg.header.frame_id.size = laserScanMsg.header.frame_id.capacity;

  // LaserScan
  laserScanMsg.angle_min = 0.0;               // start angle of the scan [rad]
  laserScanMsg.angle_max = TWO_PI;           // end angle of the scan [rad]
  laserScanMsg.angle_increment =
    (laserScanMsg.angle_max - laserScanMsg.angle_min) / BUF_LEN; // rad/meas
  laserScanMsg.range_min = 0.12;               // minimum range value [m]
  laserScanMsg.range_max = 10.0;               // maximum range value [m]

  //https://micro.ros.org/docs/tutorials/advanced/handling_type_memory/
  laserScanMsg.ranges.capacity = BUF_LEN;
  laserScanMsg.ranges.data = memory;
  laserScanMsg.ranges.size = 0;

  //float time_increment; // time between measurements
  //float scan_time; // time between scans
  //rosidl_runtime_c__float__Sequence intensities; // intensity or empty

  delay(2000);

  allocator = rcl_get_default_allocator();
  Serial.println(F("After allocator()"));

  Serial.println(F("Connecting to ROS agent ..."));
  RCCHECK(rclc_support_init(&support, 0, NULL, &allocator));
  Serial.println(F("After rclc_support_init()"));

  // https://micro.ros.org/docs/tutorials/programming_rcl_rclc/node/
  RCCHECK(rclc_node_init_default(&node, NODE_NAME, "", &support));
  Serial.println(F("After rclc_node_init_default()"));

  // Creates a reliable rcl publisher
  RCCHECK(rclc_publisher_init_default(&publisher, &node,
    ROSIDL_GET_MSG_TYPE_SUPPORT(sensor_msgs, msg, LaserScan), TOPIC_NAME));

  // rcl_publish() errors out
  //RCCHECK(rclc_publisher_init_best_effort(&publisher, &node,
  //  ROSIDL_GET_MSG_TYPE_SUPPORT(sensor_msgs, msg, LaserScan), TOPIC_NAME));

  Serial.println(F("After rclc_publisher_init_*()"));
}

void loop() {
  dist_offset = dist_offset <= 5.0 ? dist_offset + 0.1 : 0.15;
  laserScanMsg.ranges.size = BUF_LEN;
  for(int32_t i = 0; i < BUF_LEN; i++) {
    laserScanMsg.ranges.data[i] = dist_offset + i*0.05;
  }
  clock_gettime(CLOCK_REALTIME, &tv);         //main/time_sync.c
  laserScanMsg.header.stamp.sec = tv.tv_sec;
  laserScanMsg.header.stamp.nanosec = tv.tv_nsec;

  //RCSOFTCHECK(rcl_publish(&publisher, &laserScanMsg, NULL));
  rcl_ret_t rc = rcl_publish(&publisher, &laserScanMsg, NULL);
  if (rc == RCL_RET_OK)
    digitalWrite(LED_PIN, !digitalRead(LED_PIN));
  else
    Serial.println("rcl_publish() error");
  delay(100);
}

void error_loop(){
  Serial.println(F("error_loop()"));
  while(1){
    digitalWrite(LED_PIN, !digitalRead(LED_PIN));
    delay(500);
  }
}

/*
void timer_callback(rcl_timer_t * timer, int64_t last_call_time)
{
  Serial.println(F("timer_callback()"));
  RCLC_UNUSED(last_call_time);
  if (timer != NULL) {
    RCSOFTCHECK(rcl_publish(&publisher, &laserScanMsg, NULL));
  }
}
*/

Some details:

You are sending a huge message, only the buffer is probably > 512 B for most cases. This means that in Best Effort (with no fragmentation possibilities), this won't work. For the case of best effort you need you adjusts the MTU in the middleware: https://micro.ros.org/docs/tutorials/advanced/microxrcedds_rmw_configuration/ By means of modifying the colcon meta and rebuilding the library: https://github.com/micro-ROS/micro_ros_arduino/blob/iron/extras/library_generation/colcon.meta.

Regarding the deserialization error: Ensure that your message is zero-init with a memset(laserScanMsg, 0, sizeof(laserScanMsg)) somewhere, and ensure that you are filling intensities vector: https://github.com/ros2/common_interfaces/blob/366eea24ffce6c87f8860cbcd27f4863f46ad822/sensor_msgs/msg/LaserScan.msg#L28, let me know if this still fails after handling correctly the message.

Thank you for the instant reply @pablogs9 ! As a quick test, I've reduced the message size a lot and that fixed the Best Effort publisher. That said, "ros2 topic echo /scan" with the Best Effort publisher still freezes after a minute or two. I'll check about recompiling the library, but for now it seems the freezing issue will still keep me from using the Best Effort publisher.
I've tried zeroing out the LaserScan message and filling out the intensities array (with dummy values) while using  rclc_node_init_default() - I'm afraid the deserialization error is still there. Here is the code to reproduce it. The code works (no deserialization error) when I set BUF_LEN=500, but doesn't work (serialization error) with BUF_LEN=250.
#include <micro_ros_arduino.h>
#include <stdio.h>
#include <rcl/rcl.h>
#include <rcl/error_handling.h>
#include <rclc/rclc.h>
#include <rclc/executor.h>
#include <sensor_msgs/msg/laser_scan.h>

#if !defined(ESP32)
#error This example is only available for ESP32 Dev module
#endif

#define FRAME_ID "lds"
#define TOPIC_NAME "scan"
#define NODE_NAME "uros_node"
#define BUF_LEN 250 // causes a "deserialization error"
//#define BUF_LEN 500 // works fine
#define LED_PIN 2
#define RCCHECK(fn) { rcl_ret_t temp_rc = fn; if((temp_rc != RCL_RET_OK)){error_loop();}}
#define RCSOFTCHECK(fn) { rcl_ret_t temp_rc = fn; if((temp_rc != RCL_RET_OK)){}}

rcl_publisher_t publisher;
rclc_support_t support;
rcl_allocator_t allocator;
rcl_node_t node;

sensor_msgs__msg__LaserScan laserScanMsg;
struct timespec tv = {0};
static float memory[BUF_LEN];
static float mem_intensity[BUF_LEN];
static float dist_offset = 0.15;

void error_loop(){
  Serial.println(F("error_loop()"));
  while(1){
    digitalWrite(LED_PIN, !digitalRead(LED_PIN));
    delay(500);
  }
}

void setup() {
  Serial.begin(115200);
  set_microros_wifi_transports((char*)"YOUR_WIFI_SSID", (char*)"your_wifi_password",
    (char*)"192.168.1.YOUR_UROS_PC_IP", 8888);

  pinMode(LED_PIN, OUTPUT);
  digitalWrite(LED_PIN, HIGH);

  memset((void*)&laserScanMsg, 0, sizeof(laserScanMsg));

  laserScanMsg.header.frame_id.data = (char*)FRAME_ID;
  laserScanMsg.header.frame_id.capacity = strlen(laserScanMsg.header.frame_id.data);
  laserScanMsg.header.frame_id.size = laserScanMsg.header.frame_id.capacity;

  // LaserScan
  laserScanMsg.angle_min = 0.0;               // start angle of the scan [rad]
  laserScanMsg.angle_max = TWO_PI;           // end angle of the scan [rad]
  laserScanMsg.angle_increment =
    (laserScanMsg.angle_max - laserScanMsg.angle_min) / BUF_LEN; // rad/meas
  laserScanMsg.range_min = 0.12;               // minimum range value [m]
  laserScanMsg.range_max = 10.0;               // maximum range value [m]

  //https://micro.ros.org/docs/tutorials/advanced/handling_type_memory/
  laserScanMsg.ranges.capacity = BUF_LEN;
  laserScanMsg.ranges.data = memory;
  laserScanMsg.ranges.size = 0;

  //float time_increment; // time between measurements
  //float scan_time; // time between scans
  //rosidl_runtime_c__float__Sequence intensities; // intensity or empty

  laserScanMsg.intensities.capacity = BUF_LEN;
  laserScanMsg.intensities.data = mem_intensity;
  laserScanMsg.intensities.size = 0;

  delay(2000);

  allocator = rcl_get_default_allocator();
  Serial.println(F("After allocator()"));

  Serial.println(F("Connecting to ROS agent ..."));
  RCCHECK(rclc_support_init(&support, 0, NULL, &allocator));
  Serial.println(F("After rclc_support_init()"));

  // https://micro.ros.org/docs/tutorials/programming_rcl_rclc/node/
  RCCHECK(rclc_node_init_default(&node, NODE_NAME, "", &support));
  Serial.println(F("After rclc_node_init_default()"));

  // Creates a reliable rcl publisher
  RCCHECK(rclc_publisher_init_default(&publisher, &node,
    ROSIDL_GET_MSG_TYPE_SUPPORT(sensor_msgs, msg, LaserScan), TOPIC_NAME));

  // rcl_publish() errors out
  //RCCHECK(rclc_publisher_init_best_effort(&publisher, &node,
  //  ROSIDL_GET_MSG_TYPE_SUPPORT(sensor_msgs, msg, LaserScan), TOPIC_NAME));

  Serial.println(F("After rclc_publisher_init_*()"));
}

void loop() {
  dist_offset = dist_offset <= 5.0 ? dist_offset + 0.1 : 0.15;
  laserScanMsg.ranges.size = BUF_LEN;
  laserScanMsg.intensities.size = BUF_LEN;
  for(int32_t i = 0; i < BUF_LEN; i++) {
    laserScanMsg.ranges.data[i] = dist_offset + i*0.05;
    laserScanMsg.intensities.data[i] = laserScanMsg.ranges.data[i];
  }
  clock_gettime(CLOCK_REALTIME, &tv);         //main/time_sync.c
  laserScanMsg.header.stamp.sec = tv.tv_sec;
  laserScanMsg.header.stamp.nanosec = tv.tv_nsec;

  //RCSOFTCHECK(rcl_publish(&publisher, &laserScanMsg, NULL));
  rcl_ret_t rc = rcl_publish(&publisher, &laserScanMsg, NULL);
  if (rc == RCL_RET_OK)
    digitalWrite(LED_PIN, !digitalRead(LED_PIN));
  else
    Serial.println("rcl_publish() error");
  delay(100);
}

@iovsiann You did in fact discover a bug in our middleware! We have fixed this bug here: https://github.com/eProsima/Micro-XRCE-DDS-Client/pull/360.  This repository branches has been updated to include this fix.
Please give it a try, we will create a new minor release once your feedback is positive.

@Acuadros95 awesome, thank you! I have recompiled the Arduino library with the output_reliable_stream.c patch and the reliable publisher seems to work properly on my end - with and without intensities.* filled out.

Nice! The latest minor v2.0.7 releases include the fix.
Closing!


text:
Add acq timing test

This is also a test of the dependency auto-update feature

Merging this one first and hopefully https://github.com/micro-manager/AcqEngJ/pull/68 will fix the error

Auto building steps:
Maven deploy and PM update

Beautiful!
As is, this branch was still building PycroManagerJava == 0.33.27, so I had to merge main into it to make the new test work, which makes sense.

authors: henrypinkard ieivanov

repo: micro-manager/pycro-manager


text:
Adjusted prevalence shows 0.00%

Seems like a serious issue.
https://www.microcovid.org/?distance=sixFt&duration=120&interaction=oneTime&personCount=3&riskProfile=hasCovid&scenarioName=custom&setting=indoor&subLocation=US_06001&theirMask=basic&topLocation=US_06&voice=normal&yourMask=basic

I think it is showing 0 for every single location. I checked 5 or so.
I wonder if we could also add some tests for this so the script doesn't merge a prevalence update that breaks everything.

Looks like it started happening because the prevalence update started including its own updatedAt with a bad date format. The JS code doesn't actually need the new updatedAt, so I opened a PR that temporarily prunes it out. Seems to fix the issue on my local machine, at least.

Until a working build is deployed, folks can see use the last working version here:
https://web.archive.org/web/20211214032440/https://www.microcovid.org/[https://web.archive.org/web/20211214032440/https://www.microcovid.org/](https://web.archive.org/web/20211214032440/https://www.microcovid.org/)

should be fixed as of the next automated prevalence update

authors: blanchardjeremy chrisvfritz cmounce oxytocinlove

repo: microCOVID/microCOVID


text:
enums, esp. from OAK, should be sorted alphabetically within hierarchical groups

command line implementation: vskit
to be used with https://linkml.io/linkml/schemas/enums.html#dynamic-enums
see especially https://linkml.io/linkml/schemas/enums.html#tooling-to-support-dynamic-enums

@turbomam a linked PR is closed. Is this done?

repo: microbiomedata/nmdc-schema


text:
Program microbit V1 or V2 under android issue.

Hello, do you have a URL to program Microbit V1 or V2 under Android. I try on V1 and doesn't works, same on V2. So please could you give me Video or documentation to program Microbit on Tablet.
I try that. Pairring works: https://microbit.org/get-started/user-guide/mobile/
But impossible to upload a very simple program made on android to upload into themicrobit. To many buggs? So do you have a procedure please.
Thanks to help.

We do have a guide here https://support.microbit.org/support/solutions/articles/19000065804-micro-bit-android-app-connect-and-send-programs
Please can you run through this guide and let me know if you run into any issues.
If you come across a problem, please can you use the bug report template to include as much information as possible about the issue. https://github.com/microbit-foundation/microbit-android/issues/new?assignees=&labels=&template=bug_report.md

We do have a guide here https://support.microbit.org/support/solutions/articles/19000065804-micro-bit-android-app-connect-and-send-programs
Please can you run through this guide and let me know if you run into any issues.
If you come across a problem, please can you use the bug report template to include as much information as possible about the issue. https://github.com/microbit-foundation/microbit-android/issues/new?assignees=&labels=&template=bug_report.md

Hello,
I kwon all the step and this vidéo.
I try to upload the last firmware 0249 in to my microbit V1 on Maintenance mode.
https://cdn.sanity.io/files/ajwvhvgo/production/26b176670c8f9df4aa015e9067368eafcfd749a1.hex?dl=0249_microbit_firmware.hex
https://microbit.org/get-started/user-guide/firmware/
But after upload firmware, I try to press A+B+Reset and release reset, but I can’t see any change and any bluetooth icone on screen.
So impossible to pair
Impossible to program V2 from V2 too, so please make all the corrections, and test all please. Our studients can’t work with Android tablet.
So help me please and give me the solution.
Thanks to be very precise
Regards.
M. Launay
De : Mark notifications@github.com
Envoyé : lundi 25 janvier 2021 13:53
À : microbit-foundation/microbit-android microbit-android@noreply.github.com
Cc : julien launay julien.launay@laposte.net; Author author@noreply.github.com
Objet : Re: [microbit-foundation/microbit-android] Program microbit V1 or V2 under android issue. (#21)
We do have a guide here https://support.microbit.org/support/solutions/articles/19000065804-micro-bit-android-app-connect-and-send-programs
Please can you run through this guide and let me know if you run into any issues.
If you come across a problem, please can you use the bug report template to include as much information as possible about the issue. https://github.com/microbit-foundation/microbit-android/issues/new?assignees= https://github.com/microbit-foundation/microbit-android/issues/new?assignees=&labels=&template=bug_report.md &labels=&template=bug_report.md
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/microbit-foundation/microbit-android/issues/21#issuecomment-766795132 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AG5TGE377PRFE3PHGKP4Z6DS3VSTXANCNFSM4WG5X6UQ .

Hello,
I kwon all the step and this vidéo.
I try to upload the last firmware 0249 in to my microbit V1 on Maintenance mode.
https://cdn.sanity.io/files/ajwvhvgo/production/26b176670c8f9df4aa015e9067368eafcfd749a1.hex?dl=0249_microbit_firmware.hex
https://microbit.org/get-started/user-guide/firmware/
But after upload firmware, I try to press A+B+Reset and release reset, but I can’t see any change and any bluetooth icone on screen.
So impossible to pair
Impossible to program V2 from V2 too, so please make all the corrections, and test all please. Our studients can’t work with Android tablet.
So help me please and give me the solution.
Thanks to be very precise
Regards.
M. Launay
De : Mark notifications@github.com
Envoyé : lundi 25 janvier 2021 13:53
À : microbit-foundation/microbit-android microbit-android@noreply.github.com
Cc : julien launay julien.launay@laposte.net; Author author@noreply.github.com
Objet : Re: [microbit-foundation/microbit-android] Program microbit V1 or V2 under android issue. (#21)
We do have a guide here https://support.microbit.org/support/solutions/articles/19000065804-micro-bit-android-app-connect-and-send-programs
Please can you run through this guide and let me know if you run into any issues.
If you come across a problem, please can you use the bug report template to include as much information as possible about the issue. https://github.com/microbit-foundation/microbit-android/issues/new?assignees= https://github.com/microbit-foundation/microbit-android/issues/new?assignees=&labels=&template=bug_report.md &labels=&template=bug_report.md
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/microbit-foundation/microbit-android/issues/21#issuecomment-766795132 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AG5TGE377PRFE3PHGKP4Z6DS3VSTXANCNFSM4WG5X6UQ .

authors: JLFra microbit-mark

repo: microbit-foundation/microbit-android