LOL not sure what just happened

I had this file on my project filesystem called server-pids.json
I want to (1) lock the file, (2) read from it (3) write to it, (4) then unlock the file, seems like standard stuff
the problem is, this code just deleted the file from the filesystem, is that expected?
  lockfile.lock(p, function (err) {                                // lock the file (?)
          fs.readFile(p, 'utf8', function (err, data) {
            if (err) {
              cb(err);
            }
            else {
              var pids;

              try {
                pids = JSON.parse(data);
                delete pids[pid];
              }
              catch (err) {
                console.log(err.stack || err);
                pids = {};
              }

              fs.writeFile(p, JSON.stringify(pids), function (err) {

                lockfile.unlock(p, function (err) {                               // unlock the file after writing (?)
                  if (err) {
                    console.log(err.stack || err);
                  }
                });
                if (err) {
                  console.log(' => fs.writeFile error => ', err.stack || err);
                  cb(err);
                }
                else {
                  cb(null);
                }
              });
            }

          });

        });

not sure what's up, but I laughed though
maybe if you delete files, it should be documented, or if it is then I didn't see it :)

nevermind LOL I get it, you just pick a different file to lock to than the one you read/write from. Maybe add that as a simple use case in the docs.

Yeah, lockfiles are not files that stick around.  Their existence implies that you have a lock on whatever they refer to.
Try doing 'path/to/my/apps/lockfiles/' + p.replace(/\\\//g, '-') as the lock filename or something?

yeah thx I just put the lock file in a different location altogether, nbd
On Oct 14, 2016 1:12 PM, "isaacs"<EMAIL_ADDRESS>wrote:

Closed #22 https://github.com/npm/lockfile/issues/22.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/npm/lockfile/issues/22#event-824500744, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AKn56MmWgyKYAKnnymcoSOie0pzDftkdks5qz-IXgaJpZM4KVVJ4
.


Crash When Removing Glasses From Bobble Slot

When I removed my glasses from the bobbles slot the server crashed, client was unaffected.
This caused the glasses to be deleted from the world.
Stack trace:
[13:20:17] [Server thread/ERROR] [FML]: Exception caught during firing event net.minecraftforge.fml.common.gameevent.TickEvent$WorldTickEvent@3b0837b2:
java.lang.NullPointerException: null
        at com.bymarcin.openglasses.surface.ServerSurface$EventHandler.updatePlayer(ServerSurface.java:59) ~[ServerSurface$EventHandler.class:?]
        at com.bymarcin.openglasses.surface.ServerSurface$EventHandler.tickStart(ServerSurface.java:47) ~[ServerSurface$EventHandler.class:?]
        at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_1360_EventHandler_tickStart_WorldTickEvent.invoke(.dynamic) ~[?:?]
        at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) ~[ASMEventHandler.class:?]
        at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182) [EventBus.class:?]
        at net.minecraftforge.fml.common.FMLCommonHandler.onPreWorldTick(FMLCommonHandler.java:287) [FMLCommonHandler.class:?]
        at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:752) [MinecraftServer.class:?]
        at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:397) [nz.class:?]
        at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:668) [MinecraftServer.class:?]
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526) [MinecraftServer.class:?]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]

Thanks for your report. To address the issue i would need some more infos.
Did the error happen with current 2.0.5 release?
Did you upgrade from an older version or was it the first time using the mod?
Did the Glasses have Nightvision Upgrade installed?

Closing this, please open a new Issue if something like this happens again.


Change how I handle text macros to be safer

The original CSS preprocessor supported text macros via straight regexing of the source, so you could put them anywhere. They could theoretically drop markup right inside of a tag, for example, or close tags that were opened in the non-macro source. I'd prefer to move to a model where text macros are treated like any other shorthand markup syntax, where they're only recognized in text, and are well-nested. It looks like they're pretty commonly used in attribute contents as well, so that would be fine.

Okay, plan:

during HTML parsing, flag when I encounter a macro in an attribute value. Drop the attribute names into a bikeshed-specific attribute on the element. Later, when I have access to the Spec object (and thus macro values), find all the elements with that attribute and run substitution.
recognize macros-in-text as a shorthand, emit them as some simple markup. Later, find those elements and replace them with the macro.

Todo: survey the existing usages of macros and see if all of them are okay with being plain text, since that makes things easier/safer than if they might become arbitrary markup. Arbitrary markup is meant to be done via the inclusion system, anyway.

Hm, custom warnings are implemented via macro. Those can realistically (and often should) have markup in them. If this is the only case, tho, then I can just move them to a slightly different system, like a tagged macro that indicates it should be parsed as HTML.

This was done a while ago; instead of my listed plan above, I just passed the macros into the parser as context, and substituted them immediately. Parsing then Just Worked(tm), including when the macro contained more markup. This did end up limiting macro usage to just inside of attribute values and in general text/markup context; you can't use a macro to supply an entire attribute for a tag anymore, but it appears nobody was doing that.


drawing: fix build with meson 0.61

Description of changes
Fixes #167584
This is not a duplicate of #167664, #167664 only fixes the build for 0.8.5 but the package has been updated to 1.0.0 in #166582 and introduced new errors...
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

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

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

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
22.05 Release Notes (or backporting 21.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

@ofborg build drawing

I am also adding the fix for data/meson.build because it is required to build with -Denable-translations-and-appdata=false.

Merging since this is failing on master


country 'LV', Latvia, returns no results on any shows

just_watch = JustWatch(country='LV')
results = just_watch.search_for_item(query=<ANY_MOVIE>)

returns no results. Which is strange since Locale.parse('und_{}'.format('LV')).language returns 'lv', which is the correct language code, as far as I know. What else could be going wrong? Thanks a lot!
Does this mirror #26? Why would it work with, e.g. de_DE for Germany, but not lv_LV for Latvia? I tried to apply the fix in #26, but no change!
Edit:
Same issue for 'SV', Sweden

I've had a dig through and the javascript for the webpage has a mapping table rather than getting the details from a separate call.  There are translations for de, it, pt, es, fr, ru, ko, ja, fi - everything else is in en.  So the code as it stands doesn't work for any other countries with native languages not on that list that aren't english.
I've tried doing a call for LV overwriting the language to en (so it calls 'en_LV') and it definitely returns results.
Anyone with any good suggestions on the neatest way to fix?  I don't like the idea of trying to pull in the javascript and processing.  Baking the table in would break if they add further language support.

Ah I see my mistake. I simply did
from justwatch import JustWatch
import json

just_watch = JustWatch(country='LV')
just_watch.language = 'en'
results = just_watch.search_for_item(query='Friends')
print(json.dumps(results, indent=2))

And got no results. But language is already applied in the constructor!
Just out of curiosity: How did you get to the API calls? I couldn't find anything on their website about an API. Or do you work for them? ;)

You can have a look at what a website is doing by right clicking on a page and selecting Inspect Element in Firefox - it's called something similar in Chrome.
You can then click the Network button then the XHR button.
Then either click something in the webpage or reload the page.
You'll see all the interactions listed, whether it was a GET, POST etc and what the parameters and response was.  Pasting the data into one of the online json beautifiers can help.
If that doesn't get you what you want and you know it's definitely there then you may have to dig through the HTML and or javascript to find what you're looking for.

I've stumbled upon where to get the correct locale - apis.justwatch.com/content/locales/state
import requests
r = requests.Session()
HEADER = {'User-Agent':'JustWatch Python client (github.com/dawoudt/JustWatchAPI)'}
api_url = 'https://apis.justwatch.com/content/locales/state'
rr = r.get(api_url, headers=HEADER)
results = rr.json()
print(results[0].keys())
print([(i['exposed_url_part'], i['full_locale']) for i in results])

gives
dict_keys(['exposed_url_part', 'is_standard_locale', 'full_locale', 'i18n_state', 'iso_3166_2', 'country', 'currency', 'currency_name', 'country_names'])

[('us', 'en_US'), ('de', 'de_DE'), ('br', 'pt_BR'), ('au', 'en_AU'), ('nz', 'en_NZ'), ('ca', 'en_CA'), ('uk', 'en_GB'), ('za', 'en_ZA'), ('ie', 'en_IE'), ('nl', 'en_NL'), ('lt', 'en_LT'), ('se', 'en_SE'), ('th', 'en_TH'), ('pt', 'pt_PT'), ('hu', 'hu_HU'), ('bg', 'bg_BG'), ('no', 'en_NO'), ('ru', 'ru_RU'), ('ee', 'en_EE'), ('lv', 'en_LV'), ('in', 'en_IN'), ('ch', 'de_CH'), ('at', 'de_AT'), ('my', 'en_MY'), ('id', 'en_ID'), ('ph', 'en_PH'), ('ve', 'es_VE'), ('hk', 'en_HK'), ('tw', 'en_TW'), ('sg', 'en_SG'), ('vn', 'vi_VN'), ('pl', 'pl_PL'), ('fi', 'fi_FI'), ('dk', 'en_DK'), ('ro', 'ro_RO'), ('co', 'es_CO'), ('es', 'es_ES'), ('tw-zh', 'zh_TW'), ('fr', 'fr_FR'), ('kr', 'ko_KR'), ('it', 'it_IT'), ('mx', 'es_MX'), ('jp', 'ja_JP')]

So an initial search against this for lv will give back 'en_LV' from 'full_locale'
Probably just need to update the init to try to get this data and fall back on the current derivation if not found.

I've stumbled upon where to get the correct locale - apis.justwatch.com/content/locales/state
import requests
r = requests.Session()
HEADER = {'User-Agent':'JustWatch Python client (github.com/dawoudt/JustWatchAPI)'}
api_url = 'https://apis.justwatch.com/content/locales/state'
rr = r.get(api_url, headers=HEADER)
results = rr.json()
print(results[0].keys())
print([(i['exposed_url_part'], i['full_locale']) for i in results])

gives
dict_keys(['exposed_url_part', 'is_standard_locale', 'full_locale', 'i18n_state', 'iso_3166_2', 'country', 'currency', 'currency_name', 'country_names'])

[('us', 'en_US'), ('de', 'de_DE'), ('br', 'pt_BR'), ('au', 'en_AU'), ('nz', 'en_NZ'), ('ca', 'en_CA'), ('uk', 'en_GB'), ('za', 'en_ZA'), ('ie', 'en_IE'), ('nl', 'en_NL'), ('lt', 'en_LT'), ('se', 'en_SE'), ('th', 'en_TH'), ('pt', 'pt_PT'), ('hu', 'hu_HU'), ('bg', 'bg_BG'), ('no', 'en_NO'), ('ru', 'ru_RU'), ('ee', 'en_EE'), ('lv', 'en_LV'), ('in', 'en_IN'), ('ch', 'de_CH'), ('at', 'de_AT'), ('my', 'en_MY'), ('id', 'en_ID'), ('ph', 'en_PH'), ('ve', 'es_VE'), ('hk', 'en_HK'), ('tw', 'en_TW'), ('sg', 'en_SG'), ('vn', 'vi_VN'), ('pl', 'pl_PL'), ('fi', 'fi_FI'), ('dk', 'en_DK'), ('ro', 'ro_RO'), ('co', 'es_CO'), ('es', 'es_ES'), ('tw-zh', 'zh_TW'), ('fr', 'fr_FR'), ('kr', 'ko_KR'), ('it', 'it_IT'), ('mx', 'es_MX'), ('jp', 'ja_JP')]

So an initial search against this for lv will give back 'en_LV' from 'full_locale'
Probably just need to update the init to try to get this data and fall back on the current derivation if not found.

Hello all,
I updated my init based on your fix and it now works, here is the adjustment:
class JustWatch:
	def __init__(self, country='AU', use_sessions=True, **kwargs):
		self.kwargs = kwargs
		self.country = country
		self.language = Locale.parse('und_{}'.format(self.country)).language
		self.kwargs_cinema = []
		if use_sessions:
			self.requests = requests.Session()
		else:
			self.requests = requests
		self.locale = self.get_locale(self.country)

	def get_locale(self, country):
		api_url = 'https://apis.justwatch.com/content/locales/state'
		r = self.requests.get(api_url, headers=HEADER)
		results = r.json()
		for i in results:
			if i['iso_3166_2'] == country:
				return i['full_locale']
		return self.language + '_' + self.country

Looks great, thanks a lot. I'll test it asap


Implement Continuous Integration

Implement a test suite that can run both locally and on Travis CI, that verifies that the example code passes the test suite for each exercise.
Things to consider:
If some tests are marked as skipped or pending in some way, then CI should remove these annotations so that all the tests run against the example, not just the first test.
If we need to rewrite the files in any way, we should copy the exercise to a tmp directory first, so that we don't accidentally end up committing changes that are just for continuous integration or testing purposes.
We should make it possible to test just one exercise at a time, because testing everything can take a while, and very often people are just working on one exercise and will only need to run the full test suite before committing the change.

Hi @kytrinyx
Could you add me as a maintainer so I can change the travis settings and accept PRs?
Thanks!

@masters3d absolutely! Done.


Support for "-" and "=" keys in Firefox

Thanks, this works great! I had thought that Firefox might just be reserving ctrl+- and ctrl+= shortcuts for itself.

Yes please - any hope of a new release with this in?


Guns, Rockets, and Atomic Explosions - Mouse Sensitivity Bug

I have been working on a modpack and a friend who was testing it kept complaining that he couldn't change his mouse sensitivity. I went through all the mods and disabled one at a time until I figured out that this mod was causing the issue. I load into game and go to Controls -> Mouse Settings and change the sensitivity bar to a different amount. Then I save and close the options and nothing changes. I go back to Mouse Settings and it is magically back to 100% default. I have not tested if there is still issue when I have this mod alone without others -- so could be conflict with other mods.
Minecraft version: 1.16.3
Forge version: 34.1.35
Mod Version: nuclear_craft-1.16.3-0.5.0

Thank you for reporting this.
Fixed in 0.5.1


Explain the use of the COPY command in the NodeJS example

Proposed changes
The explanation of the COPY command given in the NodeJS language guide does not correspond with the example.
The explanation says the COPY command takes in two parameters but goes on to use three parameters in the example without explaining that it can take in multiple src parameters. This is a confusing explanation/example:

This PR explicitly shows that the COPY command takes in two parameters src and dest and there can be multiple src parameters but they should be separated by a comma for example: COPY ["<src1>", "<src2>", ..., "<dest>"]
It also explicitly shows readers that the last parameter is always the destination path avoiding confusions like #13669
Unreleased project version (optional)

Related issues (optional)
Closes #13669
cc @usha-mandya

@danBamikiya Thanks for the update. It looks good :)


