Allow optional Authorizations

This is an enhancement request, to allow optional authorizations. Not sure if this would be useful for others, but it would be for me.
In my case, you can access my APIs with no authorization, with OAuth, or with a set of two API keys. Depending on which you use, I may give you access to different data, but you still use the same APIs.
One way to handle this would be to allow a "required" boolean for each authorization in the API's Authorizations object.
If you did this, I could mark both of my oauth2 and apiKey authorizations as optional, which would allow you to select either or none of them. (It would also allow you to select both, but that's not really a problem.)
My case is also complicated by the fact that I need two parameters for my API key. If you wanted to treat this as a single Authorization, you'd have to allow multiple keynames for an apiKey. You could also treat it as two separate Authorizations, and just make them both optional. That's not ideal, since it wouldn't give you a way to indicate that they go together, but it would work.

This is an old ticket, and I believe the samples have been added to the spec.

I still can't find an example of a "no security" option. Something like the {"none": []} example proposed by @wking

@webron Also in need of a none security definition so when a token isn't provided responses are restricted to public content. Otherwise I need two endpoints for pretty much the same thing.
Should I raise a new ticket for this?

@mikestead yup

I had the same issue, so i did little hack. I have security definition called optionalBearer:

+1 Also in need of none security definition. @mikestead would you please copy a reference to the new ticket here when you create it?

same question here :)

Everyone, you don't need a none definition. The following has the same effect:
"security": [
  {},
  {"oauth": […]},
  {"token-1": []},
  {"token-2": []}
]

Thx for the fast feedback. Will look into It.

But the swagger validator says the spec is not valid anymore ?
How do you solve this in the end ?

@iongion if it says it's invalid, then file a ticket on that project.

Has this feature been somehow lost in 3.0?

@BGehrels I am not aware of any conversations in the work on the V3 spec to change this behavior.  I don't think this option was very clearly spelled out in the V2 spec and we didn't do a better job in the V3 spec.  We definitely should fix that.

Since this issue targets 2.0 and is closed, should i open a seperate issue for that?
This issue is one of the first hits when one searches for "openapi optional auth", so it may be a good idea to leave a hint here how to accomplish this in the meantime. I would do it, but i still have no idea :-)

