Feature request: joint publications without having to override boilerplate

A passing thought while putting w3ctag/security-questionnaire#86 together.
It'd be nice to simply provide two Group values in the metadata block, instead of having to override boilerplate with something nearly identical. Whenever I override boilerplate—especially when the override is a slight modification to the underlying boilerplate—I take on additional maintenance burden to make sure the boilerplates stay in sync.
That said, joint publications are probably rare enough—and the complexity of fixing this in the boilerplate code high enough—that maybe doing nothing is the right thing here.

What would be the effect of that? The two groups have distinct boilerplates; how should this be handled?

What would be the effect of that? The two groups have distinct boilerplates; how should this be handled?

I dunno! That's why I filed an issue instead of going straight to writing a PR. It'll require some thought.


Messed up labels for metric kube_persistentvolumeclaim_info

Hello, I have a strange labeling issue with kube_persistentvolumeclaim_info metric.
Labels "storageclass" and "volumename" are messed up.
Here is the example result from kubecost job:
kube_persistentvolumeclaim_info{instance="<IP_ADDRESS>:9003",job="kubecost",namespace="api-develop",persistentvolumeclaim="redis-ha-data-rfr-upgrade-mechanism-api-develop-php-fpm-redis-2",storageclass="pvc-5ea7b685-4aa4-4b4b-b477-da7296956362",volumename="standard"}
I am using Kubernetes v1.18.20-gke.901 with the default configuration installed via helm chart.
Cost-model version is "1.86.1".
gz#805

@artemlive thanks for the PR. Will work on getting it reviewed shortly.


False validation

Challenge http://freecodecamp.com/challenges/waypoint-target-the-same-element-with-multiple-jquery-selectors has an issue.
With this code
  $(document).ready(function() {
  $("button").addClass("animated shake btn-primary");
  $("#target1").addClass("animated shake btn-primary");
  $("button").addClass("animated shake btn-primary");
  });

It validate the task "Use the $(".btn") selector." which as you can see in my code didn't use $(".btn").

Created PR #1995


defineFragment

After a third and final attempt at defineFragment, I landed something that's robust enough to work, has 0 perf overhead for non-fragment nodes, and has no needed DOM placeholders. So far there's support for adjacent fragments, nested fragments, fragments returned from render(), views wthin fragments [1].
There are some caveats. Fragment nodes are not 100% like normal vnodes. They do exist in the vtree, but are flattened and transparent to the dom reconciliation algo. This means that they will not themselves support some lifecycle _hooks (at least initially) or any event handlers (cause they have no dom to bubble through), etc.. However they can hold _key, _data, _ref and other vtree-only stuff, if you need to reference some model/key from any hooks or handlers bound to any contained elements.
So far, the implementation adds about 0.6k (min) [2] to every build since support has to be integrated into various parts of the core. There's still some work left to get them fully useful, which will add perhaps another 0.1k-0.3k:

sig: defineFragment([ type [, attrs], ] body), right now it's only defineFragment(body) DONE
explicit vm.redraw() of sub-views with fragment roots
ensure vnode.patch() works (may not be applicable)
look into adding hooks based on vtree grafting pass rather than dom reconciliation pass
html() support
tests
fragment root in top-level view (maybe) PROBABLY NOT

cc @lawrence-dol
[1] https://github.com/leeoniya/domvm/blob/defineFragment/demos/fragments.html
[2] https://github.com/leeoniya/domvm/commit/93b0247c1c412776a05948acad90eb2444d7a2f9?short_path=90524ff#diff-90524ffa151b37c8b277925c017ad1ba

I personally haven't felt a strong need for defineFragment, so far. Sure, there are a few divs that I could get rid of, but for the app I'm making it doesn't currently seem to be worth the hassle to deal with (potentially) different behavior between real nodes and fragments.
When I want to insert a list of nodes between other nodes without introducing another node to hold the list, what I've been doing is something like this:
                function frBody() {
			return [
				el("em", "big"),
				el("span", "cruel"),
			];
		}
		function View() {
			return function() {
                                var result = [el("strong", "hello")];
                                var adjectives = [];
                                if (reverse) {
                                    adjectives = frBody().reverse();
                                } else {
                                    adjectives = frBody();
                                }
                                result = result.concat(adjectives);
                                result.push(el("span", "world"));
                                return el("div", result);
                         }
                  }

I assume that what I'm doing here is very likely more inefficient than what the new defineFragment does. Also, multi-level nesting quickly gets unwieldy when doing this the 'manual' way, as opposed to using defineFragment.
I know I do sometimes use things in ways they are not intended to be used. Is there any serious problem with doing it this naive way?

returning fragments as view roots would probably be the main use case here.
the main benefit is wrapping state and redraw isolation around some adjacent subset of dom nodes. for instance, many DOM elements cannot have arbitrary nesting levels. eg. you can't wrap anything <div> around some adjacent set of tds.
another use is defining the body as a root-fragment sub-view and the wrapper in the parent. this is quite useful to prevent wrapper duplication (or having to externalize the wrapper in a function) across multiple similar views.
you can also use fragments to store some arbitrary data/state on the fragment vnode that pertains to its children rather than copying that data to every node child.
at the end of the day it's a nice-to-have feature that isnt exactly necessary, but can make some convenient constructions less grotesque. unfortunately, fragments cannot be implemented as an addon because the core reconciler must know how to handle them. so they add a certain bytesize weight to all builds, but hopefully no perf overhead when not used (if carefully implemented).
what's available now (array flattening) is a convenience feature for declarative templates, but if you use imperative template construction (as you're showing), they don't add much value anyways cause you can just use concat()/push() to build up the body.

Ok, I think I understand what this is about a bit better now. :)
This feature:

allows to make components that don't return a node but a fragment (i.e. "list of nodes, and, recursively, other fragments").
allows for isolated redraw on nodes that can't be wrapped in divs (which makes a huge difference in the huge-table-situtation)

unfortunately, fragments cannot be implemented as an addon because the core reconciler must know how to handle them

That makes sense.
I don't see anything wrong with having them as a core feature. It does sound convenient. The only reason I'm building a few of my templates imperatively is that this is the shortest and clearest way I found so far to add multiple nodes between other nodes without introducing another div.
It also sounds like it's quite difficult to figure out how to make it work in an intuitive way. What I mean with intuitive is

I would expect _hooks to work if I make a view that returns a fragment.
That events won't work on a virtual node seems obvious to me since there is no DOM element that the events can be attached to.
I assume that events on child nodes of a fragment work as usual.

I would expect _hooks to work if I make a view that returns a fragment.

Well, _hooks are defined at the vnode, so the assumption with how they work should be tied to the typw of vnode you're creating. View-level hooks will work as usual (redraw, update, mount, unmount). Node-level hooks (which reflect literal dom ops) are fired by the dom reconciler which runs at the very end of the cycle (template preproc -> match new vtree to old vtree -> patch node contents -> sync dom children (reorder, remove non-recycled, hydrate & insert new)).
There's no DOM methods for operating on sets of nodes in terms of group operations. So if a fragment needs to be moved up 5 nodes, you're really performing 5x descendent operations (which will all fire their respective _hooks). Providing a "batched" level of hooks that represent these groups of ops is not simple because it requires knowledge of the needed dom ops before you actually hit the base reconcile (which operates in a single pass for speed). I added a todo item above to evaluate some _hook congruence to vnodes (look into adding hooks based on vtree grafting pass rather than dom reconciliation pass). My initial suspicion is that recycle/insert/remove hooks are doable, but reinsert (move) would be problematic since there's no "reordering strategy" prepared ahead of the actually dom reconcile pass which works incrementally.

I assume that events on child nodes of a fragment work as usual.

yes.

hooks are defined at the vnode, so the assumption of how they work should be tied to the type of vnode you're creating.

