Questions tagged [protocols]

A common means for (un)related objects to communicate with each other.

protocols
Filter by
Sorted by
Tagged with
1 vote
0 answers
36 views

Getting issue in protoc-gen-rbi installation dependency

While doing make build I am getting this error, I tried installing using brew install protoc-gen-rbi After installing this I get the missing dependency as protoc-gen-ruby_csf and after installing this ...
Akshay Wairagade's user avatar
0 votes
0 answers
267 views

Error with permission policy header: unrecognized feature: ch-ua-form-factor and Access to XMLHttprequest

<iframe width="1000" height="550" src="https://www.youtube.com/embed/key" allow="autoplay; fullscreen;"> </iframe> i got this error in ...
simple coding's user avatar
0 votes
0 answers
39 views

How to reference a protocol's associatedtype

I have some enums that conform to a protocol with an associated type: protocol MyProtocol { associatedtype T func foo() -> T } enum MyEnum1: MyProtocol { func foo() -> Int { ...
WongWray's user avatar
  • 2,506
0 votes
0 answers
19 views

Passing data from a textfield in a custom cell to the tableview in Swift [duplicate]

I have a TableView Controller with 2 types of cell. In the first row i have a custom cell that contains a text field and a button. In the remaining rows i have standard cells just showing strings ...
PaulW's user avatar
  • 23
0 votes
0 answers
39 views

Protocols, standards or languages that are lacking of implementation

Is there some protocol, standard or language, like YAML, GeoJSON, server-sent events, that doesn't have an library implementing it in some language like C, Python or Rust? Looking for ideas for some ...
Afkaaja's user avatar
  • 105
0 votes
0 answers
45 views

Zero-knowledge card shuffle

I'm trying to design a zero-knowledge protocol for the creation of a shuffled deck of cards for use by two players. Naturally this requires that neither player knows the order of the cards after the ...
JP.'s user avatar
  • 5,551
2 votes
3 answers
141 views

Is it possible to have 2 arrays in the same ForEach in SwiftUI?

Is it possible to have 2 structs/arrays in the same ForEach (for the Option 3)? If so, how? All my attempts were unsuccessful. import Foundation import SwiftUI struct Car: Vehicle, Identifiable { ...
Alexnnd's user avatar
  • 659
0 votes
2 answers
137 views

Different Protocol with similar property name

I have a class bird which confirms two protocols swim and fly. Both the protocol have similar property called Speed. As Bird can fly with some speed also birds can swim with some speed. I am ...
Kanishka's user avatar
0 votes
1 answer
30 views

Extension that only works in a particular object

I am thinking about an extension that will only work inside a particular object. I don't know if it's possible. Example: I have a model. This model will get a function on the extension that only works ...
incelemeTRe's user avatar
1 vote
0 answers
137 views

Chrome DevTools Protocol: Unable to communicate with Google Chrome 112 via Websocket

1、My Google Chrome version is 114, Using commands:chrome.exe --remote-debugging-port=9222, open chrome, and using htpp://127.0.0.1:9222/json get webSocketDebuggerUrl(ws://localhost:9222/devtools/...
CHUANBING WANG's user avatar
1 vote
1 answer
78 views

Multiple protocol and class inheritance confusion, Swift

So I know a class can only inherit a single class but can inherit multiple protocols. I am looking at some code here and confused as to why swift is throwing me an error. protocol ...
Simon McNeil's user avatar
0 votes
0 answers
36 views

Using Swift protocols extensions instead of static funcs

I have begun to see protocols and their extensions being used solely to hold general purpose functions. These funcs only use global symbols or input parameters. The code could be contained in static ...
Jeff's user avatar
  • 3,959
1 vote
0 answers
129 views

ms-search Protocol WITHOUT Subfolders

Is there a way, to start a Windows Search via search-ms Protocol and excluding subfolder? Following the documentation of the CRUMB Argument (https://learn.microsoft.com/en-us/windows/win32/search/-...
Scrabyard's user avatar
  • 185
2 votes
1 answer
297 views

Swift protocol conformance with async overload

Why does this successfully compile and run? (Swift 5.8) protocol AsyncOverloaded { func load() func load() async throws } class MyClass: AsyncOverloaded { func load() { print(&...
Darko's user avatar
  • 9,765
0 votes
0 answers
42 views

URL-Protocoll registration - It doesnt recognize any parameters

Hi I just tried to register my own URL-Protocoll and read through this Thread How do I create my own URL protocol? (e.g. so://...) It kind of works, but my application doesn't receive any parameters. ...
Sacume's user avatar
  • 1
2 votes
1 answer
570 views

How do I annotate that a python class should implement a Protocol?

If I define a Protocol and a class that implements that protocol, I would like to document that the class does/should implement the protocol so that other developers can easily see that the class is ...
Alexis Winters's user avatar
1 vote
0 answers
105 views

how to serialize/deserialize a protobuf response from proto request

`What I'm trying to achieve is saving the protobuf in the response as a .proto file so I could work with it later. I can save it as .proto file, I couldn't figure out how to work with this later. I ...
gzldc's user avatar
  • 21
1 vote
0 answers
77 views

node.js SIP implementation class structure

I am trying to build a SIP implementation in Node.js. I would like to use this library to build out SIP UASs and UACs My entire implementation is at this GitHub repo my question relates to SIP dialogs ...
Nik Hendricks's user avatar
1 vote
1 answer
68 views

Swift creating a Protocol

How do I to represent the following variable found in a data model into a protocol: The data that it is modelling is JSON and in the format "imageName": "image1" The model ...
richmw's user avatar
  • 33
2 votes
1 answer
119 views

Implementers of a Protocol with TypeVars in signatures can't use their own types instead

I'm trying to give users of my protocols a way to use whatever they want as types for keys and values of some arbitrary data structure. Usually it will be a Dict, but it can easily be some external ...
Lev Rubel's user avatar
  • 183
0 votes
0 answers
23 views

Protocol handler is opening alternative browser but repeating endlessly

I have a registry key for opening a link in myBrowser from Firefox and Chrome. But it keeps opening the same link over and over again... 60 tabs and more! Set up as a "protocol handler" the ...
Kendo's user avatar
  • 190
0 votes
1 answer
138 views

Use Protocol classes with torch.nn.Module

I would like to create a Protocol class to specify types of PyTorch models - is it possible to create a Protocol that inherits from torch.nn.Module? Something like this: class DiffusionModelProtocol(...
Dan Jackson's user avatar
0 votes
1 answer
292 views

In what layer is GraphQL?

I've been learning about client server communication and read that according to OSI there are several layers where protocols are implemented. For example, TCP happens at layer 4 and HTTP at layer 7. ...
Juan Perez's user avatar
6 votes
3 answers
363 views

Swift: Is there still a use case for type erasure since the introduction of primary associated types?

Swift 5.7 introduced primary associated types. While experimenting with this feature, I was wondering if there is still a use case for type erasure types like AnySequence or if primary associated ...
Jan's user avatar
  • 163
0 votes
1 answer
55 views

Mirror files from local machine to website automatically

For an exhibition setting, I have an installation, where users can continuously create and save images. These images come all to the same folder. I want this folder to be mirrored to my websites ...
Marc Teuber's user avatar
0 votes
0 answers
50 views

Decrypting AES 256 GCM - Audio Package finding

i am currently working on a project, in which i am trying to see the audio packages sent by my computer in a zoom call. I am doing this to manually check if there is a signal. Alert: i am an extreme ...
Thamori LP's user avatar
0 votes
3 answers
64 views

Delegate Protocol is not triggered in UIKit

I am trying to pass some data from LoginVC to MainStoreVC. I have implemented Delegate Protocol as supposed to but it seems to be not firing up. Below is the LogInVC where I trigger the delegate ...
zstm284's user avatar
  • 19
2 votes
1 answer
279 views

Ringing an extension Node.js SIP implementation

I am attempting to create my own barebones SIP implementation. Currently, I am just trying to ring another phone for initial testing purposes, while I work on the structure of my program. As you can ...
Nik Hendricks's user avatar
0 votes
0 answers
25 views

Make android print bypassing print dialog

My goal is to develop an Android app that can print an image directly without prompting the user for print settings. I want the app to send the necessary data to the printer and initiate the printing ...
centenond's user avatar
  • 1,170
0 votes
1 answer
17 views

Swift Protocol and Delegate movement Back through multiple classes

I have a View Controller that passes data to a second class. That class passes data to a third class. I am trying to use protocol and delegate to get information back to the original View Controller. ...
Josh's user avatar
  • 23
0 votes
0 answers
65 views

How to send Data using GT06 protocol?

I am trying to send the GPS coordinates to Traccar GT06 device. But I Don't know how to send the data in flutter. This is the Implementation void sendDataToGT06Device() async { final socket = await ...
Vedant Kakade's user avatar
1 vote
1 answer
294 views

Node.js Asterisk authentications sip UDP headers

I am trying to learn more about SIP and trying to implement small parts of the protocol in node.js with UDP so far I have this const dgram = require('dgram'); const crypto = require('crypto'); const ...
Nik Hendricks's user avatar
0 votes
0 answers
14 views

No Appropriate protocols [duplicate]

javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate). Failed messages: javax.mail.MessagingException: Can't send command to SMTP host; ...
Pradeep Malik's user avatar
1 vote
1 answer
418 views

Custom protocol does't support Identifiable in SwiftUI

I have defined a CustomProtocol, which requires a unique identifier. I have also created a CustomModel that implements this protocol. Despite having an id property as required by the Identifiable ...
Cesare's user avatar
  • 830
0 votes
1 answer
179 views

SRT socket connection time out

I'm facing an issue while connecting to socket on my local server, Where i am getting an error of connection time out (1001) shown in attached screen shots. Is there any default SRT socket address and ...
NøBi Mac's user avatar
  • 505
2 votes
2 answers
152 views

Swift: Result's Failure Type cannot be protocol - "Type 'any ShadowError' cannot conform to Error"

Error is a protocol and one is able to do this... let x: Result<Void, Error> = .success(()) ShadowError conforms to Error and is also a protocol yet one is not able to do this... protocol ...
Oliver Pearmain's user avatar
1 vote
1 answer
29 views

Mutability of a class after conforming to protocol is in question

I was trying to implement a Networking Module for my personal project and I was following TDD. When I am writing the test cases I came across a compile error and I was not able to map the error with ...
nath's user avatar
  • 2,848
1 vote
1 answer
194 views

Array of protocols using type erasure cannot conform to Hashable or Equatable protocols

I'm running into an issue wherein the pattern I am attempting to implement does not play nicely with SwiftUI statefulness and refuses to update structs that conform to my TestProtocol when they are in ...
Alexander's user avatar
0 votes
0 answers
43 views

How to use smb protocol with Sensetalk

Read a file with sensetalk smb protocol Is this correct? put "username" into username put "password" into password put "server_name" into serverName put "path/to/...
maseyh's user avatar
  • 11
0 votes
1 answer
233 views

Does not conform to protocol 'UIViewControllerRepresentable'

I'm completing the online apple Xcode Tutorial. At the UIKit tutorial portion, I'm repeatedly getting the same error: "Type 'PageViewController<Page>' does not conform to protocol '...
user20987120's user avatar
0 votes
1 answer
116 views

Optional CaseIterable in swift?

For example: enum Filter { case filter1 case filter2 ... } let allCases: [Filter?] = [.filter1, .filter2, ..., nil] The problem is there are could be a lot of cases and CaseIterable returns [...
Gargo's user avatar
  • 1,297
0 votes
1 answer
155 views

SwiftUI "ForEach" with inconsistent Data type and Closure Type, no compiler error generated? How does inference of type works in this case?

Following code could be compiled and run without warning or message, but how can it work? struct ContentView: View { var lists = ["a", "b"] var body: some View { ...
user605591's user avatar
0 votes
1 answer
125 views

Protocol constraint Equatable in Swift with ReactiveSwift map function

I am using ReactiveSwift. There are two protocols: CommonProtocol and SpecificProtocol. When I use SpecificProtocol in map function there is an error Type 'any SpecificProtocol' cannot conform to '...
Riddik's user avatar
  • 2,785
-1 votes
2 answers
69 views

A protocol, class protocol, both of them or

scratching my head over this, I'm creating a framework to be used by others and need to define tons of delegates, something in the line of: protocol MyDelegate { ... } so I can then have it as: var ...
user3740240's user avatar
0 votes
0 answers
22 views

What might be a secure way to transfer files outside LAN?

I am a complete novice developing an application which deals with securely transferring files from one peer to another without storing the said file anywhere. Any suggestions on how to do it? I tried ...
Blitz's user avatar
  • 1
1 vote
1 answer
275 views

Retrooper packetevents, is there a documentation of the version 2.0?

I am searching for a documentation of the PacketEvents API. So that I can lookup secific problems, and directly learn good practice / inteded use. Things I found: packetevents-example Somewhat ...
Dude2345's user avatar
0 votes
0 answers
74 views

Electron: load and display local image successfully, but can not copy and paste the image

In electron render process: load and display image on the app, success: <img src="file:///Users/test/1.png"> The Problem: When I tried to select, copy and paste the image, failed! So ...
hijack's user avatar
  • 401
1 vote
1 answer
56 views

Implementing a solar charger protocol - how to deal with register definitions [closed]

I would like to write a library that implements the serial (uart) communication protocol for a well known brand of solar chargers. Luckily the protocol specification is publicly available so I don't ...
PaulSimon's user avatar
0 votes
0 answers
35 views

What protocol do scanners user to send image data over USB?

I'm in the process of designing a piece of custom scanning hardware, and I'm wondering how traditional scanners (flatbed, film, etc), transfer image data over USB. I'm wondering if there is a ...
flimsy's user avatar
  • 204
0 votes
0 answers
76 views

Error: library not found for -lsrt.1.5.2 (SRT Library)

I'm facing an issue while building Secure Reliable Transport (SRT) library using Xcode. Here is the library link: Secure Reliable Transport (SRT) Protoaol I have followed all necessary setups to ...
NøBi Mac's user avatar
  • 505