In case someone is needing optional authorization for Swagger 2.0 and YAML files, this format worked for me: security: [ {}, JwtAuth: []] (where JwtAuth is in my securityDefinitions).
I tried several other variants but this was the only one that worked with swagger-codegen-cli (Java okhttp-gson), [swagger-express-middleware](https://github.com/APIDevTools/swagger-express-middleware) for Node.js and validation with swagger-cli.

This works for me on version 3 with express node js
Added this on .yaml file:
security:

ApiKey: ['someScope']
{}

So the endpoint defined by that file accepts both ApiKey (defined on my security schema file) or non-authenticated requests


Document that Triggers are Unsupported

For example:
drop table if exists insert_target;
drop table if exists audit_table;

CREATE TABLE insert_target (
    value           text
);

CREATE TABLE audit_table(
    stamp             timestamp ,
    value            text
);

CREATE OR REPLACE FUNCTION process_audit() RETURNS TRIGGER AS $emp_audit$
    BEGIN
	insert into audit_table(stamp,value) VALUES (now(),'value');
        RETURN NEW;
    END;
$emp_audit$ LANGUAGE plpgsql;

CREATE TRIGGER emp_audit
AFTER INSERT OR UPDATE OR DELETE ON insert_target
    EXECUTE PROCEDURE process_audit();

select create_reference_table('insert_target');
select create_reference_table('audit_table');

explain analyze insert into insert_target (value) VALUES ('inserted value');

select * from insert_target;
select * from audit_table;

We need to document that Triggers on Distributed Tables are unsupported
Ideally we should document a workaround or alternative as well. Will need to check with @samay-sharma or @saicitus on workaround.

I tried this workaround, but it didn't work:
SELECT run_command_on_workers($cmd$
  CREATE OR REPLACE FUNCTION process_audit() RETURNS TRIGGER AS $$
    BEGIN
      EXECUTE format(
        'INSERT INTO %s (stamp, value) VALUES (now(), ($1).value);',
        TG_ARGV[0]
      ) USING NEW;
      RETURN NEW;
    END;
  $$ LANGUAGE plpgsql;
$cmd$);

SELECT run_command_on_colocated_placements(
  'insert_target',
  'audit_table',
  $cmd$
    CREATE TRIGGER emp_audit
    AFTER INSERT OR UPDATE OR DELETE ON %s
        EXECUTE PROCEDURE process_audit(%s);
  $cmd$
);

The problem was that run_command_on_colocated_placements doesn't consider reference tables to be colocated.
pg_dist_shard has exactly one row for each of insert_target and audit_table, so I could read the shardid for them and run_command_on_workers to make a trigger between insert_target_<n> and audit_table_<m>.  @saicitus do you know a cleaner way?


As a member, I should be able to add my agency...

We need to add...

Office of Science and Technology Policy (OSTP)
Executive Office of the President (EOP)

@dhcole I'll add notes about how to do this, if I don't have time to do today

@dhcole sorry, not to get to this.  See "Bulk import of tag data"  https://github.com/18F/midas/blob/devel/CONFIG.md

Added to production DB.


Thanks for supporting h265.  Can we support setting the cache time next?

What I mean is that the function of increasing the settable audio and video buffering storage time will help playback stability

There is no audio and video cache, and there will be occasional freezes during playback.

This is by design at the moment. Video frames sent as soon as possible to decoder when it is arrived.
Audio does not have such issue since buffering is done on Android (audio should be smooth).
If you need smooth video playback, use ExoPlayer. It supports RTSP. It has a buffer for a couple sec. But you will have a couple sec delay.


Makefile: no such file or directory

When building I noticed the following warnings emitted by make
/home/joel/op-build/output/build/occ-1093bf945e6c22650ca0b83da2347ee7d21cbe41/src/tracepp/tracepp /home/joel/op-build/output/host/usr/bin/powerpc64le-buildroot-linux-gnu-gcc -c -g -Wall -fsigned-char -msoft-float -m32 -mbig-endian -mcpu=405 -mmultiple -mstring -meabi -msdata=eabi -ffreestanding -fno-common -fno-inline-functions-called-once -pipe -Wa,-m405 -Os -I../ssx -I../lib  -I./incl  -I./trac  -I./async -I./errl -I./gpe  -I./thread -I./aplt -I./aplt/incl -I./rtls -I./dcom -I./sensor -I./pss -I./proc -I./cent -I./cmdh -I./amec -I.  -I../occ  -I../../occ  -I./timer -I./firdata -I../ssx -I../ppc32 -I../ppc405 -I../pgp -I../pgp/registers -I../../lib  -DSIMICS_ENVIRONMENT=0 -DSSX_TIMER_SUPPORT=1  -DSSX_THREAD_SUPPORT=1  -DPPC405_MMU_SUPPORT=1 -DOCC_FIRMWARE=1 -DSIMICS_MAGIC_PANIC=1 -DOCC=1 -DNONCACHEABLE_SUPPORT=1 -DUSE_SSX_APP_CFG_H=1      -DPGAS_PPC=1 -DCONFIGURE_PTS_SLW=0 -o ppc405_mmu.o ppc405_mmu.c
make -I ../pgp -C ../ppc32
Makefile:29: ppc32_gcc.d: No such file or directory
Makefile:29: div64.d: No such file or directory
Makefile:29: savegpr.d: No such file or directory

Those files are not necessary and those messages can be ignored.

Having errors like this as part of the build process hide real errors when they occur. We would like to see them cleaned up, as they reflect on the quality of our software.

I very much agree with @shenki on this one - we're keen to move to a point where all the open power projects build clean (with -Wall and extras) and it's easy to spot anything new that comes in.
At some point soon, we're going to hook up a "build with top of tree toolchain" CI job with the purpose of testing both all the open power software and the toolchain itself. Hard to spot errors just make it harder to see what broke what.


fixed to preserve pagesize when navigating between tabs for the same paper and

reset the pagesize to default value when switching to a different paper.

@azurebrd All your comments/suggestions make sense!! Will fix it accordingly. Thanks.

Thanks @sweng66 !

@azurebrd Just fixed the code to use variables specific to topic_entity_tag (TET) table.
SET_TET_PAGE_SIZE etc..


No option to mark folder as Blender Add-On, bpy module not found

When right clicking and navigating to New -> Blend-Charm only see 'Create New Blender Addon', there is no option to mark a folder as a Blender add on.
Also, after creating a Blender add on folder, the code generated cannot find the bpy module
Am I missing something?
Environment...
PyCharm 2023.1.1 (Professional Edition)
Build #PY-231.8770.66, built on April 27, 2023
Runtime version: 17.0.6+10-b829.9 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 2038M
Cores: 12
Non-Bundled Plugins:
mobi.hsz.idea.gitignore (4.5.0)
org.blackstartx.blend-charm (2023.1)

It did seem to download a package called bpy, but the syntax error in the code remains.

Hi Philip~
First of all, are you sure you're trying to mark as an add-on folder a directory who's parent is the project root?
You can only mark directory who are child of your project root.

Project Root

A Child Folder ✅

Too Deep Here 🚫

Secondly, yeah, it's completely normal that pycharm can't find the references of the bpy module since that namespace exist in Blender but it's not a python lib.
You may need some cloned modules that may help you with auto-completition and so on~
In any case launching blender with those errors is fine since the namespace will be found, thus I recommend having a fake module~


Add a function to cleanly convert Params to Labels.

Overview
Function to add a Labels column to dfGroups.
Closes #1790.
Test Notes/Sample Code

Notes:

@lauramaxwell This one is ready to review, and will be useful in {gsm.app} in lots of places! (I don't need to export another function, I don't think, despite what I just said)


Siri command usually take 2 tries after period of inactivity

Expected Behavior
I tell Siri "turn <on|off> X -> X should turn <on|off> (on the first try).
Current Behavior
I tell Siri to "turn <off|on> X and 1 of 4 things happens:

X doesn't turn <off|on> and Siri tells me that it did turn <off|on>
X doesn't turn <off|on> and Siri tells me there was no response
X does turn <off|on> and Siri tells me there was no response
X does turn <off|on> and Siri tells me that it did turn <off|on>

I repeat the command and it usually works, but sometimes the above behavior is repeated and it takes a few tries.
Once it has worked correctly once, subsequent commands tend to work.  Then after a period of inactivity, the same process above repeats.
Steps to Reproduce (for bugs)
Issue a command when I wake up in the morning or after I get home from work, or after not having issued any commands in an hour or 2.
Versions

Homebridge: 0.4.46
Node:       v11.12.0
OS:         Linux raspberrypi 4.14.98-v7+ #1200 SMP Tue Feb 12 20:27:48 GMT 2019 armv7l GNU/Linux

Configuration
{
    "bridge": {
        "name": "Homebridge",
        "username": "***",
        "port": ***,
        "pin": "***"
    },

    "description": "Homebridge config file for describing devices Siri will control.",

    "accessories": [
        {
            "accessory": "WeMo",
            "name": "Air Filter",
            "description": "The air filter in the master bedroom",
            "wemo_name": "AirFilter"
        },
        {
            "accessory": "WeMo",
            "name": "Space Heater",
            "description": "The space heater in the master bathroom",
            "wemo_name": "Bathroom AC"
        }
    ],

    "platforms": [
        {
            "platform": "LiftMaster2",
            "username": "***",
            "password": "***"
        },
        {
            "platform": "commander",
            "name": "Etekcity",
            "commands": [
                {
                    "name" : "lights",
                    "type" : "outlet",
                    "cmd" : "~/device_control.sh",
                    "no_arg" : false
                },
                {
                    "name" : "patio lights",
                    "type" : "outlet",
                    "cmd" : "~/device_control.sh",
                    "no_arg" : false
                },
                {
                    "name" : "game cube",
                    "type" : "outlet",
                    "cmd" : "~/device_control.sh",
                    "no_arg" : false
                },
                {
                    "name" : "couch fan",
                    "type" : "outlet",
                    "cmd" : "~/device_control.sh",
                    "no_arg" : false
                },
                {
                    "name" : "bed fan",
                    "type" : "outlet",
                    "cmd" : "~/device_control.sh",
                    "no_arg" : false
                },
                {
                    "name" : "wicker fan",
                    "type" : "outlet",
                    "cmd" : "~/device_control.sh",
                    "no_arg" : false
                },
                {
                    "name" : "attic",
                    "type" : "outlet",
                    "cmd" : "~/device_control.sh",
                    "no_arg" : false
                },
                {
                    "name" : "porch lights",
                    "type" : "outlet",
                    "cmd" : "~/device_control.sh",
                    "no_arg" : false
                }
            ]
        },
        {
            "platform": "CEC",
            "manufacturer": "Magnavox",
            "model": "32ME303V/F7 A",
            "sources": [
                {
                    "name": "Raspberry Pi",
                    "address": "<IP_ADDRESS>"
                },
                {
                    "name": "Mac Mini",
                    "address": "<IP_ADDRESS>"
                }
            ]
        }
    ]
}

Homebridge Log / Command Output
tail -n 100 /home/pi/.pm2/logs/homebridge-out.log
[5/16/2019, 7:19:11 PM] [Space Heater] Found 'Bathroom AC' device at <IP_ADDRESS>
[5/16/2019, 7:19:11 PM] [LiftMaster2] [MyQ] Logged in with MyQ user ID 0
[5/16/2019, 7:19:11 PM] [Air Filter] Found 'AirFilter' device at <IP_ADDRESS>
[5/16/2019, 7:20:03 PM] [Etekcity] lights PowerState changed to false
[5/16/2019, 7:20:05 PM] [Etekcity] lights PowerState changed to true
[5/16/2019, 8:03:27 PM] [Etekcity] lights PowerState changed to false
[5/16/2019, 9:18:22 PM] [Space Heater] Getting power state on the 'Bathroom AC'...
[5/16/2019, 9:18:22 PM] [Air Filter] Getting power state on the 'AirFilter'...
[5/16/2019, 9:18:22 PM] [Space Heater] Power state for the 'Bathroom AC' is 0
[5/16/2019, 9:18:22 PM] [Air Filter] Power state for the 'AirFilter' is 0
[5/16/2019, 9:18:22 PM] [LiftMaster2] [MyQ Garage Door Opener] Getting current state: Closed.
[5/16/2019, 9:18:25 PM] [Etekcity] bed fan PowerState changed to true
[5/17/2019, 6:39:59 AM] [Etekcity] bed fan PowerState changed to false
[5/17/2019, 8:40:41 AM] [LiftMaster2] [MyQ] Logged in with MyQ user ID 0
[5/17/2019, 8:40:42 AM] [LiftMaster2] [MyQ Garage Door Opener] State was successfully set to Open.

head -n 100 /home/pi/.pm2/logs/homebridge-out.log
[3/16/2019, 5:30:21 PM] Loaded config.json with 2 accessories and 1 platforms.
[3/16/2019, 5:30:21 PM] ---
[3/16/2019, 5:30:21 PM] Loaded plugin: homebridge-liftmaster2
[3/16/2019, 5:30:21 PM] Registering platform 'homebridge-liftmaster2.LiftMaster2'
[3/16/2019, 5:30:21 PM] ---
[3/16/2019, 5:30:22 PM] Loaded plugin: homebridge-wemo
[3/16/2019, 5:30:22 PM] Registering accessory 'homebridge-wemo.WeMo'
[3/16/2019, 5:30:22 PM] ---
[3/16/2019, 5:30:22 PM] Loading 1 platforms...
[3/16/2019, 5:30:22 PM] [LiftMaster2] Initializing LiftMaster2 platform...
[3/16/2019, 5:30:22 PM] Loading 2 accessories...
[3/16/2019, 5:30:22 PM] [Air Filter] Initializing WeMo accessory...
[3/16/2019, 5:30:22 PM] [Air Filter] Searching for WeMo device with exact name 'AirFilter'...
[3/16/2019, 5:30:22 PM] [Space Heater] Initializing WeMo accessory...
[3/16/2019, 5:30:22 PM] [Space Heater] Searching for WeMo device with exact name 'Bathroom AC'...

tail -n 100 /home/pi/.pm2/logs/homebridge-error.log
(node:9606) [DEP0112] DeprecationWarning: Socket.prototype._handle is deprecated
(node:15466) [DEP0112] DeprecationWarning: Socket.prototype._handle is deprecated
(node:21768) [DEP0112] DeprecationWarning: Socket.prototype._handle is deprecated
(node:711) [DEP0112] DeprecationWarning: Socket.prototype._handle is deprecated
RangeError [ERR_BUFFER_OUT_OF_BOUNDS]: Attempt to write outside buffer bounds
    at boundsError (internal/buffer.js:56:11)
    at Buffer.readUInt16LE (internal/buffer.js:139:5)
    at Object.layerDecrypt (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/encryption.js:86:56)
    at HAPServer._onDecrypt (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:257:33)
    at EventedHTTPServer.emit (events.js:197:13)
    at EventedHTTPServer.<anonymous> (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/eventedhttp.js:91:70)
    at EventedHTTPServerConnection.emit (events.js:197:13)
    at EventedHTTPServerConnection._onClientSocketData (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/eventedhttp.js:244:8)
    at Socket.emit (events.js:197:13)
    at addChunk (_stream_readable.js:288:12)
(node:14618) [DEP0112] DeprecationWarning: Socket.prototype._handle is deprecated
(node:709) [DEP0112] DeprecationWarning: Socket.prototype._handle is deprecated
(node:14765) [DEP0112] DeprecationWarning: Socket.prototype._handle is deprecated

I redacted the port number. (I don't know if that's particularly sensitive info.)  The log heads may be quite old and demonstrate resolved issues(?).
There's only 1 ERR_BUFFER_OUT_OF_BOUNDS error in the whole log.  Everything else is related to a memory issue I encountered and fixed about a week ago.  But this behavior has been persistent since I first installed homebridge back in March.
I've been wondering if my Pi is going to sleep or something...?  Homebridge doesn't appear to be crashing.  The only boos I see recently in the logs are from my system restarts and I know I've encountered this problem numerous times in the interim.

Same for me... Sometimes after long inactivity or changing wifi, Homebridge/Homekit seems to ”hang“... (both Siri access and Home App). Often it takes up to 10 seconds... then everything is fine.
But I think this is a HAP communication issue between Homebridge and the iOS device. Sometimes it‘s only hanging on one device while a second iPhone is doing perfectly fine...

Maybe related to #2098.
Is your PI connected both via LAN and WLAN?

No. I’m only connected via wlan. There is no Ethernet cable connected.

I can’t attest to whether a second iOS device does fine. I haven’t got a sense of the pattern, however I know that the 3 iOS devices I use all seem to be affected and I feel like (but don’t know for sure) that when one has needed multiple commands initially, all devices then become responsive, I.e. if I have the issue on one device and use then other immediately after, it does not have the same issue.
The problem is not always reproducible either. I just got home this evening and told my iPhone 6s “turn on the lights” and it worked right away. I was a little surprised. I pretty much expect to have to issue commands twice initially when I get home.

I have the same problem, wifi is completely disabled on my system, so that eliminates this as a source for the issue. I'm not sure if it's related, but the bonjour entry for homebridge goes missing from time to time.

I’m curious. Where do you find a Bonjour entry for Homebridge? I don’t know where I would find that.

Bonjour Browser or avahi-browse. The homebridge entry starts with __hap

I installed Discovery (formerly "Bonjour Browser").  I don't see any "__hap" entries.  I've checked using 3 different computers a number of times.  My homebridge seems to be working currently though.

I have a similar issue. Homebridge is working, but the Home app loses connection to the accessories from time to time.
I cannot see _hap._tcp via Bonjour Browser, or in Terminal using ' dns-sd -B _services._dns-sd._udp ' or on the pi itself using ' Avahi-browse -a '.
I can see _hap._tcp on my Mac if I use ' dns-sd -B _hap._tcp  ' :
DATE: ---Thu 13 Jun 2019---
18:08:24.418  ...STARTING...
Timestamp     A/R    Flags  if Domain               Service Type         Instance Name
18:08:24.419  Add        2   7 local.               _hap._tcp.           Homebridge-CAD8
On the Pi if I use ' avahi-browse -r _hap._tcp ' :

eth0 IPv4 Homebridge-CAD8                               _hap._tcp            local
=   eth0 IPv4 Homebridge-CAD8                               _hap._tcp            local
hostname = [CC_22_3D_E3_CE_30.local]
address = [<IP_ADDRESS>]
port = [38753]
txt = ["sh=dDiHOA==" "sf=1" "ci=2" "ff=0" "s#=1" "c#=42" "id=CC:22:3D:E3:CE:30" "pv=1.0" "md=Homebridge"]

I have disabled IP6. The Pi is connected via ethernet only to the main router. I have another router acting as a wireless access point that some of the accessories are connected to.

Still experiencing this issue. Feels less frequent after upgrade to iOS 13, but maybe I’m just getting used to it


Thumbnail/ToDataURL

Would it be possible to get a thumbnail of the image within the bounds of the annotations rectangle? This could then be saved and used to show an index of the available annotations for example.
The image data  would be posted back in the  created event as 64bit data string?
This might be achievable via open seadraggon all ready??

I don‘t think this is available in OpenSeadragon. For normal (non-zoomable) Images, you would probably be able to render part of an image to a Canvas element, and the download the canvas content as image via data URL.
For a zoomable image served via IIIF you could download the image section based on the coordinates from the annotation bounds.
Either way though I‘d see this as outside of the core scope of the annotation library for now.

I understand. I’ll see if I can achieve this outside of the api.
Thanks
Jason
Sent from my iPhone
On 16 May 2020, at 05:39, Rainer Simon<EMAIL_ADDRESS>wrote:

I don‘t think this is available in OpenSeadragon. For normal (non-zoomable) Images, you would probably be able to render part of an image to a Canvas element, and the download the canvas content as image via data URL.
For a zoomable image served via IIIF you could download the image section based on the coordinates from the annotation bounds.
Either way though I‘d see this as outside of the core scope of the annotation library for now.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/recogito/annotorious-openseadragon/issues/15#issuecomment-629587389, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC7ETS5J7T5KVIDTQQXR7WDRRYKJNANCNFSM4NCTBBRA.

Cool, let me know if you find a way. I'm currently thinking about collecting small-ish extensions into the recogito-client-addons repo. This could be an interesting candidate.

Looks pretty straight forward, assuming OSD is using 2d canvas, which I think it does.
Here’s the basic idea :
var hidden_ctx = hidden_canvas.getContext('2d');
hidden_ctx.drawImage(
MainCanvas,
startClippingX,
startClippingY,
clippingWidth,
clippingHeight,
pasteX,
pasteY,
pasteWidth,
pasteHeight
);
var data_url = hidden_canv.toDataURL("image/png");
I copied this from stack overflow.
Assuming I can get the bounding box coords after the user has drawn it.
Thanks
Jason.
From: Rainer Simon<EMAIL_ADDRESS>Sent: 16 May 2020 08:30
To: recogito/annotorious-openseadragon<EMAIL_ADDRESS>Cc: Jason Podwojski<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [recogito/annotorious-openseadragon] Thumbnail/ToDataURL (#15)
Cool, let me know if you find a way. I'm currently thinking about collecting small-ish extensions into the recogito-client-addonshttps://github.com/recogito/recogito-client-addons repo. This could be an interesting candidate.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/recogito/annotorious-openseadragon/issues/15#issuecomment-629602476, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC7ETSYQ35FT56XDHHLSMIDRRY6F5ANCNFSM4NCTBBRA.

Since this concern is outside of Recogito, and solvable with OpenSeadragon, I'm closing the issue here.


Copying brings the viewport back to the top

Running into a small issue. Wherever I copy something with Clipboard.js, the page goes right back to the top. You can see the problem on that page: https://alligator.io/css/font-shorthand/
If you scroll a little and then click on the copy button, the page goes right back to top. I even added something like this, but it doesn’t help:
$( '.copy-to-clipboard' ).click(function( event ) {
event.preventDefault();
});
Maybe it has nothing to do with clipboard.js, but I wanted to ask just in case.

It's not related to clipboard.js. You're using a href="#" attribute on a button. Links contain this type of attribute, not buttons.

P.S.: Congratulations on this project, looks pretty nice!

Thanks for the good words @zenorocha !
And thanks for realizing that I left the href="#" in there by mistake. That's because I tried to make it work with an anchor instead of a button, but I had the same problem.
Even after removing the href="#", the problem still seems to happen. Here's an example of where it happens: https://alligator.io/jquery/document-ready/
Thanks again for looking into this!

Are you using the latest version?

Yes, I'm using v1.5.5

@alippai you have 7 onclick event bound in this . I can't understand why it would needed so much. Your prevent-default is correct, but other 6 events maybe is not.
Is ugly, but you could try to unbind all events in this dom and then attach $( '.copy-to-clipboard' )

@kafeltz :point_up: :+1:

I figured it out!
I had overflow-x: hidden; and overflow-y: scroll; on the html element, and somehow that's what was causing this. I've now been about to remove those overflow properties on the html element and keep them on the body element only, and boom it works perfectly!
Thanks so much for the help in trying to figure that one out!


pre-commit: let prettier format .js files

A one line change in pre-commit-config -> autoformatting made by pre-commit.ci.

Yep, let's wait for the one I currently have brewing and then we can merge this. Will definitely help me avoid merge conflicts.
Thanks @consideRatio

let's wait for the one I currently have brewing and then we can merge this

This was #1771 that is now merged I think

@consideRatio nope, there's one more coming (#1771 was a part of it).

Actually let's just do this, I can rebase. Thanks @consideRatio


enqueue.assign() is not typesafe

XState version
XState version 5
Description
If we define types in setup function like this
setup({
    types: {} as {
      context: {
        foo: {
          bar: string;
        };
      };
    },
  })

And add a following action handler
 actions: [
  enqueueActions(({ enqueue }) => {
    enqueue.assign({
      // No TS error
      foo: undefined,
    });
  }),
],

There won't be a type error and accessing context.foo.bar will result in runtime error as context.foo can be undefined during runtime.
Doing the same with assign results in type error though:
actions: [
  assign({
    // TS error
    foo: () => undefined,
  })
]

Expected result
Typescript error
Actual result
No Typescript error
Reproduction
https://stackblitz.com/edit/vitejs-vite-jwifv4?file=src%2Fmain.ts
Additional context
No response

You are not comparing the same flavor of assign here. If we want to compare the same flavors then we need to compare those two:
assign({
  foo: undefined,
}),
enqueueActions(({ enqueue }) => {
  enqueue.assign({
    foo: undefined,
  });
}),

And they both don't error here. The problem is that assign accepts a "partial assigned" - u are free to pass just some keys (and not everything the context has). The problem here is that TS (by default) always allows undefined value for optional properties (and Partial creates optional properties). One needs exactOptionalPropertyTypes to change this behavior and not many projects have that setting enabled.

We can't address this as long as we allow property assigners derived from Partial<TContext>. So the Bug label here isn't quite fitting (cc @davidkpiano). It feels like a design limitation with the current API.

I added the recommendation to use exactOptionalPropertyTypes in the TypeScript documentation https://stately.ai/docs/typescript#set-up-your-tsconfigjson-file
{
  "compilerOptions": {
    // ...
    "strictNullChecks": true,
    // or set `strict` to true, which includes `strictNullChecks`
    // "strict": true,
    "skipLibCheck": true,
    "exactOptionalPropertyTypes": true
  }
}

@davidkpiano this likely should be removed from the docs for the time being since our types are actually not fully compatible with this flag, see https://github.com/statelyai/xstate/issues/4613


#14694: Stall unpacker till MMIO write to unpacker address completes

We made sure to stall the unpacker till the MMIO write completes, we also generally tried to put a small amount of code between the MMIO writes and the stalls to reduce the time spent in stalls, namely the code for semaphore_post. This could be improved though by moving more code.

All blackhole post commit tests passed : https://github.com/tenstorrent/tt-metal/actions/runs/11730659678


[Feature-14553][Task Plugin] HiveCli Support Beeline

Purpose of the pull request
Improve task plugin hiveCli and add beeline shell type
close #14553
Brief change log

Verify this pull request

This pull request is code cleanup without any test coverage.
(or)
This pull request is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:

(or)
If your pull request contain incompatible change, you should also add it to docs/docs/en/guide/upgrede/incompatible.md

@shangeyao Just curious, DS sql task also supports connecting to hive through hs2. Do we still need to support using beeline to connect hive in hivecli task?

I think Users may wonder why they could execute beeline in the hivecli task.

@EricGao888 @rickchengx You're right. It's because I couldn't think carefully.I will close the PR.


On fresh install on fresh VM

Here what it looks like in broswer

before you think file permissions
https://gist.github.com/xorenio/97d1f6f6511c2a50100c
versions
$ php -v
PHP 7.0.8-0ubuntu<IP_ADDRESS> (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.8-0ubuntu<IP_ADDRESS>, Copyright (c) 1999-2016, by Zend Technologies
$ node -v
v7.4.0
$ npm -v
4.0.5

im using this to temp host as i build/play
$ php -S <IP_ADDRESS>:8000 -t public/

after composer install && npm install do a gulp && gulp watch

Cheers i can't believe i was so silly to miss


Expose GeoJSON properties as complex type

Expose GeoJSON paths as complex type: GeoJSON as documented at http://geojson.org/

Reconsidered after reviewing the GeoJSON spec. GeoJSON is not a type, but a family of types for geo. As baucis-swagger2 uses the mongoose mappings provided by baucis as input, there is not enough information to solve this in a generic way due to a lack of information in the input model: (is a point, is a line?) Different mappins on mongoose for this a possible.
So, the recomendation is to customize the swagger2 definition in your app, after the plugin. The exposed type will depend on how you mapped it and what subtype are you using: Point, Line, etc.
Open to ideas here.


Feature/issue 28 update pagination in section listing

@codiebeulaine I think this might be a bit more robust than what we have at the moment:
def uniqify(*collections):
    sets = [set(c) for c in collections]
    remaining = set(v for s in sets for v in s)
    results = []

    for s in sets:
        results.append(list(s & remaining))
        remaining = remaining - s

    return results

def get_pages(page, padding=2, edge_padding=2):
     pages = list(page.paginator.page_range)
     curr = page.number - 1

     _, before_current, after_current, start, end = uniqify(
         [page.number],
         pages[curr - padding:curr],
         pages[page.number:page.number + padding],
         pages[:edge_padding],
         pages[-edge_padding:])

     ellipses_before = curr > edge_padding + padding
     ellipses_after = page.number < len(pages) - (edge_padding + padding)

     return {
         'start': start,
         'end': end,
         'before_current': before_current,
         'after_current': after_current,
         'ellipses_before': ellipses_before,
         'ellipses_after': ellipses_after
     }

:+1:!


Fix crash in gradient sampling

Closes #3826.
CC: @Dherse

https://discord.com/channels/1054443721975922748/1088371867913572452/1224684053870153848
Some minor discussion on discord

@frozolotl still on your radar?

Closing due to inactivity. Feel free to reopen if you still want to work on this!


Motor Direction Reversed

First off, thank you for creating and maintaining PhotonFTC, it's a great resource!
After adding PhotonFTC (version 3.0.1 alpha) to my FTC team's codebase, the motors connected to our Control Hub (but not Expansion Hub) began spinning in the opposite direction. The Expansion Hub is connected via RS485, and not USB, so that may explain why only half of the motors reversed.
It's not a big issue to correct in code (just reversing the motor directions worked fine), but it's a strange thing to happen. If it matters, the only way we use Photon is by adding @Photon to an abstract OpMode that all of our OpModes are subclasses of.

Thanks for the insight! May I ask what motors you are running?

All GoBilda 5203s.

Can recreate; installing/uninstalling photon reversed all motors and encoders on my control hub (no photon on expansion hub as it isn't connected over USB)
This issue caused us to slam full speed into opponents match 2 of state; please fix!!

We think we have found a fix to this reverse motor issue.
Can we get write access so we can create a branch for the PR?

Can we get write access so we can create a branch for the PR?

You shouldn't need write access to the main repo to create a PR, just fork the repo, make the change in a branch their, then make the PR back to the main repo.

Fixed in 3.0.1


Update netcdf_writer.jl

Purpose
Very small PR, I forgot to remove lines 166-168 in previous PR #39

Can you improve the commit message to be a little bit more descriptive (and ideally under 50 characters)?

Can you improve the commit message to be a little bit more descriptive (and ideally with a title under 50 characters)?

Done!


Help with install

I have spent hours trying to install this and I've gotten so close but it eventually fails. I need somebody who has installed this before and can install it on my server.
To Phan An:
I'd love to be a backer and a supporter of Koel but I can only do that if I actually have it working on my own server haha. I have a big machine currently the specs are:
Intel Xeon E3-1270
8GB RAM
4x 8TB HDDs (1 installed currently)
Centos 6.x
I need to install Koel on this machine so badly I have over 100,000 songs and adding to this.
I need it running on port 80 too.
Can you or anybody else help? I would super appreciate it. I could possibly pay to have it installed as a thank you.

What is your system? Debian, Ubuntu?
Where is it failing?
If you want to get help with installing you need to give us more infos.

Closing due to inactivity. And no, I'm not interested in a "I'll only support if you help me install it" manner.


一键部署后，startAll与stopAll无法使用

=======      WeBASE-Web     is not running! =======
Traceback (most recent call last):
File "deploy.py", line 127, in
do()
File "deploy.py", line 30, in do
commBuild.end()
File "/home/owl/webase-deploy/comm/build.py", line 94, in end
stopManager()
File "/home/owl/webase-deploy/comm/build.py", line 512, in stopManager
result = doCmd("bash stop.sh")
File "/home/owl/webase-deploy/comm/utils.py", line 111, in doCmd
raise Exception("execute cmd  error ,cmd : {}, status is {} ,output is {}".format(cmd,status, output))
Exception: execute cmd  error ,cmd : bash stop.sh, status is 127 ,output is bash: stop.sh: 没有那个文件或目录

请检查webase-deploy中webase-node-mgr的文件夹是否存在，文件夹内是否为空。此处为node-mgr的启动停止脚本找不到了


using MaxAge in DefaultCookie generates an invalid cookie string

according to RFC6265,
http://tools.ietf.org/search/rfc6265#section-<IP_ADDRESS>,
http://tools.ietf.org/search/rfc6265#section-5.2.2
MaxAge cookie should only contain digits
How to reproduce:
DefaultCookie cookie = new DefaultCookie("key", "value");
cookie.setMaxAge(10);
System.out.println(cookie.toString());

expected result:
key=value, maxAge=10

actual result:
key=value, maxAge=10s

No. You're supposed to use CookieEncoder to encode a Cookie, not toString.
RFC6265 support has just made it in master and 4.1 branches.

@slandelle if that's the case the toString() method should throw a RuntimeException instead of returning an invalid output.
I've fixed it just for being on the safe side of things.
I discovered this issue after using it that way on production... :worried:

First, check toString's javadoc and you'll realize it's very generic. It doesn't provide any contract for building logic upon and should only be used for logging.
Then, it's impossible to have one single method for encoding cookies as it depends on the side you are: server or client. Check RFC6265 again and you'll see that clients must only send the name-value pairs.

I get what you are saying..  but the fact is that toString() was overridden with a server side implementation.. which is invalid.

No, it was overridden to display the object's internal state instead of just the hashcode. It just happens to be similar, as it's quite standard to display attributes as key=value pairs.
For example, it lack the Expires attribute of the server side encoded form, as it's not part of the state, but computed from maxAge.
Do you see anything in DefaultCookie#toString() javadoc that would make one think that it could be used as a replacement for ServerCookieEncoder? No, and that's a good thing because it would be very wrong from an API design perspective.

It's not a bug. You must use ServerCookieEncoder instead.


test: improve local e2e dev experience

Signed-off-by: Aylei<EMAIL_ADDRESS>What type of PR is this?

[ ] API-change
[ ] BUG
[ ] Improvement
[ ] Documentation
[ ] Feature
[x] Test and CI
[ ] Code Refactoring

Which issue(s) this PR fixes:
Improve local e2e experience.
What this PR does / why we need it:

Rename PROXY to GOPRXOY, so it properly inherit the GOPROXY env from user's environment;
Install kubectl, helm and kind automatically if they are not installed, to improve the user experience

Special notes for your reviewer:
Not Available
Additional documentation (e.g. design docs, usage docs, etc.):
Not Available

/merge


Error Compiling SDL Example

~/.luarocks/bin/titanc --tree ./ examples/sdl_demo

.//examples/sdl_demo.titan:7:1: type error: failed parsing: SDL2/SDL.h:4092:32: fail
) ( double __x ) ; ex
.//examples/sdl_quit.titan:3:1: type error: failed parsing: SDL2/SDL.h:4092:32: fail
) ( double __x ) ; ex
.//examples/sdl_quit.titan:7:38: type error: trying to access a member of value of type 'nil'
.//examples/sdl_quit.titan:9:12: type error: trying to access a member of value of type 'nil'
.//examples/sdl_demo.titan:13:11: type error: trying to access a member of value of type 'nil'
.//examples/sdl_demo.titan:13:8: type error: trying to compare values of incomparable types: invalid type and integer
.//examples/sdl_demo.titan:23:20: type error: trying to access a member of value of type 'nil'
.//examples/sdl_demo.titan:31:20: type error: trying to access a member of value of type 'nil'
.//examples/sdl_demo.titan:33:12: type error: trying to access a member of value of type 'nil'
.//examples/sdl_demo.titan:37:20: type error: trying to access a member of value of type 'nil'
.//examples/sdl_demo.titan:40:12: type error: trying to access a member of value of type 'nil'
.//examples/sdl_demo.titan:41:12: type error: trying to access a member of value of type 'nil'
.//examples/sdl_demo.titan:45:20: type error: trying to access a member of value of type 'nil'
.//examples/sdl_demo.titan:46:8: type error: trying to access a member of value of type 'nil'
.//examples/sdl_demo.titan:48:12: type error: trying to access a member of value of type 'nil'
.//examples/sdl_demo.titan:49:12: type error: trying to access a member of value of type 'nil'
.//examples/sdl_demo.titan:54:12: type error: trying to access a member of value of type 'nil'
.//examples/sdl_demo.titan:55:12: type error: trying to access a member of value of type 'nil'
.//examples/sdl_demo.titan:56:12: type error: trying to access a member of value of type 'nil'
.//examples/sdl_demo.titan:57:12: type error: trying to access a member of value of type 'nil'
.//examples/sdl_demo.titan:60:8: type error: trying to access a member of value of type 'nil'
.//examples/sdl_demo.titan:61:8: type error: trying to access a member of value of type 'nil'
.//examples/sdl_demo.titan:62:8: type error: trying to access a member of value of type 'nil'
.//examples/sdl_demo.titan:63:8: type error: trying to access a member of value of type 'nil

Thanks for the report. Could you tell us what system you are using?

Ubuntu 18.04, x64

Using the standard libsdl-dev-2.0 from default apt repos.

Can you checkout commit 64d1255 to see if it builds using that one? Commit a3df2a1, which followed that one, made changes to the header parser, and knowing that those were the ones that broke the parsing of SDL headers would be useful in tracking down what is wrong.


Added 2 open source iOS apps

Resolves #4
I have added two more open source iOS apps to the list

@vartika-arora thanks for PR!


feat: merge upstream's 0.16.3

Description
Redoing #54. This is for changing the merging way from squash and merge to create a merge commit
Types of changes

[ ] Bug fix (changes which fixes an issue)
[ ] New feature (changes which adds functionality)
[x] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] ETC (build, ci, docs, perf, refactor, style, test)

Checklist

[x] I followed the contributing guidelines.
[x] I have updated the documentation accordingly.
[x] I have added tests to cover my changes.
[x] The PR title and commits are followed conventional commit form.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.1 out of 5 committers have signed the CLA.:white_check_mark: loloicci:x: Deployer:x: uint:x: webmaster128:x: ethanfreyDeployer seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


Add the ability to use :cd instead of :lcd

Currently Startify use :lcd to open files with let g:startify_change_to_dir = 1 or let g:startify_change_to_vcs_root = 1. I suggest to add the ability to let user specify :cd, :lcd or :tcd command to change directory. This ca be useful because :lcd cannot be overwritten with :cd from other buffer (from drawer, for example).

Thank you!

Hah, you're welcome!


[WIP] merge hoodie-server & hoodie-start into hoodie

closes  https://github.com/hoodiehq/discussion/issues/94

we decide to merge hoodie into hoodie-server instead, see https://github.com/hoodiehq/discussion/issues/94


[Feature] Custom item sets.

can we have the option to create sample sets for armoury? would be nice if we could create our own sets and just import em with a button click. going through creating every item again and again just to compare life totals endgame is kinda annoying.
otherwise great work. love this application, wasting several hours a day creating new builds.

Related to #47

1.4.12 added a new item list to the Items tab which is shared between all builds, so you can easily store entire gear sets in there if you want to.


monapi Unknown column 'stdin' in 'field list'

What happened:
单机部署，今天上午拉的最新代码
monapi ：

What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:

OS (e.g: cat /etc/os-release):
Logs:
Others:

https://github.com/didi/nightingale/blob/master/sql/upgrade_2.3.0.sql 需要把这个sql导入


Z Segment Support

Hi there!
We have been testing and using your package and it's excellent! We really appreciate your effort on it. We would like to know if it supports Z segments, and if not, how do we customize hl7 messages including Z segments? As far as I've tested it, it doesn't handle Z segments but it doesn't invalidate it either, so after decoding, there's no trace of it in the response.
Thanks in advance!
PS: Also would love to know if you are planning to implement this feature in the near future.

Can you provide a link to a Z segment?
Of note, the hl7 decoder/encoder is separate from the segment definition. Is the Z segment a decoder/encoder request or a segment package definition change request?

Okay, I did a quick search. It appears Z-Segments refer to user defined segments that can appear anywhere. In this case, I would encurage you to copy one of the segment definition packages in the repository, edit as required, and use.
Were you thinking of something else that would not require this? Please sketch roughly what you are thinking.


Blast door/shutter, timer and or gate device linking fixes

About the PR

This PR fixes linking to anything that can send and receive through device links. I.e. airlocks, blast doors, shutters and the or gate.
It also restores the functionality of the or gate and the timers because those where also broken (they where merged after or just before the refactor got merged so they broke 🤷♂)

[X] I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Changelog
:cl:

fix: Fixed not being able to link blast doors and shutters

or gate works fine ive seen it work on cluster

or gate works fine ive seen it work on cluster

They don't work with device linking, which is the new refactored version of machine linking.
The machine linking code is still around to not break maps so that might be why you've seen them work but they aren't linkable.


Foreign Key Relationship in data model?

As per instruction, if we have below structure:
{
  "posts": [
    { "id": 1, "title": "json-server", "author": "typicode" }
  ],
  "comments": [
    { "id": 1, "body": "some comment", "postId": 1 }
  ],
  "profile": { "name": "typicode" }
}

Because we have "postId" in comments, so it is just like a foreign key from comments to posts.
Now, if I try
GET http://localhost:3000/posts/1/comments
We will get all comments with "postId" equals to 1
Until now, everything works just fine by default, no special route required.
However, the problem comes when I start to try:
POST http://localhost:3000/posts/1/comments with some basic data, and it says 404 error!!!
{
    key: "someData"
}

I know that I can still directly post to http://localhost:3000/comments with below data
{
    postId : 1,
    key : "someData"
}

But this is not consistent with the first GET....
I tried to find some more documents, but very less information. please help!

I'm having the same issue.
The route works with GET, but don't with POST

The issue happens when trying to get some specific resource too. As @realdah said:
If I try GET http://localhost:3000/posts/1/comments returns me a list
But if I try GET http://localhost:3000/posts/1/comments/1 returns me a 404

@realdah you're right it makes more sense this way, I've added POST for nested resources in v0.8.3. Thanks for the suggestion.

@typicode, are you supporting GET and DELETE on nested resources. I cannot figure out how to deal with those in example. For example, after the creation of the nested comment, GET /posts/1/comments/1 and DELETE will return 404. I could find a workaround with a route ending with comments?postId=:postId but still it isn't possible to DELETE

Hi @urecio, to delete, use DELETE /comments/1. The idea is that only comment id is useful to delete a comment, so there's no need to have a post id in the route.

That's true @typicode. In fact, I'm working on a different example, which is a many-to-many relationship. For example with the typical student-class relation, my current workaround is a bit tricky:
POST /classes
POST /students
POST /classes/1/students with data => {studentId: 1}

To get the students of a class I have to GET /classes/1?_embed=students and then iterate over the results...
to delete I'm using the id autogenerated on students. A set looks like: {id: 2, studentId: 1, classId: 1}, so DELETE /students/2

Do you think I'm misunderstanding something and overcomplicating it?


[Feature request]: Capture Door Lock User

Capture Door Lock User
It would be wonderful if you could capture which users locked/unlocked a door (or if it was unlocked manually). This would be really powerful when mixed with the HomeAssistant addon.
For example:
When the door is unlocked by me, turn off cameras and set routines based on my preferences
When the door is unlocked by houseguest, leave cameras on
When door is unlocked by UPS / Amazon, take photos and send notification to phone, use speaker to give directions to just close the door behind them.
When the door is locked by "one tap", arm security system and turn on cameras

Would love to see this added for exactly the reasons you suggested. I previously (w/ zwave lock) disarmed my alarm if a legit user unlocked the door with a code vs breaking window and reaching it to open the lock manually.

Some additional info...looks like NICKNAME is captured. Can this be exposed so Home Assistant integration can take advantage of it?
2023-11-01 13:37:02.896  DEBUG [MqttClient.] Received a smart lock message over MQTT
{
message: {
eventType: 259,
userId: 'e1e41b56-0a8b-4c3c-bd47-d4909ffxxxxx',
data: {
timestamp: '1698845822857',
uuid: '6203828c-a4e7-4ffa-ba1a-d7503c8xxxxx',
data: {
stationSn: 'T8520Q25231xxxxx',
deviceSn: 'T8520Q25231xxxxx',
eventType: 259,
eventTime: '1698845822503',
shortUserId: '0001',
nickName: 'Izzy',
userId: 'e1e41b56-0a8b-4c3c-bd47-d4909ffxxxxx',
deviceName: 'Back Door'
}
}
}
}


[DataLake] missing "404 ContainerNotFound" error code

DataLake documentation
https://docs.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/filesystem/delete#response
The list of possible error codes doesn't contain 404 ContainerNotFound: The specified container does not exist. This is what is returned by e.g. deleting a non-existent filesystem, as you can see in the .NET SDK Tests.

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

ID: d24f0e5c-4677-457a-5f14-98c44e7157f3
Version Independent ID: 35ec5bb0-5969-c3e1-3611-b06a8e2566ea
Content: Use .NET to manage data in Azure Data Lake Storage Gen2
Content Source: articles/storage/blobs/data-lake-storage-directory-file-acl-dotnet.md
Service: storage
Sub-service: data-lake-storage-gen2
GitHub Login: @normesta
Microsoft Alias: normesta

@Arithmomaniac Thank you for sharing that . We will engage the content team to update the documentation as needed.

Thanks for pointing this out @Arithmomaniac . Closing issue as this is related to a different article. I've started a thread with you directly and included the right folks. Thx again.
#please-close


x/website: Getting started tutorial errors out on TLS handshake due to out of date package

The "Tutorial: Get started with Go" recommends the wrong package version of rsc.io/quote. Using the standard 1.5.2 version results in TLS handshake errors. Switching to v4 gives the expected results.
Related Issues
https://github.com/golang/go/issues/51188
Raised this as a separate issue as that issue is in regards to the wording surrounding searching for the package. This issue is in regards to the code now completely failing to work as it is written in the tutorial.
What is the URL of the page with the issue?
https://golang.google.cn/doc/tutorial/getting-started
What is your user agent?
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0

Screenshot
Website:

Terminal trying v1.5.2 of risc.io/quote showing error out on mod tidy

Terminal trying v4 and it successfully downloading and executing the program

Code
Original Code:
package main

import "fmt"

import "rsc.io/quote"

func main() {
    fmt.Println(quote.Go())
}

Changed Code:
package main

import "fmt"

import "rsc.io/quote/v4"

func main() {
    fmt.Println(quote.Go())
}

Go Version
go version go1.20.2 linux/amd64
OS
Ubuntu 20.04.6 LTS running under WSL
What did you do?

Followed the tutorial as it was written. Adding /v4 to the import and rerunning mod tidy corrected the error.
What did you expect to see?
Mod tidy should have executed with downloading the module.
What did you see instead?
Mod tidy error-ed out a TLS handshake.
Error Messages Seen
 rsc.io/quote<EMAIL_ADDRESS>verifying module<EMAIL_ADDRESS>Get<EMAIL_ADDRESS>remote error: tls: handshake failure
rsc.io/quote: module rsc.io/quote: Get "https://proxy.golang.org/rsc.io/quote/@v/list": remote error: tls: handshake failure

This looks more like an issue with your network connection than anything with the go command or the proxy


Consider including the number of usages of each API in the portability score

The portability score reported by APIPort is based on the number of distinct APIs used by the assembly being analyzed.  This means that an unsupported API that is used 1000 times has the same effect on the score as one that's only used once.  It also means that if you remove 999 usages of an unsupported API, but there's one left over, the portability score won't change at all.
It would probably be more useful if it reported a score based on the number of times each API was used in the assembly.

Duplicate of #103


Turn IPC unmount errors into warnings.

And do not try to unmount empty paths.
Because nobody should be woken up in the middle of the night for them.
Fixes #17550
Signed-off-by: David Calavera<EMAIL_ADDRESS>

LGTM.
I do wonder if daemon.Register should just call container.cleanup() rather than specifically looking for the ipc mounts.

I do wonder if daemon.Register should just call container.cleanup() rather than specifically looking for the ipc mounts.

container.cleanup makes assumptions that I don't think we want

LGTM


fix(region): lb cert name fix

What this PR does / why we need it:

lb cert name fix

Does this PR need to be backport to the previous release branch?:

release/3.7

/area region
/cc @zexi @ioito

/lgtm


lineHighlightBorder should frame all warped line

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

VS Code Version: 1.90.0
OS Version: OS: Linux x64 6.6.15-amd64

Steps to Reproduce:
Using lineHighlightBorder such as
"editor.lineHighlightBackground": "#ffff00",
"editor.lineHighlightBorder": "#ff00001f",

with warped long lines produces editor text such as:

It would be better to frame all lines.

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!

Relevant code https://github.com/microsoft/vscode/blob/main/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts

@nipatriknilsson To clarify, you mean a single border around the whole line?

@hickford Yes, that's correct.

@alexdima surely this is a bug rather than a feature request?


File transfer stuck midway during transfer

Describe the bug, Current Behavior and Context
When transferring files from my Mac  to Android device (Xiaomi Note 6 Pro), OpenMTP gets stuck on transferring one specific file. This happens again after second attempt and seems to be related to some corruption within certain backed-up files.
The application interface is still usable but there is no way to skip to next file, or to cancel the transfer as a whole.
Expected behavior and Possible Solution
Because OpenMTP of course cannot guarantee the validity and reliability of the content being transferred through the app. A timeout of X seconds after being stuck on transferring one file would be expected, or a prompt which allows the user to skip file or cancel the whole transfer.
Steps to Reproduce (for bugs)
Unfortunately the issue appears to be hard to replicate and a combination of some corruption in data and external harddisk used.

Setup a symlink to a directory with a couple of dummy files
Start transfer from the symlink source destination machine to Android device through OpenMTP
Midway during transfer remove the symlink target

Your Environment
Include as many relevant details about the environment you experienced the bug in

Node version : v12.17.0
Version or Branch used : stable
Operating System and version Catalina 10.15.6
App Version OpenMTP-v2.4.4

Attachments
Unfortunately the directory with logs didn't contain any content:
$ ls -la ~/.io.ganeshrvel/openmtp/logs/
total 0
drwxr-xr-x  3 peter  staff   96 27 jul 13:29 .
drwxr-xr-x  4 peter  staff  128 27 jul 13:29 ..

$ cat ~/.io.ganeshrvel/openmtp/logs/OpenMTP-error-2020-07.log
# (empty output)

symlinks are tricky. In the next release of OpenMTP this issue should be fixed (at least temporarily)

This should have been fixed by https://github.com/ganeshrvel/openmtp/pull/181
Keeping this open until the stable release it out.

@peterv1988
Could you download the latest community beta version of OpenMTP from https://drive.google.com/file/d/1wpSlkGWZKe4-nRYcdJaPVA3Y6kOBMTsO/view?usp=sharing and let me know whether your device is recognized?
Cheers


podman load: confusing command-line usability

There's a confusing and (AFAICT) unused PATH option for podman load:
$ podman load --help
Usage:
  podman load [flags] [PATH]

The man page describes the argument differently, and non-optional:
   podman load name[:tag|@digest]

However, the option seems to be completely ignored. This is especially misleading when a naïve user types podman load foo.tar and it just hangs (waiting for input on stdin).
This one is beyond my ability because I don't know the intention behind this argument.
While you're looking into it, could you also add an isTerminal() check?

Load an image from a tar archive or STDIN

Ideally the behaviour of podman load should report in both cases.

podman load <tar-file> i.e.  argument without any flag should report error.
podman load with input is from terminal, It should report error.

I can work on this.
/assign

@kunalkushwaha Dan is working on it; #2674. Thank you!

ohh okay thanks for update :)