I totally mixed up view hooks and _hooks, sorry about that.
Are you saying view-level hooks already work as usual with views that return fragments? That's cool. Then all I'd personally expect to happen already works.

My initial suspicion is that recycle/insert/remove hooks are doable, but reinsert (move) would be problematic

From what I understand, one major purpose of those node-level hooks is to have a place to add animations. If I understand you correctly, it's already possible to use hooks on the individual (element) nodes of the fragment, so we can animate the DOM nodes that "belong" to a fragment individually?
Is there a strong use case for fragment-level _hooks?
I mean, I can imagine that someone might possibly need them, in particularly, in the huge-table-situation where the workaround of using a wrapper div on which to use hooks for animating doesn't work for some reason. I'm just having a hard time to think of such a reason right now.
@lawrence-dol would element-level hooks have worked in your recent table use-case?

Are you saying view-level hooks already work as usual with views that return fragments?

i'm going to backtrack on this matter-of-factly made statement. even view-level mount/unmount hooks are currently triggered as a side-effect of dom removal of a view's root node at the last reconcile phase. if the root view node is a fragment, i would have to infer & trigger its unmounting by checking whether its children would/should be removed. this is basically the exact thing that'd need to be done to get non-root fragment hooks to work in general. so i'll have to see how the implementation pans out. it may turn out that hook triggers for fragments may need an extra pass to analyze how much of the body is unrecycled and thus would be removed by the reconcile pass. i'm confident there's a solution though even if it requires a seperate code path.

If I understand you correctly, it's already possible to use hooks on the individual (element) nodes of the fragment,

yes, but hooks have other side-effect uses besides animation. and if you have a fragment that represents some model, you may only want to fire a hook once instead of for each fragment node. of course you can kinda cheat by attaching hooks only to the first child.
i think lawrence's use case was just to isolate redraw of a couple adjacent table rows that represented a single model. if you instead assemble the tbody as a whole tpl/view you're forced to redraw the entire thing. of course you can have multiple tbody elements/views but it adds dom weight.

i would have to infer & trigger its unmounting by checking whether its children would/should be removed. this is basically the exact thing that'd need to be done to get non-root fragment hooks to work in general

Let's hope things are as straightforward as you think they are. :)

to isolate redraw of a couple adjacent table rows that represented a single model

Ok, I see. That's where the vm.redraw() for fragment-returning views is going to be useful.

you can kinda cheat by attaching hooks only to the first child

I'll keep that in mind, that sounds like a good technique for many use cases. Would that have better performance than a fragment hook?

@grumpi

I'll keep that in mind, that sounds like a good technique for many use cases. Would that have better performance than a fragment hook?

Fragments will have worse performance characteristics than flattened templates. In benchmarks (and extreme stress cases) it would be significantly worse but in real life apps you'll likely never notice the difference.
The reason they perform worse is that they need to be flattened & tagged [with respect to their actual physical dom parentNode] before they hit the dom reconciler which runs a simple iterator over the array of vnodes. This flattening process must happen for all vnodes that contains a fragment as a child on every redraw. There's no way around this, but again, in typical apps you probably won't be able to measure a difference unless you do something like careless like call vm.redraw() on unthrottled mousemove, resize, or scroll events.

i've written some initial tests. more will come soon. gonna close this now that this has landed in the main branch.


pull request for e2e test at 11/07/2016 17:15:10

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

optest/docs/updated_at.md
:white_check_mark:Succeeded

Details

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.


Next Build / SWC - Compiler bundles unused js code in static chunks when not precompiling typescript sources before

Describe the bug
The bug report was originally created in the Next repo; here is the link https://github.com/vercel/next.js/issues/47738. The SWC repo seems the correct place to re-describe the problem.
Use a mono repo structure without a pre-compilation step in the respective modules e.g.
packages
	- common
		- src
			- components
				- CompA
				- CompB
				- CompC
				- index.ts export all components e.g. export { CompA } from './CompA'
			- index.ts export all components export * from './components'
		- package.json references index.ts; because it is no precompilation step involved, we do not reference something like /dist/index.js

pages
	- A <= use CompA and CompB in page A // import {CompA, CompB} from 'common'

Execute the next build with bundle analyze attached, respectively look at the static/chunks/pages folder
All components in the common module are bundled, most importantly CompC, even not used on the page
Input code
No response
Config
No response
Playground link
No response
Expected behavior
The swc compiler should apply tree-shaking bundling only components which are actually used by a page and not all exports defined in a mono repo module. The expected behavior is that it should not matter if the compiler sees either js or ts; unused components have to be always omitted from bundling in the final js file because this gets sent to the user.
Actual behavior
All components in the common module are bundled, most importantly CompC, even not used on the page. Precompiling the typescript of a mono-repo before using it on a page actually omits unused components. However, when the compiler sees the mono-repo in a typescript form tree-shaking is not applied, and unused components get bundled in the final js file.
Version
Unknown, tested on latest Next version as well as canary version 13.2.5-canary.20
Additional context
Doing all steps identically but executing a build process of the individual modules of a mono repo does not produce this overhead; CompC gets not included in a js bundle in the static/chunks/pages folder.
Looking at the source code of the SWC-compiler, respectively the Visitor.ts file here https://github.com/swc-project/swc/blob/main/node-swc/src/Visitor.ts, depending on what the compiler sees, raw typescript files, or js bundles, different handling is executed (export/import/namespaces).
I do not know any internals here, but it seems either the typescript option is incomplete or an tree-shaking optimizing step is skipped when the compiler sees typescript files from a monorep module.
Imagine when you have, instead of a lightweight CompC, a much larger typescript file with imports from external dependencies, although I still need to check if external libraries of js are also increasing the final bundle.
Either way, this produces much larger bundle sizes; in our case, the bundle size doubles.
The only solution right now is to execute a prebuild step to compile the typescript version of modules used to javascript and feed the result to pages.
A lot of folks are probably unaware of those consequences, meaning at least the documentation has to provide a hint to avoid this problem, or you fix it in the swc compiler.

Please provide a repro

I provide a repo, but why closing with reason "not planned"?

Because there's no repro


[0.6] Return status as Boolean instead of String

Currently I can do const { status } = useAuth() but status is a String of value authenticated | unauthenticated | loading which is annoying for non-typescript user. Would it be possible to have a Boolean getter the isLoggedIn from @nuxtjs/auth-next ?

@mrleblanc101, I had a quick talk with the rest of the team about implementation this and we decided against it.
Our main concern is that adding this, may lead to confusion on what the actual status of the authentication is. Status has three different states and reducing these three to one boolean value, does not properly translate.
Example:

