# Search:

Type: Posts; User: OnionKnight

Page 1 of 20 1

1. ## Thread: Selection Problem - Matrix

by OnionKnight
Replies
19
Views
2,331

### Gah, I didn't think that one all the way through....

Gah, I didn't think that one all the way through. Yes it wouldn't be possible to know when you've hit the maximum element for a row so I'll rest my O(n) case.
2. ## Thread: Selection Problem - Matrix

by OnionKnight
Replies
19
Views
2,331

### I can't believe I oerlooked that. But thinking...

I can't believe I oerlooked that. But thinking about it, I think there's still an O(n) solution. You only have to check 2n - 1 elements. Basically taxicab geometry where you start in the top left and...
3. ## Thread: Selection Problem - Matrix

by OnionKnight
Replies
19
Views
2,331

### There is only one row you'd need to search...

There is only one row you'd need to search through as all other rows are guaranteed to have it's maximum value less than it. In the case of equality, it wouldn't matter which of the possible rows...
4. ## Thread: Selection Problem - Matrix

by OnionKnight
Replies
19
Views
2,331

### The ordo notation gives upper bounds, which means...

The ordo notation gives upper bounds, which means the obvious O(n) solution is also O(n*log(n)). Not sure if I want to point it out though, seems to be an awful lot like "do my homework".
5. ## Thread: Selection Problem - Matrix

by OnionKnight
Replies
19
Views
2,331

### What does it mean that a row is less than another?

What does it mean that a row is less than another?
6. ## Thread: SQLite not performing update

by OnionKnight
Replies
0
Views
3,255

### SQLite not performing update

I have a table representing a hierarchy using the nested set model, declared as

CREATE TABLE tags (
id INTEGER PRIMARY KEY AUTOINCREMENT,
label TEXT NOT NULL UNIQUE,
lft INTEGER NOT NULL,...
7. ## Thread: PATH_MAX = 4k ?

by OnionKnight
Replies
10
Views
1,715

### 4k is perfectly reasonable for a path. I suppose...

4k is perfectly reasonable for a path. I suppose this is under Linux?

by OnionKnight
Replies
13
Views
6,134

### What makes you think your system uses extended...

What makes you think your system uses extended ASCII? In latin1, '&#228;' is 228. But why are you worried about the code for the character in the first place?
9. ## Thread: no string type in C?

by OnionKnight
Replies
8
Views
15,924

### Utilizing the upper limit for paths is arguably...

Utilizing the upper limit for paths is arguably the easiest way to do it. The PATH_MAX constant, while not standard to C, is quite convenient as it is defined both in Windows in windows.h and in...

by OnionKnight
Replies
6
Views
1,065

### What's a "hasard"?

What's a "hasard"?
11. ## Thread: Not enough variables.

by OnionKnight
Replies
16
Views
2,059

### Yeah I can't see the need for anything else than...

Yeah I can't see the need for anything else than constant memory either. This seems like a classical XY problem where a person has a problem X and though of a solution Y and asks about Y instead of...
12. ## Thread: WxWidgets in C?

by OnionKnight
Replies
8
Views
6,651

### C++ is riddled with things that make it clumsy...

C++ is riddled with things that make it clumsy and a lot less useful. Thinking it has somehow superseded C is just wrong on so many levels.
http://yosefk.com/c++fqa/defective.html

by OnionKnight
Replies
7
Views
1,085

### Sending messages, WM_COPYDATA in particular, can...

Sending messages, WM_COPYDATA in particular, can be used for IPC as well.
14. ## Thread: int to float conversion

by OnionKnight
Replies
6
Views
51,808

### Would also turn out troublesome if sizeof(int)...

Would also turn out troublesome if sizeof(int) differed from sizeof(float).
15. ## Thread: How to get a list of file systems and their mount path?

by OnionKnight
Replies
6
Views
1,896

### There is no /proc/mounts on the machine that...

There is no /proc/mounts on the machine that requires the program. I found out the mtab on it is /etc/mnttab so I suppose I could just parse that.
16. ## Thread: How to get a list of file systems and their mount path?

by OnionKnight
Replies
6
Views
1,896

### How to get a list of file systems and their mount path?

I want to be able to get a list of file systems and the path they're mounted just like the df program will print out, which reports disk usage. Is this possible with some POSIX.1 function or...

by OnionKnight
Replies
9
Views
2,183

### When you have to integrate sin(x)^8 dx is when I...

When you have to integrate sin(x)^8 dx is when I go SCREW YOU
18. ## Thread: Replace strncpy with snprintf, how?

by OnionKnight
Replies
19
Views
7,298

### How about snprintf(dest, sizeof(dest) < 10 ?...

How about snprintf(dest, sizeof(dest) < 10 ? sizeof(dest) : 10, "&#37;s", src); ?
19. ## Thread: isnan() and isinf() in C++

by OnionKnight
Replies
19
Views
40,352

### You cannot compare NAN like you can with...

You cannot compare NAN like you can with infinity. Anything compared with NAN is false, so NAN == NAN is false. Use isnan() in the form of std::isnan(). If you really don't like it you can use...
20. ## Thread: C++ and real languages

by OnionKnight
Replies
42
Views
3,000

### Microsft Access has localized keywords for SQL...

Microsft Access has localized keywords for SQL queries. It was a pretty scary sight.
21. ## Thread: DLL Send/PostMessage to caller

by OnionKnight
Replies
7
Views
3,898

### I don't understand how instance specific would be...

I don't understand how instance specific would be a problem, but I have noticed that the static global variable is back at NULL when another function is called after the one that passes the HWND to...
22. ## Thread: DLL Send/PostMessage to caller

by OnionKnight
Replies
7
Views
3,898

### I try to stay away from shared memory and things...

I try to stay away from shared memory and things that aren't lock- and wait-free.

I don't quite get it, filter function? The page on MSDN seems to be about a functional programming filter...
23. ## Thread: DLL Send/PostMessage to caller

by OnionKnight
Replies
7
Views
3,898

### DLL Send/PostMessage to caller

I made a global keyboard hook which according to MSDN needs to be in a separate DLL and it works fine. Now when a user does a certain keypress I want the DLL to report that back to the application...
24. ## Thread: Making a relational database

by OnionKnight
Replies
4
Views
1,263

### I forgot to mention that I could consider using...

I forgot to mention that I could consider using an RDBMS if it can be compiled into the program so I might just go with SQLite. The theory behind relational databases seems a bit too broad to get...
25. ## Thread: Making a relational database

by OnionKnight
Replies
4
Views
1,263

### Making a relational database

I am thinking of writing a tag engine for files using a relational database, but I can't find much information regarding the implementation of an efficient database. Supposedly there are books out...
Results 1 to 25 of 500
Page 1 of 20 1