seems like this is fixed


[migrator] Custom AUI Validators Are No Longer Implicitly Required

Date: 2015-Dec-02
https://issues.liferay.com/browse/LPS-60995
https://github.com/liferay/liferay-portal/blob/master/readme/7.0/BREAKING_CHANGES.markdown#custom-aui-validators-are-no-longer-implicitly-required
type:java,jsp

resolved


Customization of auxilaries points

UX Suggestion:

Provide the ability to the user to add as much auxilaries points as he want, with the ability to move them freely via drag and drop.
Such feature can give the user the ability to organize big and complexe workspaces and remove paths-congestion from the graph.

Not critical in my project, but can imagine when the nodes get A LOT, this being useful.

And this is again an extra complexity. If the number of nodes is too large, then it makes sense to divide them into modules.

@Ni55aN you convinced me this a not so great idea after all. Let's make this a vote?

@trsh I'm not against adding such features, but not directly to the library codebase.
Most of all I don't want the library to grow functional, which will be difficult to maintain.
That's why I'm currently researching possible interfaces that will be needed for plugins, and I'm going to implement plugin support.

@Ni55aN clear, then let's just close this ;)


Improve localization

This commit improves localization and clarifies that once removed, the file cannot be restored, otherwise, "no undo" is quite ambiguous