User logs in: isLoggedIn: true
Session gets automatically updated (happens every 30 seconds): isLoggedIn: false (due to the status being loading

In this edge case the user would be logged in, but isLoggedIn would return false, as the status is loading. Being able to determine if the user was previously logged in and then the session is refetching, or the page is initially loading and we don't know yet if the user is logged in, would look the same.
However, I understand your use case, which is why I wrote a quick Nuxt Composable you can use in your project!
// File: /composables/useIsLoggedIn.js
export default () => {
	const { status } = useAuth()
	const isLoggedIn = computed(() => {
		if (status === 'loading') {
			return false
		} else if (status === 'authenticated') {
			return true
		} else {
			return false
		}
	})
	return isLoggedIn
}

You can then use this composable without importing it in your other Vue files:
// File page.vue
<script setup>
const isLoggedIn = useIsLoggedIn()
</script>

<template>
	<div v-if='isLoggedIn'>
		Your Logged In!
	</div>
</template>


Iframe access and non-js api.(Email question)

Hi SmartBox team,
We use smartbox library for building samsung smarttv app and since now everything seems to be okay, but now we have faced a problem when try to add banking payment system. The bank provides page where users can fill data about their banking accounts and the page can't be modified or managed in our side(because of security reasons). We think to put the page inside of  .
First question is how navigation should be implemented inside of iframe in order to fill the data(we need .nav-item class to make elements navigatable and even if there are such classes, navigation inside of iframe is impossible)?.
The second question is how to add virtual keyboard to the inputs if we can't access to the elements from javascript?.
If you have any suggestions or there are any best practices concerning to the banking systems please share it with us.
Looking forward for your reply.
Best Regards,
Anna

Hello Anna.
If you want to integrate with any pay-system you should know that it's not really good idea to use custom pay-system because of samsung going to allow only SamsungApp payments. But we used custom PS to :smile:
And I think it will be impossible to work via iframe on all platforms (smasung, lg, philips, etc) we had difficults with it - bad support on all platforms. But anyway I dont think smartbox have any chance to be included in iframe app - so all logic will not be supported in your iframe.

The second question is how to add virtual keyboard to the inputs if we can't access to the elements from javascript?
I dont think it's really possible.

In our applications we used API(https://www.portmone.com.ua/r3/) for work with pay-cards. Where you can use only api calls without any iframes or other.


Group support

Coverage remained the same at ?% when pulling 6a2e898f2c6e2823bffa970eee50e6a40fe4a75d on group-support into 41d91e718e45834f162683a3ffb0f97ca5d3ab06 on master.


Support weight prediction in const context

Notes for reviewers:
This is something that I want to use in my code and hopefully reasonably easy to review, so if this can get into 0.30 that'd be really nice. No hard feelings if it doesn't.
I tried to put extra effort into making review easier by:

intentionally "mis-formatting" the first commit so diff is smaller and easy to understand - see individual commits.
copying patterns from non-const fn to const fn so it's obviously correct (includes same variable names)
not bothering with the array trick in VarInt::len and simply accepting the limitation of Rust 1.46+ (I use 1.48 BTW).

Description
Some smart contracts or simplified wallets statically know the sizes of
transactions or inputs. The possible approaches to handling them so far
were re-computing the values (and hoping the optimizer will const fold
them) or using a simple constant which may be harder to understand and
get right. It's much nicer to just use a const but our code didn't
support it until now.
This change adds methods that can compute the prediction in const
context for Rust versions >= 1.46.0 which allow use of loops (and
conditions but those could be workaround anyway).
As a side effect of this, the change also adds const to VarInt::len
in Rust 1.46+. While this one could be made unconditional using array
trick it's probably not worth it because of the planned MSRV bump.

The failed test should be able to run tomorrow.

Just removed the empty line to satisfy rustfmt.


Kahn's_algorithm

🚀 Feature
Topological sorting for Directed Acyclic Graph is a linear ordering of vertices such that for every directed edge uv, vertex u comes before v in the ordering. This is the algorithm of topological sort by khan's algorithm
Language
C++
Pitch
it is not in the list

Add it in README


SA1401 is incorrectly thrown for public fields of inner private classes

The code below causes SA1401 to be fired incorrectly. It's impossible for the field to be accessible if it's marked private. It's an incorrect suggestion, and causes code to break.
using System;

namespace SA1401Test
{
    class Program
    {
        private class Test
        {
            public int X;
        }

        public static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
            var test = new Test();
            test.X = 5;
        }
    }
}

This is the expected behavior for SA1401. Fields are expected to only be accessible within the context of the class in which they are declared (e.g. Program.Test for the example above). We should probably add tests for this to make it clear for future readers.

@sharwell Gotcha. I thought it fired for properties too for some reason but didn't test for it.


chore(types): webdriver typings for elements

include node and jasmine dependency to built/index.d.ts
update example and spec/install to not need @types/jasmine and @types/node to install
added an interface in globals for Error to include a code and stack
improve webdriver typings to elements

@googlebot cla yes?

Thanks @googlebot


Tab key when indenting with spaces does not insert correct number of spaces

VSCode Version: 1.45.0
OS Version: macOS Catalina 10.15.4

This is a re-filing of #80129 which was closed erroneously. This is NOT caused by an extension and reproduces when editing even a plain text document when extensions are all disabled.
Related to #2798.
If the insertion point is anywhere inside the indentation at the start of the line, and I press Tab, the indentation should be increased to the next full tab stop (multiple of the tab width).
I'll use the period . character instead of spaces in indentation so that it is easier to see what I'm talking about.
If I have a line of code indented by 4 spaces like this:
....do_something()

If I place the insertion point on column 2 and press tab, I get 7 spaces. That's really irritating, it means I have to be hyper precise placing my cursor when I want to indent a line, even when there's a very wide click target I should be able to hit anywhere.
.......do_something()

Xcode does this properly, it increases the indentation to 8 spaces and moves the cursor to the end of the indentation. TextMate behaves the same as Xcode.

Does this issue occur when all extensions are disabled?: Yes

I do have editor.useTabStops enabled but I don't understand what it does if not this.


avx512f.c: Tests cases for mm512_castpd/si512_si512/pd,mm512_castsi128/256_si512

LGTM.  I'll merge these ASAP.


Put decode helpers directly on Request for Response.

The apply method on EntityEncoder is awkward to call when the decoder
takes an implicit parameter.  This gives rise to awkward overloads, like
xml, which surprisingly provide a default without regard to the scoped
implicit.  By moving the call to the request, we can move the implicit
decoder to the end, and remove the syntactic urge for troublesome
overloads.
Request decodings that prefer to be explicit can use the new
decodeWith for a reasonable syntax.

I think this looks good with the exception of that non-DRY method alias, which doesn't look to be a bug, just a code reduction issue.

Yes, I wasn't thinking. Good catch.
On Jan 16, 2015 11:33 PM, "Bryce Anderson"<EMAIL_ADDRESS>wrote:

I think this looks good with the exception of that non-DRY method alias,
which doesn't look to be a bug, just a code reduction issue.
--
Reply to this email directly or view it on GitHub
https://github.com/http4s/http4s/pull/169#issuecomment-70354348.


Term expansion inside modules

Is it possible to have user:term_expansion/2 apply to the inside of modules? Or maybe there's a different technique? I'm not very familiar with the expansion stuff yet. The use case here is defining a custom directive that multiple modules can use.
Example:
?- [user].
user:term_expansion(T, _) :-
    prolog_load_context(module, M),
    format("----- expand: ~w~n", [M:T]), fail.
^D
----- expand: user:end_of_file
   true.
?- [user].
----- expand: user:begin_of_file
:- module(aaa, []).
----- expand: user:(:-module(aaa,[]))   % it does seem possible to replace the whole module here
test.                                   % user:term_expansion not called
:- my_directive(x).       % same, not possible to define custom directives used inside modules from the outside?
Error: unknown directive: my_directive/1
   true.

(Sorry for the barrage of issues, finally got some time to collect reproduction cases for various things)

I don't think you can define a module using [user] input like that.
On Tue, Nov 14, 2023 at 7:08 PM guregu @.***> wrote:

Is it possible to have user:term_expansion/2 apply to the inside of
modules? Or maybe there's a different technique? I'm not very familiar with
the expansion stuff yet. The use case here is defining a custom directive
that multiple modules can use.
Example:
?- [user].
user:term_expansion(T, _) :-
prolog_load_context(module, M),
format("----- expand: ~w~n", [M:T]), fail.
^D
----- expand: user:end_of_file
true.
?- [user].
----- expand: user:begin_of_file
:- module(aaa, []).
----- expand: user:(:-module(aaa,[]))   % it does seem possible to replace the whole module here
test.                                   % user:term_expansion not called
:- my_directive(x).       % same, not possible to define custom directives used inside modules from the outside?
Error: unknown directive: my_directive/1
true.
(Sorry for the barrage of issues, finally got some time to collect
reproduction cases for various things)
—
Reply to this email directly, view it on GitHub
https://github.com/trealla-prolog/trealla/issues/390, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFNKSEVM5UWESZS4FUPGXRTYEMYKRAVCNFSM6AAAAAA7KONINKVHI2DSMVQWIX3LMV43ASLTON2WKOZRHE4TEMZQGI3DKMA
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

Good point. It works, but not sure if it's supposed to ;). The term expansion issue happens when loading files normally too (with consult or use_module).
Module from [user]:
?- [user].
:- module(foo, []).
bar(42).
   true.
?- foo:bar(X).
   X = 42.

Consulting a file with user:term_expansion/2 and then a module:
% ./tpl
Trealla Prolog (c) Infradig 2020-2023, v2.30.7
?- consult(expand).
---- expand: :-initialization writeln(loaded expand.pl)
---- expand: end_of_file
loaded expand.pl
   true.
?- consult(some_module).
---- expand: begin_of_file
---- expand: :-module(some_module,[])
loaded expand.pl
loaded some_module.pl
   true.
?-

However loading it indirectly from :- use_module(...) doesn't expand anything
$ ./tpl some_module
loaded expand.pl
loaded some_module.pl
Trealla Prolog (c) Infradig 2020-2023, v2.30.7
?-

Code:
% some_module.pl
:- module(some_module, []).
:- use_module(expand).

hello(world).

:- initialization((write('loaded some_module.pl\n'))).

% expand.pl
:- module(expand, []).

user:term_expansion(T, _) :-
    write('---- expand: '),
    write(T),
    nl,
    fail.

:- initialization((write('loaded expand.pl\n'))).

For comparison, output from Scryer:
$ scryer-prolog some_module.pl
---- expand: :-initialization(write(loaded expand.pl
))
loaded expand.pl
---- expand: hello(world)
---- expand: :-initialization(write(loaded some_module.pl
))
loaded some_module.pl

Output from SWI:
$ swipl some_module.pl
---- expand: :-initialization write(loaded expand.pl
)
---- expand: end_of_file
loaded expand.pl
---- expand: hello(world)
---- expand: :-initialization write(loaded some_module.pl
)
---- expand: end_of_file
loaded some_module.pl

Not sure what the behavior is supposed to be but SWI and Scryer seem to agree with each other at least.

Ok, trying to start simple so my brain can comprehend...
~/trealla (devel) $ swipl -q -g halt expand.pl
---- expand: hello(world_expand)
---- expand: :-initialization write(loaded expand.pl)
---- expand: end_of_file
loaded expand.pl
~/trealla (devel) $ tpl -q -g halt expand.pl
loaded expand.pl
---- expand: begin_of_file
---- expand: end_of_file
I'll try and work from that.
On Wed, Nov 15, 2023 at 12:09 PM guregu @.***> wrote:

Good point. It works, but not sure if it's supposed to ;). The term
expansion issue happens when loading files normally too (with consult or
use_module).
Module from [user]:
?- [user].
:- module(foo, []).
bar(42).
true.
?- foo:bar(X).
X = 42.
Consulting a file with user:term_expansion/2 and then a module:
% ./tplTrealla Prolog (c) Infradig 2020-2023, v2.30.7?- consult(expand).---- expand: :-initialization writeln(loaded expand.pl)---- expand: end_of_fileloaded expand.pl   true.?- consult(some_module).---- expand: begin_of_file---- expand: :-module(some_module,[])loaded expand.plloaded some_module.pl   true.?-
However loading it indirectly from :- use_module(...) doesn't expand
anything
$ ./tpl some_moduleloaded expand.plloaded some_module.plTrealla Prolog (c) Infradig 2020-2023, v2.30.7?-
Code:
% some_module.pl
:- module(some_module, []).
:- use_module(expand).
hello(world).
:- initialization((write('loaded some_module.pl\n'))).
% expand.pl
:- module(expand, []).
user:term_expansion(T, _) :-
write('---- expand: '),
write(T),
nl,
fail.
:- initialization((write('loaded expand.pl\n'))).
For comparison, output from Scryer:
$ scryer-prolog some_module.pl---- expand: :-initialization(write(loaded expand.pl))loaded expand.pl---- expand: hello(world)---- expand: :-initialization(write(loaded some_module.pl))loaded some_module.pl
Output from SWI:
$ swipl some_module.pl        ---- expand: :-initialization write(loaded expand.pl)---- expand: end_of_fileloaded expand.pl---- expand: hello(world)---- expand: :-initialization write(loaded some_module.pl)---- expand: end_of_fileloaded some_module.pl
Not sure what the behavior is supposed to be but SWI and Scryer seem to
agree with each other at least.
—
Reply to this email directly, view it on GitHub
https://github.com/trealla-prolog/trealla/issues/390#issuecomment-1811689127,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFNKSEU2Y5OTEXSAQSCDSS3YEQP5LAVCNFSM6AAAAAA7KONINKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJRGY4DSMJSG4
.
You are receiving this because you commented.Message ID:
@.***>

Thanks, I can confirm clauses inside of modules are getting visited now. I'll do some more poking around and report back. Much appreciated!

Closing this.


HDDS-4059: SCMStateMachine::applyTransaction() should not invoke TransactionContext.getClientRequest()

What changes were proposed in this pull request?
applyTransaction() should not call trx.getClientRequest(). Since client request will not be replicated from leader to follower, follower will not be able to update its state machine.
We should call trx.getStateMachineLogEntry(), since content of client request will be injected to StateMachineEntryProto at leader, and extracted from log entry at follower.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-4059
How was this patch tested?
CI

+1. Thanks for @GlenGeng contribution. Will merge soon.


Gremlin - Certificate Has Expired

Describe the bug
Discovery is broken.
To Reproduce
In Gremlin Lambda Function Function Logs, I see this:
    at TLSSocket.onConnectSecure (_tls_wrap.js:1501:34)
    at TLSSocket.emit (events.js:315:20)
    at TLSSocket.EventEmitter.emit (domain.js:483:12)
    at TLSSocket._finishInit (_tls_wrap.js:936:8)
    at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:710:12) {
  code: 'CERT_HAS_EXPIRED',
  config: {
    url: 'https://perspective-dev-cluster.cluster-[redacted].us-east-1.neptune.amazonaws.com:6174/status',
    headers: {
      Accept: 'application/json, text/plain, */*',
      Host: 'perspective-dev-cluster.cluster-[redacted].us-east-1.neptune.amazonaws.com:6174',
      'X-Amz-Security-Token': [redcted]',
      'X-Amz-Date': '20200924T160336Z',
      Authorization: 'AWS4-HMAC-SHA256 Credential=[redacted]/20200924/us-east-1/neptune-db/aws4_request, SignedHeaders=host;x-amz-date;x-amz-security-token, Signature=[redacted]',
      'User-Agent': 'axios/0.19.2'
    },
    transformRequest: [ [Function: transformRequest] ],
    transformResponse: [ [Function: transformResponse] ],
    timeout: 3000,
    adapter: [Function: httpAdapter],
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: -1,
    validateStatus: [Function: validateStatus],
    method: 'get',
    data: undefined
  },
  request: Writable {
    _writableState: WritableState {
      objectMode: false,
      highWaterMark: 16384,
      finalCalled: false,
      needDrain: false,
      ending: false,
      ended: false,
      finished: false,
      destroyed: false,
      decodeStrings: true,
      defaultEncoding: 'utf8',
      length: 0,
      writing: false,
      corked: 0,
      sync: true,
      bufferProcessing: false,
      onwrite: [Function: bound onwrite],
      writecb: null,
      writelen: 0,
      afterWriteTickInfo: null,
      bufferedRequest: null,
      lastBufferedRequest: null,
      pendingcb: 0,
      prefinished: false,
      errorEmitted: false,
      emitClose: true,
      autoDestroy: false,
      bufferedRequestCount: 0,
      corkedRequestsFree: [Object]
    },
    writable: true,
    _events: [Object: null prototype] {
      response: [Function: handleResponse],
      error: [Function: handleRequestError]
    },
    _eventsCount: 2,
    _maxListeners: undefined,
    _options: {
      protocol: 'https:',
      maxRedirects: 21,
      maxBodyLength: 10485760,
      path: '/status',
      method: 'GET',
      headers: [Object],
      agent: undefined,
      agents: [Object],
      auth: undefined,
      hostname: 'perspective-dev-cluster.cluster-[redacted].us-east-1.neptune.amazonaws.com',
      port: '6174',
      nativeProtocols: [Object],
      pathname: '/status'
    },
    _redirectCount: 0,
    _redirects: [],
    _requestBodyLength: 0,
    _requestBodyBuffers: [],
    _onNativeResponse: [Function],
    _currentRequest: ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 6,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: false,
      useChunkedEncodingByDefault: false,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      _contentLength: 0,
      _hasBody: true,
      _trailer: '',
      finished: true,
      _headerSent: true,
      socket: [TLSSocket],
      connection: [TLSSocket],
      _header: 'GET /status HTTP/1.1\r\n' +
        'Accept: application/json, text/plain, */*\r\n' +
        'Host: perspective-dev-cluster.cluster-[redacted].us-east-1.neptune.amazonaws.com:6174\r\n' +
        'X-Amz-Security-Token: [redacted]' +
        'X-Amz-Date: 20200924T160336Z\r\n' +
        'Authorization: AWS4-HMAC-SHA256 Credential=[redacted]/20200924/us-east-1/neptune-db/aws4_request, SignedHeaders=host;x-amz-date;x-amz-security-token, Signature=[redacted]\r\n' +
        'User-Agent: axios/0.19.2\r\n' +
        'Connection: close\r\n' +
        '\r\n',
      _onPendingData: [Function: noopPendingOutput],
      agent: [Agent],
      socketPath: undefined,
      method: 'GET',
      insecureHTTPParser: undefined,
      path: '/status',
      _ended: false,
      res: null,
      aborted: false,
      timeoutCb: [Function: emitRequestTimeout],
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      _redirectable: [Circular],
      [Symbol(kCapture)]: false,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype]
    },
    _currentUrl: 'https://perspective-dev-cluster.cluster-[redacted].us-east-1.neptune.amazonaws.com:6174/status',
    [Symbol(kCapture)]: false
  },
  response: undefined,
  isAxiosError: true,
  toJSON: [Function]
}

