Add filter and search in Flask-admin for models with multiple foreignkey to same model fails

This is a duplicate of stackoverflow post on http://stackoverflow.com/questions/25839330/add-filter-and-search-in-flask-admin-for-models-with-multiple-foreignkey-to-same
with more information, as I am also facing the same question / issue here.
Is there a way to add filter and search support in flask-admin for model that has 2 foreignkeys to the same model? An example sqlalchemy model is below - two of the fields are foreign keys to the same User model.
class Message(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    to_user_id = db.Column(db.Integer, db.ForeignKey('user.id'), index=True, nullable=False)
    from_user_id = db.Column(db.Integer, db.ForeignKey('user.id'), index=True, nullable=False)
    subject = db.Column(db.String(512), default="")
    content = db.Column(db.Text, default="")
    to_user = relationship("User", foreign_keys=[to_user_id])
    from_user = relationship("User", foreign_keys=[from_user_id])

If I add 'to_user.id' to column_filters as you do for normal field, I get the following error because flask-admin doesn't know which fk fields to join User table on.
InvalidRequestError: Could not find a FROM clause to join from. Tried joining to user, but got: Can't determine join between 'message' and 'user'; tables have more than one foreign key constraint relationship between them. Please specify the 'onclause' of this join explicitly.
Another test case shown below:
class EnumValues(db.Model):
    __tablename__ = 'enum_values'
    id = Column(Integer, primary_key=True)
    type_id = Column(Integer, ForeignKey('enum_values.id'))
    type = relationship('EnumValues', remote_side=id,
                        backref=backref('type_values', lazy='dynamic'))
    code = Column(String(16), unique=True)
    display = Column(String(16), nullable=False)

    @staticmethod
    def type_filter(type_code):
        return AppInfo.get_db().session.query(EnumValues).\
            join(EnumValues.type, aliased=True).\
            filter_by(code=type_code)

class Incoming(db.Model):
    __tablename__ = 'incoming'
    id = Column(Integer, primary_key=True)
    amount = Column(Numeric(precision=8, scale=2, decimal_return_scale=2), nullable=False)
    date = Column(DateTime, nullable=False)

    category_id = Column(Integer, ForeignKey('enum_values.id'), nullable=False)
    category = relationship('EnumValues', foreign_keys=[category_id])

    status_id = Column(Integer, ForeignKey('enum_values.id'), nullable=False)
    status = relationship('EnumValues', foreign_keys=[status_id])

    @staticmethod
    def status_filter():
        return EnumValues.type_filter('INCOMING_STATUS')

    @staticmethod
    def type_filter():
        return EnumValues.type_filter('INCOMING_TYPE')

class ExpenseAdmin(ModelView):
    column_editable_list = ['date', 'amount', ]
    form_args = dict(
        status=dict(query_factory=Expense.status_filter),
        category=dict(query_factory=Expense.type_filter),
    )
    column_filters = ['date','amount','category','status']

    admin = Admin(app, u'Admin Home', base_template='layout.html', template_mode='bootstrap3')
    admin.add_view(ExpenseAdmin(Expense, db_session, menu_icon_type=ICON_TYPE_GLYPH, menu_icon_value='glyphicon-usd'))

Update to 1.2.0 and use string to specify the path: 'rel1.something'

This is a duplicate of case #846. Closing it.

Seems it's still not working if the filter is based on the same column of the join table,
in view.py, line 612 to 613, seems new join column will override the existing one as below.
            if joins:
                self._filter_joins[column] = joins  #Override and always contains only the latest filter defined.
            elif self._need_join(column.table):
                self._filter_joins[column] = [column.table]

            return flt

Ah, I think I understand.
So, problem is with the different filter paths that start from same column?

Yes I think that' might has something to do with the issue, two filters were defined, one is based on category.display, another on status.display, both the two filter are join using enum_values.display, but using different foreign_key, (category_id vs status_id) in Incoming model definition.
And the field _filter_joins only contains one element with key of enum_values.display, which one is left depends on exactly which one comes later in column_filters list.

Should be fixed in #1281


Add Html.PartialFor() and Html.PartialAsyncFor()

We currently have a number of Html.Partial() and Html.PartialAsync() methods which have an object model parameter. These usually work about as-expected when the partial view only displays information or contains an isolated <form>. But names, ids and ModelState lookups quickly get messy otherwise.
When problems occur, the root cause is that helpers in the partial view have almost no information about the larger context i.e. the rest of the page or <form>. E.g. an <input> tag helper will have type information for, say, a Name property (if the partial view contains a @model directive). But that <input> tag helper has no way to discover Model is not the same object as in the view where Html.PartialAsync() was invoked.
One way to avoid these issues would be to provide overloads accepting a Linq expression e.g.
Task<IHtmlContent> PartialAsyncFor<TResult>(
    Expression<Func<TModel, TResult>> expression,
    string partialViewName)

Nice one

Closing because we are not planning to implement this.

@Eilon what's the current feature makes it unnecessary implement something like this? Could you point me towards the blessed happy path?

@jsimmonsdavidccook one moderately-happy path would be
DisplayFor<TResult>(Expression<Func<TModel, TResult>> expression, string templateName)

DisplayFor() is not async, it only looks for .cshtml files in a few places, and the templateName is only a hint. But, it avoids the context / naming issues I mentioned.

Is there another issue to track this?
Just saw that we have a tag helper to do this but no Htmlhelper equivalent
https://github.com/aspnet/Mvc/blob/dev/src/Microsoft.AspNetCore.Mvc.TagHelpers/PartialTagHelper.cs

Hi, it looks like you are posting on a closed issue/PR/commit!
We're very likely to lose track of your bug/feedback/question unless you:

Open a new issue
Explain very clearly what you need help with
If you think you have found a bug, include detailed repro steps so that we can investigate the problem

As @Eilon said earlier:

Closing because we are not planning to implement this.

Why is the <partial> tag helper insufficient for your scenario?

Not insufficient just figured there was a drive to make tag helpers and html helper 1 to 1 in functionality

Not insufficient just figured there was a drive to make tag helpers and html helper 1 to 1 in functionality

@Tarig0 No, that's actually not a goal. We generally prefer tag helpers except for cases where there really isn't a tag involved (like @Html.NameFor() for example).


Cluster Overview is missing content for local cluster

Console Error:
vue.runtime.esm.js:1888 TypeError: Cannot read property 'toLowerCase' of undefined
    at Proxy.displayProvider (management.cattle.io.cluster.js:31)
    at Object.get (resource-proxy.js:75)
    at f.<anonymous> (InfoBoxCluster.vue?75c6:1)
    at f.t._render (vue.runtime.esm.js:3548)
    at f.r (vue.runtime.esm.js:4066)
    at _n.get (vue.runtime.esm.js:4479)
    at new _n (vue.runtime.esm.js:4468)
    at t (vue.runtime.esm.js:4073)
    at f.jn.$mount (vue.runtime.esm.js:8415)
    at init (vue.runtime.esm.js:3118)

This was addressed in https://github.com/rancher/dashboard/pull/579 after looking at the setup in question it seems to have a cached copy of the old code. The setup in question is HA and recently upgraded. Perhaps we have a caching issue?

The local cluster info was able to be viewed on a fresh HA install, so there might be some kind of caching issue.
@vincent99 would you be able to take a look when you get the chance.

Are you sure you're not just looking at 2.4.x?  https://github.com/rancher/dashboard/blob/release-2.4/models/management.cattle.io.cluster.js#L31

I had a couple of setups at the time, so going to close this for now.


Human-mode sorting in performance table

In GitLab by @mcastril on Jan 4, 2024, 16:54
The performance view is not sorting tasks by hierarchical or submission order (I think it's using jobname alphabetical order), which is confusing.

The # therefore only indicates the rowid, which can be misleading.
I think it would be enough to internally pad the CHUNK number in the jobname with zeroes.

In GitLab by @mcastril on Jan 9, 2024, 10:20
Thanks Luiggi, I think it's a good approach

... (I think it's using jobname alphabetical order), which is confusing.

Yes, it is just sorted by name

The # therefore only indicates the rowid, which can be misleading.
I think it would be enough to internally pad the CHUNK number in the jobname with zeroes.

I think we can replace or remove the # column, and add the chunk number column (if exists). (This is a modification to the API too)
Then, do the order by chunk and then by name (if in the same chunk).

mentioned in commit a9cba65c5bcecc7061da8c6804f6f44c170d9c45

This was implemented a long time ago, but it is now available in production (ES and DE) along with the "Export to CSV" option from #95.


fixed jsdoc parameter name

This PR updates the jsdoc parameter name "producer" to "recipe" to make the ide hints work again (currently broken)

Thanks for catching!


Coverage report via CI not working

The CI update in #103 broke the coverage reporting.
The used compiler was changed from gcc-11 to gcc-12. Might that be a problem? The error can be found e.g. here: https://github.com/rdf4cpp/rdf4cpp/actions/runs/3593178749/jobs/6049803368#step:10:14

Resolved some time ago


API / simpleObject / defaultValue

What do you think to add the possibility to add defaultValue with the first parameter ?

function
defaultValue

simpleObject()
{}

simpleObject({ defaultValue: {} })
{}

simpleObject({ my: 'object' })
{}

simpleObject('string')
'string'

simpleObject([1, 2, 3])
[1, 2, 3]

And what about
simple.object
simple.string
simple.bool
simple....

it makes it more complex the api no ?
But why not :)

The main problem I have with the current API is that simpleObject doesn't represent the fact that it can be any type of value.

After some reflection, I like @fabienjuif idea. It could allow to have a defaultData depending of the chosen type. And it also allow us to add some custom actions, toggle for boolean for example.


L3: Write CSV outputs for the R Shiny dashboard

As a data analyst, I want to be able to visualize the oceanstream outputs via the R-Shiny dashboard.
Acceptance criteria:

After reading a processed series of files and running NASC, frequency differentiation and fish school detection on that, the system should output CSVs with the following fields:

_GPS.csv

lon
lat
dt(datetime)
knt(speed in knots)

_NASC.csv

filename
seabed_depth
start_lat
end_lat
start_lon
end_lon
start_nm
end_nm
start_time
end_time
start_speed
end_speed
start_ping
end_ping
NASC_st_range
NASC_en_range
NASC_18000.0
Observed_samples_18000.0
Valid_samples_18000.0
WMD_18000.0
NASC_38000.0
Observed_samples_38000.0
Valid_samples_38000.0
WMD_38000.0
NASC_120000.0
Observed_samples_120000.0
Valid_samples_120000.0
WMD_120000.0
NASC_200000.0
Observed_samples_200000.0
Valid_samples_200000.0
WMD_200000.0
fish_NASC_38000

_Sv_38000.0.csv

Sv data

_calibration.csv

Frequency
Pulse_length
Gain Sa

_fish_schools.csv

label
area
filled_area
bbox-0
bbox-1
bbox-2
bbox-3
centroid-0
centroid-1
eccentricity
mean_intensity
min_intensity
max_intensity
uncorrected_thickness
uncorrected_length
Sv_mean
npings
nsamples
mean_ping_width
mean_sample_height
uncorrected_area
mean_range
mean_ping
standard_deviation
frequency
seabed
corrected_length
corrected_length_good
corrected_thickness
aspect
start_range
end_range
start_lat
end_lat
start_lon
end_lon
start_time
end_time
start_speed
end_speed
start_nm
end_nm
filename
max_depth

_metadata.csv

Name(variable name)

beamwidth twoway along/athwartship
angle offset along/athwartship
angle sensitivity along/athwartship
equivalent beam angle
gpt software version
saple interval
transmit bandwidth
transmit duration nominal )Frequency

Value

Tasks

[ ] implement the export_csvs function in L3

See also: https://github.com/OceanStreamIO/Roadmap/issues/4

NASC, Sv and fish schools need to be calculated. The rest can be obtained from the unprocessed file.
GPS.csv comes from Platform
Calibration.csv comes from Vendor Specific
Metadata.csv comes from Platform and BeamGroup


Image Field is not uploading image blob to GitHub

- What is the current behavior?
When creating a new entry on a collection that has a list of  image widgets, the images are not being uploaded (or is not being added to the commit).
- If the current behavior is a bug, please provide the steps to reproduce.
On a collection with a list of image widgets, create a new entry and choose one or more images to upload.
- What is the expected behavior?
Image should be part of commit to Github

Problem is related to the file format. We should restrict file select dialog to image types only.


Check domains for blocking

This PR adds blocked domain checking

Find domains reported by two or more users
Alert blocked domains list to Slack

@HellsYeah Did you modified compose file to make sure that there is variable for the slack secret?

@HellsYeah Did you modified compose file to make sure that there is variable for the slack secret?

Now yes, secrets added


Set v2.0.1

What does this PR do?
Sets the version to 2.0.1.
How should it be tested manually?
yarn test
# or
npm test

Pull Request Test Coverage Report for Build 25

0 of 0 (NaN%) changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 100.0%

Totals

Change from base Build 21:
0.0%

Covered Lines:
898

Relevant Lines:
898

💛  - Coveralls


systemd 239 and nspawn containers break on upgrade to 18.09

Issue description
With systemd 239, running containers containing older systemd versions broke: https://github.com/systemd/systemd/issues/9563 , with fix available here: https://github.com/systemd/systemd/pull/10104
Currently, upgrading from nixos-18.03 to nixos-18.09 (and systemd 237 to 239) won't boot up containers with an older systemd again.
We should evaluate backporting above patch to release-18.09, to prevent breakage.
Steps to reproduce
With NixOS, this can be reproduced like this:
systemd.targets."machines.target".requiredBy = ["default.target"];
systemd.nspawn."foo" = {
  enable = true;
  wantedBy = [ "machines.target" ];
};

Extract a debian stretch bootstrap to /var/lib/machines/foo, try to start it.
/cc @vcunat @samueldr

@globin @fpletz I tested this locally with:
systemd.package = pkgs.systemd.overrideAttrs (old: {
  patches = [
    (pkgs.fetchpatch {
      url = "https://github.com/NixOS/systemd/commit/6f7a429e9b0ed2bc1e7e5c24ea5bc70d72c36962.patch";
      sha256 = "0qxghr0vzfkxsb61xmzy5x5lfws6fyvxpcggq4hp406waa3ng1jc";
    })
  ];
 });

will keep these open until staging-18.09 is merged back to release-18.09.

Already in channels/nixos-18.09-small, thanks!


Allow Colons In Front Matter

Revert forcefully removing colons, add documentation re: YAML to set expectations and warnings

/preview


Fix performance issue in applyMoveTransition

getBoundingClientRect causes a DOM reflow when the DOM has been written to between calls (see http://stackoverflow.com/a/37686736/945863). So to avoid this, first call getBoundingClientRect on each element in one loop with no intermediate writes to the DOM, then use those results while writing to the DOM in a second loop.
Potential issue with this PR: I'm not sure whether frags is outwardly visible. I use the property _newPos on each frag, which, if it's used by external code, will be stomped.
Before this change, on a list of 23 elements, I was seeing this performance in Chrome:

Notice that each call to getBoundingClientRect takes around 30ms. With these changes, it now looks like:

And the whole call to applyMoveTransition is down to 40ms.

Thanks!


[TOPIC-BLE-LLCP] Bluetooth: controller: Make misc. control procedures compilation dependant on KConfig

The following procedures are now only compiled in when specified by KConfig:
Data Length Update, PHY Update, Le Ping, Minimum Used Channels & Encryption
Running the compile_permutate_kconfigs.sh successfully compiles all permutations of said procedures

Just fixed a mishap re. muc unit test - had forgotten to mock CONFIG_BT_CTLR_MIN_USED_CHAN=y

rebased on zephyr 2.6 sync, pending rebase to sync fix

I want to add one thing here (it is not a request for changes). It seems to me, that keeping multiple control procedures in common files like ull_llcp_local.c  makes maintenance more difficult. If procedures were split into separate source files then we could conditionally add those files into build. That would decrease the number of #if define/#endif sections. Maybe it is a good step for optimization stage? Although work is done, so maybe it is not good idea...

@ppryga The reasoning behind ull_llcp_local/remote was to have code/logic that is common to local/remote (respectively) procedure handling in one place and not duplicated over several files - this way it can more easily be optimized later. Re. ull_llcp_common - this is a 'container' for the bunch of procedures that share some simplicity and thus could possibly be more easily optimized at a later stage.

@ppryga The reasoning behind ull_llcp_local/remote was to have code/logic that is common to local/remote (respectively) procedure handling in one place and not duplicated over several files - this way it can more easily be optimized later. Re. ull_llcp_common - this is a 'container' for the bunch of procedures that share some simplicity and thus could possibly be more easily optimized at a later stage.

@thoh-ot Yes, I get the idea. I just wanted to leave my thoughts in case it could be useful in later stage.

rebased and fixed up some commits messages that needed some boby


Theming support

Are there any plans to add theming, similar to how styled-components is doing it?

Hum. Good point... I'd rather provide sth more general to pass on values to the components. The issue might be about typing... I need to think about it.

@Sharcoux please let me know once you have some ideas in mind. I could also propose something I you want.

Well, the idea is to have a context provider that passes its data to all styled components. This part is obvious.
Now, what I would like is to create a SharedDataProvider or sth like that, instead of a theme provider. The idea is that we can use it to share any kind of data with the components.
The implementation seems straight forward, but I don't know how to type this... Should I just use unknown and let the user cast the data?

@techquestions  Done. Please try version 1.3.0-0 and report if you notice anything wrong. I didn't have time to test correctly.

Hello, when will it be available on NPM? It prevents me from trying the solution.

Sorry, I missed your reply, but 1.3.0-0 was normally available on NPM. Anyway, now you can use the version 1.3.1. Sorry for the delay in answer.
Don't hesitate to reopen if you encounter an issue with the new solution, and thanks for the feedback!


Removed conversation history section from Skype Web SDK and UCWA TOC

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

Skype/TOC.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

Skype/TOC.md
:white_check_mark:Succeeded

Skype/UCWA/WhatsNewInUCWA2_0.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

@AasveenKaur This is an old PR, so closing. If you still think these changes need to be made, please file a new PR. Thanks.


🍒 Cherry pick PR #7414 to staging 🍒

🍒 Cherry pick https://github.com/Expensify/App/pull/7414 to staging 🍒

🚀 Cherry-picked to staging by @OSBotify in version: 1.1.33-2 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes.

🚀 Deployed to production by @roryabraham in version: 1.1.33-3 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


Recent shape checking changes result in new XLA errors

It turns out that PR #2017 breaks the following code:
array = np.ones(5)
print(array[:10])

should print [1. 1. 1. 1. 1.] but instead throws an error
Traceback (most recent call last):
  File "/Users/necula/Source/jax/jax/interpreters/xla.py", line 230, in primitive_computation
    return c.Build()
  File "/Users/necula/Source/jax/jax/lib/xla_bridge.py", line 281, in Build
    *args, **kwargs)
  File "/Users/necula/Source/jax/build/jaxlib/xla_client.py", line 734, in Build
    return Computation(self._builder.Build(), backend=backend)
RuntimeError: Invalid argument: Slice size at index 0 in gather op is out of range, must be within [0, 6), got 10.:

In some sense this error is reasonable, but it is not what JAX used to do before.
Before JAX used to sanitize indices, and produce the following JAXPR for the gather:
{ lambda b ; a.
  let c = gather[ dimension_numbers=GatherDimensionNumbers(offset_dims=(0,), collapsed_slice_dims=(), start_index_map=(0,))
                  operand_shape=(5,)
                  slice_sizes=(5,) ] a b
  in c }

After this change, the JAXPR is:
{ lambda b ; a.
  let c = gather[ dimension_numbers=GatherDimensionNumbers(offset_dims=(0,), collapsed_slice_dims=(), start_index_map=(0,))
                  operand_shape=(5,)
                  slice_sizes=(10,) ] a b
  in c }

Thanks for catching this and managing it! I can follow up.


Visualization of in-progress release notes

This URL in the old website:
https://www.boost.org/users/history/in_progress.html
displays the in-progress release notes for the next Boost version. The current redirection rules for the new website map
https://boost.io/users/history/in_progress.html
to
https://www.boost.io/releases/boost-in-progress/
which is a 404.
This need yet to be specified. Some issues to consider that are potential blockers/difficulties:

If we add "in_progress" to the Releases drop-down list, we'll get a mismatch when switching to "Libraries".
I think the in-progress release notes are not being perodiocallly (like, daily) copied to the new website.

If we add "in_progress" to the Releases drop-down list, we'll get a mismatch when switching to "Libraries"

We can add support for this without affecting the drop-downs.

We can add support for this without affecting the drop-downs.

Kenneth and I had a conversation on this, this is a more detailed description of how the dropdown-less solution would work:

Some page, for instance https://www.stage.boost.cppalliance.org/releases/in_progress/, would display the in-progress release notes.
This page has the same layout as the Releases section, but it doesn't change and is not affected the version cookie. Clcking on "Releases" or "Libraries" from here goes to the normal behavior (displaying information for whatever shipped version the user has their cookie set on).

I think the in-progress release notes are not being perodiocallly (like, daily) copied to the new website.

Sam confirms that
https://github.com/boostorg/website/blob/master/users/history/in_progress.html
is available and can be used by the new website just like the rest of release notes pages.


aws-c-common: 0.6.8 -> 0.6.9

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/awslabs/aws-c-common/releases.
meta.description for aws-c-common is: "AWS SDK for C common core"
meta.homepage for aws-c-common is: "https://github.com/awslabs/aws-c-common"
meta.changelog for aws-c-common is: ""
Updates performed

Version update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact

Checks done (click to expand)

built on NixOS

The tests defined in passthru.tests, if any, passed

0 of 0 passed binary check by having a zero exit code.

0 of 0 passed binary check by having the new version present in output.

found 0.6.9 with grep in /nix/store/lsa0darplqdm3pnpyclf835a5lcdnsnj-aws-c-common-0.6.9

found 0.6.9 in filename of file in /nix/store/lsa0darplqdm3pnpyclf835a5lcdnsnj-aws-c-common-0.6.9

directory tree listing: https://gist.github.com/fc406b4c9c3d04c85bcb68b9028e2773

du listing: https://gist.github.com/8986c7596f179ae8b043cb3540b457fc

Rebuild report (if merged into master) (click to expand)

269 total rebuild path(s)

75 package rebuild(s)

74 x86_64-linux rebuild(s)
66 i686-linux rebuild(s)
64 x86_64-darwin rebuild(s)
65 aarch64-linux rebuild(s)

First fifty rebuilds by attrpath
aws-c-cal
aws-c-common
aws-c-event-stream
aws-c-io
aws-checksums
aws-sdk-cpp
bundix
cabal2nix
cachix
common-updater-scripts
crate2nix
crystal2nix
dep2nix
dydisnix
fusionInventory
go2nix
haskellPackages.cabal2nix-unstable
haskellPackages.cachix
haskellPackages.hercules-ci-agent
haskellPackages.hercules-ci-cnix-expr
haskellPackages.hercules-ci-cnix-store
haskellPackages.nix-paths
haskellPackages.nvfetcher
haskellPackages.update-nix-fetchgit
hercules-ci-agent
hubstaff
hydra-unstable
libnixxml
lispPackages.quicklisp-to-nix
lispPackages.quicklisp-to-nix-system-info
nix
nix-bundle
nix-direnv
nix-doc
nix-du
nix-index
nix-pin
nix-plugins
nix-prefetch
nix-prefetch-bzr
nix-prefetch-cvs
nix-prefetch-docker
nix-prefetch-git
nix-prefetch-hg
nix-prefetch-scripts
nix-prefetch-svn
nix-serve
nix-simple-deploy
nix-template
nix-update

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/lsa0darplqdm3pnpyclf835a5lcdnsnj-aws-c-common-0.6.9 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A aws-c-common https://github.com/r-ryantm/nixpkgs/archive/4539a275365ec383f69bd2b9aa82a08b8076f2c4.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/lsa0darplqdm3pnpyclf835a5lcdnsnj-aws-c-common-0.6.9
ls -la /nix/store/lsa0darplqdm3pnpyclf835a5lcdnsnj-aws-c-common-0.6.9/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

1 package failed to build:

nixos-install-tools

62 packages built:

aws-c-cal
aws-c-common
aws-c-event-stream
aws-c-io
aws-checksums
aws-sdk-cpp
bundix
cabal2nix
cachix
common-updater-scripts
crate2nix
crystal2nix
dep2nix
dydisnix
fusionInventory
go2nix
hci
hercules-ci-agent
hubstaff
hydra-unstable
libnixxml
lispPackages.quicklisp-to-nix
lispPackages.quicklisp-to-nix-system-info
nix (nixStable)
nix-binary-cache
nix-bundle
nix-direnv
nix-doc
nix-du
nix-index
nix-pin
nix-plugins
nix-prefetch
nix-prefetch-bzr
nix-prefetch-cvs
nix-prefetch-docker
nix-prefetch-git
nix-prefetch-hg
nix-prefetch-scripts
nix-prefetch-svn
nix-review (nixpkgs-review)
nix-serve
nix-simple-deploy
nix-template
nix-update
nix-update-source
nixFlakes (nixUnstable)
nixos-generators
nixos-option
nixos-rebuild
nixos-shell
nixui
nvfetcher
python38Packages.nix-kernel
python38Packages.nixpkgs
python38Packages.pythonix
python39Packages.nix-kernel
python39Packages.nixpkgs
python39Packages.pythonix
update-nix-fetchgit
vgo2nix
vulnix

Maintainer pings
cc @orivej @edolstra @r-burns for testing.

Result of nixpkgs-review pr 133857 at 4539a275 run on aarch64-linux 1

2 packages marked as broken and skipped:

nixui
ovftool

5 packages failed to build:

aws-c-cal
aws-c-common
aws-c-event-stream
aws-c-io
aws-checksums

57 packages skipped due to time constraints:

aws-sdk-cpp
bundix
cabal2nix
cachix
crate2nix
dep2nix
dydisnix
fusionInventory
go2nix
haskellPackages.cabal2nix-unstable
...

Note that build failures may predate this PR, and could be nondeterministic or hardware dependent.
Please exercise your independent judgement. Does something look off? Please file an issue or reach out on IRC.

I think the r-rmcgibbo timeout is spurious. It builds fine on my rpi4

I've got exactly that same failure on nixos.
Perhaps the test is flaky ?
I've opened an issue upstream
https://github.com/awslabs/aws-c-common/issues/834
That test has been flaky for a while. Hopefully this can shed some light on it.


⚠ Bofrost.lu has degraded performance

In 2b8627f, Bofrost.lu (https://www.bofrost.lu) experienced degraded performance:

HTTP code: 200
Response time: 1378 ms

Resolved: Bofrost.lu performance has improved in 9bd31b2 after 8 minutes.


Update patch release process

Ping @tiborvass @thaJeztah.

Updated. WDYT @tiborvass?

LGTM

LGTM with Tibor's nits addressed

Updated :)

documentation CI passed, no need to run all the others. Merging


PLAT-278: implement unit test subsystem for conveyor

- What I did
Simplify testing SMExecute
- How I did it
Convert struct object.Catalog to interface and use it as dependency in state machine. This allow mock interface of object.Catalog and access to internal of state machine object
- How to verify it
Run test
- Description for the changelog

https://github.com/insolar/assured-ledger/pull/145


[Request]: Provide instructions for building from source

Is there an existing issue for this?

[X] I have searched the existing issues

Is your feature request related to a problem? Please describe.
I run desktop linux and would like to compile this myself but am unfamiliar with this project structure.
Describe the solution you'd like
Could you update the read me to give instructions on how to build it from source?

It should be

git checkout
npm install
npm start

Please close the issue if that allows you to build from source.

That does it


Shouldn't import() return default export?

Not sure if this is intentional or not. I'm busy converting CJS to ES6/System.register for use in the register loader, and find some differences in the way default exports are imported. I was using module.exports={...}, which sets the module namespace to {...}. With ES6 I'm using export default ..., which creates a namespace called default; to import in CJS this needs require(...).default. Fair enough. With ES6/register import the .default is not necessary. Again, ok. But if I use loader.import I have to specify default again: loader.import(...).then(function(m){...m.default...}). Is this correct?

This was a convenience in SystemJS that won't exist in real ES module environments.

on testing this out a bit more, I've decided this is correct, though the handling of defaults in ES6 is a bit confusing. If I take the example in https://github.com/systemjs/systemjs/blob/master/docs/es6-modules-overview.md#default-import-and-export, export default function foo() effectively means 'export the foo function as "default"'' and is the same as export default function() which means 'export the anonymous function as "default"'. You would probably import this with import foo, but as in the example you can call the imported default anything you like. import customName from effectively means  import default as customName. With import() you don't have this rename ability: export function foo would be imported with import(...).then(function(module) {module.foo()}, whereas export default function is imported with import(...).then(function(module) {module.default()}.
Probably be a good idea to expand the demo to explore these different options - though whether I'll have time for that is another matter :-)


Broken link

https://support.microsoft.com/office/view-live-transcription-in-a-teams-meeting-dc1a8f23-2e20-4684-885e-2152e06a4a8b (under the Allow Transcription heading) returns a Bad Request:

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: dc665475-f843-e4c1-0ca6-0b83873abb54
Version Independent ID: 95d32598-c920-ed5c-d665-69394528ca27
Content: Manage meeting policies - Microsoft Teams
Content Source: Teams/meeting-policies-in-teams.md
Service: msteams
GitHub Login: @tonysmit
Microsoft Alias: tonysmit

@Reeced40

@gregmilligan thank you for reaching out. I've just checked the link and it seems it's been fixed in the interim. Please confirm from your side.

@scanum this can be closed thank you.


Milestones evaluation broken

./parkrun-milestones bushy
-- Fetching data for Bushy parkrun...
panic: bushy: missing run #1
goroutine 1 [running]:
main.main()
/Users/x/Documents/parkrun-milestones/cmd/milestones/main.go:100 +0xb38
The regex for patternNumberOfRuns and patternRunRow from event.go looks correct at first glance but I'm assuming the website has subtly changed somewhere in the past couple of weeks, I just can't spot where.

Thanks for the report. I will have a look...

The date format in attributes of the 'eventhistory' table has changed.
Old: DD/MM/YYYY
New: YYYY-MM-DD
That is causing the parser to error out.

Fixed by 6eabe5a


Daily backups of database

firebase offers this on the Blaze plan, although it would be good to have the ability to export data later on, I am closing this issue


Add naming conventions to best practices section - 1.7

Change Description

Resolves #940
API Changes

[ ] API Changes

Documentation Additions

[ ] Documentation Additions

What's the difference between this and #941?


updated text filewith code link and questions

The code pen looks spot on great job with that.
The Git is missing some answers. Perhaps they were left behind and just need a push


Error on installation

Hi everyone,
i tried the installation steps that you provide on this githup readme but i fail at the point of load data to the database.
In Detail at the command "php artisan migrate --seed".
I get the following error:
php artisan migrate --seed

In Connection.php line 664:

  SQLSTATE[HY000] [2002] No such file or directory (SQL: select * from information_schema.tab
  les where table_schema = handesk2 and table_name = migrations)

In Connector.php line 67:

  SQLSTATE[HY000] [2002] No such file or directory

My system is osx 10.13.6 .
Does someone know what i am doing wrong? or where the error comes from?
Best regards,
h1ps

Same thing happened to me, it appears as though the migration step wouldn't be necessary for a new install, and the tables don't exist to migrate.
However, there are no instructions on how to ACTUALLY start new. Seems odd. I really liked the look of this app, but my inability to get it installed and running is kind of a problem...

@h1ps and @instanttim thank you for your feedback, can you send me an image of the database it created?
The first step you need is to have a database created and set its credentials to the .env file, once you have the database you can do
instead of php artisan migrate --seed
in two steps
php artisan migrate
php artisan db:seed
If the first fails, it looks like the database handesk is not created in you systems,
you can use the sequel pro software to create new databases or the command line itself
Let me know

I was working remotely and borked my remote process. But before I did I think I discovered that it’s a laravel issue because it assumes a specific path for the socket file for MySQL. I’m using MAMP and the socket is located elsewhere... and I guess it uses the socket if you have “localhost” instead of an IP.
I’ll fix it by either using an IP or patching the socket location.  But it’ll have to be tomorrow when I have physical access again.
For reference in case it’s something you want to add to the readme; Here’s what I see when I try to run the commands…

Great! thank you!
let me know if you find the solution so I can put it on the readme as well

Sure enough, the migrate and db:seed both worked fine once I added the following to the .env file. A lot of info out there said I'd have to edit the config/database.php to in order for it to use the override in the .env file, but when I looked at it the current versions must have been updated for this situation, no editing was necessary. Just need to set DB_SOCKET to the path of your socket file, in the case that you're using localhost and it defaults to trying to use sockets instead of IP connections.
DB_SOCKET=/Applications/MAMP/tmp/mysql/mysql.sock

Obviously for a lot of people, the socket file will be in /tmp/mysql.sock or somewhere similar. The MAMP case is obviously weird because it's not the system installed mysql.

Additional note, the readme.md could tell you what the url is to get started... I've never used any laravel-based apps or anything, it took me 15 min to get a page to load properly. I kept clicking on various .php files which leaves the .php in the URL and that causes CSS and IMG tags to all be malformed.

I have the same error and DB_SOCKET doesn't work...


Update from Express3 to Express4

Hi guys,

Express 3.x support is ending soon

This series will continue to receive only security updates and bug fixes until July 2015. It is highly recommended to upgrade to Express 4.x.

So, I've tried to update by myself the dependency, you can take a look: https://github.com/Josebaseba/sails
Almost all the test are passing, just four of the CORS tests are giving me some problems and the layouts aren't working yet (don't know why, the test are passing).
All the Connect dependencies are gone, I've added Express packages to replace them: express-session, csurf, cookie-parser and compression.
But the biggest changes are related to the Router, to both of them (the internal and the external), in express4 the Router works pretty different.
More info: https://github.com/strongloop/express/wiki/Migrating-from-3.x-to-4.x and http://expressjs.com/4x/api.html#router
Before following working in that way I think that I need some light or help, am I following the correct path? Should I open a Pull Request or something?
Any kind of help is welcome!

