keywords

`final` keyword equivalent for variables in Python?

I couldn't find documentation on an equivalent of Java's final in Python, is there such a thing? I'm creating a snapshot of an object (used for restoration if anything fails); once this backup variable is assigned, it should not be modified -- a final-like feature in Python would be nice for this. ...

How does const after a function optimize the program?

I've seen some methods like this: void SomeClass::someMethod() const; What does this const declaration do, and how can it help optimize a program? Edit I see that the first part of this question has been asked before... BUT, it still doesn't answer the second part: how would this optimize the program? ...

C# : 'is' keyword and checking for Not

This is a silly question, but you can use this code to check if something is a particular type... if (child is IContainer) { //.... Is there a more elegant way to check for the "NOT" instance? if (!(child is IContainer)) { //A little ugly... silly, yes I know... //these don't work :) if (child !is IContainer) { if (child isnt IConta...

How do you prevent file confusion if version-control keywords are forbidden?

At least two brilliant programmers, Linus Torvalds and Guido von Rossum, disparage the practice of putting keywords into a file that expand to show the version number, last author, etc. I know how keyword differences clutter up diffs. One of the reasons I like SlickEdit's DiffZilla is because it can be set to skip leading comments. ...

Cocoa control for keywords/tags

I want to build a keyword/tag feature for my Cocoa application. Is there a tutorial or example of how a control that sets keywords/tags works? I want it to look something like the Keywords window in iPhoto that you get from Window->Show Keywords. ...

How do I use global revision number keyword with TortoiseSVN?

In CVS you can use keywords in your code that are expanded when checking the files out. I'd like to display the global revision as CVS has with the $GlobalRev$ keyword. Subversion has the $Rev$ command but it only shows the latest revision that the file was changed. I know there is a svnversion command that has as of right now no docume...

wxWidgets using the 'new' keyword

For wxWidgets, why do you need to say: MyFrame *frame = new MyFrame instead of: MyFrame frame; What's the difference between the two? The second one is nicer to read and easier to use but all examples use the first so I wondered what the reason is. Just to clarify, I know the second version doesn't work, but I'm wondering if there's...

Which keyword of your language would you like to get rid of?

Programming languages vary a lot in the syntax they use. The syntax being a bunch of keywords is what we have to deal with in every language. But from the gut feeling not all of these keywords seem to be wisely chosen. One reason might be that a word is a keyword that you would want to use often in your code but you are not allowed to us...

.NET: Common programming-keywords dictionary

On episode #162 of Hanselminutes they were talking about PowerShell, but more importantly around 04:50 they mentioned that PowerShell used something called The Common Engineering Criteria to have a standard on which words to use when developing new modules for it. I cannot find any concrete dictionary on recommended words through this p...

What are considered repeated "words" in meta keywords tags?

I realize that keywords and descriptions are old-school SEO techniques and many search engines ignore them. However, it seems like it's good practice to still include them in your HTML pages. One of the best practices I've read concern not repeating keywords in the header tags. My question is then, what exactly is a repeat? For instanc...

How does a website highlight search terms you used in the search engine?

I've seen some websites highlight the search engine keywords you used, to reach the page. (such as the keywords you typed in the Google search listing) How does it know what keywords you typed in the search engine? Does it examine the referrer HTTP header or something? Any available scripts that can do this? It might be server-side or J...

How to set author name for subversion when i'm using svn:keywords

i want to set my full name (or a name choosed by me) to appears in the $Id$ area on commit and not my nickname. There is a way to do it? Thanks in advance , Sirakov P.S. OS: Ubuntu 8.10 ...

How to escape SQL keywords in JPAQL

Hi, I would like to have an entity named "GROUP" in my JPA setup. Now I get problems when I try to perform JPA queries, like "select count(group_.id) from Group group_". JPA thinks this is a misplaced GROUP BY attempt and complains. Is there a way I can escape "Group", or do I have to rename my table? Thx! ...

using ref with class C#

I want to give a certain linked list to a class I am making. I want the class to write into that list (eg by .addLast()). Should I use the ref keyword for that? I am somewhat puzzled on where to use the ref and out keywords in C#, as all classes are allocated dynamically on the heap and we actually use pointers for most operations. Of ...

Finding trending topics from a stream of data

Finding single word trend is simple you can chunk each word of the data stream and do a count and limit it by last 24 hrs or 48 hrs. I'm not sure how to find trends of 2 word or 3 word combination? Any help is apprciated ...

C# - new keyword in method signature

While performing a refactoring, I ended up creating a method like the example below. The datatype has been changed for simplicity's sake. I previous had an assignment statement like this: MyObject myVar = new MyObject(); It was refactored to this by accident: private static new MyObject CreateSomething() { return new MyObject{"Som...

keyword search volumn and google pagerank

how do I find a keyword's search volume/popularity? how do I find a site's pagerank? Is google API one way to do it? are there other ways? ...

creating keywords dynamically from mysql using php

Hi, My structure: in each category there are texts. These texts are entries of its own. So, table 'category' and table 'texts'. There are about 90 texts in every category, each text is about 300 characters. What i want to do is to make meta tags (keywords) for the categories. How to> get all relevant 'texts' and rank all words and take...

Is there any reason to use the 'auto' keyword in C / C++?

For the longest time I thought there was no reason to use the static keyword in C, because variables declared outside of block-scope were implicitly global. Then I discovered that declaring a variable as static within block-scope would give it permanent duration, and declaring it outside of block-scope (in program-scope) would give it fi...

What's the difference between "keyword" and "reserved word"?

What's the difference between keyword and reserved word? Fore example in the concepts' proposal one can read the following statement This proposal introduces five new keywords: concept, concept map, where, axiom, and late check. All of these keywords will also be reserved words. ...