Investigation with @leozhad has yielded information that this issue was identified to be an account specific bug not pertaining to Perspective and has since been resolved.
If anyone sees this again in the future please open a new issue and we'll look into it.


Support multiple docker_compose_commands

If you're using a docker-compose version > 2, then the way to share configurations is by layering compose files.
So when spinning up a test env I might use
docker-compose -f base.yml -f test.yml

And when spinning up a dev environment I might use
docker-compose -f base.yml -f dev.yml

I can think of a couple of features that would make this more convenient. For one, right now running up compose uses the docker_compose_command in up.yml perhaps we could support a flag, I'm not sure about the yaml but I'm imagining
docker_compose_commands:
  default: docker-compose -f docker-compose.yml -f docker-compose.dev.yml
  test: docker-compose -f docker-compose.yml -f docker-compose.test.yml

then
up compose --test -d

which should be equivalent to
docker-compose -f docker-compose.yml -f docker-compose.test.yml up -d

with a --build flag if a rebuild is needed.
If that's too much, a simpler feature that would meet my needs would be a tool for asking up to rebuild if needed. Then I could use it more generally
up --check
docker-compose -f docker-compose.yml -f docker-compose.test.yml up -d

Little update here:
So far, layering a test yml hasn't actually worked out in practice. So the above won't help me though I see the value in the idea still.