A lot of the utilities within Express are being broken out into (or implemented in) modules under pillarjs, such as the router. If Sails is only utilizing parts of Express it should really just implement these modules directly.

+1, I began to migrate but I need help with a router https://github.com/listepo/sails/blob/next/lib/router/index.js#L219

@listepo I've all the router changes working: https://github.com/Josebaseba/sails/blob/master/lib/router/index.js#L48
I'm looking for some help with the res.view layouts and few tests with the CORS to finish the migration.

@Josebaseba, I try to help.

@Josebaseba, can get specific examples that not work?

Sure!
Related with the CORS the test are passing here: https://github.com/Josebaseba/sails/blob/master/test/integration/hook.cors_csrf.test.js#L74
The lines that don't work are commented (the first five tests), the problem is that I'm getting a 404 instead of a 200, but all the headers are perfectly. I spend a lot of time trying to find the reason but with no luck.
And the other problem is that the layout is no been injected when you call to the res.view method. In this case I haven't spend so much time trying to fix it. Looking at this comment it looks like the already have this problem updating to express3 newer versions: https://github.com/Josebaseba/sails/blob/master/lib/hooks/views/res.view.js#L330
In this case all the test are passing but if you use this repository in a Sails project you will see that the layout is not being used.
Thanks for you help!!

