fix compilation on Solaris

NAME_MAX is not defined on POSIXly systems. readlink() can return full path in handle_symlink so using maximum component length is not correct and NAME_MAX is not needed in do_dir().

fixed, thanks!

@richsalz this seems to have caused all kinds of failures that were not present before.
FWIW I can reproduce the gcc failures locally (haven't tried clang yet).

The problem being the fact that buflen is not updated and is then passed to sprintf(), which fails because the resulting string would obviously be longer than strlen(dirname).

A quick and dirty fix would be something like the followin:
diff --git a/apps/rehash.c b/apps/rehash.c
index dbaea10..ce037ba 100644
--- a/apps/rehash.c
+++ b/apps/rehash.c
@@ -319,7 +319,8 @@ static int do_dir(const char *dirname, enum Hash h)
     }
     buflen = strlen(dirname);
     pathsep = (buflen && dirname[buflen - 1] == '/') ? "" : "/";
-    buf = app_malloc(PATH_MAX, "filename buffer");
+    buflen += 255 + 2; /* NAME_MAX = 255 */
+    buf = app_malloc(buflen, "filename buffer");

     if (verbose)
         BIO_printf(bio_out, "Doing %s\n", dirname);

which restores the previous behaviour without using NAME_MAX.

Alternatively just set buflen to PATH_MAX (and waste some more memory):
diff --git a/apps/rehash.c b/apps/rehash.c
index dbaea10..2f956c3 100644
--- a/apps/rehash.c
+++ b/apps/rehash.c
@@ -319,6 +319,7 @@ static int do_dir(const char *dirname, enum Hash h)
     }
     buflen = strlen(dirname);
     pathsep = (buflen && dirname[buflen - 1] == '/') ? "" : "/";
+    buflen = PATH_MAX;
     buf = app_malloc(PATH_MAX, "filename buffer");

     if (verbose)

the first change seems better; thanks, working through the process.

We did a variant of your initial fix (the += one)  Thanks!!


Incrementally serializing structs into an existing file

Hi, is there a way to serialize a struct into a file that already contains a list of such structs? For example, say we first serialize a Vec<f32> into file f. Can we append another Vec<f32> to f afterwards through serialization? If we know the first vector N1 bytes and the second has N2 bytes, would it be valid to deserialize these two vectors from f by providing the offsets? Thanks

Hi @Rustinante, this is supported but I am sorry that no one was able to provide help here. If this is still an issue, you could try taking this question to any of the resources shown in https://github.com/serde-rs/serde#getting-help.


Gracefully handle unreadable gitignore files

E.g.
Error: EACCES: permission denied, open '$HOME/dev/my-app/.gitignore'

If a .gitignore cannot be read it will be skipped.

:tada: This PR is included in version 0.49.1 :tada:
The release is available on:

v0.49.1
GitHub release

Your semantic-release bot :package::rocket:


Feat: ToggleRoot component (2/3)

Description

[x] Refactor code to match  style
[x] Props
[x] Data Attributes (on/off)
[x] Data - Disabled

Implementation

Root
Props

[x]  asChild boolean
[x]  defaultPressed boolean -
[x]  pressed boolean -
[x]  @update:pressed function -
[x]  disabled boolean false

Data Attributes

[x]  [data-state] "on"|"off"
[x]  [data-disabled] present when disabled

Related Issue
https://github.com/radix-vue/radix-vue/issues/146

@zernonia, @khairulhaaziq - I think I'm done 😄


[Feature Request]: Add tilt effects on contact form images.

Is there an existing issue for this?

[X] I have searched the existing issues

Feature Description

In this contact form there is img in that container i will add tilt effects on that images.
Use Case
Better UI
Benefits
User expereience.
Add ScreenShots
NA
Priority
High
Record

[X] I have read the Contributing Guidelines
[X] I'm a GSSOC'24 contributor
[X] I have starred the repository

@VaibhavArora314 Please assign me this task !


place text on the border

To prevent long text not displaying it could be nice if there is an option to place the text in the border of the chart.

Ok, I'll try this when I have time.

this feature has added in v0.3.0. you can try it.

thank you very much ! It works like a charme.


Missing release tag for 0.3.2

Readme states that version 0.3.2 has been released,  but clicking on the release link takes to 404 page.  Also there is no 0.3.2 release on the release tab.

Thanks, it's fixed now.


29th and 30th expeditious (and maybe slaughter) bracelet charges dont decrease slayer kill count

This didn't update the kills left counter.

Also this:

I will work on this. I think I know why this was happening.


Activity log design going ¯_(ツ)_/¯

The activity log is acting wonky. Don't think this how Mollie designed it.

uhhhh pretty sure it is?
Just kidding, I can't write CSS worth anything so I bet I jacked this up at some point. Probably this ticket is removing the oval taking up the row body, which may or may not be as simple as swapping out a class somewhere. I'd look in the events helper in particular, which I think does a lot of lifting to render this.

@tingaloo after reviewing some of the designs it kinda looks like there was never a gray box around it, so idk what I was thinking. Maybe let's just ditch it? Not sure it really serves our needs here, and we're short on designers to whip us into shape.


Add connection as first-class construct in meltano.yml

Migrated from GitLab: https://gitlab.com/meltano/meltano/-/issues/3353
Originally created by @kgpayne on 2022-03-28 16:40:45

Problem to solve
As a user of Meltano, I would like a place in meltano.yml to specify Connection config objects that can be referenced and reused in all of the plugins I add to my Meltano Project.
Target audience
Engineers/developers using Meltano with tools that themselves have native constructs for connections, such as dbt, Airflow, Great Expectations and Superset.
Further details
Connections are a ubiquitous construct across the tools of the data platform, and yet in Meltano these details must still be expressed individually for each plugin as plain config or environment variables. This is not only extra work for users of Meltano, it also adds unnecessary human action in the integration path between plugins accessing the same resources (databases, warehouses, SaaS endpoints etc.).
For example, in the case of Snowflake:

Official Snowflake Python Connector parameters (used under the hood by many python-based tools)
Airflow Snowflake Connection
dbt Snowflake Profile
Superset Snowflake Datasource connection string
Great Expectations Datasource connection string

From the above it is clear that configuration is commonly expressed in two forms, with tools supporting either or both formats (examples from Airflows connection docs):

yaml/json:
snowflake_example_connection:
  conn_type: snowflake
  login: user
  password: password
  host: snowflake.example
  schema: db-schema
  extra:
    account: account
    database: snow-db
    region: us-east
    warehouse: snow-warehouse

URI
snowflake://user:password@snowflake.example/db-schema?account=account&database=snow-db&region=us-east&warehouse=snow-warehouse

Whilst it is common for tools to support the specification of a 'default' connection, the richness of User/Role/Group functionalities in databases and warehouses for controlling access and for cost management (e.g. monitoring Snowflake credit consumption based on per-tool or per-pipeline User/Role definitions) mean that most tools will define or consume several connections based on the execution context. This means a single Project will typically have many more connection definitions than base warehouse and database resources.
Interestingly we already handle connections via a ConnectionService in meltano.core (for use in the older Model functionality), however (as noted in the comments) this has too detailed an understanding of the expected format of each connection type.
Proposal
Expected outcomes:

Allow users to specify and manage connection information via the CLI (including a default connection per type), without the need to explicitly reference that information when adding new compatible plugins.
Allow users to specify a named connection on a per-plugin and per-run basis, or override individual settings from the default connection.

To achieve these two outcomes, we could:

Support connection definitions in discovery.yml.

# discovery.yaml
connections:
  - name: snowflake
    variant: meltano # for cases where there really is a wide variety in ways to configure a particular system, multiple variants could possibly be used?
    dialect: snowflake # as already exists for loaders https://gitlab.com/meltano/meltano/-/blob/master/schema/meltano.schema.json#L421
    settings:
      # supporting all the values listed in the Snowflake docs,
      # with descriptions and kinds (omitted for brevity)
      # https://docs.snowflake.com/en/user-guide/python-connector-api.html#connect
      - name: user
      - name: password
      - name: host
      - name: port
      - name: database
      - name: account
      - name: warehouse
      ...
  - name: postgres
    variant: meltano
    dialect: postgres
    settings:
      # supporting all the values listed in the Postgres/sqlalchemy docs,
      # with descriptions and kinds (omitted for brevity)
      - name: user
      - name: password
      - name: host
      - name: port
      - name: database

Support configuration of connections, including a default per connection dialect. The default could be implied I guess, in cases with only one connection?

# meltano.yml
version: 1
plugins:
  connections:
  - name: postgres
    default: true
    config:
      user: meltano
      password: ${POSTGRES_MELTANO_PASSWORD}
      host: db.example.com
      port: 5432
      database: meltano

  - name: snowflake
    default: true
    config:
      user: "MELTANO"
      password: ${SNOWFLAKE_MELTANO_PASSWORD}
      host: snowflake.example
      account: account_name
      database: snow-db
      ...
  - name: snowflake-dbt
    inherits_from: snowflake
    config:
      user: "DBT"
      password: ${SNOWFLAKE_DBT_PASSWORD}
      # custom settings still supported as normal
      wacky_auth_setting: smoke_signals  # becomes CONNECTION_SNOWFLAKE_WACKY_AUTH_SETTING

  extractors:
  - name: tap-postgres

  loaders:
  - name: target-snowflake

  transformers:
  - name: dbt-snowflake

Support the injection of connection details, without requiring the user to specify them explicitly via refs, using either env_aliases, aliases or the default value field in discovery.yml with env var of the form CONNECTION_<dialect>_<setting name>. E.g.:

# discovery.yml
extractors:
  - name: tap-postgres
    label: PostgreSQL
    description: PostgreSQL database extractor
    namespace: tap_postgres
    variants:
    - name: transferwise
      docs: https://hub.meltano.com/extractors/postgres.html
      repo: https://github.com/transferwise/pipelinewise-tap-postgres
      pip_url: pipelinewise-tap-postgres
      capabilities:
        - catalog
        - discover
        - state
      settings_group_validation:
        - ['host', 'port', 'user', 'password', 'dbname']
      settings:
        - name: host
          value: localhost
          description: PostgreSQL host
          env_aliases: [CONNECTION_POSTGRES_HOST]
        - name: port
          kind: integer
          value: 5432
          description: PostgreSQL port
          env_aliases: [CONNECTION_POSTGRES_PORT]
        - name: user
          description: PostgreSQL user
          env_aliases: [CONNECTION_POSTGRES_USER]
        - name: password
          kind: password
          description: PostgreSQL password
          env_aliases: [CONNECTION_POSTGRES_PASSWORD]
        - name: dbname
          description: PostgreSQL database name
          env_aliases: [CONNECTION_POSTGRES_DATABASE]
        ...

