keywords

What is the `name` keyword in JavaScript?

When I typed this apparently innocent snippet of code: values.name gedit highlighted name as a keyword. However, name is not listed by the pages linked to by an answer to a question about reserved keywords. I also did a couple trivial tests in SpiderMonkey, but name seemed to act like an ordinary identifier. A Google search didn't ...

Java producer consumer problem threads

how to implement producer consumer problem with multiple producers and multiple consumers?? how should we create threads?? Give me some overall idea.. Thanks in advance ...

Image depending on the text in Python/Django

Hello, How can I find an image, depending on the text? I have image model with keywords: class Post(models.Model): image = ImageField(_('Image'), blank=True, upload_to='folder') keywords = models.CharField(_('Keywords'), max_length=80) And model which will serve as the search for a suitable image class TextSearch(models.Mod...

Java: Make a method abstract for each extending class

Hi, Is there any keyword or design pattern for doing this? Please check the update public abstract class Root { public abstract void foo(); } public abstract class SubClass extends Root { public void foo() { // Do something //---------------- Update -------------------// // This method contains im...

Accessing a namespace containing .base in its name from F#

As the title says, I'm trying to use a class declared in a namespace which contains "base" in its name. Think of a situation like the following: open Foo.base.Bar In C# I'd just use @ before base but F# seems to ignore that and to think that @ is the infix operator used for list concatenation. Since the namespace belongs to a third-par...

inline vs __inline vs __inline__ vs __forceinline?

What are the differences between these four inline (key)words? inline, __inline, __inline__, __forceinline. ...

C# internal VS VBNET Friend

To this SO question: What is the C# equivalent of friend?, I would personally have answered "internal", just like Ja did among the answers! However, Jon Skeet says that there is no direct equivalence of VB Friend in C#. If Jon Skeet says so, I won't be the one telling otherwise! ;P I'm wondering how can the keyword internal (C#) not be ...

Keyword Implementation in C#

Hi All Is there a way, and how would I go about implementing my own keyword such as in, and as (etc), to be used in my code? Here is what I had in mind. I want to (just for my own personal reasons, I guess) add a few keywords of my own, one of which would be the "was" keyword: if(Control was Clicked) { // etc etc } ...

Use the keyword class as a variable name in C++

I am having trouble writing C++ code that uses a header file designed for a C file. In particular, the header file used a variable name called class: int BPY_class_validate(const char *class_type, PyObject *class, PyObject *base_class, BPY_class_attr_check* class_attrs, PyObject **py_class_attrs); This works in C as class isn't taken...

Security implications of Clojure keyword creation from user data?

Suppose that I take a user-supplied string, userstring, and call (keyword userstring) on it. Are there any security concerns about doing this? And if so, what would be the best way to mitigate them? ...

How can I make keyword order more relevant in my search?

In my database, I have a keywords field that stores a comma-delimited list of keywords. For example, a Shrek doll might have the following keywords: ogre, green, plush, hero, boys' toys A "Beanie Baby" doll ( that happens to be an ogre ) might have: beanie baby, kids toys, beanbag toys, soft, infant, ogre (That's a completely cont...

Are there libraries or techniques for collecting and weighing keywords from a block of text?

I have a field in my database that can contain large blocks of text. I need to make this searchable but don't have the ability to use full text searching. Instead, on update, I want my business layer to process the block of text and extract keywords from it which I can save as searchable metadata. Ideally, these keywords could then be...

highlighting words at the end of a word

i'm not sure how i could have phrased the title better, but my issue is that the highlight function doesn't highlight the search keywords which are at the end of the word. for example, if the search keyword is 'self', it will highlight 'self' or 'self-lessness' or 'Self' [with capital S] but it will not highlight the self of 'yourself' o...

Is there any problem with namespacing clojure keywords in a non-existent namespace?

Should I feel wary about creating clojure keywords which have non-existent namespaces? An example would be :foo/bar, where namespace foo doesn't actually exist. This seems to be possible because these keywords behave like literals. I couldn't find any problems doing this in the REPL, but I'm concerned about possible problems with A...

Using special characters as keywords in latex listings package

Hi, I am using the listings package for latex. I am using the SQL language definition and am adding some new keywords that I need, using morekeywords=. I have trouble defining some special characters as keywords, for example, I need [], <>, &, and -> to be considered as keywords and use the keyword style. I have tried adding these ...

kCGImagePropertyIPTCKeywords problem

Hi, I am developing an iPhone app in which I want to set the keywords for an image using ImageIO.framework. Following is the code snippet that I use for setting the keywords. But, it does not apply the keywords to image meta data. Could some one help me out in finding the problem here. NSMutableDictionary *iptcDictionary = [NSDictiona...

When and how should independent hierarchies be used in clojure?

Clojure's system for creating an ad hoc hierarchy of keywords is familiar to most people who have spent a bit of time with the language. For example, most demos and presentations of the language include examples such as (derive ::child ::parent) and they go on to show how this can be used for multi-method dispatch. In all of the sli...

Dynamically adding meta tags using php

Hi, In my site I have a list of categories and I have to put meta keywords and description for them.I have a single page where I will retrieve the categories from the database. Can anyone tell me how to make this much simpler to put meta tags for all the categories. Regards, Rekha http://hiox.org ...

Named keywords in decorators?

I've been playing around in depth with attempting to write my own version of a memoizing decorator before I go looking at other people's code. It's more of an exercise in fun, honestly. However, in the course of playing around I've found I can't do something I want with decorators. def addValue( func, val ): def add( x ): ...

MySQL Reserved Keyword

I'm having an issue with this query... SELECT account_id FROM `clock` WHERE account_id = '.$accountId.' AND `clock`.`in` > 0 AND `clock`.`out` == 0 The only thing I can think of is that in/out are keywords.... but with backticks it should work fine.... right? ...