+1.
I guess express3 beeing abandoned is good enough to justify an upgrade.
I'm not sure right now wether to start projects with sails as it gets highly based on an outdated core.

hey @listepo, sorry it took me so long to get to this. We really appreciate the work you're doing. What can I do to help you?

@tjwebb, thanks. On the weekend, I want to debug the code and trace with Spy-js(Webstorm). Any news about the Sails.js v1? The new version is based on code from the master or written anew? I want to understand that the time for refactoring and tests will be time well spent.

Hey @listepo did you see my repo with the express update? What do you think, did you see any problem?
And @tjwebb, do you think that I should keep working to fix the last problems (the few CORS tests and res.view layouts problem) or you've planned another thing to the sails migration and I shouldn't expend more time on this?
Actually I've a really good time working on this update, I learn a lot, and I don't have any problem if you think that it's not the best way to update the dependency. I'll keep the fork there, just if someone wants to look something.
In the other hand, if you think that it can work, I'll be happy to explain in detail all the changes that I made, and what are missing to end the update.
Thanks guys!

@Josebaseba, I did not see the error, but I think it is worth trying to change the code to work with the cors on https://github.com/expressjs/cors.

@Josebaseba , It did not work to resolve quickly. Maybe we should do the PR has not been lost to work?

@listepo this week I've a lot of work to do, but my intention is setting the repo up to date to new commits, after that I'll create a pull request trying to explain point by point al the changes.

