text:
[9.x] Create config files from artisan CLI

Hi everybody,
this PR targets creating config files from artisan CLI. Since we could create almost every files from artisan, creating the config files were missing. We can create config files now.
usage:
php artisan make:config theme

result
In base directory, config/theme.php file is created. Now we can fill inside how we want.
<?php

return [
    'default' => env('ADMIN_THEME', 'main'),

    'themes' => [
        'main' => [
            'admin_color_1' => '#188ea4',
            'admin_color_2' => '#312cb8',
            'admin_color_3' => '#1325a3',
            'admin_login_image' => '/admin/bgs/0.jpg',
            // ...
        ],
    ]
];

Tests are run, nothing is broken. Codes are generated like other php artisan make commands.
Main purpose of code is that, we should be able to create configs from CLI.

Why did you clear cache in the command?
{{class}}  is not being populated?

Why did you clear cache in the command?
{{class}}  is not being populated?

My thought is that if you are creating a config file, your cached config will not include your new config. Maybe clearing the cache can be optional.

Thanks for your pull request to Laravel!
Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.
If possible, please consider releasing your code as a package so that the community can still take advantage of your contributions!
If you feel absolutely certain that this code corrects a bug in the framework, please "@" mention me in a follow-up comment with further explanation so that GitHub will send me a notification of your response.

authors: aknEvrnky ankurk91 taylorotwell


text:
Uploaded the router, made the env function on the route to specify the environments the user wants the route to run in

I made this to make it easier to the developer to use multi-stagging on the router package ... as I do it mostly in every project I make, so instead of doing it like this
if (config('app.env')==='local'||config('app.env')==='testing'|) Route::get('/', fn () => view('welcome'));
I make it like this
Route::get('/', fn () => view('welcome'))->env('local','testing');
and made it also on route groups:
Route::group([     'env'  => [ 'local', 'testing' ], ], function () {     .... });

Thanks for your pull request to Laravel!
Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.
If possible, please consider releasing your code as a package so that the community can still take advantage of your contributions!
If you feel absolutely certain that this code corrects a bug in the framework, please "@" mention me in a follow-up comment with further explanation so that GitHub will send me a notification of your response.

source: gharchive/pull-request

authors: AhmedSalheia taylorotwell

repo: laravel/framework

license: MIT

license_type: permissive

license_source: github-api


text:
[10.x] Implement password generation constraints through rules

Minor update of Str::password() method
The aim is to empower end users with the capability to define password generation rules. These rules allow to specify whether the generated password should include letters, numbers, symbols, or spaces by passing an array of such rules.
Although users can already instruct the generator to include these elements, there's no guarantee that the generated password will adhere to the validation rules set for the web app. This update addresses this concern by enabling alignment between the generator and the web app's password validation rules.
Existing logic has been preserved, incorporating specific modifications to introduce rules-based restrictions.
Old usage remains unaffected by this update.

There are some cases I'd like to point out which we should discuss:
// This generates a string with a length of 2, although the length was set to 1. What argument should be prioritized?
Str::password(1, true, true, true, true, ['letters', 'numbers']); // "q3"

// This generates a string with a letter, because the `$rules` argument enforces letters. However the `$letters` argument is set to false. Again, should the `$rules` argument be the prioritized?
Str::password(1, false, true, true, true, ['letters']); // "d"

Then, I don't know if it's an issue on my end, but when sorting the $password_chars The enforced letter is always somewhere at the end of the password. The best I could get was the letter being the second last character. So maybe a good 'ol shuffle() on the collection would be better:
-usort($password_chars, fn() => random_int(-1, 1));
-return collect($password_chars)->implode('');
+return collect($password_chars)->shuffle()->implode('');

I got better results with that.
And I would change the casing of the variables from $snake_case to $camelCase since laravel uses this casing internally.

Indeed, I started with the assumption that the $rules enforce the presence of specific characters. However, you're right to bring this up.
Without a refactoring on params which will introduce a breaking change I don't see how to avoid this kind of confusion.
As a clearer alternative @param array $rules could be replaced by a @param bool $enforce based on previous passed params. The logic will be a bit different but it can be a good solution.
Regarding the shuffle, I'll conduct some tests on my end as well, I hesitated on this point too.
Thanks also for the reminder about camelCase, I'll take care of it in a reworked V2.
As for now I draft this pull request.

[10.x] Enhance password generation constraints using enforce parameter
In comparison to the previous commit, logic was reworked with a boolean variable $enforce.
public static function password($length = 32, $letters = true, $numbers = true, $symbols = true, $spaces = false, $enforce = false)     {     ...     }
This allows to use the parameters already existing in the current version of the Laravel \Illuminate\Support\Str::password() method, which is also offering greater clarity and minimizes potential misunderstandings.
Additionally, the shuffle is now directly made on the collection as mentioned before: it is more efficient.
snake_case was replaced by camelCase for consistency with Laravel codebase.

I really think if someone needs to customize this method further they should just write their own password method for their application.

authors: daliendev dennisprudlo taylorotwell


text:
[11.x] fix: Model newCollection generics; feat: add HasCollection trait

Hello!
This PR fixes some issues with the Model's newCollection generic (https://github.com/phpstan/phpstan/issues/11354) ---it appears that due to covariant/invariant constraints the method must return only static models.
I also added a HasCollection trait similar to the Has{Builder,Factory} traits that help slim down the models:
// before
class Post extends Model
{
    /** @return PostCollection<array-key, static> */
    public function newCollection(array $models = []): PostCollection
    {
        return new PostCollection($models);
    }
}

// after
class Post extends Model
{
    /** @use HasCollection<PostCollection<array-key, static>> */
    use HasCollection;

    protected static string $collection = PostCollection::class;
}

Thanks!

Looking at your code, you add a trait, but then you aren't doing anything with the trait, it has zero effect, the newCollection is still in Model.

The trait is for use in user land when a custom collection class is used as it better helps with generics/autocomplete/ide support, however, I suppose we could add the trait to the base model like this:
https://phpstan.org/r/0c35c490-55a1-48fa-b407-d58ae52cb499

The trait is for use in user land when a custom collection class is used as it better helps with generics/autocomplete/ide support

if it is just for that, it doesn't slim down anything. I suggest either remove the trait or move generic logic into that trait. leaving Model as was.

The trait is still not doing anything except for extending the original newCollection method. The trait should not have to be part of Model by default. by default Model uses the default Collection class. But only when adding that trait, one should be able to set a specific Collection classname. No code changes in Model, just a new trait.

Thanks @taylorotwell!

authors: calebdw henzeb


text:
WebSocket connection to 'wss://chat-laravel.mydomain.com:9889/app/oknjjl0bzpsq17de2ebn?protocol=7&client=js&version=8.4.0-rc2&flash=false' failed:

Reverb Version
@beta
Laravel Version
11.0
PHP Version
8.2.10
Description
I have an SSL certificate from Certbot and use the reverb@beta version. I am getting an error while connecting to the socket.
I am using an Apache Digital Ocean server. The port is added in the ufw apache. Let me know if anything wrong my side.
This is in my .env file
REVERB_APP_ID=898313
REVERB_APP_KEY="${REVERB_KEY}"
REVERB_APP_SECRET="${REVERB_SEC}"
REVERB_HOST=chat-laravel.mydomain.com
REVERB_HOSTNAME=chat-laravel.mydomain.com
REVERB_PORT=9889
REVERB_SCHEME=https

Steps To Reproduce
Change port and start command using port & hostname but still facing the same issue.
I have rebuild and cleared the cache as well on every change.

Hey there,
Can you first please try one of the support channels below? If you can actually identify this as a bug, feel free to open up a new issue with a link to the original one and we'll gladly help you out.

Laracasts Forums
Laravel.io Forums
StackOverflow
Discord
Larachat
IRC

Thanks!

I'm getting the same error, actually. I'm running Reverb with the --debug flag and am getting this error in the console:
Laravel\Reverb\Protocols\Pusher\Http\Controllers\PusherController::Laravel\Reverb\Protocols\Pusher\Http\Controllers\{closure}(): Argument #1 ($message) must be of type string, Ratchet\RFC6455\Messaging\Message given, called in .../app/vendor/ratchet/rfc6455/src/Messaging/MessageBuffer.php on line 254

  at vendor/laravel/reverb/src/Protocols/Pusher/Http/Controllers/PusherController.php:34

source: gharchive/issue

authors: boris-glumpler driesvints raj3292

repo: laravel/reverb


text:
Upgrading Node and NPM Version

Currently Homestead has the versions:

Node 0.10.x
NPM 1.x

Now with my change it ships with latest stable version of node and npm

Node 0.12.x
NPM 2.x

And this is the recommended way for installing node as we can see: https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager#debian-and-ubuntu-based-linux-distributions

Thanks :heart:

authors: dbpolito taylorotwell

repo: laravel/settler

license: mit

license_source: bigquery


text:
编译错误

无法通过编译  exit status 1