Datepicker doesn't open in Angular 1.2.20

Good Afternoon,
I am using 1.2.20, and the date picker dropdown isn't opening when clicking in the text box.  This just started happening after I updated to version 0.11
-Jon

Thank you jcarlson for your post! I too was trying to save code and just set the open variable in the html and couldn't figure out why it wouldn't work - that definitely needs to be documented!

I am closing this PR as we do not support Angular 1.2 anymore (& it is too old).


remove test execution during pipeline for acceptance scenarios

fixes https://github.com/Activiti/Activiti/issues/2325


Update ServerRendering.md RoutingContext

Changed 'RouterContext' into 'RoutingContext'. I suppose this alias has recently been updated in the code but not in this file

This is a master/release mismatch. It is in fact <RouterContext> on master.

ahh I see, I missed an update :)


Replace net2 with socket2

net2 is marked as deprecated and the suggestion is to use the socket2 crate instead. cargo audit in particular will complain about net2 dependency.

It seems this is duplicated.

See #1319, #1322.

If I submit a PR that replaces net2 with socket2 (it's compiling; passing all tests), will that be looked at?
(I understand the "if it ain't broke, don't fix it" mentality, but I'm just checking if there is opposition to this change)

https://github.com/tokio-rs/mio/pull/1325


[Modal] Modal breaks when repeatedly opened and closed

Steps
Check out this fiddle that opens modalOne, then immediately closes modalOne and opens modalTwo. What is left is a translucent layer on top of the whole page making it impossible to use.
Here is a video of it:

Expected Output
modalOne opens, then modalOne closes, then modalTwo opens.
Version
2.3.1

This isn't a bug, showing and hiding modal's is asynchronous. You should use the callbacks on the modal settings page. https://semantic-ui.com/modules/modal.html#settings
You can also see this working here https://jsfiddle.net/8dwpfbke/

@hammy2899 I see, thanks! Would it be possible to transition from the first modal to the second using JS without using a button like the one shown on this page?

You can use the modal behavior https://semantic-ui.com/modules/modal.html#behavior to show/hide etc

@hammy2899, sorry for not clarifying. I want to be able to do something like this, but without the button to transition from modal 1 to modal 2:

Since opening/closing modals are asynchronous, how can I transition to the second modal after the first is closed without setting callbacks (in my case the the second modal is only opened on select cases, not every time the first modal is closed)?

Ah yes that's a good suggestion! Thanks so much!


:bomb: Bug: dtm init failed in version 0.6.1

What Happened?
I'm following the tutorial https://docs.devstream.io/en/latest/quickstart/ step by step.
and failed in step 3: dtm init -f quickstart.yaml
here is the error message:
# dtm init -f quickstart.yaml
2022-06-20 12:29:21 ✖ [ERROR]  Config file validation failed: tool file is empty.
2022-06-20 12:29:21 ℹ [INFO]  Using dir <.devstream> to store plugins.
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x11e8537]

goroutine 1 [running]:
github.com/devstream-io/devstream/internal/pkg/pluginmanager.DownloadPlugins(0x0)
	github.com/devstream-io/devstream/internal/pkg/pluginmanager/manager.go:30 +0x177
main.initCMDFunc(0x18a8a80, {0xc000045cc0, 0x0, 0x2})
	github.com/devstream-io/devstream/cmd/devstream/init.go:26 +0x185
github.com/spf13/cobra.(*Command).execute(0x18a8a80, {0xc000045ca0, 0x2, 0x2})
	github.com/spf13/cobra@v1.4.0/command.go:860 +0xb67
github.com/spf13/cobra.(*Command).ExecuteC(0x18a9200)
	github.com/spf13/cobra@v1.4.0/command.go:974 +0x8b3
github.com/spf13/cobra.(*Command).Execute(0x18a9200)
	github.com/spf13/cobra@v1.4.0/command.go:902 +0x2f
main.main()
	github.com/devstream-io/devstream/cmd/devstream/main.go:98 +0x32

It seems that setting toolFile to "" was not allowed in version 0.6.1.
https://github.com/devstream-io/devstream/blob/adf3dffa19d2450a367f998717a1a11c5e842cc8/internal/pkg/configloader/validation.go#L85-L87
How to Reproduce?
No response
Anything else
dtm version
0.6.1
Nothing changed in  quickstart.yaml except the YOUR_GITHUB_USERNAME_CASE_SENSITIVE and YOUR_DOCKER_USERNAME by the tutorial:
---
# core config
varFile: "" # If not empty, use the specified external variables config file
toolFile: "" # If not empty, use the specified external tools config file
state: # state config, backend can be local or s3
  backend: local
  options:
    stateFile: devstream.state

---
# plugins config
tools:
  - name: github-repo-scaffolding-golang
    instanceID: default
    options:
      owner: zhujinhe
      repo: go-webapp-devstream-demo
      branch: main
      image_repo: zhujinhe/go-webapp-devstream-demo
  - name: githubactions-golang
    instanceID: default
    dependsOn: ["github-repo-scaffolding-golang.default"]
    options:
      owner: zhujinhe
      repo: go-webapp-devstream-demo
      language:
        name: go
        version: "1.17"
      branch: main
      build:
        enable: True
      test:
        enable: True
        coverage:
          enable: True
      docker:
        enable: False

DevStream Version
latest

The problem has been resolved by #655. However, version 0.6.1 does not yet include this change. Please refer to https://docs.devstream.io/en/v0.6.1/quickstart_en/ for now. @zhujinhe

By default, the documentation version is displayed as latest, so there are some inconsistencies with dtm version 0.6.1. Please switch to version 0.6.1 of the documentation and try again. @zhujinhe
cc @aFlyBird0 @IronCore864

@xiaozhi747 Did you download the correct version of dtm? For mac-m1-arm64, please use https://devstream.gateway.scarf.sh/releases/v0.7.0/dtm-darwin-arm64. I've tested locally and everything works fine.

@zhujinhe we did some changes regarding documentation and releases. To sum up:

We follow this doc for releases and branches. TL;DR: we will try our best to support the latest 3 versions. Given our current shortage of manpower, this can't be guaranteed at the moment, but we will strive for it.
Documentation versions: now that the v0.7 is released, we made the v0.7 version the default version when you open docs.devstream.io. The "latest" version won't be shown as default anymore.

If you are interested, you can give the quickstart a try according to the v0.7 documentation. Let us know if there are any more issues.
Thanks very much for your contribution to this matter. Closing this issue for now, but do re-open or create a new one if you find more issues according to the v0.7 doc.


Scoop directory hardcoded to home directory

Seems the code currently does not support custom Scoop locations, e.g., D:\scoop.
https://github.com/jewlexx/sfsu/blob/e1b7d44ae672029a996be69083c156804eaa6693/src/lib.rs#L8

#11


Support fabrik-internal services

The service fabrik currently supports internal service plans, but not internal services.
This is used to define a different plan for the mongodb, which is used by the service fabrik, than for mongodbs provided by the service fabrik via the catalog. However if the service fabrik does not provide a mongodb service this mechanism does not work. Hence this adds an internal service in the same manner as the internal service plans.

Pull Request Test Coverage Report for Build 1501

1 of 1 (100.0%)  changed or added relevant line in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.001%) to 88.593%