loaders:
  - name: target-snowflake
    label: Snowflake
    description: Snowflake database loader
    namespace: target_snowflake
    dialect: snowflake  # I did not know this already existed 😅
    target_schema: $TARGET_SNOWFLAKE_SCHEMA
    variants:
      - name: transferwise
        docs: https://hub.meltano.com/loaders/snowflake.html
        repo: https://github.com/transferwise/pipelinewise-target-snowflake
        pip_url: pipelinewise-target-snowflake
        settings_group_validation:
          - ['account', 'dbname', 'user', 'password', 'warehouse', 'file_format', 'default_target_schema']
        settings:
          - name: account
            label: Account
            # previous values left for backwards compatibility
            env_aliases: [SF_ACCOUNT, CONNECTION_SNOWFLAKE_ACCOUNT]
            description: Snowflake account name (i.e. rtXXXXX.eu-central-1)
            placeholder: E.g. rtXXXXX.eu-central-1
          - name: dbname
            label: DB Name
            aliases: [database]
            # previous values left for backwards compatibility
            env_aliases: [TARGET_SNOWFLAKE_DATABASE, SF_DATABASE, CONNECTION_SNOWFLAKE_DATABASE]
            description: Snowflake Database name]
          ...

# dbt profiles
config-version: 2
version: 2
config:
  send_anonymous_usage_stats: True
  use_colors: True
meltano:
  target: snowflake
  outputs:
    snowflake:
      type: snowflake
      threads: 4
      account: "{{ env_var('CONNECTION_SNOWFLAKE_ACCOUNT') }}"
      user: "{{ env_var('CONNECTION_SNOWFLAKE_USER') }}"
      password: "{{ env_var('CONNECTION_SNOWFLAKE_PASSWORD') }}"
      role: "{{ env_var('CONNECTION_SNOWFLAKE_ROLE') }}"
      database: "{{ env_var('CONNECTION_SNOWFLAKE_DATABASE') }}"
      warehouse: "{{ env_var('CONNECTION_SNOWFLAKE_WAREHOUSE') }}"
      schema: "DEFAULT"

Support the selection of a named connection at the plugin level, or at run time. I think the easiest way to control which connection populates the CONNECTION_* for each plugins Context is using plugin extras:

# meltano.yml
environments:
- name: dev
  config:
    plugins:
      transformers:
      - name: dbt-snowflake
        config:
          ...
        # new `connection` plugin extra
        connection_name: snowflake-dbt # this uses the `snowflake-dbt` connection from 2. above to populate the `CONNECTION_SNOWFLAKE_*` env vars for this plugin in this environment

Plugin extras can also be set at runtime using environment variables (as per the docs):
TARGET_SNOWFLAKE__CONNECTION_NAME=snowflake-dbt meltano run tap-gitlab target-snowflake dbt-snowflake:run
Also users can always revert back to configuring the individual settings manually in the plugin config or via an environment:
# meltano.yml
environments:
- name: dev
  config:
    plugins:
      loaders:
      - name: target-snowflake
        config:
          user: "MY_CUSTOM_USER" # overrides CONNECTION_SNOWFLAKE_USER from the default connection in this environment

What does success look like, and how can we measure that?

New users of Meltano are able to get started quickly by specifying default connections once (during onboarding) knowing that any compatible plugins added thereafter will reuse those connections.
Power users retain fine-grained control over which connections are used by which plugin per environment or at runtime.

e.g. TAP_GITLAB__CONNECTION_NAME=gitlab_dev TARGET_SNOWFLAKE__CONNECTION_NAME=snowflake_ken DBT__CONNECTION_NAME=snowflake_ken meltano run tap-gitlab target-snowflake dbt:run (not particularly pretty, but the env vars could also go in a --environment).

Mapping of Meltano Connection to plugin-specific setting values is part of the plugin definition, stored as part of discovery.yml.
Plugins without connection support still work with existing settings and environment variables, 'as-is'.

Reasons Not to Build

Not particularly DRY; many connections will reference the same warehouse or database with different User/Group/Role. This might be solved with connection inheritance or resource referencing in future iterations. Connections expressed as plugins immediately support inheritance, solving the DRY issue.

Regression test
(Ensure the feature doesn't cause any regressions)

[ ] Write adequate test cases and submit test results
[ ] Test results should be reviewed by a person from the team

Links / references

View 11 previous comments from the original issue on GitLab


Set requests and limits to keep resource utilization bounded by default.

Forgive my Kubernetes ignorance, but what is the motivation for this change? Happy to talk offline.
My loadtest shows 1 CPU core and 0.16GB RAM every 10000 points. Unfortunately, I don't know how many points (per second) a typical Prometheus deployment scrapes, but your numbers seem very low. Would it be safe to size it for a 4CPU VM?

@bmoyles0117 Is there a need to keep this open?

This is a constraint around the Stackdriver Container Monitoring
experience, as it doesn't display pods / containers without requests /
limits. In all honesty, it's more likely something to be resolved in the
UI, than here, closing this out.
On Fri, Jul 13, 2018 at 11:06 AM Javier Kohen<EMAIL_ADDRESS>wrote:

@bmoyles0117 https://github.com/bmoyles0117 Is there a need to keep
this open?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Stackdriver/stackdriver-prometheus/pull/4#issuecomment-404861071,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAQKcLOBGZyRF8FlfHqhlTWiDrvk-pP6ks5uGLdsgaJpZM4Ts9TO
.

I wasn't aware of that restriction, but fixing the Stackdriver UI makes sense. Thanks for the explanation!


python3Packages.shellingham: 1.3.2 -> 1.4.0

Motivation for this change
Update to latest upstream release 1.4.0
Change log: https://github.com/sarugaku/shellingham/blob/master/CHANGELOG.rst

Enable tests

Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

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

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
21.11 Release Notes (or backporting 21.05 Relase notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

This is a semi-automatic executed nixpkgs-review with nixpkgs-review-checks extension. It is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch).
Result of nixpkgs-review pr 129628 run on x86_64-linux 1

21 packages failed to build and already failed to build on hydra master:

esphome: log was empty
lexicon: log was empty
markdown-anki-decks: log was empty
platformio: log was empty
python38Packages.authcaptureproxy: log was empty
python38Packages.gradient: log was empty
python38Packages.pathy: log was empty
python38Packages.spacy: log was empty
python38Packages.spacy-transformers: log was empty
staticjinja: log was empty
python38Packages.teslajsonpy: log was empty
python38Packages.textacy: log was empty
python38Packages.toggl-cli: log was empty
python38Packages.tvdb_api: log was empty
python38Packages.typer: log was empty
python39Packages.authcaptureproxy: log was empty
python39Packages.gradient: log was empty
python39Packages.staticjinja: log was empty
python39Packages.teslajsonpy: log was empty
python39Packages.tvdb_api: log was empty
python39Packages.typer: log was empty

1 package failed to build and are new build failure:

(python38Packages.staticjinja): log was empty

46 packages built:

cmake-language-server
cryptop
doitlive
home-assistant
jrnl
python38Packages.aioeafm
python38Packages.aiomodernforms
python38Packages.aria2p
python38Packages.backoff
python38Packages.censys
python38Packages.click-completion
python38Packages.hypothesis-auto
python38Packages.myjwt
python38Packages.poetry
python38Packages.pyairnow
python38Packages.pysnow
python38Packages.pysychonaut
python38Packages.python-miio
python38Packages.questionary
python38Packages.requests-cache
python38Packages.shellingham
python38Packages.toonapi
python38Packages.url-normalize
python38Packages.wled
python38Packages.yalesmartalarmclient
python39Packages.aioeafm
python39Packages.aiomodernforms
python39Packages.backoff
python39Packages.censys
python39Packages.click-completion
python39Packages.hypothesis-auto
python39Packages.myjwt
python39Packages.poetry
python39Packages.pyairnow
python39Packages.pysnow
python39Packages.pysychonaut
python39Packages.python-miio
python39Packages.questionary
python39Packages.requests-cache
python39Packages.shellingham
python39Packages.toonapi
python39Packages.url-normalize
python39Packages.wled
python39Packages.yalesmartalarmclient
theharvester
tvnamer


[mgmt] datadog release

https://github.com/Azure/sdk-release-request/issues/4609

API change check
APIView has identified API level changes in this PR and created following API reviews.
azure-arm-datadog


Identify whether the cell is blank or 0 in formula

Hi Team,
I want to use formula on cell B2 in such a way that if A2 is blank then B2 should also show blank and if A2 is 0 the it should show 0 otherwise it should show A2/2. Currently it is not differentiating between 0 and blank while using formulas.

Hi,
Did you have try with formula : ISBLANK(A1) ?

I tried that but it is giving an error. Below is the link for the jsfiddle
https://jsfiddle.net/ncqor65z/

It’s Pro version, can you open ticket directly on github pro version ?
http://github.com/jspreadsheet/pro
@hodeware Error on V8 Pro 😉

Okay. Thank you

There are a new release coming soon for the Formulas Pro which will bring several improviments, including differences null/zero.
Approx. 3 weeks.


Compatibility with Turborepo

Hi,
I tried to use with Turborepo, but icons did not appear on the website.
Additionally, I use turborepo with npm workspace.
I think, it cannot find the icon package from node_modules so the problem is caused by this reason.
Or am I wrong? Am I doing something wrong?

Can you provide a minimal reproduction?

Can you provide a minimal reproduction?

Hi, My problem has solved. The problem was about with css file. I was importing my tailwind css file from the outside package. Then I added one more time global css to the web app. It worked successfully.

Glad to hear it, closing this issue as it's resolved


[CI] Create lighting-terminal PR CI job which persistently updates litd's tapd dependency to main HEAD

Motivation:

When changes to tapd occur, in order to fully conclude the ramifications of the PR, testing must occur in litd CI pipeline.
There have been instances of tapd PRs been merged, but testing coverage could have been more comprehensive.
By creating these perpetually updating tapd dependency PRs, the cross-daemon CI process will be less fault prone

Implementation ideas:
An update notification method
entr
Github Actions
Time-based cron job
Should Update
the tapd module dependency to

origin/main HEAD
or be extensible to set a development branch (for future releases where engineers want to refrain from merging into main)

(also - i'd say this is something that needs to happen on the taproot-assets github actions side since there you can subscribe to actions from the tap repo)

Do you only want things to run on merge to master or do you want things to run when a new PR is opened?

ah yeah probably most appropriate for the checks to run during PR


Disambiguated the purpose of refs docs for contributors.

In writing documentation it's mentioned that:

[reference guides] describe the functioning of Django’s internal machinery and instruct in its use.

This is not quite accurate as the reference docs describe the public API and only include descriptions
of internal machinery when necessary. When tickets like 27617 and 24989 gets addressed, then
maybe those will describe "the functioning of Django's internal machinery," but presumably their
work will also live somewhere in docs/internals.
I also removed a similar use of "internal" in the "how-to" section below that.

Closing as per recommendation.


Show aktive talking QSO OM

Hey Kim,
is it possible to add aktive talking OM (red overlay) in the menu "in QSO" like it is in last heard if a OM is talking?
Best
Tim

Will see, if I can do this when having spare time - but actually not terminated to a deadline, sorry.
Kim


Batching DNS changes

Which version of python are you using?
3.6.3
What operating system and version of operating system are you uing?
Running in Lambda
What version of sewer are you using?
0.5.1
What did you do? (be as detailed as you can)
I made a request for a SAN certificate for *.domain.com and SAN domain.com
What did you expect to see/happen/not happen?
A SAN cert would get issued for *.example.com and example.com, using route53 efficiently.
What did you actually see/happen?
I can make this work using route53, but the problem is that I have to make multiple modifications to my TXT entry, since Route53 treats TXT entries as a single DNS entry with multiple values (ie. on every request to create_dns_entry, I have to check if the record exists, and if so, append another TXT value to it. Then during deletion, I have to query for the entire DNS record so I can properly delete it).
It would be really helpful if DNS providers for sewer could either:
a) be handed all the DNS changes at once so they can optimize how they create entries or
b) receive a function call when all DNS changes that sewer determines need to be made have been sent to it via create_dns_record