一样编译错误
编译器：1.8.19
u8g2为最新的版本
C:\Users\root\Documents\Arduino\libraries\U8g2_wqy_Arduino-master\src\U8g2wqy.c:1542:15: error: size of array 'u8g2_font_wqy12_t_gb2312' is too large  const uint8_t u8g2_font_wqy12_t_gb2312[208228] U8G2_FONT_SECTION("u8g2_font_wqy12_t_gb2312") =                ^~~~~~~~~~~~~~~~~~~~~~~~ C:\Users\root\Documents\Arduino\libraries\U8g2_wqy_Arduino-master\src\U8g2wqy.c:8059:15: error: size of array 'u8g2_font_wqy12_t_gb2312a' is too large  const uint8_t u8g2_font_wqy12_t_gb2312a[111359] U8G2_FONT_SECTION("u8g2_font_wqy12_t_gb2312a") =                ^~~~~~~~~~~~~~~~~~~~~~~~~ C:\Users\root\Documents\Arduino\libraries\U8g2_wqy_Arduino-master\src\U8g2wqy.c:11548:15: error: size of array 'u8g2_font_wqy12_t_gb2312b' is too large  const uint8_t u8g2_font_wqy12_t_gb2312b[120375] U8G2_FONT_SECTION("u8g2_font_wqy12_t_gb2312b") =                ^~~~~~~~~~~~~~~~~~~~~~~~~ C:\Users\root\Documents\Arduino\libraries\U8g2_wqy_Arduino-master\src\U8g2wqy.c:16987:15: error: size of array 'u8g2_font_wqy13_t_gb2312' is too large  const uint8_t u8g2_font_wqy13_t_gb2312[227383] U8G2_FONT_SECTION("u8g2_font_wqy13_t_gb2312") =                ^~~~~~~~~~~~~~~~~~~~~~~~ C:\Users\root\Documents\Arduino\libraries\U8g2_wqy_Arduino-master\src\U8g2wqy.c:24102:15: error: size of array 'u8g2_font_wqy13_t_gb2312a' is too large  const uint8_t u8g2_font_wqy13_t_gb2312a[121327] U8G2_FONT_SECTION("u8g2_font_wqy13_t_gb2312a") =                ^~~~~~~~~~~~~~~~~~~~~~~~~ C:\Users\root\Documents\Arduino\libraries\U8g2_wqy_Arduino-master\src\U8g2wqy.c:27903:15: error: size of array 'u8g2_font_wqy13_t_gb2312b' is too large  const uint8_t u8g2_font_wqy13_t_gb2312b[130945] U8G2_FONT_SECTION("u8g2_font_wqy13_t_gb2312b") =                ^~~~~~~~~~~~~~~~~~~~~~~~~ C:\Users\root\Documents\Arduino\libraries\U8g2_wqy_Arduino-master\src\U8g2wqy.c:33840:15: error: size of array 'u8g2_font_wqy14_t_gb2312' is too large  const uint8_t u8g2_font_wqy14_t_gb2312[251515] U8G2_FONT_SECTION("u8g2_font_wqy14_t_gb2312") =                ^~~~~~~~~~~~~~~~~~~~~~~~ C:\Users\root\Documents\Arduino\libraries\U8g2_wqy_Arduino-master\src\U8g2wqy.c:41709:15: error: size of array 'u8g2_font_wqy14_t_gb2312a' is too large  const uint8_t u8g2_font_wqy14_t_gb2312a[133898] U8G2_FONT_SECTION("u8g2_font_wqy14_t_gb2312a") =                ^~~~~~~~~~~~~~~~~~~~~~~~~ C:\Users\root\Documents\Arduino\libraries\U8g2_wqy_Arduino-master\src\U8g2wqy.c:45903:15: error: size of array 'u8g2_font_wqy14_t_gb2312b' is too large  const uint8_t u8g2_font_wqy14_t_gb2312b[143477] U8G2_FONT_SECTION("u8g2_font_wqy14_t_gb2312b") =                ^~~~~~~~~~~~~~~~~~~~~~~~~ C:\Users\root\Documents\Arduino\libraries\U8g2_wqy_Arduino-master\src\U8g2wqy.c:51371:15: error: size of array 'u8g2_font_wqy15_t_chinese3' is too large  const uint8_t u8g2_font_wqy15_t_chinese3[33165] U8G2_FONT_SECTION("u8g2_font_wqy15_t_chinese3") =                ^~~~~~~~~~~~~~~~~~~~~~~~~~ C:\Users\root\Documents\Arduino\libraries\U8g2_wqy_Arduino-master\src\U8g2wqy.c:52417:15: error: size of array 'u8g2_font_wqy15_t_gb2312' is too large  const uint8_t u8g2_font_wqy15_t_gb2312[276938] U8G2_FONT_SECTION("u8g2_font_wqy15_t_gb2312") =                ^~~~~~~~~~~~~~~~~~~~~~~~ C:\Users\root\Documents\Arduino\libraries\U8g2_wqy_Arduino-master\src\U8g2wqy.c:61081:15: error: size of array 'u8g2_font_wqy15_t_gb2312a' is too large  const uint8_t u8g2_font_wqy15_t_gb2312a[147563] U8G2_FONT_SECTION("u8g2_font_wqy15_t_gb2312a") =                ^~~~~~~~~~~~~~~~~~~~~~~~~ C:\Users\root\Documents\Arduino\libraries\U8g2_wqy_Arduino-master\src\U8g2wqy.c:65702:15: error: size of array 'u8g2_font_wqy15_t_gb2312b' is too large  const uint8_t u8g2_font_wqy15_t_gb2312b[158713] U8G2_FONT_SECTION("u8g2_font_wqy15_t_gb2312b") =                ^~~~~~~~~~~~~~~~~~~~~~~~~ C:\Users\root\Documents\Arduino\libraries\U8g2_wqy_Arduino-master\src\U8g2wqy.c:71763:15: error: size of array 'u8g2_font_wqy16_t_chinese3' is too large  const uint8_t u8g2_font_wqy16_t_chinese3[37454] U8G2_FONT_SECTION("u8g2_font_wqy16_t_chinese3") =                ^~~~~~~~~~~~~~~~~~~~~~~~~~ C:\Users\root\Documents\Arduino\libraries\U8g2_wqy_Arduino-master\src\U8g2wqy.c:72943:15: error: size of array 'u8g2_font_wqy16_t_gb2312' is too large  const uint8_t u8g2_font_wqy16_t_gb2312[318090] U8G2_FONT_SECTION("u8g2_font_wqy16_t_gb2312") =                ^~~~~~~~~~~~~~~~~~~~~~~~ C:\Users\root\Documents\Arduino\libraries\U8g2_wqy_Arduino-master\src\U8g2wqy.c:82893:15: error: size of array 'u8g2_font_wqy16_t_gb2312a' is too large  const uint8_t u8g2_font_wqy16_t_gb2312a[169286] U8G2_FONT_SECTION("u8g2_font_wqy16_t_gb2312a") =                ^~~~~~~~~~~~~~~~~~~~~~~~~ C:\Users\root\Documents\Arduino\libraries\U8g2_wqy_Arduino-master\src\U8g2wqy.c:88193:15: error: size of array 'u8g2_font_wqy16_t_gb2312b' is too large  const uint8_t u8g2_font_wqy16_t_gb2312b[182271] U8G2_FONT_SECTION("u8g2_font_wqy16_t_gb2312b") =                ^~~~~~~~~~~~~~~~~~~~~~~~~ 使用 2.32.15  版本的库 U8g2 在文件夹： C:\Users\root\Documents\Arduino\libraries\U8g2  使用 0.0.1  版本的库 U8g2_wqy_Arduino-master 在文件夹： C:\Users\root\Documents\Arduino\libraries\U8g2_wqy_Arduino-master  使用 1.0  版本的库 SPI 在文件夹： C:\Users\root\AppData\Local\Arduino15\packages\arduboy-homemade\hardware\avr\1.3.4\libraries\SPI  使用 1.0  版本的库 Wire 在文件夹： C:\Users\root\AppData\Local\Arduino15\packages\arduboy-homemade\hardware\avr\1.3.4\libraries\Wire  exit status 1

最新版本 u8g2 已经自带
https://github.com/olikraus/u8g2/blob/ad617c2bce7cfdb19a130f43c8891992fd9aa16a/csrc/u8g2.h#L2807-L2836

authors: larryli nsnake weiquan91


text:
Nulls Last

Hi there!
I'm wondering how when sorting on a specific column, how I can push all null values to the end, independent of sort direction.

Hi @krazyjakee! That's a question for your specific database rather than for Periscope. For instance, here's the documentation for PostgreSQL: https://www.postgresql.org/docs/9.5/static/queries-order.html
SELECT select_list FROM table_expression ORDER BY sort_expression1 ASC NULLS LAST

Googling around should give you what you want! In a Rails context, you may want to use Arel to build and add the NULLS FIRST/LAST clause to your query ordering. Good luck!

I am throwing the query parameters into periscopes black box which also handles sorting.
.periscope(request.query_parameters)
Are there no extra options I can pass to ask periscope to tweak the ordering?

Periscope is only an interface to whatever scopes your model already defines. How your models'  scopes handle ordering is a question I can't answer. Periscope will happily use whatever scope you define. If you want to give an example of parameters you're passing in, maybe I can help point you in the right direction.

You're super kind, thank you. It suddenly hit me as it should have hours ago 👯
Still getting used to rails, thank you again.

authors: krazyjakee laserlemon

repo: laserlemon/periscope


text:
Where is network.gpkg

Hi @latot great job on this! Quick question: where is the the network.gpkg file, needed to reproduce the README if I understand correctly.

You can use any network file for this. While only have one component should works.

Great, thanks, I can try to add a reproducible example.

authors: Robinlovelace latot


text:
refactor(explorer): move explorer routes into its own route group

I wanna use a new route group for some internal stuff that shouldn't inherit the base layout.tsx and apparently need to move things into route groups to "opt out" of a layout.

I had some concerns about using import path aliases to avoid all the ../../../.. when refactoring/moving files in VSCode, but sounds like some of those issues might be addressed in upcoming TS 5.6: https://github.com/microsoft/TypeScript/issues/59119

needs more work for cases when you load this up with no world address
gonna defer this for now

repo: latticexyz/mud


text:
sqlx::query_file_as! macro hashing broken on Ubuntu 22.04.1 LTS

Bug Description
A clear and concise description of what the bug is.
When a .sql file is saved from a linux machine, the sqlx::query_file_as! macro stops working and throws
'failed to find data for query...'
[..]
'note: this error originates in the macro $crate::sqlx_macros::expand_query (in Nightly builds, run with -Z macro-backtrace for more info)'
line 122: https://github.com/launchbadge/sqlx/blob/d7277f41ebcaab1072da74efc163b40b47ce63be/sqlx-macros/src/query/data.rs
Minimal Reproduction
If I pull from a branch where a MacOs user has saved the file, it will compile just fine.
As soon as I save the .sql file from a linux machine (Nano, Vim, Nvim, Code), even without making an actual change to the sql, the hashing will break and the code will no longer compile.
Info

SQLx version: 0.6.1
SQLx features enabled:  ["offline", "postgres", "runtime-tokio-rustls", "chrono", "json", "uuid"]
Database server and version: Postgres 13.4
Operating system: Ubuntu 22.04.1 LTS
rustc --version: 1.62.1

Likely a similar issue to #1494 and I described a workaround there: https://github.com/launchbadge/sqlx/issues/1494#issuecomment-943667930

@abonander I've seen that thread but we're not hashing using git.
For me in place of the hash I would just see the contents of the sql itself in the error message.

The ultimate problem is likely that something is changing the line endings in the .sql file, it may be Git or the editor you're using.

I added a .gitattributes file following the instructions of #1494 but unfortunately doesn't seem to fix the issue.
Do I need extra steps once the file is added?
I've tried prepare (won't work because fails) I've tried git add --renormalize . (nothing happens)

Try using a tool to compare the line endings of the file on Mac vs Linux.

@abonander
The line endings are the same "i/lf    w/lf  "
And they are actually the same on both the compiling branch the non-compiling branch.
As such is it possible that eol is not the issue?

Are they the exact same byte for byte?

@abonander
Using the od -c -b  tool on linux
I can see that the bytes on both branches are the same, yes.
Here is an example of a line in bytes. The pattern being \n followed by either 2x040 or 4x040 depending on the line.

