Questions tagged [semantics]

The study of meaning as it applies to programming languages

Semantics is the study of meaning. In computer programming, semantics refers to the relationships between symbols in a programming language, and how those symbols are combined and manipulated to produce a computing result.

Useful links

1728 questions
0
votes
4 answers

C by K&R - numeric value of a relational or logical expression

In section 2.6 "Relational and Logical Operators" on page 42 in "The C Programming Language" 2nd by K&R, the authors said: By definition, the numeric value of a relational or logical expression is 1 if the relation is true, and 0 if the relation…
user9305758
0
votes
1 answer

How to create a Template using TDE in MarkLogic to generate Triples

I need to create a Template using TDE in MarkLogic. And this template will generate triples from the exiting XML documents. Where the subject is the URI of the doc, the predicate is the name of the element and the Object is the value of the element.
Anuj Gupta
  • 31
  • 4
0
votes
0 answers

Determining the right SEM value for one of feature based grammar rules

I'm writing up a semantic fcfg file of my own and I have this grammar rule: NP -> DT NNP NNP NNP I wanted to write this particular rule with semantic extenstion so something like this: NP[NUM=?n,SEM = ] -> DT[NUM=?n,SEM=?det]…
0
votes
1 answer

HTML (5ish): How to semantically interpose a gallery in an article

Typical article: I want to display an article that is primarily text with a few embedded images or media files. Typical Gallery: I also want to display an image gallery that is (loosely) related to the topic of the article. For the purpose of this…
Sy Moen
  • 243
  • 1
  • 2
  • 8
0
votes
1 answer

const volatile doubled in production code

I am currently working with production code in ANSI-C, which is partly getting generated by a very intransparent toolchain (so I could not find any clear information about it). Somewhere in the generated code the following happens: extern const…
R. Joiny
  • 309
  • 7
  • 17
0
votes
1 answer

Attributes of semantic rules

I've these rules: S -> I#A I -> a I -> b A -> aA A -> bA A -> EPSILON This grammar produces a sequence of a's and b's. They are preceded by a single a (or a single b) and an #. I need to define semantic rules which gives me the number of a's or b's…
user9039337
0
votes
2 answers

Using class methods without `@classmethod`

Consider: class cla(object): def __init__(self,val): self.val = val def met(self): return self.val + 1 Then cla.met(cla(1)) returns 2. Since I don't need an instance of class cla to use method met, does this mean it…
l7ll7
  • 1,309
  • 1
  • 10
  • 20
0
votes
3 answers

Correct semantic for listing content in (X)HTML

I would like to know what is the correct way (semantically) to build a page for listing something like users, products, articles, etc. What is semantically correct? Listing items using the ul/ol tags or div tags? The purpose of the page is to list…
Hugo Durães
  • 55
  • 1
  • 2
  • 7
0
votes
1 answer

Marklogic : associate schema template with semantic

I have created a template as following declareUpdate(); var tde = require("/MarkLogic/tde.xqy"); var LocationView = xdmp.toJSON( { "template":{ "rows":[ { "schemaName":"Location", "viewName":"Location", …
0
votes
1 answer

Using Custom Word2Vec to find semantic similarity between technical questions?

We can get the similarity of two sentences like "The boy is playing football" and "A kid is playing football" using Google news vectors by applying "SIF Embeddings". I would like to get the similarity for two sentences which are technical like "what…
Poorna Prudhvi
  • 711
  • 7
  • 22
0
votes
3 answers

What does mean by semantic?

I am searching the term 'Semantic Query Optimization'. But can't find any specific answer. Can you tell me what actually Semantic means?
Abhijit Mondal Abhi
  • 1,364
  • 4
  • 15
  • 34
0
votes
2 answers

Javascript toggle with multiple buttons without using class or id

Hi i wrote some code to show and hide a paragraph in a card using Javascript. This works perfectly fine on the first card, but it doesn't work on any of the other cards. This shouldn't be very difficult, but it's a school project and there are a few…
Summer
  • 13
  • 4
0
votes
2 answers

Nested divs and CSS semantics

I have a feeling that this is a subjective question, but perhaps there's something somewhere on the interwebs that has attempted to standardize this already and I'm just not aware of it (but someone else who will post here is). Just a note: Please…
Demian Brecht
  • 21,135
  • 5
  • 42
  • 46
0
votes
1 answer

JS Lint, how semantic does Javascript have to be?

So JSLint is a nifty tool which promotes semantics and syntax. Most JS that I get from client's sites into JS Lint usually fails though they squeak by and most of the sites functionality still works. I try to sell them on fixing their Javascript but…
ectype
  • 14,865
  • 5
  • 21
  • 28