Hi,
First; thanks for using sewer and I'm glad to hear it seems to work for you. It's interesting that you are using it in AWS lambda no less.
What you are asking for sounds easy to do - off the top of my head- .
We would just need to move this line from inside the loop;
https://github.com/komuw/sewer/blob/b0f54f4de7addf037771e1590b64a5d71fdce3c4/sewer/client.py#L660
However, I cant think of a way -again off the top of my head- to implement it in a backward compatible manner. This is because the method,  create_dns_record; https://github.com/komuw/sewer/blob/b0f54f4de7addf037771e1590b64a5d71fdce3c4/sewer/dns_providers/common.py#L30  expects one domain name for every invocation and if we change it to accept more, it will be backward incompatible .
I'll mull on this for sometime. I'm happy to hear suggestions.

or maybe if we used asyncio, we could race requests; i dont know

Batching of challenges first landed in #178 in the new ProviderBase class in auth.py.  A still not quite final version is in release 0.8.2, and further refinement in the work that's been seeping into master since the release.
Of course the batching can't do anything immediately for the legacy DNS classes, but there's now an interface to migrate them to that can take advantage of  batching.  I think that addresses as much of this bug as I can - services that don't admit that there may be multiple occurrences of a record type for a single identity are...  Well, we can always hope it's just their API that comes up so short, and that they fix it.


test failure

Hi Pishen,
When compiling the package locally running sbt test results in an unresolved dependency error.
[error] (*:update) sbt.ResolveException: unresolved dependency: com.github.pathikrit#better-files_2.10;2.16.0: not found
I tried using better-files 2.14.0 but compilation still failed. I'm using scala version 2.10.4.
Any help would be appreciated.
Tim

Is the error like this?
[error] .../annoy4s/src/main/scala/annoy4s/Annoy.scala:88: value printLines is not a member of better.files.File
[error]       (File(outputDir) / "ids").printLines(inputLines.map(_.split(" ").head))
[error]                                 ^
[error] .../annoy4s/src/main/scala/annoy4s/Annoy.scala:111: value lineIterator is not a member of better.files.File
[error]     val idToIndex = ids.lineIterator.toSeq.map(_.toInt).zipWithIndex.toMap
[error]                         ^
[error] .../annoy4s/src/main/scala/annoy4s/Annoy.scala:112: value lineIterator is not a member of better.files.File
[error]     val indexToId = ids.lineIterator.toSeq.map(_.toInt)
[error]                         ^
[error] three errors found

Seems that I used some functions that's only available in better-files 2.16.0. We may ask @pathikrit to provide a Scala 2.10 version for better-files 2.16.0, or see if we can avoid using these functions.

@TimSchmeier I've committed a branch for Scala 2.10, could you try this one to see if there's any problem?
https://github.com/pishen/annoy4s/tree/scala_2.10

The new branch still fails during sbt test. The previous error was like I posted, I did not see the 3 errors you posted. I logged the stdout and attached it below.
test_log.txt

@TimSchmeier Which Java version did you use? better-files requires Java 8 to function properly.

That was it, updating my java and using the scala_2.10 branch addresses the issue. Thank you for the help.


Input fields do not show any animations

Thinking I have to have something wrong here.   What should I check to see if I'm loading the right things?  Here's my HTML for the fields.

                        First Name
                        <input type="FirstName" class="form-control">

The field shows fine but clicking on it gives no transitions or animations.

Doh.  Sorry, fixed the obvious type "typo".  Here is the new code (that still doesnt' work)
        <form id="member_form">

                        First Name
                        <input type="text" id="FirstName" name="FirstName" class="form-control">

                        Last Name
                        <input type="text" id="LastName" name="LastName" class="form-control">

        </form>

gah.  Nevermind.   User error.  Sorry for the noise.


Guessing the random number project

Developer Checklist

[✅] Followed guidelines mentioned in the readme file.
[✅] Followed directory structure. (e.g. ProjectName/{USERNAME}/...yourfiles)
[✅] Starred ⭐ the Repo (Optional)

Summary
Guess It - The Random Number Guesser project in JavaScript is an interactive web application that challenges users to guess a randomly generated number within a specified range. It provides an engaging way to learn and practice JavaScript programming while creating a fun user experience.
Screenshot

Live Project Link
https://vinay-s36.github.io/Guess-It/

@PBJI i have made all the necessary changes i was told
added files in the same structure i was asked and added READme.md with instructions of how to run the project with screenshots of the peoject
Let me know if there are any changes required


Remove ActiveX Warning Popup for rdpcheck

No more ActiveX Warning popup for the RDPCheck utility

Freshly compiled with the Pull Request changes
RDPCheck.zip

Thanks @JD10NN3, works perfectly.

I need something more like RDPConf, but from the command line.  RDPCheck, for whatever reason, requires Network Level Authenication (??), where RDPConf does not.  Regardless, even the new build of RDPCheck wants to "check" by pulling up an RDP session.  I just need to know of RDPWrapper is working or not (noting that it fails to work until the ini is updated after some Windows updates).


Updates to increase nonce entropy

What about this library https://github.com/nastyox/Rando.js ?

We have already enough entropy.

We have already enough entropy.


Unable to build but develop works fine

I am unable to get the build to work properly. Local develop bundle exec middleman server work just fine. When I run bundle exec middleman build --clean I am seeing this:
       error  build/stylesheets/print.css
       error  build/stylesheets/screen.css
   identical  build/images/navbar.png
   identical  build/images/logo.png
       error  build/fonts/slate.svg
   identical  build/fonts/slate.woff
   identical  build/fonts/slate.woff2
   identical  build/fonts/slate.ttf
   identical  build/fonts/slate.eot
       error  build/javascripts/all.js
       error  build/javascripts/all_nosearch.js
       error  build/index.html
   There were errors during this build, re-run with `middleman build --verbose` to see the full exception.

I run it with --verbose and the error messages are as such:
    == Request: /index.html
    == Finishing Request: index.html (0.02s)
            error  build/index.html
    undefined method `try' for "text/html; charset=utf-8":String
    Did you mean?  tr
                   tr!
    /Users/me/.rvm/gems/ruby-2.3.1/gems/middleman-core-4.0.0/lib/middleman-core/extensions/minify_javascript.rb:54:in `call'
    /Users/me/.rvm/gems/ruby-2.3.1/gems/middleman-core-4.0.0/lib/middleman-core/extensions/minify_css.rb:60:in `call'
    /Users/me/.rvm/gems/ruby-2.3.1/gems/middleman-core-4.0.0/lib/middleman-core/middleware/inline_url_rewriter.rb:40:in `call'
    /Users/me/.rvm/gems/ruby-2.3.1/gems/middleman-autoprefixer-2.7.0/lib/middleman-autoprefixer/extension.rb:48:in `call'
    /Users/me/.rvm/gems/ruby-2.3.1/gems/rack-1.6.4/lib/rack/head.rb:13:in `call'
    /Users/me/.rvm/gems/ruby-2.3.1/gems/rack-1.6.4/lib/rack/lint.rb:49:in `_call'
    /Users/me/.rvm/gems/ruby-2.3.1/gems/rack-1.6.4/lib/rack/lint.rb:37:in `call'
    /Users/me/.rvm/gems/ruby-2.3.1/gems/rack-1.6.4/lib/rack/builder.rb:153:in `call'
    /Users/me/.rvm/gems/ruby-2.3.1/gems/rack-1.6.4/lib/rack/mock.rb:74:in `request'
    /Users/me/.rvm/gems/ruby-2.3.1/gems/rack-1.6.4/lib/rack/mock.rb:56:in `get'
    /Users/me/.rvm/gems/ruby-2.3.1/gems/middleman-core-4.0.0/lib/middleman-core/builder.rb:165:in `output_resource'
    /Users/me/.rvm/gems/ruby-2.3.1/gems/middleman-core-4.0.0/lib/middleman-core/builder.rb:95:in `each'
    /Users/me/.rvm/gems/ruby-2.3.1/gems/middleman-core-4.0.0/lib/middleman-core/builder.rb:95:in `output_files'
    /Users/me/.rvm/gems/ruby-2.3.1/gems/middleman-core-4.0.0/lib/middleman-core/builder.rb:59:in `run!'
    /Users/me/.rvm/gems/ruby-2.3.1/gems/middleman-cli-4.0.0/lib/middleman-cli/build.rb:65:in `build'
    /Users/me/.rvm/gems/ruby-2.3.1/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
    /Users/me/.rvm/gems/ruby-2.3.1/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    /Users/me/.rvm/gems/ruby-2.3.1/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `block in invoke_all'
    /Users/me/.rvm/gems/ruby-2.3.1/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `each'
    /Users/me/.rvm/gems/ruby-2.3.1/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `map'
    /Users/me/.rvm/gems/ruby-2.3.1/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `invoke_all'
    /Users/me/.rvm/gems/ruby-2.3.1/gems/thor-0.19.1/lib/thor/group.rb:232:in `dispatch'
    /Users/me/.rvm/gems/ruby-2.3.1/gems/thor-0.19.1/lib/thor/invocation.rb:115:in `invoke'
    /Users/me/.rvm/gems/ruby-2.3.1/gems/thor-0.19.1/lib/thor.rb:40:in `block in register'
    /Users/me/.rvm/gems/ruby-2.3.1/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
    /Users/me/.rvm/gems/ruby-2.3.1/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    /Users/me/.rvm/gems/ruby-2.3.1/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
    /Users/me/.rvm/gems/ruby-2.3.1/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
    /Users/me/.rvm/gems/ruby-2.3.1/gems/middleman-cli-4.0.0/bin/middleman:23:in `<top (required)>'
    /Users/me/.rvm/gems/ruby-2.3.1/bin/middleman:22:in `load'
    /Users/me/.rvm/gems/ruby-2.3.1/bin/middleman:22:in `<main>'
    /Users/me/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `eval'
    /Users/me/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `<main>'
    There were errors during this build

macOS Sierra
Version 10.12.1
    ruby -v
    ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin16]