0000000   w   i   t   h       t   s       a   s       (  \n           s
167 151 164 150 040 164 163 040 141 163 040 050 012 040 040 163
0000020   e   l   e   c   t  \n                   (   u   n   n   e   s
145 154 145 143 164 012 040 040 040 040 050 165 156 156 145 163

@abonander
here is the error I get if I run it without the Offline mode:

error[E0308]: mismatched types
  --> routes/admin/src/payment_details.rs:27:27
   |
27 |       let payment_details = sqlx::query_file_as!(
   |  ___________________________^
28 | |         PaymentDetailResponse,
29 | |         "sql/admin/payment_details.sql",
30 | |         store_id,
31 | |         p
32 | |     )
   | |_____^ expected enum `std::option::Option`, found struct `std::string::String`
   |
   = note: expected enum `std::option::Option<std::string::String>`
            found struct `std::string::String`
   = note: this error originates in the macro `$crate::sqlx_macros::expand_query` (in Nightly builds, run with -Z macro-backtrace for more info)
help: try wrapping the expression in `deliveries::_::_serde::__private::Some`
   |
605|         deliveries::_::_serde::__private::Some($crate::sqlx_macros::expand_query!(record = $out_struct, source_file = $path, args = [$($args)*]))
   |         +++++++++++++++++++++++++++++++++++++++                                                                                +

error[E0308]: mismatched types
  --> routes/admin/src/payment_details.rs:27:27
   |
27 |       let payment_details = sqlx::query_file_as!(
   |  ___________________________^
28 | |         PaymentDetailResponse,
29 | |         "sql/admin/payment_details.sql",
30 | |         store_id,
31 | |         p
32 | |     )
   | |_____^ expected enum `std::option::Option`, found `f64`
   |
   = note: expected enum `std::option::Option<f64>`
              found type `f64`
   = note: this error originates in the macro `$crate::sqlx_macros::expand_query` (in Nightly builds, run with -Z macro-backtrace for more info)
help: try wrapping the expression in `deliveries::_::_serde::__private::Some`
   |
605|         deliveries::_::_serde::__private::Some($crate::sqlx_macros::expand_query!(record = $out_struct, source_file = $path, args = [$($args)*]))
   |         +++++++++++++++++++++++++++++++++++++++

We ended up just removing the file queries and sticking with query_as().

I fixed this error by upgrading sqlx-cli to 0.6.3 (through cargo install sqlx-cli). Might be related to https://github.com/launchbadge/sqlx/issues/2101

authors: abonander glennsl parK-dev

repo: launchbadge/sqlx


text:
Cross-compiling or statically linking sqlx fails because of OpenSSL

Hello! Thank you for such an awesome Rust SQL client. We've been trying it out at work, and it looks super-promising. We'd love to use it to replace diesel and tokio-postgres in some of our open source tools.
However, many of our open source tools like falconeri and dbcrossbar are shipped as statically-linked binaries using my rust-musl-builder. (rust-musl-builder seems to be popular for other Rust projects, with something like 740,000 downloads. So if I can figure out how to make sqlx work for me, that would hopefully help out some other people, too.)
The problem: Compile-time OpenSSL connections cause linker headaches when cross-compiling
In order to produce a statically-linked binary using sqlx, we need to compile it twice, for two different environments:

The host environment. Here, sqlx-macros is compiled against GNU Libc, and Rust requires it to be a shared library that can be loaded as a "plugin" for the compiler.
The target environment. Here, sqlx is compiled against musl-libc, which is a 100% static C library that will allow a Rust binary to work on any Linux distribution with a modern kernel. This is super-useful for distributing one Linux binary that works everywhere. In this case, sqlx must be compiled as a static library, not a shared one.

The problem occurs because:

sqlx-rt always links against OpenSSL, in both the host and target environments.
The Rust openssl-sys library can be configured to link either statically or dynamically using OPENSSL_STATIC, but we're forced to choose one.

Here are three proposed solutions. I'd be happy to submit a PR for any of them.
Proposed solution 1: Fix openssl-sys to support both static and dynamic versions of OpenSSL at the same time
This is possible, but it might be complicated. The only reason to do this would be to link against OpenSSL in a macro while cross-compiling. But OpenSSL is native C code, and it makes everything related to cross-compiling excessively difficult.
Proposed solution 2: Modify sqlx-macros to have an offline-only feature
I could submit a PR that modified sqlx-macros to support an offline-only feature that required an up-to-date sqlx-data.json file, and that had no ability to connect to the database. This would only be useful when cross-compiling. This might be a relatively simple solution for people who can pass --features to cargo build when cross compiling, and who can set up appropriate features.
Proposed solution 3: Add support for rustls to sqlx-rt
If solution (2) seems unappealing, another option would be to allow using sqlx-rt without any C dependencies at all. To do this, we could use a native Rust library like rustls. I've used this in other Rust projects, and it seems to be well behaved and easy to set up.
If we had support for rustls, cross-compiling would magically work, even for people who just have a stock Rust install. There would be no need for tools like rust-musl-builder.
I'd also be happy to submit a PR for this approach.
Next steps

Does this seem like a problem worth solving?
If I send you a PR solving this problem, would you be interested in merging it?
Which of the proposed solutions above (1, 2 or 3) seems like the best approach?

I'd be delighted to send you a PR + documentation. And I could add an sqlx-specific test to rust-musl-builder to make sure that every release of rust-musl-builder still supports cross-compiling with sqlx. This would make it very easy for Rust developers to build static Rust binaries using sqlx.
Once again, thank you very much for such an awesome Rust SQL interface! I really love the way it allows us to use natural SQL while still preserving the benefits of Rust's type checking.

For an immediate workaround, look to:
https://github.com/launchbadge/sqlx/issues/473#issuecomment-655517309

I don't mind adding support for rustls. It's just non-trivial because of a limitation with Cargo.
See: https://github.com/launchbadge/sqlx/issues/575#issuecomment-664962185

There's a very promising fix proposed in https://github.com/sfackler/rust-openssl/issues/1337#issuecomment-685735809.
I'm going to try adding this to rust-musl-builder and see what happens.

I have updated rust-musl-builder to set:
X86_64_UNKNOWN_LINUX_MUSL_OPENSSL_DIR=/usr/local/musl/
X86_64_UNKNOWN_LINUX_MUSL_OPENSSL_STATIC=1

...as proposed at https://github.com/sfackler/rust-openssl/issues/1337#issuecomment-685735809. This makes sqlx work very nicely, out of the box. I've also added an sqlx example program to rust-musl-builder, and it's compiled as part of the test suite.  It's still necessary to use cargo sqlx prepare to avoid connecting to a database at buid time.
Thank you for your help figuring this out! I'm delighted to be able to build entirely static Linux binaries using sqlx, and I hope this helps somebody else.

authors: emk mehcode


text:
Not balancing after restarting

Sometimes when stopping the Python program and restarting it afterwards, you get really sluggish balancing performance or it will fail right away. Something is slowing the loop down.
Reboot fixes it.
I have not yet found a way to reproduce this consistently. I'm opening this issue to log it when it occurs.

Today it occurred when starting it from Brickman first, and later starting it from VSCode, even though the program exited properly.

@gregcowell has reported this too.

repo: laurensvalk/segway


text:
Syntax error in contact form

https://github.com/lautaroangelico/WebEngine/blob/d6b16d59270aaba9a411a3f968baef61f9d20c83/modules/contact.php#L29
the extra parentheses needs to be removed

Fixed in commit #86a6033

repo: lautaroangelico/WebEngine


text:
[README] Need to fix Slack badge

Description

README.md is the first file one should read when starting a new project. For attractive look, we added some badges also.
But, there's a Slack badge failing, need to fix that.
Screenshot
Current Behavior

Desired Behavior

Environment:

OS: any [e.g. Ubuntu]
Browser: any [e.g. Chrome, Safari]
Version: any [e.g. 22]
Device: any [e.g. laptop, iPhone 8]

Assigning Myself on this 😶


text:
add cmdlet *-ADDomainControllerPasswordReplicationPolicy

Hello,
I don't know if these cmdlet are available for ADSIPS:

Get-ADDomainControllerPasswordReplicationPolicy
Set-ADDomainControllerPasswordReplicationPolicy
Remove-ADDomainControllerPasswordReplicationPolicy

Regards

Hi @julienbassin !
Indeed, we do have replication cmdlets did you look at these ?
Else feel free to take a stab at them :smile_cat:

authors: julienbassin lazywinadmin

repo: lazywinadmin/AdsiPS


text:
Dependency updates

This updates some dependencies to newer versions. Potentially breaking if the host app is using these dependencies as well and a single version is required.

ember-engines v0.9.0
Appuniversum v3 (while still supporting v2)
ember-intl v6 (while still supporting v5)
ember-concurrency v3 (while also supporting v4)

I don't understand why CI fails. I don't have any local changes after running npm install and npm ci works as expected as well.. I double checked the versions and I'm using the exact same npm version as the image is using as well :thinking:.

repo: lblod/ember-jobs-dashboard-engine


text:
Use shared components repo for button/form/table styling

Changes

Uses https://github.com/lbryio/components for button/table/form styling
data-theme => data-mode
.btn => .button
Remove FormRow
Use https://github.com/lbryio/components web-compoenents for form stuff

It's mostly just markup changes. I still plan to make more changes/cleanup in my next PR. I just wanted to get it working, then see how much more we can strip out after this.
Dark mode still needs some work, but I think most of these changes will go in the components repo.

Files changed 79 😭

authors: seanyesmunt skhameneh

repo: lbryio/lbry-desktop


text:
Support release notes for Android

We currently use the !releasenotes post command to grab lbry-desktop release notes. We should add the desktop/android option to this and post Android as well.

Currently working on this!

authors: felhe tzarebczan

repo: lbryio/lbry-wunderbot


text:
claim_new_support() allows me to edit other's content

Not sure if this is a desktop or SDK/daemon issue...
The Issue
Using claim_new_support() with pybry, I can support someone else's claim, as usual. However:

LBRY app then enables my EDIT button for that claim (even though content is not mine)
LBRY app allows me to see and edit somebody else's claim on the PUBLISH page
Also shows up in my Publishes list (see pic below)
I haven't tried updating from publish page, (that'd be bad)...

Steps to reproduce
I did these steps:

lbry.claim_new_support("three", "a3262732cd445ef6c06f4bf64bfe3facdf82dbea", "500.42")
Visit the claim, lbry://@Books#fa1c5e4636d4087018dfdbb10d5a4838a10f50dd/three
See the edit button and click it,
Admire the Publish page, with all its functionality for somebody else's content
but don't fool with it cuz it'd suck if I'd ruin @Books' $3000 claim.

Expected behavior
Edit button shouldn't be enabled for content I did not create. A different option should be there to "abandon my support" if desired (like it is in the wallet interface) instead of a full edit (!)
Actual behavior
I can edit somebody else's stuff (kinda). Not actually good?

{'build': 'qa',
  'lbrynet_version': '0.30.4',
  'lbryschema_version': '0.0.16',
  'os_release': '17.7.0',
  'os_system': 'Darwin',
  'platform': 'Darwin-17.7.0-x86_64-i386-64bit',
  'processor': 'i386',
  'python_version': '3.7.2'}

Screenshots

Shouldn't be able to edit, as this is not my content:

Here's the publish page. I shouldn't be able to see it:

Here's @Books channel in the popup, which I do NOT own:

I didn't publish this content, but it shows up amongst my publishes:

This is just a bug on the UI, which is why so don't allow classic supports yet. I'll link it in the am.

https://github.com/lbryio/lbry-desktop/issues/2105

authors: tzarebczan upsided

repo: lbryio/lbry


text:
format help message properly in case of error in CLI

lbrynet-cli did not format the help message properly when there was an error

          1 Error

:no_entry_sign:
Please include a CHANGELOG entry.

          1 Message

:book:
See http://keepachangelog.com/en/0.3.0/ for details on good changelog guidelines

  Generated by :no_entry_sign: Danger

authors: kaykurokawa lbry-ci


text:
Normalization - Do we care about UCA versions

I just wanted to get this conversation out of slack and have documented for historical purposes.
The unicode standards are always updated

LBRYcrd is use the ICU library for unicode support v57.1. This uses UCA 8.0

Among our different services, there are 3 that standout in requiring unicode support also.
LBRYNet - The base lbry uses UCA 11.0
Chainquery(MySQL) -  MySQL 8.0 users UCA 9.0
Lighthouse(ElasticSearch) - as of yet unknown
@lyoshenka Has already made the call that for Chainquery we will wait and see if there will be any issues between UCA 8.0 and UCA 9.0.
The list of migration issues are below
https://www.unicode.org/versions/Unicode9.0.0/#Migration
https://www.unicode.org/versions/Unicode10.0.0/#Migration
https://www.unicode.org/versions/Unicode11.0.0/#Migration
So the question is do we care? If not lets close this issue.

After upstream merge, update Boost and ICU versions to match Unicode 11. In fact, can we ditch the lbrycrd_dependencies repo and use the "depends" folder instead?

Upstream merge now includes ICU 62.

doing some cleaning. reopen if this is still active.

To clarify one thing: I'm planning to ship the next release with ICU 63.2 (which is still Unicode 11).

authors: BrannonKing lyoshenka tiger5226

repo: lbryio/lbrycrd


text:
libbinder.so通信方式的分支编译失败

在../../tools/android-sdk-mac_86/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/bits/fortify/string.h
#if ANDROID_API >= ANDROID_API_J_MR1
return __builtin___strcat_chk(dst, src, __bos(dst));
undefined reference to   '__strcat_chk'

+1 ，请求楼主有解决方案吗

hi 问题解决了吗？正常来说string.h链接到的是sysroot/usr/include/string.h这个头文件，你们链接到了sysroot/usr/include/bits/fortify/string.h这个位置。可以换一个ndk版本试一下，比如我的ndk版本是r16b。

https://developer.android.com/ndk/downloads/older_releases?hl=zh-cn
替换成ndk r16b 编译成功；
linux 64bit 地址如下
https://dl.google.com/android/repository/android-ndk-r16b-linux-x86_64.zip?hl=zh_cn

NDK降级即可

authors: HanselLi lcodecorex lixiangthinker vniu xiaoyaomeng

repo: lcodecorex/KeepAlive


text:
Client API search - "base" parameter: string or dn object

I would like some clarification regarding the "base" parameter that is passed to the Client API search.

According to the doc this should be a string.
Does this mean that provided an d object such as "req.dn" (from Server API) is not supported

I am asking this as passing "req.dn" used to work in older ldapjs (0.7) but not with the latest version.
I new to both ldapjs and nodejs and noticed this after upgrading ldajs on some exiting code.

⚠ This issue has been locked due to age. If you have encountered a recent
problem that seems to be covered by this issue, please open a new issue.
Please include a minimal reproducible example
when opening a new issue.

authors: arekkusu jsumners

repo: ldapjs/node-ldapjs


text:
tag discriminated types?

Is there an easy way to use tags to discriminate types but still retain the original functionality with functions that don't support the tags?
Consider the overview example which I've modified with pseudocode demonstrating what I wish to do. Is there a way to do something like:
#include <boost/hana.hpp>
#include <boost/hana/ext/std/type_traits.hpp>
#include <cassert>
#include <string>
using namespace boost::hana;
using namespace boost::hana::literals;

struct Fish{};
struct Cat{};
struct Dog{};

tag<std::string,Fish> FishStr;
tag<std::string,Cat> CatStr;
tag<std::string,Dog> DogStr;

int main() {
  // Sequences capable of holding heterogeneous objects, and algorithms
  // to manipulate them.
  auto animals = make_tuple(FishStr{"Nemo"}, CatStr{"Garfield"}, DogStr{"Snoopy"});
  auto names = transform(animals, [](auto a) {
    return a;
  });
  assert(reverse(names) == make_tuple("Snoopy", "Garfield", "Nemo"));
  auto fish = filter(animal_types, [](auto a) {
    return traits::is_tagged(a,Fish());
  });
  static_assert(fish == make_tuple(type<FishStr>), "");
}

I don't think this would compile, but is there something to that effect available in the repository?

Does the following do what you want?
#include <boost/hana.hpp>
#include <cassert>
#include <string>
using namespace boost::hana;
using namespace std::literals;

struct Fish { };
struct Cat { };
struct Dog { };

int main() {
  auto animals = make_tuple(make_pair(type<Fish>, "Nemo"s),
                            make_pair(type<Cat>, "Garfield"s),
                            make_pair(type<Dog>, "Snoopy"s));
  auto fish = filter(animals, [](auto t) {
    return first(t) == type<Fish>;
  });
  assert(fish == make_tuple(make_pair(type<Fish>, "Nemo"s)));
}

You can then use keys or transform to get only the relevant part of the pair (the type or the string), as needed.

Cool, that definitely solves the problem when I can define the types myself! I love how concise hana can be.
That lead me to another possibility. User defined types may be where pair syntax breaks down, because a struct with several data members containing say, vectors of torques positions and velocities couldn't go through a simple make_pair.
How would you approach incorporating user defined data like PetStore below into an architecture that can be used like your example above in addition to the existing types we already defined above?
struct PetStore {
std::vector<std::string> fish;
std::vector<std::string> cats;
std::vector<std::string> dogs;
}

struct PetsAtHome {
  std::string dog;
  char[55]   cat;
  std::string gerbil;
}

To provide a clearer picture here are the goals I'm imagining:

a small metaprogram to serialize/deserialize type discriminated data
separation of data structures and algorithms, perhaps via a small metaprogram to unpack the data from user defined types to feed data into an algorithm, such as how boost.geometry supports them.
algorithms that perform calculations based on not just the type but also the unit of the data, like in boost.units
conversion of data from one user defined format to another based on the tag data supplied with the function call, such as copying data from PetStore to PetsAtHome

I know that's outside the bounds of my initial question but one thing leads to another... I'm still learning the right way to think about these things so I really appreciate your feedback.

Can you please clarify what you mean by type discriminated data? Do you mean an object (of a C++ type T), which is associated to another type D. Then, you're interested in manipulating objects of type T, while still keeping the information contained in type D associated to those objects?
For example, T could be int and D could be meter per seconds. Then, you're interested in manipulating ints tagged with some unit information to do dimensional analysis. Is this sort of what you're trying to accomplish, or is it something else entirely? I'm trying to understand your problem better so I can help you.

This reminds me to the meta type system I'm working on with Concepts Lite. I have boxed types which carry type information of the C++ type it wraps, the concept is similar to Rust traits. The you can easily discriminate types with a concept constraint:
template<is_a<Integer> i>
struct foo { ... };

Where is_a is a binary concept matching a Typeclass with a C++ type:
template<typename Tag, typename T>
constexpr bool is_a()
{
    return std::is_same<Tag, typename T::typeclass>::value;
}

GCC-clite currently does not support concept constraints on lambdas, so this currently does not fit very well with Hana. I'm looking forward for more CL support, for my experience it makes meta (type manipulation in general) clean and concise. Imagine Hana functions with the same kind of constraints:
auto no_pointers = remove_if(animal_types, [](Type a) {
  return traits::is_pointer(a);
});

Picked from the tutorial. Using a concept constraint on the lambda parameter, when we use that filter with non-type values it fails at the top level, not by an accessing to ::type inside traits::is_pointer.
I still have the idea of translating Hana concepts to Concepts Lite on my roadmap, but I have no enough time yet. Also I want to release my experiments on the algebraic meta type system first, which is my sandbox for testing CL.

I'll happily jump on the Concepts-lite wagon when it's here, and I think that it will indeed make metaprogramming much cleaner.

I'll get really specific to eliminate confusion, but I think what I want to accomplish applies more broadly.
I'm working on robotics and there are different models of arms with completely different implementations and control capabilities. The reason I made the PetStore and so on is because I have to deal with different structures. Sometimes an arm has 5-7 joints, and different arms have different sensors. So I'll have info like position, velocity, torque, which move pretty easily between different implementations but may be stored in different ways and have different underlying reasons. For example there is the "commanded" position (angle theta) and torque that I send to the arm. Then there is a "Monitor" aka measured position and torque which is what actually happened, and this can differ from what I told it to do. However, there are also APIs that work in cartesian rather than joint space, where I tell it to go to [x,y,z,roll,pitch,yaw]. Or [x,y,z,qw,qx,qy,qz] where q is a quaternion, a 4 element way to represent rotations more accurately.
Then, the APIs can implement different subsets in totally different ways like these:

struct jointMonitor{
   double position;
   double  torque;
   double external_torque;
}

struct jointCommand {
   double position;
   double torque;
   double external_torque;
}

enum JointState {
  ok,
err1,
err2
};

enum JointMode {
   Position,
   Velocity,
   Cartesian
}

struct arm1 {
   std::vector<JointMonitor> monitorJoints;
   std::vector<JointCommand> commandJoints;
  JointMode jointmode;
  JointState jointstate;
}

struct arm2 {
  std::vector<double> receivedPositions;
  std::vector<double> commandPositions;
  std::vector<double> commandCartesian; // x,y,z,r,p,y
  std::string errorCode;
  bool enableBrakes;
}

In addition to the arm APIs, there are also simulator APIs too, which leads to an M*N explosion of APIs to implement. As you can see, these simplified "designs" have some fundamental similarities and some fundamental differences.
You can also sort of see how I was trying to generalize this with animal types, homes, and pet stores. The same sort of problem applies to almost any two implementations of similar technologies so I think this is more broadly applicable than my specific example, as boost.geometry, boost.qvm, and boost.asio are examples of.
I'm not trying to solve all the problems in the world, but what I am interested in is having a straightforward way to adapt input data in a way that a metaprogram can understand and continue to work with the pieces that are available even if not all 100% of components exist on each API. Then for most typical cases I'd like to be able to write a simple adapter from the native data implementation so a metaAPI can read and write data and turn my O(M*N) implementations problem into an O(M+N) problem.
My picture of how to implement that is to tag the elements of the native data storage with the both the dimensional analysis component and the state component, then call a simple metafunction like copy(), which then can go through each matching data component and copy the data from one format to another, or can take two completely different formats, and do some math on each with one implementation.
I think boost.geometry achieves this, and I feel like hana provides fantastic tools that could be used to that end while making things much simpler and more powerful. That's why I asked my question because I'd like to learn from your experience with a very small example that I could use as the foundation. Does this make sense and seem both possible and practical? Thanks a million for your time and input!

Ok, I have re-read this a couple of times to get a better picture. I'll now dump my understanding of the problem; let me know if I'm off the track.
I think you need a "master API", one which contains a superset of the functionality provided by all the arms you might want to control. Then, you only use the arms through that API, and since it is at least as general as every other arm API, you are guaranteed to be able to control any arm properly. Do we agree on this?
Then, you need to somehow map these specific arm implementations to this "most powerful API" in one way or another, so that you can use these arms through that (single) API. Overall, given N arm implementations and M different "master" APIs (master arm API, master simulator API, etc...), you need to implement N x M APIs in total: M APIs for each of the N different implementations. This is what you're trying to avoid and turn into an N + M problem, right?
I'm not sure how Hana fits into the picture yet, but let's not give up.

Correct! That's basically my target.
The API centric way you are thinking of it is interesting and may be better than my initial idea. I believe I was originally thinking in a more data centric way which is where I was picturing hana being useful to define maps and/or sequences of the data contained in formats like arm1 and arm2 at compile time, then use hana to generate the implementations that move/access data between formats, such as from one container design to another at runtime.
A "master" API which I hook "slave" APIs into does sound interesting. To elaborate on my situation, there are a number of different APIs that could be moved between. One example is a physical robot's driver APIs where I read and write data to update the state, usually by inserting and reading containers from a class over a network interface sample driver tests are linked in this question of mine. My initial attempts at a "master API" (no hana, or even much metaprogramming) are in grl which attempts to wrap V-REP at the moment. Example tools that could be wrapped include KDL and cisst for example. Each tool, simulator, and robot API contains different containers for linear algebra data and series of joint data.  APIs for existing algorithm implementations could be wrapped in the master API you describe which can access the underlying specialized API implementations.
Of course as described above this could expand infinitely so it is sensible to make a surgical selection of critical parts, like accessing data in a generic way and automatically converting among several varying data layouts, particularly transforms, series of joint data (with unit/dimensional analysis component), and codes for modes/states/errors.
Perhaps a hana metaprogram acting on tags and a type sequence paired with the existing runtime data types could be used to define accessors. The compile time sequence can be walked over to generate code that copies or directly accesses common parts of data with one implementation for a variety of runtime data types like arm1 and arm2. Ultimately this defines the "master api" to be used at runtime.
Does that make any sense?

Helping you properly requires a quite good understanding of your problem domain. Unfortunately, I lack both such knowledge and the time to acquire it at the moment, so it is hard for me to sketch a solution for you.
What I definitely can do, if you provide a skeleton of what you need (even pseudocode would be a good start), is to give you comments about how you might simplify it or write it in idiomatic Hana. If you formulate your needs in terms of C++ and pseudo-Hana, I can then probably help you without having to know the problem domain.

Ok, I think I've reduced it to something managable. Can you explain how to do something like the boost.geometry convert function with hana?
Here is the "primary" function definition, but you need to look at the link above to really capture everything:
/*!
\brief Converts one geometry to another geometry
\details The convert algorithm converts one geometry, e.g. a BOX, to another
geometry, e.g. a RING. This only works if it is possible and applicable.
If the point-order is different, or the closure is different between two
geometry types, it will be converted correctly by explicitly reversing the
points or closing or opening the polygon rings.
\ingroup convert
\tparam Geometry1 \tparam_geometry
\tparam Geometry2 \tparam_geometry
\param geometry1 \param_geometry (source)
\param geometry2 \param_geometry (target)
\qbk{[include reference/algorithms/convert.qbk]}
 */
template <typename Geometry1, typename Geometry2>
inline void convert(Geometry1 const& geometry1, Geometry2& geometry2)
{
    resolve_variant::convert<Geometry1, Geometry2>::apply(geometry1, geometry2);
}

I think hana can cut down on the complexity of the above boost.geometry code, or at least write it in a different way. Correct?
Also here is a reasonable example from my library:
namespace vrepquat {
    enum vrep_quat {
       x,
       y,
       z,
       w
    };
}

template<typename InputIterator> // I think this isn't actually being used as an input iterator, ignore that...
Eigen::Quaterniond vrepToEigenQuaternion(InputIterator vrepQuat){

  //                  0123
  //  vrep is ordered xyzw,
  // eigen is ordered wxyz

    Eigen::Quaterniond quat(vrepQuat[vrepquat::w],vrepQuat[vrepquat::x],vrepQuat[vrepquat::y],vrepQuat[vrepquat::z]);
    return quat;
}

template<typename Q>
std::array<float,4> EigenToVrepQuaternion(const Q& q){
  std::array<float,4> qa;

  //                  0123
  //  vrep is ordered xyzw,
  // eigen is ordered wxyz
  qa[vrepquat::x] = q.x();
  qa[vrepquat::y] = q.y();
  qa[vrepquat::z] = q.z();
  qa[vrepquat::w] = q.w();

  return qa;
}

There are a few problems with my code I'd ideally eliminate:

It is nowhere near as general as the boost version
I have to write out the conversion function for every pair of libraries I implement in each direction
the names will different in every case (in my function)
I have to manually deal with the element ordering difference between the functions
I'd like to be able to choose between ignoring and failing on element mismatches

Ideally I'd have something like the following pseudocode:
// compile time generator pseudocode
// this is where the bulk of hana code goes
//
// todo:
// maybe have a second loop for iterating over depth, like with
// tuple<tuple<datatocopytype>> datatoCopy;
// datatocopytype whereToPutIt;
// copy(dataToCopy,whereToPutIt);

t2& apply_copy (t1,t2, strategy)
{
  upt1 = unpack_data_type(t1);
  upt2 = unpack_data_type(t2);
  are_compatible_types(upt1,upt2);
  for(element_type:upt1)
  {
   if(units_mustmatch(strategy)) BOOST_VERIFY(units(upt1)==units(upt2));
    if(argument_mismatch_allowed(strategy))
    {
      get(upt2,element_type) = get(upt1,element_type);
    }
     else
    {
      compiler_error_mismatched_not_allowed();
    }
  }
}

// runtime
// side note: Perhaps the "copy" calls should be named convert?
template<type1,type2,strategy=default_strategy_type()>
type2 copy(type1 t1,type2 t2,strategy =default_strategy())
{
return  apply_copy(t1,t2);
}

struct ThirdPartyQuaternion {
double w;
double x;
double y;
double z;
};

struct ThirdPartyPoint{
double x;
double y;
double z;
};

struct ThirdPartyTransform{
ThirdPartyQuaternion q;
ThirdPartyPoint           p;
};

typedef std::tuple<ThirdPartyPoint,ThirdPartyQuaternions> MyTransform;

main()
{
auto data = make_tuple(eigen::quaterniond(1,0,0,0),eigen::point3d(1,1,1));
// tag locally identifies the underlying type as a quaternion, but the class stays the same otherwise
// this differs slightly from the global registration boost.geometry provides.

tag<std::array<double,4>,quaternion_tag> quaternion;
ThirdPartyTransform theirTransform;
MyTransform myTransform;

copy(data,quaternion); // data copies ok
copy(data,quaternion,disable_mismatch()); // fails because quaternion can't handle all elements
copy(data,theirTransform); // ok
copy(theirTransform,myTransform); // ok
copy(myTransform,data); // ok
copy(quaternion,myTransform,disable_mismatch()); // fails because all elements don't match
copy(quaternion,myTransform); // ok
}

Going one step further, I'd like to have the copy calls  check the "unit", so in the case of points they could be distance vectors, or velocity vectors, and you shouldn't be able to add the two.
A bonus would be an additional optional statically defined reference frame. For example if you are standing next to me with a coffee can nearby, the vector from me to a coffee can and from you to a coffee can are both valid. However, they shouldn't mix because they are measured in different reference frames, so if I tried to walk to the coffee can using your vector I'd end up somewhere completely wrong.

From my understanding, you could start from something like:
struct default_strategy {
    template <typename T1, typename T2>
    void operator()(T1& t1, T2& t2) const {
        BOOST_VERIFY(units(t1) == units(t2)); // up to you to implement `units`
        t1 = t2;
        // Here, you could also decide to trigger a compile-time error if
        // there's a type mismatch between T1 and T2; you decide.
    }
};

template <typename T1, typename T2, typename Strategy = default_strategy>
T2& copy(T1& t1, T2& t2, Strategy strategy = default_strategy{}) {
    auto n = hana::length(t1);
    BOOST_HANA_CONSTANT_ASSERT(hana::length(t2) == n);
    BOOST_HANA_CONSTANT_ASSERT(
        are_compatible(t1, t2) // up to you to implement `are_compatible`
    );

    n.times.with_index([&](auto i) {
        strategy(hana::at(t2, i), hana::at(t1, i));
    });

    return t2;
}

Whatever types T1 and T2 you use in there will have to be models of some Hana concepts so that you can call at, length and stuff like that on them. Another possibility is to convert everything to Hana tuples with hana::to<hana::Tuple>, but that will make a copy of your data and then you will lose the ability to return a meaningful reference to T2 from copy.
Otherwise, for std::tuple and std::array, it should work fine if you include the proper extension headers (<boost/hana/ext/std/{tuple,array}.hpp>). For other custom types, you'll have to make them a model of (at least) Foldable and Iterable to get length and at. You can look up the documentation of these concepts to know which functions must be implemented. Note that this part of Hana is about to change quite a bit in a non-backward compatible way (for much better performance), so you might not want to base any real world work on this just yet.
Also note that I'll be gone until around next Sunday and with little internet connectivity, so I might not be able to answer in a timely fashion until then.

Ok, enjoy your trip! I'll hold of on actually implementing something "real" until after the changes, thanks for the heads up.
One small thing, would that snippet you posted be able to handle the ordering differences? I thought a map might be necessary for cases where data is ordered xyzw vs wxyz, because the types/units wouldn't match up in the implementation of default_strategy. Maybe I'll first have to build a map of all the elements at least for one side, then go through the list of other elements and do lookups to see if they are present, and copy the data if they are.

Is this what you're talking about?
struct default_strategy {
    template <typename T1, typename T2>
    void operator()(T1& t1, T2& t2) const {
        BOOST_VERIFY(is_permutation(units(t1), units(t2)));
        // ...
    }
};

If so, then you could use a set to hold the units, and ordering differences would be ignored automatically when comparing sets for equality.

wow, seriously amazing! If when the new updates come out this compiles quickly too this will be a truly impressive library. So much complicated compile time and template code can be reduced to a single line now.

While browsing the web I came across an article which brought me to BOOST_HANA_ADAPT_STRUCT.  That looks like another piece of the puzzle I'm looking to solve. While this adaptation only takes the type and accessor of the structs, perhaps a version is possible where I can supply (classname,(descrimination_tag,type,membername)). Then I could say:
BOOST_HANA_TAGGED_ADAPT_STRUCT(ThirdPartyPoint,(x_tag,double,x),(y_tag,double,y),(z_tag,double,z))

then if there is another way this is done:
typedef std::array<float,3> point; // zyx

BOOST_HANA_TAGGED_ADAPT_SEQUENCE(ThirdPartyPoint,(x_pos_tag,double,[2]),(y_pos_tag,double,[1]),(z_pos_tag,double,[0]))

then the function:
dostuff(){
point p{3,2,1};
ThirdPartyPoint p2;
copy(p1,p2);
std::cout << get(p,x_pos_tag()); // ok
std::cout << get(p,x_velocity_tag()); // compile time error
}

the x,y,z tags could somehow be defined using their dimension like in boost.geometry and a unit.

I am struggling to understand how Hana would help you in this case, but I might be missing what you're trying to achieve in the end. It seems to me that something like the following would work:
#include <array>
#include <iostream>

struct x_position { };
struct y_position { };
struct z_position { };

struct x_velocity { };

template <typename Point, typename Tag>
auto get(Point const&, Tag) = delete;

template <typename To, typename Point>
To convert_to(Point const& p) {
    return To{get(p, x_position{}),
              get(p, y_position{}),
              get(p, z_position{})};
}

struct ThirdPartyPoint { double x, y, z; };
double get(ThirdPartyPoint const& p, x_position) { return p.x; }
double get(ThirdPartyPoint const& p, y_position) { return p.y; }
double get(ThirdPartyPoint const& p, z_position) { return p.z; }

using Point = std::array<double, 3>;
double get(Point const& p, x_position) { return p[0]; }
double get(Point const& p, y_position) { return p[1]; }
double get(Point const& p, z_position) { return p[2]; }

int main() {
    Point p1{{3, 2, 1}};
    ThirdPartyPoint p2 = convert_to<ThirdPartyPoint>(p1);

    std::cout << get(p2, x_position{}); // ok
    std::cout << get(p2, x_velocity{}); // compile time error
}

Now, were Hana might actually help you is in the definition of a more complex copy function as sketched above, or in any place where you need to programatically manipulate heterogeneous sequences.

Programmatically manipulating heterogeneous sequences is what I'm aiming to do. These get functions and convert functions are the basic API upon which I hope to build a library. If I can set up a way to have the dimension of the point be a meta compile time value, then I can write algorithms that work for 2 and 3 dimensional points, then objects containing heterogeneous sequences of points plus other data types.

To have the dimension something on which you can operate programmatically, you could replace the *_position structs by
template <int n>
struct position { };

Then, you might want to say position<0> for x_position, position<1> for y_position and so on.
At any rate, I'm not sure where this issue is going, so I'm going to close it. I'm happy to provide help for application-specific questions, but this seems like a bit too open-ended for me to give useful advice.

ok, thanks for the help

I found an interesting and relevant article that uses mpl to deal with type driven data. It doesn't explain hooking existing types into a system like they describe, but it does explain how to define new ones.

Thanks for the heads up! With Hana, you can use BOOST_HANA_DEFINE_STRUCT and BOOST_HANA_ADAPT_STRUCT to achieve something similar.

authors: Manu343726 ahundt ldionne

repo: ldionne/hana


text:
🛑 Radarr is down

In f90cf9f, Radarr (https://radarr.thonk.xyz) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Radarr is back up in f82d09e after 6 minutes.

repo: le-server/thonk-upptime


text:
🛑 Sonarr is down

In dbfaf31, Sonarr (https://sonarr.thonk.xyz) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Sonarr is back up in 30de09b.


text:
沒有動作

你好，很感謝你的套件，但最近好像不能使用，有空的話，麻煩可以修正一下，感謝~

@zu030 看來是已經修正完成可以更新試試

應該是 Dcard API parameter 略修改了
此次修正可參見 https://github.com/leVirve/dcard-spider/commit/471c48ffca8f860606561654cb7bba819c94b7fd

可以用了，感謝，辛苦了~

repo: leVirve/dcard-spider


text:
按照引导编译，报错如下。

pod install --verbose --no-repo-update。
没有问题。
打开工程后，编译出现。
ld: library not found for -lAFNetworking。
尝试了stackoverflow上面很多做法，都无法解决。

参考 ： http://weibo.com/1692391497/D7B7hhZTk?from=page_1005051692391497_profile&wvr=6&mod=weibotime

谢谢，我尝试下。

请问解决没有？

你好，我这边还是报这个错。

网上大多数说法认为是cocoaPods本身的问题，说没有设置好路径。我检查过连接的flag，路径好像没有问题。Pods文件夹下面的Afnetworking 也是有的。

这个会不会和版本有关系，最近AFNetworking更新了版本。Learnchat用的是哪一个版本的AF.

authors: ChenYilong loyinglin

repo: leancloud/leanchat-ios


text:
Check if we can automatically hide keyboard on iOS

This SO answer looks pretty interesting. We should see if we can replace our current usages of:
element.typeText(data)

with
element.typeText("\(data)\n")

See also:

#66

Done in #1511.

repo: leancodepl/patrol


text:
feat: breadcrumb path for assert_not_exists

As requested on Zulip.

bors merge


text:
refactor(Mathlib/Data/DFinsupp/Basic): remove Decidable instances from some DFinsupp functions

This PR removes Decidable instances from these DFinsupp functions:
1.
def DFinsupp.sigmaUncurry
    {ι : Type u} {α : ι → Type u_2} {δ : (i : ι) → α i → Type v} [(i : ι) → (j : α i) → Zero (δ i j)]
    [(i : ι) → DecidableEq (α i)] [(i : ι) → (j : α i) → Decidable (x ≠ 0)]
    (f : Π₀ (i : ι) (j : α i), δ i j) : Π₀ (i : (i : ι) × α i), δ i.fst i.snd

def DFinsupp.sigmaCurryEquiv
    {ι : Type u} [DecidableEq ι] {α : ι → Type u_2} {δ : (i : ι) → α i → Type v} [(i : ι) → (j : α i) → Zero (δ i j)]
    [(i : ι) → DecidableEq (α i)] [(i : ι) → (j : α i) → Decidable (x ≠ 0)] :
  Π₀ (i : (i : ι) × α i), δ i.fst i.snd ≃ Π₀ (i : ι) (j : α i), δ i j

to
def DFinsupp.sigmaUncurry
    {ι : Type u} {α : ι → Type u_2} {δ : (i : ι) → α i → Type v} [(i : ι) → (j : α i) → Zero (δ i j)] [DecidableEq ι]
    (f : Π₀ (i : ι) (j : α i), δ i j) : Π₀ (i : (i : ι) × α i), δ i.fst i.snd

def DFinsupp.sigmaCurryEquiv
    {ι : Type u} {α : ι → Type u_2} {δ : (i : ι) → α i → Type v} [(i : ι) → (j : α i) → Zero (δ i j)] [DecidableEq ι] :
  Π₀ (i : (i : ι) × α i), δ i.fst i.snd ≃ Π₀ (i : ι) (j : α i), δ i j

We use Trunc.finChoice from #13025 to compute support with the only DecidableEq ι instance.

instance DFinsupp.decidableZero
    {ι : Type u} {β : ι → Type v} [DecidableEq ι] [(i : ι) → Zero (β i)] [(i : ι) → (x : β i) → Decidable (x ≠ 0)] (f : Π₀ (i : ι), β i) :
  Decidable (0 = f)

to
instance DFinsupp.decidableZero
    {ι : Type u} {β : ι → Type v} [(i : ι) → Zero (β i)] [(i : ι) → (x : β i) → Decidable (x = 0)] (f : Π₀ (i : ι), β i) :
  Decidable (f = 0)

We remove the redundant DecidableEq ι instance. Additionally, We replace the (i : ι) → (x : β i) → Decidable (x ≠ 0) instance with (i : ι) → (x : β i) → Decidable (x = 0) because it's more principal, and swaps f and 0.

noncomputable def DFinsupp.comapDomain
    {ι : Type u} {β : ι → Type v} [DecidableEq ι] {κ : Type u_1} [(i : ι) → Zero (β i)] (h : κ → ι) (hh : Function.Injective h) (f : Π₀ (i : ι), β i) :
  Π₀ (k : κ), β (h k)

to
noncomputable def DFinsupp.comapDomain
    {ι : Type u} {β : ι → Type v} {κ : Type u_1} [(i : ι) → Zero (β i)] (h : κ → ι) (hh : Function.Injective h) (f : Π₀ (i : ι), β i) :
  Π₀ (k : κ), β (h k)

DecidableEq ι is required to compute unconstructive support so this is redundant.

[ ] depends on: #13025

bors merge

authors: Komyyy semorrison


text:
Lean pr testing 4379

Testing type class search optimization

!bench

I will close this since it seems it has fulfilled its purpose.

authors: JovanGerb YaelDillies


text:
A ring homomorphism f : R →+* S induces a homomorphism GLₙ(f) : GLₙ(R) →* GLₙ(S).

@mkaratarakis when you've addressed a comment from a reviewer, you should get in the habit of clicking the "resolve conversation" button to remove clutter

maintainer merge

Thanks! :tada:
bors merge

authors: Ruben-VandeVelde dagurtomas mkaratarakis urkud


text:
feat(Algebra/Homology): definition of Functor.mapDerivedCategory

If F is an exact functor between abelian categories, we define the induced functor on the derived categories.

Thanks!
bors merge

authors: joelriou kbuzzard


text:
feat: port Data.Finset.Order

bors r+


text:
feat: port Counterexamples.SeminormLatticeNotDistrib

Thanks :tada:
bors merge

authors: Parcly-Taxel jcommelin


text:
feat: add DiscreteTopology.of_continuous_injective

bors merge


text:
feat(analysis/metric_space) adds squeeze theorem

I'm aware that Johannes will want a more general version, but this PR is meant to ask for this result while proving I did my homework before asking (and this version is enough for me).
Also I wrote the special case I always need as a separate lemma deduced from the general case. One could instead deduce the general from the special.
This is also the opportunity to discuss having a notation for filter.tendsto f (nhds a) (nhds b) (all my calculus files start by defining this notation).

As you mention this should be proven on the order topologies, also its name should following our naming conventions. Another note: the commit message is missing a colon, after the feat(analysis/metric_space):

Is now proved with a theorem of the short name tendsto_of_tendsto_of_tendsto_of_le_of_le :smile:
https://github.com/leanprover/mathlib/commit/0b81b249f35a630adf89fe73ba2cc329d65e5f97

authors: PatrickMassot johoelzl

repo: leanprover/mathlib


text:
Turning offscreen updating back on for skinned meshes

[ ] Check three scenes in /LeapMotionModules/Hands/Examples/Scenes to verify UpdateWhenOffscreen is set to True for skinned meshes

This changes the settings in the scene but it does not change the prefab.  The change should probably be in the prefab and not in the scene.

OK, offscreen updating has been set in prefabs as well

authors: Amarcolina protodeep

repo: leapmotion/UnityModules


text:
WIP: Start of TF-IDF

Some issues:
how to specify the corpus?
In order to do TF-IDF we need each document separate so we can do document frequency. Or we need a compiled representation of the corpus indicating the presence or absence of each character.
Right now, this tfidf function just takes one or more paths to indicate the documents in the corpus.
This is less than optimal because:
User has no control on tokenization & transformation of corpus documents (lowercase? stopwords? etc).
Is there a better way to specify a corpus?
Perhaps another function preparecorpus or something that takes a bunch of docs and turns them into a count based representation?
character encodings
This currently doesn't work on python 2 most likely because of NLTK issues with character encodings. I'm not sure if this affects other functions
acquiring corpora
The NLTK corpora sometimes have additional content in them. Also, they are in different file formats (not UTF-8 for some reason). Right now textkit isn't great about handling non-utf8 formats.

The directory format makes sense to me but I'm assuming that's because I don't fully grok the motivation behind the json docs (since I wasn't as much a part of developing the visualizations themselves.)
It looks good otherwise.

authors: iros vlandham

repo: learntextvis/textkit


text:
Support for Node version 10

yarn global install reactql gives:
error upath@1.0.4: The engine "node" is incompatible with this module. Expected version ">=4 <=9".

should work now with the 3.0.0 release.

authors: leebenson malnor

repo: leebenson/reactql


text:
Update readme

Correct grammer

Coverage remained the same at 100.0% when pulling e444c45c927d8742a129aea97746e6786e1910c2 on bondz:patch-1 into d393a687fbf52f6bbe04e1000ec39e52415123fd on leebyron:master.

Danke

authors: bondz coveralls leebyron

repo: leebyron/iterall


text:
Swiper changes index unwantedly on Redux update

Which OS ?
IOS 12
Version
Which versions are you using:

react-native-swiper v^1.6.0-nightly.5
react-native 0.61.4

Problem
When redux updates the swiper's elements asynchronously, the swiper's index is changed to the index of the element before the current element when it should have just stayed the same.
This issue does not seem to affect my Android phone.

Same here getting this issue. anyone got solution?

Which OS ?
IOS 12
Version
Which versions are you using:

react-native-swiper v^1.6.0-nightly.5
react-native 0.61.4

Problem
When redux updates the swiper's elements asynchronously, the swiper's index is changed to the index of the element before the current element when it should have just stayed the same.
This issue does not seem to affect my Android phone.

Hi, FYI this issue solve after i add loop={false}
<Swiper
loop={false}
ref={this.mySwipeRef}
index={this.state.swipeIndex}
style={this.styles.wrapper}
showsButtons={false}
showsPagination={false}
onIndexChanged={(index) => this.onSwipeIndexChanged(index)}

same here only android

This is happening for me too but is caused by any prop change. Setting loop to false does indeed fix it but now that feature is lost.

add loadMinimal={true} may helps you, see this

authors: cuddeford initzx jonathanmachado koolll wangqiannan

repo: leecade/react-native-swiper


text:
게시글의 내용도 파싱되면 좋을 것 같습니다.

먼저 만들어주셔서 감사합니다.
이미지가 잘 다운받아지네요.
실제로 사용 해 보니 게시글에 내용이 더 중심인 경우가 많더라구요.
혹시 이미지 폴더명을 posts로 변경하고 같은 파일명에 txt확장자로 파싱되게 해주는 기능을 추가 할 예정은 없으신가요?
감사합니다.

게시물 내용도 텍스트로 저장할 수 있도록 페이지 구조 확인 후 기능 추가해보도록 하겠습니다
감사합니다 :)

게시물 내용을 텍스트로 저장하는 기능이 새로 구현되었습니다.
posts 폴더 내에 이미지 파일명과 동일한 이름의 텍스트 파일로 저장됩니다.

또한 제보된 문제점 수정/보완 작업도 이루어졌습니다.
감사합니다

와우 감사합니다.

authors: leegeunhyeok samslow

repo: leegeunhyeok/cyworld-bot


text:
adad

asds

👋

authors: Muzzera leerob

repo: leerob/on-demand-isr


text:
NEEDS_NEWLINE_NORMALIZATION

Using SetAttribute(string)
String has a CR-LF pair and the saved XML still has the pair.
It seems that NEEDS_NEWLINE_NORMALIZATION is only used when reading the data.
Am I misunderstanding this? How can I set NEEDS_NEWLINE_NORMALIZATION for SetAttribute?
Thanks.

I think that's just an unexpected case...it's not expecting a line break in the attribute. I'm not sure that is worth fixing - what is the use case / how did you find the bug?

Created XML file with several Attributes that have a CR+LF pair, imported XML into Excel and lines were double spaced. XML std requires only LF. When I pre-processed the Attribute (replaced CR+LF with only LF)
Then all was good.
Seems to me that if &, < etc are getting escaped then CR+LF should be replaced with LF too.
From: Lee Thomason [mailto:notifications@github.com]
Sent: 14 August 2015 21:57
To: leethomason/tinyxml2 tinyxml2@noreply.github.com
Cc: Michael Tissington mail@oaklodge.com
Subject: Re: [tinyxml2] NEEDS_NEWLINE_NORMALIZATION (#368)
I think that's just an unexpected case...it's not expecting a line break in the attribute. I'm not sure that is worth fixing - what is the use case / how did you find the bug?
—
Reply to this email directly or view it on GitHub https://github.com/leethomason/tinyxml2/issues/368#issuecomment-131237338 .  https://github.com/notifications/beacon/AGdJ3IbMnMFb4v1zc7TkicSLsc53MjJmks5onk23gaJpZM4FpXop.gif

The CR+LF does get normalized on read-in, but not setting the attributes. The TinyXML-2 generally expects the API calls (get/set sort of thing) to be "clean" without normalization or entities. Interesting use case, but I don't think it makes sense to fix in TinyXML-2. You should probably pre-process before setting the attributes.
Thanks for the info, but I think fixing this is out of scope.

authors: leethomason mtissington

license: Zlib


text:
[Maintenance] Use correct import directives in shaders

TODO

[ ] Use GOOGLE import directives in fragment shaders

Red herring; can't appease glsl: https://github.com/KhronosGroup/glslang/issues/1691, shaderc takes care of this for us.

repo: leetvr/hotham


text:
Refactored inline Javascript to CoffeeScript in compile.coffee

Ok, my first pull request at github. Hope it works. :-)

Thank you.
Don't convert fquery.js to CS, it's ok. Maybe in future I convert it to ES6.

I had it not in mind to convert fquery.
I already wrote a tiny size-optimized jquery replacement by myself, also in plain JS.
I just want to replace inline JS in the *.coffee files because it's a code smell mixing different types of code.
For example see
http://coffeescript.org/#embedded
http://home.engineering.iastate.edu/~hungnv/Research/WebScent/?page=code_smells
You write very efficient and elegant code, so it's hard to find such smells. ;-)
The only thing i generally found out is that some variables could be more meaningful.


text:
Your website has been hijacked by a flash player spam

Your website is redirecting to a plash player virus installer. You should probably get your domain back... That or remove the links from your GitHub if you intend to abandon the domain.

Closing issue due to previously opened similar issue that I was unaware of! 🤪

@xavierfoucrier
Considering the tardiness of @legomushroom and Microsoft
regarding a smooth transition, maybe add an issue that will not be closed.
e.g.
MOJS is Dead! LONG LIVE MOJS-CONTRIB!!!
Please review this ticket https://github.com/legomushroom/mojs/issues/201
The new repo is here:  ... etc. etc. yadda yadda

authors: joniler peterennisrda

repo: legomushroom/mojs


text: IP banning doesn't kick users

repo: leighmacdonald/gbans


text:
I want to change the content of showsUserLocation marker callout.

I want to change the content of showsUserLocation marker callout, does anyone knows how to do it? Does this library expose any of API can let me do that?

I don't think there is any right now. The marker is managed by the Google package itself. Maybe try fetching user location and display your custom marker by hand. If you wanna track the movement just add a listener with watchPosition and update the marker position Docs here

repo: lelandrichardson/react-native-maps


authors: PatSpiegel lelinhtinh llacb47


text:
spelling

used misspell tool from
https://github.com/client9/misspell to find and
fix automatically all spelling errors

tool output:
bigfoot$ misspell -w .
dist/bigfoot-bottom.scss:38:88: corrected "inital" to "initial"
dist/bigfoot-default.scss:38:88: corrected "inital" to "initial"
dist/bigfoot-number.scss:38:88: corrected "inital" to "initial"
src/scss/foundation/bigfoot-variables.scss:35:88: corrected "inital" to "initial"
src/coffee/bigfoot.coffee:443:6: corrected "Propogates" to "Propagates"
src/coffee/bigfoot.coffee:461:10: corrected "Propogate" to "Propagate"
src/coffee/bigfoot.coffee:473:10: corrected "Propogate" to "Propagate"
src/coffee/bigfoot.coffee:564:40: corrected "overriden" to "overridden"

repo: lemonmade/bigfoot


text:
Fix typo

Spotted a typo while reading the doc.
Good project, well written and it's easy to approach.
Thanks for that, if I spot anything else, I'll update the MR.

Codecov Report

Merging #5 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master       #5   +/-   ##
=======================================
  Coverage   36.71%   36.71%
=======================================
  Files           6        6
  Lines         128      128
  Branches        4        4
=======================================
  Hits           47       47
  Misses         81       81

Continue to review full report at Codecov.

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

thanks, David!!

authors: codecov-io daddykotex stew


text:
osr_parser.py doesn't raise ValueError if file is incorrect

The osu_parser.py raises ValueError if header of file is incorrect. This behaviour should be similar for the osr_parser.py. it could be done by checking replay file header for b"\x00\x80\xc3\xc9\x01\x0b".

This would be great idea if only replays had custom header, unfortunately the bytes you send are just mode and client version the replay was created at. Closing as I can't solve it.

Replays do not have a custom header, but it is not a problem. Bits in the file are strictly defined so it is possible to utilize that.
My current method looks like this:
def is_file_replay(filepath: str) -> bool:

    with open(filepath, "rb") as f:
        file_header = f.read(5)
        return len(file_header) == 5 and file_header.startswith(b"\x00") and file_header.endswith(b"\x01")

starting "\x00" is for osu gamemode and "\x01" at the last bit (little-endian) is for the year/lazer_year from version number which for lazer is 3000 and for osu is in the range of 20xx. In my lazer_db with over 20,000 replays and much more other files, no false positives.

authors: Vergenter lenforiee

repo: lenforiee/OsuPyParser


text:
move version information to cmake file

I have thought about the open point from #33: commit hash and dirty state is not updated without explicit run of cmake.
Do you see anything that speaks against removing the include/lomse_version.h and having the versions only in a cmake file?
The version information can be created like all the other cmake variables at cmake runtime. If you like the idea, I will prepare the necessary code changes. If you don't like it, I will try to change the cmake file to rebuild version strings with every change that affects them (like making the code dirty with respect to the repository).

As I see this:

version information should be extracted from git
But when building from a source package or if git is not installed in the machine, some static version information should be available and must be used. Currently, this is the role of lomse_version.h.
The library should have methods to provide:

the version info extracted from git or blank/empty string if not available at build time
the version info from the static variables

All these objectives are currently achieved by having the static information in lomse_version.h. But I don't see any problems for moving these static values to CMake. But in any case, what is the gain? Why do you think it is important to remove this info from a header file?
I don't understand your second point: "change the cmake file to rebuild version strings with every change that affects them (like making the code dirty with respect to the repository)". Do you mean, writing an script to be run after every commit so that it updates values in CMake file? Current script (scripts/update-version.sh) could be used for it. By the way I have to modify it because it was designed for using git tags in the form "major.minor" or "major.minor.0" but not current tag "0.17.20". With current script next version could be for instance "0.17.2"

I second your analysis with a small objection to the first: If the version is extracted from git and it's given in some file, there may be a difference that should at least be warned upon. If it's only given by git, it's not available in a source package without a special release process for building the source package. And a special release process makes it impossible to just use tags as release packages :disappointed:
It's not important to remove the version information from a header file but if it's included in a cmake file it's not necessary to parse a header file to get it. So it's in the book of removing unnecessary code to reduce possible errors.
And to the second question: Imagine this workflow

checkout the code from the repo
run cmake
run make

all versions are what we need and expect
but then

make some changes in the code
run make

the version still is the same as the one from the fresh checkout. But we expect a dirty in the version string. This is only added if cmake is run after changing anything. The same if you change the version file. And at least this version changed can be easily  managed by having the version information in the cmake files, because every change in a cmake file will trigger a cmake run by only running the normal build process. I'm not sure about how to achieve the same for changes in the git information, but will try to find out.
And regarding the update-version script: Maybe this could be done as a (c)make target.

Ok, understood. Your solution is better, so go ahead with the changes if you like.
Thank you!

authors: cecilios kolewu

repo: lenmus/lomse


text:
MacOS Buggy UI in Lens 5.2.4-latest.20210923.1

Describe the bug

Note: one of my colleagues is also on the same version and theirs is not bugging out...
To Reproduce
Steps to reproduce the behavior:

Upgraded to the latest Lens

Expected behavior
A clear and concise description of what you expected to happen.
Strange glitchy UI with blue bars everywhere
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):

