Questions tagged [definitions]

84 questions
4
votes
1 answer

In Delphi, Problem using Type definitions across units

Using Delphi 2010... I have a set of binary properties I want to group together. I have defined it as such... type TTableAttributeType = ( tabROOT = 1, tabONLINE = 2, tabPARTITIONED = 3, tabCOMPRESSED = 4, …
George S
  • 43
  • 2
4
votes
1 answer

"Good" practices to implement declare() function

Introduction Currently I'm being curious about implementation of declare() function, that should allow me to declare javascript classes with usage of prototypal inheritance (or a sort of it, because javascript using different object model, not…
BlitZ
  • 12,038
  • 3
  • 49
  • 68
3
votes
6 answers

Define variables in c++

I am always confused with the concept "define variable." What does define mean? For example: void main { map *infoMap; if() { //some check here,if it passes this check, then new infoMap } infoMap = new infoMap; } So does map
user707549
3
votes
1 answer

Creating an extendible model using Swagger/ OpenAPI

In my API i would like to have a simple model for my collection and a more elaborate model for my individual resource. For example: a GET request on /libraries should return BaseLibrary: type: object properties: library_id: …
PdevG
  • 3,427
  • 15
  • 30
3
votes
0 answers

Json-Schema: Can you use {{variable}} in $ref definitions?

I'll keep this short and sweet. I'm trying to use jdorn's JSON editor through the use of the Extended Choice Plugin on Jenkins to create a node selection tool for code deployments. The part I'm stuck on is getting the node choices to be dependent on…
3
votes
1 answer

Does the original string count as a substring of itself?

This is a strange question but is the whole string considered a substring of itself? Ie: String "cheesecake" has a substring "cheesecake".
Aeolys
  • 31
  • 2
3
votes
1 answer

What is the difference between optimality and efficiency?

Could someone differentiate between optimality and efficiency? Provide a definition for each term if possible.
Barry Michael Doyle
  • 9,333
  • 30
  • 83
  • 143
3
votes
2 answers

SDL_GetTicks() Definition Missing. (SDL 2.0.3)

I'm having trouble compiling a program I wrote a while ago (when I used SDL 1.2). There are a number of definitions missing: SDL_GetTicks() SDL_FillRect() SDL_SetVideoMode() SDL_DisplayFormatAlpha() and many many more. These are the headers that…
Ryan Jensen
  • 207
  • 1
  • 9
3
votes
4 answers

Java definitions: Label, Token

I wrote this: (fitness>g.fitness) ? return 1 : return -1; and received the following error: Syntax error on tokens, label expected instead. Can anyone explain what tokens and labels are in this context? Edit: Thanks for fixing my code, but could…
Meir
  • 12,285
  • 19
  • 58
  • 70
3
votes
3 answers

Overloading a function using identical definitions in C++

I am aware of the process of function overloading in C++ through the use of differing parameters and definitions. However if I have two functions which are identical apart from their parameters is there a way to only have this definition once. The…
3
votes
1 answer

Puppet: how do namespaces work with virtual resources, classes and definitions?

New puppet user, trying to wrap my head around name spaces and so forth. I am currently working on a module called user. It has a unixuser class and a unixgroup class in unixuser.pp and unixgroup.pp. I'll limit my question to the creation of…
drumfire
  • 943
  • 7
  • 19
2
votes
1 answer

How does Google define "day" for Google API quotas?

Google Cloud Translate API, for example, sets a default quota of 2 million characters "per day". However, I can't find their definition of "day" anywhere. Is this calendar-based, or is it a sliding time interval? (Observation suggests that it is a…
Marty Hirsch
  • 661
  • 6
  • 7
2
votes
1 answer

OpenAPI reuse part of definition without defining a new one

Suppose that I have this definition in a yaml OpenApi definition definitions: User: description: "User" type: "object" properties: firstname: type: "string" lastname: type: "string" password: …
2
votes
1 answer

Is there a way to put local functions in any order in Lua?

One thing that seems to set Lua apart from the languages I'm used to is that it's important what order you put variable and function declarations in. In a function, you can't access local variables that were declared after the function. For…
Kyle Delaney
  • 11,616
  • 6
  • 39
  • 66
2
votes
3 answers

Hack Javascript Definitions for "undefined" objects

so I'm not entirely sure this is possible, but I am curious if it is possible to hack the definitions of "undefined" objects. Primarily, the purpose of this is to prevent errors from launching when doing a .replace on an object that is undefined. …
Tronhammer
  • 45
  • 5