:+1:

I've done the pull request: https://github.com/balderdashy/sails/pull/3235
So I'm going to close this issue. Thanks!

A lot of the utilities within Express are being broken out into (or implemented in) modules under pillarjs, such as the router. If Sails is only utilizing parts of Express it should really just implement these modules directly.

That's the plan- some of the first steps are detailed in ROADMAP.md.


Implement basic metrics

📝 Summary
Implement basic prometheus metrics endpoint.
⛱ Motivation and Context
Most of the time we will want to be able to observe the internal state of the app with prometheus.
TL;DR
go run github.com/flashbots/go-template/cmd/httpserver --metrics-addr <IP_ADDRESS>:6061

curl -isS <IP_ADDRESS>:8080/api

HTTP/1.1 200 OK
Date: Thu, 23 Nov 2023 15:02:34 GMT
Content-Length: 0

curl -sS <IP_ADDRESS>:6061/metrics | grep -v -e "^#.*$" | sort

otel_scope_info{otel_scope_name="github.com/flashbots/go-template",otel_scope_version=""} 1
otel_scope_info{otel_scope_name="go.opentelemetry.io/contrib/instrumentation/runtime",otel_scope_version="0.46.1"} 1
process_runtime_go_cgo_calls{otel_scope_name="go.opentelemetry.io/contrib/instrumentation/runtime",otel_scope_version="0.46.1"} 1
process_runtime_go_gc_count_total{otel_scope_name="go.opentelemetry.io/contrib/instrumentation/runtime",otel_scope_version="0.46.1"} 0
process_runtime_go_gc_pause_total_ns_total{otel_scope_name="go.opentelemetry.io/contrib/instrumentation/runtime",otel_scope_version="0.46.1"} 0
process_runtime_go_goroutines{otel_scope_name="go.opentelemetry.io/contrib/instrumentation/runtime",otel_scope_version="0.46.1"} 8
process_runtime_go_mem_heap_alloc_bytes{otel_scope_name="go.opentelemetry.io/contrib/instrumentation/runtime",otel_scope_version="0.46.1"} 1.531376e+06
process_runtime_go_mem_heap_idle_bytes{otel_scope_name="go.opentelemetry.io/contrib/instrumentation/runtime",otel_scope_version="0.46.1"} 1.261568e+06
process_runtime_go_mem_heap_inuse_bytes{otel_scope_name="go.opentelemetry.io/contrib/instrumentation/runtime",otel_scope_version="0.46.1"} 2.473984e+06
process_runtime_go_mem_heap_objects{otel_scope_name="go.opentelemetry.io/contrib/instrumentation/runtime",otel_scope_version="0.46.1"} 3228
process_runtime_go_mem_heap_released_bytes{otel_scope_name="go.opentelemetry.io/contrib/instrumentation/runtime",otel_scope_version="0.46.1"} 1.261568e+06
process_runtime_go_mem_heap_sys_bytes{otel_scope_name="go.opentelemetry.io/contrib/instrumentation/runtime",otel_scope_version="0.46.1"} 3.735552e+06
process_runtime_go_mem_live_objects{otel_scope_name="go.opentelemetry.io/contrib/instrumentation/runtime",otel_scope_version="0.46.1"} 3228
process_runtime_go_mem_lookups_total{otel_scope_name="go.opentelemetry.io/contrib/instrumentation/runtime",otel_scope_version="0.46.1"} 0
request_duration_api_microseconds_bucket{otel_scope_name="github.com/flashbots/go-template",otel_scope_version="",le="+Inf"} 1
request_duration_api_microseconds_bucket{otel_scope_name="github.com/flashbots/go-template",otel_scope_version="",le="0.01"} 1
request_duration_api_microseconds_bucket{otel_scope_name="github.com/flashbots/go-template",otel_scope_version="",le="0.025"} 1
request_duration_api_microseconds_bucket{otel_scope_name="github.com/flashbots/go-template",otel_scope_version="",le="0.05"} 1
request_duration_api_microseconds_bucket{otel_scope_name="github.com/flashbots/go-template",otel_scope_version="",le="0.1"} 1
request_duration_api_microseconds_bucket{otel_scope_name="github.com/flashbots/go-template",otel_scope_version="",le="0.25"} 1
request_duration_api_microseconds_bucket{otel_scope_name="github.com/flashbots/go-template",otel_scope_version="",le="0.5"} 1
request_duration_api_microseconds_bucket{otel_scope_name="github.com/flashbots/go-template",otel_scope_version="",le="1"} 1
request_duration_api_microseconds_bucket{otel_scope_name="github.com/flashbots/go-template",otel_scope_version="",le="10"} 1
request_duration_api_microseconds_bucket{otel_scope_name="github.com/flashbots/go-template",otel_scope_version="",le="2.5"} 1
request_duration_api_microseconds_bucket{otel_scope_name="github.com/flashbots/go-template",otel_scope_version="",le="30"} 1
request_duration_api_microseconds_bucket{otel_scope_name="github.com/flashbots/go-template",otel_scope_version="",le="5"} 1
request_duration_api_microseconds_bucket{otel_scope_name="github.com/flashbots/go-template",otel_scope_version="",le="60"} 1
request_duration_api_microseconds_count{otel_scope_name="github.com/flashbots/go-template",otel_scope_version=""} 1
request_duration_api_microseconds_sum{otel_scope_name="github.com/flashbots/go-template",otel_scope_version=""} 0
runtime_uptime_milliseconds_total{otel_scope_name="go.opentelemetry.io/contrib/instrumentation/runtime",otel_scope_version="0.46.1"} 93413
target_info{service_name="unknown_service:httpserver",telemetry_sdk_language="go",telemetry_sdk_name="opentelemetry",telemetry_sdk_version="1.21.0"} 1