OS: MacOS Catalina 10.15.7

Lens: 5.2.4-latest.20210923.1
Electron: 12.0.17
Chrome: 89.0.4389.128
Node: 14.16.0
© 2021 Mirantis, Inc.

Logs:
When you run the application executable from command line you will see some logging output. Please paste them here:
Your logs go here...

Kubeconfig:
Quite often the problems are caused by malformed kubeconfig which the application tries to load. Please share your kubeconfig, remember to remove any secret and sensitive information.
your kubeconfig here

Additional context
Add any other context about the problem here.

Nevermind I restarted my laptop and the bug went away.

repo: lensapp/lens


text:
Do not show Created on DetailsPane when there's no timestamp.

Signed-off-by: Juho Heikka juho.heikka@gmail.com
It would show <unknown> ago if creationTimestamp was missing.

Might need to update some snapshots but we will see

Oh yeah looks like. it

Might need to update some snapshots but we will see

Updated snapshots.


text:
collected.unset(collected.stillnessId, collected.type) have no effect

封装函数：
const spec = props => {
return {
collect: contract => ({
isStillness: contract.isStillness(),
stillnessId: contract.getStillnessId(),
items: contract.getStillnessItem(),
type: contract.getStillnessType(),
unset: contract.unset,
clear: contract.clear,
}),
};
};
export default spec;
具体使用
const collected = useStillness(spec(props));
useEffect(()=>{
console.log(collected)
},[collected])
<Button
icon={}
onClick={() => {
console.log(collected.stillnessId)
console.log(collected.type)
collected.unset(collected.stillnessId, collected.type) // have no effect
// collected.clear() // ok
}}

  del