Totals

Change from base Build 1498:
0.001%

Covered Lines:
7336

Relevant Lines:
8024

💛  - Coveralls

The motivation behind this is for SF's usage, i.e. deploy a mongodb for the service fabrik (service-fabrik-mongodb).
If I am not mistaken this is currently not possible without having the mongodb plan in the catalog. However than you currently must provide a mongodb service, but can add internal plan. This just leverages the idea of an internal plan to an internal service, such that you don't need to provide a mongodb anymore to use the service fabrik with mongodb.

@steinri : Ok . , got it..
I see that this is already handled here .
So your change might not be needed.

This is handled there for service plans, but not for whole services.
If I would create a mongodb service and mark every service plan as fabrik-internal it would still have the mongodb service in the catalog, but the plan section would be empty.
Hence the catalog would look like:
{
  "services": [
    { <my_service> },
    {
      "id": "foo-baar",
      "name": "mongodb-fabrik-internal",
      "description": "...",
      "bindable": true,
      "subnet": null,
      "tags": [
      ],
      "metadata": {
        "displayName": "MongoDB",
        "documentationUrl": "...",
        "longDescription": "....",
        "providerDisplayName": "...",
        "supportUrl": "...."
      },
      "requires": [],
      "plan_updateable": true,
      "dashboard_client": {
        "id": "....",
        "redirect_uri": "...,
        "secret": "...."
      },
      "plans": []  // <-- no plans
    }
  ]
}

instead of
{
  "services": [
    { <my_service> }
  ]
}


fixed TIE Interceptor to follow XWS ID rules

fixing this so I can match it up with xwing fonts.

It's TIE/in Interceptor because that's what they use in the FFG squadbuilder app and what they have in their API:
{
  "id": 41,
  "name": "TIE/in Interceptor",
  "description": "",
  "icon": "https://sb-cdn.fantasyflightgames.com/ship_types/I_TIEInterceptor.png"
}

In addition, I am hesitant to change xws ids after they've been set. There might be other projects that have hardcoded the tieininterceptor value and this change would break things for them.

Well that's annoying because that's what's printed on the card. https://sb-cdn.fantasyflightgames.com/card_images/Card_Pilot_106.png
I recommend you change the XWS2 ids rules then in your README. Or are those rules owned by xws-spec?

I’ve ticketed the naming issue in xwing-miniatures-font:
https://github.com/geordanr/xwing-miniatures-font/issues/68


Connect with Github Integration

Description
Create a Sign in with gihub functionality and add it to the sign in button
Screenshots
No response
Do you want to work on this issue?
No
Additional information
No response

I am ready to work ,.....
i am working on it

Okay Just start working on it
On Sun, 8 Oct 2023 at 13:44, harshsharma-11 @.***>
wrote:

I am ready to work ,.....
i am working on it
—
Reply to this email directly, view it on GitHub
https://github.com/ahmadou5/Hawks/issues/29#issuecomment-1752019251, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ASVQCXPHIX2VCJXTHKVYYADX6KN2XAVCNFSM6AAAAAA5RUPSLKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJSGAYTSMRVGE
.
You are receiving this because you authored the thread.Message ID:
@.***>

Yeah as I merge your pull requests it will count


http: Allow running without admin HTTP server

Accept bootstrap configs that don't specify an admin port, and simply
don't run the admin server in that case. #3674
Signed-off-by: Fred Douglas<EMAIL_ADDRESS>Risk Level: Low
Testing: added BootstrapNodeNoAdmin to test/server:server_test

Ok, test added and everything is back to compiling. PTAL!

@fredlas can you check CI?


Reducer not called

