Hello, reading one article I found that performance one algorithm is measured in O(log* V). Can you explain me what log* V means. I generally understand big Oh notation and I know what O(NlogN) means, but what is the meninig of '*'?

Member Avatar
Member Avatar
+0 forum 5

Hello, I've been reading Narue's Timesaving Tips and found this code from Dave Sinkula [code] #include <iostream> #include <vector> #include <iterator> using namespace std; int main() { int a[] = {1,2,3,4,5}; vector<int> v(a, a + 5); vector<int>::const_iterator it, end = v.end(); for (it = v.begin(); it < end; ++it) { cout << *it << endl; } } [/code] This line is interesting: [code] for (it = v.begin(); it < end; ++it) [/code] This works for vectors, but generally it's a bad programmer practice to use relation operator < with iterators because it won't work with all containers. Operator < is …

Member Avatar
Member Avatar
+0 forum 1

Hi all, I have bought a newcomputer with motherboard ASUS A8NSLI [url]http://www.electronicsoutfitter.com/store/A8NSLI.html[/url] However I have one question: from the back of my computer I hae a cable with two male jacks. On one is written mic and on the other is written mic. I have never seen this before. If I open chasis warranty void so I don't know where these cables are connected in the mother board. Can you explain me the purpose of these two cables with male jacks (like ones from speakers). Thanks

Member Avatar
Member Avatar
+0 forum 1

Hello, by searching explanations and code for heap sort I found tghis code: [code] #include <stdio.h> #define less(a, b) ((a) < (b)) static void exchange ( int *a, int *b ) { int t = *a; *a = *b; *b = t; } static void fixDown ( int *a, int k, int N ) { int j; while ( 2 * k <= N ) { j = 2 * k; if ( j < N && less ( a[j], a[j+1] ) ) j++; if ( !less ( a[k], a[j] ) ) break; exchange ( &a[k], &a[j] ); k = …

Member Avatar
Member Avatar
+0 forum 2

Hello, I don't know how exactly to explain this but usually menu bars in programs have on underline letter which you can use with Alt key to choose it. For example in almost all programs you can use Alt+F to open File menu. However in some programs you cannot see underline letter. Only after you press Alt you can see underline letter. I mean you see only File instead of [U]F[/U]ile. This is the case with winzip and notepad on my machine. Anybody knows why is that? Thanks

Member Avatar
Member Avatar
+0 forum 2

Hello, I've been experimenting with different Python IDEs since I started to learn Python. I must say that WingIDE is the best I tried, but unfortunately it's not free and that 10 minutes use is killing me. So I decide to write my Python programs in DrPython which was recommended by vegaseat. DrPython is very pretty nad very customizable IDE.My question is how to debug with DrPython if I have unexpected program behaviour? Does DrPython support debugging at all? It's seems that it's not have breakpoints. I usually switch to PythonWin to trace bugs, but I wonder if there is …

Member Avatar
Member Avatar
+0 forum 2

Hello, I'm trying to execute this simple code: [code] class Person: population = 0 def __init__(self, name): print 'Creating % s peron' % name self.name = name Person.population += 1 def __del__(self): print 'Destroying %s person' % self.name Person.population -= 1 prvi = Person('Asimi') drugi = Person('Mici') [/code] I'm using Wing IDE trial and here's what is output in debug mode: Creating Asimi peron Creating Mici peron Destroying Mici person Exception exceptions.AttributeError: "'NoneType' object has no attribute 'population'" in <bound method Person.__del__ of <__main__.Person instance at 0x00B29558>> ignored Destroying Asimi person Exception exceptions.AttributeError: "'NoneType' object has no attribute 'population'" in …

Member Avatar
Member Avatar
+0 forum 2

Hello, copying from one file to another is a simple matter. In C it's something like this: [code] int main(void) { FILE * fp1, * fp2 ; int buff; fp1 = fopen ("name", "rb"); fp2 = fopen ("name", "wb"); while ( (buff = fgetc(fp1)) != EOF) { fputc(buff, fp2); } } [/code] I'm wondering how this is done in C++ My idea is this: [code] int main() { int buf; ifstream fp_in("my.txt", ios_base::binary | ios_base::in ); ofstream fp_out("my_copy.txt", ios_base::binary | ios_base::out); while (fp_in.read ( (char*) &buf, sizeof buf )) fp_out.write ( (char*) &buf, sizeof buf ); } [/code] I think …

Member Avatar
Member Avatar
+0 forum 4

Hello, I've downloaded PythonWin as a better IDE for writing Python code. I came across an interesting issue (as vegaseat pointed out) When I try to write this sentence in my native language "Ja sam

Member Avatar
Member Avatar
+0 forum 5

Hi, I wonder if you can give me any advice how to learn Python. My plan is to read python tutorial in documentation from begining to the end, and then to get some book (learning Python, or Python in a nutshell). How long it will take (in average) to get comfortable with the language? I have a solid knowleadge of C and C++ and I see in Python documentation many reference to C, maybe Python is written in C? I'm really very new to this language and to interpreted language as well, so I don't really know what all thah …

Member Avatar
Member Avatar
+0 forum 3

Hello, I've just started to learn Python. I have two questions: 1. Is there any way to set up default folder for Python files (that Atest from introductionary example)? 2. can you suggest any good Python IDE (existing is OK, but I have a fealing that I'm working in ordinary colored Notepad? Thanks

Member Avatar
Member Avatar
+0 forum 5

Hello, somewhere I wrote this assignment_ "Write concurent service to keep track of students records" I'm wondering what term concurent service means, does that mean multithreading or what? I know this question is not specified enaugh, but i found that on one .edu page of some university. Do you know which computer progam can you call concurrent service? Thanks - Micko

Member Avatar
Member Avatar
+0 forum 2

Hello, I've just read thread why I should lear python and I must admit that I'm very interestwed to learn oppython myself. i have experience with C and C++ programming language. If I understood corectly Python is an interpreted language. What is advantage of interepreted languages (if there are any)? For example I write C++ code compile it, link it and then I can give or sell complete program (exe file). How to distribute interpreted language? Does that mean that I must share source code or what? I really don't have any experience with any interpreted language so, plase, do …

Member Avatar
Member Avatar
+0 forum 2

Hello there I'm a new member of this board. Can anyone explain me on some example what callback functions really do? I found one tutorial about function pointers where concept of callback function is introduced but I didn't find it suitable for understanding. Can anyone exaplain it in simple terms or even provide a good link? Thanks

Member Avatar
Member Avatar
+0 forum 4

The End.