Thanks!

Looks like it was an issue with middleman (https://github.com/middleman/middleman/issues/1915) that has since been fixed. The problem should be fixed in our dev branch?


Hydrate from various non-native data types

Now that hydrateFrom() has landed, the next step is to add a system for users to register Decoders that allow for hydrating and appending from any kind of non-native datatype.
This would also mean a JsonDecoder and probably a YamlDecoder standard

Can you explain a bit more what you mean by the user's ability to register a decoder? What would be a simple example and the expected steps taken to do the registering?
Scott

So, this is what I was thinking:
$manager->hydrateFrom('json', $data'); // Works as it is
$manager->hydrateFrom(new XmlDecoder(), $data); // Uses supplied decoder to hydrate

So, if the user passes a string, it is checked against the built-in types (probably just json and yaml), but if they pass an object, it is checked against the interface DecoderInterface which offers a prepare($data) method and a decode($data) method. The implementation simply returns a php-array that can be hydrated or appended.
Btw, after I ran the code through scrutinizer, it showed me some code duplication in the new hydrateFrom() and appendFrom() methods, so I extracted all the validation and type checking to its own protected method that both of the above use. Take a look to see what I mean.

Ok. Got it.
Scott

I'd like to take this on, but make some changes to the way things work currently.

The method hydrateFrom() will be the only method to "hydrate" with. No appendFrom(). Appending should be  an option to the hydration.
So, the method signature will look like this.
public function hydrateFrom(TypeInterface $typeInterface, $data, $append = 'false');.
I build the yamlDecoder and jsonDecoder decoders and put them in a /decoders directory along with the interface.

On one change you made, changing the private methods to protected, why was this wanted or necessary? I'd like to understand, from a noob dev perspective. Doesn't that change make the interface to the manager less concise or watered down? I went looking for answers on the do's and don'ts of private and protected and came up with this article from Fabien Potencier, which I tend to agree with, although I don't have the experience to back up that agreement either. So, this is me, a learning dev trying to understand the motivation.
http://fabien.potencier.org/pragmatism-over-theory-protected-vs-private.html
Scott

It's not at all required, and there is a memory upside to using private and public over protected. The reason I prefer protected over private for something like this is because Manager should be extendable in every way, and if you extend a class, the private methods are not inherited. So, for libraries that are meant to be mixed into other libraries/applications, I like protected. For applications or modules I use private whenever I can because I know that if I need to extend it, I can change that pretty easily without throwing anyone else off.
I guess its more personal preference than anything, and I'm not about to go up against someone like fabien.
The changes to hydrate sound great. Thanks!

Thanks. I just wanted to be sure I wasn't doing something basically wrong. :+1:
Scott

I added an unfinished pull request, and discussed the interface usage in the hydrateFrom() shortly with another dev acquaintance of mine. He noted, why not just return the array data out of the decoders "upstream" of the data-manager? That way, we can use the reset() and add() methods directly. I guess my question is, do we really need to have a hydrate() method to begin with? I mean, theoretically, we could, for instance, just use Symfony's YAML component to deliver array's out of yaml and feed them into reset() or add(), couldn't we?
Scott

We could, and I like dropping hydrate, but the reason I wanted decoders was for loading external files. I want there to be an easy way to simply loadFromFile() and Manager to detect the format (based on file type) and pipe it through the correct decoder. This is more an intermediate step for that.
We could merge hydrate and append into reset and add. Simply add another argument for an optional decoder?

To clarify what I mean by loading files, see the new comment on #25.
That said, I think I'd like to keep hydrate separate from reset for now. We can revisit this before 1.0 when the api becomes stable.

So, the load() method needs to be a smart method for loading different config files. How about we just integrate Symfony's own config component?
https://github.com/symfony/Config
http://symfony.com/doc/current/components/config/resources.html

Config provides the infrastructure for loading configurations from different data sources and optionally monitoring these data sources for changes. There are additional tools for validating, normalizing and handling of defaults that can optionally be used to convert from different formats to arrays.

For each type of resource (YAML, XML, annotation, etc.) a loader must be defined. Each loader should implement LoaderInterface or extend the abstract FileLoader class, which allows for recursively importing other resources:

Sounds a lot like the wheel you want to fit onto the data manager cart.
:smile:
Scott

I agree they are solving a lot of the same problems, but Manager shouldn't have any other dependencies. Suggested is fine (life Finder or Decoders), but not hard dependencies.
The purposes of Manager (and what hopefully makes it distinct) are lightweight, composable, and simple. Symfony components are great, but are very complex and reliant on each other, and not composable.
Does that make sense?
Truthfully, the loading files is not much of a trick. The SPL will get a filetype without any dependencies.
Btw, I am a writer by trade, and I want to compliment your wordchoice "wheel you want to fit onto the Manager cart"

The method responsibilities (from my pov) would be:

load($file|$files, $append);: locates file, confirms existence, pulls mime type, loads file and passes to
hydrate($data, $decoder, $append): accepts native data, pipes it through correct decoder, and appends or resets the data to manager
and, of course, protected methods that split that work up into nicely testable units :smile:

All of the above (including YAML and JsonDecoders) are possible with the SPL and no external dependencies. I am a huge fan of Symfony components and use them in every project. It's just not the direction I want to take Manager specifically.

Does that make sense?

Sort of. I did see the file component, which the config component requires, is a bit of overkill for just a file importer.
Ok. I'll see what I can do.
I can't find any reasoning,  but if SPL has a yaml_parse function, why would anyone need Symfony's yaml component?
Scott

The symfony yaml package offers some advantages over native yaml_parse(), mostly loading and parsing files in one shot. It's also a nice abstraction that makes the api familiar across all of symfony. Symfony also provides better error messages.
And, I just realized, this function is not available in standard php distributions. That could be a problem :(
We may have to use symfony's yaml parser to decode and then suggest it in the composer file. That way, the user can install symfony yaml if they are using the yaml decoder?

This is like a really noob kind of question, but I found a small project, which is pretty close to what we need for the load() feature. However, you said, you didn't want dependencies.
https://github.com/caseyamcl/Configula
To avoid the dependency, I'd need to do a bit of "copy and paste" of the source code from that project. ( and doing that would be 1000x faster than me coding it all on my own, to be honest). What is the rule on that kind of ehem....."borrowing"? Could we just make a reference that the config file loading feature was based on that project in the docs to give credit? Or should we actually use the library, and go against the dependencies rule you've set? I am sort of for the former, as I do want to learn a little from this exercise.
It is MIT licensed. What to do?
Scott

Yeah, you can definitely use pieces of this to get started. Just remember that the configuration loading uses the ManagesItemsTrait methods, so be sure to use get(), set() etc when appropriate.
As far as credit, I really like to give credit where credit is due. For this, I give credit in the source code when something is borrowed, make a note in the CHANGELOG, and give a shoutout in the README under credits or special thanks.
In the source code:
/* Cycle through whatever */
foreach ($whatever as $whatever) {
    /* Do something cool */
    // Originally from https://github.com/caseyamcl/Configula/blob/master/src/Configula/Config.php
    // Configula by @caseyamcl, MIT Licence
    if (whatever === whatever) {
        return whatever;
    }
}

Include that comment wherever the code is borrowed.

Just remember that the configuration loading uses the ManagesItemsTrait methods, so be sure to use get(), set() etc when appropriate.

What happened to:

The method responsibilities (from my pov) would be:

load($file|$files, $append, $optionalDecoder);: locates file, pulls mime type, loads file, and decides which decoder to use if not decoder is supplied, then passes to
hydrateFrom($decoder, $data, $append): accepts native data, pipes it through correct decoder, and appends or resets the data to manager
and, of course, protected methods that split that work up into nicely testable units :smile:

Scott

That's all the same. All I'm saying is that the files are decoded and then loaded into the existing items array using the existing methods reset(), get(), set(), etc. Just like hydrateFrom() currently does.
The workflow you quoted is what I was describing because hydrateFrom() uses reset() or set().
Does that make sense?

So, I need to offer the ability to read a different config files (load()method), get the file data into an array through a driver/ decoder and add that data to the manager. Or if wanted, do a reset of the manager with that data. At the same time, I need to offer a means to add a custom driver/ decoder to load the data too.
Correct?
Scott

Yep, that sounds about right. I would think offering a custom driver/decoder may be best as an optional argument.
I do appreciate your help. You are going to tackle this, then? If so, I'm going to begin work on adding optional collections support :)

And I was wrong earlier. We do need to use symfony/yaml for yaml decoding. The native yaml parser is not installed by default. That's my bad. That is one situation where we can "suggest" a dependency through composer, so if they want to use yaml, they can simply require symfony/yaml. Json can be native. I don't know that we need any other formats by default, do you?

Yes, I'm working on this. I've added the Symfony YAML library. The only other driver I'd suggest is a plain PHP one.
Scott

cool. The plain php one could just $data = include $file and $file could return []. That's standard convention as far as I've seen.

I am sort of stuck on a few things.
You mentioned in the API examples that load() could take a file or list of files. However, I am certain the files to read won't be stored within the data manager directory. So, a basic piece of data that needs to be with each file is the file's actual location. This works well with the Symfony finder example you had posted in #25, since the return data from finder has the file locations in the data too.
I guess my question is, should there also be the file location with the file data? Could we we require one SplFileInfo Object or an Iterator of SplFileInfo Objects, like Symfony's finder returns?
Is the load method supposed to be used multiple times by the user for different config file types using custom decoders? Not sure why that would be necessary, but if there are different decoders and they are needed at different times, then the user will have to call on them separately and each time they want to use it.
In general, and this might be totally screwed up thinking, instead of calling a load method in the manager, which sort of breaks SRP (doesn't it?), the decoder functionality should be in its own "Loader" module and should get the manager injected. So, we would have on the client side.
$loader = new Loader(Manager $manager);
$loader->load($file|$files, $append);
//we can also have
$loader->addDecoder(DecoderInterface $newDecoder);

That way, the custom decoder is added once, but can be used anytime and as often as needed later. (Obviously, the addDecoder call would need to be before any call to load files too.)
With a Loader class/ module, we also don't necessarily need the hydrateFrom() method either, keeping the manager simple and clean. Though, if you want to keep it as an added feature, why not? I guess.
Am I in left field now? :blush:
Scott

You definitely aren't in left field, and those are good points I hadn't considered. I think I see two questions there:

I guess my question is, should there also be the file location with the file data? Could we we require one SplFileInfo Object or an Iterator of SplFileInfo Objects, like Symfony's finder returns?

I was thinking that we would just require the absolute path at the time the load() method was called: $manager->load(__DIR__ . '/../../config/file.json');. From there, its easy for Manager to load the file, because it already knows the exact location. That said, it may be clunky if loading a lot of files. I think you are right that requiring the native php SplFileInfo would be a good way to go (at least for now). That way they can inject $finder or anything else that produces a file info.

instead of calling a load method in the manager, which sort of breaks SRP (doesn't it?), the decoder functionality could be in its own "Loader" module and would get the manager injected.

This is another good point and I was just thinking about this yesterday. Manager is getting more bloated than I had originally wanted, though I don't know that I like injecting Manager into a loader because in many cases, loading the files will only be one way of setting configuration data.
So, the way I see it, we have two options for cleaning up the SRP problem:

Use a LoadsConfigItemsTrait: This is kind of the convention that the rest of the package uses. ManagesItemsTrait holds the most basic functionality and the other traits can be mixed and matched to get the desired extra functionality (using magic methods, collections, dependency injection, etc).

Add a Loader or FileBag class to handle registering decoders, files, and the like. This class would be responsible for loading the file, decoding to an array, and returning the resulting array to Manager to be set or appended.

I'd like your opinion, but the best thing may be to do both, or really all three. This is what I mean:

Remove all hydrate and loading from ManagesItemsTrait
Create a new trait LoadsConfigFilesTrait that uses DependsOnManagesItemsTrait (which only ensures that the user doesn't use a sub trait without the primary one)
LoadsConfigFilesTrait::hydrateFrom(); probably stays the same as it is now. No file loading.
LoadsConfigFilesTrait::load($splFileInfo, $decoder); for a single file only.
LoadsConfigFilesTrait::load(FileBag $bag); for multiple files and cascading files (worry about those later).
The FileBag holds each file to be loaded with the accompanying decoder. You can also register decoders and use an alias.

// We have three options for loading files, depending on use case, and of course, mix and matched
// Add each file with a specific decoder
$bag = new FileBag();
$bag->addFile($splFileInfo, $decoderObject);
$bag->addFiles([
    [$splFileInfo, $decoderObject],
    [$splFileInfo, $decoderObject],
]);

// OR, register a decoder to be used
$bag->addDecoder('xml', new XMLDecoder());
$bag->addFile($splFileInfo, 'xml');

// OR, maybe add a default decoder
$bag->setDefaultDecoder(new XmlDecoder());
$bag->addFile($splFileInfo);
$bag->addFiles([$splFileInfo, $splFileInfo, $splFileInfo]);

The FileBag ONLY holds files objects with their decoders, it does not load files.
So, when LoadsConfigFiles::load($bag|$splFileInfo); is called, the load method spins up a new FileLoader class which accepts a $splFileInfo or $bag, finds and loads files, decodes them, and returns the finished array, which LoadsConfigFiles appends or resets as appropriate.

Does that make sense? Does that address your questions? Do you have any different ideas? If you still want to inject Manager into a Loader, could you show me an example of what you mean so I can understand better?

This has got me thinking about SRP, and I appreciate that. Let's lay out exactly what each responsibility would be:

The ManagesItemsTrait CRUDs against a deeply nested data array.

All the other Traits add extensions or sugar to this basic responsibility, either in the way the data is accessed or in the kind of data.

ManagesIocTrait CRUDS object factories against a data array
ChainsNestedItemsTrait allows for CRUD access via magic methods
ArrayableTrait allows for CRUD access via array syntax
LoadsConfigFilesTrait will provide api to load files into the deeply nested data array

The Other Classes:

FileLoader loads files, decodes using dependency, and returns final array
FileBag is a DTO that keeps each file with desired decoder
xyzDecoder decodes data to php array. does not load files.

The Manager classes are simply concrete classes that use various combinations of traits for ease of use.
I have planned to rework the documentation as we near 1.0. This belongs there.
Any thoughts?

I like where this is headed. Thanks for your help.

Sounds good.
The only thing that I wanted to try and do a bit differently was to have the extension be the convention to call the decoder, like how Configula does it.
        $decoderClassname = 'Michaels\\Decoders\\'.ucfirst(strtolower(pathinfo($filepath, PATHINFO_EXTENSION)));
        if (class_exists($decoderClassname)) {
            $decoder = new $decoderClassname();
            $decoder->read($filepath);
            return $decoder->decode();
        } else {
            return array();
        }

So, if someone wants to write their own decoder, they can, but the convention would be the class must be named after the file's extension. Like myConfig.xml. The decoder class name would have to be "Xml" and also extend an abstract decoder class. Though, to be a bit different, we can add "Decoder" to the class names. So, the class name would be XmlDecoder.
'Michaels\\Decoders\\'.ucfirst(strtolower(pathinfo($filepath, PATHINFO_EXTENSION))).'Decoder';
Scott

The problem with that is, what about third-party decoders? They may not be able (and shouldn't) place decoders in the Manager composer directory. That should be isolated from their system. The custom decoders should be under whatever namespace is appropriate.

So, I've been thinking that I like the idea of being able to register a Decoder and letting the file loader choose the decoder based on MIME type. I still don't think the configuration/namespace option is the right way to go, but what if the Decoder itself can describe which MIME type it handles?
class XmlDecoder implements DecoderInterface {
    public function mimeType() {
        return 'xml'; // or whatever the SplFileObject spits out when asked for extension
    }

    public function decode($data) {
        return [];
    }
}

$loader->addDecoder(new XmlDecoder());

The addDecoder() method asks the decoder for its desired MIME type and associates them. That way, when the user $loader->load($splFile); it checks the extension of the file and uses the registered decoder for that filetype.
In this case, we would actually create a Json and Yaml decoder and just register them automatically within the loader. The user can then add as many decoders as they like.
What do you think?

Ah, yes. For that we would have the addDecoder() method in the FileLoader. The client coder will only call it once to install her decoder and off she goes.
Scott

Ok. I started over actually and made a push to my repo with a starting bit of code for the FileBag and also added just the files (empty). Can you check it out and tell me if that is the right direction, but more from a "where things need to go" perspective?
https://github.com/SkooppaOS/data-manager
Scott

Yeah, everything looks in the right place to me. Good naming and namespacing. The hydrateFrom() method itself probably belongs in LoadsFileTrait, but the actual logic of that exists now would belong in the decoder, so I assume you'll split that up as time goes on. Good tests.
Eventually DecoderInterface will need some sort of mimeType() or handlesFileType() method so it can declare which type it handles. Types?
Also, before you issue a PR, can you remove your .idea folder from git tracking.
See
http://git-scm.com/docs/git-rm
http://stackoverflow.com/questions/1273108/how-do-i-git-rm-a-file-without-deleting-it-from-disk

Ok. Yeah, I'll git rid of the .idea folder. <-see what I did there? LOL! :smiley:
Scott

lmao!

Ok. I did some more work and I actually did it without following Configula. I feel that is good, because I have learned more. It is probably disadvantageous, because I am probably making more noob mistakes. :smile:
At any rate, I now have a working FileBag, JsonDecoder and FileLoader and it actually all works (current tests pass). And either files (as an array of SplInfoObjects) or a FileBag can be passed to the FileLoader.
I know I am  not completely going in the direction you intended, so let me know what is wrong or what you'd like to see different. It is all my feeble experience and knowledge could let me create.
As you can see, there are also still some tests to complete. If you have further suggestions on testing, let me know. And I need to move the addFiles() method to the LoadsFilesTrait trait (need to change the name). But, to be honest, I am not sure why this is needed. LOL! :smile: There is no code reuse necessary at the moment, is there???
Scott

Ok. Check out what I did. We now have the API additions.
$manager->loadFiles($files, $append)
$manager->addDecoder(\DecoderInterface $decoder)
Things to do still (so I don't forget. :smile:)

[ ] Create the YAML decoder with tests
[ ] Create the PHP decoder with tests
[ ] Create some custom decoder and test its addition and decoding properly (suggestions on what kind are welcome).
[ ] Do tests for appending with file data

Any other tests?
Scott

Would you mind copying this to the PR. I like to keep these kinds of things along side code so we can comment back and forth more directly :) I'll take a look at all this tonight. I would just create a StubDecoder that implements the interface and returns some standard array. It doesn't have to be functional to test if its been registered and such.

You lost me on this:

I would just create a StubDecoder that implements the interface and returns some standard array. It doesn't have to be functional to test if its been registered and such.

So, I am going to plug along on the todos.
Scott

@smolinari The reference to Stub means that it's a "fake" class of sorts that reproduces the behavior of Decoder in a predictable way. Often to inject that class into whatever other class/method you are testing. That way since you know the stub will always return predictable output if a failure occurs it's necessarily linked to the other class.
You can do this either by creating a new class file somewhere in tests, or in some cases by using phpunit's stub/mock features to modify existing classes.
I haven't followed these devs so I really don't know what the context is here but hopefully that nudges you in the right direction.

@PommeVerte - Thanks. So Chris was meaning that I should create fake decoders, since the decoders were tested as units already. Though, it seemed easier to me to use them directly than to try and fake them. That might be due to my lack of experience though. I'll see if I can learn to stub and do it.
Scott

Yes. The difference between the two approaches you suggest is that when using a stub if someone refractors the real decoder and breaks it then only the decoder tests break and not the ones that depend on decoders. This allows for better compartmentalizations of your tests and easier tracking of errors

Ah, yes. That is something I was thinking about, when I wrote the tests. The "what all will break, when a decoder is broken" scenario. Ok. Understood. And, it also helps put the right frame (of mind) around what I need to do to. Thanks.
Scott

No problem! And just to elaborate a bit (though you seem to know this already):
Ideally if you brake one method of one class, you should only ever have one unit test that fails (sometimes easier said that done)
Using the actual decoders with other parts of the code to make sure they integrate properly would fall out of the unit testing realm into the integration testing :)
Cheers,
Dylan.

Yeah, to be honest, this is the first ever unit test writing I've ever done (along with any serious PHP programming too). So, most certainly learning by doing. I appreciate the mentorship you gents are giving me. I need it. LOL! I sure wish I had learned to do more programming earlier in my life. I'd be a lot further with my project, than I am now. But, that is ok. It is all just a hobby, currently. No stress.
Scott

Merged


Adding example for one-to-many which is not the user, like category for an article?

In a similar situation, I struggle to make such a relationship work, using the latest Ash version and generators. Unfortunately it doesn't help, that the generators create quite different code from realworld.
The below examples are not related to realworld.
On the Article:
actions do
    defaults [:read, :destroy, create: :*, update: :*]
end

relationships do
    belongs_to :category, Example.Category do
      writable? true
      allow_nil? true
    end
end

In the form:
<.input
  field={@form[:category]}
  type="select"
  label="Category"
  prompt="None"
  options={Enum.map(@categories, &{&1.name, &1.id})}
  value={if @form[:category], do: @form[:category].id, else: ""}
/>

The category is never saved for either new or existing articles.
The validation also removes the value of category.
The code uses the generated AshPhoenix.Form calls:
AshPhoenix.Form.validate(socket.assigns.form, article_params)
[...]
AshPhoenix.Form.submit(socket.assigns.form, params: article_params)

I tried multiple approaches, none of them works :(

If you are doing a one_to_many, you'd be looking for has_many :categories, Example.Category. That would likely be the root of the issue.
Then you'd need to use the nested forms using <.inputs_for, as laid out in the AshPhoenix.Form docs. https://hexdocs.pm/ash_phoenix/AshPhoenix.Form.html#module-working-with-related-data

In my example category would be one_to_many, so an article would have either no category or a single category. Would we still need nested forms for showing a simple select field to set the category_id?

Oh, no you wouldn't need that. Sorry, I misread the original issue. You should be editing form[:category_id] not form[:category]


Static fields are missing their class names from LSP completion

This is slightly related to #41841. When static fields are included, they don't include their enclosing class names which also results in an error.

Got a fix at https://dart-review.googlesource.com/c/sdk/+/147546/.

This was fixed in 994c0e8dad6df290b1919b383171f4c5bf628cc4 - I thought it would auto-closed but didn't!


stripInternal not working when generating declaration files from JS

TypeScript Version:  4.0.0-dev.20200509

Search Terms: stripInternal JSDoc
When generating declaration files from JS files annotated with JSDoc, declarations marked with @internal are not stripped from the declaration files, although --stripInternal is true.
Code
TypeScript input file:
export class tsTest {
  tsFoo(): string {
    return "";
  }

  /**
   * @internal
   */
  tsBar(): null {
    return null;
  }
}

equivalent JavaScript input file:
class jsTest {
  /**
   * @returns {string}
   */
  foo() {
    return "";
  }

  /**
   * @internal
   * @returns {null}
   */
  bar() {
    return null;
  }
}
module.exports = {
  jsTest,
};

TSConfig:
{
  "compilerOptions": {
    "target": "es5",
    "module": "commonjs",

    "allowJs": true,
    "checkJs": true,
    "declaration": true,
    "emitDeclarationOnly": true,
    "stripInternal": true,

    "strict": true,
    "esModuleInterop": true,

    "forceConsistentCasingInFileNames": true
  }
}

Expected behavior:
// TypeScript and JavaScript output
export declare class tsTest {
    tsFoo(): string;
}

Actual behavior:
// TypeScript output
export declare class tsTest {
    tsFoo(): string;
}

// JavaScript output
export class jsTest {
    /**
     * @returns {string}
     */
    foo(): string;
    /**
     * @internal
     * @returns {null}
     */
    bar(): null;
}

Notice how bar() isn't stripped out and there is no declare modifier.
Playground Link: No JS in the Playground, so I made a repro repo: https://github.com/AlCalzone/ts-stripinternal-repro
Related Issues: Only https://github.com/microsoft/TypeScript/issues/27125 and an unrelated proposal came up.

I have the same issue with the current stable version of tsc. Please fix it

Oh, I did not know that stripInternal is not documented. Is there any other intended way to have members of a class only visible in the current project, but not from outside? Something like VB.net's Friend modifier?

I'm hitting this issue too. It makes the current autogeneration of declaration files from javascript sources somewhat useless, since they require significant manual rewriting.
I'm perfectly happy to submit a PR for this issue. The typescript codebase is massive, and I could use a few pointers. Is one of these files where the relevant code is?
https://github.com/microsoft/TypeScript/blob/master/scripts/buildProtocol.ts
https://github.com/microsoft/TypeScript/blob/master/src/compiler/factory/nodeFactory.ts
https://github.com/microsoft/TypeScript/blob/master/src/compiler/transformers/declarations.ts

@telamonian did you succeed to find where to start a PR ?

Perhaps the "undocumented" has since changed, but stripInternal is indeed documented now (and still doesn't work): https://www.typescriptlang.org/tsconfig#stripInternal


FancyZones not triggering

ℹ Computer information

PowerToys version: 0.21
PowerToy Utility: FancyZones
Running PowerToys as Admin: Yes and No
Windows build number: [run "winver"] 19041.508

📝 Provide detailed reproduction steps (if any)
1.Run Powertoys on startup
2.Enable any form of triggering fancyzones, Shift Key, secondary mouse button. or WinButton+Arrow
✔ Expected result
On triggering fancy zones, the zone outlines should appear, or if using arrows, windows should snap to configured zones.
❌ Actual result
nothing happens.

@txf-
did you turn on "Allow zones to span across monitors"?

I tried it with the option enabled and disabled

@txf-
that option is causing the bug.
Do the following:

quit PowerToys
in command prompt run del %localappdata%\Microsoft\PowerToys\FancyZones
restart PowerToys
don't turn on "Allow zones to span across monitors"

Closing as duplicate of https://github.com/microsoft/PowerToys/issues/6302


Singly-linked list with push_back?

I would find it convenient (for implementing a custom LRU, with some fancy features but no way to remove arbitrary elements) to have a singly-linked list (with pointers going from the oldest LRU element to the newest), that also allows adding to the end of the list.
The APIs for getting CursorMut prevent this by forbidding keeping a mutable cursor to the end while accessing the list. Having a private CursorMut pointing to the end would allow providing a safe push_back API.
Would you be amenable to this idea? Should I send a pull request?

Sure! I would be happy to accept a pull request for this.
What do you have in mind for this? A separate SinglyLinkedListTail type?

I agree, a separate list type would work best.
I've given it more thought, and I need to customize more things for my LRU before I can extract a generally useful solution.


Support P7

Purpose
Basic support for P7 protocol version.
Changes

Update base
Handle protocol version 7 GRPC response.

Checklist

[X] My code follows the style of this project.
[X] The code compiles without warnings.
[X] I have performed a self-review of the changes.
[ ] I have documented my code, in particular the intent of the
hard-to-understand areas.
[X] (If necessary) I have updated the CHANGELOG.

Is there a reason this is not merged yet?


Client Allocation Request for: o,.ydp

Client Allocation Questions
Core Information

Name: o,.ydp
Website / Social Media: oh.pyf.com, (@e.phf, ephf)
Region: Asia Japan
DataCap Requested: 256 GiB
Addresses to be Notarized: f1495978707
Notary Requested: Gary Gao

This user’s identity has been verified through filplus.storage


order talks on applications of Numba by date

Thanks for the patch. Looks good, marking for merge.


Add ball search options to flipper devices

Main lower flippers should not use this. But upper flippers should have the option to flip during ball search.
Ask me how I got this idea! :)

done


Add INI.build

Implements a basic method to generate an INI-style configuration from a hash.

Oh and I just noticed that using single quotes over double quotes where you can (Chars over Strings), should give a slight performance win :)

@jhass Thanks for the tips, I've done the changes.

Please add some specs for space = false. This can be done simple with a short string, no need to create an additional file.


Character Diorama rotation issue

With the recent fix for diorama getting out of frame, though that issue is fixed but the rotation of character in frame has become weird in both character diorama and chat diorama.
previous one:
https://user-images.githubusercontent.com/35926530/181908104-7606d086-4109-4fed-9fed-0f30ec77317a.mp4
Current One:
https://user-images.githubusercontent.com/35926530/181908106-f206535a-9c33-4d20-a090-c24f3fdb91b5.mp4

This was fixed


Control service is declared as Heartbeat service in SessionType.java

"Heartbeat" needs to change to "CONTROL". (As a side note these static finals need to conform to correct naming conventions of all caps)
See:
https://github.com/smartdevicelink/sdl_android/blob/feature/remote_control/sdl_android_lib/src/com/smartdevicelink/protocol/enums/SessionType.java#L16

This has been changed in develop and naming changes have also been proposed in the refactor branch. Should this be closed, or remain open until the naming change is also accepted?

Should have already been closed.


feat: switch to sqlite instead of json for state persistence

Description

[x] PersistedState struct removed in favour of passing a db pool reference (&SqlitePool) wherever we need to update/query the db
[x] updated unit tests (they were on the state file before)
[x] updated e2e tests

much clean!
also pls link the testing issue we discussed. I also still think cargo tests should use the sqlx::test macro, cleaner testing environment

thanks!
I think I addressed all the comments now, I could not get sqlx::test to work even with just the cargo tests, again with the
control attributes are not allowed unless the `migrate` feature is enabled and automatic test DB management is used; see docs

Lmk if it's fine to keep it as is. Also for the testing Issue - I am not sure how to frame the improvements we want, I think we can leave it as a separate effort from this Issue?

I could not get sqlx::test to work even with just the cargo tests, again with the
control attributes are not allowed unless the `migrate` feature is enabled and automatic test DB management is used; see docs

I read through the docs carefully and got cargo tests to work
    #[sqlx::test(migrations = "./migrations")]
    async fn test_db_basic(pool: SqlitePool) {
        // let pool = create_test_db(None).await;
    ...
    }

If you are curious, look more carefully in the docs here talking about signatures
I still think it would be better to create the e2e test re-arch issue and link it here, because the changes in the e2e tests right now is not the ideal which leads to the motivation for that spec'ing work. feel free to leave it a bit more general and fill in later. Some main points are to talk about why there are multiple test binaries and a separate db testing management, what was the limitations of having them within the radio crate, and some functions to be moved into the SDK
Other changes look okay

@hopeyen I will link the testing Issue later today


integration with home assistant?

Hi there,
I was wondering if you have integrated this with home assistant? And if so what your configuration looks like?  Regards,
Marc

Apprise supports Home Assistant as a notifier, please see their wiki: https://github.com/caronc/apprise/wiki/Notify_homeassistant
Hope that helps 😄


build fail in the course due to outdated ruby version

Bug Report
https://github.com/Yemeni/continuous-integration-travis/pull/3 as you can see here, it failed multiple times, so I updated ruby to 2.4.4, again failed due to incompatible bundles, then again updated ruby to 2.5 to finally have a successful build

Related, from Halp:

A user opened this issue in our community forum indicating that the Travis CI tutorial is broken at the moment. https://travis-ci.community/t/tutorial-failing-first-step-could-not-find-bundler-1-16-3-required-by-your-gemfile-lock/10020

You can see the breakage at https://travis-ci.com/github/Masber/continuous-integration-travis/builds/186822485#L277

Gemfile.lock's Bundler version does not match what's on the build image; I'm not yet entirely certain how or when the breakage was introduced. I'd be happy to discuss how we can fix it for our mutual users.


[Bug Report] Deploying services - UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'definition' of undefined

Impossible to deploy a service.
node v12.16.3
An error is logged while deploying the service "Ethereum ERC20 token" then it keeps loading in the void.

Oops, was indeed using node 14 and not 12

are you sure it's related to node 14?

Can not be sure, but was occurring only with node > 12


Attribute is no image and cannot be converted to one

Hi,
I'am using your Package on a Raspberry Pi4 and everything works fine except the Images. Whenever I try to get these i get the following Exception.
File "/home/pi/.local/lib/python3.9/site-packages/weconnect/addressable.py", line 282, in saveToFile
    raise ValueError('Attribute is no image and cannot be converted to one')
ValueError: Attribute is no image and cannot be converted to one

On my Windows PC everythin works fine.
I'm pretty new to Programming so I don't know what I can do.
Thank you for your help

Sorry found the Error myself. Only used pip install weconnect and not pip install weconnect[Images]


[BUG] Notebook Loading Issue

Describe the bug
Colab fails to load the notebook. Looks like a syntax error.
To Reproduce
Try to load via Colab
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots

Additional context

OS, environment
Game settings
Add any other context about the problem here.

Duplicate of #79.

Closed by PR #81


Incorrect implementation of template element

In my opinion the
According to the html5rocks tutorial as well as the Mozilla implementation, the content of a template element should be placed into its .content and not into its .childNodes.
This deviation from what I understand is the accepted standards currently breaks code which is running in Firefox and Chrome when using jsdom parser.

can you provide a small minimal code sample where jsdom behaves differently from browsers?

Thanx domenic for your quick and very helpful reply.
TL;DR: Case solved. Issue closed. :-)
Longer: The minimal offending code sample is:
   var resu = jsdom.env ("<template>Test</template>",
       function(e,d){
         console.warn (d.document.body.firstChild.content);
   });

and it produced "undefined" instead of a DocumentFragment.
However, when re-checking this I noticed that higher up in the code I was not loading jsdom but rather the old node-jsdom. Calling the variable jsdom was not my smartest choice of variable names, as I ended up complaining here instead of at node-jsdom. When I corrected this and updated my package definition the error vanished.
Thanx for helping me debug a completely different part of my code, I appreciate this, and sorry for taking up your time on this. I think this should now un-break the rest of my code :-) if not I'll be back for more.

Sorry, domenic, that I am back with this issue. Now I have a test case and a suggestion wrt the reason behind what I suspect to be a bug in jsdom
In the browser, the content inside of a template tag x can be found in the dom at x.content, where it has the form of a document fragment node with the appropriate number of nodes, i.e. in x.content.childNodes (in the example it is 3 childNodes).
In jsondom, the content inside of a template tag x can be found in the dom at x.content, where it first is packaged in a document fragment node with ONE child node; this child node consists of another document fragment node, which then contains the appropriate number of nodes, i.e. in x.content.childNodes.item(0).childNodes. There is an additional, in my opinion unwanted, document fragment wrapper around the content of the template.
Here comes the example.
In the browser (firefox) this snippet produces
<template id="7">abc</template>

TEMPLATE found: .content has has nodeType: 11 and contains 3 childNodes; now printing .content
mytest.html (line 8)
FRAGMENT found with 3 childNodes, now printing childNodes
mytest.html (line 15)
B
mytest.html (line 12)
DONE printing childNodes
mytest.html (line 17)
DONE printing template
mytest.html (line 10)
In node.js under jsdom the following snippet
var jsdom          = require ('jsdom');

function domPrintDebugMini (dom) {
  switch (dom.nodeType) {
    case 1:
      if (dom.tagName == "TEMPLATE") {
        console.warn ("TEMPLATE found: .content has has nodeType: " + dom.content.nodeType + " and contains " + dom.content.childNodes.length + " childNodes; now printing .content");
        domPrintDebugMini(dom.content);
        console.warn ("DONE printing template");
      }
      else console.warn (dom.tagName);
      break;
    case 11:
      console.warn ("FRAGMENT found with " + dom.childNodes.length + " childNodes, now printing childNodes");
      for (var i = 0; i < dom.childNodes.length; i++) { domPrintDebugMini (dom.childNodes[i]);}
      console.warn ("DONE printing childNodes");
      break;
  }
}

jsdom.env(
    '<template id="7">abc</template>',
    function (err, window) {
      domPrintDebugMini (window.document.getElementById("7"));
      console.warn ("DONE");
    }
  );

produces
TEMPLATE found: .content has has nodeType: 11 and contains 1 childNodes; now printing .content
FRAGMENT found with 1 childNodes, now printing childNodes
FRAGMENT found with 3 childNodes, now printing childNodes
B
DONE printing childNodes
DONE printing childNodes
DONE printing template
DONE
I suppose that the additional, superfluous document fragment node layer in jsdom is not what is wanted by the standard.

Thanks for finding this issue! A pull request with some tests would be much appreciated for correcting it.

Sorry, domenic, I do not have a good hand in making pull requests. I am using git only for my own code versioning & backup and probably am getting the references wrong. I did not mean to close this issue here. This was an unintended side effect. Moreover, I do not understand the build system of jsdom to a sufficient degree to run all tests as suggested in the documentation. That said, the code correction which works for me as I expect it (and which has passed the small number of 10 test cases within my own application) can be found at https://github.com/clecap/jsdom/blob/master/lib/jsdom/level2/html.js in line 2282.
I understand that this is an unprofessional way of doing pull requests but I do not want to add more confusion to this thread by yet another misclick.

No problem, don't worry about it! When one of us has time we'll do our best to take your changes, add some tests, and pack them up into an official release :)


Left swiped component is visible in StackNavigators previous View

Hello the component which I swipe to the left to dismiss is visible in the Stack Navigators previous view for 1 sec and then hides out. Can anyone tell me how I can avoid this?
<Interactable.View
               horizontalOnly={true}
               snapPoints={[
               {x: 0, damping: 0.5},
               {x: -360}]}
               onSnap={null}>

... </Interactable.View>

I am closing the issue as a part of an effort to clean up and revive the project. If this issue persists after v1.0.0, you are more than welcome to reintroduce it.
Thanks for your contribution.


Add Automatic sync of Action documentation

Add sync of action documentation based on action.yml

Of course this is not necessary when you are disciplined and remember to update the documentation in both places.
Unfortunately this is often not the case. And I think the parameters will change in the near future.


MVVM

Is your feature request related to a problem? Please describe.
WPF and UWP technologies were intentionally designed to work with MVVM pattern. Files follows it very poorly as majority of the code is hidden in the code-behind files (MainPage.xaml.cs)
Describe the solution you'd like
A loosely coupled code achieved with MVVM would be more maintainable and would make the entire codebase more professional. The code would also be more efficient and more flexible. Less boilerplate, copied-over code. Not only that, project with implemented MVVM, if designed well, could work on multiple platforms.
Implementing MVVM would mean a huge rewrite of Core Files functionalities and would take a huge amount of time, but in the end I believe the change would be worth it.
(This would mean we'd had to delete the code-behind (e.g. MainPage.xaml.cs) and move it over to ViewModel class (e.g. MainPageViewModel.cs))
Additional context
I always code my applications following MVVM pattern and I don't regret doing so.

@d2dyno1 Moving towards MVVM is a long-term goal and we have made several steps in this direction with some of the recent refactoring we have done. Is this something you are interested in helping with?

I'll make sure my next PRs follow the MVVM pattern

@d2dyno1 That sounds great, one of the things we can already start doing is moving some of the core functions out of the code-behind into a separate "commands" folder for features such as copying, pasting etc.

Are you referring there to changes made by #2358? In the means of copying, moving, deleting items, the (new, reworked) IFilesystemOperations needed its own special place. I intentionally didn't keep it in the Commands directory because Commands are specifically reserved for UI elements functionality implementation (ICommand). The new IFilesystemOperations is a part of Files' underlying FS.

@d2dyno1 No, I was just saying in general.

@d2dyno1 We do need to rename the "Commands" folder to something less confusing.

I'd create a ViewModel folder for all View Models. I'll open a PR regarding this - How I'd do it, how I see it done - as soon as #2358 is merged, and #1763, #2117 is completed

@d2dyno1 We already have a ViewModel folder.

👀

@d2dyno1 We do need to rename the "Commands" folder to something less confusing.

It depends, at the time we were going to put the command in their own files but now it looks like we will be putting them in the View Models.

We're still working on the infrastructure redesign. You can help by ornganizing the namespaces. Since we've moved the code to separate projects, some namespaces need updating too. We're looking for updating the namespace Files.* for Files.Uwp project to Files.Uwp.* 🙂

I want to upwote and encourage this topic.
I just realized that most work is going under the Files.Uwp solution, which contains a tons of xaml.
Any tiny change in code forces to wait for 2 minutes for rebuild entire xaml for no reason.
It would be great, if the code gonna be as loosly coupled from xaml as possible.
Meaning, even the UI logic could be placed in separate project, which leads to significant development efficiency increase.
@d2dyno1 I think, there should be some roadmap, some guideline for this. Random devs has no idea which places are legal to touch. And how to sync the changes with current Files codebase - thats the question as well.
I want to join to this refactoring, since I strongly encourage code debts decrease.
Best regards,
Alex

Looks like I haven't got any response from @MarkIvanDev. Could you implement this one as a starting ground? @devovercome

@d2dyno1, Need to rename namespace Files.* -> Files.Uwp.*? Sure, will do!

Dividing the front into several projects allows

improve compilation time
better manage external and internal dependencies
to better structure the tree structure of each project
to have one file per class for more readability
It gives an interest to the internal elements

Here are some suggestions

Files.Backend.Storage: Contains StorageFile, StorageFolder, ... which have many classes and external dependencies. I am already working on this.
Files.Backend.Item: Uses Files.Backend.Storage to provide common ListedItem interfaces, associated viewmodels
Files.Front.Setting: Contains settings classes, backup/restore tools, config window, ...
Files.Application: Contains the main application, which only assembles controls and services from other projects and configures everything with the settings.
Files.Front.Preview: A PreviewPane control that receives a file and displays its preview.
Files.Front.Navigation: Contains navigation controls
We can make an exhaustive list.

Bugs don't get fixed on their own (well, they occasionally do), even if you can't contribute to the codebase directly, issue reports go a long way towards helping us improve the app and we encourage you to continue opening them.


Cannot start service unless I reboot.

Hey there,
App works great just it seems that unless I reboot my phone I cannot start the actual service it will tell me accessibility access not granted go to settings and then turn it off then on again if it's on.
I go to settings and let's say it's on, then i turn it off it will say this will stop the app I say yes then turn it back on hit allow at the prompt and then it won't work. Then I'll reboot my phone and it works fine. I can then leave the service on turn it off and on for a quick session of spending my AP and then when I try a few hours later same exact issue.
I'm running the NA version of FGO on a xiaomi mi mix 2s with their Android skin MIUI at version 11.0.5 and Android version 10.
Let me know if there's anything else you need me to do to give you more information.

I use a Xiaomi phone myself and don't have any problems after disabling battery optimizations and all for the app.
Just do everything this site says: https://dontkillmyapp.com/xiaomi

That looks like it worked I wasn't able to do everything on that page
probably due to a different MIUI version but after doing the rest I haven't
had any issues, thanks.
On Wed, Jul 29, 2020, 12:15 PM Mathew Sachin<EMAIL_ADDRESS>wrote:

I use a Xiaomi phone myself and don't have any problems after disabling
battery optimizations and all for the app.
Just do everything this site says: https://dontkillmyapp.com/xiaomi
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/MathewSachin/Fate-Grand-Automata/issues/213#issuecomment-665851292,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AG37VNJC6TEDZ6TCYYP5ERTR6BYODANCNFSM4PL3R7HA
.


fix:  Pin react-jsonschema-form to 1.2.1

Form-builder 1.3.1 introduced a new error when clicking 'submit' on the form:

Debugging that line in App.js:

While the form-builder's 1.3.0 > 1.3.1 commit history seems benign enough, react-jsonschema-form is set to '^1.0.3' in package.json, and in form-builder#1.3.0 is installed @ v1.2.1 and in form-builder#1.3.1 is installed @  v1.5.0.
Reviewing the react-jsonschema-form release notes, looks like we need to support both the dot notation and the brackets method for 'property'.  I'm thinking we should pin react-jsonschema-form to 1.2.1, and open an issue ticket to unpin at a later date after a more thorough review and testing has been performed.

Thanks @ChristianMurphy  and @bjagg .
Opened https://github.com/uPortal-contrib/form-builder/issues/69 as a follow up.


Make the chdir tests thread safe

The both change their process's cwd, which is global.  Handle this by
running the tests in subprocesses.
Benchmarks:
time target/debug/deps/test-e584289aa9d95a82 --test-threads=1 (before this change)
0.11 real         0.01 user         0.01 sys
time target/debug/deps/test-e584289aa9d95a82 (after this change)
0.01 real         0.01 user         0.03 sys

This needs a rebase to the updated CI configuration. Then it LGTM assuming it pasts all tests.

Actually, it's not ok.  It seemed ok at first, but now I can occasionally produce deadlocks when I use 8 threads.  This PR requires more investigation.

test_in_subprocesswill never work.  It looks good, but it doesn't work if the process is multithreaded (which it usually is).  The child process is single threaded; only the thread that called fork will exist in the child.  So if some other threads in the master held locks that the test function needs, then it will never complete.  And some of the stuff in Rust's standard library is using locks under the hood, which is why I'm seeing deadlocks.  I'll try a different technique to fix these tests.

Ok, I switched the chdir tests to use a Mutex for protection instead of forking.  And I also fixed some issues with the aio tests and with other tests that fork().  Now, if I disable some unrelated tests like the pty tests, I can run 10000 iterations with 8 threads on both FreeBSD and Linux.

Also tests are failing on mac. Possibly because trust on mac doesn't use docker?

I'm assuming this is finished on your end. LGTM. I think some more comments would be helpful, but I lean towards more comments rather than less, and I don't think it should hold up this PR, especially with #681 waiting to reuse the mutex functionality this sets up.
bors r+


Semantic UI

Let's discuss adding a set of Semantic UI components to Vulcan.

Also feel free to add a 👍 if you'd like to see this integration in Vulcan core.

👋 I would obviously love to see the process of using a different CSS framework be easier. I spent a lot of time looking at #1823 and #1935 when I was working on my project, and I also spent time looking at https://github.com/nolandg/vulcan-semantic-ui . I was never able to remove the core bootstrap (probably because I was afraid of breaking things I couldn't fix).
I think the first step here is to decide how to abstract the functionality from presentation. The process described in #1823 seems good - if you can bring it to the step where Vulcan.Button and Bootstrap.Button are separate, I'll very gladly volunteer to build the Semantic UI Presentation layer. It's the least I can do for all of the speed that Vulcan gave me in bringing https://softstuff.tools to life.

Actually now the Bootstrap layer is completely separate from Vulcan core and isolated in the vulcan-ui-bootstrap package.
So I don't think there should be anything preventing us from having a Semantic package. It's just a matter of recreating each of these components with Semantic (and adding any other you might need).

Hi, the hardest part is to avoid code duplication. Right now, vulcan:material-ui is hard to maintain because it contains too much logic, so I end up maintaining my own fork instead :/
I've had a first experiment with the DataTable, by splitting it into Layout components. The gotchas are:

removing as much logic as possible from the components can be tricky. You can see my first try on the DataTable, some of the layout components I created could have a better API.
it creates tons of components, whose names become part of the API and cannot be changed easily later easily (otherwise it breaks 3rd party UI libs).
librairies does not always have the same level of nesting. Eg sometimes you need additional components to maintain the layout. See tables for example you might have different system than body row and cell depending on the framework.
beware of the props of these presentational components. They must have the same props as there parents to handle tricky use cases (eg if the dev want to compute some styling based on the data)
APIs between UI libs are very different. You won't manage to have a common Button API for example, you really have to rewrite all UI components if you want to switch from one framework to another.

Writing additional UI package is a good way to detect and solve this, you will immediately see whether your new implementation contains too much logic. However that mean some more work on the core too.
Also I think there are still references to Bootstrap class names in the default implementation of the core. We could get rid of this too, and limit the core implementation to div and span with no classNames.
Concerning Semantic UI, I am not a big fan, the React version is voluntarily limited to a direct translation of the CSS version, which is not always possible/idiomatic/optimal. They tend to quickly close Github issues. I'd bet on Bootstrap, Material UI and Ant UI instead, that are more React friendly.

APIs between UI libs are very different. You won't manage to have a common Button API for example, you really have to rewrite all UI components if you want to switch from one framework to another.

Really? I guess I would need to really try using a different UI library to know, but my goal was indeed that you could switch from Bootstrap to Material just by switching out a package. Of course if you start relying heavily on more advanced features of a specific UI library it won't be possible anymore, but I was hoping that it'd work at least for all Vulcan core components so people can pick the starting point they prefer.

I think your goal is perfectly achievable for Core components indeed, sorry I was unclear. I just mean that the common API will be necessarily limited, and sometimes not that trivial to define.
Often it's stuff about colors, eg they have different notations/systems to handle palettes and theming, so it's not that easy to handle the related props. They can have a default behaviour for buttons and links, and so on. Modal is a good example of how 3 frameworks will have 3 totally different implementations.
But again vulcan:material-ui has proven this to be doable, it's just that we need a bit of refactoring and improvements to extend this to multiple UI frameworks and keep things clean and maintainable.

Please also provide core components such as datatables, available without having any framework installed.
I was struggling for days with adding datatable to my semantic UI designed application, and the error was not providing any information that I should use Vulcan bootstrap UI for the datatable to work properly!

Please also provide core components such as datatables, available without having any framework installed.

Because Vulcan generates forms for you and also provides premade components such as modal windows, buttons, etc. it's sadly not possible to make it work without a UI library of some kind.


cmake error

[build] C:\windows\system32\cmd.exe /C "cd . && C:\PROGRA~2\GNUARM~1\102021~1.10\bin\AR014C~1.EXE -mcpu=cortex-m0plus -mthumb -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fsingle-precision-constant -Wpedantic -Wall -std=gnu11 -mfloat-abi=soft -mlibarch=armv6s-m -march=armv6s-m -g  CMakeFiles/fain.dir/application/main.c.obj -o fain.exe -Wl,--out-implib,libfain.dll.a -Wl,--major-image-version,0,--minor-image-version,0  libfain_library.a  libtest_lib.a  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
[build] c:/progra~2/gnuarm~1/102021~1.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: unrecognized option '--major-image-version'
[build] c:/progra~2/gnuarm~1/102021~1.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: use the --help option for usage information
[build] collect2.exe: error: ld returned 1 exit status
[build] ninja: build stopped: subcommand failed.

the above error is been there while compiling. this string is not there in the workspace. what to do?

Which instructions have you been following? You might want to start again from scratch, following the instructions in https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf ? (There have been a lot of changes to pico-sdk recently https://github.com/raspberrypi/pico-sdk/releases/tag/2.0.0 )

Yeah, i have no idea what you are even trying to do.

closing as no response


Anchor box generation when calculating the rpn

Hello :]
First of all, thank you very much for this awesome repository !
I would like to ask you a question about the calc_rpn function inside data_generators.py .
This part is the most confusing to me :
for anchor_size_idx in range(len(anchor_sizes)):
		for anchor_ratio_idx in range(n_anchratios):
			anchor_x = anchor_sizes[anchor_size_idx] * anchor_ratios[anchor_ratio_idx][0]
			anchor_y = anchor_sizes[anchor_size_idx] * anchor_ratios[anchor_ratio_idx][1]

			for ix in range(output_width):
				# x-coordinates of the current anchor box
				x1_anc = downscale * (ix + 0.5) - anchor_x / 2
				x2_anc = downscale * (ix + 0.5) + anchor_x / 2

				# ignore boxes that go across image boundaries
				if x1_anc < 0 or x2_anc > resized_width:
					continue

				for jy in range(output_height):

					# y-coordinates of the current anchor box
					y1_anc = downscale * (jy + 0.5) - anchor_y / 2
					y2_anc = downscale * (jy + 0.5) + anchor_y / 2

I have a hard time understanding the following line : downscale * (ix + 0.5) - anchor_x / 2 which repeats also for y1_anc, y2_anc.

What are x1_anc, x2_anc, y1_anc, y2_anc ? Do they reprent the top-left, right-bottom corners of an anchor box ?
What are each members inside the formula :  downscale * (ix + 0.5) - anchor_x / 2. I understand that downscale is the stride (input_width / resized_width), but I don't understand how everything fit together.

Thank you so much for your time !
Valentin

@valentin-fngr  I also didn't understand above code. Can anyone help us with this code?


treewide: fix some typos

git log

pkgs/stdenv/booter.nix: fix a typo

treewide: stdenv.config -> config
That attribute does not exist.

nix-instantiate environment

Host OS: Linux 4.9, SLNOS 19.09
Nix: nix-env (Nix) 2.2
Multi-user: yes
Sandbox: yes
NIXPKGS_CONFIG:

{
  checkMeta = true;
  doCheckByDefault = false;
}

nix-env -qaP diffs

On x86_64-linux: noop
On aarch64-linux: noop
On x86_64-darwin: noop

/cc @7c6f434c

This was the first PR I made with git-hub tool, I'd say 50% success (something mangled the commit message).

Opened an issue https://github.com/sociomantic-tsunami/git-hub/issues/261