It seems that you are adding a local variable to your global procTable list. This happens in your interpretiere_pipeline function at line 83. pDesk is a local variable, and the C compiler puts those in the stack. When the current function returns, that memory frame will get deallocated and occupied...
class Foo; end is roughly the same as Foo = Class.new, but there are some key differences. All of these also hold true for module Bar; end vs. Bar = Module.new. class is a keyword whereas Class is simply a constant name like any other. Class.new allows creating anonymous (unnamed)...
rdf,sparql,semantics,owl,ontology
That's because you are querying the TBOX and ?p in your query translates to the bnode representing the anonymous class restriction. You are not binding to instances in the query, but the value/class used for the owl:allValuesFrom restriction. So http://purl.oclc.org/NET/ssnx/qu/dim#Temperature would be the result of your query. Had you wanted...
sparql,jena,semantics,ontology,rdfs
actually, this is a great use of D2RQ mapping language, and D2RQ server. Go install D2RQ, then start it up with a connection to your relational database. Then generate a mapping file using their generator that comes with the software. Then you'll have a mapping file -- edit that and...
html,html5,structure,semantics
The <h1> can be after other headlines, if the document structure need it. In this case I don't think you need to have there <h2>Menu</h2> - everyone see that the block of links is menu. If not, try to work on UX. Remember that no automatic code checker/validator can't tell...
You are using the ternary operator which checks for the truthiness of the expression before the ?. The truthiness of values is described in the Booleans section: When converting to boolean, the following values are considered FALSE: the boolean FALSE itself the integer 0 (zero) the float 0.0 (zero) the...
php,semantics,wiki,semantic-web,semantic-mediawiki
Well, the Wikipedia article mentioned in the comments is quite theoretic. It starts with terms such as knowledge that need a few explanations. I take a deep breath and try to explain a few things... 1. What exactly is a Semantic Wiki? To make things simple, you probably know what...
html,html5,datetime,time,semantics
There does not appear to be a way to combine specific date strings or time strings with a duration string in a single <time> element. The spec suggests using two <time> elements instead: Code Example: The time element can be used to encode dates, for example in microformats. The following...
haskell,recursion,polymorphism,semantics
In System F (AKA λ2), all inhabitants of ∀α.α→α→α are indeed λ-equal to K or K*. First, if M : ∀α.α→α→α then it has normal form N (since System F is normalizing) and by subject reduction theorem (see Barendregt: Lambda calculi with types) also N : ∀α.α→α→α. Let's examine how...
You'll get the link errors (not compilation errors) that you see if you, for instance, forget to add "Text.cpp" to your project so it doesn't get compiled and linked. There are two errors in the code - one is in the copy constructor, and one is in the assignment operator....
Of course ... It calls the newcard.save().then function - thanks @rightfold - which is in the Angular.js promises api. Not immediately obvious out of context of that api which BTW is nicely explained here.
Please don't. This is horribly unreadable. And it starts innocently enough, soon other "clever" developers would come and invent more "clever" ways of using this && operator to avoid those "horrible" ifs. Please... Don't. Functionally, yes, they will work the same....
To use SPARQL, you would need to represent this data as triples. Someone who knows ontologies better would come up with better IRIs, but something like (as represented inside MarkLogic): <triple> <subject>http://marklogic.com/scope#cat</subject> <predicate>http://marklogic.com/term</predicate> <object>cat</object> </triple> <triple> <subject>http://marklogic.com/scope#cat</subject> <predicate>http://marklogic.com/synonym</predicate>...
I think you mean that the second fails and the first does not. When you have int a=5 you are declaring a new variable a. That variable is only valid inside the scope in which it is declared, in both these cases that means inside the if block. When you...
If you apply a link to the <tr> element, clicking anywhere on the row will send the user to the link. This includes space that isn't a table cell, like the cell borders. The same applies to the <td> element. Putting it inside links the text only, putting it on...
<blockquote> doesn't demand a cite, it's optional. Don't overthink it. <blockquote> without cite is what you're looking for.
swift,methods,properties,semantics
The only downside is that default property values are set every time an instance of the object is created, even if a property is subsequently overwritten in one or more initializers. This probably isn't an issue if you're just assigning default numeric values, but if there's a class that is...
sparql,semantics,semantic-web,virtuoso
The query you've shown us might not be the same as the query you're actually running. First, the fact that the error message says "line 1" makes me wonder whether you've actually got the query run all onto one line. That can make it easy to get typo problems. When...
IMHO: Yes. <section> should contain content that may have its own header and is semantically connected with each other. Preview of the content (e.g. title and one paragraph of article on articles list) meets this definition. No, use <div> instead. <section> is absolutely not a generic container element. See more...
If I understand you correctly, you want the url to be a link but also display as a url. To do this put the url in the a tag twice, like so: This can then be style as desired by the destination page. <style> a { color: blue; text-decoration: underline;...
rdf,semantics,owl,ontology,protege
If i understand your question correctly, you're essentially asking if you should "duplicate" existing classes and properties from other ontologies into your own one. The clear answer is: no. The semantic web / linked data lives of the re-use of existing vocabularies, so [...] it's best to not re-invent any...
html,html5,seo,semantics,nofollow
I mention this now as a webmaster for one of these websites actually approached me saying they were penalised by Google due to invalid links through to their site. First off, that webmaster will have no evidence to show that it was because of you linking to their site....
According to me Yes using figure within your code to full fill the purpose is correct... According to w3c:- The element(figure) can thus be used to annotate illustrations, diagrams, photos, code listings, etc, that are referred to from the main content...... Go to HTML5 validation service provider and enter the...
Passing your non-semantic snippet to the W3 HTML Validator reveals that it is valid HTML, apart from the missing title tag, which is not your doing. As for semantic validity, this is a really opinion-based question, but I'll try to explain the reason behind my opinions. I never even really...
sparql,semantics,ontology,dbpedia
Have a look at the N3/TTL serialization of the data for Mumbai. Note that the foaf:name value has a language tag: foaf:name "Mumbai"@en. You need to use "Mumbai"@en, with the language tag, in the query. Additionally, doing dbo:Place 'Mumbai' doesn't make any sense. You might instead want to ask for...
Well, first you have to ask "why have private fields at all?" Private fields are primarily for encapsulation: a user of a a class shouldn't have to know the internals of that class' implementation. In fact, they shouldn't know, because if they relied on those specifics, then the implementer would...
rdf,semantics,semantic-web,owl
Dave is father of Mary and Mary sister of Jack. I want reason that Dave have two childs Jack and Mary. If you ignore the possibility of siblings having different parents (e.g., a parent in common and a different parent), then you can do this with subproperty chains. If...
logic,semantics,semantic-web,first-order-logic
To state that an object has a certain property you would use a single place predicate. For example, to state that x is a film you could write Film(x). If you want to attribute some value to an object you can use two (or more) place predicate. Using your example...
Choose what you love! See this : http://gabrieleromanato.name/how-to-mark-up-chats-and-conversations-in-html5/ Sure you can use odd , even css selectors to style it floating left and right like whatsapp style....
I'd recommend the small element. See http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-small-element
Is there any reason inherent to the design of the VHDL language, why the following can not be done? process (clk) variable b : std_logic_vector(15 downto 0); -- This would be nice, but is not permitted: signal c : std_logic_vector(15 downto 0); begin (Declare a signal in a process.)...
javascript,css,if-statement,equals,semantics
The problem is really simple. I came upon it when I was coding a snake in javascript. When you want to test where the ball is located don't use ball.style.left but ball.offsetLeft. In the demo you'll notice ball.style.left doesn't return anything while the offsetLeft does. Only use ball.style.left when you...
inheritance,graph,compiler-construction,semantics
Consider the following two classes: class A extends B {} class B extends A {} In some languages, most notably C++, the above would be illegal because you can't refer to B before its declaration and you can't inherit from a class that has only been forward-declared. So in such...
java,oop,struts2,programming-languages,semantics
"against" is not used here as "in oposition" but rather as "supported by", "backed up by", "provided by", "based on". One of the accepted meanings of the word "against" (Oxford dictionary) is In or into physical contact with (something), typically so as to be supported by or collide with it...
android,android-edittext,semantics,android-button,material-design
You can use both approach but if you will use Linear layout that will be good. For material design you can follow below link: https://github.com/navasmdc/MaterialDesignLibrary#flat-button https://github.com/keithellis/MaterialWidget https://github.com/tekinarslan/AndroidMaterialDesignToolbar https://github.com/madcyph3r/AdvancedMaterialDrawer I hope, It will help....
You can read in the csv file using read.table, with space as a separator. This will give you a data frame with a number of columns. However, you can throw away every column except for the first one, since the first one contains all the information you need to build...
In order to use any annotation property you wish to use, the snippet above must be modified this way: OWLAnnotation Movie_Name = factory.getOWLAnnotation( factory.getOWLAnnotationProperty(IRI.create("full iri for your property here")), lbl); OWLAxiom axiomAA = factory.getOWLAnnotationAssertionAxiom(Cast.asOWLNamedIndividual().getIRI(), label); manager.applyChange(new AddAxiom(ontology, axiom)); ...
rdf,sparql,semantics,dotnetrdf
In fact I tried to implement the IGraph interface in way I defined a data structure for passing the triples , but it seems that the only way to apply sparql engine is by storing these triples in a triple store You can put any IGraph implementation in the...
sparql,semantics,semantic-web,protege4
This is a bit complicated, but if you look into the ontology everything that is defined as a :MealCourse is an owl:equivalentClass, so you need to first find all owl:equivalentClass and then if you look into the result you will see that they are made of owl:intersectionOf parts. Then you...
html,html5,validation,semantics
Pasting the following code in the W3 HTML Validator yields two errors <!DOCTYPE html> <html> <head> <title>Test</title> </head> <body> <label for="test1"> <h3>Label Heading</h3> <p>Label Description</p> </label> <input id="test1" name="test" type="radio"/> </body> </html> Element h3 not allowed as child of element label in this context. Element p not allowed as child...
All options are correct in HTML5: http://www.w3.org/TR/html-markup/a.html If you want to cover different angles of the question, check a bit accessibility (people with disabilities) guidelines: http://www.w3.org/TR/WCAG20-TECHS/SCR35.html ...
First of all notice that C supports multiline strings, so you already had this problem, just not addressed it. Your parser engine has a state. You have to know whether you're inside a literal string or a C like comment, etc. Store this state for the starting position of each...
c++,c++11,language-lawyer,semantics,undefined-behavior
The paragraph you're quoting refers to pointer arithmetic, not to evaluation of pointers. It states that the only time pointer addition p + i is defined is if (treating subtraction of i as equivalent to addition of -i) p points to an element of an array object or one past...
variables,naming-conventions,semantics
According to resources that have turned into dust -- this tradition goes back to the early version of FORTRAN where certain variables were either integer or real, depending on their starting letter. i was the first integer, and so it made sense for loops. This is also explains the old...
TL,DR Check about TF*IDF on wiki, then about Cosine similarity. Long Answer (with examples) What is TF*IDF TF*IDF stand for Term Frequency * Inverse Document Frequency. It's one the way to method to create good tag for a document inside a large group. The idea behind it is the extract...
Probably it grabs the newline character, so in order for your code to work you should trim the choices variable. Alternatively if your dict keys would be ints instead of strings, you could just perform casting operation. EDIT: your last comment proves my point because of the [49, 13] numbers...
A function that doesn't have a return statement actually returns None. print 'Current hand: ', display_hand(hand) The line above prints "Current hand: ", then executes display_hand(hand) which prints things as a side-effect, then finally prints the return value of the function which is None To prevent this, run display_hand(hand) outside...
python,nltk,semantics,context-free-grammar
There is no subject or VP in the relevant structure. Try writing a rule for and when used to conjoin sentences. What is it? Sentence1 and Sentence2 gets the interpretation <Sentence1> & <Sentence2> I.e., take the meanings of the two sentences and conjoin them with &. In the notation of...
python,python-2.7,python-3.x,exception-handling,semantics
except Exception as e, or except Exception, e (Python 2.x only) means that it catches exceptions of type Exception, and in the except: block, the exception that was raised (the actual object, not the exception class) is bound to the variable e. As for finally, it's a block that always...
methods,properties,semantics,swift
It seems to me that it's mostly a matter of style: I strongly prefer using properties for just that: properties; meaning simple values that you can get and/or set. I use functions (or methods) when actual work is being done. Maybe something has to be computed or read from disk...
python,logic,semantics,python-3.4
This line is incorrect, as it will always evaluate to true: elif word[0] == 'a' or 'e' or 'i' or 'o' or 'u': What you meant to write was: elif word[0] == 'a' or word[0] == 'e' or word[0] == 'i' or word[0] == 'o' or word[0] == 'u': You...
Every operational semantics is different and the question specifies no context, so I can only guess at the answer. I would parse if b then c; w else skip as if b then {c; w} else skip, that is, the second interpretation from the question. The derivation seems to be...
It's a parameter expansion, it mean if the third argument is null or unset, replace it with what's after :- $ x= $ echo ${x:-1} 1 $ echo $x $ There's also another similar PE that assign the value if the variable is null: $ x= $ echo ${x:=1} 1...
According to the book on Swift, Tuples are useful for temporary groups of related values. They are not suited to the creation of complex data structures. They define "temporary" through the scope of the data: if a piece of data never leaves the scope of a single method, or a...
semantics,context-free-grammar,syntactic-sugar
The grammar is the "comprehensive mathematical formula". :) However, in the current case, it is easy to give an alternate description. Your grammar will generate strings of the form a^nb^m where s^i stands for "repeat the substring s i times", and 2n <= m <= 3n n can also be...
objective-c,copy,semantics,mutable
Short answer Yes. No memory corruption, and no compile error if the iVar is accessible. Same as 1. Long answer Mutable and immutable copy is one of the core concepts found in the Apple's Foundation classes, such as NSString or NSArray. As stated in NSCopying protocol, the class that has...
seo,semantics,shared-hosting,spdy,http2
how about SEO sematics, will it harm my ranking? It won't. are there any better solutions for this problems? It is not a problem. can i use ipv6 to mask the port somehow? No....
nlp,terminology,semantics,semantic-web
These are two separate subject areas but they do overlap in some places. Because documents, regardless of their format are made up of heterogenous syntax and semantics, the goal is to represent information that is understandable to a machine and not just a human being. This is a common goal...
c++,class,methods,const,semantics
It is a matter of your design decision. Constness is intended to be used as a design concept. It is supposed to help you to implement a higher-level concept of what you consider "modifying" and "non-modifying" access. By properly using const on your class methods you can make the property...
java,junit,tdd,semantics,hamcrest
There is a feature called JUnit Theories. @Test and Theory have a different focus on testing: a Test is input-output-related (on some input, expect some output) a Theory is algorithm related, i.e. it makes assertions on the behaviour of the called function, accepting a large set of input parameters (being...
Yes. The header is what it contains and not where it's placed in the structure. http://developers.whatwg.org/sections.html#the-header-element The header element represents a group of introductory or navigational aids. A header element is intended to usually contain the section's heading (an h1–h6 element or an hgroup element), but this is not required....
No, CSS does not affect HTML semantics. There may have been some historic semantic differences between a <ul> and an <ol> besides just what the default numbering is for each type of list item (some claim a <ul> is supposed to represent an unordered set while a <ol> is supposed...
php,html,image,include,semantics
The best way to do this is by checking the user agent that is making the request. This is not a fool proof but you could solve the majority of your use cases with it. Something like this from the PHP docs: <?php echo $_SERVER['HTTP_USER_AGENT'] . "\n\n"; $browser = get_browser(null,...