Questions tagged [contract]

424 questions
1
vote
0 answers

Error in defining contract on struct in Racket

I'm trying to define a contract for a struct which inherits from another struct. #lang racket (require racket/contract racket/contract/parametric) (struct semigroup (op)) (struct monoid (mempty) #:super struct:semigroup) (define (semigroup/c a)…
Charles Langlois
  • 4,198
  • 4
  • 16
  • 25
1
vote
1 answer

contract for function that only cares about return value?

Suppose the following trivial function: (define/contract (foo func) (-> (-> any/c ... any/c) #t) #t) This is trying (and failing) to express the idea "foo takes a processor function. I don't care what arguments the processor requires (that's…
Ben Greenman
  • 1,945
  • 12
  • 22
1
vote
1 answer

Sending tokens from Ethereum ERC 20 smart contract

As the title suggests - is it possible to send tokens from an ERC20 smart contract address, or is this unit not accessible? Practical explanation: A noob misunderstands some instructions and sends some tokens instead to his address to a smart…
belosand
  • 129
  • 3
  • 14
1
vote
1 answer

Calling functions from other contracts solidity

I am trying to create a new instance of the Taker contract from the Maker contract and send some value to it. Then later I would like to send a value back to the Maker contract from the Taker contract maker.change.value(5)(y); However it cannot…
1
vote
1 answer

WCF: How to enforce MessageContractAttribute.IsWrapped=false generation?

In other words: How to change wcf service contract to remove additional "message's" wrapper from soap message (adopt wsdl)? I have created WCF service which contract is: [ServiceContract(Namespace = "http://blabla/", Name =…
Roman Pokrovskij
  • 9,449
  • 21
  • 87
  • 142
1
vote
1 answer

Why is the balance of the ethereum account still zero after I create a token based on the private chain I built?

I used the contract codes available on the ethereum official website,[create your own cryto-currency][1] to create an advanced token on the private chain run in geth console. The version of geth is 1.5.5,and the version of solc is 0.4.8. My steps…
陈明艳
  • 11
  • 1
  • 4
1
vote
1 answer

Scheme contract not violated

First, I apologize for the beginner question. I am an experienced developer, but new to Scheme. I have created a contract requiring a positive integer, but when I provide a real number, the contract is not violated: (define/contract (listofOne n) …
Ben I.
  • 1,065
  • 1
  • 13
  • 29
1
vote
1 answer

Spring cloud contract - integrating with non - spring endpoint

I have a spring webapp that communicates with external service over kafka. IS it possible to somehow test contract between those services?
user3364192
  • 3,783
  • 2
  • 21
  • 30
1
vote
2 answers

Detect Share Contract in UWP

I know it is not possible to share files with other apps in xbox one, but I don't know how to check it? I guess it is using ApiInformation, but how? Notice I know how to check the device family, but I'd like to check the feature instead, so when the…
Alvaro Rivoir
  • 401
  • 3
  • 9
1
vote
1 answer

Duplication of properties in Data contract and BAL

I have a Silverlight Project which passes data using the Data Contract to a WCF service. The WCF method then invokes a BAL class which again has the same properties. Is there any way to avoid this duplication of properties ?
Chakra
  • 2,525
  • 8
  • 43
  • 82
1
vote
0 answers

Setting and Getting multiple argument in a function using solidity

contract KYCCHECK{ function KYCCHECK(){} struct User{ uint id; bool isVerified; string fname; string mname; string lname; string genderValue; string maritalStat; string stat; string identity; } mapping(uint…
1
vote
2 answers

Contract Testing with provider / producer code that we do not own (third party)

I have a question around testing! As of now, I'm in a unique situation where the software I am writing is going out to a third party vendor and storing some data. In this situation, writing a test to confirm that that data is posted successfully…
Drew L. Facchiano
  • 283
  • 3
  • 5
  • 12
1
vote
2 answers

What is the contract of a function or variable in TypeScript

I am a newbie at TypeScript and after installing it successfully on my machine, I came across the sentence "Type annotations in TypeScript are lightweight ways to record the intended contract of the function or variable" in TypeScript's official…
Aditya
  • 1,172
  • 11
  • 32
1
vote
2 answers

Accessing class private members from another class

I'm new to programming, and I'm starting with Java and Android. I want to create a database, so I've followed the offical documentation: https://developer.android.com/training/basics/data-storage/databases.html My problem comes when, on the Contract…
Fran M.
  • 79
  • 5
1
vote
1 answer

Passing data into a callback, is data guaranteed to be received?

my question is: having a piece of code like that (communication via callback contract) private void BroadcastMessage(DataEventArgs e) { DataEventHandler temp = DataEvent; if (temp != null) { foreach (DataEventHandler handler in…
Tobiasz
  • 1,059
  • 1
  • 12
  • 29