//         const manager = useStillnessManager();
//          manager.getActions().triggerUnset(id); // have no effect
//          manager.getActions().triggerClear(); // ok

collected.unset(collected.stillnessId)
manager.getActions().triggerUnset(id)
都没有任何效果

你好，想问下其他的部分呢？比如组件的使用以及provider是否引入，这些是上述提到的hooks能生效的基础，也可以参考下示例哦：https://react-stillness-component.vercel.app/docs/examples/simple/intro

repo: leomYili/react-stillness-component


text:
Use different modules DBs when testing

Expected Behavior
Use new modules DBs while testing.
Actual Behavior
While testing, modules DBs are the ones used for distribution.
Proposal
Split modules DBs from the common ones while testing to avoid any conflict.

Done in https://github.com/leon-ai/leon/commit/81ec213ff2566b61e21917718e4c0e9c6a7c5271.
process.env.LEON_NODE_ENV was not taking in consideration while running e2e tests because Python modules was trying to get this environment variable, whereas these modules run under a different process. So the trick here would be to load all env variables in the TMP file that allow inter-process communication. But finally I ended up passing the variable env before running the npm script and flush the test DBs files via a specific Node.js script once Jest finish his full execution.

repo: leon-ai/leon


text:
typeid.h:211: undefined reference to `caffe2::gTypeNames()'

CC = g++
CFLAGS = -std=c++11 -g -O0 -Wall -Wfatal-errors  -I/home/beiqi.qh/workplace/opt/anaconda2/include
LDFLAGS = -L/home/beiqi.qh/workplace/opt/anaconda2/lib -lgflags -lglog -lprotobuf -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_imgcodecs  -lcaffe2_gpu -lcaffe2
EXEC = 'out'
all: main.o tool.o
$(CC) $(CFLAGS)  $^  -o $(EXEC) $(LDFLAGS)
main.o: main.cpp tool.h
$(CC) $(CFLAGS) -c main.cpp -o $@
tool.o: tool.cpp tool.h
$(CC) $(CFLAGS) -c tool.cpp -o $@
clean:
rm -f $(EXEC) main.o tool.o
when I typing make,
/home/beiqi.qh/workplace/opt/anaconda2/include/caffe2/core/typeid.h:168: undefined reference to caffe2::gTypeNames()' /home/beiqi.qh/workplace/opt/anaconda2/include/caffe2/core/typeid.h:169: undefined reference to caffe2::gTypeNames()'
main.o: In function caffe2::Tensor<caffe2::CPUContext> const& caffe2::Blob::Get<caffe2::Tensor<caffe2::CPUContext> >() const': /home/beiqi.qh/workplace/opt/anaconda2/include/caffe2/core/blob.h:79: undefined reference to caffe2::EnforceNotMet::EnforceNotMet(char const*, int, char const*, std::string const&, void const*)'
main.o: In function float const* caffe2::Tensor<caffe2::CPUContext>::data<float>() const': /home/beiqi.qh/workplace/opt/anaconda2/include/caffe2/core/tensor.h:485: undefined reference to caffe2::EnforceNotMet::EnforceNotMet(char const*,int, char const*, std::string const&, void const*)'
/home/beiqi.qh/workplace/opt/anaconda2/include/caffe2/core/tensor.h:490: undefined reference to caffe2::EnforceNotMet::EnforceNotMet(char const*,int, char const*, std::string const&, void const*)' main.o: In function char const* caffe2::TypeMeta::TypeName<caffe2::Tensorcaffe2::CPUContext >()':
/home/beiqi.qh/workplace/opt/anaconda2/include/caffe2/core/typeid.h:211: undefined reference to caffe2::gTypeNames()' /home/beiqi.qh/workplace/opt/anaconda2/include/caffe2/core/typeid.h:212: undefined reference to caffe2::gTypeNames()'
main.o: In function char const* caffe2::TypeMeta::TypeName<float>()': /home/beiqi.qh/workplace/opt/anaconda2/include/caffe2/core/typeid.h:211: undefined reference to caffe2::gTypeNames()'
/home/beiqi.qh/workplace/opt/anaconda2/include/caffe2/core/typeid.h:212: undefined reference to `caffe2::gTypeNames()'
collect2: error: ld returned 1 exit status
make: *** [all] Error 1
How to solve this problem?

