semantic

What is the name of this Checksum Algorithm?

Does anyone know the formal / official name of the checksum algorithm used in the following functions? function Checksum($number, $encode = true) { if ($encode === true) { $result = 0; $number = str_split($number, 1); foreach ($number as $value) { $result = ($result + ord($value) - ...

Is there a way to extracting semantic informations from PDF? (converting PDF to pure XHTML)

Hi. I'm finding a way to extract semantic structural informations (like title, heading, paragraph or lists) from PDF. Because I want to get a pure structural data from PDF. Finally, I want to create an pure XHTML from the PDF. With only structural informations. No design or layout. I know, PDF can be created without any structural info...

Any gotchas in copy ctor and assignment operator having slightly different semantics?

Please look at the following code and tell me if it's going to cause problems in the future, and if yes, how to avoid them. class Note { int id; std::string text; public: // ... some ctors here... Note(const Note& other) : id(other.id), text(other.text) {} void operator=(const Note& other) // returns void: no chaining ...

emacs semantic/ECB namespace-struct C++ confusion

hi I'm trying to setup ECB to work with C++ sources. seemingly, semantic or ECB has problem determining whenever a function declarant with explicit namespace, namespace:: function , is really in the namespace. instead it parses it as struct member function. Moreover, typedef is parsed as function prototypes. What should I do to fix it...

Looking for a database of n-grams taken from wikipedia

I am effectively trying to solve the same problem as this question: http://stackoverflow.com/questions/610399/finding-related-words-specifically-physical-objects-to-a-specific-word minus the requirement that words represent physical objects. The answers and edited question seem to indicate that a good start is building a list of frequ...

Conceptual data modeling: Is RDF the right tool? Other solutions?

I'm planning a system that combines various data sources and lets users do simple queries on these. A part of the system needs to act as an abstraction layer that knows all connected data sources: the user shouldn't [need to] know about the underlying data "providers". A data provider could be anything: a relational DBMS, a bug tracking...

How do I figure out the subject matter of a given web page ? Similar to what Ad Sense does.

I need to figure out what the page content is about. Something like what google adsense does . For example, If i have a web page about dogs , I need to figure out that page is about ( third party sites ) dogs so i can suggest dog walking services . Can i consult an google database or something similar . ...

Are the following two statements semantically same?

Are the following two statements semantically same? #1 person p("Rahul", 20); #2 person const &p = person("Rahul", 20); EDIT: Sorry, I meant to ask whether the following two are semantically same: #1 person const p("Rahul", 20); #2 person const &p = person("Rahul", 20); ...

What is the best way to semanticly structure a FAQ ?

I am wondering how I should structure a FAQ to keep semantic meaning of the content. I think of using defintion list, as the close relation between a question and an anwser may have together. What are your thoughts about this ? ...

Are RDF triple Stores, suitable for everyday programming?

I like these a lot, and would like to use them for everything. Why would doing RDF triple stores for everyday programming (Entities/Tables), such as Contacts, Customers, Company etc. be a bad idea. Are there short falls in the technology that I have not come across. I was concerned about retrieving data, but I think this is covered wit...

Constructing human readable sentences based on a survey

The following is a survey given to course attendees to assess an instructor at the end of the course. Communication Skills 1. The instructor communicated course material clearly and accurately. Yes No 2. The instructor explained course objectives and learning outcomes. Yes No 3. In the event of not understanding course materials the ins...

Is there any killer application for Ontology/semantics/OWL/RDF yet?

Hi Guys, I got interested in semantic technologies after reading a lot of books, blogs and articles on the net saying that it would make data machine-understandable, allow intelligent agents make great reasoning, automated & dynamic service composition etc.. I am still reading the same stuff from 2 years. The number of articles/blogs/s...

Help with Boost Grammar

I have been using the following win32 console code to try to parse a B Machine Grammar embedded within C++ using Boost Spirit grammar template. I am a relatively new Boost user. The code compiles, but when I run the .exe file produced by VC++2008, the program partially parses the input file. I believe the problem is with my grammar defin...

"Strictly positive" in Agda

I'm trying to encode some denotational semantics into Agda based on a program I wrote in Haskell. data Value = FunVal (Value -> Value) | PriVal Int | ConVal Id [Value] | Error String In Agda, the direct translation would be; data Value : Set where FunVal : (Value -> Value) -> Value PriVal : ℕ...

Semantic search in P2P networks

hi, we are doing a project that involves semantic search in P2P networks. Basically we want to do a file searching/sharing mechanism that semantically relates files based on the data. we are using RDF to represent the files' metadata. We are stuck with the database part. every peer has a local repository that it uses to store metadata. h...

Emacs, Cedet and semantic

Hello everyone, I've configured CEDET for emacs following Alex article (great!!). Now, the questions: 1 - i've generated GTAGS with Gnu Global in my /usr/include, how can i check if semantic is using GTAGS? 2 - can I keep my GTAGS in another directory and instruct semantic to use that dir?? 3 - In c/c++ sources, completion on inclu...

C#: Semantics for generics?

I have a list: private readonly IList<IList<GameObjectController>> removeTargets; private readonly IList<IList<GameObjectController>> addTargets; PickUp inherits from GameObjectController. But when I try this: public IList<PickUp> Inventory // ... gameObjectManager.MoveFromListToWorld(this, user.Model.Inventory); // ... // T...

problem with threads

I want to be done for 10 times, to scan the number and print it again. How can I do that? #include <stdio.h> #include <pthread.h> #include <semaphore.h> sem_t m; int n; void *readnumber(void *arg) { scanf("%d",&n); sem_post(&m); } void *writenumber(void *arg) { //int x =3; //while(x>0) //{ //x ...

Parsing whole project with semantic

I'm searching for a way to parse the whole directory with source code with semantic. Is this possible to do without explicitly opening each file in emacs ? ...

What does "in-place" mean?

Reverse words in a string (words are separated by one or more spaces). Now do it in-place. What does in-place mean? ...