Fix TGC metadata extraction

Currently, gcmdump will extract the TGC header instead of the GCM header into __gcm_header__.bin.

Thanks for improving TGC support! I'll merge this and the other PRs now.


Use pdf.js to render .pdf images in img tags

Currently firefox doesn't seem to show images in pdf format <img src='....pdf' but it could with pdf.js, couldn't it? That would be a nice feature.

Safari loads the first page of a PDF as an image, when using an  tag.
In other browsers, you either have to use a custom instance of PDF.js – lots of extra code (compared to an image tag) – or load the PDF in an . Using an  loads a full PDF viewer with zoom and download buttons, a gray background, etc., and is overkill when all you want is a simple image thumbnail. It's also hard to get the size of the  right, compared to an  tag that allows you to set a desired width and the height is automatic.
Here's an example (works on Safari, but not Firefox or Chrome):

I'd love it if PDFs could be loaded as images in Firefox.


getInitialBody allow HTML

Great library.
I'm using the following in my widget constructor to inject some HTML into the  injection point of the widget body/template:
    getInitialBody: function(input, out) {
        return 'foo
bar
';
    },

However, the HTML is rendered escaped (foo
bar
 is displayed, rather than being rendered as HTML)
In templates I can use the  $!{data.name}! sequence to avoid escaping HTML. Is there something similar here? Or maybe a better way to dynamically inject content into the widget body?

you can prevent HTML escaping with $!
http://markojs.com/docs/marko/language-guide/#text-replacement
but be aware of XSS attacks.
Does this help?

I'm just passing this along using getInitialBody, so I don't have access to that.
Of course I could just have

I can use that via a template instruction, but here I don't see a way of triggering that "flag" via the getInitialBody method.
I could also just pass the html along in the state and then use the $! construct in the template, but that isn't ideal for my case. I'm much rather just use the w-body injection mechanism.