@leonardvandriel

you aren't linking to libcaffe2 properly which is why you are seeing undefined errors.
What is your sudo ldconfig -p | grep "libcaffe2*" output?

thanks for your reply, I install caffe2 in "conda install -c caffe2 caffe2-cuda8.0-cudnn7", and I export $anaconda_path/include and $anaconda_path/lib to CPLUS_INCLUDE_PATH and LD_LIBRARY_PATH  @alexge233

libcaffe2.so and libcaffe2_gpu.so exists in /home/beiqi.qh/workplace/opt/anaconda2/lib. @alexge233

And what does the linker actually see?
Try echo $LD_LIBRARY_PATH and sudo ldconfig -p | grep 'libcaffe2*'

$echo $LD_LIBRARY_PATH
/home/beiqi.qh/workplace/opt/anaconda2/lib:/home/beiqi.qh/workplace/opt/lib:/home/beiqi.qh/workplace/cuda-8.0/lib64:

You still haven't told us if your library is ld loaded.

You still haven't told us if your library is ld loaded.

I don't understand what you mean, cause I'm not sudo user, I can't execute "sudo ldconfig -p | grep libcaffe*"

In that case it means you're not pointing the linker to the right directory. You say it is /home/beiqi.qh/workplace/opt/anaconda2/lib and you point LDFLAGS there, so I suggest you try changing the order of the llibraries. I know it's weird but it is actually a problem with LDFLAGS.
Try with libcaffe in a different order because the linker is telling us those symbols don't exist.
Also, try to verify this library has those methods:
nm -D /home/beiqi.qh/workplace/opt/anaconda2/lib/libcaffe2.so | grep "gTypeNames"
nm -D /home/beiqi.qh/workplace/opt/anaconda2/lib/libcaffe2.so | grep "EnforceNotMet"

