Support for simple Services

The following rough outline was agreed

Annotation on the provier (class)
  shared service(...)
  class FooImpl() satisfies Foo {
  }

TC will validate shared and no args and on type parameters

compiler will produce META-INF/services when it sees the annotation

Will generate jigsaw stuff in the future

Stef will add a new metamodel API method on module:
  Iterable<Foo<String>> foos = `module`.getImpl(`Foo<String>`);

JVM impl will delegate to ServiceLoader

What will be in the (...)?

I guess we need to say what the service interface is (`interface Foo`) since in general the class might satisfy > 1 interfaces. I don't think there can be anything other than that though. The Java ServiceLoader requires a no-args constructor for services classes, so really the info in the annotation is just being used to generate the META-INF/services/ file and that just needs the names of the service and the implementation.

Ah yes, right, though that can be more than one specified interface.

After reading http://openjdk.java.net/projects/jigsaw/quick-start#services I wonder how well this is going to fit with java 9 services. Specifically the fact that we annotate the service implementation class, but java 9 uses provides Foo with FooImpl; on the module descriptor. That requires we typecheck all the sources of a module and iterate all declarations to generate the module descriptor. Do we usually typecheck the whole module when incrementally compiling?
Also, annotating the service implementation means we potentially have to go updating META-INF/services/* when incrementally compiling. Experience with META-INF/MANIFEST.MF suggests this is impossible to get truly right under some incremental compilation cases.

Yeah, that's tricky. I don't have a good idea to deal with that, frankly.

Thoughts apart from Java implementation stuff:

Do you intend to have a singleton instance of the service registry/lookup mechanism that is visible from all interested callers places in all modules? Several instances, seperate by the module loading mechanism could be thinkable, though I don't know if that would be of much use---just to understand.

From my experiences with the similar (and older) mechanism of Security and Provider in java.security, it can be a problem if you have a provider 1 implementing A and B , and a provider 2 implementing A and C when you need A from provider 1 (because, say, A from 2 is faulty) and C. This is especially nasty if they are used inside some libraries, and the libraries don't care much about what provider an implementation comes from.
To facilitate configuration possibilities for a library, the lookup mechanism should provide easy identification of the implementation. The class/package/module itself will likely be invisible to the code doing the lookup, so maybe the names as strings must do.
Another possibility would be some sort of whitelist or blacklist to be configurable if an implementation of a service is known to cause trouble.

This is all very vague as I don't know yet how to best solve such problems. I'm not sure what belongs to a general service lookup mechanism that could be provided by Ceylon or what belongs better at use side. I think these are topics to think about when designing such a system, so I wrote them up here.

@tombentley Well you certainly have the whole model when incrementally compiling. So stick the information about the service() annotation in the model and get it from there.

An alternate approach might be to annotate interfaces like Foo which represent services, and then infer that any concrete class like FooImpl that satisfies the interface is a service implementation. I guess that wouldn't work if the service interface is coming from the JDK or a third-party Java lib, however.

you certainly have the whole model when incrementally compiling

No you don't unless you load the entire module, which is exactly what we don't want for incremental compilation.

So stick this info in mapping.txt.
Sent from my iPhone

On 12 Apr 2016, at 11:39, Stéphane Épardaud<EMAIL_ADDRESS>wrote:
you certainly have the whole model when incrementally compiling
No you don't unless you load the entire module, which is exactly what we don't want for incremental compilation.
—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub

I've started to think about this and need to clarify this bit:
Iterable<Foo<String>> foos = `module`.getImpl(`Foo<String>`);

I assume we're expecting this to search "the whole application" rather than just the dependencies of the current (receiving) module. If so, Module isn't really the right place for this, because really any of the modules in the application would return the same result. Really, we need to have an Application meta object. I guess the reason we don't have one yet is because we've not bitten off assemblies yet. But I wonder if we should add Application now (even though we still don't have assemblies), so we can put this method in the right place.
Also we need a better name than the unceylonic getImpl. Which do people prefer findServices or findServiceImplementations or findServiceProviders?

I assume we're expecting this to search "the whole application" rather than just the dependencies of the current (receiving) module.

Are we? I don't completely recall the whole discussion, but weren't we going to search in dependencies only?

Well surely the point is that we can find providers which we didn't know about at compile time.
I suppose you could argue that we could still do that by looking at other modules and finding out about their services. But that just means we end up having to find which other module we need to look in. So now you have two searches to do (one for the module, and another for the service providers).

Well surely the point is that we can find providers which we didn't know about at compile time.

Well we can: using overrides.xml.

I mean otherwise you would be restricted to a single provider per assembly, which doesn't sound quite right to me.

Well we can: using overrides.xml.

And remember, we're supposedly going to add module-level overrides, though we don't seem to have converged on the syntax for that yet.

I mean otherwise you would be restricted to a single provider per assembly, which doesn't sound quite right to me.

What? What I'm really asking about boils down to which ClassLoader we use with java.util.ServiceLoader?

What I'm saying is that by searching only the dependencies, different modules in the assembly can see different service implementations.
Now, I'm not against eventually adding an Assembly object and a global search, I'm just saying that it seems to me that searching just dependencies is more flexible and less vulnerable to unwanted side-effects at assembly time.

I don't see that it's more flexible. The client still has to iterate the services and chose the one they want to use. I don't see that having different modules in the assembly seeing different subsets of providers is flexible. And I see forcing people into having to use overrides.xml (or assembly.ceylon) just so that module x.y.z can see the providers in module a.b.c as just faff. After all there might be several consumer modules in the assembly, so use use a.b.c everywhere I need to go adding it as a dependency of each consumer module. But I might not even know about all the consumers in my assembly!
What unwanted side-effects at assembly time do you foresee? I suppose there are security benefits to being able to exclude some providers, at alluded to by @dlkw (https://github.com/ceylon/ceylon/issues/5956#issuecomment-207065069).
Maybe @FroMage remembers more about the prospective use cases.

In some contexts, the client just wants to take the only implementation that is visible to it.

How's that relevant? They still have to cope with the possibility of there being 0 or > 1 implementation. And in other contexts they want to make a decision about which of those > 1 implementations to use based on something more sophisticated than .first.

They still have to cope with the possibility of there being 0 or > 1 implementation.

Not always, no.

This must be a very narrow use case: "I know there will be exactly one implementation visible to my module, but I don't actually want to write its name here, so I'll use a service".

I've pushed basic support to the services branch, currently using the ClassLoader used to load the module. Still to do:

[ ] Support in js (@chochos can you do that?)
[ ] Fix the error codes in the typechecker.
[ ] Fix a TODO wrt incremental compilation

One impl at runtime, selected using overrides.xml.

One impl at runtime, selected using overrides.xml.

I don't know what that's supposed to mean. The ServiceLoader API is designed to support multiple impls, and I thought this was pretty much supposed to be based on that.

@tombentley  my comment above was not primarily about security issues. Some experiences in the security context just made me choose it to illustrate the following:
As a user of a library which offers some functionality using the Service mechanism, I might need to influence the library's choice of the service implementation to use. This is for example the case to circumvent some known bugs in one service implementation, when the service also provides some different functionality that is also needed (so I cannot comletely drop this service implementation).
This is influenced by the design of the service API and arises only when the service API provides several different functionality, but such service APIs exist (see java.security), and as a user of all this, you mostly cannot influence the service API design.
Hope that makes my points clearer and helps.

@tombentley this is a very common way to use stuff like JPA. The app code just uses the impl it happens to find in the class path (in this case, in the dependencies) without having any special logic for choosing an impl.

@gavinking wrote

I mean otherwise you would be restricted to a single provider per assembly, which doesn't sound quite right to me.

No. Definitely not. The ServiceLoader will always return a collection of service implementations and you as a consumer are supposed to pick the most suitable.
Usually it means you pick the first one and run with it.
OSGi ServiceRegistry is the same - Whenever you query for a service, you get back a collection of service descriptors and you are responsible for picking the correct instance. OSGi also has a concept of service ranking, that can be used to grab the highest ranking instance.
Most of the time, the service is by its nature either singleton service or a registry of some sort.
If it is a singleton service, you usually expect to have exactly one instance of it available and you have to deal with the cases of either absence or multiple implementations of the service implementation being provided.
Typical examples of singleton services are Logger implementation, JPA provider, Cache implementation, Service registry, etc.
Quite often though it is useful to have multiple implementations of a service. Typical use cases are various adapters, providers and other kinds of extensions to the core application.
A completely arbitrary example of this could be that all DST time zone definitions would be provided to ceylon.time module as services and "injected" into the runtime by including the modules contributing only those time zone definitions that an application needs for it's runtime. ceylon.time would not need to know and carry around hundreds of time zone definitions when a particular application only ever needs one or two...

My point is that it's useful to be able to choose between multiple service implementations at deployment time, that is, in overrides.xml rather than at development time, by coding custom logic into the application that iterates over all providers in the whole assembly.

True. And there is definitely the deploy time component to this whole services story.
But API wise, I see no way around the fact that at runtime there might me more than one instance of a service implementations deployed.
I am not talking here about dynamic service discovery and lifecycle a'la OSGi (although, it has its uses). I am talking about not limiting the service locator API to returning only one instance of the service when there are more available.

What sort of support am I supposed to add to JS, for this JVM-only feature?

@chochos it's not a JVM-only feature. There's API in the language module. Sure on the JVM it's implemented on top of Java APIs but the same thing should be implementable on JS.

OK, this is now supported in JS.

@chochos Excellent!
We need to blog / document this very useful feature!

but for it to be useful we may need to merge it first.

Is there any reason we can't merge it?

@tombentley added some checkboxes above; one was for JS support, but the other ones are about compilation and typechecker errors. I've no idea if there's any progress on that.

Will this make it to 1.2.3?

The JS side is done but @tombentley left a list that's still got some pending items https://github.com/ceylon/ceylon/issues/5956#issuecomment-219068578

Reassigning to @tombentley.

So apparently one of the issue is that @gavinking has to verify using his unicorn-tool that the error codes assigned by @tombentley in the branch are really free. See #4238.
The other issue has to do with incremental compilation so I'll try to figure out what it is.

I checked the other issue and it's not an issue actually, so we're left with the error codes in 9ae50e916bf8b479cf70f2438fec1a85d7e5d8a2

I've merged this, but I strongy suspect the error codes are bogus and should be fixed by @gavinking. I think there must be an error code for "should not be abstract", "should be abstract", "should be an interface", etc. that tell the IDE which quick fix to use based on the error code. I don't know them, and neither does @tombentley so @gavinking should review them and see which ones are appropriate. That's the only thing remaining.

This stuff is so kewl, thanks @tombentley + @chochos !
And it's finished now :)


ControlPanelAppPortlet bug fix

Fixed a bug that prevented the right portlet working.
Simply missing the javax.portlet.name in portlet property.

Fixed in https://github.com/liferay/liferay-blade-samples/pull/74


Empty certificates when specifying various SNIs

Hello!
I have found an issue when requesting various certificates. If I configure the DOMAINS env variable in docker (2.0.1 version) with for example this two SNIS:

test.example.com
subdomain.test.example.com
The agent will request to Let's Encrypt the certificate properly, but when issuing then to Kong, 2 entries are created:

1º entry:  test.example.com certificated is uploaded correctly.
2º entry: subdomain.test.example.com is created with empty certificate !!!
I think the correct behaviour should be to create a single entry with 2 SNIs, or upload the certificate content correctly.
May this is happening because when you create a certificate for a domain and a subdomain of same domain, Let's Encrypt only returns one certificate that is valid also for the subdomain. So the agent can't find the subdomain certificate and uploads an empty certificate.
I hope I have explain myself. Thank you so much!

currently the bot will create two cert entries. but i strange why the second cert have blank sni name. it need investigate.

In RequestException.php line 113:

  Client error: `POST http://localhost:8001/certificates` resulted in a `
  400 Bad Request` response:
  {"fields":{"snis":"api.localhost.vip already associated with existing certifi
  cate '34df034b-7d3d-4931-9e66-94d499fbbc22'"} (truncated...)

Apologies gents, I'm currently away on holiday and can't look into this.
Perhaps setting one job per domain could be a viable workaround in the
meantime?
On Wed, 12 Sep 2018, 08:03 Deshi Xiao<EMAIL_ADDRESS>wrote:

In RequestException.php line 113:
Client error: POST http://localhost:8001/certificates http://localhost:8001/certificates resulted in a    400 Bad Request response:
{"fields":{"snis":"api.localhost.vip already associated with existing certifi
cate '34df034b-7d3d-4931-9e66-94d499fbbc22'"} (truncated...)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/luispabon/kong-certbot-agent/issues/10#issuecomment-420522892,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGF8V0g7nNMsk3dM6nYCobJaWgESQ5nuks5uaKPOgaJpZM4Wi9kb
.

--
Kind regards,
Luis Pabon

currently the bot will create two cert entries. but i strange why the second cert have blank sni name. it need investigate.
In RequestException.php line 113:

  Client error: `POST http://localhost:8001/certificates` resulted in a `
  400 Bad Request` response:
  {"fields":{"snis":"api.localhost.vip already associated with existing certifi
  cate '34df034b-7d3d-4931-9e66-94d499fbbc22'"} (truncated...)

current it does not support upsert, need a PR to support upgrade exist certificate.

Yes, upsert is not supported but I think that this is a different Issue.
The problem I was describing is that two entries are created, each one with its correct sni, but the second entry has the certificate and key parameters empty. I think that this is because certbot creates files with the domain name like this:
example.com.cert
example.com.key
But when trying to create certificates with same root domain like subdomain.example.com, the certificate is the same for all subdomains, so subdomain.example.com.certfile aren't created and the agent uploads an empty certificate because can't find this file.

@arodriguezdlc I wonder if you could confirm whether the contents of the certificate files are different on the second SNI (even if the certificate files are the same)?

@luispabon sorry, i have no environment currently, need @arodriguezdlc helps.

Ok, I will try it this week and then I’ll update you. Thanks!

El 12 dic 2018, a las 9:33, Deshi Xiao<EMAIL_ADDRESS>escribió:
@luispabon https://github.com/luispabon sorry, i have no environment currently, need @arodriguezdlc https://github.com/arodriguezdlc helps.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/luispabon/kong-certbot-agent/issues/10#issuecomment-446504511, or mute the thread https://github.com/notifications/unsubscribe-auth/AHB9L_n_9aaeOZfJmnnBFHIVUgWge3ROks5u4L9ggaJpZM4Wi9kb.

This should now be fixed on https://github.com/luispabon/kong-certbot-agent/releases/tag/2.2.0


some more RDM fixes

Schema has changed
(Output of test script tests/github/schema-version-reminder.js.)
With every change on the schema, its version should be incremented and tagged. See the Fixture README for further information.


[suggestion] Refactor block to have single transaction array.

Feature request
Refactor block to have single transaction array.
Motivation
It is the superior design.
Who can help?
@Erigara

Not needed.


Concept of copy-paste/one shot instead of type for interactions

Hi!
I want to put a long text to textarea field.
hero.interact({'type': '.....long text here....'}) takes a lot of time...
Is there a way to speedup it or put text into textarea as one shot?
I see one way only. It's execute JS code like this:
$("textarea").val('.....long text here....');

or
document.getElementById('textarea').value = '.....long text here....';

Hi @melehin, check out this issue for some details on improving speed: https://github.com/ulixee/hero/issues/138

Thx a lot!


Link of data cannot be opened

I really want to know the algorithmic details of the article, but the data link given cannot be opened。 Could you give me another link such as baidu link or others?

Thank you for the reminder! I have just uploaded the THUMOS14 dataset to both Google drive and Baidu disk.
Google drive link: https://drive.google.com/file/d/1SFEsQNLsG8vgBbqx056L9fjA4TzVZQEu/view?usp=sharing
Baidu disk: https://pan.baidu.com/s/1nspCSpzgwh5AHpSBPPibrQ?pwd=2dej
Please contact me if you have any further problem!

Thanks so much!!!


doesn't install properly on windows 10 x64

installed package via Ctrl+Shift+P > install package > glot
Package installed successfully
Preferences > Package Settings > glot > Settings
Error message that it cannot locat res://Packages/glot/glot.sublime-settings
Preferences > Browse Packages...
%USERPROFILE%\AppData\Roaming\Sublime Text 3\Packages
There is no 'glot' folder. The only file anywhere in system with 'glot' in the name is  @ %USERPROFILE%\AppData\Roaming\Sublime Text 3\Installed Packages\Glot.sublime-package

Follow-up manual steps

cd  %USERPROFILE%\AppData\Roaming\Sublime/ Text/ 3\Packages
mkdir glot
touch glot.sublime-settings
cd ../User
touch glot.sublime-settings
cd User
subl glot.sublime-settings
(insert {} and save file)

After manually creating the .sublime-settings files, I can now use Preferences > Package Settings > glot > Settings to open the settings file.

added a .no-sublime-package to see if it could solve this issue
you can do

uninstall glot


'Add to library list' and 'Set as current library' actions on browsers items

Changes
This PR adds a new Set as current library action, available from:

Libraries in the User Library List view
Single library Filters and .lib objects from the Object Browser

It adds the Add to library list action on:

Single library Filters and .lib objects from the Object Browser

It also allows to run Create source file action on:

Single library  Filters and .lib objects from the Object Browser

Finally, it removes Add to library list... from command palette when library list view is disabled
@chrjorgensen, I'll need your help for one translation 😄
How to test

Try Add to library list action from:

A library from the User Library List view
A filter from the Object Browser
A .lib object from the Object Browser
The User Library List view's title

Try Set as current library action from:

A library from the User Library List view
A filter from the Object Browser
A .lib object from the Object Browser

Checklist

[x] have tested my change

You're right @chrjorgensen, as always!
I introduced a new type (WithLibrary) and modified the object browser's items context so the library related actions (including Create source file) while only appear on library nodes. This gives a better UX and a cleaner code overall.
I updated the description of the PR accordingly.

@chrjorgensen formatting done!


Problems for convert

Hi,
I tried to convert the SqueezeNet weights trained  to tensorflow.
But i get some errors:
ValueError: Unable to determine kernel parameter!
How to fix that?
Thank you very much!

I'm also seeing this issue when trying to convert some models and haven't figured out the problem, yet.

I think in the case of SqueezeNet (where I also got that error), the problem is in the global average pooling layer here:
https://gist.github.com/bmount/62089f03e998dc945d9fdb76d8cf82cd#file-squeeze_1-1-prototxt-L652
Does TensorFlow have a generic global pool op? Otherwise, for the converter, the pool kernel dimensions could be set by the output of the previous layer, ie enough to cover the whole input exactly once.

TensorFlow has a Global Average Pooling [layer] (http://tflearn.org/layers/conv/#global-average-pooling)
I'm looking at this issue, hope it can be fixed

So did anyone succed in converting squeeze net?

@arsakes yeah, you can just change the last pooling parameter from global to a fixed kernel with size equal to the width/height of the previous layer (iirc it's 14 or 7). I started to make a patch that computes this but got sidetracked, sounds like tf will support it natively so maybe it will be fairly straightforward per the note from @tmatas . But quick fix is to just make that small adjustment to the Caffe model spec.

@bmount Yeah, I made exactly the same  to convert squeezenet

I changed LayerAdapter class  in layers.py to be:
class LayerAdapter(object):

    def __init__(self, layer, kind):
        self.layer = layer
        self.kind = kind
        self._input_shape = None

    @property
    def parameters(self):
        name = NodeDispatch.get_handler_name(self.kind)
        name = '_'.join((name, 'param'))
        try:
            return getattr(self.layer, name)
        except AttributeError:
            raise NodeDispatchError('Caffe parameters not found for layer kind: %s' % (self.kind))

    @staticmethod
    def get_kernel_value(scalar, repeated, idx, default=None):
        if scalar:
            return scalar
        if repeated:
            if isinstance(repeated, numbers.Number):
                return repeated
            if len(repeated) == 1:
                # Same value applies to all spatial dimensions
                return int(repeated[0])
            assert idx < len(repeated)
            # Extract the value for the given spatial dimension
            return repeated[idx]
        if default is None:
            raise ValueError('Unable to determine kernel parameter!')
        return default

    def set_input_shape(self, input_shape):
        self._input_shape = input_shape

    @property
    def kernel_parameters(self):
        assert self.kind in (NodeKind.Convolution, NodeKind.Pooling)
        params = self.parameters
        global_pool = hasattr(params, 'global_pooling')
        if params.kernel_size:
            k_h = self.get_kernel_value(params.kernel_h, params.kernel_size, 0)
            k_w = self.get_kernel_value(params.kernel_w, params.kernel_size, 1)
        elif self._input_size:
            k_h, k_w = [self._input_shape.height, self._input_shape.width]
        else: #errors out in get_kernel_value function
            k_h = self.get_kernel_value(params.kernel_h, params.kernel_size, 0)
            k_w = self.get_kernel_value(params.kernel_w, params.kernel_size, 1)
        s_h = self.get_kernel_value(params.stride_h, params.stride, 0, default=1)
        s_w = self.get_kernel_value(params.stride_w, params.stride, 1, default=1)
        p_h = self.get_kernel_value(params.pad_h, params.pad, 0, default=0)
        p_w = self.get_kernel_value(params.pad_h, params.pad, 1, default=0)
        print self.kind
        print self.layer.name
        print k_h, k_w, s_h, s_w, p_h, p_w
        return KernelParameters(k_h, k_w, s_h, s_w, p_h, p_w)

KernelParameters = namedtuple('KernelParameters', ['kernel_h', 'kernel_w', 'stride_h', 'stride_w',
'pad_h', 'pad_w'])

Note: _input_shape that has been added to this class to automatically make the kernel for global pooling layers the same size as the input. So, before calling kernel_parameters() on a node.layer, make sure to set_input_shape. For example:
input_shape = node.get_only_parent().output_shape
node.layer.set_input_shape(input_shape)
kernel_params = node.layer.kernel_parameters

The only thing I needed to change in the caffe model spec for squeezenet was for conv10, the kernel size was set to 1 and pad to 1 as well. I removed the pad from that layer since that's not needed.

could you post the squeezenet model for tensorflow?

Trying to convert squeezenet1.1 :
"Multiple top nodes are not supported"

@Arsakes
I have converted the caffe prototot to a deployment file, but converting the last pooling layer into a convolution doesn’t work. I get an error:
Check failed: target_blobs.size() == source_layer.blovs_size() (2 vs. 0) Incompatible number of blobs for layer pool10.
Could you share you're deployment prototxt?
deploy.txt

@gruenebohne
deploy.txt

Hi @Arsakes,
using your deploy.txt, I run this command:
python convert.py SqueezeNet/SqueezeNet_v1.1/deploy.txt --caffemodel=SqueezeNet/SqueezeNet_v1.1/squeezenet_v1.1.caffemodel --data-output-path=squeeze.npy
I got the following error:
F0106 10:49:53.558841 32003 pooling_layer.cpp:19] Check failed: !(pool_param.has_kernel_size() || pool_param.has_kernel_h() || pool_param.has_kernel_w()) With Global_pooling: true Filter size cannot specified
*** Check failure stack trace: ***
Aborted (core dumped)

For anyone still interested in this issue, note the right explicit window size and stride are:
https://github.com/dividiti/ck-tensorrt/tree/master/package/caffemodel-deepscale-squeezenet-1.0-explicit-window-global-pooling
>     kernel_size: 15
>     stride: 15

https://github.com/dividiti/ck-tensorrt/tree/master/package/caffemodel-deepscale-squeezenet-1.1-explicit-window-global-pooling
>     kernel_size: 14
>     stride: 14

(at least, for working correctly with NVIDIA's TensorRT 1.0.0).

In response to @shrutisharmavsco great answer, make the following change in shapes.py
def get_strided_kernel_output_shape(node, round_func):
    assert node.layer is not None
    input_shape = node.get_only_parent().output_shape
    node.layer.set_input_shape(input_shape)
    o_h, o_w = get_filter_output_shape(input_shape.height, input_shape.width,
                                       node.layer.kernel_parameters, round_func)
    params = node.layer.parameters
    has_c_o = hasattr(params, 'num_output')
    c = params.num_output if has_c_o else input_shape.channels
    return TensorShape(input_shape.batch_size, c, o_h, o_w)

Maybe, there is something wrong in @shrutisharmavsco code.
I think
 elif self._input_size:

should be
 elif self._input_shape:

Thanks all.... this worked for me.  I've collected the above comments into a PR at https://github.com/ethereon/caffe-tensorflow/pull/123


add 'thicknesses' nrrd field (voxel dimensions)

add nrrd ’thicknesses’ field to encode voxel dimension (pixdim in nifti)

Thanks for the patch! I've bumped the version number and published the new version to the npm registry.

thank you for nifti-js! I'll start using it here: http://brainbox.pasteur.fr
On Thu, Aug 11, 2016 at 10:17 AM, Jasper van de Gronde <
<EMAIL_ADDRESS>wrote:

Thanks for the patch! I've bumped the version number and published the new
version to the npm registry.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/scijs/nifti-js/pull/2#issuecomment-239099195, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ACNCTLWOymo2Ywatx5jkLAGqQTIsIGlNks5qetqVgaJpZM4Jh0Uc
.


Gruntfiles are long and make people unhappy

The gruntfiles are really long and feel unnecessarily so.  This may easily be an expressiveness issue in grunt.  So, consider:

Using another build system
Finding useful abstractions to put into library invoked in the grunt file
Use a template system (handlebars?  moustache? fatbeard?) to generate the Gruntfile

Related: https://github.com/uProxy/uproxy/issues/1400

:+1:
There's lots of scope for reducing the size, e.g. a common template for Chrome and Firefox apps and re-thinking coverage (which we don't really use?)

Talked to @trevj, and we have enough abstraction facilities within the expressiveness of Grunt.  So, we can look at generating higher-level rules and incrementally improving the gruntfile.


tweets replies info is not stored in the database

Issue Template
Please use this template!
Initial Check

If the issue is a request please specify that it is a request in the title (Example: [REQUEST] more features). If this is a question regarding 'twint' please specify that it's a question in the title (Example: [QUESTION] What is x?). Please only submit issues related to 'twint'. Thanks.

Make sure you've checked the following:

[x] Python version is 3.5 or higher.
[x] Using the latest version of Twint.
[x] I have searched the issues and there are no duplicates of this issue/question/request.

Command Ran
Description of Issue
I am working in mysql support so I am reviewing again the code and how the info is stored in the DB.
I realized that the tweet replies info is not in the insert query, it should be in line 189 in the db.py file.
I will share the whole change I am mading with you using the pull request like you told me.
I hope having the mysql support by the end of this week.
Environment Details

Using Windows, Linux? What OS version? Running this in Anaconda? Jupyter Notebook? Terminal?

What do you mean? Every attribute that Tweet has, it's in the entry
Can you elaborate, please?

lol oops, i missed that. Thanks again, for keeping an eye out @Nestor75

Lol I should go to the oculist

other point about DB.
In DB.py the code for creating the followers and following tables are not the same,.
location text, is missed in the followers table info:
CREATE TABLE IF NOT EXISTS
followers (
id integer not null,
name text,
username text not null,
bio text,
                url text,
                join_date text not null,
                join_time text not null,
                tweets integer,
                following integer,
                followers integer,
                likes integer,
                media integer,
                private text not null,
                verified text not null,
                avatar text not null,
                date_update text not null,
                follower text not null,
                PRIMARY KEY (id, username, follower)
            );


CRITICAL Vulnerabilities CVE-2022-32207 and CVE-2022-22945 found in docker image

The docker image for buildpack-debs:buster-curl is flagging vulnerabilities CVE-2022-32207 and CVE-2022-22945.
The vulnerabilities appear to come from curl, which has already been patched in buster. Can you please rebuild the image to use the latest, patched curl?
Similar issue to https://github.com/docker-library/buildpack-deps/issues/132 which was resolved by a rebuild, debian-buster is not showing any CVE's that have fixes available.

Debian images are rebuilt on a monthly cadence, so it'll get updated and pushed to Dockerhub soon
Background:

Tags in the [official-images] library file[s] are only built through an update to that library file or as a result of its base image being updated (ie, an image FROM debian:buster would be rebuilt when debian:buster is built).
-https://github.com/docker-library/official-images/tree/2f086314307c04e1de77f0a515f20671e60d40bb#library-definition-files

Official Images FAQ:

Though not every CVE is removed from the images, we take CVEs seriously and try to ensure that images contain the most up-to-date packages available within a reasonable time frame
- https://github.com/docker-library/faq/tree/6138d05aabf61563606d86f98d0ccbd99f162b33#why-does-my-security-scanner-show-that-an-image-has-cves

Since our build system makes heavy use of Docker build cache, just rebuilding the all of the Dockerfiles won't cause any change. So we rely on periodic base image updates.

We strive to publish updated images at least monthly for Debian and Ubuntu. We also rebuild earlier if there is a critical security need. Many Official Images are maintained by the community or their respective upstream projects, like Alpine and Oracle Linux, and are subject to their own maintenance schedule.
- from the same FAQ link

It seems to already be completely up-to-date:
$ docker run -it --rm buildpack-deps:buster-curl
Unable to find image 'buildpack-deps:buster-curl' locally
buster-curl: Pulling from library/buildpack-deps
7e6a53d1988f: Pull complete
4fe4e1c58b4a: Pull complete
cc915d298757: Pull complete
Digest: sha256:a4ce81d1e76a54c634fb40b86a9477788b05a56df351a18f7f60be783b5b22cb
Status: Downloaded newer image for buildpack-deps:buster-curl
root@d4d95405bee4:/# apt update
Get:1 http://deb.debian.org/debian buster InRelease [122 kB]
Get:2 http://deb.debian.org/debian-security buster/updates InRelease [34.8 kB]
Get:3 http://deb.debian.org/debian buster-updates InRelease [56.6 kB]
Get:4 http://deb.debian.org/debian buster/main amd64 Packages [7911 kB]
Get:5 http://deb.debian.org/debian-security buster/updates/main amd64 Packages [338 kB]
Get:6 http://deb.debian.org/debian buster-updates/main amd64 Packages [8788 B]
Fetched 8470 kB in 1s (5779 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
root@d4d95405bee4:/# dpkg -l | grep curl
ii  curl                      7.64.0-4+deb10u2            amd64        command line tool for transferring data with URL syntax
ii  libcurl4:amd64            7.64.0-4+deb10u2            amd64        easy-to-use client-side URL transfer library (OpenSSL flavour)

And neither of the listed CVE's are applicable to Debian Buster:

https://security-tracker.debian.org/tracker/CVE-2022-32207: [buster] - curl <not-affected> (Vulnerable code introduced later)
https://security-tracker.debian.org/tracker/CVE-2022-22945: NOT-FOR-US: VMware

Ugh, sorry guys, I wrote buster when I meant bullseye. The bullseye image is the vulnerable one. I opened a new issue https://github.com/docker-library/buildpack-deps/issues/134


Improve the command for printing completion scripts

Which issue(s) this PR fixes
This is a feature PR that resolves issue #1904.
Special notes for your reviewer
I would appreciate it if you check out the code locally, build it, and test the shell completions yourself.
I did that myself, but the more testing, the better. Also, if you have any ideas on how to test this better, I'd love to hear them.
Release Notes

Rename the generate-completion flag to simply completion. This makes our behavior in this matter consistent with the other very popular CLI library for Go – spf13/cobra.

The completion scripts now include your CLI app name and are ready to be used right away.

To enable completion only for the current shell Zsh session:
. <(./my-awesome-app completion zsh

To enable completions permanently by placing the completion scripts into the standard completions directory:
my-awesome-app completion zsh > /opt/homebrew/share/zsh/site-functions/_my-awesome-app

Please note that for completion to work, your top-level cli.Command name and your binary name must be the same.

I'm having trouble understanding why it fails.
Running FLAGS="--walk docs/v3/" make gfmrun works without problem for me.
Will appreciate help here @dearchap @meatballhat @abitrolly

I'm having trouble understanding why it fails.
Running FLAGS="--walk docs/v3/" make gfmrun works without problem for me.

I am not familiar with this piece of code. And don't see any failures. I guess it is fixed.
What concerns me is how much to the binary size is added by the completion feature and its templates? I guess it is non-optional, right?

@abitrolly All the template code is already in current binary. So @bartekpacia 's work doesnt really change.

@abitrolly All the template code is already in current binary. So @bartekpacia 's work doesnt really change.

It is still interesting what is the overhead and how to remove it?

@bartekpacia I like the idea of introducing complete examples for specific features. It helps me to see how urfave/cli implements some decisions. But mixing up Go code with Bash code for completion scripts looks like a wrong way ahead. )

@abitrolly what I meant is that removing embedFS and templating it in code doesnt change the size of the overall cli binary. I am ok with either approach unless there is a good reason one way or the other

@bartekpacia I am not okay with moving code sections without really good reasons, because comparing historical changes in these pieces becomes really hard.

Thanks for the review and discussion.
I don't agree with your opinion  @abitrolly about mixing Go+ShellC but it's not really an important thing so let's not bikeshed. I'll move completions back to their respective files.
I plan to spend some time soon on improving the completions, so if this proves to be annoying we can revisit it down the road.

@Juneezee @dearchap i moved completion script strings back into individual files. I think this PR is good to be merged now.

Rename the generate-completion flag to simply completion.

I am not aware how this feature works.
Is it enabled by default?
Does it show up in the list of user configured commands by default?
Can users choose the name they are prefer for this completion command?

This PR does 2 things:

renames an existing generate-completion to be completion (in-line with Cobra and other popular CLI libraries)
the completion script printed by this command now contains the app name, and is ready to be pasted in the completion directory without any kind of manual editing.

This PR does 2 things:

Maybe make 2 PRs making 1 thing, so that we can finally merge at least something already. :D

thanks for the review everyone :)
I will of course "squash and merge" this PR to not butcher history

make will give you the coverage percentage


Adding DDL image, "DDLlogo.png" and metadata for DDL token by token F…

Hi, I would like o add my Token metadata and Logo to Chain repo, thanks

Summary by CodeRabbit

New Features

Added "Discordels Token" (DDL) to the token list, including its metadata such as name, logo, creator, symbol, and decimals.

How long it takes to be reviewed?

Reduce the image size, it's huge. Also, there are merge conflicts on the PR.

added from local branch


feat: add a script to check environment software versions

quick utility to check environment requirements. Written with GPT's help, versions pretty open-ended for now but could become more specific as we go.
$ ./scripts/check-env.py
Status Software                  Version Found             Ideal Range               Supported Range
==============================================================================================================
✅ python                    3.10.13                   3.10.0 - 3.10.999         3.9.0 - 3.11.999
✅ npm                       10.5.2                    10.0.0 - 999.999.999      10.0.0 - 999.999.999
✅ node                      v18.20.0                  18.0.0 - 18.999.999       18.0.0 - 18.999.999
✅ docker                    26.1.4                    20.10.0 - 999.999.999     19.0.0 - 999.999.999
✅ docker-compose            2.28.1                    2.28.0 - 999.999.999      1.29.0 - 999.999.999
✅ git                       2.44.0                    2.30.0 - 999.999.999      2.20.0 - 999.999.999
✅ Memory: 16.00 GB

Seems it'd be useful for maintainers to point to the script and tell people to make some assertion on their environment. There's a whole class of confusing errors that can be weeded with something like this.

Maybe this is the right time to add a check for sufficient system and Docker memory allocation?

Yes that sounds reasonable though might require a bit more thinking as to how we structure/section things. Seems we need both a:

"host requirements for docker-compose environment" where we check whether the version of docker, docker-compose and resource allocation look dandy
"requirements for a local dev env" where we just look at the current env and whether its fine

I guess ultimately its more or less the same script and its about whether we run in on the host or in-docker

@rusackas I bumped node to 20

but generally should help support PRs like this one, it's really just a single/simple utility script that should prove useful

Can this be triggered in docker-bootstrap.sh or docker-init.sh or something like that?

@rusackas I bumped node to 20

Awesome... the repo has already been bumped everywhere else I can find... I'll reference this change in that PR for the next go-round.

I think it belongs in docker/docker-init.sh, but we need to add it to the depends_on so all other processes depend on it. Also need to either COPY scripts inside docker or mount it. I started a branch but ran into all sort of other docker/npm/node/disk-space, more roadblocks-than-a-road-can-fit issues

Right for os-level deps, seems the right approach would be to do in-python, with dummy/minimal function that would raise if os-level-dep is missing.
def test_ zstd():
    import  zstd
    zstd.do_something_that_will_raise_os_dep_isnt_installed()


how to bind to a IPv4 socket

All attempts to bind to an address are creating an IPv6 socket instead of the desired IPv4 socket.
For example:
    let addr: TcpAddr = "<IP_ADDRESS>:1234".try_into().unwrap();
    let server = ServerBuilder::new().bind(&addr).build().unwrap();
    let bound = server.last_endpoint().unwrap();
    println!("{:?}", bound);

Results in the following output:
Tcp(TcpAddr { src: None, host: SocketAddr { interface: Ip(V6(::ffff:<IP_ADDRESS>)), port: Specified(1234) } })

Using my actual IP address instead of <IP_ADDRESS> has the same general problem:
Tcp(TcpAddr { src: None, host: SocketAddr { interface: Ip(V6(::ffff:<IP_ADDRESS>)), port: Specified(1234) } })

I saw some examples that specify the interface, for example:
    let addr: TcpAddr = "wlp0s20f3;<IP_ADDRESS>:1234".try_into().unwrap();
    let server = ServerBuilder::new().bind(&addr).build().unwrap();

But this results in a panic:
thread 'main' panicked at 'invalid endpoint : tcp://<IP_ADDRESS>:1234;wlp0s20f3', .cargo/registry/src/github.com-1ecc6299db9ec823/libzmq-0.2.4/src/core/raw.rs:93:17

The backtrace:
  12: std::panicking::begin_panic_fmt
             at src/libstd/panicking.rs:332
  13: libzmq::core::raw::bind
             at src/github.com-1ecc6299db9ec823/libzmq-0.2.4/src/core/raw.rs:93
  14: libzmq::core::raw::RawSocket::bind
             at src/github.com-1ecc6299db9ec823/libzmq-0.2.4/src/core/raw.rs:233
  15: libzmq::core::Socket::bind
             at src/github.com-1ecc6299db9ec823/libzmq-0.2.4/src/core/mod.rs:283
  16: libzmq::core::SocketConfig::apply
             at src/github.com-1ecc6299db9ec823/libzmq-0.2.4/src/core/mod.rs:570
  17: libzmq::socket::server::ServerConfig::apply
             at src/github.com-1ecc6299db9ec823/libzmq-0.2.4/src/socket/server.rs:206
  18: libzmq::socket::server::ServerConfig::with_ctx
             at src/github.com-1ecc6299db9ec823/libzmq-0.2.4/src/socket/server.rs:197
  19: libzmq::socket::server::ServerConfig::build
             at src/github.com-1ecc6299db9ec823/libzmq-0.2.4/src/socket/server.rs:192
  20: libzmq::socket::server::ServerBuilder::build
             at src/github.com-1ecc6299db9ec823/libzmq-0.2.4/src/socket/server.rs:335

I assume I'm doing something wrong, any help would be greatly appreciated.
If helpful, the actual code where I'm trying to implement this can be viewed here:
https://github.com/jeremyandrews/goose/blob/gaggle/src/manager.rs
And I'm running with the following command:
cargo run --example simple -- --manager --manager-bind-host "wlp0s20f3;<IP_ADDRESS>" --manager-bind-port 1234 --expect-workers 3 --host http://apache.fosciana/ -vv

I'm compiling on Linux in an Ubuntu-based distribution (PopOS). Here's my interfaces:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet <IP_ADDRESS>/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: wlp0s20f3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 28:7f:cf:74:1d:23 brd ff:ff:ff:ff:ff:ff
    inet <IP_ADDRESS>/16 brd <IP_ADDRESS> scope global dynamic noprefixroute wlp0s20f3
       valid_lft 6743sec preferred_lft 6743sec
    inet6 fe80::1c3d:22e5:738d:2989/64 scope link noprefixroute
       valid_lft forever preferred_lft forever

And netstat showing that indeed it's incorrectly creating an IPv6 socket:
$ netstat -an | grep 5115
tcp6       0      0 <IP_ADDRESS>:5115          :::*                    LISTEN

Currently its not supported, but it should be straight forward to add, a PR would be most welcomed.
By default the context enables the IPv6 features which probably forces a v6 socket to be created even with a v4 address.  So I'm assuming allowing the user to modify the following line would work:
https://github.com/jean-airoldie/libzmq-rs/blob/ea8eef6ce1502a464f5925640c60db6174365db9/libzmq/src/ctx.rs#L358
I think the best approach would be to add a new force_ipv4 (or a better name) method to the CtxBuilder to toggle this option.

Yeah pretty sure this would work, after reading the zmq API doc:

The ZMQ_IPV6 argument sets the IPv6 value for all sockets created in the context from this point onwards. A value of 1 means IPv6 is enabled, while 0 means the socket will use only IPv4. When IPv6 is enabled, a socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

(Taken from http://api.zeromq.org/master:zmq-ctx-set)

Ah, I see. So it is creating an IPv4 socket, it's just creating an IPv6 socket as well.
It seems my problem is different than I thought, then -- recv_msg() isn't returning anything even when a client connects to the socket (or I telnet to the socket), and thus hanging forever.

It seems my problem is different than I thought, then -- recv_msg() isn't returning anything even when a client connects to the socket (or I telnet to the socket), and thus hanging forever.

The Server does not receive a notification when a new client gets connected, only when it sends a new message.


Support PEM for CertificatesClient.DownloadCertificate

Resolves #16897
Resolves #18945

@pakrym @schaabs if you're good with the PemReader class I added, I can move it to shared and even update ClientCertificateCredential to use it if you like. It's faster than using the Regex classes (which aren't explicitly compiled, though they may be defined in such a way it happens automatically - I forget the heuristics off hand), and handles a few possible resource leaks. I wrote it and the tests so they could easily be drop-ins.

Well, this is surprising:
BenchmarkDotNet=v0.12.1, OS=Windows 10.0.19042
Intel Core i7-8650U CPU 1.90GHz (Kaby Lake R), 1 CPU, 8 logical and 4 physical cores
.NET Core SDK=5.0.103
  [Host]     : .NET Core 3.1.12 (CoreCLR 4.700.21.6504, CoreFX 4.700.21.6905), X64 RyuJIT
  DefaultJob : .NET Core 3.1.12 (CoreCLR 4.700.21.6504, CoreFX 4.700.21.6905), X64 RyuJIT

Method
Mean
Error
StdDev
Gen 0
Gen 1
Gen 2
Allocated

CurrentClientCertificateCredential
6.936 ms
0.1197 ms
0.1061 ms
7.8125
-
-
39.88 KB

NewPemReader
7.277 ms
0.1079 ms
0.0842 ms
-
-
-
17.95 KB

The regex must get compiled as used. I also took out the file reading from ClientCertificateCredential for benchmarking purposes since that would be a wash anyway. Still, it allocates less and doesn't rely on regex.

A subsequent run against net461 (though, in the end this did not produce results), netcoreapp3.1, and netcoreapp5.0 resulted in more plausible numbers:
BenchmarkDotNet=v0.12.1, OS=Windows 10.0.19042
Intel Core i7-8650U CPU 1.90GHz (Kaby Lake R), 1 CPU, 8 logical and 4 physical cores
.NET Core SDK=5.0.103
  [Host]     : .NET Core 3.1.12 (CoreCLR 4.700.21.6504, CoreFX 4.700.21.6905), X64 RyuJIT
  Job-SUXRZX : .NET Core 3.1.12 (CoreCLR 4.700.21.6504, CoreFX 4.700.21.6905), X64 RyuJIT
  Job-YJQFCR : .NET Core 5.0.3 (CoreCLR 5.0.321.7212, CoreFX 5.0.321.7212), X64 RyuJIT

Method
Job
Runtime
Toolchain
Mean
Error
StdDev
Gen 0
Gen 1
Gen 2
Allocated

CurrentClientCertificateCredential
Job-RFILUE
.NET 4.6.1
net461
NA
NA
NA
-
-
-
-

CurrentClientCertificateCredential
Job-SUXRZX
.NET Core 3.1
netcoreapp31
6.527 ms
0.0694 ms
0.0542 ms
7.8125
-
-
40816 B

CurrentClientCertificateCredential
Job-YJQFCR
.NET Core 5.0
netcoreapp50
6.441 ms
0.0779 ms
0.0691 ms
7.8125
-
-
35777 B

NewPemReader
Job-RFILUE
.NET 4.6.1
net461
NA
NA
NA
-
-
-
-

NewPemReader
Job-SUXRZX
.NET Core 3.1
netcoreapp31
6.245 ms
0.1198 ms
0.1600 ms
-
-
-
18371 B

NewPemReader
Job-YJQFCR
.NET Core 5.0
netcoreapp50
6.325 ms
0.1263 ms
0.1181 ms
-
-
-
18067 B

PemReader is showing slightly faster. I made sure my laptop didn't sleep, though I don't believe it did before test results were finished last time.

cert-password-protected.pfx seems to be empty

Sorry for the force push, but the build break was caused by a change in master after I branched that the PR build was picking up. Mainly just moved PemReader and updated Azure.Identity to use it. Found an issue or two with PemReader and added test case/s for it/them, e.g. if a "CERTIFICATE" is listed in a PEM file before "PRIVATE KEY". Valid, but unusual (openssl writes the "PRIVATE KEY" first).


StyleCop Analyzer Export

Could you please add a tool, msbuild task or something similar that can generate a xml report for the stylecop violations.
The old stylecop project had an msbuild task to generate a xml file which can be used in continuous integration enviroments like team city or jenkins.
I tried doing this with your StyleCopTester tool but this seems not to consider the ruleset from project and also has just output of total warning count and no more details.
Would really be nice to have a option for generating an xml export for stylecop analyzers in an stylecop  compatible format so we have a full replacement of stylecop.

Hi @agentschmitt and welcome to the project. :smile:
This is more or less a duplicate of #1090, which includes ideas for implementing functionality like this. Currently StyleCopAnalyzers doesn't export an XML file, but it does expose information about violations through a standard API that can be used to export any needed format. Since the "new" way to export information from analyzers is to simply report it during the standard build process, it seems like the task for this project is already complete.

@pdelvo @AArnott I'm planning to close this as outside the scope of this project. I don't believe this tool is as necessary for this project as it was for StyleCop classic for the following reasons:

Analyzers are directly integrated into MSBuild. You can't build the project and not have the warnings reported for enabled rules. StyleCop classic used a separate pass from compilation. The project build output already functions as the report.
Most of the diagnostics now have code fixes that support fixing all violations of style rules in one operation. It's much less likely for fixes to these rules to be delayed (and thus need a report) because the rules are almost trivial to follow in the first place.

I agree, @sharwell


added grey color to buyMeACoffeButton and ko-fiButton

added grey color to buyMeACoffeButton and ko-fiButton to show visually that it is disabled

Just skimmed it, seems good. I'm thinking if it's worth to add an IgnorePointer or similar to prevent User input aswell if grey is selected as color?

Just skimmed it, seems good. I'm thinking if it's worth to add an IgnorePointer or similar to prevent User input aswell if grey is selected as color?

Please, take a look on a new PR with isEnabled value


Support show-ing all aspects at once

This makes the aspect in show <aspect> optional. When the aspect is not specified, all aspects are used automatically.

Nice. A great example for the multi-schemaness in our pipelines!


Removed deprecated package: MoheshwarAmarnathBiswas.YouTubeVideoDownl…

…oader

[x] Have you signed the Contributor License Agreement?
[x] Have you checked that there aren't other open pull requests for the same manifest update/change?
[ ] This PR only modifies one (1) manifest
[ ] Have you validated your manifest locally with winget validate --manifest <path>?
[ ] Have you tested your manifest locally with winget install --manifest <path>?
[ ] Does your manifest conform to the 1.5 schema?

Note: <path> is the name of the directory containing the manifest you're submitting.

Microsoft Reviewers: Open in CodeFlow

I'm removing the package so there's no folder :)

ok then :)


Updated dependencies to support io.js

Updated the dependencies (nan & node-arraybuffer [https://github.com/vmolsa/node-arraybuffer/pull/1]) to support building using io.js 2.
Please review.

Seems this is also necessary for node 0.12.x. Works for me with that engine.

@dcodeIO Any chance you could merge this?

@ThomWright if you're using a version of node that has Buffers backed by TypedArrays (e.g. 4.0 and later), you can just access the underlying buffer with Buffer.buffer and make a new array view on that. But, this module is necessary for earlier versions. (Some discussion here.)

Thanks, but I'm actually running in the browser (using Browserify), and I was hoping to use this library, but the installation fails trying to install memcpy (npm 3.3.4, node 4.1.0).


Replace Spanish suffixes by Portuguese suffixes in the Portuguese snowball stemmer

On stem/snowball.py, there are a few suffixes in the PortugueseStemmer which I believe were copied by mistake from SpanishStemmer:

'log\xEDas' should be 'logias'
'log\xEDa' should be 'logia'
'uciones' should be 'uções'
'uci\xF3n' should be 'ução'

Indeed, there isn't a single word containing the strings "logía", "uciones" or "ución" in the vocabulary provided on
snowballstem/snowball-data/master/portuguese/voc.txt
(and, as one could expect, these are common on
snowballstem/snowball-data/master/spanish/voc.txt)
The error is also present in the original description of the Portuguese stemming algorithm, but it is unlikely that the site will be updated, since the authors decided to freeze their SVN:
http://thread.gmane.org/gmane.comp.search.snowball/1531

For the record, I reported it on snowballstem/snowball-website#1 too, just in case.


Firmware Missing neopixel and adafruit_register Libraries

Expected Behavior
All required libraries should be pre-installed in the firmware.
Current Behavior
The board complains about missing the neopixel library and the adafruit_register library. Attempting to add these libraries manually results in further issues.
Steps to Reproduce

Start with a clean flash of the firmware.
Copy files from the FC board folder.
Attempt to run the software.

Detailed Description
When attempting to run the software on freshly flashed firmware from the flight_controller_board, the board fails due to missing dependencies. Specifically, it complains that the neopixel and adafruit_register libraries are not found, which prevents the application from running correctly.
Manually adding the neopixel library from the 9.x bundle provided by Adafruit resolves the neopixel issue, but the board complains about the missing adafruit_register library.
Traceback (most recent call last):
  File "code.py", line 12, in <module>
  File "main.py", line 6, in <module>
  File "/lib/pysquared.py", line 20, in <module>
  File "/lib/adafruit_pca9685.py", line 39, in <module>
ImportError: no module named 'adafruit_register'

Attempts to manually add the adafruit_register library from the 8.x and 9.x bundles result in compatibility errors.
code.py output:
incompatible .mpy file
Traceback (most recent call last):
  File "code.py", line 12, in <module>
  File "main.py", line 6, in <module>
  File "/lib/pysquared.py", line 21, in <module>
ValueError: incompatible .mpy file

Hey @TheSilentDefender! Thanks for bringing this up. It turns out that the firmware changed between the last version and this version so a bunch of the pin definitions broke. I went ahead and fixed most of them (notable exception being the reset logic). It should work now!
Try the code that is in is currently on in Commit # 473aca5


Melissaahn/remove new config changes

Creating this for the new release branch.

@shahzaibj seems here we'll be removing all of the Yubikit changes.

@melissaahn I thought we didn't need to remove all the changes?

I had to remove all changes that included or used the YubiKit Sdk. There are some remaining changes from my PR that just shifted around some sections (the ClientCertAuthChallengeHandler class, for example), but those don't depend on YubiKit.

If the question is about bumping to 5.0.0.... since Yubikit is not included, and Java version 8 is not included. nor needed to be included in the host app anymore, I'm thinking that the version number does not need to be moved to 5 anymore. I forgot to remove my changelog line, so I'll do that right now.

I had to remove all changes that included or used the YubiKit Sdk. There are some remaining changes from my PR that just shifted around some sections (the ClientCertAuthChallengeHandler class, for example), but those don't depend on YubiKit.

Why was this needed?

I had to remove all changes that included or used the YubiKit Sdk. There are some remaining changes from my PR that just shifted around some sections (the ClientCertAuthChallengeHandler class, for example), but those don't depend on YubiKit.

Why was this needed?

When the Authenticator team attempted to add a work account in their testing, they got a NoClassDefFoundError in regard to the YubiKitManager class. I'm not sure why this is happening, as they shouldn't need to include any of the YubiKit dependencies (should be taken care of by common). It seems that I need to do more testing before including these dependencies, so I was thinking that the quickest fix to unblock the release is to take out all the YubiKit code.

I had to remove all changes that included or used the YubiKit Sdk. There are some remaining changes from my PR that just shifted around some sections (the ClientCertAuthChallengeHandler class, for example), but those don't depend on YubiKit.

Why was this needed?

When the Authenticator team attempted to add a work account in their testing, they got a NoClassDefFoundError in regard to the YubiKitManager class. I'm not sure why this is happening, as they shouldn't need to include any of the YubiKit dependencies (should be taken care of by common). It seems that I need to do more testing before including these dependencies, so I was thinking that the quickest fix to unblock the release is to take out all the YubiKit code.

Okay, sounds good.
I think the version number for our release will still remain at 5.0.0 because I see there is another MAJOR change in the changelog.


add info on how to cite

I don't think anyone is using this library in an academic context, but it might nevertheless make sense to add a bibtex template or something to the documentation with proper citation information, to make it easier just in case!

Maybe https://guides.github.com/activities/citable-code/?

I don't think anyone is using this library in an academic context

Here's a couple!

Maciej Wolański, Metody analizy nastawienia emocjonalnego
wynikającego z muzyki oraz z tekstu piosenki, https://www.ii.pwr.edu.pl/~kopel/mgr/2017.06_mgr_Wolanski.pdf, 2017

Cole Peterson, Generating Rhyming Poetry Using LSTM Recurrent Neural Networks, http://dspace.library.uvic.ca/handle/1828/10801, 2019


Provided example does not record videos

Provided example of recording videos with playwrignt-jest does not record videos.
Note:

I haven't changed anything in this project.
Just git cloned it, run yarn and yarn test

Attaching screenshots to prove that videos are not recorded if tests fail and if tests pass (videos folder hasn't been even created):

Would be really helpful if someone can have a look at this issue soon, thank you @mxschmitt

Could you try setting launchType: "LAUNCH" in your jest-playwright.config.js?

That's working! Thanks, @mxschmitt !
Probably will be good to update this example.


Refactor index.js

Remove the unused server-side search feature.
Get all data from the sheet instead of a specified cell range.

@ObaltzerS do these changes make sense to you? We wanted to clean up the server code before adding new routes for the governance action types, topics, etc.
I can merge the pull request if you approve.

looks good, thank you.

Awesome, thanks!


riot is not defined

Currently I'm getting "Uncaught ReferenceError: riot is not defined" when following the examples.

Are you referring to the "Example app.js" in my readme ?

I think I understand what you mean now. This is fixed in 6aed763. (0.0.4)
Thank you.


Multiple Chrome instances

Now when I want to connect to multiple chromium instances in one file, only the last connect works, all other are returning
Cannot connect to Chrome { [Error: connect ECONNREFUSED]
code: 'ECONNREFUSED',
errno: 'ECONNREFUSED',
syscall: 'connect' }
Is there a way to connect to multiple chromium instances at the same time?

Fixed the problem, running conf was changed.

@puppeteer701  how did you fixed the problem?


Nest should only introduce indentation after a line break.

I.e. Text("label:") // Nest(2, Text("a") / Line / Text("b")) should produce
label: a
  b

not
label:   a
  b

Oh, that wasn't the way I was using Nest, but I suppose that makes sense.

I suppose nest should introduce enough indentation at the start to make sure it starts at the necessary column.
label:   a
         b

not
label: a
         b

That's how nest of prettyprinter and the others from Haskell behaves. There is also align which behaves like your first example, but is more costly for reasons unknown to me. It's also usually not what I want as it introduces deeper indentation. My preference is to use nest with group to either get everything on one line or start on a new one with less a fixed indentation.

Also thanks for writing this. I'm new to Python from Haskell and the library situation is killing me. This at least gives me some semblance of feeling at home.

That's how nest of prettyprinter and the others from Haskell behaves. There is also align which behaves similar to your first example, but is more costly for reasons unknown to me. It's also usually not what I want as it introduces deeper indentation. My preference is to use nest with group to either get everything on one line or start on a new one with a fixed indentation.

So you're saying nest should behave like what you suggested, align could behave like what I suggested?

Should be fixed in 91f701c78c200ee9184e94a86f520838b9d88a48.

So you're saying nest should behave like what you suggested, align could behave like what I suggested?

Not exactly. align is like a nest along the current column. So that "label: " $ align "a\nb" yields the following:
label: a
       b

There are a few other alignment functions which are just combinations nest and align.


Add option to always open hyperlink in a new browser tab

Partially Closes https://github.com/emilk/egui/issues/3129.

Thanks for this! I was looking for how to use it and figured it out:
ui.hyperlink_to(label, url); // opens in same tab
ui.add(Hyperlink::from_label_and_url(label, url).open_in_new_tab(true)); // opens in new tab

Yes, it would be cool if the default was a global option.


feat(settings): allow hide container with label with no value (#1860)

Also add ability to submit form by pressing "Enter" key
Closes #1860

Thanks @G07cha :+1:


Better detection of K&R compilers.

CLASSIC_C was HP-specific definition. STDC should be more portable.
It should be defined to 1 for compilers conforming to ANSI C and newer standards.
Note: Some old compilers has STDC defined to 0 to inform that they do not support function prototypes.

Thanks.  Applied as commit 71f8c91d7188f8d02dbbffd7b1812dc3f1b2accd.
I split the Source/kwsys changes out for separate integration into upstream KWSys.

I had to revert the change because MS compilers define __STDC__ only when a -Za option is given.  See documentation here.
If you wish to pursue this issue further, please read CONTRIBUTING.rst and come to the mailing list to discuss it.


[REQ] Option to change delay/velocity change when changing movement direction

Perfect Dark has always had sort of "spongy" movement, but it's far more noticeable on PC with WASD controls
for example, when you change direction from left(A) to right(D) while moving forward, there is a fairly noticeable delay in that change, which doesn't feel right in a PC FPS.
Obviously for remaining true to the original game and supporting controller input, this needs to remain in tact, but I'm hoping an option can be added to change the delay or disable it.
I would do a pull request, but a lot of the movement code is beyond my limited C knowledge.

I imagine this would be as simple as changing bondwalk.c
Probably something like changing
g_Vars.currentplayer->speedstrafe -= PALUPF(accelspeed * mult);
and
g_Vars.currentplayer->speedgo += accelspeed * g_Vars.lvupdate60freal * 2;
to
g_Vars.currentplayer->speedstrafe -= PALUPF(accelspeed * mult * g_PlayerStrafeAccelMultiplier);
and
g_Vars.currentplayer->speedgo += accelspeed * g_Vars.lvupdate60freal * g_PlayerStrafeAccelMultiplier;
adding a config option in main.c for g_PlayerStrafeAccelMultiplier (or whatever)

I'd consider that a pretty significant gameplay change. Not to mention I myself don't really feel that it's very sluggish.
Maybe as an option in the future.

yeah, fairly significant, although PC first person shooters definitely have accurate movement as a benefit over consoles, especially older consoles.
But yes, it's all a matter of personal preference, I often find myself getting stuck on doors because I didn't move quite as much as my brain thought I should have compared to pretty much every other first-person game I've played lol
Any chance you know what values would need to be affected? I could always try my hand at a personal commit, I'm just not sure where to start :P

...come to think of it im surprised theres no inertia exploits like in every other game with it
by every I mean ace combat
can we get an april fools update where if you spin like a helicopter you fly?


Docker run -e (enviromental variables) not working.

I have below dockerfile/docker image. When I run docker run with environmental variables, they do end up in the container (checked using PowerShell command Get-Childitem env:) but the IIS app in inetpub/wwroot is not picking these up (I am using Microsoft.Configuration.ConfigurationBuilders.EnvironmentConfigBuilder to read these, tested locally using IIS express which works.)
I did give a read on this issue: https://github.com/microsoft/iis-docker/issues/75 but I still don't understand why it doesn't work. Could not find any official documentation/examples on environmental variables for framework images.
Could someone explain how to get environmental variables into IIS site using dotnet framework image? My experience comes from dot net core, and I expected it to work similarly.
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8 AS build

EXPOSE 80
EXPOSE 443

WORKDIR /app

# copy csproj and restore as distinct layers
COPY *.sln .
COPY ["_Website Application/*.vbproj", "./_Website Application/"]
COPY ["_Website Application/*.config", "./_Website Application/"]
COPY NuGet.config .
RUN nuget restore -ConfigFile NuGet.config

# copy everything else and build app
COPY ["_Website Application/.", "./_Website Application/"]
COPY ["ExternalLibraries/.", "./ExternalLibraries/"]
WORKDIR "/app/_Website Application"
RUN msbuild /p:Configuration=Release -r:False

FROM mcr.microsoft.com/dotnet/framework/aspnet:4.8 AS runtime

# Install IIS Rewrite Module
WORKDIR /install
ADD https://download.microsoft.com/download/1/2/8/128E2E22-C1B9-44A4-BE2A-5859ED1D4592/rewrite_amd64_en-US.msi rewrite_amd64_en-US.msi
RUN Write-Host 'Installing URL Rewrite' ; Start-Process msiexec.exe -ArgumentList '/i', 'rewrite_amd64_en-US.msi', '/quiet', '/norestart' -NoNewWindow -Wait;

#Add HTTPS 443 SSL Binding to localhost host name.
COPY docker-enable-localhost-ssl.ps1 .
RUN powershell.exe ./docker-enable-localhost-ssl.ps1

WORKDIR /inetpub/wwwroot
COPY --from=build ["/app/_Website Application/.", "./"]

The issue is that IIS is running a different user than the docker user that starts the entrypoint. The docker-iis image uses a helper process as entrypoint (IIS.ServiceMonitor) that reads the environment variables and writes them to IIS config using appcmd, e.g.:
C:\Windows\system32\inetsrv\appcmd.exe set config -section:system.applicationHost/applicationPools /+"[name='DefaultAppPool'].environmentVariables.[name='MyVariable',value='MyVariableValue']" /commit:apphost
The asp.net image also uses this same entry point, so I would expect that it would work the same way.
Perhaps you can verify that the updated configuration is indeed written to the applicationHost.config file on startup? Typically it's in system32\inetsrv\config


RFC7468 styled private key is not recognized.

RFC7468 styled private key file should be recognized by BITS implementation.
RFC7468 says Pre-EB of private key file is "-----BEGIN PRIVATE KEY-----", but BITS server implementation only support OpenSSL styled Pre-EB "-----BEGIN RSA PRIVATE KEY-----".
For example, certification tool of "Let's Encrypt(*)" uses RFC7468 styled Pre-EB.

https://letsencrypt.org/

If we put RFC7468 styled private key file to data directory, BITS software creates new private key, and overwrite the existing file. This behavior confuses users.

The encoding of a RSA key can be done in multiple ways and reading the key should be agnostic to the encoding and probably rely on a library that handles all variations. I have generated self-signed certs and RSA keys using below:
https://zerossl.com/free-ssl/#self
The RFC7468 referred is a PKCS#8 encoding. You can convert the traditional format to  PKCS#8 with:
openssl pkcs8 -topk8 -inform pem -in file.key -outform pem -nocrypt -out file.pem
You can also convert from PKCS#8 to traditional, or SSLeay format, with:
openssl pkcs8 -in file.pem -out file.key -nocrypt
I tested the fingerprint function from the python script at:
https://github.com/mountainraptor/bits-key-manager/blob/master/scripts/key-functions
and it is agnostic to the encoding format. If you are using encrypted keys with passwords for PCKS#8 you will need to modify the above commands.

My main concern would be making sure our current crypto scripts continue to work (decrypt-data and encrypt-data). I would like to see some tests (either automated or manual) before this PR is accepted.
I verified this works by using this simple manual test.
# convert test keys
openssl pkcs8 -topk8 -inform pem -in test/fixtures/keys/test.pem -outform pem -nocrypt -out test/fixtures/keys/test-key-rfc7468.pem
openssl rsa -in test/fixtures/keys/test-key-rfc7468.pem -pubout -out test/fixtures/keys/test-key-rfc7468.pub

# Encrypt data
./support/scripts/encrypt-data -v -d /tmp -e test/fixtures/keys/test-key-rfc7468.pub -s test/fixtures/keys/test-key-rfc7468.pem -t test/fixtures/modules-packages/a-1.0.0.tgz

# Decrypt the data
./support/scripts/decrypt-data -v -d /tmp -e test/fixtures/keys/test-key-rfc7468.pem -s test/fixtures/keys/test-key-rfc7468.pub -t /tmp/a-1.0.0.enc

# Check
tar tvf /tmp/a-1.0.0.tgz


Error TS2345 While Connecting Client side-web to SPFx

Error

[Error - [tsc] src/webparts/helloWorld/HelloWorldWebPart.ts(30,55): error TS2345: Argument of type '(test: any) => any' is not assignable to parameter of type 'string'.]

Hello, I am very new to SPFx . I am following the guidelines on how to connect a client side web part to Sharepoint as per the below link :
https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/connect-to-sharepoint
By following the guideline and updating the public render() I get the below error

Steps to reproduce

Go to 'Switch to Visual Studio code (or your preferred IDE) and open src\webparts\helloWorld\HelloWorldWebPart.ts.'

Click on 'Inside the render method, replace the innerHTML code block with the following code:'

See error: It Is not recognising the Type test

Expected behavior
I should have no errors and be able to render any website context and import the its lists
Environment details (development & target environment)

Mac:
SharePoint Online:
Node.js:
Safari
Visual Studio 2019:

I succeeded in exporting my lists as I changed the export of list from test to string

@najwa-prog  Thank you. Sounds like you got this resolved and this ticket can be closed?

@najwa-prog Thank you. Sounds like you got this resolved and this ticket can be closed?

Hi Bcameron , well I got it resolved as I replaced
${escape(this.properties.test}
With
${escape(this.properties.title)}
Don't know if it is a good action. But of you think so yes you can close the ticket.
Thank you.
Najwa.

@najwa-prog the properties object is the interface of the web part properties... see the web part class declaration. This interface is defined above the web part in the same file.
You were referencing a property test that either didn't exist or was the wrong type (any) where the escape function requires a string as an argument. The error you were seeing was saying exactly what the problem was.


Write content for about us page

Anyone versed in writing skills can help us in writing content for "about us" page.
Discuss what you need to write in gitter channel.

I can help in this area.

@digilou  Go on waiting for your PR.

Hi @chaitanyagiri I'm having trouble pushing my branch.
remote: Permission to Cybros/Cybros-Web-Application.git denied to digilou. fatal: unable to access 'https://github.com/Cybros/Cybros-Web-Application.git/': The requested URL returned error: 403 Any suggestions?

hi, @digilou you need to fork the repo. first, then you have to make changes in your forked copy and when you are done with making changes in the forked copy send pull request we will be more than happy to merge it.
Looking forward to your PR.
If you have any doubts please let us know.


Support async function type

TypeScript Version:  2.1.1 / nightly (2.2.0-dev.201xxxxx)
Can we support async function type? That would make a lot of async code much cleaner.
For example:
Code
type asyncFunctionResolvingToString = async () => string;

Expected behavior:
Because TS currently implements ES2016 async/await proposal,  under the hood it'd be equivalent to:
type asyncFunctionResolvingToString = () => Promise<string>;

Note: using Promise is just an implementation detail and could change in the future. What would stay the same is the fact, that the method returns its values async and can be "awaited".

Actual behavior:
TS error:

TS: cannot find name async

I think that would be misleading because it would suggest that returning a Promise and being async are the same thing, but a function that returns a Promise may or may not actually be async (it could return a Promise directly). From the caller's perspective async is an implementation detail.

@jesseschalken TS implements ES2016 async/away proposal which explicitly states, that the return value is a Promise. So the implication of the return value is valid, unless I'm missing something ...
Could you provide an example where this wouldn't be true ?

I'm not saying async doesn't imply the return value is a Promise. I'm saying the return value being a Promise doesn't imply that the function is async.

a function that returns a Promise may or may not actually be async (it could return a Promise directly)

@jesseschalken an async function returns its Promise directly too (i.e. the function returns synchronously although the returned Promise may resolve later). In this respect there is no observable difference from any other Promise-returning function. They all synchronously return a promise. Can you elaborate on the difference you are talking about?

@yortus When I say "is async" I mean literally defined using the async keyword. async () => 1 is async i.e. uses the ECMAScript feature called "async/await", and returns a Promise. () => Promise.resolve(1) is not async, but still returns a Promise.  I'm just talking about how the function happens to be written. The caller can't tell them apart.
If you add the async (..) => .. syntax as a alias for (..) => Promise<..>, then it suggests that async and Promise are the same concept. They're not. async is one way of implementing a function that returns a Promise.

@jesseschalken OK I get you now. But still, there's no observable distinction between the two ways of writing the same thing. Isn't it a bit like saying type P = { foo(): string } is different from type Q = { foo: () => string }? The distinctions are more about convenience and history.

I believe that from the caller perspective (and from one who implements an interface) it makes sense to know which methods are supposed to be async and can be awaited.
It aligns nicely with checking the resolved value of promises.

From the caller's perspective async is an implementation detail.

I believe the opposite is true. "Async" describes a pattern, while Promise<type> describes a behaviour (return value). Consumer of this method/interface would see, that this particular method is async, so that they can use .then() syntax or await the result as per the pattern. The fact that internally it's an instance of a Promise is the implementation detail here.

Imagine, hypothetically, at some point in the future Promise gets replaced with Future. For consumers that rely on async/away syntax, nothing would change because async function stay async, even though the implementation method has changed.

I've updated this issue's description to point out, that the scope is having a way to "specify an async method" as opposed to making it equivalent to Promise return value.

Note: using Promise is just an implementation detail and could change in the future. What would stay the same is the fact, that the method returns its values async and can be "awaited".

@Thinkscape returning Promise is not just an implementation detail, it is a visible part of the published interface of async functions. It will not change in the future in a breaking way because the web eschews backward-incompatible changes.
Also, await operates on Promise values which can come from any source. It makes no distinction whether they originate from an async function or anywhere else. So this is not a justification for the syntax proposed.
The only justification I can see for the syntax you propose is convenience. It doesn't introduce any functional distinctions IMO. It also brings back up the same issue of potentially misleading return type annotation that was discussed in #7284.

I believe the opposite is true. "Async" describes a pattern, while Promise describes a behaviour (return value).

A caller cannot tell the difference between async () => 1 and () => Promise.resolve(1). One uses the async syntax, one does not. They both return a Promise. The Promise is the interface. Whether the function uses async or not is an implementation detail because it makes no difference to the caller.

Consumer of this method/interface would see, that this particular method is async, so that they can use .then() syntax or await the result as per the pattern.

You can use .then() and await on any Promise. Whether the Promise happened to be produced using async syntax is irrelevant. Only the fact that the value is a Promise is relevant to the caller.

Imagine, hypothetically, at some point in the future Promise gets replaced with Future. For consumers that rely on async/away syntax, nothing would change because async function stay async, even though the implementation method has changed.

A Promise has a specific set of methods and specific semantics. Promise is the interface. You even have to write Promise as the return type when defining an async function. Replacing Promise with a class with a different set of methods with different semantics (eg Future) is necessarily a breaking change.

I'd accept that only if async (...args: Args[]) => Result desugared to (...args: Args[]) => PromiseLike<Result>. Granted, you should never require the return type of a callback to be Promise<T>, but should instead opt for PromiseLike<T>. In addition, you should always qualify your return type to be Promise<T> or whatever Promise implementation you're using if possible. Otherwise, your types are likely wrong and either too restrictive or too permissive.

IMHO The discussion is on a sidetrack... whether or not there is a difference to a client, it would be nice if an async function could be declared as having the type of an async function. In fact this is more important if async functions are different than functions returning promises.
BTW there is discernable difference between a function an an async function, at least in node:
> const f = async () => {}
> f.constructor.name
'AsyncFunction'

They don't make a difference to the type system:
function foo() { };

async function bar() { };

(async () => {
    const baz = await foo();
    const qat = await bar();
})();

Be they async or not, externally, from a type perspective, they are both awaitable and the type resolution is clear.  Because they don't make a difference to how the functions are consumed from a type or code perspective, they have no place in TypeScript's type system.  async obviously has meaning to the run-time handles, allocates and invokes those functions, but TypeScript doesn't have to worry about that at a type level (only an down-emit level).

Hmm... if I have a javascript function:
const AsyncFunction = Object.getPrototypeOf(async function(){}).constructor
...
async function takesAsyncOrObject(asyncOrObject) {
  if (asyncOrObject instanceof AsyncFunction) {
      asyncOrObject = await asyncOrObject()
  }
  return asyncOrObject
}

How should I notate it in typescript? You can do more to a function besides calling it. Async functions and functions should be different types because they have different constructors. They can inherit from a common base type of course....

@shaunc Couple tips:

Type it as this:
async function takesAsyncOrObject<T>(asyncOrObject: T | (() => T | Promise<T>)) { ... }

Check for typeof asyncOrObject === "function" instead.

They have different constructors, but they are both callable, and TS only cares about that much. In particular, it doesn't even type generator functions as anything beyond (...args) => Iterator<T>. It's extremely brittle to check for anything more specific than a callable type for anything you just plan to call.
TypeScript is a structurally typed language, not nominally, so leverage that to your advantage. Also, it's bad practice in general to check types much narrower than what you actually need, this being no exception.


Real authors in authors.md

Thanks for authors.md. It is very useful for NY postcard tradition.
But it hides all plugins authors in postcss org. Maybe we can look into first commit author to get real author name?

Fully agree. Plan going ahead is to:

lookup who was the first person to commit to each plugin
create a table that tags each author to each plugin here, that way if there are like any disputes or anything like that can be resolved
once all disputes have been resolved, and all parties are happy, I will open a PR that changes all instances of postcss as the author to whomever the rightful author is.
as a bonus, I'd like to like announce that any other plugin authors that are listed as organizations a chance to update the data via a pull request

Related to #13, might we use https://api.github.com/repos/${ user }/${ name }/contributors to get an Array of contributors, rather than sniff the commits ourselves?
{
  "contributors": [
    {
      "user": "${ login }",
      "contributions": "${ contributions }"
    },
    ...
  ]
}


Release 1.7

Planned changelog:

[ ] Store server data and pending ops on-object when single instance mode is disabled. This will prevent memory leaks. (structural change only, does not affect APIs or behavior)
[x] Default to setting A+ Compliance to true. See #57 for more details. (landed in 96e211d4fad49929d3db522254d3540c14ee3a77)
[x] Enable native-style construction of Parse.Promise. See #57 for more details. (landed in 5e5c444d0bd02d5955c8b43b6257ca11b74eeb14)
[x] Re-commit #115, changing the behavior of Parse.Promise.when(). The response provided to the asynchronous callback will match the style of its arguments. (landed in 7da2856b18ca1672766612700139757300ecbf62)
[x] Add revert() instance method to ParseObject (landed in 7c16dee0f90a6d85bb409851de86107a04007c06)

When these changes have all been committed to master, and end-to-end tested, we'll release 1.7.0

This would be great. Thanks Andrew

I :heart: #115

Changelogs were not updated for the last several releases on the Downloads page. Is there a reason ?

@mohnazemi the source of truth for changelogs will always be here on this repo: https://github.com/ParsePlatform/Parse-SDK-JS/releases
I'll update the downloads page to include the last few releases

@andrewimm Caching built into the JS SDK would be a very useful addition. App's built for the webview in IOS and Android platform would have a huge boost. In the docs you clearly say don't use REST API when you have native sdk for your platform.

@srameshr we are working out a number of strategies for caching, but it will not be an official feature until at least 1.8. It will most likely end up being a plug-in that can be added to the SDK, rather than a change to the SDK itself.

Any particular date on which, this would be available?

@srameshr As a rule, we don't commit to dates for releases. Even less so for features where we're still unsure what to implement.
As it is, it's trivial to implement your own cache in your own application:
updateCache(object) {
  let entry = object.className + ':' object.id;
}

@srameshr As a rule, we don't commit to dates for releases. Even less so for features where we're still unsure what to implement.
As it is, it's trivial to implement your own cache in your own application. This is a simple implementation of one:
updateCache(object) {
  let identifier = object.className + ':' object.id;
  let currentCache = JSON.parse(localStorage.get('cachedObjects') || '{}');
  currentCache[identifier] = true;
  // Store object to localStorage
  localStorage.set(identifier, JSON.stringify(object._toFullJSON()));
  // Store updated object index to localStorage
  localStorage.set('cachedObjects', JSON.stringify(currentCache));
}

getCachedObjects() {
  let objects = {};
  let currentCache = JSON.parse(localStorage.get('cachedObjects') || '{}');
  for (let identifier in currentCache) {
    let objectString = localStorage.get(identifier);
    if (objectString) {
      try {
        objects[identifier] = Parse.Object.fromJSON(JSON.parse(objectString));
      catch (e) { }
    }
  }
  return objects;
}

I am doing something similar to this ...

@andrewimm Although I know you are not commiting to dates, I have to ask do you have at least a rough estimation of when version 1.7 with memory leak (when running in server environment) fix could be released? just to know if it worth to wait or we have to look for a new solution as we already have this issue on production for some time now?

I'm aiming to get something out this week -- the changes involved are pretty significant, but I'm about 2/3 of the way through. In the meantime, I've posted a number of potential workaround ideas in other threads related to the issue.

When #164 lands (hopefully later today), I'll be cutting a release as 1.7.0-rc1. As npm goes, you'll be able to explicitly install this version for testing, but it won't show up in the normal version lists, and won't be included in any semver ranges.
Once we're comfortable that there are no regressions or unintended changes, we'll cut an official 1.7.0 release for npm, our web CDN, and cloud code.

The current master branch passes all unit and integration tests, so I've released 1.7.0-rc1. Download away!

Since there has been no negative feedback about the RC, I'll be releasing 1.7.0 to npm tomorrow morning, including the changes from #179

Yeah we've been running it in production since about 24 hours after the release. Seems to work well.


More examples of REST Calls

Just expanded the documentation with some more (slightly) complex style FIND queries and introduced here the qs() option to make even more complex queries possible via the URL.

Great pointers, thank you!


Fix JavaSerDeTest package name

Motivation
To address err-msg:
The declared package "org.apache.pulsar.functions.runtime.serde" does not match the expected
 package "org.apache.pulsar.functions.api.utils"

corrected test package name.

/cc @srkukarni @jerrypeng


Unable to pull changes

⚠ Please verify that this bug has NOT been raised before.

[X] I checked and didn't find similar issue

🛡 Security Policy

[X] I agree to have read this project Security Policy

Description
I am not able to update uptime-Kuma since
6 July
👟 Reproduction steps
cd
Update from git
git fetch --all
git checkout 1.17.1 --force
Install dependencies and prebuilt
npm install --production
npm run download-dist
👀 Expected behavior
Update
😓 Actual Behavior
Stay the same
🐻 Uptime-Kuma Version
Latest
💻 Operating System and Arch
Linix
🌐 Browser
Chrome
🐋 Docker Version
No response
🟩 NodeJS Version
Latest
📝 Relevant log output
No response

git pull working fine for me


Google errors with "Cannot authenticate via a web browser"

I am using ionic project
Included ng-Cordova.js, cordova.js, ng-cordova-oauth.js
Have inculded cordova in app browser plugin
4)Using ionic run android But still getting the mentioned error while running in android device

Using hybrid app

Duplicate ticket https://github.com/nraboy/ng-cordova-oauth/issues/283


idm_23.4.1_release

@rishiagarwal-oracle you still need to reapprove this PR since changes have been made after your previous approval.


Implement IntoIterator for matrices

There seems to be a method for iterating through matrix, but there isn't IntoIterator implementation.
If this is just oversight and there isn't any implementation problems, it would be nice to have the implementation.

Yes, that's just an oversight!

After merging #242, this is only missing an implementation of IntoIterator for Matrix. I think this would be limited to matrices that own their storage. However, the current OwnedStorage trait does not envision this use case. So here is a proposal for how this could be made to work in steps:

Implement IntoIterator for all implementations of OwnedStorage, namely MatrixArray and MatrixVec.
Add a bound IntoIterator<Item=N> to OwnedStorage<N,...>. (This part is backwards-incompatbile, as it might break existing implementations outside nalgebra.)
Implement IntoIterator for matrices with an owned storage, delegating to the storage implementation.

@sebcrozet as this is technically a backwards-incompatible change, would you have any objections to doing it in this way?


Fix production API handling

Hopefully this will fix the issues with the API on production.
Restored usage of fetch for API calls and introduced the corresponding API_BASE_URL variable on env.production.

I made the proxy work on local by manually sending the "credential vars", but I have no idea how to test the deploy changes :/

Only way to test it is to deploy it :P
Someone please accept this so I can merge!


Videos coding in practice

Complements issue #870
Description
Videos in the style of these by Leo are super useful:
https://youtu.be/GEbDRR_cqJI
https://youtu.be/1UTLS4aO9bQ
It shows the code itself, and that's what a beginner is most curious about, the tendency is to avoid doing it because they're afraid of doing something wrong, the videos show that it's simple and that you can "play" with the code.
Who makes the videos?
In my opinion, letting the community do it is a good idea, ask in the Slack channel who would like to do it, we set a deadline and that's it:)

cc @alhardwarehyde

I am closing this issue due to inactivity.  @LucasHT22 if you feel strongly this should be reopened, please do so w/ commentary.


[INFINITY-2409] Get all log files

Instead of just getting the first 10 log files (even in times of having fewer than 10 and handling a log's non-existence's exception), get all the log files present in a task's sandbox.

On second thought, this happens rare enough to dissuade any change here.


Maybe introduce a way to get legacy UI

So I found out just by switching the UserAgent (to for example an older version of Internet explorer) you can still get old Google UI:s
Is there any chance that this extension could have a UserAgent switcher built in or at least support for changing the Google logo for these old UI versions?

Google on IE works well with the old theme, but using an existing UA switcher addon for Firefox, the UI looks a bit broken (especially with dark theme). I'll do a bit more searching around with what UA switching can do. I remember seeing the old design with the top grey toolbar somewhat recently which I'd like to aim for.
It's definitely possible and I'll look into it.

Google on IE works well with the old theme, but using an existing UA switcher addon for Firefox, the UI looks a bit broken (especially with dark theme). I'll do a bit more searching around with what UA switching can do. I remember seeing the old design with the top grey toolbar somewhat recently which I'd like to aim for.
It's definitely possible and I'll look into it.

Switching to the UA to "Google Bot" gave me the old gray bar design btw.

Oh yeah thank you! The search page doesn't really work well using old UAs so I might only apply it to the hp request header (if possible). Dark theme looks a bit crap so I'll probably just add a custom colour style to it when the page background is dark theme.

The theme is dependent on user preference rather than system theme, however, and I don't have experience with that so I'll look into that as well. On light theme, the styling works really well, although it isn't the Google-type buttons from the 2013-era hp:

On a side note, setting the UA to PlayStation yields a very 90s-looking homepage that looks kinda interesting.
One day I'd love a search page like the NeoCities project with the same name (which is really cool btw and has a pretty good recreation of the old Images results page) but I don't think a UA will cover that, so it'd be a super super long term thing that'd require a ton of code to hook into a Google page response with any degree of speed.