Hey @sandro-pasquali, thanks for the feedback!
I just double checked the code and it looks like we are automatically escaping the string as a precaution:
https://github.com/marko-js/marko-widgets/blob/022a181961369cfaf59880b34aa0c53880c1905f/taglib/helpers/widgetBody.js#L35-L37
That may have not been the most intuitive decision, but maybe the following workaround would work for you?:
getInitialBody: function(input, out) {
    return function(out) {
        out.write('foo
bar
');
    }
}

We wouldn't be able to change the existing behavior without risking breaking existing code, but it may be worth considering introducing a new getInitialBodyHtml(input, out) function as a more clear alternative and that would alternative would not escape strings.
Please let me know what you think.

@patrick-steele-idem The workaround you've provided works great. Thanks.
Default escaping is fine (and you're probably right to escape first and ask questions later). As long as it's documented the given workaround is probably enough -- it's reasonable and easy to understand.
Thanks again.


Clear the file upload input after success call

Purpose

The purpose of this PR is to make changes requested under pr #63
Goals

To clear out the input field after successfully uploading a file.
To make changes to the code to maintain the consistency with the rest of the codebase.

Comments

I have left the react-toastify library for now.

@jayasanka-sack sorry I forgot to leave a comment yesterday. I made the requested changes. Please review!

Thanks @YaiyaSam . Please check the following comment: #87 (comment)

Fixed it!


MAKE clean_third_party should kill TortoiseSVN cache

I discovered that there was a lock on the .svn folder when I ran MAKE clean_third_party. Furthermore, after killing the TSVNCache.exe process, I also discovered that any readonly attributes should be removed.
That I know of, I've resolved this just as a natural course of working on unrelated issues. However, one of my commits will handle these two scenarios with dedicated target dependencies.
After that, the clean_third_party target ran successfully.

Resolved.


ceph-mon : check if monitor initial keyring already exists - stuck

Bug Report
What happened:
Trying to run site-container.yml playbook to add an additional OSD (dc1-cephu02) node and MON (azure-cephu01) node. Playbook gets stuck on TASK [ceph-mon : check if monitor initial keyring already exists]
Increased verbosity shows it's specifically stuck on running AnsiballZ_ceph_key.py
Which I think is trying to query the mon keyring inside of the running mon containers:
ceph -n mon. -k /var/lib/ceph/mon/ceph-azure-cephu01/keyring --cluster ceph auth get mon. -f json
I've checked the mon keyring exists and is accessible inside of the container. If I run the above command on ceph-mon-azure-cephu01, I get timeouts:
2022-08-09T15:00:41.269+0000 7f4e80d12700  0 monclient(hunting): authenticate timed out after 300
2022-08-09T15:05:41.268+0000 7f4e80d12700  0 monclient(hunting): authenticate timed out after 300
2022-08-09T15:10:41.273+0000 7f4e80d12700  0 monclient(hunting): authenticate timed out after 300
2022-08-09T15:15:41.267+0000 7f4e80d12700  0 monclient(hunting): authenticate timed out after 300
2022-08-09T15:20:41.273+0000 7f4e80d12700  0 monclient(hunting): authenticate timed out after 300

If I run this on a ubuntu 18.04 vm with a mon container, I get the mon keyring returned. (see corresponding versions below)
What you expected to happen:
For the ansible playbook to run successfully.
How to reproduce it (minimal and precise):

Run the playbook on a ubuntu 20.04 which has mon container.
Share your group_vars files, inventory and full ceph-ansibe log
group_vars all.yml - https://zerobin.net/?25c50c32c4e10f7d#9nVx9C3wa0/Fseh29alq3WugVRiODjKz3NphrLwOjmI=
All others are the same as default.
Inventory -  https://zerobin.net/?934b5b1026330ff0#5agcU6kF+2xsB6y3cI8jQqJDXl92/ZGhI/w2kcuIwrE=
(the azure node has 20.04)
I can't not provide the full ceph-ansible logs as it's too revealing. Happy to answer more questions about our cluster.
Environment:

OS (e.g. from /etc/os-release): 18.04 all dc1 and dc2 vms. 20.04 on azure vm.
Kernel (e.g. uname -a): 5.4.0-91-generic dc1 and dc2 vms. 5.13.0-1023-azure on azure vm.
Docker version if applicable (e.g. docker version): 20.10.17 on dc1 and dc2 vms. 20.10.12 on azure vm.
Ansible version (e.g. ansible-playbook --version): 2.10.17
ceph-ansible version (e.g. git head or tag or stable branch): stable-6.0
Ceph version (e.g. ceph -v): ceph version 16.2.5

2022-08-09T15:00:41.269+0000 7f4e80d12700  0 monclient(hunting): authenticate timed out after 300
2022-08-09T15:05:41.268+0000 7f4e80d12700  0 monclient(hunting): authenticate timed out after 300
2022-08-09T15:10:41.273+0000 7f4e80d12700  0 monclient(hunting): authenticate timed out after 300
2022-08-09T15:15:41.267+0000 7f4e80d12700  0 monclient(hunting): authenticate timed out after 300
2022-08-09T15:20:41.273+0000 7f4e80d12700  0 monclient(hunting): authenticate timed out after 300

It doesn't seem to be a ceph-ansible issue at first glance. It looks like a networking issue in your infra.
Could you check what is described here [1] ?
[1] https://docs.ceph.com/en/pacific/rados/troubleshooting/troubleshooting-mon/#client-can-t-connect-or-mount


runtime: linux callback on non-Go thread fails

I got a same problem like this;

Same problem as #6751 ? As you can see, the issue is still opened, so the problem still remains. But @billziss-gh proposed solution - you can try his solution at https://golang.org/cl/114802.
Alex
Originally posted by @alexbrainman in https://github.com/golang/go/issues/6751#issuecomment-394650860

Hello,
I got the same problem on linux. I'm using ubuntu 20.04. When the .so calls go on non-go thread, it fails at asm_amd64.s
I found the solution at https://golang.org/cl/114802, but it is only for windows.
Any help here please!

Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.
For questions please refer to https://github.com/golang/go/wiki/Questions


Out of date API referenced

listNodeAgentSKUs is now listSupportedImages

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

ID: 3a9c3cde-fcaa-c65c-ba84-d097bb1f1bac
Version Independent ID: 09504f27-aa61-4829-3195-222983f81c35
Content: Run Linux on virtual machine compute nodes - Azure Batch - Azure Batch
Content Source: articles/batch/batch-linux-nodes.md
Service: batch
GitHub Login: @laurenhughes
Microsoft Alias: lahugh

Thanks for the feedback! We are currently investigating and will update you shortly.

This was fixed in #49075. Please close this issue @Karishma-Tiwari-MSFT.


Fix focus with UI Bootstrap Modal

Field not focused and touched (show validation error)
http://jsbin.com/dibilesore/1/edit?html,js,output

My guess is that this is an odd behavior with how ui-bootstrap deals with focus for modals. Here's a solution that uses expressionProperties which will set the focus value after the form is initially digested: https://jsbin.com/qanumi/1/edit?html,js,output

@kentcdodds I have the same problem with Angular Material v1.0.1
My problem is that only first time the modals first input is triggered. Next time it is not autofocused but the focus is kept on the main view behind the modal.
This is how I use autofocus in my modals;
vm.fields = [
        {
            "elementAttributes": {
                layout: "row",
                "layout-sm": "column"
            },
            "fieldGroup": [
                {

                    key: 'name',
                    className: "flex-100 layout-column",
                    type: 'input',
                    templateOptions: {
                        type: 'text',
                        label: 'Kundenavn',
                        required: true,
                        focus: true
                    }
                },
................................................................................


Add Security/CompoundHash cop

Context
Hash codes for Ruby objects are a potential security issue. Bad hash codes may make us vulnerable to denial-of-service-attacks, where users are able to craft objects that trigger hash collisions. Hash collisions may cause linear instead of constant-time behaviour, or they may cause thrashing of caches. Let Ruby's implementation manage the construction of hash codes from multiple objects using Array#hash, via [...].hash, rather than rolling your own hash.
Summary
This cop checks implementations of the hash method which combine value using the XOR operator instead of delegating to Array#hash.
Array#hash is

faster
clearer
standardized

Ruby has an existing way to combine multiple hash values, so users should not implement their own.

Before submitting the PR make sure the following are checked:

[x] The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
[x] Wrote good commit messages.
~Commit message starts with [Fix #issue-number] (if the related issue exists).~
[x] Feature branch is up-to-date with master (if not - rebase it).
[x] Squashed related commits together.
[x] Added tests.
[x] Ran bundle exec rake default. It executes all tests and runs RuboCop on its own code.
[x] Added an entry (file) to the changelog folder named {change_type}_{change_description}.md if the new code introduces user-observable changes. See changelog entry format for details.

I like this proposal.

Great PR, I loved all the comments you've inserted here and there! 🙇
Might be a good idea to add some section about this in the Ruby style guide as well at some point.

Might be a good idea to add some section about this in the Ruby style guide as well at some point.

@chrisseaton and I are planning on submitting improvements to the Ruby hashing docs to recommend the use of Array#hash, so we could probably reuse some of that work or link to it for details.

Just to close the loop, the documentation PR in Ruby/ruby has been merged.


Flutter doctor. Android Studio appears twice

Steps to Reproduce

Flutter et Dart sont bien installés comme plugings dans Android Studio mais ne sont pas reconnus (Flutter and Dart are well installed as plugings in Android Studio but are not recognized)

Je ne parvient pas à faire fonctionner flutter sur android studio, est ce que quelqu'un sait résoudre ce problème?
(I can't get flutter to work on android studio, does anyone know how to fix this?)
...
...

Logs

C:\Users\lucas>flutter doctor -v
[√] Flutter (Channel stable, v1.2.1, on Microsoft Windows [version 10.0.18362.778], locale fr-FR)
    • Flutter version 1.2.1 at C:\src\flutter
    • Framework revision 8661d8aecd (1 year, 3 months ago), 2019-02-14 19:19:53 -0800
    • Engine revision 3757390fa4
    • Dart version 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at C:\Users\lucas\AppData\Local\Android\Sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 29.0.3
    • Java binary at: C:\Program Files (x86)\Common Files\Oracle\Java\javapath\java.exe
    • Java version Java(TM) SE Runtime Environment (build 1.8.0_211-b12)
    • All Android licenses accepted.

[√] Android Studio (version 3.6)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 45.1.1
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)

[!] Android Studio
    • Android Studio at /my/local/path/for/android/studio
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
    X android-studio-dir = /my/local/path/for/android/studio
    X Android Studio not found at /my/local/path/for/android/studio
    • Try updating or re-installing Android Studio.
    • Consider removing your android-studio-dir setting by running:
      flutter config --android-studio-dir=

[!] Connected device
    ! No devices available

! Doctor found issues in 2 categories.

C:\Users\lucas>

Hi @TheSmurf38
your flutter version is obsolete, current stable version is 1.17.0, consider to upgrade.
Are you experiencing the issue with current stable (or another channel)?

Apres avoir telecharger la nouvelle version de flutter, je rencontre toujours ce meme problème. Pour etre sûr j'ai desinstaller le
Plugin sur android studio > redemarre l'AD. Réinstaller a nouveaux les plugins Flutter et Dart > restart l'AD. Toujours le meme soucis quand je run Flutter Doctor..
Bientot 24h que je lis des tutos sur comment me sortir de ce problème je commence a devenir fou ...

@TheSmurf38 Can we get the output of flutter doctor -v after your upgrade?

Without additional information we are unfortunately not sure how to resolve this issue.
We are therefore reluctantly going to close this bug for now.
Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Thanks for your contribution.

C:\Users\KIIT>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 1.22.6, on Microsoft Windows [Version 10.0.19041.804], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[!] Android Studio (version 4.1.0)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[!] Android Studio
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
X android-studio-dir = C:\Program
X Android Studio not found at C:\Program
[√] VS Code (version 1.53.2)
[!] Connected device
! No devices available
! Doctor found issues in 3 categories.
I am getting this problem can someone help me?

Multiple system\.homes?
https://github.com/flutter/flutter/blob/74bd7b6f6db6433783a36f94d9e43173745187f4/packages/flutter_tools/lib/src/android/android_studio.dart#L279-L283
X android-studio-dir = C:\Program

And not handling the space in the path?

The latest master version has different code snippet as compared to above, as android_studio.dart must have gone through lot of updates. Below is the relevant links currently:
https://github.com/flutter/flutter/blob/0ad71e87279345086b84cdee083375748b007e59/packages/flutter_tools/lib/src/android/android_studio.dart#L364
https://github.com/flutter/flutter/blob/0ad71e87279345086b84cdee083375748b007e59/packages/flutter_tools/lib/src/android/android_studio.dart#L237
https://github.com/flutter/flutter/blob/0ad71e87279345086b84cdee083375748b007e59/packages/flutter_tools/lib/src/android/android_studio.dart#L392
/cc @jmagman


Failure with gulp unit

latest develop code .
ofclan16-18-253:marklogic-samplestack demouser$ gulp unit
[23:56:30] Starting 'clean'...
[23:56:30] Finished 'clean' after 370 ms
[23:56:30] Starting 'bower-files'...
[23:56:31] Finished 'bower-files' after 1.06 s
[23:56:31] Starting 'build'...
[23:56:32] processing files
[23:56:36] saw 217 files
[23:56:37] Finished 'build' after 5.39 s
[23:56:37] Starting 'unit'...
Unit Tests:
/Users/demouser/marklogic-samplestack/node_modules/phantomjs/lib/location.js:1
(function (exports, require, module, __filename, __dirname) {
^
TypeError: Bad argument
at ChildProcess.spawn (child_process.js:936:24)
at exports.spawn (child_process.js:736:9)
at Object. (/Users/demouser/marklogic-samplestack/node_modules/phantomjs/bin/phantomjs:22:10)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:906:3
[23:56:39] shutting down 3002
[23:56:39] 'unit' errored after 2.08 s
[23:56:39] Error in plugin 'gulp-mocha-phantomjs'
test failed

It's very possible this is because of #621.

Once you've tried the solution referenced in #621, please give this another shot.

I am still able to reproduce on the QA Testing MAC laptop . Incase you want to take a look .

Now that #621 is really solved, please check again.

Fixed.


Compilation using ESLint causes errors with Flowtypes

Compiling with an .eslintrc file with Flow included causes an error on all arrow functions and class variable definitions.
For example:
Line 19:  'defaultProps' is not defined  no-undef

Caused by having incompatible package versions in package.json. Solved by running yarn upgrade --latest


When I try to add a dependency to my project, I get this error.

[flutter_deep_speech] flutter pub get
Running "flutter pub get" in flutter_deep_speech...
Resolving dependencies...
Error on line 39, column 3 of pubspec.yaml: A package may not list itself as a dependency.
╷
39 │   flutter_deep_speech:
│   ^^^^^^^^^^^^^^^^^^^
╵
pub get failed
command: "/Users/bro/development/flutter/bin/cache/dart-sdk/bin/dart __deprecated_pub --directory . get --example"
pub env: {
"FLUTTER_ROOT": "/Users/bro/development/flutter",
"PUB_ENVIRONMENT": "vscode.dart-code:flutter_cli:get",
"PUB_CACHE": "/Users/bro/.pub-cache",
}
exit code: 65
exit code 65

Looks like the name of your app is also flutter_deep_speech which is the same name as this package. Can you try changing the name of your app and try to add this package as a dependency?

Thx!
But on the latest versions of Flutter does not run.
`Launching lib\main.dart on Android SDK built for x86 in debug mode...
main.dart:1
FAILURE: Build failed with an exception.
`
Launching lib\main.dart on Android SDK built for x86 in debug mode...
main.dart:1
FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':app:compressDebugAssets'.

A failure occurred while executing com.android.build.gradle.internal.tasks.CompressAssetsWorkAction
Java heap space
`

[√] Flutter (Channel stable, 3.7.7, on Microsoft Windows [Version 10.0.19044.2728], locale ru-RU)
• Flutter version 3.7.7 on channel stable at D:\Program Files\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 2ad6cd72c0 (9 days ago), 2023-03-08 09:41:59 -0800
• Engine revision 1837b5be5f
• Dart version 2.19.4
• DevTools version 2.20.1
[√] Android Studio (version 2022.1)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
   https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
   https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-9505619)

[√] VS Code (version 1.76.2)
• VS Code at C:\Users\vfxbro\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.60.0

[  +11 ms] "flutter run" took 3,688ms.
[  +22 ms]
#0      throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1      RunCommand.validateCommand (package:flutter_tools/src/commands/run.dart:499:7)

#2      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:1381:5)

#3      FlutterCommand.run. (package:flutter_tools/src/runner/flutter_command.dart:1257:27)

#4      AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)

#5      CommandRunner.runCommand (package:args/command_runner.dart:209:13)

#6      FlutterCommandRunner.runCommand. (package:flutter_tools/src/runner/flutter_command_runner.dart:283:9)

#7      AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)

#8      FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:229:5)

#9      run.. (package:flutter_tools/runner.dart:64:9)

#10     AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)

#11     main (package:flutter_tools/executable.dart:91:3)
<asynchronous s

Please try version 0.0.3 of the package and see if it fixes the issue.
Closing this for now, feel free to reopen if the issue persists.


Belta

Signed-off-by: Lance Ball<EMAIL_ADDRESS>

Hi @Stivin0, we removed file based catalogs (FBC) from this repository and moved it to https://github.com/securesign/fbc. I will close this PR and you have to create new for fbc repository.


Typo in get-everything.sh

Line 94 is shouting
echo "Please copy the ATARIXL.ROM firmware to ../fireware directory"
but is meaning firmware instead ;-)

I´ve forked the repository, corrected that (and made another little addition) and created a pull request.

@ojaksch the typo has been fixed. Thanks.


Load testing type spec without applying overload

Contributing to the Azure SDK
Please see our CONTRIBUTING.md if you are not familiar with contributing to this repository or have questions.
For specific information about pull request etiquette and best practices, see this section.

API change check
APIView has identified API level changes in this PR and created following API reviews.
Azure.Developer.LoadTesting


Wink: Force recent pubnub version to make it compatible with python 3.7

Description:
Related issue (if applicable): fixes #16118
Pull request in home-assistant.io with documentation (if applicable): None
Example entry for configuration.yaml (if applicable):
No change
Checklist:

[X] The code change is tested and works locally.
[ ] Local tests pass with tox. Your PR cannot be merged unless tests pass
☝See open question 1
[X] There is no commented out code in this PR.

If user exposed functionality or configuration variables are added/changed:

[X] Documentation added/updated in home-assistant.io
🚫 Not needed

If the code communicates with devices, web services, or third-party tools:

[X] New dependencies have been added to the REQUIREMENTS variable (example).
[X] New dependencies are only imported inside functions that use them (example).
[ ] New or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
☝See open question 2
[X] New files were added to .coveragerc.
🚫 Not needed

If the code does not interact with devices:

[X] Tests have been added to verify that the new code works.
🚫 Not needed

Open Questions:

tox does not appear to work on macOS, is there a way to run it inside Docker?
I feel that running script/gen_requirements_all.py should add my new dependency, but all I get is:

******* ERROR
Errors while importing:  homeassistant.components.climate.econet, homeassistant.components.google_assistant.auth
Make sure you import 3rd party libraries inside methods.

Hi @ledor473,
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!

It turns out that both open questions were solved by redoing this guide: https://developers.home-assistant.io/docs/en/development_environment.html
I missed the virtual environment (venv) section apparently.


So over this...

http://zambala.net/_temp/OVER-IT.png

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

ID: 93a788eb-76a1-af8b-c4b7-75db633e7a5c
Version Independent ID: 94365d96-64b4-cf52-579d-6d437cb228f3
Content: Local Git Deployment to Azure App Service
Content Source: articles/app-service/app-service-deploy-local-git.md
Service: app-service
GitHub Login: @cephalin
Microsoft Alias: dariagrigoriu;cephalin

@ncacace Thanks for the feedback! We are currently investigating and will update you shortly.

@ncacace This doc does not contain the cmdlet's that you referenced in your screenshot. Can you please provide us the doc URL that you were following?
We look forward to your reply.

I'm curious - This section or feedback is at the bottom of the very document you are requesting. I'm on the page right now. SO I'm guessing from your comment that every time we respond to a request for feedback the reference to the document that we are providing that feedback for is not included ... are we on the same page? Pun definitely intended.

@ncacace You referenced mkdir and quickstart in your screenshot. Searches of the doc for these cmdlets come up empty. From your screenshot it appears these cmdlets are coming from another doc.

and

From my image there is nothing stopping anyone from trying the commands in powershell
The point here is that
I create a folder/directory
It can be clearly listed
Yet when I try to access it it acts as though it doesn't exist
When I try to delete it it acts as though it doesn't exist
Whether it is your documentation or someone else's is completely immaterial

@ncacace Thank you for clarifying your response. We ask because the scope of the GitHub feedback system is meant to handle issues that arise in the documentation at this time.
We would love to work further with you on this matter but we request you post your question in MSDN Forums.
Thank you for your understanding and patience on this matter.


How to install and update lightkurve with conda

Instructions for how to install lightkurve with conda-forge for the documentation.  Addresses #245.

Codecov Report

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

@@           Coverage Diff           @@
##           master     #344   +/-   ##
=======================================
  Coverage   89.71%   89.71%
=======================================
  Files          26       26
  Lines        3946     3946
=======================================
  Hits         3540     3540
  Misses        406      406

Continue to review full report at Codecov.

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

Todo:

[ ] Add Peter Williams to the AUTHORS.rst for setting up the conda-forge at CoolStars20 hackday
[ ] Add all optional dependencies (sphinx, etc) to conda-forge recipe
[ ] Pin bokeh version to 1.0 in conda, to resolve interact conflicts

Thanks @gully!  I plan to go ahead and merge this.
Feedback on your TODOs:

I wouldn't add sphinx as a dependency because it's only necessary to build the docs.
You can make revisions to the bokeh minimum version as part of an interact bugfix PR.
Do feel free to add contributing authors!

Thanks++.


Make INT_NAN negative

When doing operations on arrays containing small numbers of INT_NAN, the results can be slightly larger than expected, which is confusing. I think if INT_NAN were negative it would be clearer that something has gone wrong! (But also, we should probably make methods either exclude INT_NAN by default, or return np.nan, rather than include some extraneous very large numbers.)
See also #421

Closed by #456

Closed by #456


fix(app): serialize cpu and gpu request to number

/deploy renku-ui=1791-servers-resources #persist

You can access the deployment of this PR at https://renku-ci-nb-1103.dev.renku.ch


Add GitHub CodeQL and Codacy Static Analysis support

Notes: Codacy picks up a lot more minute warnings

Time for some wontfix alerts from GitHub CodeQL!


context_char does not fall back to char in lua setupj

this setup
            require("indent_blankline").setup {
                show_end_of_line = true,
                show_current_context = true,
                show_first_indent_level = false,
                show_trailing_blankline_indent = false,
                char = '▏',
            }

displays the default char for context_char instead of the defined ▏

might be a duplicate of #542?

ah yeah, the title of that is a little weird


Add tests for material banner example

Part of https://github.com/flutter/flutter/issues/130459.
Pre-launch Checklist

[X] I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
[X] I read the [Tree Hygiene] wiki page, which explains my responsibilities.
[X] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
[X] I signed the [CLA].
[X] I listed at least one issue that this PR fixes in the description above.
[X] I updated/added relevant documentation (doc comments with ///).
[X] I added new tests to check the change I am making, or this PR is [test-exempt].
[X] I followed the [breaking change policy] and added [Data Driven Fixes] where supported.
[X] All existing and new tests are passing.

@NobodyForNothing Thanks for your patience, can you rebase this PR and solve the conflict if there is still one?

Thanks for the rebase.
Linux analyze step failed because of several trailing space characters, see the corresponding lines in https://ci.chromium.org/ui/p/flutter/builders/try/Linux analyze/79407/overview


💡[Feature]: aria labels missing in all the new pages

Is there an existing issue for this?

[X] I have searched the existing issues

Feature Description
i would like to add the aria labels in  all the new pages as no one has added them even after mentioning in the contributing.md
Use Case
.
Benefits
No response
Add ScreenShots
No response
Priority
High
Record

[X] I have read the Contributing Guidelines
[X] I'm a GSSOC'24 contributor
[X] I want to work on this issue

@sk66641 please assign me this issue


Incorrect key pulled for Electron using TCP

Given I have an Electron using TCP
When I run particle keys save electron-key-filename
Then I expect to receive the RSA key for the TCP server
But instead I currently receive the EC key for the UDP server

Community member just ran into this bug: https://community.particle.io/t/tls-key-for-local-server-cant-be-converted-to-der-format/27258

The keys commands expects a --protocol tcp argument. So, not sure this is a bug other than missing documentation?
So the question is what to do when --protocol is not provided. Here's a few options:

for devices with a single protocol, default to that (current behaviour on Core/Photon/P1)
for devices with multiple protocol support:
raise an error if --protocol is not specified. This makes it unambiguous.
or, inspect the device to determine the current protocol in use and default to that, raising the error above if for some reason the protocol cannot be determined.


A preprocessor

It would be good to have a pre-processor compatible with svelte's pre-process feature that could automatically add xmlns="tns" to the root elements of each svelte component. It could also act as a linter to pick up typos made to nativescript tag names

https://github.com/halfnelson/svelte-native-preprocessor has been shipped and templates updated


ui.TermWidth() returns incorrect value if ui.Render() has not being called first

I was updating grid.go so that it didn't use 100% CPU, and I ran across this bug.
	go func() {
		for _ = range time.Tick(time.Second * 4) {
			update <- true
		}
	}()
	ui.Render(ui.Body)
	for {
		select {
		case e := <-evt:
			if e.Type == ui.EventKey && e.Ch == 'q' {
				return
			}
			if e.Type == ui.EventResize {
				ui.Body.Width = ui.TermWidth()
				ui.Body.Align()
				ui.Render(ui.Body)
			}
		case <-done:
			return
		case <-update:
			ui.Render(ui.Body)
		}
	}

here's the updated redraw code and you can pretty much immediately see the problem if you try this.
However, if you write it like this:
	for {
		select {
		case e := <-evt:
			if e.Type == ui.EventKey && e.Ch == 'q' {
				return
			}
			if e.Type == ui.EventResize {
				ui.Render(ui.Body)
				ui.Body.Width = ui.TermWidth()
				ui.Body.Align()
				ui.Render(ui.Body)
			}
		case <-done:
			return
		case <-update:
			ui.Render(ui.Body)
		}
	}

then it works fine. I expect ui.TermWidth() to return the current terminals width. Not the width of the terminal when ui.Render() last ran, so this was very confusing!

Weird... ui.TermWidth should return current width value. Looking into that...

It might actually be a bug with my terminal emulator incorrectly reporting its size? I should of considered that, I'll re-run the test on other emulators

It happens in my terminal too, resize always lags one step behind.
The Render should not be called parallel, so I used this instead:
if e.Type == ui.EventResize {
	ui.Body.Width = ui.TermWidth()
	ui.Body.Align()
	go func() { update <- true }()
}

While this did not solve the problem. Now I am checking termbox to see if there is anything I missed.


Fix a resource leak in the DescriptorAllocator class

In the old version, if we hadn't used all of the freePools, we might drop the reference without destroying them.

@samantha-payson  Looks fine. merging it


koji_promote adds media_type to build metadata

Signed-off-by: Robert Cerven<EMAIL_ADDRESS>

test added

Typo in commit message "unsued" -> "unused"

typo fixed, stickler silenced

test works, but seems to be problem with that travis configuration

test works, but seems to be problem with that travis configuration

Looks like a timeout when pulling from fedora's container registry. Just push something to retrigger it.

Release notes updated


Added UseInMemoryRelyingParties extension method

A bit of syntactic sugar to make things more inline with the Core repo.
It's only a little thing but it's an easy win.

Hi @scottbrady91, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
The agreement was validated by .NET Foundation and real humans are currently evaluating your PR.
TTYL, DNFBOT;

cool. thanks!


Mismatching statements re. rastertopclm shell script

The COPYING file states about filter/rastertopclm:

Files: filter/rastertopclm
Copyright: 2017 Sahil Arora<EMAIL_ADDRESS>License: GPL-3+

However the filter/rastertopclm shell script itself says this:

# (C) 2017 Sahil Arora<EMAIL_ADDRESS>#
# Released under GPL 2 or later

Fixed in 5abc337472bc70fccfd780004a63e6cbd65d542b
Thank you for reporting.


fixes #8040: allow users to disable AWS profile in prompt

I added a line to allow this to be disabled

@robbyrussell it looks like this branch is yours. Does this fix look good to you or is there anything you'd like me to do better to get it merged?
Thanks!


review python api and propose changes

To support multiparty linkage the python api may have to change, this issue is to look at the api and improve it.
Note we don't have to be backwards compatible.

In anonlink, we have a function calculate_filter_similarity(filters1, filters2, k, threshold). This function computes the similarity matrix and generates candidate pairs. It needs to be extended to multiple datasets. It would also be nice to be able to choose different similarity functions and to have blocking support. I propose that we replace this function with one that takes a sequence of datasets, a similarity function (for example, we could write one that uses Hamming distance), a threshold, a blocking function (takes a record and returns a set of block IDs), and a k.
Also, calculate_filter_similarity returns a list of 3-tuples. Each 3-tuple corresponds to a candidate pair and is composed of the index of the first record in its dataset, the index of the other record in its dataset, and their similarity. To support many parties, we must replace these with 5-tuples, where we also get the index of the dataset of the first record, and the index of the dataset of the second record. For speed, instead of having a sequence of 5-tuples, we should consider a 5-tuple of sequences. This will permit us to use continuous arrays in memory, speeding things up.
The greedy_solver, or any other solver, does not need many changes. As before, it should take the output of the similarity function. We should also pass in a threshold: this may be useful for some solvers and can be ignored otherwise. To support multi-party linkage, instead of returning a mapping from one dataset to another, we should return a mapping from one record to a set of its matches. We can represent a record as a 2-tuple of the index of its dataset and its index within that dataset.
See below for Mypy-typed stubs:
def find_candidate_pairs(
    datasets: Sequence[Sequence[bitarray]],
    similarity_f: Callable[[Sequence[bitarray], Sequence[bitarray],
                            float, Optional[int]],
                           Tuple[Sequence[int], Sequence[int],
                                 Sequence[float]]],
    threshold: float,
    blocking_f: Optional[Callable[[int, int, bitarray],
                                  Iterable[Hashable]]] = None,
    k: Optional[int] = None
) -> Tuple[Sequence[int], Sequence[int],
           Sequence[int], Sequence[int],
           Sequence[float]]:
    """ Find candidate pairs from multiple datasets. Optional blocking.

        :param datasets: A sequence of datasets. Each dataset is a
            sequence of hashes.
        :param similarity_f: A function that computes a similarity
            matrix between two sequences of hashes and finds candidates
            below the threshold.
        :param threshold: The similarity threshold. We accept pairs that
            have similarity above this value.
        :param blocking_f: A function returning all block IDs for a
            record. Two records are compared iff they have at least one
            block ID in common.
        :param k: Only consider the top `k` candidate partners from any
            one dataset for any particular record. Leave as `None` to
            keep all pairs with similarity above `threshold`.

        :return: A 5-tuple
            `(dataset_i1, record_i1, dataset_i2, record_i2, similarity)`
            of of equal length. Every valid index `i` corresponds
            to one candidate match. `dataset_i1[i]` is the index of the
            dataset of the first record in the pair; `record_i1[i]` is
            this record's index in its dataset. `dataset_i2[i]` is the
            index of the dataset of the secod record in the pair;
            `record_i2[i]` is this record's index in its dataset.
            `similarity[i]` is the pair's similarity; this value will be
            greater than `threshold`.
        """
    raise NotImplementedError()

def example_similarity_f(
    dataset1: Sequence[bitarray],
    dataset2: Sequence[bitarray],
    threshold: float,
    k: Optional[int] = None
) -> Tuple[Sequence[int], Sequence[int], Sequence[float]]:
    """ Compute similarity matrix and find candidates.

        :param dataset1: A dataset, as a sequence of hashes.
        :param dataset2: Another dataset, as a sequence of hashes.
        :param threshold: The similarity threshold. We accept pairs that
            have similarity above this value.
        :param k: Only consider the top `k` candidate partners for any
            particular record. Leave as `None` to keep all pairs with
            similarity above `threshold`.

        :return: A 3-tuple `(dataset1_i, dataset2_i, similarity)` of
            sequences of equal length. Every valid index `i` corresponds
            to one candidate match. `dataset1_i[i]` is the index of the
            first record within `dataset1`. `dataset2_i[i]` is the index
            of the second record within `dataset2`. `similarity[i]` is
            the similarity of the pair as a float; this value will be
            greater than `threshold`.
    """
    raise NotImplementedError()

def example_blocking_f(
    dataset_index: int,
    record_index: int,
    hash: bitarray,
) -> Iterable[Hashable]:
    """ Get block IDs for a record.

        :param dataset_index: Integer in `range(P)`, where P is the
            number of datasets.
        :param record_index: Index of record in its dataset.
        :param hash: The hash as a `bitarray`.

        :return: Iterable of hashables. Each hashable is a block ID that
            we are in. We compare with another record if we have _any_
            block IDs in common.
    """
    raise NotImplementedError()

def example_solver(
    candidate_pairs: Tuple[Sequence[int], Sequence[int],
                           Sequence[int], Sequence[int],
                           Sequence[float]],
    threshold: float,
) -> Mapping[Tuple[int, int], Set[Tuple[int, int]]]:
    """ Select matches from candidate pairs.

        :param candidate_pairs: Candidate pairs, as returned by
            `find_candidate_pairs`.
        :param threshold: The similarity threshold. We accept pairs that
            have similarity above this value.

        :return: The mapping. A tuple of (dataset index, record index)
            maps to a set of its matches. Each match is a similar
            2-tuple.
    """
    raise NotImplementedError()

@hardbyte @wilko77 @unzvfu Any thoughts?

looks fine.
One issue to think about: You only consider blocking functions on the Bloom filters themselves. What about blocking on the raw PII (The user provides a block_id with the CLK)?

That’s accounted for as well. The blocking_f function takes (in addition to the bloom filter) the dataset index and the record index. The API user can use this to block on the raw PII.

Since we have a consensus, I’m closing this issue.


[#925] Better error msg and key_diag now updated

Main changes:

get_dvos_xyz() has more informative error msg

Issues:
Fixes, in devel, issue #925

Hello @dvezinet! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

In the file tofu/data/_class8_vos.py:

Line 993:80: E501 line too long (91 > 79 characters)


Differences between .13 <-> 1.0, add influx_inspect doc

fixes #543

This is great, @corylanou, thanks!
I made a few edits to this but I think it's ready to merge.
@rkuchan?

@sean, I made a couple changes. I removed the sentence about being able to configure the name of the default retention policy because that seems to have been removed from more recent versions.


Resize icon-svgs to have a sane default size

For the sake of graceful degradation: Even if stuff breaks (e.g. a component's code has an exception and doesn't apply a class), icon-svgs shouldn't take up the entire screen but rather have a sane size baked into the svg itself (e.g. 10-16px)

We'll make this change when we need it. For now, the issue does not help us.


Doesn't work in Kodi 18.9.0

Addon throws the following error in Kodi 18.9.0 on Ubuntu 20.04.1 LTS
2020-11-06 22:06:17.566 T:139684297541376   ERROR: GetDirectory - Error getting plugin://plugin.audio.pasink/ 2020-11-06 22:09:41.967 T:139682022237952   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--                                              - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!                                             Error Type: <type 'exceptions.KeyError'>                                             Error Contents: 'id'                                             Traceback (most recent call last):                                               File "/home/username/.kodi/addons/plugin.audio.pasink/addon.py", line 538, in <module>                                                 browse(path)                                               File "/home/username/.kodi/addons/plugin.audio.pasink/addon.py", line 447, in browse                                                 build_dir_structure()                                               File "/home/username/.kodi/addons/plugin.audio.pasink/addon.py", line 331, in build_dir_structure                                                 displayname = get_displayname(sink=default_sink)                                               File "/home/username/.kodi/addons/plugin.audio.pasink/addon.py", line 236, in get_displayname                                                 if sink["id"] in aliases:                                             KeyError: 'id'                                             -->End of Python script error report<--

Actually I run this addon with Kodi 18.9 and have no problem. The problem is something else.
Please to the following.

Open a terminal and change to lib directory of the addon where the pasink script is located, e.g. ~/.kodi/addons/plugin.audio.pasink/lib

Run pasinnkscript as follows:
$ ./pasink --list-all

Default sink:
0       R       module-alsa-card.c      Aureon Dual USB Digital Stereo (IEC958) alsa_output.usb-C-Media_Electronics_Inc._USB_PnP_Sound_Device-00.iec958-stereo  100%

Plugged Alsa card devices:
0       R       module-alsa-card.c      Aureon Dual USB Digital Stereo (IEC958) alsa_output.usb-C-Media_Electronics_Inc._USB_PnP_Sound_Device-00.iec958-stereo  100%

Sinked Bluetooth A2DP device:

Paired Bluetooth A2DP devices:
00:1D:DF:52:F1:91       paired  PHILIPS AS111
00:1D:DF:51:53:2B       paired  PHILIPS AS111
00:1D:DF:8B:D4:D1       paired  PHILIPS AS111

Please send me your output.

Hey,
thanks for your answer. The output looks like this:
Default sink:
Connection failure: Connection terminated

Plugged Alsa card devices:
Connection failure: Connection terminated

Sinked Bluetooth A2DP device:
Connection failure: Connection terminated
Connection failure: Connection terminated

Paired Bluetooth A2DP devices:
0C:A6:94:7D:CA:16       paired  PHILIPS AEA2700

In the audio mixer I only see one audio device and it's selected as default sink. But pasink doesn't show it.
I followed this answer on askubuntu https://askubuntu.com/a/78179 and installed paprefs for showing multiple sinks in audio mixer at the same time.
After restarting pulseaudio the output looks like this:
Default sink:
0       S       module-alsa-card.c      Built-in Audio Digital Stereo (HDMI)    alsa_output.pci-0000_00_1b.0.hdmi-stereo        100%

Plugged Alsa card devices:
0       S       module-alsa-card.c      Built-in Audio Digital Stereo (HDMI)    alsa_output.pci-0000_00_1b.0.hdmi-stereo        100%

Sinked Bluetooth A2DP device:

Combined sink:
1       S       module-combine-sink.c   Simultaneous output to Built-in Audio Digital Stereo (HDMI)     combined        100%

Paired Bluetooth A2DP devices:
0C:A6:94:7D:CA:16       paired  PHILIPS AEA2700

Switching the default sink with your addon works again. I don't know if restarting pulseaudio resolved the problem (I rebooted several times before). Or if the default sink was somehow messed up before...


Search articles in the blog based on title, description and tags

Closes #24

Get all blog posts from PostQuery
Add Input Box in the "All Blogs" page
Filter search results using react useState hook by triggering a custom event on input change
Use title, description, and tags for filtering articles via search

Search element should be fixed.
There should be a count of how many results are being displayed somewhere.

Search element should be fixed.
There should be a count of how many results are being displayed somewhere.

Pretty simple search implementation.

Just maintain a state of all the posts, and then create a filter based on the title, description, and tags.
The whole idea is ~stolen from~ inspired by @m0nica's blog post as mentioned here: https://github.com/ayushxx7/ayush-mandowara-blog/pull/37/commits/580a2bd7cbe53565916938c39cedd0a53b0bb439
Deploy preview looks good. Will merge.


Adding Graphical Debugging Through ACS

Hi everyone ,
What do you think if we add a graphical debug through the ACS?
If you already installed IBM Toolbox for Java on your server, both the jt400.jar and the tes.jar files are in the same directory on the server: /QIBM/ProdData/HTTP/Public/jt400/lib/
After copying the jar files to your client, add them to your client CLASSPATH environment variable.
To start Debug Manager from a command prompt on your client, run the following command: java utilities.DebugMgr
reference:
https://www.itjungle.com/2020/06/08/guru-graphical-debugging-through-acs/
https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_74/rzamq/rzamqrunning.htm

I think it'd be awesome, @dariocs - perhaps a command to launch it would be awesome.

HI SJLennon ,
I used setting break points on grafical debug and It works fine...
I ussually  run this comand to start the debugger:
java -cp  jt400.jar; tes.jar utilities.DebugMgr
Now I have done a PR that add it to the project .

If you use the ACS product (at least in the 1.1.8.x versions) there is a PLUGIN for the system debugger.  You can activate it like this, .\acslaunch_win-32.exe /PLUGIN=sysdbg /SYSTEM=[server_name] /USER=[userid].  You will be prompted to log on to the connection created.    You may also specify a job reference to connect to.
` Syntax: SYSDBG [Options]
Valid options include:
/system=<system_name>      Specify a system
/user=                         User ID to use for debug
/job=<job_name>                  Job to debug, in 'number/user/name' format
Launches the IBM i System Debugger`
I would image a form to fill that specifies where the acslaunch.jar is located.  The product you download from IBM site has Windows, MAC and Linux start programs.


Circle or Travis?

Builds are failing on CircleCI, but it looks like we use Travis here.
Does anyone know what's going on?
@segmentio/gateway

We use Travis. Likely that someone accidentally ran robo circle.


FindOpenCL.cmake mismatch with the official cmake module

CMake since v3.1 includes FindOpenCL.cmake.
The problem with the one that is included with HPX is that the official module exports OpenCL_INCLUDE_DIRS and OpenCL_LIBRARIES, while HPX one exports OPENCL_INCLUDE_DIRS and OPENCL_LIBRARIES (note the difference in capitalization). Both modules export OpenCL_FOUND though, so, when a project depends both on OpenCL and HPX, different set of variables will be available, depending on which comes first in CMakeLists.txt: find_package(OpenCL) or find_package(HPX). This may lead to interesting results when one expects one or the other naming convention.
I could try and replace OPENCL_* variable names with OpenCL_* ones throughout HPX cmake files. Would that be acceptable?

Less intrusive option would be to just export both sets of variables from HPX FindOpenCL module.

Currently, non of the code in HPX depends on OpenCL. This file is an artifact, afaics. @mcopik Is that correct?

Moreover, none of the HPX cmake build system imports the FindOpenCL file. So I think it is safe to simply remove the file from HPX.

This was fixed by merging #2595

Thanks!

@hkaiser Everything should be fine, CMake and SYCL have their own scripts for OpenCL.


Upgrade to v0.8.0

Checklist

[x] Used a fork of the feedstock to propose changes
[x] Reset the build number to 0 (if the version changed)
[x] Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
[x] Ensured the license file is being packaged.

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.
I do have some suggestions for making it better though...
For recipe:

License is not an SPDX identifier (or a custom LicenseRef) nor an SPDX license expression.

Documentation on acceptable licenses can be found here.

@conda-forge-admin, please rerender

@hcho3, I've taken over as a maintainer and it's looking a little easier to make my own PR for this build (#14) than to merge or rebase yours.  I hope you don't mind.


OpenVPN: WebUI does not always include DHCP DNS push options in config files

Describe the bug
We use OPNsense as an OpenVPN server on 3 distinct sites, all with an identical configuration (the only differences are IP subnets). On all three sites, the OpenVPN instance also runs a DNS redirector to serve DNS requests from remote OpenVPN clients. We thus need to push the IP address of the OpenVPN instance as a DNS server to our clients. We use the dedicated section in the config form to do that. On one server, it works fine. On the two others, the DNS servers are never pushed to the clients because the "push" directives are missing from the resulting server config files.
To Reproduce
Steps to reproduce the behavior:

Create a new OpenVPN server connection
Fill the form with data shown in the screenshot section.
Check the generated config file:

root@ade-vsrv-rtr-04:/var/etc/openvpn # cat server1.conf
dev ovpns1
verb 5
dev-type tun
dev-node /dev/tun1
writepid /var/run/openvpn_server1.pid
script-security 3
daemon
keepalive 10 60
ping-timer-rem
persist-tun
persist-key
proto udp4
cipher AES-256-CBC
auth SHA512
up /usr/local/etc/inc/plugins.inc.d/openvpn/ovpn-linkup
down /usr/local/etc/inc/plugins.inc.d/openvpn/ovpn-linkdown
local <IP_ADDRESS>
client-connect "/usr/local/etc/inc/plugins.inc.d/openvpn/ovpn_setup_cso.php server1"
tls-server
server <IP_ADDRESS> <IP_ADDRESS>
client-config-dir /var/etc/openvpn-csc/1
ifconfig <IP_ADDRESS> <IP_ADDRESS>
tls-verify "/usr/local/etc/inc/plugins.inc.d/openvpn/ovpn_auth_verify tls 'ade-vsrv-rtr-04.dmz.ade.intranet.pep06.fr' 2"
lport 1194
management /var/etc/openvpn/server1.sock unix
max-clients 8
push "route <IP_ADDRESS> <IP_ADDRESS>"
ca /var/etc/openvpn/server1.ca
cert /var/etc/openvpn/server1.cert
key /var/etc/openvpn/server1.key
dh /usr/local/etc/dh-parameters.2048.sample
tls-auth /var/etc/openvpn/server1.tls-auth 0
passtos
persist-remote-ip
float
keepalive 5 20

Expected behavior
The config file should include the following line:
push "dhcp-option DNS <IP_ADDRESS>"

Screenshots

Environment
OPNsense 19.1.9-amd64
FreeBSD 11.2-RELEASE-p10-HBSD
LibreSSL 2.8.3
Intel(R) Xeon(R) CPU E3-1240 v5 @ 3.50GHz (1 cores)

Well,
After I checked out the config again, it appears that the server mode on the failing servers was not set to "remote access" but to "peer to peer". Everything works fine since I corrected it.
Sorry for the noise!

I have observed this myself. But no-one has said why the options are not pushed for peer to peer Vs other. Where are the different profiles' capabilities mentioned in documentation either in opnsense or upstream?


No cache at all!

As opposed to #71, this disables caching completely. This is meant as a baseline comparison.

So, without caching, a build takes about 5 minutes for each of stable/beta/nightly, meaning a total of 15 minutes of build time.

It takes less time to download fresh and build than it does to use the cache. This PR disables caching, reducing the total build time from 25-30 minutes down to 15 or so.

@jamesmunns

It takes less time to download fresh and build than it does to use the cache. This PR disables caching, reducing the total build time from 25-30 minutes down to 15 or so.

Thanks for confirming. This matches my intuition, but I never bothered to actually measure it :-)


Instrumentation Double-Init / Caching Bug w/ Prometheus Exporter

What happened?
This is a bit hard for me to extract our exact setup, but roughly following the docs for the autoloader:
const provider = new MeterProvider();
provider.addMetricReader(new PrometheusExporter());
api.metrics.setGlobalMeterProvider(provider);
registerInstrumentations({
  instrumentations: [
    new HttpInstrumentation(),
  ],
});

When we run the following, prometheus will end up exporting the http metrics twice:
# HELP http_server_duration measures the duration of the inbound HTTP requests
# UNIT http_server_duration ms
# TYPE http_server_duration histogram
# HELP http_server_duration measures the duration of the inbound HTTP requests
# UNIT http_server_duration ms
# TYPE http_server_duration histogram
# HELP http_client_duration measures the duration of the outbound HTTP requests
# UNIT http_client_duration ms
# TYPE http_client_duration histogram
# HELP http_client_duration measures the duration of the outbound HTTP requests
# UNIT http_client_duration ms
# TYPE http_client_duration histogram

I added some debug code to the exporter:
   for (let metric of metrics.scopeMetrics) {
     console.log(`scope: ${metric.name}`)
      for (const data of metric.metrics) {
        console.log(data.descriptor)
    }

and I see the following logs:
scope: @opentelemetry/instrumentation-http
{
  name: 'http.server.duration',
  type: 'HISTOGRAM',
  description: 'measures the duration of the inbound HTTP requests',
  unit: 'ms',
  valueType: 1
}
{
  name: 'http.server.duration',
  type: 'HISTOGRAM',
  description: 'measures the duration of the inbound HTTP requests',
  unit: 'ms',
  valueType: 1
}
{
  name: 'http.client.duration',
  type: 'HISTOGRAM',
  description: 'measures the duration of the outbound HTTP requests',
  unit: 'ms',
  valueType: 1
}
{
  name: 'http.client.duration',
  type: 'HISTOGRAM',
  description: 'measures the duration of the outbound HTTP requests',
  unit: 'ms',
  valueType: 1
}

I think this is because the Instrumentation constructor inits the metrics first, then the call to registerInstrumentation passes in the same meterProvider to enableInstrumentations, triggering the instrumentation to re-create the metrics against the original meter/meterProvider.
Not sure what the "bug" is here, guessing it's either:

Creating the metrics in the constructor, then re-initing with the same meter a little later in the autoloader
Not caching/returning the cached metric when the meter hasn't changed
Not de-duping these metrics in the prometheus exporter

OpenTelemetry Setup Code
No response
package.json
"@opentelemetry/api": "^1.3.0",
    "@opentelemetry/exporter-prometheus": "^0.34.0",
    "@opentelemetry/instrumentation-http": "^0.34.0",
    "@opentelemetry/sdk-metrics": "^1.8.0",

Relevant log output
No response

Could also be user error / us looking at outdated docs -- we've since stopped calling registerInstrumentation, construction of the plugin seems to be sufficient to monkeypatch.

Assigned @hectorhdzg as he wrote the http metric instrumentation

@dyladan I think this would affect anything that extends InstrumentationAbstract, not necessarily specific to the http instrumentation

We just don't enable much else by default to have noticed/verified it affects others.

Currently we call _updateMetricInstruments whenever an "Instrumentation" class is instantiated, this method will create the "Metric Instruments" through a Meter obtained using the current MeterProvider, so if the "Instrumentation" is enabled through config(enabled by default) when instantiated then it will be fully functional, registerInstrumentations will update the MeterProvider in this case using exact same one that was being used before and the "Instrumentation" will create the "Metrics Instruments" again, I believe the correct fix here would be to add extra logic in the Instrumentation class when setMeterProvider is called, to check if the Meter is different or not, and only create the "Metric Instruments" when is something different. @legendecas @dyladan thoughts?, I can implement the fix just getting some consensus on what the correct fix would be

check if the Meter is different or not, and only create the "Metric Instruments" when is something different

This would get my vote, though it does mean the API would still allow end-users to double-create metric instruments on their own vs. caching and returning the same metric instrument from the meter.

Would you mind sharing the exact metrics output that you think contains duplicated metric records? I can not reproduce the problem with the following setup:
const { MeterProvider } = require('@opentelemetry/sdk-metrics');
const api = require('@opentelemetry/api');
const { PrometheusExporter } = require('@opentelemetry/exporter-prometheus');
const { HttpInstrumentation } = require('@opentelemetry/instrumentation-http');
const { registerInstrumentations } = require('@opentelemetry/instrumentation');

api.diag.setLogger(new api.DiagConsoleLogger(), { logLevel: api.DiagLogLevel.ALL });

const provider = new MeterProvider();
provider.addMetricReader(new PrometheusExporter());
api.metrics.setGlobalMeterProvider(provider);

registerInstrumentations({
  instrumentations: [
    new HttpInstrumentation(),
  ],
});

const http = require('http');
http.createServer((req, res) => {
    res.end('hello');
}).listen(1234);

{
  "dependencies": {
    "@opentelemetry/api": "^1.3.0",
    "@opentelemetry/exporter-prometheus": "^0.34.0",
    "@opentelemetry/instrumentation": "^0.34.0",
    "@opentelemetry/instrumentation-http": "^0.34.0",
    "@opentelemetry/sdk-metrics": "^1.8.0"
  }
}

Although  "same metric names" can exist in the output when you request http://localhost:9464/metrics, they are not "identical" metric records since their attributes (or labels in prometheus) are not the same.
Duplicated metric instrument registrations are created multiple times. Instead, the returned metric instruments are sharing the same metric storages (https://github.com/open-telemetry/opentelemetry-js/blob/main/packages/sdk-metrics/src/state/MeterSharedState.ts#L128). So I don't find this is a problem with _updateMetricInstruments.

@legendecas thank you for the base code, this should show the duplicate metrics/series:
const { MeterProvider } = require('@opentelemetry/sdk-metrics');
const api = require('@opentelemetry/api');
const { PrometheusExporter } = require('@opentelemetry/exporter-prometheus');
const { HttpInstrumentation } = require('@opentelemetry/instrumentation-http');
const { registerInstrumentations } = require('@opentelemetry/instrumentation');

api.diag.setLogger(new api.DiagConsoleLogger(), { logLevel: api.DiagLogLevel.ALL });

const provider = new MeterProvider();

const exporter = new PrometheusExporter();
const old = exporter._exportMetrics
exporter._exportMetrics = (response) => {
  exporter.collect().then((collectionResult) => {
    const { resourceMetrics, errors } = collectionResult;
    for (const metric of resourceMetrics.scopeMetrics) {
      console.log(`scope: ${metric.scope.name}`);
      console.log(metric);
      for (const series of metric.metrics) {
        console.log(series.descriptor);
      }
    }
  })
  old(response);
}

provider.addMetricReader(exporter);
api.metrics.setGlobalMeterProvider(provider);

registerInstrumentations({
  instrumentations: [
    new HttpInstrumentation(),
  ],
});

const http = require('http');
http.createServer((req, res) => {
    res.end('hello');
}).listen(1234);

Running this I see:
scope: @opentelemetry/instrumentation-http
{
  scope: {
    name: '@opentelemetry/instrumentation-http',
    version: '0.34.0',
    schemaUrl: undefined
  },
  metrics: [
    {
      descriptor: [Object],
      aggregationTemporality: 1,
      dataPointType: 0,
      dataPoints: []
    },
    {
      descriptor: [Object],
      aggregationTemporality: 1,
      dataPointType: 0,
      dataPoints: []
    },
    {
      descriptor: [Object],
      aggregationTemporality: 1,
      dataPointType: 0,
      dataPoints: []
    },
    {
      descriptor: [Object],
      aggregationTemporality: 1,
      dataPointType: 0,
      dataPoints: []
    }
  ]
}
{
  name: 'http.server.duration',
  type: 'HISTOGRAM',
  description: 'measures the duration of the inbound HTTP requests',
  unit: 'ms',
  valueType: 1
}
{
  name: 'http.server.duration',
  type: 'HISTOGRAM',
  description: 'measures the duration of the inbound HTTP requests',
  unit: 'ms',
  valueType: 1
}
{
  name: 'http.client.duration',
  type: 'HISTOGRAM',
  description: 'measures the duration of the outbound HTTP requests',
  unit: 'ms',
  valueType: 1
}
{
  name: 'http.client.duration',
  type: 'HISTOGRAM',
  description: 'measures the duration of the outbound HTTP requests',
  unit: 'ms',
  valueType: 1
}

As far as I can tell, all those histograms are the same labels.  Run the following (removes the call to registerInstruments):
const { MeterProvider } = require('@opentelemetry/sdk-metrics');
const api = require('@opentelemetry/api');
const { PrometheusExporter } = require('@opentelemetry/exporter-prometheus');
const { HttpInstrumentation } = require('@opentelemetry/instrumentation-http');
const { registerInstrumentations } = require('@opentelemetry/instrumentation');

api.diag.setLogger(new api.DiagConsoleLogger(), { logLevel: api.DiagLogLevel.ALL });

const provider = new MeterProvider();

const exporter = new PrometheusExporter();
const old = exporter._exportMetrics
exporter._exportMetrics = (response) => {
  exporter.collect().then((collectionResult) => {
    const { resourceMetrics, errors } = collectionResult;
    for (const metric of resourceMetrics.scopeMetrics) {
      console.log(`scope: ${metric.scope.name}`);
      console.log(metric);
      for (const series of metric.metrics) {
        console.log(series.descriptor);
      }
    }
  })
  old(response);
}

provider.addMetricReader(exporter);
api.metrics.setGlobalMeterProvider(provider);

new HttpInstrumentation()

const http = require('http');
http.createServer((req, res) => {
    res.end('hello');
}).listen(1234);

and I see:
scope: @opentelemetry/instrumentation-http
{
  scope: {
    name: '@opentelemetry/instrumentation-http',
    version: '0.34.0',
    schemaUrl: undefined
  },
  metrics: [
    {
      descriptor: [Object],
      aggregationTemporality: 1,
      dataPointType: 0,
      dataPoints: [Array]
    },
    {
      descriptor: [Object],
      aggregationTemporality: 1,
      dataPointType: 0,
      dataPoints: []
    }
  ]
}
{
  name: 'http.server.duration',
  type: 'HISTOGRAM',
  description: 'measures the duration of the inbound HTTP requests',
  unit: 'ms',
  valueType: 1
}
{
  name: 'http.client.duration',
  type: 'HISTOGRAM',
  description: 'measures the duration of the outbound HTTP requests',
  unit: 'ms',
  valueType: 1
}

To be clear, the individual data points aren't duplicated, but in the case where the HTTP instrumentation produces 4 metrics under the scoped metrics, 2 of those metrics will never have any data points, because the instrument threw away the metrics and re-created them in _updateMetricInstruments

Although "same metric names" can exist in the output when you request http://localhost:9464/metrics, they are not "identical" metric records since their attributes (or labels in prometheus) are not the same.

In the example below (working properly) each line has different labels, correct:
# HELP http_server_duration measures the duration of the inbound HTTP requests
# UNIT http_server_duration ms
# TYPE http_server_duration histogram
http_server_duration_count{http_scheme="http",http_method="GET",net_host_name="localhost",http_flavor="1.1",http_status_code="200",net_host_port="1234"} 2<PHONE_NUMBER>998
http_server_duration_sum{http_scheme="http",http_method="GET",net_host_name="localhost",http_flavor="1.1",http_status_code="200",net_host_port="1234"} 9<PHONE_NUMBER>998

In the case where we call registerInstruments, we get the # HELP, #UNIT and #TYPE lines twice, which is the duplicate I was referencing.
# HELP http_server_duration measures the duration of the inbound HTTP requests
# UNIT http_server_duration ms
# TYPE http_server_duration histogram
<!-- Prometheus reads this as an empty metric -->
# HELP http_server_duration measures the duration of the inbound HTTP requests
# UNIT http_server_duration ms
# TYPE http_server_duration histogram
http_server_duration_count{http_scheme="http",http_method="GET",net_host_name="localhost",http_flavor="1.1",http_status_code="200",net_host_port="1234"} 2<PHONE_NUMBER>998
http_server_duration_sum{http_scheme="http",http_method="GET",net_host_name="localhost",http_flavor="1.1",http_status_code="200",net_host_port="1234"} 9<PHONE_NUMBER>998


Can't run example discrete.py

So, with the example file discrete.py as it is, gives an exception "synthesize() takes at least 2 arguments (2 given)"
Providing 'omega' as additional argument and trying again results in AssertionError: renaming target var "loc_2'" at level 9 is essential, rename: {0: 1, 2: 3, 4: 5, 6: 7, 8: 9, 10: 11, 12: 13}, support: set([9, 11])
Can you kindly point me what am I missing out? I just want to run this example and generate the graph for controller.
Sincerely,
Andreas

Which version of tulip are you using? E.g., try
python -c 'import tulip; print(tulip.__version__)'

In a new Python 2.7.13 environment with pip version 9.0.1, the following quick run using the current tip of master branch (commit 5d69ce50b29b4baddfa537feec2acf3c61a3e92b) succeeds for me:
curl -L -O https://github.com/tulip-control/tulip-control/archive/master.zip
unzip master.zip
cd tulip-control-master
pip install .
cd examples
python discrete.py

on Fedora 25 (GNU/Linux).

@andreasjacob One hypothesis is that you have the most recent release of TuLiP installed, but you are trying the examples as on the current tip of master branch, which includes changes that are not backwards-compatible.
If my hypothesis is true, then you should try to use the examples as of the release v1.3.0. You can fetch a tarball from https://github.com/tulip-control/tulip-control/releases/tag/v1.3.0, or if you cloned the repo, then update to the appropriate tag using
git checkout v1.3.0

I could reproduce both the errors that you observed as follows:
(dev) examples:pip show tulip
Name: tulip
Version: 1.3.0
Summary: Temporal Logic Planning (TuLiP) Toolbox
Home-page: http://tulip-control.org
Author: Caltech Control and Dynamical Systems
Author-email<EMAIL_ADDRESS>License: BSD
Location: /home/ioannis/.virtualenvs/dev/lib/python2.7/site-packages
Requires: scipy, pydot, omega, polytope, ply, numpy, networkx

(dev) examples:git log -1
commit 5d69ce50b29b4baddfa537feec2acf3c61a3e92b
Author: Ioannis Filippidis<EMAIL_ADDRESS>Date:   Wed Apr 5 19:39:11 2017 -0700

    DOC: add commit prefix "CI" for "continuous integration"

(dev) examples:git status discrete.py
On branch master
Your branch is up-to-date with 'upstream/master'.
nothing to commit, working tree clean

(dev) examples:python discrete.py
No handlers could be found for logger "polytope.polytope"
Traceback (most recent call last):
  File "discrete.py", line 137, in <module>
    ctrl = synth.synthesize(specs, sys=sys)
TypeError: synthesize() takes at least 2 arguments (2 given)

So the first error was likely caused by running a version of tulip older than branch master, but attempting to run the example discrete.py from the repository checked out at branch master. The issue can be avoided by either:

running a version of the example that matches the version of tulip, e.g., pip download tulip and then tar -xzf, or
git checkout 1.3.0 and python setup.py install or pip install .

I could reproduce the second error by upgrading to the latest omega and dd, which are not compatible with the released tulip == 1.3.0 (neither with branch master yet):
(dev) examples:pip show tulip omega dd
Name: tulip
Version: 1.3.0
Summary: Temporal Logic Planning (TuLiP) Toolbox
Home-page: http://tulip-control.org
Author: Caltech Control and Dynamical Systems
Author-email<EMAIL_ADDRESS>License: BSD
Location: /home/ioannis/.virtualenvs/dev/lib/python2.7/site-packages
Requires: scipy, pydot, omega, polytope, ply, numpy, networkx
---
Name: omega
Version: 0.1.0
Summary: Symbolic algorithms for solving games of infinite duration.
Home-page: https://github.com/johnyf/omega
Author: Ioannis Filippidis
Author-email<EMAIL_ADDRESS>License: BSD
Location: /home/ioannis/.virtualenvs/dev/lib/python2.7/site-packages
Requires: dd, natsort, pydot, ply, networkx
---
Name: dd
Version: 0.5.1
Summary: Library of decision diagrams and algorithms on them, in pure Python, as well as Cython bindings to CUDD, Sylvan, and BuDDy.
Home-page: https://github.com/johnyf/dd
Author: Ioannis Filippidis
Author-email<EMAIL_ADDRESS>License: BSD
Location: /home/ioannis/.virtualenvs/dev/lib/python2.7/site-packages
Requires: astutils, psutil, pydot, ply, setuptools, networkx

(dev) examples:git status discrete.py
On branch master
Your branch is up-to-date with 'upstream/master'.
nothing to commit, working tree clean
(dev) examples:git log -1
commit 5d69ce50b29b4baddfa537feec2acf3c61a3e92b
Author: Ioannis Filippidis<EMAIL_ADDRESS>Date:   Wed Apr 5 19:39:11 2017 -0700

    DOC: add commit prefix "CI" for "continuous integration"

(dev) examples:vi discrete.py

(dev) examples:python discrete.py
No handlers could be found for logger "polytope.polytope"
WARNING: yacc table file version is out of date
Traceback (most recent call last):
  File "discrete.py", line 137, in <module>
    ctrl = synth.synthesize('omega', specs, sys=sys)
  File "/home/ioannis/.virtualenvs/dev/lib/python2.7/site-packages/tulip/synth.py", line 1135, in synthesize
    strategy = omega_int.synthesize_enumerated_streett(specs)
  File "/home/ioannis/.virtualenvs/dev/lib/python2.7/site-packages/tulip/interfaces/omega.py", line 69, in synthesize_enumerated_streett
    z, yij, xijk = gr1.solve_streett_game(a)
  File "/home/ioannis/.virtualenvs/dev/lib/python2.7/site-packages/omega/games/gr1.py", line 54, in solve_streett_game
    y, yj, xjk = _attractor_under_assumptions(z, goal, aut)
  File "/home/ioannis/.virtualenvs/dev/lib/python2.7/site-packages/omega/games/gr1.py", line 80, in _attractor_under_assumptions
    safe, aut, unless=unless)
  File "/home/ioannis/.virtualenvs/dev/lib/python2.7/site-packages/omega/symbolic/fixpoint.py", line 62, in trap
    pre = ue_preimage(env_action, sys_action, q, aut)
  File "/home/ioannis/.virtualenvs/dev/lib/python2.7/site-packages/omega/symbolic/fixpoint.py", line 91, in ue_preimage
    u = bdd.rename(target, aut.prime)
  File "/home/ioannis/.virtualenvs/dev/lib/python2.7/site-packages/dd/bdd.py", line 81, in _wrapper
    return func(bdd, *args, **kwargs)
  File "/home/ioannis/.virtualenvs/dev/lib/python2.7/site-packages/dd/bdd.py", line 583, in rename
    return rename(u, self, dvars)
  File "/home/ioannis/.virtualenvs/dev/lib/python2.7/site-packages/dd/bdd.py", line 1546, in rename
    _assert_valid_rename(u, bdd, dvars)
  File "/home/ioannis/.virtualenvs/dev/lib/python2.7/site-packages/dd/bdd.py", line 1601, in _assert_valid_rename
    r=dvars, s=s)
AssertionError: renaming target var "loc_2'" at level 9 is essential, rename: {0: 1, 2: 3, 4: 5, 6: 7, 8: 9, 10: 11, 12: 13}, support: set([9, 11])

The argument 'omega' was passed first to synthesize.

Indeed, I was running the example from master with tulip installation of version 1.3.0. (dd v.0.5.1 and omega 0.1.0).
I removed tulip and omega. Enter python2 setup.py install for tulip. And now the example discrete.py (provided with Tulip v.1.3.0 tar) successfully completes.

Thanks for noting what caused this issue. A few suggestions for future work with Python:

It is recommended to use pip install . or pip install -e . when possible instead of python setup.py install. pip first collects all dependencies, analyzes the resulting (acyclic) graph, and installs dependencies before dependents. Sometimes this can make a difference, e.g., for generating parser tables at the time of install, so that they be copied to site-packages (this refers to parser tables for dependencies, not the package being installed, e.g., tulip, because all its dependencies will have been installed before its installation, even if using setuptools).

The reason that pip and python setup.py fetch suitable versions is that constraints are declared in the file setup.py, in particular the install_requires argument passed to setuptools.

virtual environments are a good way to organize different sets of dependencies, with the possibility of different versions of python (motivated by the python2 invocation).

The error renaming target var "loc_2'" at level 9 is essential means that it was attempted to substitute the variable loc_2' for some other variable (most likely the unprimed loc_2) in an operator that depends on loc_2' (the operator is represented as a binary decision diagram). This is a constraint in dd <= 0.5.1 that is unnecessarily restrictive and was recently removed on branch dev of dd (the implementation actually supports this operation).

The order of arguments to the function tulip.synth.synthesize changed in 43d4ceba808398034782fea920b41955429234c1, so the examples on branch master correspond to the newer API.

@andreasjacob we now have a mailing list where user questions can be posed: https://lists.sourceforge.net/lists/listinfo/tulip-control-users. In the future, I encourage you to ask there first before opening an issue in this issue tracker.


Wrong indentation warning for nested JS templates

Hi,
I am not sure if this belongs to linter itself or here.
This is a small example to show the problem:
(I realise the code doesn't do much, it was working code butchered for brevity)
function render () {
  const {html, _items} = this;
  return html`
    <style>
      :host { display: block; }
    </style>
    <p ?hidden="${_items.length !== 0}">Please add some products to cart.</p>
    ${_items.map((item) => {
      console.log('aaa')
    })}
  `;
}
render();

The console.log line gives a warning: `expected indentation of 4 spaces but found 6
The following line has the same problem.
Help?

It looks like this issue actually occurs in standard (since v11), see https://github.com/standard/standard/issues/1056 and https://github.com/standard/standard/issues/1176. I see you also already opened an issue over at https://github.com/eslint/eslint/issues/10932.

I know but it looks like the issues stems from eslint more than standard... right?

Yes, I think so too.

This issue depends on https://github.com/eslint/eslint/issues/10932 -- I am not sure how you deal with these cases in this repo. However, it's basically up to Eslint to fix it.

Since there isn’t anything we can do about this in this plugin, I’ll go ahead and close this issue.


How can i disbale to log default params & can i rename "correlation" field

Hi,
currently i just getting started with the lib in a spring-boot project. I just added the starter to pom and found a way to replace the value of my correlation via using a bean. nice... but, can i also overwrite the field name? i would like to call it tracking_id instead of correlation?
Secondly, is there a way to turn of default log fields like "origin" "type" etc?
This is how my log statment looks like currently:
2021 - 05 - 11 13: 17: 09.954 TRACE 12532-- - [nio - 8082 - exec - 2]org.zalando.logbook.Logbook: {     "origin": "remote",     "type": "request",     "correlation": "de1d86d9-f59e-4e11-b1bf-e5f4b569900c",     "protocol": "HTTP/1.1",     "remote": "0:0:0:0:0:0:0:1",     "method": "POST",     "uri": "http://localhost:8082/api/v1/dummy",     "host": "localhost",     "path": "/api/v1/dummy",     "scheme": "http",     "port": "8082",     "headers": {         "accept": ["*/*"],         "accept-encoding": ["gzip, deflate, br"],         "authorization": ["XXX"],         "connection": ["keep-alive"],         "content-length": ["27"],         "content-type": ["application/json"],         "host": ["localhost:8082"],         "postman-token": ["750b3646-839c-4593-a50b-83d428942458"],         "user-agent": ["PostmanRuntime/7.28.0"]     },     "body": {         "name": "Dummy"     } }
edit: found this in you docs:
Logbook logbook = Logbook.builder()     .condition(exclude(         requestTo("/health"),         requestTo("/admin/**"),         contentType("application/octet-stream"),         header("X-Secret", newHashSet("1", "true")::contains)))     .build();
seems like you can exclude a header "x-secret" via code..  since i am currently just using the spring properties file, is there a way as well or am i mistaken?

You can obfuscate headers by setting a spring-boot property:
logbook.obfuscate.headers=[X-Secret]
see: https://github.com/zalando/logbook#configuration
I think customization of fields logged and field names can be done by implementing and registering a custom  https://github.com/zalando/logbook/blob/main/logbook-api/src/main/java/org/zalando/logbook/Strategy.java

I think customization of fields logged and field names can be done by implementing and registering a custom https://github.com/zalando/logbook/blob/main/logbook-api/src/main/java/org/zalando/logbook/Strategy.java

Not quite. If you want to re-use most of the json mechanics, then a custom HttpLogFormatter would be better.
Take a look at the javadoc for JsonHttpLogFormatter to see how:
https://github.com/zalando/logbook/blob/846fd5382b8b1ffaaaee926b37a34dcd02287ace/logbook-json/src/main/java/org/zalando/logbook/json/JsonHttpLogFormatter.java#L18-L49

Within those format methods you get a map that contains e.g. origin, type, etc. You can modify that map to your liking, e.g. drop keys or rename them.

Feel free to re-open, if this doesn't suite your needs.

Thanks i will take a look next week !