The gTypeNames does not seem to be part of caffe2 so I am guessing you need to rearrange the order of protobuf and glog amongst others. Chances are you need first caffe then the libraries it depends on.

I try so many times as you said, but failed. could you teach me how to write correct Makefile. @alexge233

/tmp/ccyoghYP.o: In function caffe2::run()': /home/beiqi.qh/workplace/test/test.cpp:25: undefined reference to caffe2::Workspace::CreateBlob(std::string const&)'
/home/beiqi.qh/workplace/test/test.cpp:26: undefined reference to `caffe2::Workspace::GetBlob(std::string const&)'


text:
Add offsets to commands

cleanup duplicate code in commands
make global access with Java easier with common parent classes
all commands should have their startOffset and endOffset so that replication can properly continue

Hey @leonchen83!
I needed access to startOffset and endOffset for commands, so I made some changes to apply that to your code.
I'm really looking forward to your feedback!
Best,
René

Coverage increased (+1.05%) to 73.131% when pulling 7b392906455cc63b507c23ba7140ef4e3aed43c4 on rk3rn3r:add_offsets into 1af1bdb5b3b4f326b9396835d0d2e9a51706173d on leonchen83:master.

@rk3rn3r
GenericKeyValueCommandand GenericKeyCommand are really good idea.
GenericCommand with startOffsetandendOffsetneed further considered. I will change the related code about startOffsetandendOffsetinoffset` branch. if done, please help review code.