✅ I have run these commands

[x] make lint
[x] make test
[x] go mod tidy

Very nice, thanks!
Could you add some information to the README (either root readme or create a metrics readme) with links to documentation, best-practices and information about how to use more metric types?

Would love a tiny README in the metrics package with just a few links to best practices and maybe some more metrics types.

Added a readme here:
https://github.com/flashbots/go-template/pull/17/commits/9811a31c2ad652228561e4ee91aa976f3292c138


Popclip hangs indefinitely when Applescript executes without a user dialog

I have made an extension that takes the user selection decides and offers the user to modify the color using the built in color selector. When you close the selector it types the color, replacing the original color.
When tested directly in the AppleScript editor, with simulated "{popclip text}" input, the script works well. If you run it in in PopClip you're left with a "PopClip loading Spinner" until you force quit the application.
However, add a single dialog (line 36 of color.applescript) for the user and the script returns to functioning, except the user has to click "ok".
I did try replacing the dialog call with a "delay 1", and "delay 10"
GitHub link to failing applescript
(GitHub Branch without dialog hack)[https://github.com/loadedsith/colorChooser-PopClip-Extention/tree/noDialog](GitHub Branch with dialog hack)[https://github.com/loadedsith/colorChooser-PopClip-Extention]
This script belongs in your Developer Tools section, as it's mostly for CSS editing.

Nick Moore wrote me back in an email about this and said:
"Hi Graham, just been looking at it. I think it's something to do with whether PopClip is the active application (or at least the one with the focused key window). It seems the color chooser is not appearing unless PopClip has an "active" window on screen. Showing the dialog seems to achieve this.
I notice that when PopClip is "spinning", you can double click the .popclipext again and it throws up to "do you want to install" box, which also brings the color chooser on screen. But it is not clickable.
It's very curious. I'm sorry I don't have a solution for you right now but maybe the above helps a bit?
I didn't have "GUI based" scripts in mind when I wrote it so I didn't test this kind of scenario...
If I figure anything out I will let you know"

I've found a way to make this extension work, but for this you need to load the Color Picker into an standalone AppleScript application. Now it is working as expected. When you click the Color Picker "Ok" button, the selected color is copied to the clipboard.

Due macOS Gatekeeper limitations, this extension may not be officially available on the PopClip Extensions Page.


add support for image printing

Hello @lukevp , some prediction of when image printing will be implemented, I have an implementation but its simpler and with .net standart, I tried to adapt mine using its package but I did not succeed. I can not use BitmapImage type in .net standart. Thank you!

from @juliogamasso
Hello @lukevp , some prediction of when image printing will be implemented, I have an implementation but its simpler and with .net standart, I tried to adapt mine using its package but I did not succeed. I can not use BitmapImage type in .net standart. Thank you!

@juilogamasso
I have added printing in v. 0.4.  Can you please give ESCPOS_NET.ConsoleTest a try and print both the Receipt as well as the Images test (Options 5 and 6)?
If you confirm it is working for you I will close this issue as complete.

Also, note that it uses netstandard 2.0 libraries and supports the image formats JPG, PNG, GIF and BMP.

@juliogamasso
It has also been published to Nuget as version 0.4.0 here: https://www.nuget.org/packages/ESCPOS_NET/
It typically takes a few hours to scan and update.

@lukevp I will test it this night. Tomorrow I'll write here the test result.

Hello @lukevp, thank you for tagging me in the message. I tested the Epson TM88v printer and it works perfectly, I have another printer model that uses the ESC-POS protocol but I did not succeed in image printing when sending an image is printing strange characters. I think the problem is related to the printer codepage but I can not find the default codepage for epson. Thank you so much again!

I'm glad the TM88V worked! Could you send a picture of the printout from the printer that didn't work? What model is it?
I don't believe that the code page command is implemented yet, but if you let me know what it is I can add that command as well.

@lukevp
I have an implementation that I adptei of a git project that works on all the printers I have, this model that does not work is from a national manufacturer "Bematech 4200 TH" it supports the ESCPOS commands but in the test it prints the characters. My implementation has been somewhat extensive, yours is much more summarized and direct. If you do not mind I could send you my implementation for you to know, it might be to merge the two and thus work on more generic models, if you agree please inform me of how I can send you my project for you to know. Greetings!

Thanks for the additional info and for sending the screenshot over!
Actually in this case I believe your print driver may not be set up for raw printing, and it doesn't have to do with the image command itself.
The reason I think that is at the beginning of == [ Start Full Receipt ] ==.
This is how it is supposed to appear:

Before that == [ ... on your example, you can see the characters VB@a- or something like that.  There should be nothing before the ==, since that is an initialize / start monitoring / line feed command which are non-printable.
The image commands start with [GS] ( L.  [GS] is a special character.  You can see after the == [ Start Full Receipt ] == that a (L is printing in your example.  So I am pretty sure it is due to the way the commands are being sent to the printer.
How is the printer connected (USB?), and what driver is it using?  Are you printing from Windows?
You can post the code example to github and link me to the repository, or you can just upload it here as a zip file if you'd like.  I'd like to see how the other library communicates with the printer, maybe it does something to tell the printer to use ESC/POS or to switch to raw mode.

Hello @lukevp, create a repository with the name ESCPOS_Printer, please check if access is verified. In the test with your project I used COM port and network

@juliogamasso Where did you create the repository?  I can check it out if you can send me a link.
The only difference I can think is the way the connection is set up or the bytes are sent across, or maybe some special initialization, since it's just plain ESC/POS otherwise.

https://github.com/juliogamasso/ESCPOS_Printer
I sent a developer invitation to you.

https://github.com/juliogamasso/Teste
I sent a developer invitation to you and moved the repository to public.

@lukevp I tested it and I get this print:

@montyclt  thank you for testing ! What type of printer was this for, and what communication method?

@montyclt thank you for testing ! What type of printer was this for, and what communication method?

VivaPos P83 printer connected via ethernet.

@juliogamasso I tried to use your printer library but nothing printed out, so I modified it so that I could capture the byte stream output from the program.  I then placed another test case in my tester program, so it will use all of the COM and file/networking logic but with the byte array from your program.
Please give this a try at your earliest convenience, and see if option 7 prints the XING-SAMPLE image or not.   You will have to clone the project and switch to branch bugfix/3-image-support which contains this test case.
If it prints properly, then I will compare the two generated byte arrays between my version and yours and determine where the issue is.  If it doesn't print properly, then the problem is not in the ESC/POS command generation, but somewhere else.
FYI, this does print properly on my Epson printer still.

@montyclt  if you don't mind, could you try the same branch bugfix/3-image-support and try option 7 to see if it prints on your printer?

@lukevp
I tested the printers I have, they all printed correctly. The Epson and Tanca printer use Serial connection, Bematech used network. If I can help with anything else please let me know.

Thanks @juliogamasso @montyclt for testing!  I'm glad both of these printed, that means the issue is just in the image byte command generation and should be straightforward to fix.  I may not be able to work on this until this weekend, but I will have a fix for you as soon as I am able to.

@juliogamasso  @montyclt I have identified the issue.  The old library from Juliogamasso appears to only support the GS v 0 command for printing bit images, and not the newer GS 8 command.  Epson recommends not using the GS v 0 command for new libraries because it is legacy and may not be supported by future printers, but since it appears that it is common in non-epson printers for the new GS 8 command to be unsupported, I have added support for GS v 0 to the library!
Please check out branch bugfix/3-image-support, and try the test #7 - legacy image support.  It works properly on my Epson (although it does cause horizontal striping on the largest images).  If it works on the Bematechs, I will complete this issue and release this updated version on Nuget.  I am also opening another ticket to add dithering support to the image conversion, so it will not only support black and white.
Thanks in advance for all your assistance!

@juliogamasso @montyclt I have identified the issue. The old library from Juliogamasso appears to only support the GS v 0 command for printing bit images, and not the newer GS 8 command. Epson recommends not using the GS v 0 command for new libraries because it is legacy and may not be supported by future printers, but since it appears that it is common in non-epson printers for the new GS 8 command to be unsupported, I have added support for GS v 0 to the library!
Please check out branch bugfix/3-image-support, and try the test 7 - legacy image support. It works properly on my Epson (although it does cause horizontal striping on the largest images). If it works on the Bematechs, I will complete this issue and release this updated version on Nuget. I am also opening another ticket to add dithering support to the image conversion, so it will not only support black and white.
Thanks in advance for all your assistance!

I tested the printers I have, everything is working. Some newer ones do not accept the command GS v 0, but as we have the GS 8 meets both new and old. Nice implementation @lukevp! Thanks!

Closed - this issue has been resolved and merged.  Thanks everyone for testing!


Floating windows keep staying on top

I have attached a video of the issue.
When I have floating windows with stacked windows, the floating window keeps staying as the top layer, even when changing focus to another window in a stack/non-floating window.
This isn't interaction isn't an issue with only floating windows. So for example, if I have two floating windows A and B and I change focus from A to B then window A will go behind window B and vice-versa.
https://github.com/koekeishiya/yabai/assets/31675641/563bdb6b-3832-453d-b857-d397d709eff3
Here is my Yabai config:
#!/usr/bin/env sh
yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"
sudo yabai --load-sa
#float system preferences.


[#678] Fix CrawlerProcess collectors and some minor adjustements to Sentry

The issue is that we were passing all constants defined in the
collectors/base/config.py file, which now include a Sentry client instance.
Scrapy tries to pickle the settings received and fails, because the Sentry
client instance isn't pickable.
The fix is to move the Scrapy settings to a separate constant and use that
explictly, so we only give Scrapy what is relevant to it.
I also did some adjustements to Sentry, specially for things to fail when an
exception is raised (instead of swallowing it).
Fixes opentrials/opentrials#678

This is a very welcome PR :) I'll have a look at it later today or tomorrow I guess. Thanks for fixing it (thus unblocking more stuff depending on this).


PDF Generated only showing a table outline but no content

Hello,
I am trying to generate a pdf from an HTML using puppeteer. The code works on one machine but on another, the pdfs generated don't contain words just a table outline.

Please fill out the bug template. If the PDF print does not work the same way using the browser's print dialog in headful mode, please open an issue on crbug.com.


Need TCP tunneling

Current CB-Net (PoC) makes a common subnet.
VMs using the common subnet can communicate with each other by UDP tunneling.
Now, it's not easy for me to decide to add TCP tunneling.
If necessary, TCP tunneling will be added later.

@hermitkim1
TCP tunneling (패킷 인켑슐레이션시 TCP  사용?) 이 왜 필요할까요?
UDP를 사용하여 터널링을 하면 신뢰도가 낮기 때문? 아니면.. 보통 UDP 포트를 방화벽에서 막기 때문? ^^
[FYI]
by https://www.researchgate.net/publication/238445492_Understanding_TCP_over_TCP_effects_of_TCP_tunneling_on_end-to-end_throughput_and_latency
TCP tunnel is a technology that aggregates and transfers packets sent between end hosts as a single TCP connection. By using a TCP tunnel, the fairness among aggregated flows can be improved and several protocols can be transparently transmitted through a firewall. Currently, many applications such as SSH, VTun, and HTun use a TCP tunnel. However, since most applications running on end hosts generally use TCP, two TCP congestion controls (i.e., end-to-end TCP and tunnel TCP) operate simultaneously and interfere each other. Under certain conditions, it has been known that using a TCP tunnel severely degrades the end-to-end TCP performance. Namely, it has known that using a TCP tunnel drastically degrades the end-to-end TCP throughput for some time, which is called TCP meltdown problem. On the contrary, under other conditions, it has been known that using a TCP tunnel significantly improves the end-to-end TCP performance. However, it is still an open issue --- how, when, and why is a TCP tunnel malicious for end-to-end TCP performance? In this paper, we therefore investigate effect of TCP tunnel on end-to-end TCP performance using simulation experiments. Specifically, we quantitatively reveal effects of several factors (e.g., the propagation delay, usage of SACK option, TCP socket buffer size, and sender buffer size of TCP tunnel) on performance of end-to-end TCP and tunnel TCP.
[FYI]
by https://www.researchgate.net/publication/304287577_Experimental_performance_comparison_between_TCP_vs_UDP_tunnel_using_OpenVPN
In this work, we use OpenVPN as a platform to demonstrate the performance between TCP/UDP. The de facto belief has been that TCP tunnel provides a permanent tunnel and therefore ensures a reliable transfer of data between two end points. However the effects of transmitting TCP within a UDP tunnel has been explored and could provide a valuable attempt. The results provided in this paper demonstrates that indeed TCP in UDP tunnel provides better latency. Throughout this paper, a series of tests have been performed, UDP traffic was sent inside UDP tunnel and TCP tunnel successively. The same tests was performed using TCP traffic.

@seokho-son
코멘트 및 정보 공유 감사합니다 😄
"TCP tunneling (패킷 인켑슐레이션시 TCP 사용?) 이 왜 필요할까요?"와 관련하여 말씀드립니다.
본래 의도는 현재 UDP Packet을 읽어 UDP로 Tunneling을 하고 있기 떄문에 TCP Packet을 읽어 UDP Tunneling 하는 부분을 하고자 했던 것입니다.
제목을 정정해놓겠습니다.


Added some missing tests and TypeDoc

This PR adds some tests and typedoc to the existing code base.
Change list
Wrote tests for:

metadata-registry.reducers.ts
browse-by-guard.ts
collection-page.resolver.ts

Added/Updated TypeDoc for:

bitstream-formats.component.ts
metadata-registry-actions.ts
metadata-registry.reducers.ts
community-page.component.ts

Cleaned up:

metadata-registry.effects.ts (unused file, was just copied and renamed)
browse-by-guard.ts (simplified use of translation service)
community-page.component.ts (removed unused code)

Closed due to Travis issue


feat: throw error on unconfigured coverage when running with --coverage

Release notes
Features
The test runner now throws an error when running yarn test-storybook --coverage and the coverage is not correctly set up. This could mean that an user might be running --coverage without instrumenting their code with istanbul, which would lead to problems!

self merging @shilman


Gap in multi-period MPD causes hang

Shaka Player v2.0.0-beta2-debug (http://shaka-player-demo.appspot.com/demo/) on Chrome 49, Windows 7, failed to play a static MPD with multiple periods, it will hang after playing a period.
It is possible to seek outside the current period, eg. seek to period 2 while playing period 1, then shaka-player will start from the seek point and play until end of period 2, but will not play period 3.

Test assets can be found at https://drive.google.com/file/d/0BymF_2aNp_hBWmtmaUprNmZ2M2c/view?usp=sharing
manifest.mpd immediately inside the zip file is the MPD that caused playback hang.
Not sure if it is related to #381

Sorry there is one attribute put in the wrong place in the uploaded mpd, in Event tag, "timescale" should not be put there but should be put in EventStream.
Correct mpd should look like this:
		<EventStream timescale="10000000" schemeIdUri="urn:scte:scte35:2014:xml+bin">
			<Event presentationTime="60000000" duration="100000000" id="1">
				<scte35:Signal>
					<scte35:Binary>
						/DAvAAAAAAAA///wFAVAAAABf+/+A5OHAP4F9eEAADwAAAAKAAhDVUVJAAAAAECJXy8=
					</scte35:Binary>
				</scte35:Signal>
			</Event>
		</EventStream>

But this doesn't affect the outcome, it will get stuck at period end.

Thanks, we'll take a look.  Odds are good that there is a gap at the start of the second period, which is something we do not currently support.

Sorry we lost track of this one.  It appears that you have a gap in your content.  According to Chrome's buffered time ranges, Period 0 ends at 89.061333, but Period 1 begins at 89.24.  The references from the manifest seem to indicate that the final segments of Period 0 should go all the way to 89.24, but they do not.
Gaps in content is something we do not support at this time.  Any gap larger than what the browser will jump automatically will currently cause a hang such as this one.  As far as we know, a gap of 150ms or less should be skipped by all major browsers, so that's our effective tolerance.

Thanks for the information.
I tried to edit the manifest such that Period 1 to start at 89.061333, then shaka can play through the transition from Period 0 to Period 1. Therefore this "gap" should be the main reason that caused playback hang.
However, this "gap" only exists in audio streams, for video stream in Period 0 it should end exactly at the time Period 1 starts. If there is only one single period, then all content could be played even if there is "gap" between audio and end of period(ie. only video is played in the end). I would expect shaka-player should also play all content in the case with multiple periods.
Here I have a few questions:

Sometimes adaptation sets have different end time, in order to use shaka-player to smoothly play across periods, period start time should be set to the earliest end time of any adaptation set of previous period?

If there is overlap between periods, will the content be skipped or played?

Will shaka-player support gaps in content in the future?

Yes, for gapless playback, the next Period would start at the earliest end time of all AdaptationSets.  However, if there are large (> 150ms) differences in the length of AdaptationSets, you may have an issue with your encoder.  It may make more sense to fix the encoder than to hide the problem by changing the start time of the next Period.
If there is overlap between Periods, the browser should skip it because MSE's appendWindowEnd should cut off everything past the end of the Period.
We do not currently support gaps in content and we do not currently have it on our roadmap.

@l-law, is there anything else we can do for you on this topic?

Closing due to inactivity.


perlPackages.Appcpanminus: 1.7044 -> 1.7045, patch https by default

Motivation for this change
CVE-2020-16154

Update to cpanm that removes vulnerable signature verification
https://metacpan.org/release/MIYAGAWA/App-cpanminus-1.7045

Adds IO::Socket::SSL as dependency to enable HTTPS support via fatpacked HTTP::Tiny

Patches in https:// versions of endpoints so cpanm downloads modules and metadata over https

Things done

Built on platform(s)

[X] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
22.05 Release Notes (or backporting 21.11 Release 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
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[ ] Fits CONTRIBUTING.md.

@ofborg build perlPackages.Appcpanminus

Result of nixpkgs-review pr 157431 run on x86_64-linux 1

2 packages built:

perl532Packages.Appcpanminus
perl534Packages.Appcpanminus


Cash out

https://github.com/Thomasdr06/rest-api-description/tree/main/.github%2Fworkflows

Send to<EMAIL_ADDRESS>

Send all files  to<EMAIL_ADDRESS>


Debug toolbar overlaps vscode window options on top left corner

Type: Bug
Hi,
After the recent update on vscode on macOS, I am seeing the debug toolbar stuck to the top left corner of the window when I debug a .java file. And I cannot move it.
The options overlap the window maximize, minimize and cancel buttons at the top left corner and are preventing me from clicking the options on the debug toolbar.
Please fix this.
Thank you.
VS Code version: Code 1.86.0 (Universal) (05047486b6df5eb8d44b2ecd70ea3bdf775fd937, 2024-01-31T10:29:15.765Z)
OS version: Darwin x64 23.2.0
Modes:

System Info

Item
Value

CPUs
Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz (16 x 2300)

GPU Status
2d_canvas: enabledcanvas_oop_rasterization: disabled_offdirect_rendering_display_compositor: disabled_off_okgpu_compositing: enabledmultiple_raster_threads: enabled_onopengl: enabled_onrasterization: enabledraw_draw: disabled_off_okskia_graphite: disabled_offvideo_decode: enabledvideo_encode: enabledwebgl: enabledwebgl2: enabledwebgpu: enabled

Load (avg)
2, 2, 2

Memory (System)
32.00GB (14.91GB free)

Process Argv
--crash-reporter-id 2f34618c-bde3-495b-8330-b71b7bb7d99c

Screen Reader
no

VM
0%

Extensions (11)

Extension
Author (truncated)
Version

live-sass
gle
6.1.2

intellij-idea-keybindings
k--
1.5.13

java
red
1.27.0

LiveServer
rit
5.7.9

intellicode-api-usage-examples
Vis
0.2.8

vscodeintellicode
Vis
1.2.30

vscode-java-debug
vsc
0.56.0

vscode-java-dependency
vsc
0.23.4

vscode-java-pack
vsc
0.25.15

vscode-java-test
vsc
0.40.1

vscode-maven
vsc
0.44.0

A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscorecescf:30445987
vscod805:30301674
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:30899288
c4g48928:30535728
azure-dev_surveyone:30548225
2i9eh265:30646982
962ge761:30951796
pythongtdpath:30769146
welcomedialogc:30910334
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
pythontbext0:30879054
accentitlementsc:30887149
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
dsvsc019bcf:30953938
3ef8e399:30949928
bg6jg535:30956215

Could you share a screenshot? Maybe related to https://github.com/microsoft/vscode/issues/200506 but I wouldn't expect this on mac

It was working correctly (toolbar at the centre of the screen) just before the latest update.
Here is what it looks like now:

Same problem after the latest update.

same

Same here. Using 1.86. This is incredible annoying to work with.

I've run into the same thing on 1.86 although I was able to grab/move the debug toolbar to the center of my screen (ever so gingerly trying to grab the dots without touching the close window, it felt like playing the game Operation). It has stayed there since, but it may not work for you and clearly was something that changed with the update


[#2879] feat(docs): Add doc for Doris catalog

What changes were proposed in this pull request?
Add doc for Doris catalog
Why are the changes needed?
Fix: #2879
Does this PR introduce any user-facing change?
N/A
How was this patch tested?
N/A

@jerryshao
Do you need to take a look?

@jerryshao Do you need to take a look?

Yeah, I will.

@jerryshao Doc has been updated. Please help to review again, thanks.


Overwatch search needs to be case-sensitive

In using the regex to substitute "#" for "-", the case of the battletag is being dropped and breaking the search for some usernames.

Can you tell me if it works now? Sorry you waited a month for such a simple issue.

To add on to this, it'd be awesome if we could get multi-platform support for the Overwatch commands, as Overwatch is on PlayStation 4 and Xbox One as well.
.WithUrl("https://www.overbuff.com/players/pc/" + battletag + "")

In this line you can see pc for the platform, so I'd assume that overbuff.com supports ps4 and xb1 or something of the sort as well.


Update built-in help for features

Fixed #8381.

r? @alexcrichton
(rust_highfive has picked a reviewer for you, use r? to override)

@bors: r+

:pushpin: Commit a00b5ac867a5e25fe0b4345cc32f0548739a11c0 has been approved by alexcrichton

:hourglass: Testing commit a00b5ac867a5e25fe0b4345cc32f0548739a11c0 with merge 657f091c040dbd8259fc3504591fe72cff063230...

:boom: Test timed out

@bors: retry

:hourglass: Testing commit a00b5ac867a5e25fe0b4345cc32f0548739a11c0 with merge 40550b9ea04f2b991202e11b43f46086424a7cfb...

:sunny: Test successful - checks-azure
Approved by: alexcrichton
Pushing 40550b9ea04f2b991202e11b43f46086424a7cfb to master...


Cristobal: Behaviour Strategy Implementation, 3 weeks

Learning Objectives

Priorities: 🥚, 🐣, 🐥, 🐔 (click to learn more)

There is a lot to learn in this repository. If you can't master all the material
at once, that's expected! Anything you don't master now will always be waiting
for you to review when you need it. These 4 emoji's will help you prioritize
your study time and to measure your progress:

🥚: Understanding this material is required, it covers the base skills you'll
need to move on. You do not need to finish all of them but should feel
comfortable that you could with enough time.
🐣: You have started all of these exercises and feel you could complete them
all if you just had more time. It may not be easy for you but with effort you
can make it through.
🐥: You have studied the examples and started some exercises if you had time.
You should have a big-picture understanding of these concepts/skills, but may
not be confident completing the exercises.
🐔: These concepts or skills are not necessary but are related to this module.
If you are finished with 🥚, 🐣 and 🐥 you can use the 🐔 exercises to push
yourself without getting distracted from the module's main objectives.

1. Remix
Practice studying and remixing other people's solutions to coding challenges. Create your own solutions by mixing and matching pieces from other people's code.

🐣 Reconstructing: You can reconstruct a variety of solutions to the same challenge when they are presented as parsons problems.
🐣 Analyzing: You can analyze a function written at your level. This includes:

[x] Behavior: Write documentation, test cases and use cases to describe the function's behavior.
[x] Strategy: Describe the function's strategy using plain english.
[x] Implementation: List the language features in a function and explain how each one is used.
[x] Small Changes: You can think of 2+ changes to the function's implementation that would not change it's strategy.

🐣 Remixing You can analyze several solutions to the same challenge then ...

[x] Write: Your own solution by remixing the ones you studied.
[x] Explain: How the other solutions inspired yours; what ideas did you take from them? what ideas did you not take?
[x] Analyze: Complete a write-up your own solution as though someone else wrote it.

2. Write

🐣 Function Design:

[x] Writing Tests: Given a working function, you can write passing test cases to describe it's behavior.
[x] Writing Functions: You can design multiple solutions to the same code challenge, keeping notes about different experiments you tried along the way.

[x] 🐣 Generating Documentation: You can write a JSDoc comment for your solutions and run a script to generate markdown documentation.
[x] 🐣 Fuzz Testing: You write solutions that pass randomly generated test cases.
🐣 Test Driven Development: You can solve open-ended, ambiguous coding challenges at your level:

[ ] Reading Docs: You can understand what the function is supposed to do by reading it's JSDoc description.
[ ] Writing Tests: You can write test cases before there is a function to test.
[ ] Writing Functions: You can write one function that passes the test cases you have prepared (even if it's just 1 test case!).
[ ] Refactoring: You can improve your function's implementation without failing any test cases that were passing.
[ ] Iterative Development: You can repeat the TDD process until you are satisfied with your test cases and solution.

[ ] 🐔 Code Golf: Write your solutions with the fewest characters possible! This won't help you write readable code, but it will make you think deeply about JS, your strategy and implementation.

3. Review

🐣 Continuous Integration: You can check your code's quality before pushing so your CI checks all pass.

[ ] Formatting
[ ] Linting
[ ] Testing

[ ] 🐣 Code Review: You can use a checklist to give a thorough, positive and constructive review of your classmates' solutions.
[ ] 🐔 Code Coverage: You can explain what code coverage is, why it's important, and can write unit tests with 100% code coverage.

Week 1
I Need Help With:

I am not confident with the throwError() function, I will research on the internet for more information.

What went well?

I am very confident creating functions to resolve a basic problem presented by Edabit website.
I can use describe/it/expect.toEqual functions and I understand that they are useful to test our implementations.
I can write passing test cases to describe it's behavior. (Basic tests).
I have successfully learnt the process to create a file test.js and run it in the console to check if the test fails or passes.
Completed 15 exercises on Edabit. Going to open another account as the free trial is over.

What went less well?

I am not clear why do we need Sandbox or any other testing platforms. Are they pre-created libraries?

Lessons Learned

Testing is really important to avoid errors in our code, it is also important to document what the function does (parameters an arguments) and what is expected as result.
When describing functions, we need to be clear and use plain English so that our colleagues can also understanding it.

Sunday Prep Work

I am going to pick up some more exercises from Edabit and try testing.

I am not confident with the throwError() function, I will research on the internet for more information.

Evan will add some examples with throwing errors next week, in the meantime you can also try changing the functions to return a certain output instead..and then expect that output in the test.

I am not clear why do we need Sandbox or any other testing platforms. Are they pre-created libraries?

testing is not built into JS, and there are different tools to do unit-testing. One of the most popular ones is maintained by Facebook and is called Jest. In the repo, we use Jest for testing. So you can check out the Jest documentation to read more about it.

I still have problems understanding the use of arguments and parameters. Why do we sometimes leave the parenthesis empty function speed (){ and sometimes we declare variables inside? function speed (distance, time){?

well depends what the function is doing..does it take any input values or not? for example, we could have:
const myFunction1 = () => {
  console.log('hello Cris');
}

const myFunction2 = (name) => {
   console.log('hello' + name);
}

now, if you call the first function, it will always console.log hello Cris but the second one will say hello "name"

What is the difference between console.log(); and return();?

I assume you mean executing something like console.log(123) and writing inside a return statement inside a function like:
const myFunction3 = () => {
    return 123;
}

now, console will print 123 to the console...while return will pass on the number 123 to whatever is calling myFunction3..
let's say:
const myFunction3 = () => {
    return 123;
};

console.log(myFunction3());

I understand the difference between toBe and equalTo. toBe uses strict equality, toEqual uses property equivalence. expect(0).toBe(-0) will pass but expect(0).toEqual(-0) will fail.

you seem to understand it..but toBe is NOT strict equality..toEqual is 🙂

I tend to create a function first and then, to write the tests. I know this is not a good practice but it becomes challenging for me referencing to something I do not see.

the goal is not to have an implementation..with the TDD approach..the goal is to make sure that certain input scenarios will have a certain outcome..  so you just want to write down.. giving an input string should pass a number array should fail..or something like that..HOW that happens..can be dealt with later..

There are multiple testing frameworks like Jest, Jasmine, Mocha, we can use whatever we want, but we need to install the dependencies first.

yes, although Jest is already a dependency in the HYF repo, so enough to do npm i

I am not good at debugging with VS code, have practiced but it is confusing. There is too much ongoing at the same time. I will try practicing with VS with a very basic exercise.

it is basically the same as Chrome Dev Tools, just a slightly different interface, so can be confusing at first :)

const myFunction3 = () => {
    return 123;
}

So, return will work inside the function while console.log will show the returned result in the console!

It's clear as water!!!! Thanks for these examples.

What is the rule for declaring variables outside the scope? Do we always need to do that?

There is no rule, it depends on what you want to achieve, if you want to use it outside of the scope or not.

Why do we need to install canvas? npm i canvas

you do not need to install canvas manually like this.. it is just a peer-dependency for one of the npm packages, that gets installed for some HYF repos.

Is it always a good practice to keep our arrays untouched? Like, making a copy of the original one and saving it in a variable?

again, depends on your goal..but in general yes, it can be a good practice to do that.

How can we test functions when we are getting the values from the user directly?

this is a really good question. well, we can create test cases for all possible scenarios that could end up in to input field..and the are also tools to help with stubbing&mocking data. this is beyond the scope of what we are doing now, but you can look into it, if you are interested.

Is is optional to declare parameters?

sure, absolutely. it depends on what the function is doing, if it accepts any input parameters..

I also practiced shorting an array with the .length = 0 function.

why would you do this?

I created for my very first time an arrow function and it is working perfectly (though I am not a fan of those at all).

great job! try to get used to them, as that is the current standard :)

Long functions are difficult to read, I need a lot of comments to understand what is going on.

indeed, writing good documentation is very important and often overlooked

Still I do not know how many type of cases do we have, like in this week exercises I saw a test with variables.

can you pls rephrase this question? I am not sure I understand it.


tests: tickless: Add support for Atmel SAM family

This patch updates tickless testcase replacing existing support
for Atmel SAM3X with support for the whole Atmel SAM family.
Signed-off-by: Piotr Mienkowski<EMAIL_ADDRESS>

With prescaler equal 3 the timer resolution will be three times lower. However, it still looks acceptable. The timer works with a slow clock which is set at 32'768 kHz and will increment every 3 * t_sclk =  91.5 us (t_sclk = 30.5 us). Since we are measuring times in the range of 100 ms that is still good enough.