There's a lot of "(no undo)" instances in the rest of the editor. They could be shown some love later on.

Sure thing. I'll patch all that up as soon as I have some free time

From: Michael Alexsander Silva Dias<EMAIL_ADDRESS>Sent: Saturday, July 6, 2019 7:11:26 PM
To: godotengine/godot
Cc: Sayan Nandan; Author
Subject: Re: [godotengine/godot] Improve localization (#30373)
There's a lot of "(no undo)" instances in the rest of the editor. They could be shown some love later on.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/godotengine/godot/pull/30373?email_source=notifications&email_token=AEESP2ROXU26YJEVZEXN3G3P6COINA5CNFSM4H6SUM72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZKZ3MA#issuecomment-508927408, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AEESP2TIGEGXNU6WSIY5B6TP6COINANCNFSM4H6SUM7Q.

Thanks!


Setting Column View as Default

What's the Problem?
No response
Solution/Idea
Column view is a long desired feature in Windows, it would be great it Column View can be set as default in Files, or more generally any view setting can be set as Default.
Alternatives
Currently need to set Column View manually.
Priorities

Capability
Priority

This proposal will allow developers to accomplish W
Must

This proposal will allow end users to accomplish X
Should

This proposal will allow developers to accomplish Y
Could

This proposal will allow end users to accomplish Z
Won't

Files Version
No response
Windows Version
No response
Comments
No response

You can turn off "enable individual preferences for folders" option in settings > preferences > files and folders.

Many thanks for the quick response!


Update Pages “about”

Automatically generated by Netlify CMS

👷 Deploy Preview for chic-shortbread-66a66b processing.

Name
Link

🔨 Latest commit
e077b8a9c138180529a3b30f4f88030af455c235

🔍 Latest deploy log
https://app.netlify.com/sites/chic-shortbread-66a66b/deploys/655c41f7a892f90008a4e9d2


[Enhancement](point query optimize) improve performace of point query on primary keys

Proposed changes
Issue Number: close #15571
Problem summary
Describe your changes.
Checklist(Required)

Does it affect the original behavior:

[ ] Yes
[x] No
[ ] I don't know

Has unit tests been added:

[x] Yes
[ ] No
[ ] No Need

Has document been added or modified:

[x] Yes
[ ] No
[ ] No Need

Does it need to update dependencies:

[ ] Yes
[x] No

Are there any changes that cannot be rolled back:

[ ] Yes (If Yes, please explain WHY)
[x] No

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

Add documents later pls

@xiaokang PR modified according to code review, lets' continue ?


Passing rtcpsummary info to user-defined callback

Hello @alfredh and @geoffstewart
First of all, thank you for this useful module.
I ran into the need to use statistics in another function, and not just output it to the log.
So I think that calling a custom handler will solve this problem.
Is this PR will be appropriate?
Aleksei

if you also need this information, it is perhaps better to add a dedicated handler
for it in the baresip core (libbaresip).
The ua event UA_EVENT_CALL_RTCP is already implemented, and can be used
to fetch this information.
Alfred

Thank you for pointing at ua event UA_EVENT_CALL_RTCP. It is much better solution.


Images stretch when side panels closed

When images are part of a note they are stretched out of shape if the left and/or right panels are closed.
Expected behaviour: image keeps proper proportion irregardless of width of pane.
Examples show in Agora with
1 with right panel;  (stretching already apparent with just right panel open
2 without panels (severe stretching of images)
and
3) another theme that shows proper image even when left and right panels are closed.
Otherwise this could become my go to theme!

Hi @BricoleurSoul thanks for the feedback. Unfortunately, I've not been able to re-produce this behavior. Can you tell me a little more about your obsidian settings, or the source of the image? Is this a web-hosted image or local, for example?
Alternatively, try searching for the /* SNIPPET: Enlarge image on hover by @den */ section of the code in your obsidian vault .obsidian/themes/Agora.css file and either try playing with some of the numbers there, or delete that section of the code entirely and see if that fixes the issue?

No worries, thanks for trying the theme!


Expo compatibility

Hello and thank you for your package!
It looks very promising, but I'd like to clarify whether this package is compatible with React Native apps that use the Expo managed workflow?
Currently, I getting the following error when trying to use code from your example in Expo managed app:
Invariant Violation: requireNativeComponent: "PasteInput" was not found in the UIManager.

This error is located at:
    in PasteInput (at src/index.tsx:307)
    in TouchableWithoutFeedback (at src/index.tsx:298)
    in ForwardRef (at component.tsx:88)
    ...

@ipakhomov I want same functionality in a managed expo app, were you able to figure this out?

@farazirfan47 not yet, unfortunately. Looks like the only way to make this package work with expo - is ejecting an app to the bare workflow.

@izakfilmalter PR's are very much welcome :)

anybody made one yet ?

You will have to use expo-dev-client to make this package work
There is no config-plugin required.


Vitest exit with an unhandled error if tests have a module with "then" exports

Describe the bug
Taken from: rescript js promise
Suppose I have the module
var then = function (p, cont) {
  return Promise.resolve(p).then(cont);
};

export { then };

and simple test
import * as vitest from "vitest";
import { then } from "./testable.mjs";

vitest.test("Check with 'then' export", async () => {
  await vitest.expect(then(Promise.resolve(1), () => 2)).resolves.toEqual(2);
});

When I run it, I've got the following error:

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Errors ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯

Vitest caught 2 unhandled errors during the test run.
This might cause false positive tests. Resolve unhandled errors to make sure your tests are not affected.

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Rejection ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
DataCloneError: function () { [native code] } could not be cloned.
 ❯ new DOMException node:internal/per_context/domexception:53:5
 ❯ post node_modules/vitest/dist/worker.js:49:14
 ❯ sendEvent node_modules/vitest/dist/vendor-index.b271ebe4.js:25:9
 ❯ node_modules/vitest/dist/vendor-rpc.cbd8e972.js:46:24
 ❯ withSafeTimers node_modules/vitest/dist/vendor-rpc.cbd8e972.js:20:20
 ❯ Proxy.safeSendCall node_modules/vitest/dist/vendor-rpc.cbd8e972.js:45:41
 ❯ VitestTestRunner.testRunner.onCollected node_modules/vitest/dist/vendor-index.3e351f42.js:66:11
 ❯ startTests node_modules/@vitest/runner/dist/index.js:841:51
 ❯ node_modules/vitest/dist/entry.js:103:7
 ❯ withEnv node_modules/vitest/dist/entry.js:73:5

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { code: 25, INDEX_SIZE_ERR: 1, DOMSTRING_SIZE_ERR: 2, HIERARCHY_REQUEST_ERR: 3,
RONG_DOCUMENT_ERR: 4, INVALID_CHARACTER_ERR: 5, NO_DATA_ALLOWED_ERR: 6, NO_MODIFICATION_ALLOWED_ERR: 7, NOT_FOUND_ERR: 8, NOT_SUPPORTED_ERR: 9, INUSE_ATTRIBUTE_ERR: 10, INVALID_STATE_ERR: 11, SYNTAX_ERR: 12, INVALID_MODIFICATION_ERR: 13, NAMESPACE_ERR: 14, INVALID_ACCESS_ERR: 15, VALIDATION_ERR: 16, TYPE_MISMATCH_ERR: 17, SECURITY_ERR: 18, NETWORK_ERR: 19, ABORT_ERR: 20, URL_MISMATCH_ERR: 21, QUOTA_EXCEEDED_ERR: 22, TIMEOUT_ERR: 23, INVALID_NODE_TYPE_ERR: 24, DATA_CLONE_ERR: 25 }
This error originated in "src/testable.test.mjs" test file. It doesn't mean the error was thrown inside the file itself, but while it was running.

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Error ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
{ type: 'Unhandled Error', stacks: [] }
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯

 Test Files  no tests
      Tests  no tests
     Errors  2 errors
   Start at  12:15:37
   Duration  496ms (transform 32ms, setup 0ms, collect 0ms, tests 0ms, environment 0ms, prepare 0ms)

P.S. I've tried to do some research and found that an error occurs while fetching the module
Reproduction
https://github.com/KonstantinKai/vitest-then-export-issue
Reproducing in both environments: ['node', 'jsdom']
npm test -- --run

System Info
System:
    OS: macOS 13.4.1
    CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
    Memory: 887.37 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.18.0 - ~/.volta/tools/image/node/18.18.0/bin/node
    Yarn: 1.22.18 - ~/.volta/tools/image/yarn/1.22.18/bin/yarn
    npm: 8.19.1 - ~/.volta/tools/image/npm/8.19.1/bin/npm
    pnpm: 8.6.10 - ~/.volta/bin/pnpm
    Watchman: 2<IP_ADDRESS> - /usr/local/bin/watchman
  Browsers:
    Chrome: 118.0.5993.117
    Safari: 16.5.2
  npmPackages:
    vitest: ^0.34.6 => 0.34.6

Used Package Manager
npm
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
[X] The provided reproduction is a minimal reproducible example of the bug.

Sorry, it seems this relates to the rescript project issue.


Convert JSON to TypeScript format

I have a lot of settings written into a JSON file, can it be automatically converted to TS format?

Sorry, it is currently not supported. There are 2 ways to use the JSON though:

importJson() function
The JSON code can be used directly in karabiner.ts

writeToProfile(
  'Default',
  [
    ...[rulesInTs],
    ...[rulesInJson],
  ]
)

Then migrate them to ts in steps.


removeSeries fails with Value is undefined during unmount event

Hi,
In React app, we have a hook that creates a line series and displays the data when the chart element and data becomes available.  The code is included below.  The code works as expected to display new data and when data changes, an existing series gets removed and a new series with new data gets created.
There is however a crash in lightweight-charts (LWC) when the code calls removeSeries at component unmount time, that is when the HTML element is getting removed from the page.  The removeSeries at the unmount time crashes failing to find series in its internal structure.
The code is well isolated and should be easy to understand.  Additional debug shows the studiesSeries array contains the series as expected.  The removeSeries should be able to complete with success the same way as in the cases when data changes.
Lightweight Charts™ Version: 3.8.0
Steps/code to reproduce:
export default function useDisplayStudies(
  chart: IChartApi,
  studies: DataPoint[][]): void
{
  useEffect(() => {
    const studiesSeries = [];

    studies.forEach((study, idx) => {
      if (study.length > 0) {
        const series = chart.addLineSeries(studiesStyles[idx]);
        studiesSeries.push(series);
        series.setData(study);
      }
    })

    return () => {
      studiesSeries.forEach((series) => {
        chart.removeSeries(series);
      });
    };
  }, [chart, studies]);

  return;
}

Actual behavior:
In React, useEffect hook gets called when chart element or studies data change.  Additionally, it gets called at unmount time when the component is removed.  When the data changes the code works as expected. At the unmount time, however, removeSeries crashes with the following error,
Uncaught Error: Value is undefined
    at e (lightweight-charts.esm.production.js:7:1)
    at t.removeSeries (lightweight-charts.esm.production.js:7:1)
    at useDisplayStudies.ts:39:1
    at Array.forEach (<anonymous>)
    at useDisplayStudies.ts:38:1
    at safelyCallDestroy (react-dom.development.js:22932:1)
    at commitHookEffectListUnmount (react-dom.development.js:23100:1)
    at commitPassiveUnmountInsideDeletedTreeOnFiber (react-dom.development.js:25098:1)
    at commitPassiveUnmountEffectsInsideOfDeletedTree_begin (react-dom.development.js:25048:1)
    at commitPassiveUnmountEffects_begin (react-dom.development.js:24956:1)
    at commitPassiveUnmountEffects (react-dom.development.js:24941:1)
    at flushPassiveEffectsImpl (react-dom.development.js:27038:1)
    at flushPassiveEffects (react-dom.development.js:26984:1)
    at commitRootImpl (react-dom.development.js:26935:1)
    at commitRoot (react-dom.development.js:26682:1)
    at performSyncWorkOnRoot (react-dom.development.js:26117:1)
    at flushSyncCallbacks (react-dom.development.js:12042:1)
    at react-dom.development.js:25651:1

The chart suddenly does not contain the series and crashes calling removeSeries.  Debug shows that the chart and series values are valid objects.  The chart.remove() has not been called yet - part of another hook.
Expected behavior:
Call to removeSeries will complete with success at the event of unmounting the component from the view.

I double checked chart.remove() and react calls that first before this hook.


Missing dependency to imported proto files

"ls" command on service which contains imported proto file ends with error:
Error: Dependency missing: Protos/imported.proto

Any progress on or workarounds for this? This stops it from working on any protos using any of the WellKnownTypes (in my case Timestamp)
The exception is thrown by Google.Protobuf.Reflection.FileDescriptor.BuildFromByteStrings(IEnumerable`1 descriptorData)

@Edward-Alchikha Initially this was an issue when using protobuf-net.Grpc... But now I'm unsure. Do you happen to have some minimal steps to reproduce. Also, what server are you using?

I am having the same issue as well. I am using .NET6 and serving and using Grpc.AspNetCore.Server.Reflection to serve up the protobufs.  In my proto I am importing via:
import "google/protobuf/timestamp.proto";I am using thedotnet grpc-cliutility to dump the files from reflection. The following command works for any proto that does use the WellKnownTypes from google.dotnet grpc-cli dump localhost:6504 SampleService -o Protos`
If the proto does contain timestamp.proto then I get the following error: Error: Dependency missing: google/protobuf/timestamp.proto

@codecooper do you happen to have a repro to share? I just tried this out, and unfortunately I'm unable to reproduce.
Here's what I did:

Create a new gRPC Server project (dotnet new grpc).
Add Grpc.AspNetCore.Server.Reflection package (version 2.45.0), and update Grpc.AspNetCore to latest (version 2.45.0).

<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>net6.0</TargetFramework>
    <Nullable>enable</Nullable>
    <ImplicitUsings>enable</ImplicitUsings>
  </PropertyGroup>

  <ItemGroup>
    <Protobuf Include="Protos\greet.proto" GrpcServices="Server" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Grpc.AspNetCore" Version="2.45.0" />
    <PackageReference Include="Grpc.AspNetCore.Server.Reflection" Version="2.45.0" />
  </ItemGroup>

</Project>

Modify protos/greet.proto to use a well-known type.

syntax = "proto3";

import "google/protobuf/timestamp.proto";

option csharp_namespace = "proto_test";

package greet;

// The greeting service definition.
service Greeter {
  // Sends a greeting
  rpc SayHello (HelloRequest) returns (HelloReply);
}

// The request message containing the user's name.
message HelloRequest {
  string name = 1;
  google.protobuf.Timestamp ts = 2;
}

// The response message containing the greetings.
message HelloReply {
  string message = 1;
  google.protobuf.Timestamp ts = 2;
}

Register gRPC Server reflection in Program.cs

using proto_test.Services;

var builder = WebApplication.CreateBuilder(args);

// Additional configuration is required to successfully run gRPC on macOS.
// For instructions on how to configure Kestrel and gRPC clients on macOS, visit https://go.microsoft.com/fwlink/?linkid=2099682

// Add services to the container.
builder.Services.AddGrpc();
builder.Services.AddGrpcReflection();

var app = builder.Build();

// Configure the HTTP request pipeline.
app.MapGrpcService<GreeterService>();
app.MapGrpcReflectionService();
app.MapGet("/", () => "Communication with gRPC endpoints must be made through a gRPC client. To learn how to create a client, visit: https://go.microsoft.com/fwlink/?linkid=2086909");

app.Run();

Start server

dotnet run

From another console, run grpc-cli (server is listening on https://localhost:7078 in my case)

dotnet grpc-cli dump https://localhost:7078 greet.Greeter

The above successfully dumped this to the console.
---
File: Protos/greet.proto
---
syntax = "proto3";
import "google/protobuf/timestamp.proto";
package greet;

message HelloRequest {
  string name = 1;
  google.protobuf.Timestamp ts = 2;
}

message HelloReply {
  string message = 1;
  google.protobuf.Timestamp ts = 2;
}

service Greeter {
   rpc SayHello(greet.HelloRequest) returns (greet.HelloReply);
}

Thank you for the hand-holding. Sometimes, you need someone else to tell you to slow down and try building from scratch. This helped. You are correct, this does work. After playing around with what you detailed above I think I have found the real problem. I have 20+ proto files with ~50 methods total. They all use the same message as a request model. To do this, they all import a common proto file. This common file references import "google/protobuf/timestamp.proto"; as well.
//greet.proto
syntax = "proto3";
import "google/protobuf/timestamp.proto";
import "Protos/common.proto";

option csharp_namespace = "deleteme";

package greet;

// The greeting service definition.
service Greeter {
  // Sends a greeting
  rpc SayHello (HelloRequest) returns (HelloReply);
}

// The response message containing the greetings.
message HelloReply {
  string message = 1;
  google.protobuf.Timestamp ts = 2;
}

// common.proto
syntax = "proto3";
import "google/protobuf/timestamp.proto";

option csharp_namespace = "deleteme";

package greet;

// The request message containing the user's name.
message HelloRequest {
  string name = 1;
  google.protobuf.Timestamp ts = 2;
}

It seems that the issue the nesting of imports. I know grpcui can work with this. But I am not good enough at go. I may just have to re-structure my files and requests.

@codecooper thanks for the investigation! I'm now able to reproduce, and hopefully provide a fix. Altough I'd argue issue with Grpc.Reflection not sorting transitive dependencies correctly. We had similar issue with Protobbuf-net.Grpc which we fixed.
Unfortunately the reflection docs doesn't really say much about the order of dependencies. But I know that this method here, requires the dependencies to be correctly ordered.
https://github.com/bjorkstromm/dotnet-grpc-cli/blob/bedea1d61228afb797cc83fe95f96ccb068b6a1b/grpc.cli/DumpCommand.cs#L31

@codecooper v0.6.0 is pushed to NuGet, and will soon be available. Thanks again for the repro!
https://www.nuget.org/packages/dotnet-grpc-cli/0.6.0


Add integration info for Helix Editor

This adds a note about RuboCop integration with the Helix Editor. For more info on the underlying implementation, see here: https://docs.helix-editor.com/languages.html#language-configuration

formatter The  formatter for the language, it will take precedence over the lsp when  defined. The formatter must be able to take the original file as input  from stdin and write the formatted file to stdout

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).
[ ] Squashed related commits together.
[ ] Added tests.
[ ] Ran bundle exec rake default. It executes all tests and runs RuboCop on its own code.
[ ] 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.

Thanks!


Foxx Model lifecycle events

I’m trying to add an updatedAt field to my model and have a couple of questions.
Foxx.Model.extend({
  schema: {
    name: Joi.string().trim(),
    updatedAtTimestamp: Joi.date()
  },

I think the model should be responsible for setting updatedAtTimestamp. I tried overwriting the model’s set method, but it seems that the repository calls set too late for my purpose.
Next, try it with a beforeSave hook. But where? The documentation for Backbone’s extend suggests to define an initialize function. However, initialize is never called. Is extend perhaps from an older version of Backbone? Would it make sense to upgrade to the latest version of extend for the next version of ArangoDB?
Anyways, implementing a constructor for my model instead
  constructor: function() {
    this.on('beforeUpdate', (data) => data.updatedAtTimestamp = Date.now());
    Foxx.Model.apply(this, arguments);
  }

Now isn’t it a bit weird to have the EventEmitter (my model) register itself as listener? I think it would be nicer if I could just implement a beforeSave method on my model and the repository would automatically call it if it exists.
I also find it unintuitive that my beforeUpdate handler can’t use this.set and has to modify the passed-in data instead (and thereby bypassing schema validation).
And then I noticed that several methods on Foxx.Repository are not emitting any of the lifecycle events:

updateById
replace
replacebyId

I think all three methods should emit the same events as update does.

Consider an implementation of Repository.update like this
  update: function (model, data) {
    'use strict';
    model.set(data); // do this first so lifecycle methods on model have latest values
    model.beforeUpdate && model.beforeUpdate();
    model.beforeSave && model.beforeSave();
    if (model.isValid) {
      var id = model.get("_id") || model.get("_key"),
        id_and_rev = this.collection.update(id, model.forDB());
      model.set(id_and_rev);
      model.afterUpdate && model.afterUpdate();
      model.afterSave && model.afterSave();
      return model;
    } else {
      // do something about the validation error
    }
  },

It would allow me to implement my model like
Foxx.Model.extend({
  schema: {
    name: Joi.string().trim(),
    updatedAtTimestamp: Joi.date()
  },
  beforeUpdate: function() {
    this.set({updatedAtTimestamp: Date.now()});
  }

For context: see #1096 for the original discussion of the lifecycle events.

Thanks @pluma - I've read the PR and the discussion on Google Groups. Doesn't really change any of my questions/feedback, though.
The original Google Groups discussion mentions emitting events from Repository.replace and Repository.replaceById. I wonder why this wasn't included in the implementation.
@moonglum @sarhugo do you have any feedback?

Here's my latest model
var Model = Foxx.Model.extend({
  schema: {
    name: Joi.string().trim(),
    createdAtTimestamp: Joi.number().integer(),
    updatedAtTimestamp: Joi.number().integer()
  },
  constructor: function() {
    this.on('beforeUpdate', (data) => data.updatedAtTimestamp = Date.now());
    this.on('beforeCreate', () => {
      var now = Date.now();
      this.set({createdAtTimestamp: now, updatedAtTimestamp: now});
    });
    Foxx.Model.apply(this, arguments);
  }
});

which I think demonstrates that the beforeUpdate usecase is a bit inconsistent with beforeCreate. And this only works as long as my controller only uses repository.save and repository.update (because replace, replaceById, and updateById don't emit events).
Or am I doing this all wrong? :)

@pekeler That wasn't really intended as an answer, just as additional context for this issue.
I agree that having an event emitter per-instance isn't exactly super useful for most use cases.

Fixed via #1287.

@pluma I don't quite understand how making the Repository emit the same events as the model is helpful. Are you suggesting the model should subscribe to the repository events instead of its own?

@pekeler If you want to listen to all models, you can just listen to the repository. The repository emits lifecycle events for all models.
In other words: instead of doing this.on('beforeSave', fn) in the constructor you can do repo.on('beforeSave', fn) once. Listening to yourself is a bit of an anti-pattern, especially if you have to do it in the constructor. Because there's no sane way to have the model types themselves be event emitters and handle sub-types (i.e. extend) properly, the event emitter is on the repos instead of the model types.

Sorry the delay of my response, I was with another projects. The Repository as an emitter for its models (as @pluma suggested and implemented in #1287 ) was the needed step and I think solves the problem mentioned by @pekeler .
I agree than having the model listen to himself is an antipattern but every improvement may start with some wrong implementation ;)

Sorry, I'm still a little confused. The event handlers, for example beforeCreate for setting calculated default values on new model instances, belong to the model's responsibility. I think what you're suggesting is that somewhere in my model's module I do repo.on('beforeCreate', someStaticMethodInTheModelsModule). I agree that this solves the problem of listening to itself, but the cost is that the model knows about the repository (and since the repository know about the model, we created a circular dependency).

You can put repo.on('beforeCreate', someStaticMethodInTheModelsModule) wherever you want. I would recommend putting it in the code that also tells the repo what model to use.
I guess the coupling could be further reduced by having static methods on the model and auto-registering them with the repo when the repo is initialized. At initialization, the repo already needs to know about the model type, so that would add no additional coupling.
Example:
var MyModel = Foxx.Model.extend({
  schema: ...
}, {
  beforeSave: function (model) {
    if (!model.validate()) throw new Error('Not valid!');
  }
});
var repo = new MyRepo(myCollection, {model: MyModel});
var invalid = new MyModel({invalid: 'data'});
repo.save(invalid); // throws

@pluma yes, auto-registering would be ideal IMO. So, all I'd need to do is add a beforeSave method to my model and it'll be automatically called before every save. This would be similar to what I suggested in my second comment from Feb 26 on this issue.

@pekeler Can you try the devel version and see whether that solves your problem? The example I proposed should work now.

The latest devel doesn't build for me right now (undefined symbols for RestSimpleHandler). So I just looked at the implementation of the latest repository.js and it looks good :+1:

Hi,
I just wanted to come back to this, as I noticed the OP mentioned about the following events not being emitted:

updateById
replace
replacebyId

But no-one seem to address this. I am writing an data import Foxx service, and often I just want to replace the whole model with the new changes from the 3rd party. I then want to run a transformation of that data to upsert another normalised graph model based on the latest version.
Therefore, if there entity already exists, I perform a PUT operation which uses the replaceById function.
I was hoping before a afterUpdate event to be emitted so I can then run the AQL upsert query.
Are these functions likely to call emit events in the near future? And if not, can I ask why so I understand the thinking behind it.
Thanks

@Soultripper thanks for your interest.
For updateById (and other methods that don't operate on model instances) this is by design. These methods are an example for where the repository/model abstraction in Foxx breaks down. For replace and replaceById an event could probably be emitted.
I wouldn't recommend relying on the event logic and the model/repository abstraction too much. While they will continue to be supported in 2.x the upcoming new version of Foxx (currently targeting ArangoDB 3.0) will do away with repositories and embrace the underlying collections API instead (there will still be a mechanism for schema validation but with less overhead)..


createServerSupabaseClient does not verify jwt token validity

const supabase = createServerSupabaseClient<Database>(context)
const {data: sessionRes} = await supabase.auth.getSession()

Right now this will return a valid session as long as the access_token is not expired and is issued by ANY supabase project. However there's no built in option to verify that the access_token actually being to the supabase project I specified when creating the serverSupabaseClient (e.g. supabaseUrl). This causes confusing permission issues later and is very unintuitive.

Shouldn't we just add the iss (issuer) tag to the JWT to begin with? =)

any update?


implemented test cases NMS FT 89 & 90

Passed

Can one of the admins verify this patch?

add to whitelist
On Mon, Jun 8, 2015 at 5:59 AM, motech-gerrit<EMAIL_ADDRESS>wrote:

Can one of the admins verify this patch?
—
Reply to this email directly or view it on GitHub
https://github.com/motech-implementations/mim/pull/329#issuecomment-109984590
.

please merge

Tracked with branch NMS.FT.KILKARICONTROLLERIT.
So closing this request.


Randoop throws AssertionError for a math package

What steps will reproduce the problem?
1. Download the org.apache.commons.math3 package
2. Test the package (a list with all package classes provided with the
--classlist parameter)
3. Observe Randoop exiting with an assertion error

What is the expected output? What do you see instead?

The expected output should be without exceptions, resulting in Randoop writing
generated unit tests to the file system.

Instead I get the following:

Creating Junit tests (2236 tests)...Throwable thrown while handling
command:java.lang.AssertionError
java.lang.AssertionError
        at randoop.main.GenTests.handle(GenTests.java:529)
        at randoop.main.Main.nonStaticMain(Main.java:80)
        at randoop.main.Main.main(Main.java:42)
Randoop failed.
Last sequence under execution:var0 =  prim : int:1079574528 :
var1 =  prim : boolean:true :
var2 =  cons :
org.apache.commons.math3.stat.regression.MillerUpdatingRegression.<init>(int,boo
lean) : var0 var1

What version of the product are you using? On what operating system?

Randoop 1.3.3. The operating system is GNU/Linux Trisquel 6.0.

Please provide any additional information below.

This is the command that I used to run Randoop:

java $JVM_FLAGS -ea -cp lib/randoop.jar:lib/junit4.jar:../src/
randoop.main.Main gentests --classlist=classlist.txt
--junit-output-dir=tests-round-1/ --junit-classname=Randoop1Test --timelimit=60
--forbid-null=false --small-tests=true --testsperfile=1

File classlist.txt is attached.

Original issue reported on code.google.com by<EMAIL_ADDRESS>on 16 Nov 2013 at 4:34
Attachments:

classlist.txt

I cannot reproduce the problem.  Maybe it has already been fixed.
Here are the exact commands that I ran:
cd ~/tmp
wget http://mirrors.nxnethosting.com/apache//commons/math/binaries/commons-math3-3.5-bin.tar.gz
tar xzf commons-math3-3.5-bin.tar.gz
java -ea -cp $randoop/dist/randoop.jar:commons-math3-3.5/commons-math3-3.5.jar randoop.main.Main gentests --classlist=classlist.txt --junit-output-dir=tests-round-1/ --junit-classname=Randoop1Test --timelimit=60 --forbid-null=false --small-tests=true --testsperfile=1


[SPK] Create IngressRoutes for new Services

As a:
SPK user
I want:
I want Ingress Routes to be automatically added to my services
So that:
I can have my tooling generate the necessary routing rules to accommodate rings
Describe the solution you'd like:
A method or a mechanism that should add Ingress Routes to a service by:
As we're using Traefik ingress controller, we should create Traefik ingress routes. This can be simply templatizing an ingress route. We want to create an Ingress Route for the each of the rings defined in a bedrock.yaml file for my service, and placing them in each subdirectory as a static manifest.

[ ] Produce a function/util inside spk that utilizes a template Traefikingress route and configures it for a ring component in an HLD repository as a static manifest. This will be called by #717

Describe alternatives you've considered:
Additional context:
In order for an application to be publicly accessible, it needs a routing rule for the ingress controller (traefik, in this case)
Does this require updates to documentation?:
Yes ~

Needs more flushing out

@bnookala to link example routes

https://docs.traefik.io/routing/providers/kubernetes-crd/#traefik-ingressroute-definition

@bnookala @evanlouie do we know what needs to be templatized exactly given the link to the example definition above? Just trying to flushing out the unknowns.

It will be a variation of the example from the above link:
(note this is direct copy/paste from the link above)
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
  name: ingressroutefoo

spec:
  entryPoints:
    - web
  routes:
  # Match is the rule corresponding to an underlying router.
  # Later on, match could be the simple form of a path prefix, e.g. just "/bar",
  # but for now we only support a traefik style matching rule.
  - match: Host(`foo.com`) && PathPrefix(`/bar`)
    # kind could eventually be one of "Rule", "Path", "Host", "Method", "Header",
    # "Parameter", etc, to support simpler forms of rule matching, but for now we
    # only support "Rule".
    kind: Rule
    # (optional) Priority disambiguates rules of the same length, for route matching.
    priority: 12
    services:
    - name: whoami
      port: 80
      # (default 1) A weight used by the weighted round-robin strategy (WRR).
      weight: 1
      # (default true) PassHostHeader controls whether to leave the request's Host
      # Header as it was before it reached the proxy, or whether to let the proxy set it
      # to the destination (backend) host.
      passHostHeader: true
      responseForwarding:
        # (default 100ms) Interval between flushes of the buffered response body to the client.
        flushInterval: 100ms

would have to be templatized to something like:
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
  name: <SERVICE>-<RING>
spec:
  entryPoints:
    - web
  routes:
  - match: Host(`*`) && PathPrefix(`<SERIVCE-NAME>`) && Headers(`X-RING`, `<RING-NAME>`)
    kind: Rule
    services:
    - name: <SERVICE-NAME>
      port: 80


Fix iframe for higher page speed rating

Something wrong with cookies and how it is accessing the link

Also, adjust image sizes in info.html to use less data


Development

Changes Proposed in this Pull Request:

improves on behaviour with fragments: adds proper tools to make combined-fragment sets
tackles reviewer's comments

Check List:

[ ] closes #xxxx
[ ] tests added / passed
[ ] whatsnew entry
[ ] documentation updated and re-compiled

Hello @jaumebonet, Thank you for submitting the Pull Request !

In the file rstoolbox/components/selection.py:

Line 702:13: E117 over-indented

Do see the Hitchhiker's guide to code style

Pull Request Test Coverage Report for Build 224

0 of 0   changed or added relevant lines in 0 files are covered.
109 unchanged lines in 4 files lost coverage.
Overall coverage decreased (-0.6%) to 83.199%

Files with Coverage Reduction
New Missed Lines
%

.tox/py36/lib/python3.6/site-packages/rstoolbox/components/selection.py
1
96.1%

.tox/py36/lib/python3.6/site-packages/rstoolbox/utils/tools.py
16
76.19%

.tox/py36/lib/python3.6/site-packages/rstoolbox/components/fragmentFrame.py
17
90.32%

.tox/py36/lib/python3.6/site-packages/rstoolbox/io/rosetta.py
75
68.98%

Totals

Change from base Build 221:
-0.6%

Covered Lines:
3417

Relevant Lines:
4107

💛  - Coveralls