Thank you! Sure, I will review once you are ready!

There are some more commands that could use some adjusting to aggregate some duplicate code. I just did it for key[] and byte[] and for introducing offsets.

@rk3rn3r
hi I submit a commit about command offset.
after this commit. we can get all Event's offset. not only Command offset. and get the offset when reading aof file and rdb file.
usage as following

AbstractEvent e = (AbstractEvent)event;
Tuple2<Long, Long> tuple = e.getContext().getOffsets();

That's pretty awesome.
Thank you so much! <3

we need some time to test above commit(manual test, integration test, add new test case and etc).
after about 2 weeks, we can release v3.3.0


text:
add some actionable opinions about linting

project-specific lint preferences file. run with pylint garak.
resolves #11
(point three)

Consider adding an action that validates lint is passing for PRs as part of this branch.

authors: jmartin-tech leondz

repo: leondz/garak


text:
Version bump to 1.4.0

Prepare to publish the new changes since 1.3.3:

Improved pen precision (and correct default color)
touching edge and if on edge, bounce support
when timer greater than support
loudness and when loudness greater than support
Fixed bug with "when this sprite/stage clicked"

After merging this, @adroitwhiz would you please create a new release on Github? I want to make sure collaborators can publish new versions of the package without my involvement.

Thank you! Package appears to be published successfully. 🎉

repo: leopard-js/leopard


text:
Implemented a Go command line tool for installer.to

Context
Implemented a Go command line tool to perform installer.to task of installing essential tools.
File Directory structure
installer.to/
│
│
└─── go_CLI_client/
    │
    └─────src/
        │   main.go
    │
    └─────build/
        │   installer.to

Usage

We can build an executable from /go_CLI_client/src/main.go

go build -o installer.to main.go

We can use the pre-built version from go_CLI_client/build/installer.to
This command line tool takes a single argument as the name of the tool.
We can use this as simply as

./installer.to git

installs git instantly on linux machine.
Realted Issue [A new feature]
https://github.com/leopardslab/installer.to/issues/19

@agentmilindu Please review this!

@PratikDhanave @rajikaimal Please review this PR 😃


text:
Research into the usage of Docusaurus

Description:

Learn about Docusaurus and how it works
Pros and cons for using it in our project to generate docs

Outcome:

A detailed breakdown of the above-mentioned points which need to be explained during weekly standup
A POC that can show the usage of Docusaurus

As the research work on this is done I will be closing this ticket. The implementation will be covered in a new ticket.

authors: agentmilindu niloysikdar

repo: leopardslab/react-email


text:
Laravel 11.x Compatibility

This is an automated pull request from Shift to update your package code and dependencies to be compatible with Laravel 11.x.
Before merging, you need to:

Checkout the l11-compatibility branch
Review all comments for additional changes
Thoroughly test your package

If you do find an issue, please report it by commenting on this PR to help improve future automation.

:warning: The latest version of Laravel has a dependency for phpunit/phpunit of ^10.5. If you would like to also upgrade your tests, you may run the PHPUnit 10 Shift for free.

:warning: Shift detected GitHub Actions which run jobs using a version matrix. Shift attempted to update your configuration for Laravel 11. However, you should review these changes to ensure the desired combination of versions are built for your package.

:x: Laravel 11 has removed its dependency on doctrine/dbal. As such, all of Laravel's classes, methods, and configuration related Doctrine DBAL have been removed.
Shift detected potential uses of these within the following files. You should review these instances and, if they are still needed, reference the Upgrade Guide for native alternatives.

[ ] src/Generators/ModelGenerator.php
[ ] src/Generators/RequestGenerator.php

:alembic: Using this package? If you would like to help test these changes or believe them to be compatible, you may update your project to reference this branch.
To do so, temporarily add Shift's fork to the repositories property of your composer.json:
{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/laravel-shift/laravel-typescript.git"
        }
    ]
}

Then update your dependency constraint to reference this branch:
{
    "require": {
        "based/laravel-typescript": "dev-l11-compatibility",
    }
}

Finally, run: composer update

repo: lepikhinb/laravel-typescript