Hi,
I tried two approaches to define the reducer:
// #1  From the start page
export const editorReducer: ActionReducer = (state: EditorState, action: Action) => {
// #2  Simple function
export const editorReducer: (state: EditorState, action: any) => EditorState = (state: EditorState, action: any) => {
Both reducers are called with an init action, but reducer #2 ist not called for all other actions. Why?

It's near impossible to answer this question without some more information. Can you reproduce it in a plunker please? The latter doesn't look valid at all to me.

Actually the second example is not valid JS.

Either
export const editorReducer: ActionReducer = (state: EditorState, action: Action) => {
Or
export const editorReducer:  (state: EditorState, action: any) = (state: EditorState, action: Action) => {
Although really you should be writing:
export const editorReducer:  ActionReducer = (state: EditorState, action: Action) => {
... I think this could be closed.


Does the RDP Wrapper "fix" for Windows 10 Home still work?

Seems like it hasn't been updated in a long time.  Just tried installing and RDP functionality is still not accessible.  Under the config program it notes the Wrapper State installed, ver <IP_ADDRESS>, Service State is running - ver. 10.0.18362.657 but Listener State is  Not listening / not supported.
Been reading some posts and see a lot of references to updating the RDP Wrapper ini file?
Can somebody advise if this program / mod is still supported/still works.  And if so, what needs to be done to get it to work?  Much thanks

The program hasn't needed any updates, but the .ini files on this github and several others are regularly updated.
I recommend using the autoupdate.bat file in #859 . In addition, run the helper .bat file in the helper folder in that .zip file to schedule this script to run on each startup. As long as you don't run updates when they first appear, you'll always end up with a working .ini file before a new terminal services version hits.

I found the updated ini file and a video on how to manually update the ini and restart the RDPWrapper. Did all that and now when I run RDP Wrapper Config it shows the Service is STOPPED. Listener state still says NOT LISTENING but then off to the right it says "fully supported".
I've restarted using RDPWinst - r a few times, also rebooted... no luck
What am I missing?  Will running the "autoupdate" do anything different?
Thanks for the assistance...

Duplicate of https://github.com/stascorp/rdpwrap/issues/983


Enhancement/test app

Codecov Report

Merging #23 into master will decrease coverage by 2.15%.
The diff coverage is 72.5%.

@@            Coverage Diff             @@
##           master      #23      +/-   ##
==========================================
- Coverage   53.07%   50.92%   -2.16%
==========================================
  Files          17       21       +4
  Lines        2858     2584     -274
==========================================
- Hits         1517     1316     -201
+ Misses       1341     1268      -73


Modify snapshotRetentionLimit to 0 for cluster creations.

Issue #, if available:
Snapshot window sometimes causes additional snapshotting process during cluster creation which takes additional time.
Description of changes:
Modify snapshotRetentionLimit to 0 for cluster creations.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

/lgtm

/retest


Decorate a class

OOP school library: decorate a class
In this pull request I:
Created a class Nameable.
Implemented a method called correct_name that will raise a NotImplementedError.
Turned Person class to Nameable
Made sure that your Person class inherits from Nameable
Made sure that this class has a method correct_name implemented. It should simply return the name attribute.
Prepared base Decorator
Made sure that it inherits from Nameable.
In the constructor I assigned a nameable object from params to an instance variable.
Implemented the correct_name method that returns the result of the correct_name method of the @nameable.
Added CapitalizeDecorator:
Created a class that inherits from the base Decorator class.
Implemented a method correct_name that capitalizes the output of @nameable.correct_name.
Added TrimmerDecorator:
Created a class that inherits from the base Decorator class.
Implemented a method correct_name that makes sure that the output of @nameable.correct_name has a maximum of 10 characters. If it's longer it should trim the word.

Best gif ever!
Thanks for the review!


move flush arg from format to print

the progress prints are not logged during the runtime, and are flushed at the end

@germangh done

Published: https://pypi.org/project/humilis-dynamodb/0.5.1/


How to enable code reload in development

Sometimes code isn't reloaded after some changing. How always enable code reloading?

I'm having this problem too.  I have to restart my rails server to get the code to reload, which I don't believe is the intended behavior.

I recently had this problem- was having to restart Rails on each code change.  Restarting both iTerm and sublime text fixed it for me...  I suspect the watcher got overloaded.

(Note: this only fixes it for a couple hours.  A better solution would be wonderful)

This should not be happening.
What application server are you running?
Is it multi-process? If so, please read the multi-process server section of the README.

@begin29 @jeffreybiles could you provide some more information about the failures you were seeing, in addition to https://github.com/thoughtbot/ember-cli-rails/issues/169#issuecomment-150663616?
What types of files were you changing? Were they implementation files or configuration files?
Are you using Spring?
Are you not seeing updates for EmberCLI files? For Rails files? For both?

Hey, it's been a while since this happened.  Problem has resolved since switching from Sublime Text to Atom.  Sorry I don't recall more specific info.

@jeffreybiles sounds good.
@begin29 I'm closing this issue.
Please let me know if there's still a problem and I'll reopen.

I'm running into this issue, making changes to my rails code does not get updated on the next request.
I'm using Rails v5.0.0.beta3 and Spring


vcpkg new CLI command for new project initiation

CLI as Command-line interface, not ~Common Language Infrastructure~.

Is your feature request related to a problem? Please describe.
I'm always frustrated when ... I have to every time create minimal "Hello World!" grade project with just CMakeLists.txt with basic filesystem organization and adjustments to make it working with vcpkg.
While using dotnet CLI I am glad to have dotnet new opportunity. (link)
While using cargo CLI for Rust language experience I can use cargo new. (link)
While using npm CLI I can use npm init. (link)
While using angular CLI I can use ng new. (link)
I am not using conan, but seems like there exists conan new. (link)
Proposed solution
vcpkg new based on dotnet new architectural principles (including template system).
Describe alternatives you've considered
Nothing exists regarding C++. I can only rely on some repositories called like "project template" or "minimal project template": https://github.com/search?o=desc&q=cmake+project+template&s=stars&type=Repositories
https://vcpkg.readthedocs.io/en/latest/specifications/manifests/ could contain prepacked archives to bootstrap a project immediately after download-unpack-rename.
https://vcpkg.readthedocs.io/en/latest/examples/installing-and-using-packages/#cmake could contain prepacked archives to bootstrap a project immediately after download-unpack-rename.
Additional context

Personally I think it would work better with manifest way of working regarding vcpkg.
If project template system would be a huge thing, so I think that development could be divided for some basic system and more generic one.
Parametrized project templates could be nice thing for example to providing C++ language version.

parametrization also could take into account MSBuild, CMake and provide some way to implement another integrations by contributions.
parametrization also might take into account the most popular Version control systems and/or vcpkg as submodule initiated project

Have you explored vcpkg create <pkg> <url> [archivename] create a new package?

Have you explored vcpkg create <pkg> <url> [archivename] create a new package?

Nor https://vcpkg.readthedocs.io/en/latest/specifications/manifests/, nor https://vcpkg.readthedocs.io/en/latest/examples/installing-and-using-packages/#cmake indicates that it can be done this way.
I have tried to use that, but only new directory appeared in vcpkg/ports/ which is not usable in terms of what I have had on my mind by introducing this topic.
vcpkg create it made for different purposes: https://vcpkg.readthedocs.io/en/latest/examples/packaging-zipfiles/

Related: #9430

Hello. As @strega-nil was assigned I discovered a repo https://github.com/strega-nil/vcpkg-example which is the thing I was thinking about to be "generated" on anyone's local machine after using command like:
vcpkg new --feature-flags=binarycaching,manifests --vcpkg-resolve-deps hello-world-fmt-example --ci-githubworkflow --cmake vcpkg-example.
Where I assumed that:

--feature-flags=binarycaching,manifests --vcpkg-resolve-deps would be some options passed and interpreted by vcpkg;
hello-world-fmt-example would be a name for a project template followed by parameters passed to the project template generator (customizable by template maintainer);
vcpkg-example would be a name for final vcpkg@cmake@C++ project under directory with same name (or possibly changed be some option in 1. CLI section).

@patrolez yeah, I like this! Would you be interested in working on it?


Extract translatable strings from block.json files

Feature Request

[x] Yes, I reviewed the contribution guidelines.

Describe your use case and the problem you are facing
For supporting the next iteration of Gutenberg block development, we need to extract strings from block.json files.
Describe the solution you'd like
wp i18n make-pot should parse block.json files and extract all strings it finds with the additional context.
For more information, check out:

https://github.com/WordPress/gutenberg/pull/13693
https://github.com/WordPress/gutenberg/issues/15169

Here's the final RFC: https://github.com/WordPress/gutenberg/blob/76aa7154913d54985ffbb57b695c9d7e86492124/docs/rfc/block-registration.md

I have just closed https://github.com/WordPress/gutenberg/pull/16088 where we all agreed that i18n-command should extract translatable strings from block.json file.
Re-sharing comment from @swissspidy:

I can potentially help with implementation as I built large parts of that tool and am familiar with it. Then, I suppose @ocean90 could help update it on dotorg.

The challenge would be only how WP-CLI locates all block.json files

Just like WP-CLI scans all JS and PHP files for translation functions, it would then also scan all block.json files that are deemed valid. Don't see a huge difficulty there.

I explored building Babel plugin which takes care of converting block.json into JavaScript code but we decided that we shouldn't go in that direction. Here are some snippets of code which should help with the implementation:
const translatableProperties = [
 	'title',
 	'description',
 	'keywords',
 	'styles',
 ];

function wrapTranslatableProperty( node, name, textDomain, types ) {
 	if ( node.type === 'StringLiteral' && node.value ) {
 		node = types.callExpression(
 			types.identifier( '__x' ),
 			[
 				node,
 				types.stringLiteral( `block ${ name }` ),
 				textDomain !== 'default' && types.stringLiteral( textDomain ),
 			].filter( Boolean )
 		);
 	} else if ( node.type === 'ArrayExpression' ) {
 		node.elements = node.elements.map(
 			( elementNode ) => wrapTranslatableProperty(
 				elementNode,
 				name,
 				textDomain,
 				types
 			)
 		);
 	} else if ( node.type === 'ObjectExpression' ) {
 		node.properties.forEach( ( propertyNode ) => {
 			if ( propertyNode.key.name === 'label' ) {
 				propertyNode.value = wrapTranslatableProperty(
 					propertyNode.value,
 					name,
 					textDomain,
 					types
 				);
 			}
 		} );
 	}
 	return node;
 }

The gist of it is:

string (title and description)  and string[] (keywords) are translatable when whitelisted
for Object[] only label properties are translatable for each object listed (this is only for styles at the moment)

@gziolo Thanks for the update! How often do you think the list of translatable properties would change? It might be safer to have title, description, keywords, and styles.label* whitelisted in WP-CLI.
* What about styleVariations?

@gziolo Thanks for the update! How often do you think the list of translatable properties would change? It might be safer to have title, description, keywords, and styles.label* whitelisted in WP-CLI.

What about styleVariations?

styleVariations is an alias for styles that is the legacy name and a bit ambiguous.
The whitelist approach is perfectly fine. I don't expect to change it frequently. Only if we decide to add new fields but I don't see any reasons for that as of today.

Thanks for the quick response!
Sounds like a relatively easy thing to implement then :-)

@swissspidy – it seems to be one of the last blockers for making block.json a thing. Can you share some pointers about how this could be implemented? Maybe some prior art (PR or commit)?

@gziolo Heya, I created #210 as a starting point for this.


[Doc]--Add labels to function statefulsets and services

Motivation
Pulsar release 2.4.0 supports Adding labels to function statefulsets and services. The code is implemented but the doc is not updated accordingly.
Here is the code update PR: https://github.com/apache/pulsar/pull/4038
Therefore, i make this PR to update docs for releases:
master/2.5.2/2.5.1/2.5.0/2.4.2/2.4.1/2.4.0
Modifications
Add a note in the doc "Setup: Configure Functions runtime" under the Pulsar Functions section

@Jennifer88huang Please cherry-pick to 2.6.1 and 2.6.0. Thanks.


filterProtocolClaims deletes properties required by the IdTokenClaims type

If filterProtocolClaims is set to true (the default), the properties iss, aud, exp and iat that are required by the IdTokenClaims type are deleted and undefined, thus breaking the defined types.
const userManager = new UserManager({
  // ... other options omitted
  filterProtocolClaims: true, // defaults to true
  // ...
});
const user = await userManager.getUser();
const exp = user.profile.exp; // TypeScript says this is a number
console.log(typeof exp) // Should be "number" but is "undefined"

Relevant parts of the code
These properties are deleted from the response:
https://github.com/authts/oidc-client-ts/blob/bcfe363c685e8f243b43bc588ecba7495f88ffa9/src/ResponseValidator.ts#L26-L41
https://github.com/authts/oidc-client-ts/blob/bcfe363c685e8f243b43bc588ecba7495f88ffa9/src/ResponseValidator.ts#L225-L235
Some of which are mandatory here:
https://github.com/authts/oidc-client-ts/blob/bcfe363c685e8f243b43bc588ecba7495f88ffa9/src/Claims.ts#L109

Do you have a use case where you would need any of these properties?
The idea of the ProtocolClaims is to filter protocol details.
That said iss (issuer) and aud (audience) should probably not be filtered.
@brockallen Maybe we can drop the ProtocolClaims filter all together. Do you remember why you originally added it? I mean keeping some more properties in the profile should not hurt...

Are those just claims added to the profile after the protocol handshake is complete? IIRC, it was just to redice the bloat of the storage "user" object in storage.

The profile would be dynamic, by definition. This library doesn't know the claims expected based on the scopes, and there's no guarantee that all users have all claims.
As for the type definition defined, I don't know -- that's past my my era working on this library.

@Badisi  I agree with you.
As such we have three valid options:

A: drop the filtering completely
B: do not filter "iss, sub, sub, aud, exp and iat" but do filter the remaining claims as is.
C: make it configurable via settings, default would be B

We can process here step by step. We first implement option B, this still allows option A or C at a later stage.
@Badisi  Can you provide a merge request with option B?

@pamapa, I went for C directly 😉
I didn't make any breaking change as I simply extended filterProtocolClaims to now also support a string array:
// before
filterProtocolClaims?: boolean;
// after
filterProtocolClaims?: boolean | string[];

Original issue reported by @niklasholm should be fixed as all required claims are now never filtered.
But it should be kept in mind that any other fields that are filtered will still appear as undefined.
I've tried updated the doc a little to reflect that.
Tests were also added to secure that feature.


Map.js UI confusion

I had trouble understanding the movement mechanics while playing the game and I checked map.js, and I was thinking that maybe you could add a minimap instead of the weird arrow configuration, I sadly don't know that much front end so I can't provide any insight on how to do that.

idk why i opened this


Question of UT-HAR data

After reading your paper 《Deep Learning and Its Applications to WiFi Human Sensing: A Benchmark and A Tutorial 》, I think it is great. However, I ran into some problems when I reproduced with code and dataset. I've done some work on human activity recognition using yousefi's dataset before. Currently I have several questions:

I downloaded the UT-HAR dataset from your Google Drive link, but when I try to open these CSV files it shows a bunch of garbled characters, after changing the encoding I still can't solve this problem. As this picture shows that:
I have read yousefi's paper 《A survey on behavior recognition using WiFi channel state information》，this paper offers a dataset which has many CSV files, I would like to know what did you do with this dataset to make it into the three CSV files of train-valid-test.
It is normal for me to run other datasets with your code, but an error occurs when running this UT_HAR_data dataset, as shown in the following figure
Thanks a lot for your paper which makes me achieved a lot, and I look forward to getting your answers and help.

This dues to the encoding problem. You can load the UT_HAR dataset first (indicated as the function 'UT_HAR_dataset' in dataset.py) and then read the data.

After getting raw data from yousefi's paper, you may follow the instructions in their github (link is given). They use sliding window method to generate data and seprate into 7 files according to the corresponding labels. We then use a train-val-test ratio of 8:1:1 to split each file and finally merge the data for all labels together to get three CSV files.

The cause of this problem is that our code is based on Linux system. If you want to use Windows system to run the code, you may change the "/" in dataset.py line 13 and line 20 into "\".


Modify flowchart style

Coverage remained the same at 95.44% when pulling 4196143f5fa599ec9a4e78f944688a6cc18a4ea1 on liuzhenyang:master into 374c30743a6a814d1c39948a21054b49d42b2e34 on ServiceComb:master.